Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
demo.c
Go to the documentation of this file.
1#include "engine/game.h"
2#include <libpad.h>
3
4/* Demo recording was left out of the release: it never starts */
6 return 0;
7}
8
9/* Does nothing: demo recording was left out */
11}
12
13/* 1 while pad `pad` records a demo, -1 while another pad does, 0 otherwise (never set) */
16 if (PAD.demoPad == pad) {
17 return 1;
18 }
19 return -1;
20 }
21 return 0;
22}
23
24/* Replays `data` (one raw buffer a frame) as the input of pad */
28 if (PAD.demoData == NULL) {
29 PAD.demoPad = pad;
30 PAD.demoData = data;
31 PAD.demoFrame = 0;
32 setVibration((pad * 16) & 0xF0, 0, 0, 0);
33 return 1;
34 }
35 }
36 return 0;
37}
38
39/* Gives the pads back to the players */
40void stopDemoPlayback(void) {
42 PAD.flags &= ~PAD_FLAG_DEMO_PLAYBACK;
44 PAD.demoPad = 0;
45 PAD.demoFrame = 0;
46 }
47}
48
49/* 1 while pad `pad` replays a demo, -1 while another pad does, 0 otherwise */
52 if (PAD.demoPad == pad) {
53 return 1;
54 }
55 return -1;
56 }
57 return 0;
58}
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
s32 startDemoRecording(void)
Demo recording was left out of the release: it never starts.
Definition demo.c:5
s32 isDemoRecording(s32 pad)
1 while pad pad records a demo, -1 while another pad does, 0 otherwise (never set)
Definition demo.c:14
void stopDemoRecording(void)
Does nothing: demo recording was left out.
Definition demo.c:10
void stopDemoPlayback(void)
Gives the pads back to the players.
Definition demo.c:40
s32 isDemoPlaying(s32 pad)
1 while pad pad replays a demo, -1 while another pad does, 0 otherwise
Definition demo.c:50
s32 startDemoPlayback(s16 pad, PadBuffer *data)
Replays data (one raw buffer a frame) as the input of pad.
Definition demo.c:25
s32 setVibration(u16 port, s32 motor, s16 time, u8 value)
Starts a motor for time vsyncs (0 stops it)
Definition pad.c:98
PadState PAD
Controller input: cleared by initPad, then the methods.
Definition pad.c:168
#define PAD_FLAG_DEMO_RECORDING
Definition pad.h:94
#define PAD_FLAG_DEMO_PLAYBACK
PadState.flags: bits 0-7 hold the mode lock of each port/slot (lockPadMode), the rest are these.
Definition pad.h:93
s32 flags
Definition pad.h:112
PadBuffer * demoData
a buffer a frame
Definition pad.h:118
s16 demoPad
Definition pad.h:117
s16 demoFrame
Definition pad.h:119
A port's receive buffer, and a frame of a demo: a pad, or a multitap and the four pads behind it.
Definition pad.h:66