rnd-20001205-3-src
[rocksndiamonds.git] / src / screens.c
index e4be131820d7614a5c4d3b19d385393dc6178d5c..91aa31b8d2cfad6e6683773c5cd4a3b5b43d6986 100644 (file)
@@ -1,25 +1,24 @@
 /***********************************************************
-*  Rocks'n'Diamonds -- McDuffin Strikes Back!              *
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
 *----------------------------------------------------------*
-*  (c) 1995-98 Artsoft Entertainment                       *
-*              Holger Schemel                              *
-*              Oststrasse 11a                              *
-*              33604 Bielefeld                             *
-*              phone: ++49 +521 290471                     *
-*              email: aeglos@valinor.owl.de                *
+* (c) 1995-2000 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
 *----------------------------------------------------------*
-*  screens.c                                               *
+* screens.c                                                *
 ***********************************************************/
 
+#include "libgame/libgame.h"
+
 #include "screens.h"
 #include "events.h"
-#include "sound.h"
 #include "game.h"
 #include "tools.h"
 #include "editor.h"
-#include "misc.h"
 #include "files.h"
-#include "buttons.h"
 #include "tape.h"
 #include "joystick.h"
 #include "cartoons.h"
@@ -85,7 +84,7 @@ void DrawMainMenu()
   UndrawSpecialEditorDoor();
 
   /* needed if last screen was the setup screen and fullscreen state changed */
-  ChangeVideoModeIfNeeded();
+  setup.fullscreen = ChangeVideoModeIfNeeded(setup.fullscreen);
 #ifdef TARGET_SDL
   SetDrawtoField(DRAW_BACKBUFFER);
 #endif
@@ -262,9 +261,9 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
 
     level_nr = new_level_nr;
 
-    DrawTextExt(drawto, gc, SX + 11 * 32, SY + 3 * 32,
+    DrawTextExt(drawto, SX + 11 * 32, SY + 3 * 32,
                int2str(level_nr, 3), FS_BIG, font_color);
-    DrawTextExt(window, gc, SX + 11 * 32, SY + 3 * 32,
+    DrawTextExt(window, SX + 11 * 32, SY + 3 * 32,
                int2str(level_nr, 3), FS_BIG, font_color);
 
     LoadLevel(level_nr);
@@ -617,7 +616,7 @@ void DrawHelpScreenElAction(int start)
     }
     j++;
 
-    DrawGraphicExt(drawto, gc, xstart, ystart+(i-start)*ystep, graphic+frame);
+    DrawGraphicExt(drawto, xstart, ystart+(i-start)*ystep, graphic+frame);
     i++;
   }
 
@@ -842,9 +841,9 @@ void HandleTypeName(int newxpos, Key key)
     setup.player_name[xpos] = ascii;
     setup.player_name[xpos + 1] = 0;
     xpos++;
-    DrawTextExt(drawto, gc, SX + 6*32, SY + ypos*32,
+    DrawTextExt(drawto, SX + 6*32, SY + ypos*32,
                setup.player_name, FS_BIG, FC_YELLOW);
-    DrawTextExt(window, gc, SX + 6*32, SY + ypos*32,
+    DrawTextExt(window, SX + 6*32, SY + ypos*32,
                setup.player_name, FS_BIG, FC_YELLOW);
     DrawGraphic(xpos + 6, ypos, GFX_KUGEL_ROT);
   }
@@ -1500,7 +1499,7 @@ void HandleSetupScreen(int mx, int my, int dx, int dy, int button)
        setup.fading = !setup.fading;
       }
 #endif
-      else if (y == 8 && fullscreen_available)
+      else if (y == 8 && video.fullscreen_available)
       {
        if (setup.fullscreen)
          DrawText(SX+14*32, SY+yy*32,"off",FS_BIG,FC_BLUE);
@@ -2337,7 +2336,7 @@ static struct
 
 static void CreateScreenScrollbuttons()
 {
-  Bitmap gd_bitmap = pix[PIX_MORE];
+  Bitmap *gd_bitmap = pix[PIX_MORE];
   struct GadgetInfo *gi;
   unsigned long event_mask;
   int i;
@@ -2391,7 +2390,7 @@ static void CreateScreenScrollbars()
   for (i=0; i<NUM_SCREEN_SCROLLBARS; i++)
   {
     int id = scrollbar_info[i].gadget_id;
-    Bitmap gd_bitmap = pix[PIX_MORE];
+    Bitmap *gd_bitmap = pix[PIX_MORE];
     int gd_x1, gd_x2, gd_y1, gd_y2;
     struct GadgetInfo *gi;
     int items_max, items_visible, item_position;