X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftape.h;h=0924395c0e11a089784c3664044681a230422ff1;hp=4eea1de0bfad091d9705878be0fa123e4500c5fd;hb=70fe541d68f18a22eb3bd134f128c0d56b885701;hpb=50a408da2e60177326e842a9e7c8e5bf80a9b0e1 diff --git a/src/tape.h b/src/tape.h index 4eea1de0..0924395c 100644 --- a/src/tape.h +++ b/src/tape.h @@ -14,12 +14,19 @@ /* values for TapeTogglePause() */ -#define TAPE_TOGGLE_MANUAL TRUE -#define TAPE_TOGGLE_AUTOMATIC FALSE +#define TAPE_TOGGLE_AUTOMATIC 0 +#define TAPE_TOGGLE_MANUAL (1 << 0) +#define TAPE_TOGGLE_PLAY_PAUSE (1 << 1) /* values for tape properties */ #define MAX_TAPE_LEN (1000 * FRAMES_PER_SECOND) /* max.time x fps */ +/* values for tape mouse actions */ +#define TAPE_ACTION_LX 0 +#define TAPE_ACTION_LY 1 +#define TAPE_ACTION_BUTTON 2 +#define TAPE_ACTION_UNUSED 3 + /* some positions in the video tape control window */ #define VIDEO_DISPLAY1_XPOS 5 #define VIDEO_DISPLAY1_YPOS 5 @@ -49,14 +56,15 @@ #define VIDEO_STATE_FRAME_ON (1 << 11) #define VIDEO_STATE_FFWD_OFF (1 << 12) #define VIDEO_STATE_FFWD_ON (1 << 13) -#define VIDEO_STATE_PBEND_OFF (1 << 14) -#define VIDEO_STATE_PBEND_ON (1 << 15) -#define VIDEO_STATE_WARP_OFF (1 << 16) -#define VIDEO_STATE_WARP_ON (1 << 17) -#define VIDEO_STATE_WARP2_OFF (1 << 18) -#define VIDEO_STATE_WARP2_ON (1 << 19) +#define VIDEO_STATE_WARP_OFF (1 << 14) +#define VIDEO_STATE_WARP_ON (1 << 15) +#define VIDEO_STATE_WARP2_OFF (1 << 16) +#define VIDEO_STATE_WARP2_ON (1 << 17) +#define VIDEO_STATE_PBEND_OFF (1 << 18) +#define VIDEO_STATE_PBEND_ON (1 << 19) #define VIDEO_STATE_1STEP_OFF (1 << 20) #define VIDEO_STATE_1STEP_ON (1 << 21) + #define VIDEO_PRESS_PLAY_ON (1 << 22) #define VIDEO_PRESS_PLAY_OFF (1 << 23) #define VIDEO_PRESS_REC_ON (1 << 24) @@ -75,10 +83,11 @@ #define VIDEO_STATE_TIME(x) ((x) ? VIDEO_STATE_TIME_ON : VIDEO_STATE_TIME_OFF) #define VIDEO_STATE_FRAME(x) ((x) ? VIDEO_STATE_FRAME_ON: VIDEO_STATE_FRAME_OFF) #define VIDEO_STATE_FFWD(x) ((x) ? VIDEO_STATE_FFWD_ON : VIDEO_STATE_FFWD_OFF) -#define VIDEO_STATE_PBEND(x) ((x) ? VIDEO_STATE_PBEND_ON: VIDEO_STATE_PBEND_OFF) #define VIDEO_STATE_WARP(x) ((x) ? VIDEO_STATE_WARP_ON : VIDEO_STATE_WARP_OFF) #define VIDEO_STATE_WARP2(x) ((x) ? VIDEO_STATE_WARP2_ON: VIDEO_STATE_WARP2_OFF) +#define VIDEO_STATE_PBEND(x) ((x) ? VIDEO_STATE_PBEND_ON: VIDEO_STATE_PBEND_OFF) #define VIDEO_STATE_1STEP(x) ((x) ? VIDEO_STATE_1STEP_ON: VIDEO_STATE_1STEP_OFF) + #define VIDEO_PRESS_PLAY(x) ((x) ? VIDEO_PRESS_PLAY_ON : VIDEO_PRESS_PLAY_OFF) #define VIDEO_PRESS_REC(x) ((x) ? VIDEO_PRESS_REC_ON : VIDEO_PRESS_REC_OFF) #define VIDEO_PRESS_PAUSE(x) ((x) ? VIDEO_PRESS_PAUSE_ON: VIDEO_PRESS_PAUSE_OFF) @@ -100,6 +109,8 @@ struct TapeButtonInfo struct XY pause; struct XY record; struct XY play; + struct XY insert_solution; + struct XY play_solution; }; struct TapeSymbolInfo @@ -164,7 +175,7 @@ struct TapeInfo unsigned int length_frames; unsigned int length_seconds; unsigned int delay_played; - boolean pause_before_death; + boolean pause_before_end; boolean recording, playing, pausing; boolean fast_forward; boolean warp_forward; @@ -179,6 +190,8 @@ struct TapeInfo int centered_player_nr_next; boolean set_centered_player; + boolean use_mouse; + struct { byte action[MAX_PLAYERS]; @@ -208,6 +221,7 @@ void TapeSetDateFromNow(); void TapeStartRecording(int); void TapeHaltRecording(void); void TapeStopRecording(void); +boolean TapeAddAction(byte *); void TapeRecordAction(byte *); void TapeTogglePause(boolean); void TapeStartPlaying(void); @@ -219,7 +233,8 @@ unsigned int GetTapeLengthFrames(void); unsigned int GetTapeLengthSeconds(void); void TapeQuickSave(void); void TapeQuickLoad(void); -void InsertSolutionTape(void); +boolean InsertSolutionTape(void); +boolean PlaySolutionTape(void); void AutoPlayTape(void); @@ -229,6 +244,8 @@ void MapTapeEjectButton(); void MapTapeWarpButton(); void MapTapeButtons(); void UnmapTapeButtons(); +void RedrawTapeButtons(); +void RedrawOrRemapTapeButtons(); void HandleTapeButtonKeys(Key);