Remove tas controller

This commit is contained in:
MysterD 2023-11-08 13:03:55 -08:00
parent 4e9dd6a127
commit f44126f0a4
3 changed files with 0 additions and 56 deletions

View File

@ -4,7 +4,6 @@
#include "../configfile.h"
#include "controller_recorded_tas.h"
#include "controller_keyboard.h"
#include "controller_sdl.h"
@ -21,7 +20,6 @@ int mouse_window_x;
int mouse_window_y;
static struct ControllerAPI *controller_implementations[] = {
&controller_recorded_tas,
#if defined(CAPI_SDL2) || defined(CAPI_SDL1)
&controller_sdl,
#endif

View File

@ -1,46 +0,0 @@
#include <stdio.h>
#include <ultra64.h>
#include "controller_api.h"
static FILE *fp;
static void tas_init(void) {
fp = fopen("cont.m64", "rb");
if (fp != NULL) {
uint8_t buf[0x400];
fread(buf, 1, sizeof(buf), fp);
}
}
static void tas_read(OSContPad *pad) {
if (fp != NULL) {
uint8_t bytes[4] = {0};
fread(bytes, 1, 4, fp);
pad->button = (bytes[0] << 8) | bytes[1];
pad->stick_x = bytes[2];
pad->stick_y = bytes[3];
}
}
static void tas_shutdown(void) {
if (fp != NULL) {
fclose(fp);
fp = NULL;
}
}
static u32 tas_rawkey(void) {
return VK_INVALID;
}
struct ControllerAPI controller_recorded_tas = {
VK_INVALID,
tas_init,
tas_read,
tas_rawkey,
NULL, // no rumble_play
NULL, // no rumble_stop
NULL, // no rebinding
tas_shutdown
};

View File

@ -1,8 +0,0 @@
#ifndef CONTROLLER_RECORDED_TAS_H
#define CONTROLLER_RECORDED_TAS_H
#include "controller_api.h"
extern struct ControllerAPI controller_recorded_tas;
#endif