added centering levels that are smaller than the playfield (MM engine)
[rocksndiamonds.git] / src / tape.h
index 4eea1de0bfad091d9705878be0fa123e4500c5fd..ab3fd55cea32dc09e1f781f212e84b6080e53280 100644 (file)
 
 
 /* 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
 #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)
 #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)
@@ -164,7 +173,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 +188,8 @@ struct TapeInfo
   int centered_player_nr_next;
   boolean set_centered_player;
 
+  boolean use_mouse;
+
   struct
   {
     byte action[MAX_PLAYERS];
@@ -208,6 +219,7 @@ void TapeSetDateFromNow();
 void TapeStartRecording(int);
 void TapeHaltRecording(void);
 void TapeStopRecording(void);
+boolean TapeAddAction(byte *);
 void TapeRecordAction(byte *);
 void TapeTogglePause(boolean);
 void TapeStartPlaying(void);
@@ -229,6 +241,8 @@ void MapTapeEjectButton();
 void MapTapeWarpButton();
 void MapTapeButtons();
 void UnmapTapeButtons();
+void RedrawTapeButtons();
+void RedrawOrRemapTapeButtons();
 
 void HandleTapeButtonKeys(Key);