Browse Source

start on longjump macro

gamebridge
Cadey Ratio 11 months ago
parent
commit
3e3be0dc1e
  1. 46
      longjump.inputs
  2. 4
      src/pc/controller/controller_tas_recorder.c

46
longjump.inputs

@ -0,0 +1,46 @@
0000f97f
0000f97f
0000f97f
0000f97f
0000f97f
2000fa7f
2000fa7f
2000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000ff7f
a000177f
a000347f
a0005479
a0005a74
a0005a73
a0006269
a0006664
a0006b5f
a0006b5e
20006b5e
20006b5e
20006b5e
2000576b
20003e6f
20002765
20002042
20001e24
20000000
20000000
20000000
20000000
20000000
20000000

4
src/pc/controller/controller_tas_recorder.c

@ -30,12 +30,14 @@ static void tas_recorder_init(void) {
memset(buf, 0, sizeof(buf));
fwrite(buf, 1, sizeof(buf), fout);
atexit(tas_recorder_close);
counter = 0;
}
static void tas_recorder_read(OSContPad *pad) {
if (fout == NULL) {
return;
}
counter += 4;
uint8_t bytes[4] = {0};
int button1 = pad->button;
@ -45,6 +47,8 @@ static void tas_recorder_read(OSContPad *pad) {
bytes[2] = pad->stick_x;
bytes[3] = pad->stick_y;
fwrite(bytes, 1, 4, fout);
printf("[tas_recorder] %08x: %04x %02x%02x\n", (counter + OFFSET), pad->button, bytes[2], bytes[3]);
}
struct ControllerAPI controller_tas_recorder = {

Loading…
Cancel
Save