X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.h;h=6a5107cb5a849fecd6d4c55ffab3804fd4dc0495;hb=61c3da024802ecc0268bab42d7499fc0346e4fd3;hp=4bddf23b6497305256d276882e0c380a7bbf587f;hpb=ea6e4698905d7440a265e323d03cf13fc323c44b;p=rocksndiamonds.git diff --git a/src/tape.h b/src/tape.h index 4bddf23b..6a5107cb 100644 --- a/src/tape.h +++ b/src/tape.h @@ -1,7 +1,7 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* (c) 1995-2002 Artsoft Entertainment * +* (c) 1995-2006 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -14,13 +14,14 @@ #ifndef TAPE_H #define TAPE_H -#include "main.h" - /* values for TapeTogglePause() */ #define TAPE_TOGGLE_MANUAL TRUE #define TAPE_TOGGLE_AUTOMATIC FALSE +/* values for tape properties */ +#define MAX_TAPE_LEN (1000 * FRAMES_PER_SECOND) /* max.time x fps */ + /* some positions in the video tape control window */ #define VIDEO_DISPLAY1_XPOS 5 #define VIDEO_DISPLAY1_YPOS 5 @@ -92,13 +93,105 @@ #define VIDEO_DISPLAY_SYMBOL_ONLY -2 -void DrawVideoDisplay(unsigned long, unsigned long); +struct TapeButtonInfo +{ + struct Rect eject; + struct Rect stop; + struct Rect pause; + struct Rect record; + struct Rect play; +}; + +struct TapeSymbolInfo +{ + struct Rect eject; + struct Rect stop; + struct Rect pause; + struct Rect record; + struct Rect play; + struct Rect fast_forward; + struct Rect warp_forward; + struct Rect warp_forward_blind; + struct Rect pause_before_end; + struct Rect single_step; +}; + +struct TapeLabelInfo +{ + struct Rect eject; + struct Rect stop; + struct Rect pause; + struct Rect record; + struct Rect play; + struct Rect fast_forward; + struct Rect warp_forward; + struct Rect warp_forward_blind; + struct Rect pause_before_end; + struct Rect single_step; + struct Rect date; + struct Rect time; +}; + +struct TapeTextInfo +{ + struct TextPosInfo date; + struct TextPosInfo time; +}; + +struct TapeInfo +{ + int file_version; /* file format version the tape is stored with */ + int game_version; /* game release version the tape was created with */ + int engine_version; /* game engine version the tape was recorded with */ + + char *level_identifier; + int level_nr; + unsigned int random_seed; + unsigned int date; + unsigned int counter; + unsigned int length; + unsigned int length_seconds; + unsigned int delay_played; + boolean pause_before_death; + boolean recording, playing, pausing; + boolean fast_forward; + boolean warp_forward; + boolean deactivate_display; + boolean auto_play; + boolean auto_play_level_solved; + boolean quick_resume; + boolean single_step; + boolean changed; + boolean player_participates[MAX_PLAYERS]; + int num_participating_players; + int centered_player_nr_next; + boolean set_centered_player; + + struct + { + byte action[MAX_PLAYERS]; + byte delay; + } pos[MAX_TAPE_LEN]; + + struct TapeButtonInfo button; + struct TapeSymbolInfo symbol; + struct TapeLabelInfo label; + struct TapeTextInfo text; + + boolean no_valid_file; /* set when tape file missing or invalid */ +}; + + +void DrawVideoDisplay(unsigned int, unsigned int); void DrawCompleteVideoDisplay(void); void TapeDeactivateDisplayOn(); void TapeDeactivateDisplayOff(boolean); -void TapeStartRecording(void); +void TapeSetDateFromEpochSeconds(time_t); +void TapeSetDateFromNow(); + +void TapeStartRecording(int); void TapeHaltRecording(void); void TapeStopRecording(void); void TapeRecordAction(byte *); @@ -122,4 +215,6 @@ void MapTapeWarpButton(); void MapTapeButtons(); void UnmapTapeButtons(); +void HandleTapeButtonKeys(Key); + #endif