rnd-19981121-1
[rocksndiamonds.git] / src / buttons.c
index d80dd860590c531d021170b4398ff4f9711d95f1..d3eb443adb263bd85aeab0bf176ed36c3c31c6d2 100644 (file)
@@ -84,6 +84,19 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
        0,0 }}
   };
 
+  if (state & VIDEO_STATE_PBEND_OFF)
+  {
+    int cx = DOOR_GFX_PAGEX3, cy = DOOR_GFX_PAGEY2;
+
+    XCopyArea(display,pix[PIX_DOOR],drawto,gc,
+             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<20;i++)
   {
     if (state & (1<<i))
@@ -127,6 +140,19 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
              VY + VIDEO_PLAY_SYMBOL_YPOS);
   }
 
+  if (state & VIDEO_STATE_PBEND_ON)
+  {
+    int cx = DOOR_GFX_PAGEX6, cy = DOOR_GFX_PAGEY1;
+
+    XCopyArea(display,pix[PIX_DOOR],drawto,gc,
+             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;
@@ -535,7 +561,7 @@ int CheckVideoButtons(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
   static int video_button[5] =
   {
     VIDEO_PRESS_EJECT_ON,
@@ -595,12 +621,12 @@ int CheckSoundButtons(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
   int sound_state[3];
 
-  sound_state[0] = BUTTON_SOUND_MUSIC  | (BUTTON_ON * sound_music_on);
-  sound_state[1] = BUTTON_SOUND_LOOPS  | (BUTTON_ON * sound_loops_on);
-  sound_state[2] = BUTTON_SOUND_SIMPLE | (BUTTON_ON * sound_simple_on);
+  sound_state[0] = BUTTON_SOUND_MUSIC  | (BUTTON_ON * setup.sound_music);
+  sound_state[1] = BUTTON_SOUND_LOOPS  | (BUTTON_ON * setup.sound_loops);
+  sound_state[2] = BUTTON_SOUND_SIMPLE | (BUTTON_ON * setup.sound_simple);
 
   if (button)
   {
@@ -652,7 +678,7 @@ int CheckGameButtons(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
   int game_state[3] =
   {
     BUTTON_GAME_STOP,
@@ -710,7 +736,7 @@ int CheckYesNoButtons(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
   static int yesno_button[5] =
   {
     BUTTON_OK,
@@ -767,7 +793,7 @@ int CheckConfirmButton(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
 
   if (button)
   {
@@ -818,7 +844,7 @@ int CheckPlayerButtons(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
   int player_state[4] =
   {
     BUTTON_PLAYER_1,
@@ -879,7 +905,7 @@ int CheckEditButtons(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
   static int edit_button[6] =
   {
     ED_BUTTON_CTRL,
@@ -949,7 +975,7 @@ int CheckCtrlButtons(int mx, int my, int button)
 {
   int return_code = 0;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
   static int ctrl_button[4] =
   {
     ED_BUTTON_EDIT,
@@ -1008,7 +1034,7 @@ int CheckElemButtons(int mx, int my, int button)
 {
   int return_code = -1;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
 
   if (button)
   {
@@ -1069,7 +1095,7 @@ int CheckCountButtons(int mx, int my, int button)
 {
   int return_code = -1;
   static int choice = -1;
-  static BOOL pressed = FALSE;
+  static boolean pressed = FALSE;
 
   if (button)
   {