X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.h;h=0e6d11d880404fb244a792bc8c1bd6a98c7153d5;hb=14d7691c65ca4a466ce9b9448153e8fbe8351a81;hp=4bddf23b6497305256d276882e0c380a7bbf587f;hpb=ea6e4698905d7440a265e323d03cf13fc323c44b;p=rocksndiamonds.git diff --git a/src/tape.h b/src/tape.h index 4bddf23b..0e6d11d8 100644 --- a/src/tape.h +++ b/src/tape.h @@ -1,26 +1,25 @@ -/*********************************************************** -* Rocks'n'Diamonds -- McDuffin Strikes Back! * -*----------------------------------------------------------* -* (c) 1995-2002 Artsoft Entertainment * -* Holger Schemel * -* Detmolder Strasse 189 * -* 33604 Bielefeld * -* Germany * -* e-mail: info@artsoft.org * -*----------------------------------------------------------* -* tape.h * -***********************************************************/ +// ============================================================================ +// Rocks'n'Diamonds - McDuffin Strikes Back! +// ---------------------------------------------------------------------------- +// (c) 1995-2014 by Artsoft Entertainment +// Holger Schemel +// info@artsoft.org +// http://www.artsoft.org/ +// ---------------------------------------------------------------------------- +// tape.h +// ============================================================================ #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 +91,107 @@ #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 show_game_buttons; /* show game buttons in tape viewport */ + + 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