rnd-20031202-1-src
[rocksndiamonds.git] / src / tape.h
1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
3 *----------------------------------------------------------*
4 * (c) 1995-2002 Artsoft Entertainment                      *
5 *               Holger Schemel                             *
6 *               Detmolder Strasse 189                      *
7 *               33604 Bielefeld                            *
8 *               Germany                                    *
9 *               e-mail: info@artsoft.org                   *
10 *----------------------------------------------------------*
11 * tape.h                                                   *
12 ***********************************************************/
13
14 #ifndef TAPE_H
15 #define TAPE_H
16
17 #include "main.h"
18
19
20 /* values for TapeTogglePause() */
21 #define TAPE_TOGGLE_MANUAL      TRUE
22 #define TAPE_TOGGLE_AUTOMATIC   FALSE
23
24 /* some positions in the video tape control window */
25 #define VIDEO_DISPLAY1_XPOS     5
26 #define VIDEO_DISPLAY1_YPOS     5
27 #define VIDEO_DISPLAY2_XPOS     5
28 #define VIDEO_DISPLAY2_YPOS     41
29 #define VIDEO_DISPLAY_XSIZE     90
30 #define VIDEO_DISPLAY_YSIZE     31
31 #define VIDEO_BUTTON_XSIZE      18
32 #define VIDEO_BUTTON_YSIZE      18
33 #define VIDEO_CONTROL_XPOS      5
34 #define VIDEO_CONTROL_YPOS      77
35 #define VIDEO_CONTROL_XSIZE     VIDEO_DISPLAY_XSIZE
36 #define VIDEO_CONTROL_YSIZE     VIDEO_BUTTON_YSIZE
37
38 /* values for video tape control */
39 #define VIDEO_STATE_PLAY_OFF    (1L << 0)
40 #define VIDEO_STATE_PLAY_ON     (1L << 1)
41 #define VIDEO_STATE_PLAY        (VIDEO_STATE_PLAY_OFF   | VIDEO_STATE_PLAY_ON)
42 #define VIDEO_STATE_REC_OFF     (1L << 2)
43 #define VIDEO_STATE_REC_ON      (1L << 3)
44 #define VIDEO_STATE_REC         (VIDEO_STATE_REC_OFF    | VIDEO_STATE_REC_ON)
45 #define VIDEO_STATE_PAUSE_OFF   (1L << 4)
46 #define VIDEO_STATE_PAUSE_ON    (1L << 5)
47 #define VIDEO_STATE_PAUSE       (VIDEO_STATE_PAUSE_OFF  | VIDEO_STATE_PAUSE_ON)
48 #define VIDEO_STATE_DATE_OFF    (1L << 6)
49 #define VIDEO_STATE_DATE_ON     (1L << 7)
50 #define VIDEO_STATE_DATE        (VIDEO_STATE_DATE_OFF   | VIDEO_STATE_DATE_ON)
51 #define VIDEO_STATE_TIME_OFF    (1L << 8)
52 #define VIDEO_STATE_TIME_ON     (1L << 9)
53 #define VIDEO_STATE_TIME        (VIDEO_STATE_TIME_OFF   | VIDEO_STATE_TIME_ON)
54 #define VIDEO_PRESS_PLAY_ON     (1L << 10)
55 #define VIDEO_PRESS_PLAY_OFF    (1L << 11)
56 #define VIDEO_PRESS_PLAY        (VIDEO_PRESS_PLAY_OFF   | VIDEO_PRESS_PLAY_ON)
57 #define VIDEO_PRESS_REC_ON      (1L << 12)
58 #define VIDEO_PRESS_REC_OFF     (1L << 13)
59 #define VIDEO_PRESS_REC         (VIDEO_PRESS_REC_OFF    | VIDEO_PRESS_REC_ON)
60 #define VIDEO_PRESS_PAUSE_ON    (1L << 14)
61 #define VIDEO_PRESS_PAUSE_OFF   (1L << 15)
62 #define VIDEO_PRESS_PAUSE       (VIDEO_PRESS_PAUSE_OFF  | VIDEO_PRESS_PAUSE_ON)
63 #define VIDEO_PRESS_STOP_ON     (1L << 16)
64 #define VIDEO_PRESS_STOP_OFF    (1L << 17)
65 #define VIDEO_PRESS_STOP        (VIDEO_PRESS_STOP_OFF   | VIDEO_PRESS_STOP_ON)
66 #define VIDEO_PRESS_EJECT_ON    (1L << 18)
67 #define VIDEO_PRESS_EJECT_OFF   (1L << 19)
68 #define VIDEO_PRESS_EJECT       (VIDEO_PRESS_EJECT_OFF  | VIDEO_PRESS_EJECT_ON)
69
70 /* special */
71 #define VIDEO_STATE_FFWD_OFF    ((1L << 20) | VIDEO_STATE_PAUSE_OFF)
72 #define VIDEO_STATE_FFWD_ON     (1L << 21)
73 #define VIDEO_STATE_FFWD        (VIDEO_STATE_FFWD_OFF   | VIDEO_STATE_FFWD_ON)
74 #define VIDEO_STATE_PBEND_OFF   (1L << 22)
75 #define VIDEO_STATE_PBEND_ON    (1L << 23)
76 #define VIDEO_STATE_PBEND       (VIDEO_STATE_PBEND_OFF  | VIDEO_STATE_PBEND_ON)
77
78 /* tags to draw video display labels or symbols only */
79 /* (negative values to prevent misinterpretation in DrawVideoDisplay(), where
80    the variable "value" is also used for tape length -- better fix this) */
81 #define VIDEO_DISPLAY_DEFAULT           0
82 #define VIDEO_DISPLAY_LABEL_ONLY        -1
83 #define VIDEO_DISPLAY_SYMBOL_ONLY       -2
84
85
86 void DrawVideoDisplay(unsigned long, unsigned long);
87 void DrawCompleteVideoDisplay(void);
88
89 void TapeStartRecording(void);
90 void TapeHaltRecording(void);
91 void TapeStopRecording(void);
92 void TapeRecordAction(byte *);
93 void TapeTogglePause(boolean);
94 void TapeStartPlaying(void);
95 void TapeStopPlaying(void);
96 byte *TapePlayAction(void);
97 void TapeStop(void);
98 void TapeErase(void);
99 unsigned int GetTapeLength(void);
100 void TapeQuickSave(void);
101 void TapeQuickLoad(void);
102
103 void AutoPlayTape(void);
104
105 void CreateTapeButtons();
106 void FreeTapeButtons();
107 void MapTapeEjectButton();
108 void MapTapeIndexButton();
109 void MapTapeButtons();
110 void UnmapTapeButtons();
111
112 #endif