int demo_repeat = (demo->data[i] & 0xf0) >> 4;
int tape_action = map_key_SP_to_RND(demo_action);
int tape_repeat = demo_repeat + 1;
- byte action[MAX_PLAYERS] = { tape_action, 0, 0, 0 };
+ byte action[MAX_TAPE_ACTIONS] = { tape_action };
boolean success = 0;
int j;
unsigned int game_frame_delay_value;
byte *recorded_player_action;
byte summarized_player_action = 0;
- byte tape_action[MAX_PLAYERS];
+ byte tape_action[MAX_TAPE_ACTIONS] = { 0 };
int i;
// detect endless loops, caused by custom element programming
MapTapeEjectButton();
}
-boolean TapeAddAction(byte action[MAX_PLAYERS])
+boolean TapeAddAction(byte action[MAX_TAPE_ACTIONS])
{
int i;
{
boolean changed_events = FALSE;
- for (i = 0; i < MAX_PLAYERS; i++)
+ for (i = 0; i < MAX_TAPE_ACTIONS; i++)
if (tape.pos[tape.counter].action[i] != action[i])
changed_events = TRUE;
if (tape.pos[tape.counter].delay == 0) // store new action
{
- for (i = 0; i < MAX_PLAYERS; i++)
+ for (i = 0; i < MAX_TAPE_ACTIONS; i++)
tape.pos[tape.counter].action[i] = action[i];
tape.pos[tape.counter].delay++;
return TRUE;
}
-void TapeRecordAction(byte action_raw[MAX_PLAYERS])
+void TapeRecordAction(byte action_raw[MAX_TAPE_ACTIONS])
{
- byte action[MAX_PLAYERS];
+ byte action[MAX_TAPE_ACTIONS];
int i;
if (!tape.recording) // (record action even when tape is paused)
return;
- for (i = 0; i < MAX_PLAYERS; i++)
+ for (i = 0; i < MAX_TAPE_ACTIONS; i++)
action[i] = action_raw[i];
if (!tape.use_mouse && tape.set_centered_player)
int update_delay = FRAMES_PER_SECOND / 2;
boolean update_video_display = (FrameCounter % update_delay == 0);
boolean update_draw_label_on = ((FrameCounter / update_delay) % 2 == 1);
- static byte action[MAX_PLAYERS];
+ static byte action[MAX_TAPE_ACTIONS];
int i;
if (!tape.playing || tape.pausing)
DrawVideoDisplaySymbol(state);
}
- for (i = 0; i < MAX_PLAYERS; i++)
+ for (i = 0; i < MAX_TAPE_ACTIONS; i++)
action[i] = tape.pos[tape.counter].action[i];
#if DEBUG_TAPE_WHEN_PLAYING
printf("%05d", FrameCounter);
- for (i = 0; i < MAX_PLAYERS; i++)
+ for (i = 0; i < MAX_TAPE_ACTIONS; i++)
printf(" %08x", action[i]);
printf("\n");
#endif
#define TAPE_ACTION_BUTTON 2
#define TAPE_ACTION_UNUSED 3
+#define MAX_TAPE_ACTIONS 4
+
// some positions in the video tape control window
#define VIDEO_DISPLAY1_XPOS 5
#define VIDEO_DISPLAY1_YPOS 5
struct
{
- byte action[MAX_PLAYERS];
+ byte action[MAX_TAPE_ACTIONS];
byte delay;
} pos[MAX_TAPE_LEN];