mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2026-10-03 20:28:01 +03:00
Version 1.08 with public source code release.
This commit is contained in:
Vendored
+62
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Example implementation of the piubtn API. This doesn't really implement anything but rather provides a stub file that
|
||||
* helps anyone to get started with API development/prototyping.
|
||||
*
|
||||
* A simple setup for a quick start:
|
||||
* 1. Ensure that the API folders with the headers are located next to this file, specifically ptapi/io/piubtn.h.
|
||||
* 2. Compile using: gcc -I. -m32 -shared -fPIC -o ptapi-io-piubtn-stub.so ptapi-io-piubtn-stub.c
|
||||
* 3. Follow the steps in the readme to configure it for the game of your choice.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ptapi/io/piubtn.h"
|
||||
|
||||
const char* ptapi_io_piubtn_ident(void)
|
||||
{
|
||||
return "stub";
|
||||
}
|
||||
|
||||
bool ptapi_io_piubtn_open(void)
|
||||
{
|
||||
printf("piubtn-stub: ptapi_io_piubtn_open\n");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ptapi_io_piubtn_close(void)
|
||||
{
|
||||
printf("piubtn-stub: ptapi_io_piubtn_close\n");
|
||||
}
|
||||
|
||||
bool ptapi_io_piubtn_recv(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ptapi_io_piubtn_send(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void ptapi_io_piubtn_get_input(uint8_t player, struct ptapi_io_piubtn_inputs* inputs)
|
||||
{
|
||||
// Set all inputs to off
|
||||
if (player == 0) {
|
||||
inputs->left = false;
|
||||
inputs->right = false;
|
||||
inputs->start = false;
|
||||
inputs->back = false;
|
||||
} else {
|
||||
inputs->left = false;
|
||||
inputs->right = false;
|
||||
inputs->start = false;
|
||||
inputs->back = false;
|
||||
}
|
||||
}
|
||||
|
||||
void ptapi_io_piubtn_set_output(uint8_t player, const struct ptapi_io_piubtn_outputs* outputs)
|
||||
{
|
||||
|
||||
}
|
||||
Vendored
+79
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Example implementation of the piuio API. This doesn't really implement anything but rather provides a stub file that
|
||||
* helps anyone to get started with API development/prototyping.
|
||||
*
|
||||
* A simple setup for a quick start:
|
||||
* 1. Ensure that the API folders with the headers are located next to this file, specifically ptapi/io/piuio.h.
|
||||
* 2. Compile using: gcc -I. -m32 -shared -fPIC -o ptapi-io-piuio-stub.so ptapi-io-piuio-stub.c
|
||||
* 3. Follow the steps in the readme to configure it for the game of your choice.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ptapi/io/piuio.h"
|
||||
|
||||
const char* ptapi_io_piuio_ident(void)
|
||||
{
|
||||
return "stub";
|
||||
}
|
||||
|
||||
bool ptapi_io_piuio_open(void)
|
||||
{
|
||||
printf("piuio-stub: ptapi_io_piuio_open\n");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ptapi_io_piuio_close(void)
|
||||
{
|
||||
printf("piuio-stub: ptapi_io_piuio_close\n");
|
||||
}
|
||||
|
||||
bool ptapi_io_piuio_recv(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ptapi_io_piuio_send(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void ptapi_io_piuio_get_input_pad(uint8_t player, enum ptapi_io_piuio_sensor_group sensor_group,
|
||||
struct ptapi_io_piuio_pad_inputs* inputs)
|
||||
{
|
||||
// Set all inputs to off
|
||||
if (player == 0) {
|
||||
inputs->lu = false;
|
||||
inputs->ru = false;
|
||||
inputs->cn = false;
|
||||
inputs->ld = false;
|
||||
inputs->rd = false;
|
||||
} else {
|
||||
inputs->lu = false;
|
||||
inputs->ru = false;
|
||||
inputs->cn = false;
|
||||
inputs->ld = false;
|
||||
inputs->rd = false;
|
||||
}
|
||||
}
|
||||
|
||||
void ptapi_io_piuio_get_input_sys(struct ptapi_io_piuio_sys_inputs* inputs)
|
||||
{
|
||||
// Set all inputs to off
|
||||
inputs->test = false;
|
||||
inputs->service = false;
|
||||
inputs->clear = false;
|
||||
inputs->coin = false;
|
||||
inputs->coin2 = false;
|
||||
}
|
||||
|
||||
void ptapi_io_piuio_set_output_pad(uint8_t player, const struct ptapi_io_piuio_pad_outputs* outputs)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ptapi_io_piuio_set_output_cab(const struct ptapi_io_piuio_cab_outputs* outputs)
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user