};
#endif
- /* initialize playfield properties */
+ /* initialize screen properties */
- InitPlayfieldInfo(SX, SY, SXSIZE, SYSIZE,
- REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
- InitDoor1Info(DX, DY, DXSIZE, DYSIZE);
- InitDoor2Info(VX, VY, VXSIZE, VYSIZE);
- InitScrollbufferInfo(FXSIZE, FYSIZE);
+ InitGfxFieldInfo(SX, SY, SXSIZE, SYSIZE,
+ REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
+ InitGfxDoor1Info(DX, DY, DXSIZE, DYSIZE);
+ InitGfxDoor2Info(VX, VY, VXSIZE, VYSIZE);
+ InitGfxScrollbufferInfo(FXSIZE, FYSIZE);
/* create additional image buffers for double-buffering */
#include "libgame.h"
+#if 0
#include "main_TMP.h"
+#endif
#include "gadgets.h"
-/* some positions in the video tape control window */
-#define VIDEO_DATE_LABEL_XPOS (VIDEO_DISPLAY1_XPOS)
-#define VIDEO_DATE_LABEL_YPOS (VIDEO_DISPLAY1_YPOS)
-#define VIDEO_DATE_LABEL_XSIZE (VIDEO_DISPLAY_XSIZE)
-#define VIDEO_DATE_LABEL_YSIZE (VIDEO_DISPLAY_YSIZE)
-#define VIDEO_DATE_XPOS (VIDEO_DISPLAY1_XPOS + 1)
-#define VIDEO_DATE_YPOS (VIDEO_DISPLAY1_YPOS + 14)
-#define VIDEO_DATE_XSIZE (VIDEO_DISPLAY_XSIZE)
-#define VIDEO_DATE_YSIZE 16
-#define VIDEO_REC_LABEL_XPOS (VIDEO_DISPLAY2_XPOS)
-#define VIDEO_REC_LABEL_YPOS (VIDEO_DISPLAY2_YPOS)
-#define VIDEO_REC_LABEL_XSIZE 20
-#define VIDEO_REC_LABEL_YSIZE 12
-#define VIDEO_REC_SYMBOL_XPOS (VIDEO_DISPLAY2_XPOS + 20)
-#define VIDEO_REC_SYMBOL_YPOS (VIDEO_DISPLAY2_YPOS)
-#define VIDEO_REC_SYMBOL_XSIZE 16
-#define VIDEO_REC_SYMBOL_YSIZE 16
-#define VIDEO_PLAY_LABEL_XPOS (VIDEO_DISPLAY2_XPOS + 65)
-#define VIDEO_PLAY_LABEL_YPOS (VIDEO_DISPLAY2_YPOS)
-#define VIDEO_PLAY_LABEL_XSIZE 22
-#define VIDEO_PLAY_LABEL_YSIZE 12
-#define VIDEO_PLAY_SYMBOL_XPOS (VIDEO_DISPLAY2_XPOS + 52)
-#define VIDEO_PLAY_SYMBOL_YPOS (VIDEO_DISPLAY2_YPOS)
-#define VIDEO_PLAY_SYMBOL_XSIZE 11
-#define VIDEO_PLAY_SYMBOL_YSIZE 13
-#define VIDEO_PAUSE_LABEL_XPOS (VIDEO_DISPLAY2_XPOS)
-#define VIDEO_PAUSE_LABEL_YPOS (VIDEO_DISPLAY2_YPOS + 20)
-#define VIDEO_PAUSE_LABEL_XSIZE 35
-#define VIDEO_PAUSE_LABEL_YSIZE 8
-#define VIDEO_PAUSE_SYMBOL_XPOS (VIDEO_DISPLAY2_XPOS + 35)
-#define VIDEO_PAUSE_SYMBOL_YPOS (VIDEO_DISPLAY2_YPOS)
-#define VIDEO_PAUSE_SYMBOL_XSIZE 17
-#define VIDEO_PAUSE_SYMBOL_YSIZE 13
-#define VIDEO_TIME_XPOS (VIDEO_DISPLAY2_XPOS + 38)
-#define VIDEO_TIME_YPOS (VIDEO_DISPLAY2_YPOS + 14)
-#define VIDEO_TIME_XSIZE 50
-#define VIDEO_TIME_YSIZE 16
-
-/* special */
-#define VIDEO_PBEND_LABEL_XPOS 6
-#define VIDEO_PBEND_LABEL_YPOS 220
-#define VIDEO_PBEND_LABEL_XSIZE 35
-#define VIDEO_PBEND_LABEL_YSIZE 30
-
-#define VIDEO_STATE_OFF (VIDEO_STATE_PLAY_OFF | \
- VIDEO_STATE_REC_OFF | \
- VIDEO_STATE_PAUSE_OFF | \
- VIDEO_STATE_FFWD_OFF | \
- VIDEO_STATE_PBEND_OFF | \
- VIDEO_STATE_DATE_OFF | \
- VIDEO_STATE_TIME_OFF)
-#define VIDEO_PRESS_OFF (VIDEO_PRESS_PLAY_OFF | \
- VIDEO_PRESS_REC_OFF | \
- VIDEO_PRESS_PAUSE_OFF | \
- VIDEO_PRESS_STOP_OFF | \
- VIDEO_PRESS_EJECT_OFF)
-#define VIDEO_ALL_OFF (VIDEO_STATE_OFF | VIDEO_PRESS_OFF)
-
-#define VIDEO_STATE_ON (VIDEO_STATE_PLAY_ON | \
- VIDEO_STATE_REC_ON | \
- VIDEO_STATE_PAUSE_ON | \
- VIDEO_STATE_FFWD_ON | \
- VIDEO_STATE_PBEND_ON | \
- VIDEO_STATE_DATE_ON | \
- VIDEO_STATE_TIME_ON)
-#define VIDEO_PRESS_ON (VIDEO_PRESS_PLAY_ON | \
- VIDEO_PRESS_REC_ON | \
- VIDEO_PRESS_PAUSE_ON | \
- VIDEO_PRESS_STOP_ON | \
- VIDEO_PRESS_EJECT_ON)
-#define VIDEO_ALL_ON (VIDEO_STATE_ON | VIDEO_PRESS_ON)
-
-#define VIDEO_STATE (VIDEO_STATE_ON | VIDEO_STATE_OFF)
-#define VIDEO_PRESS (VIDEO_PRESS_ON | VIDEO_PRESS_OFF)
-#define VIDEO_ALL (VIDEO_ALL_ON | VIDEO_ALL_OFF)
-
-
-void DrawVideoDisplay(unsigned long state, unsigned long value)
-{
- int i;
- int part_label = 0, part_symbol = 1;
- int xpos = 0, ypos = 1, xsize = 2, ysize = 3;
- static char *monatsname[12] =
- {
- "JAN", "FEB", "MAR", "APR", "MAY", "JUN",
- "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"
- };
- static int video_pos[5][2][4] =
- {
- {{ VIDEO_PLAY_LABEL_XPOS, VIDEO_PLAY_LABEL_YPOS,
- VIDEO_PLAY_LABEL_XSIZE,VIDEO_PLAY_LABEL_YSIZE },
- { VIDEO_PLAY_SYMBOL_XPOS, VIDEO_PLAY_SYMBOL_YPOS,
- VIDEO_PLAY_SYMBOL_XSIZE,VIDEO_PLAY_SYMBOL_YSIZE }},
-
- {{ VIDEO_REC_LABEL_XPOS, VIDEO_REC_LABEL_YPOS,
- VIDEO_REC_LABEL_XSIZE,VIDEO_REC_LABEL_YSIZE },
- { VIDEO_REC_SYMBOL_XPOS, VIDEO_REC_SYMBOL_YPOS,
- VIDEO_REC_SYMBOL_XSIZE,VIDEO_REC_SYMBOL_YSIZE }},
-
- {{ VIDEO_PAUSE_LABEL_XPOS, VIDEO_PAUSE_LABEL_YPOS,
- VIDEO_PAUSE_LABEL_XSIZE,VIDEO_PAUSE_LABEL_YSIZE },
- { VIDEO_PAUSE_SYMBOL_XPOS, VIDEO_PAUSE_SYMBOL_YPOS,
- VIDEO_PAUSE_SYMBOL_XSIZE,VIDEO_PAUSE_SYMBOL_YSIZE }},
-
- {{ VIDEO_DATE_LABEL_XPOS, VIDEO_DATE_LABEL_YPOS,
- VIDEO_DATE_LABEL_XSIZE,VIDEO_DATE_LABEL_YSIZE },
- { VIDEO_DATE_XPOS, VIDEO_DATE_YPOS,
- VIDEO_DATE_XSIZE,VIDEO_DATE_YSIZE }},
-
- {{ 0,0,
- 0,0 },
- { VIDEO_TIME_XPOS, VIDEO_TIME_YPOS,
- VIDEO_TIME_XSIZE,VIDEO_TIME_YSIZE }}
- };
-
- if (state & VIDEO_STATE_PBEND_OFF)
- {
- int cx = DOOR_GFX_PAGEX3, cy = DOOR_GFX_PAGEY2;
-
- BlitBitmap(pix[PIX_DOOR], drawto,
- cx + VIDEO_REC_LABEL_XPOS,
- cy + VIDEO_REC_LABEL_YPOS,
- VIDEO_PBEND_LABEL_XSIZE,
- VIDEO_PBEND_LABEL_YSIZE,
- VX + VIDEO_REC_LABEL_XPOS,
- VY + VIDEO_REC_LABEL_YPOS);
- }
-
- for(i=0;i<10;i++)
- {
- if (state & (1<<i))
- {
- int pos = i/2, cx, cy = DOOR_GFX_PAGEY2;
-
- if (i%2) /* i ungerade => STATE_ON / PRESS_OFF */
- cx = DOOR_GFX_PAGEX4;
- else
- cx = DOOR_GFX_PAGEX3; /* i gerade => STATE_OFF / PRESS_ON */
-
- if (video_pos[pos][part_label][0] && value != VIDEO_DISPLAY_SYMBOL_ONLY)
- BlitBitmap(pix[PIX_DOOR], drawto,
- cx + video_pos[pos][part_label][xpos],
- cy + video_pos[pos][part_label][ypos],
- video_pos[pos][part_label][xsize],
- video_pos[pos][part_label][ysize],
- VX + video_pos[pos][part_label][xpos],
- VY + video_pos[pos][part_label][ypos]);
- if (video_pos[pos][part_symbol][0] && value != VIDEO_DISPLAY_LABEL_ONLY)
- BlitBitmap(pix[PIX_DOOR], drawto,
- cx + video_pos[pos][part_symbol][xpos],
- cy + video_pos[pos][part_symbol][ypos],
- video_pos[pos][part_symbol][xsize],
- video_pos[pos][part_symbol][ysize],
- VX + video_pos[pos][part_symbol][xpos],
- VY + video_pos[pos][part_symbol][ypos]);
- }
- }
-
- if (state & VIDEO_STATE_FFWD_ON)
- {
- int cx = DOOR_GFX_PAGEX4, cy = DOOR_GFX_PAGEY2;
-
- BlitBitmap(pix[PIX_DOOR], drawto,
- cx + VIDEO_PLAY_SYMBOL_XPOS,
- cy + VIDEO_PLAY_SYMBOL_YPOS,
- VIDEO_PLAY_SYMBOL_XSIZE - 2,
- VIDEO_PLAY_SYMBOL_YSIZE,
- VX + VIDEO_PLAY_SYMBOL_XPOS - 9,
- VY + VIDEO_PLAY_SYMBOL_YPOS);
- }
-
- if (state & VIDEO_STATE_PBEND_ON)
- {
- int cx = DOOR_GFX_PAGEX6, cy = DOOR_GFX_PAGEY1;
-
- BlitBitmap(pix[PIX_DOOR], drawto,
- cx + VIDEO_PBEND_LABEL_XPOS,
- cy + VIDEO_PBEND_LABEL_YPOS,
- VIDEO_PBEND_LABEL_XSIZE,
- VIDEO_PBEND_LABEL_YSIZE,
- VX + VIDEO_REC_LABEL_XPOS,
- VY + VIDEO_REC_LABEL_YPOS);
- }
-
- if (state & VIDEO_STATE_DATE_ON)
- {
- int tag = value % 100;
- int monat = (value/100) % 100;
- int jahr = (value/10000);
-
- DrawText(VX+VIDEO_DATE_XPOS,VY+VIDEO_DATE_YPOS,
- int2str(tag,2),FS_SMALL,FC_SPECIAL1);
- DrawText(VX+VIDEO_DATE_XPOS+27,VY+VIDEO_DATE_YPOS,
- monatsname[monat],FS_SMALL,FC_SPECIAL1);
- DrawText(VX+VIDEO_DATE_XPOS+64,VY+VIDEO_DATE_YPOS,
- int2str(jahr,2),FS_SMALL,FC_SPECIAL1);
- }
-
- if (state & VIDEO_STATE_TIME_ON)
- {
- int min = value / 60;
- int sec = value % 60;
-
- DrawText(VX+VIDEO_TIME_XPOS,VY+VIDEO_TIME_YPOS,
- int2str(min,2),FS_SMALL,FC_SPECIAL1);
- DrawText(VX+VIDEO_TIME_XPOS+27,VY+VIDEO_TIME_YPOS,
- int2str(sec,2),FS_SMALL,FC_SPECIAL1);
- }
-
- if (state & VIDEO_STATE_DATE)
- redraw_mask |= REDRAW_VIDEO_1;
- if ((state & ~VIDEO_STATE_DATE) & VIDEO_STATE)
- redraw_mask |= REDRAW_VIDEO_2;
- if (state & VIDEO_PRESS)
- redraw_mask |= REDRAW_VIDEO_3;
-}
-
-void DrawCompleteVideoDisplay()
-{
- BlitBitmap(pix[PIX_DOOR], drawto,
- DOOR_GFX_PAGEX3,DOOR_GFX_PAGEY2, VXSIZE,VYSIZE, VX,VY);
- BlitBitmap(pix[PIX_DOOR], drawto,
- DOOR_GFX_PAGEX4+VIDEO_CONTROL_XPOS,
- DOOR_GFX_PAGEY2+VIDEO_CONTROL_YPOS,
- VIDEO_CONTROL_XSIZE,VIDEO_CONTROL_YSIZE,
- VX+VIDEO_CONTROL_XPOS,VY+VIDEO_CONTROL_YPOS);
-
- DrawVideoDisplay(VIDEO_ALL_OFF,0);
- if (tape.date && tape.length)
- {
- DrawVideoDisplay(VIDEO_STATE_DATE_ON,tape.date);
- DrawVideoDisplay(VIDEO_STATE_TIME_ON,tape.length_seconds);
- }
-
- BlitBitmap(drawto, pix[PIX_DB_DOOR],
- VX,VY, VXSIZE,VYSIZE, DOOR_GFX_PAGEX1,DOOR_GFX_PAGEY2);
-}
-
-
-/* NEW GADGET STUFF -------------------------------------------------------- */
-
/* values for DrawGadget() */
#define DG_UNPRESSED 0
BlitBitmap(drawto, window,
gi->x, gi->y, gi->width, gi->height, gi->x, gi->y);
else
- redraw_mask |= (gi->x < SX + SXSIZE ? REDRAW_FIELD :
- gi->y < DY + DYSIZE ? REDRAW_DOOR_1 :
- gi->y > VY ? REDRAW_DOOR_2 : REDRAW_DOOR_3);
+ redraw_mask |= (gi->x < gfx.sx + gfx.sxsize ? REDRAW_FIELD :
+ gi->y < gfx.dy + gfx.dysize ? REDRAW_DOOR_1 :
+ gi->y > gfx.vy ? REDRAW_DOOR_2 : REDRAW_DOOR_3);
}
static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap)
while (gi)
{
- if ((mode & MULTIMAP_PLAYFIELD && gi->x < SX + SXSIZE) ||
- (mode & MULTIMAP_DOOR_1 && gi->x >= DX && gi->y < DY + DYSIZE) ||
- (mode & MULTIMAP_DOOR_2 && gi->x >= DX && gi->y > DY + DYSIZE) ||
+ if ((mode & MULTIMAP_PLAYFIELD &&
+ gi->x < gfx.sx + gfx.sxsize) ||
+ (mode & MULTIMAP_DOOR_1 &&
+ gi->x >= gfx.dx && gi->y < gfx.dy + gfx.dysize) ||
+ (mode & MULTIMAP_DOOR_2 &&
+ gi->x >= gfx.dx && gi->y > gfx.dy + gfx.dysize) ||
(mode & MULTIMAP_ALL) == MULTIMAP_ALL)
{
if (mode & MULTIMAP_UNMAP)
#include "libgame.h"
-/* the following definitions are also used by tools.c */
-/* some positions in the video tape control window */
-#define VIDEO_DISPLAY1_XPOS 5
-#define VIDEO_DISPLAY1_YPOS 5
-#define VIDEO_DISPLAY2_XPOS 5
-#define VIDEO_DISPLAY2_YPOS 41
-#define VIDEO_DISPLAY_XSIZE 90
-#define VIDEO_DISPLAY_YSIZE 31
-#define VIDEO_BUTTON_XSIZE 18
-#define VIDEO_BUTTON_YSIZE 18
-#define VIDEO_CONTROL_XPOS 5
-#define VIDEO_CONTROL_YPOS 77
-#define VIDEO_CONTROL_XSIZE VIDEO_DISPLAY_XSIZE
-#define VIDEO_CONTROL_YSIZE VIDEO_BUTTON_YSIZE
-
-/* values for video tape control */
-#define VIDEO_STATE_PLAY_OFF (1L << 0)
-#define VIDEO_STATE_PLAY_ON (1L << 1)
-#define VIDEO_STATE_PLAY (VIDEO_STATE_PLAY_OFF | VIDEO_STATE_PLAY_ON)
-#define VIDEO_STATE_REC_OFF (1L << 2)
-#define VIDEO_STATE_REC_ON (1L << 3)
-#define VIDEO_STATE_REC (VIDEO_STATE_REC_OFF | VIDEO_STATE_REC_ON)
-#define VIDEO_STATE_PAUSE_OFF (1L << 4)
-#define VIDEO_STATE_PAUSE_ON (1L << 5)
-#define VIDEO_STATE_PAUSE (VIDEO_STATE_PAUSE_OFF | VIDEO_STATE_PAUSE_ON)
-#define VIDEO_STATE_DATE_OFF (1L << 6)
-#define VIDEO_STATE_DATE_ON (1L << 7)
-#define VIDEO_STATE_DATE (VIDEO_STATE_DATE_OFF | VIDEO_STATE_DATE_ON)
-#define VIDEO_STATE_TIME_OFF (1L << 8)
-#define VIDEO_STATE_TIME_ON (1L << 9)
-#define VIDEO_STATE_TIME (VIDEO_STATE_TIME_OFF | VIDEO_STATE_TIME_ON)
-#define VIDEO_PRESS_PLAY_ON (1L << 10)
-#define VIDEO_PRESS_PLAY_OFF (1L << 11)
-#define VIDEO_PRESS_PLAY (VIDEO_PRESS_PLAY_OFF | VIDEO_PRESS_PLAY_ON)
-#define VIDEO_PRESS_REC_ON (1L << 12)
-#define VIDEO_PRESS_REC_OFF (1L << 13)
-#define VIDEO_PRESS_REC (VIDEO_PRESS_REC_OFF | VIDEO_PRESS_REC_ON)
-#define VIDEO_PRESS_PAUSE_ON (1L << 14)
-#define VIDEO_PRESS_PAUSE_OFF (1L << 15)
-#define VIDEO_PRESS_PAUSE (VIDEO_PRESS_PAUSE_OFF | VIDEO_PRESS_PAUSE_ON)
-#define VIDEO_PRESS_STOP_ON (1L << 16)
-#define VIDEO_PRESS_STOP_OFF (1L << 17)
-#define VIDEO_PRESS_STOP (VIDEO_PRESS_STOP_OFF | VIDEO_PRESS_STOP_ON)
-#define VIDEO_PRESS_EJECT_ON (1L << 18)
-#define VIDEO_PRESS_EJECT_OFF (1L << 19)
-#define VIDEO_PRESS_EJECT (VIDEO_PRESS_EJECT_OFF | VIDEO_PRESS_EJECT_ON)
-
-/* special */
-#define VIDEO_STATE_FFWD_OFF ((1L << 20) | VIDEO_STATE_PAUSE_OFF)
-#define VIDEO_STATE_FFWD_ON (1L << 21)
-#define VIDEO_STATE_FFWD (VIDEO_STATE_FFWD_OFF | VIDEO_STATE_FFWD_ON)
-#define VIDEO_STATE_PBEND_OFF (1L << 22)
-#define VIDEO_STATE_PBEND_ON (1L << 23)
-#define VIDEO_STATE_PBEND (VIDEO_STATE_PBEND_OFF | VIDEO_STATE_PBEND_ON)
-
-/* tags to draw video display labels or symbols only */
-#define VIDEO_DISPLAY_DEFAULT 0
-#define VIDEO_DISPLAY_LABEL_ONLY 1
-#define VIDEO_DISPLAY_SYMBOL_ONLY 2
-
-void DrawVideoDisplay(unsigned long, unsigned long);
-void DrawCompleteVideoDisplay(void);
-
-
-/* NEW GADGET STUFF -------------------------------------------------------- */
+#define GADGET_FRAME_DELAY 150 /* delay between gadget actions */
/* gadget types */
#define GD_TYPE_NORMAL_BUTTON (1 << 0)
#include "pcx.h"
#include "misc.h"
+
+/* areas in bitmap PIX_DOOR */
+/* meaning in PIX_DB_DOOR: (3 PAGEs)
+ PAGEX1: 1. buffer for DOOR_1
+ PAGEX2: 2. buffer for DOOR_1
+ PAGEX3: buffer for animations
+*/
+
+#define DOOR_GFX_PAGESIZE (gfx.dxsize)
+#define DOOR_GFX_PAGEX1 (0 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX2 (1 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX3 (2 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX4 (3 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX5 (4 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX6 (5 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX7 (6 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEX8 (7 * DOOR_GFX_PAGESIZE)
+#define DOOR_GFX_PAGEY1 (0)
+#define DOOR_GFX_PAGEY2 (gfx.dysize)
+
#endif /* LIBGAME_H */
#include <stdarg.h>
#include <ctype.h>
-#include "libgame.h"
+#include "platform.h"
#if !defined(PLATFORM_WIN32)
#include <pwd.h>
BITMAP *bitmap = NULL;
if (gfx_capabilities & GFX_HW_VRAM_BLIT &&
- width == playfield.scrollbuffer_width &&
- height == playfield.scrollbuffer_height)
+ width == gfx.scrollbuffer_width && height == gfx.scrollbuffer_height)
bitmap = create_video_bitmap(width, height);
if (bitmap == NULL)
struct OptionInfo options;
struct VideoSystemInfo video;
struct AudioSystemInfo audio;
-struct PlayfieldInfo playfield;
+struct GfxInfo gfx;
Display *display = NULL;
Visual *visual = NULL;
DrawBuffer backbuffer = NULL;
DrawBuffer drawto = NULL;
-int redraw_mask;
-int redraw_tiles;
+int button_status = MB_NOT_PRESSED;
+boolean motion_status = FALSE;
+
+int redraw_mask = REDRAW_NONE;
+int redraw_tiles = 0;
int FrameCounter = 0;
program.msdos_pointer_filename = msdos_pointer_filename;
}
-inline void InitPlayfieldInfo(int sx, int sy, int sxsize, int sysize,
- int real_sx, int real_sy,
- int full_sxsize, int full_sysize)
+inline void InitGfxFieldInfo(int sx, int sy, int sxsize, int sysize,
+ int real_sx, int real_sy,
+ int full_sxsize, int full_sysize)
{
- playfield.sx = sx;
- playfield.sy = sy;
- playfield.sxsize = sxsize;
- playfield.sysize = sysize;
- playfield.real_sx = real_sx;
- playfield.real_sy = real_sy;
- playfield.full_sxsize = full_sxsize;
- playfield.full_sysize = full_sysize;
+ gfx.sx = sx;
+ gfx.sy = sy;
+ gfx.sxsize = sxsize;
+ gfx.sysize = sysize;
+ gfx.real_sx = real_sx;
+ gfx.real_sy = real_sy;
+ gfx.full_sxsize = full_sxsize;
+ gfx.full_sysize = full_sysize;
}
-inline void InitDoor1Info(int dx, int dy, int dxsize, int dysize)
+inline void InitGfxDoor1Info(int dx, int dy, int dxsize, int dysize)
{
- playfield.dx = dx;
- playfield.dy = dy;
- playfield.dxsize = dxsize;
- playfield.dysize = dysize;
+ gfx.dx = dx;
+ gfx.dy = dy;
+ gfx.dxsize = dxsize;
+ gfx.dysize = dysize;
}
-inline void InitDoor2Info(int vx, int vy, int vxsize, int vysize)
+inline void InitGfxDoor2Info(int vx, int vy, int vxsize, int vysize)
{
- playfield.vx = vx;
- playfield.vy = vy;
- playfield.vxsize = vxsize;
- playfield.vysize = vysize;
+ gfx.vx = vx;
+ gfx.vy = vy;
+ gfx.vxsize = vxsize;
+ gfx.vysize = vysize;
}
-inline void InitScrollbufferInfo(int scrollbuffer_width,
- int scrollbuffer_height)
+inline void InitGfxScrollbufferInfo(int scrollbuffer_width,
+ int scrollbuffer_height)
{
/* currently only used by MSDOS code to alloc VRAM buffer, if available */
- playfield.scrollbuffer_width = scrollbuffer_width;
- playfield.scrollbuffer_height = scrollbuffer_height;
+ gfx.scrollbuffer_width = scrollbuffer_width;
+ gfx.scrollbuffer_height = scrollbuffer_height;
}
inline static int GetRealDepth(int depth)
#define FULLSCREEN_NOT_AVAILABLE FALSE
#define FULLSCREEN_AVAILABLE TRUE
+/* values for button_status */
+#define MB_NOT_PRESSED FALSE
+#define MB_RELEASED FALSE
+#define MB_PRESSED TRUE
+#define MB_MENU_CHOICE FALSE
+#define MB_MENU_MARK TRUE
+#define MB_MENU_INITIALIZE (-1)
+#define MB_LEFTBUTTON 1
+#define MB_MIDDLEBUTTON 2
+#define MB_RIGHTBUTTON 3
/* values for redraw_mask */
+#define REDRAW_NONE (0)
#define REDRAW_ALL (1 << 0)
#define REDRAW_FIELD (1 << 1)
#define REDRAW_TILES (1 << 2)
int device_fd;
};
-struct PlayfieldInfo
+struct GfxInfo
{
int sx, sy;
int sxsize, sysize;
extern struct OptionInfo options;
extern struct VideoSystemInfo video;
extern struct AudioSystemInfo audio;
-extern struct PlayfieldInfo playfield;
+extern struct GfxInfo gfx;
extern Display *display;
extern Visual *visual;
extern DrawBuffer backbuffer;
extern DrawBuffer drawto;
+extern int button_status;
+extern boolean motion_status;
+
extern int redraw_mask;
extern int redraw_tiles;
inline void InitProgramInfo(char *, char *, char *, char *, char *, char *,
char *);
-inline void InitPlayfieldInfo(int, int, int, int, int, int, int, int);
-inline void InitDoor1Info(int, int, int, int);
-inline void InitDoor2Info(int, int, int, int);
-inline void InitScrollbufferInfo(int, int);
+inline void InitGfxFieldInfo(int, int, int, int, int, int, int, int);
+inline void InitGfxDoor1Info(int, int, int, int);
+inline void InitGfxDoor2Info(int, int, int, int);
+inline void InitGfxScrollbufferInfo(int, int);
inline void InitVideoDisplay(void);
inline void InitVideoBuffer(DrawBuffer *,DrawWindow *, int, int, int, boolean);
vsprintf(buffer, format, ap);
va_end(ap);
- DrawText(playfield.sx + (playfield.sxsize - strlen(buffer) * font_width) / 2,
- playfield.sy + y, buffer, FS_SMALL, font_type);
+ DrawText(gfx.sx + (gfx.sxsize - strlen(buffer) * font_width) / 2,
+ gfx.sy + y, buffer, FS_SMALL, font_type);
}
void DrawTextF(int x, int y, int font_type, char *format, ...)
vsprintf(buffer, format, ap);
va_end(ap);
- DrawText(playfield.sx + x, playfield.sy + y, buffer, FS_SMALL, font_type);
+ DrawText(gfx.sx + x, gfx.sy + y, buffer, FS_SMALL, font_type);
}
void DrawText(int x, int y, char *text, int font_size, int font_type)
{
DrawTextExt(drawto, x, y, text, font_size, font_type);
- if (x < playfield.dx)
+ if (x < gfx.dx)
redraw_mask |= REDRAW_FIELD;
- else if (y < playfield.vy)
+ else if (y < gfx.vy)
redraw_mask |= REDRAW_DOOR_1;
}
#define TRUE (!FALSE)
#endif
+#ifndef MIN
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef MAX
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
+#ifndef ABS
+#define ABS(a) ((a) < 0 ? -(a) : (a))
+#endif
+
+#ifndef SIGN
+#define SIGN(a) ((a) < 0 ? -1 : ((a)>0 ? 1 : 0))
+#endif
+
#endif /* TYPES_H */
int game_status = MAINMENU;
boolean level_editor_test_game = FALSE;
boolean network_playing = FALSE;
+
+#if 0
int button_status = MB_NOT_PRESSED;
boolean motion_status = FALSE;
+#endif
+
int key_joystick_mapping = 0;
int global_joystick_status = JOYSTICK_STATUS;
int joystick_status = JOYSTICK_STATUS;
#define MAX_PLAYERS 4
+#if 0
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef SIGN
#define SIGN(a) ((a) < 0 ? -1 : ((a)>0 ? 1 : 0))
#endif
+#endif
#define SCREENX(a) ((a) - scroll_x)
#define SCREENY(a) ((a) - scroll_y)
#define GAME_FRAME_DELAY 20 /* frame delay in milliseconds */
#define FFWD_FRAME_DELAY 10 /* 200% speed for fast forward */
#define FRAMES_PER_SECOND (1000 / GAME_FRAME_DELAY)
+#if 0
#define GADGET_FRAME_DELAY 150 /* delay between gadget actions */
+#endif
#define MICROLEVEL_SCROLL_DELAY 50 /* delay for scrolling micro level */
#define MICROLEVEL_LABEL_DELAY 250 /* delay for micro level label */
extern int game_status;
extern boolean level_editor_test_game;
extern boolean network_playing;
+
+#if 0
extern int button_status;
extern boolean motion_status;
+#endif
+
extern int key_joystick_mapping;
extern int global_joystick_status, joystick_status;
/* default name for new levels */
#define NAMELESS_LEVEL_NAME "nameless level"
+#if 0
/* values for button_status */
#define MB_NOT_PRESSED FALSE
#define MB_RELEASED FALSE
#define MB_LEFTBUTTON 1
#define MB_MIDDLEBUTTON 2
#define MB_RIGHTBUTTON 3
+#endif
#if 0
/* values for redraw_mask */
#define REDRAWTILES_THRESHOLD (SCR_FIELDX * SCR_FIELDY / 2)
#endif
+#if 0
/* areas in bitmap PIX_DOOR */
/* meaning in PIX_DB_DOOR: (3 PAGEs)
PAGEX1: 1. buffer for DOOR_1
#define DOOR_GFX_PAGEX8 (7 * DOOR_GFX_PAGESIZE)
#define DOOR_GFX_PAGEY1 0
#define DOOR_GFX_PAGEY2 DYSIZE
+#endif
/* for DrawGraphicAnimation() [tools.c] and AnimateToon() [cartoons.c] */
#define ANIM_NORMAL 0
static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
+
+/* ========================================================================= */
+/* video tape definitions */
+/* ========================================================================= */
+
+/* some positions in the video tape control window */
+#define VIDEO_DATE_LABEL_XPOS (VIDEO_DISPLAY1_XPOS)
+#define VIDEO_DATE_LABEL_YPOS (VIDEO_DISPLAY1_YPOS)
+#define VIDEO_DATE_LABEL_XSIZE (VIDEO_DISPLAY_XSIZE)
+#define VIDEO_DATE_LABEL_YSIZE (VIDEO_DISPLAY_YSIZE)
+#define VIDEO_DATE_XPOS (VIDEO_DISPLAY1_XPOS + 1)
+#define VIDEO_DATE_YPOS (VIDEO_DISPLAY1_YPOS + 14)
+#define VIDEO_DATE_XSIZE (VIDEO_DISPLAY_XSIZE)
+#define VIDEO_DATE_YSIZE 16
+#define VIDEO_REC_LABEL_XPOS (VIDEO_DISPLAY2_XPOS)
+#define VIDEO_REC_LABEL_YPOS (VIDEO_DISPLAY2_YPOS)
+#define VIDEO_REC_LABEL_XSIZE 20
+#define VIDEO_REC_LABEL_YSIZE 12
+#define VIDEO_REC_SYMBOL_XPOS (VIDEO_DISPLAY2_XPOS + 20)
+#define VIDEO_REC_SYMBOL_YPOS (VIDEO_DISPLAY2_YPOS)
+#define VIDEO_REC_SYMBOL_XSIZE 16
+#define VIDEO_REC_SYMBOL_YSIZE 16
+#define VIDEO_PLAY_LABEL_XPOS (VIDEO_DISPLAY2_XPOS + 65)
+#define VIDEO_PLAY_LABEL_YPOS (VIDEO_DISPLAY2_YPOS)
+#define VIDEO_PLAY_LABEL_XSIZE 22
+#define VIDEO_PLAY_LABEL_YSIZE 12
+#define VIDEO_PLAY_SYMBOL_XPOS (VIDEO_DISPLAY2_XPOS + 52)
+#define VIDEO_PLAY_SYMBOL_YPOS (VIDEO_DISPLAY2_YPOS)
+#define VIDEO_PLAY_SYMBOL_XSIZE 11
+#define VIDEO_PLAY_SYMBOL_YSIZE 13
+#define VIDEO_PAUSE_LABEL_XPOS (VIDEO_DISPLAY2_XPOS)
+#define VIDEO_PAUSE_LABEL_YPOS (VIDEO_DISPLAY2_YPOS + 20)
+#define VIDEO_PAUSE_LABEL_XSIZE 35
+#define VIDEO_PAUSE_LABEL_YSIZE 8
+#define VIDEO_PAUSE_SYMBOL_XPOS (VIDEO_DISPLAY2_XPOS + 35)
+#define VIDEO_PAUSE_SYMBOL_YPOS (VIDEO_DISPLAY2_YPOS)
+#define VIDEO_PAUSE_SYMBOL_XSIZE 17
+#define VIDEO_PAUSE_SYMBOL_YSIZE 13
+#define VIDEO_TIME_XPOS (VIDEO_DISPLAY2_XPOS + 38)
+#define VIDEO_TIME_YPOS (VIDEO_DISPLAY2_YPOS + 14)
+#define VIDEO_TIME_XSIZE 50
+#define VIDEO_TIME_YSIZE 16
+
+/* special */
+#define VIDEO_PBEND_LABEL_XPOS 6
+#define VIDEO_PBEND_LABEL_YPOS 220
+#define VIDEO_PBEND_LABEL_XSIZE 35
+#define VIDEO_PBEND_LABEL_YSIZE 30
+
+#define VIDEO_STATE_OFF (VIDEO_STATE_PLAY_OFF | \
+ VIDEO_STATE_REC_OFF | \
+ VIDEO_STATE_PAUSE_OFF | \
+ VIDEO_STATE_FFWD_OFF | \
+ VIDEO_STATE_PBEND_OFF | \
+ VIDEO_STATE_DATE_OFF | \
+ VIDEO_STATE_TIME_OFF)
+#define VIDEO_PRESS_OFF (VIDEO_PRESS_PLAY_OFF | \
+ VIDEO_PRESS_REC_OFF | \
+ VIDEO_PRESS_PAUSE_OFF | \
+ VIDEO_PRESS_STOP_OFF | \
+ VIDEO_PRESS_EJECT_OFF)
+#define VIDEO_ALL_OFF (VIDEO_STATE_OFF | VIDEO_PRESS_OFF)
+
+#define VIDEO_STATE_ON (VIDEO_STATE_PLAY_ON | \
+ VIDEO_STATE_REC_ON | \
+ VIDEO_STATE_PAUSE_ON | \
+ VIDEO_STATE_FFWD_ON | \
+ VIDEO_STATE_PBEND_ON | \
+ VIDEO_STATE_DATE_ON | \
+ VIDEO_STATE_TIME_ON)
+#define VIDEO_PRESS_ON (VIDEO_PRESS_PLAY_ON | \
+ VIDEO_PRESS_REC_ON | \
+ VIDEO_PRESS_PAUSE_ON | \
+ VIDEO_PRESS_STOP_ON | \
+ VIDEO_PRESS_EJECT_ON)
+#define VIDEO_ALL_ON (VIDEO_STATE_ON | VIDEO_PRESS_ON)
+
+#define VIDEO_STATE (VIDEO_STATE_ON | VIDEO_STATE_OFF)
+#define VIDEO_PRESS (VIDEO_PRESS_ON | VIDEO_PRESS_OFF)
+#define VIDEO_ALL (VIDEO_ALL_ON | VIDEO_ALL_OFF)
+
+
+/* ========================================================================= */
+/* video display functions */
+/* ========================================================================= */
+
+void DrawVideoDisplay(unsigned long state, unsigned long value)
+{
+ int i;
+ int part_label = 0, part_symbol = 1;
+ int xpos = 0, ypos = 1, xsize = 2, ysize = 3;
+ static char *monatsname[12] =
+ {
+ "JAN", "FEB", "MAR", "APR", "MAY", "JUN",
+ "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"
+ };
+ static int video_pos[5][2][4] =
+ {
+ {{ VIDEO_PLAY_LABEL_XPOS, VIDEO_PLAY_LABEL_YPOS,
+ VIDEO_PLAY_LABEL_XSIZE,VIDEO_PLAY_LABEL_YSIZE },
+ { VIDEO_PLAY_SYMBOL_XPOS, VIDEO_PLAY_SYMBOL_YPOS,
+ VIDEO_PLAY_SYMBOL_XSIZE,VIDEO_PLAY_SYMBOL_YSIZE }},
+
+ {{ VIDEO_REC_LABEL_XPOS, VIDEO_REC_LABEL_YPOS,
+ VIDEO_REC_LABEL_XSIZE,VIDEO_REC_LABEL_YSIZE },
+ { VIDEO_REC_SYMBOL_XPOS, VIDEO_REC_SYMBOL_YPOS,
+ VIDEO_REC_SYMBOL_XSIZE,VIDEO_REC_SYMBOL_YSIZE }},
+
+ {{ VIDEO_PAUSE_LABEL_XPOS, VIDEO_PAUSE_LABEL_YPOS,
+ VIDEO_PAUSE_LABEL_XSIZE,VIDEO_PAUSE_LABEL_YSIZE },
+ { VIDEO_PAUSE_SYMBOL_XPOS, VIDEO_PAUSE_SYMBOL_YPOS,
+ VIDEO_PAUSE_SYMBOL_XSIZE,VIDEO_PAUSE_SYMBOL_YSIZE }},
+
+ {{ VIDEO_DATE_LABEL_XPOS, VIDEO_DATE_LABEL_YPOS,
+ VIDEO_DATE_LABEL_XSIZE,VIDEO_DATE_LABEL_YSIZE },
+ { VIDEO_DATE_XPOS, VIDEO_DATE_YPOS,
+ VIDEO_DATE_XSIZE,VIDEO_DATE_YSIZE }},
+
+ {{ 0,0,
+ 0,0 },
+ { VIDEO_TIME_XPOS, VIDEO_TIME_YPOS,
+ VIDEO_TIME_XSIZE,VIDEO_TIME_YSIZE }}
+ };
+
+ if (state & VIDEO_STATE_PBEND_OFF)
+ {
+ int cx = DOOR_GFX_PAGEX3, cy = DOOR_GFX_PAGEY2;
+
+ BlitBitmap(pix[PIX_DOOR], drawto,
+ cx + VIDEO_REC_LABEL_XPOS,
+ cy + VIDEO_REC_LABEL_YPOS,
+ VIDEO_PBEND_LABEL_XSIZE,
+ VIDEO_PBEND_LABEL_YSIZE,
+ VX + VIDEO_REC_LABEL_XPOS,
+ VY + VIDEO_REC_LABEL_YPOS);
+ }
+
+ for(i=0;i<10;i++)
+ {
+ if (state & (1<<i))
+ {
+ int pos = i/2, cx, cy = DOOR_GFX_PAGEY2;
+
+ if (i%2) /* i ungerade => STATE_ON / PRESS_OFF */
+ cx = DOOR_GFX_PAGEX4;
+ else
+ cx = DOOR_GFX_PAGEX3; /* i gerade => STATE_OFF / PRESS_ON */
+
+ if (video_pos[pos][part_label][0] && value != VIDEO_DISPLAY_SYMBOL_ONLY)
+ BlitBitmap(pix[PIX_DOOR], drawto,
+ cx + video_pos[pos][part_label][xpos],
+ cy + video_pos[pos][part_label][ypos],
+ video_pos[pos][part_label][xsize],
+ video_pos[pos][part_label][ysize],
+ VX + video_pos[pos][part_label][xpos],
+ VY + video_pos[pos][part_label][ypos]);
+ if (video_pos[pos][part_symbol][0] && value != VIDEO_DISPLAY_LABEL_ONLY)
+ BlitBitmap(pix[PIX_DOOR], drawto,
+ cx + video_pos[pos][part_symbol][xpos],
+ cy + video_pos[pos][part_symbol][ypos],
+ video_pos[pos][part_symbol][xsize],
+ video_pos[pos][part_symbol][ysize],
+ VX + video_pos[pos][part_symbol][xpos],
+ VY + video_pos[pos][part_symbol][ypos]);
+ }
+ }
+
+ if (state & VIDEO_STATE_FFWD_ON)
+ {
+ int cx = DOOR_GFX_PAGEX4, cy = DOOR_GFX_PAGEY2;
+
+ BlitBitmap(pix[PIX_DOOR], drawto,
+ cx + VIDEO_PLAY_SYMBOL_XPOS,
+ cy + VIDEO_PLAY_SYMBOL_YPOS,
+ VIDEO_PLAY_SYMBOL_XSIZE - 2,
+ VIDEO_PLAY_SYMBOL_YSIZE,
+ VX + VIDEO_PLAY_SYMBOL_XPOS - 9,
+ VY + VIDEO_PLAY_SYMBOL_YPOS);
+ }
+
+ if (state & VIDEO_STATE_PBEND_ON)
+ {
+ int cx = DOOR_GFX_PAGEX6, cy = DOOR_GFX_PAGEY1;
+
+ BlitBitmap(pix[PIX_DOOR], drawto,
+ cx + VIDEO_PBEND_LABEL_XPOS,
+ cy + VIDEO_PBEND_LABEL_YPOS,
+ VIDEO_PBEND_LABEL_XSIZE,
+ VIDEO_PBEND_LABEL_YSIZE,
+ VX + VIDEO_REC_LABEL_XPOS,
+ VY + VIDEO_REC_LABEL_YPOS);
+ }
+
+ if (state & VIDEO_STATE_DATE_ON)
+ {
+ int tag = value % 100;
+ int monat = (value/100) % 100;
+ int jahr = (value/10000);
+
+ DrawText(VX+VIDEO_DATE_XPOS,VY+VIDEO_DATE_YPOS,
+ int2str(tag,2),FS_SMALL,FC_SPECIAL1);
+ DrawText(VX+VIDEO_DATE_XPOS+27,VY+VIDEO_DATE_YPOS,
+ monatsname[monat],FS_SMALL,FC_SPECIAL1);
+ DrawText(VX+VIDEO_DATE_XPOS+64,VY+VIDEO_DATE_YPOS,
+ int2str(jahr,2),FS_SMALL,FC_SPECIAL1);
+ }
+
+ if (state & VIDEO_STATE_TIME_ON)
+ {
+ int min = value / 60;
+ int sec = value % 60;
+
+ DrawText(VX+VIDEO_TIME_XPOS,VY+VIDEO_TIME_YPOS,
+ int2str(min,2),FS_SMALL,FC_SPECIAL1);
+ DrawText(VX+VIDEO_TIME_XPOS+27,VY+VIDEO_TIME_YPOS,
+ int2str(sec,2),FS_SMALL,FC_SPECIAL1);
+ }
+
+ if (state & VIDEO_STATE_DATE)
+ redraw_mask |= REDRAW_VIDEO_1;
+ if ((state & ~VIDEO_STATE_DATE) & VIDEO_STATE)
+ redraw_mask |= REDRAW_VIDEO_2;
+ if (state & VIDEO_PRESS)
+ redraw_mask |= REDRAW_VIDEO_3;
+}
+
+void DrawCompleteVideoDisplay()
+{
+ BlitBitmap(pix[PIX_DOOR], drawto, DOOR_GFX_PAGEX3, DOOR_GFX_PAGEY2,
+ gfx.vxsize, gfx.vysize, gfx.vx, gfx.vy);
+ BlitBitmap(pix[PIX_DOOR], drawto,
+ DOOR_GFX_PAGEX4 + VIDEO_CONTROL_XPOS,
+ DOOR_GFX_PAGEY2 + VIDEO_CONTROL_YPOS,
+ VIDEO_CONTROL_XSIZE, VIDEO_CONTROL_YSIZE,
+ gfx.vx + VIDEO_CONTROL_XPOS, gfx.vy + VIDEO_CONTROL_YPOS);
+
+ DrawVideoDisplay(VIDEO_ALL_OFF, 0);
+ if (tape.date && tape.length)
+ {
+ DrawVideoDisplay(VIDEO_STATE_DATE_ON, tape.date);
+ DrawVideoDisplay(VIDEO_STATE_TIME_ON, tape.length_seconds);
+ }
+
+ BlitBitmap(drawto, pix[PIX_DB_DOOR], gfx.vx, gfx.vy, gfx.vxsize, gfx.vysize,
+ DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY2);
+}
+
+
+/* ========================================================================= */
+/* tape control functions */
+/* ========================================================================= */
+
void TapeStartRecording()
{
time_t zeit1 = time(NULL);
DrawVideoDisplay(VIDEO_STATE_PBEND_OFF, VIDEO_DISPLAY_LABEL_ONLY);
}
- if (TimePlayed > tape.length_seconds - PAUSE_SECONDS_BEFORE_DEATH)
+ if (TimePlayed > tape.length_seconds - TAPE_PAUSE_SECONDS_BEFORE_DEATH)
{
TapeTogglePause();
return(FALSE);
#include "main.h"
-#define PAUSE_SECONDS_BEFORE_DEATH 3
+#define TAPE_PAUSE_SECONDS_BEFORE_DEATH 3
+
+/* some positions in the video tape control window */
+#define VIDEO_DISPLAY1_XPOS 5
+#define VIDEO_DISPLAY1_YPOS 5
+#define VIDEO_DISPLAY2_XPOS 5
+#define VIDEO_DISPLAY2_YPOS 41
+#define VIDEO_DISPLAY_XSIZE 90
+#define VIDEO_DISPLAY_YSIZE 31
+#define VIDEO_BUTTON_XSIZE 18
+#define VIDEO_BUTTON_YSIZE 18
+#define VIDEO_CONTROL_XPOS 5
+#define VIDEO_CONTROL_YPOS 77
+#define VIDEO_CONTROL_XSIZE VIDEO_DISPLAY_XSIZE
+#define VIDEO_CONTROL_YSIZE VIDEO_BUTTON_YSIZE
+
+/* values for video tape control */
+#define VIDEO_STATE_PLAY_OFF (1L << 0)
+#define VIDEO_STATE_PLAY_ON (1L << 1)
+#define VIDEO_STATE_PLAY (VIDEO_STATE_PLAY_OFF | VIDEO_STATE_PLAY_ON)
+#define VIDEO_STATE_REC_OFF (1L << 2)
+#define VIDEO_STATE_REC_ON (1L << 3)
+#define VIDEO_STATE_REC (VIDEO_STATE_REC_OFF | VIDEO_STATE_REC_ON)
+#define VIDEO_STATE_PAUSE_OFF (1L << 4)
+#define VIDEO_STATE_PAUSE_ON (1L << 5)
+#define VIDEO_STATE_PAUSE (VIDEO_STATE_PAUSE_OFF | VIDEO_STATE_PAUSE_ON)
+#define VIDEO_STATE_DATE_OFF (1L << 6)
+#define VIDEO_STATE_DATE_ON (1L << 7)
+#define VIDEO_STATE_DATE (VIDEO_STATE_DATE_OFF | VIDEO_STATE_DATE_ON)
+#define VIDEO_STATE_TIME_OFF (1L << 8)
+#define VIDEO_STATE_TIME_ON (1L << 9)
+#define VIDEO_STATE_TIME (VIDEO_STATE_TIME_OFF | VIDEO_STATE_TIME_ON)
+#define VIDEO_PRESS_PLAY_ON (1L << 10)
+#define VIDEO_PRESS_PLAY_OFF (1L << 11)
+#define VIDEO_PRESS_PLAY (VIDEO_PRESS_PLAY_OFF | VIDEO_PRESS_PLAY_ON)
+#define VIDEO_PRESS_REC_ON (1L << 12)
+#define VIDEO_PRESS_REC_OFF (1L << 13)
+#define VIDEO_PRESS_REC (VIDEO_PRESS_REC_OFF | VIDEO_PRESS_REC_ON)
+#define VIDEO_PRESS_PAUSE_ON (1L << 14)
+#define VIDEO_PRESS_PAUSE_OFF (1L << 15)
+#define VIDEO_PRESS_PAUSE (VIDEO_PRESS_PAUSE_OFF | VIDEO_PRESS_PAUSE_ON)
+#define VIDEO_PRESS_STOP_ON (1L << 16)
+#define VIDEO_PRESS_STOP_OFF (1L << 17)
+#define VIDEO_PRESS_STOP (VIDEO_PRESS_STOP_OFF | VIDEO_PRESS_STOP_ON)
+#define VIDEO_PRESS_EJECT_ON (1L << 18)
+#define VIDEO_PRESS_EJECT_OFF (1L << 19)
+#define VIDEO_PRESS_EJECT (VIDEO_PRESS_EJECT_OFF | VIDEO_PRESS_EJECT_ON)
+
+/* special */
+#define VIDEO_STATE_FFWD_OFF ((1L << 20) | VIDEO_STATE_PAUSE_OFF)
+#define VIDEO_STATE_FFWD_ON (1L << 21)
+#define VIDEO_STATE_FFWD (VIDEO_STATE_FFWD_OFF | VIDEO_STATE_FFWD_ON)
+#define VIDEO_STATE_PBEND_OFF (1L << 22)
+#define VIDEO_STATE_PBEND_ON (1L << 23)
+#define VIDEO_STATE_PBEND (VIDEO_STATE_PBEND_OFF | VIDEO_STATE_PBEND_ON)
+
+/* tags to draw video display labels or symbols only */
+#define VIDEO_DISPLAY_DEFAULT 0
+#define VIDEO_DISPLAY_LABEL_ONLY 1
+#define VIDEO_DISPLAY_SYMBOL_ONLY 2
+
+
+void DrawVideoDisplay(unsigned long, unsigned long);
+void DrawCompleteVideoDisplay(void);
void TapeStartRecording(void);
void TapeStopRecording(void);
#include "joystick.h"
#include "cartoons.h"
#include "network.h"
+#include "tape.h"
#if defined(PLATFORM_MSDOS)
extern boolean wait_for_vsync;