rnd-20021129-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 29 Nov 2002 16:32:12 +0000 (17:32 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:39:04 +0000 (10:39 +0200)
src/cartoons.c
src/conftime.h
src/editor.c
src/game.c
src/init.c
src/main.c
src/main.h
src/screens.c
src/tape.c
src/tools.c

index fde4e0ca08fef0e879edee0b31b0772d536ce901..5b38eb77bd401dc943f53dbaa8b57ed8be4405f4 100644 (file)
@@ -310,7 +310,7 @@ boolean ToonNeedsRedraw()
 
 void InitToons()
 {
-  InitToonScreen(pix, pix[PIX_DB_DOOR],
+  InitToonScreen(pix, bitmap_db_door,
                 BackToFront, PrepareBackbuffer, ToonNeedsRedraw,
                 toons, NUM_TOONS,
                 REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
index 427e6c7a5be202b08c806735f614f7cfde5dcc39..977d6ef38c5ed49c5bfab58042ed5dca981fea99 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-11-27 00:18]"
+#define COMPILE_DATE_STRING "[2002-11-29 17:31]"
index 7b066ee9741e44497b7fac6f37b3e4f959f30717..35d7021ed97eb0a27cb663e6222d8623ff041592 100644 (file)
@@ -1313,7 +1313,7 @@ static void ScrollMiniLevel(int from_x, int from_y, int scroll)
 
 static void CreateControlButtons()
 {
-  Bitmap *gd_bitmap = pix[PIX_DOOR];
+  Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
   struct GadgetInfo *gi;
   unsigned long event_mask;
   int i;
@@ -1534,7 +1534,7 @@ static void CreateCounterButtons()
 
     for (j=0; j<2; j++)
     {
-      Bitmap *gd_bitmap = pix[PIX_DOOR];
+      Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
       struct GadgetInfo *gi;
       int id = (j == 0 ?
                counterbutton_info[i].gadget_id_down :
@@ -1756,7 +1756,7 @@ static void CreateTextInputGadgets()
 
   for (i=0; i<ED_NUM_TEXTINPUT; i++)
   {
-    Bitmap *gd_bitmap = pix[PIX_DOOR];
+    Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
     int gd_x, gd_y;
     struct GadgetInfo *gi;
     unsigned long event_mask;
@@ -1803,7 +1803,7 @@ static void CreateScrollbarGadgets()
   for (i=0; i<ED_NUM_SCROLLBARS; i++)
   {
     int id = scrollbar_info[i].gadget_id;
-    Bitmap *gd_bitmap = pix[PIX_DOOR];
+    Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
     int gd_x1, gd_x2, gd_y1, gd_y2;
     struct GadgetInfo *gi;
     int items_max, items_visible, item_position;
@@ -1868,7 +1868,7 @@ static void CreateScrollbarGadgets()
 
 static void CreateCheckbuttonGadgets()
 {
-  Bitmap *gd_bitmap = pix[PIX_DOOR];
+  Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
   struct GadgetInfo *gi;
   unsigned long event_mask;
   int gd_x1, gd_x2, gd_x3, gd_x4, gd_y;
@@ -2137,7 +2137,7 @@ void DrawLevelEd()
   }
 
   /* copy default editor door content to main double buffer */
-  BlitBitmap(pix[PIX_DOOR], drawto,
+  BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
             DOOR_GFX_PAGEX6, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
 
   /* draw mouse button brush elements */
@@ -2155,7 +2155,7 @@ void DrawLevelEd()
   DrawSpecialEditorDoor();
 
   /* draw new control window */
-  BlitBitmap(pix[PIX_DOOR], drawto,
+  BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
             DOOR_GFX_PAGEX8, 236, EXSIZE, EYSIZE, EX, EY);
 
   redraw_mask |= REDRAW_ALL;
@@ -2163,7 +2163,7 @@ void DrawLevelEd()
   MapControlButtons();
 
   /* copy actual editor door content to door double buffer for OpenDoor() */
-  BlitBitmap(drawto, pix[PIX_DB_DOOR],
+  BlitBitmap(drawto, bitmap_db_door,
             DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
 
   DrawEditModeWindow();
@@ -4258,7 +4258,7 @@ void RequestExitLevelEditor(boolean ask_if_level_has_changed)
   else
   {
     CloseDoor(DOOR_CLOSE_1);
-    BlitBitmap(pix[PIX_DB_DOOR], pix[PIX_DB_DOOR],
+    BlitBitmap(bitmap_db_door, bitmap_db_door,
               DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE,DYSIZE,
               DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
     OpenDoor(DOOR_OPEN_1);
index 8b812e538fcb95a460d85f3acfd610026ccd5cdc..4f3f3cab928b23f3146b9353c9fa6cff061bfac2 100644 (file)
@@ -971,7 +971,7 @@ void InitGame()
   redraw_mask |= REDRAW_FROM_BACKBUFFER;
 
   /* copy default game door content to main double buffer */
-  BlitBitmap(pix[PIX_DOOR], drawto,
+  BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
             DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
 
   if (level_nr < 100)
@@ -998,7 +998,7 @@ void InitGame()
   MapTapeButtons();
 
   /* copy actual game door content to door double buffer for OpenDoor() */
-  BlitBitmap(drawto, pix[PIX_DB_DOOR],
+  BlitBitmap(drawto, bitmap_db_door,
             DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
 
   OpenDoor(DOOR_OPEN_ALL);
@@ -6847,7 +6847,7 @@ void CreateGameButtons()
 
   for (i=0; i<NUM_GAME_BUTTONS; i++)
   {
-    Bitmap *gd_bitmap = pix[PIX_DOOR];
+    Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
     struct GadgetInfo *gi;
     int button_type;
     boolean checked;
index 6c54ab4ba23e6395914f71aea4c1393229f685e8..8471ac00ea9979ffd92324b39e36c7e3e2da7b87 100644 (file)
@@ -399,8 +399,12 @@ void InitGfx()
   InitGfxScrollbufferInfo(FXSIZE, FYSIZE);
 
   /* create additional image buffers for double-buffering */
-  pix[PIX_DB_DOOR] = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH);
-  pix[PIX_DB_FIELD] = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH);
+  bitmap_db_field = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH);
+  bitmap_db_door  = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH);
+#if 1
+  pix[PIX_DB_FIELD] = bitmap_db_field;
+  pix[PIX_DB_DOOR]  = bitmap_db_door;
+#endif
 
   pix[PIX_FONT_SMALL] = LoadCustomImage(image_filename[PIX_FONT_SMALL]);
 
@@ -432,12 +436,12 @@ void InitGfxBackground()
   int x, y;
 
   drawto = backbuffer;
-  fieldbuffer = pix[PIX_DB_FIELD];
+  fieldbuffer = bitmap_db_field;
   SetDrawtoField(DRAW_BACKBUFFER);
 
   BlitBitmap(pix[PIX_BACK], backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
   ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
-  ClearRectangle(pix[PIX_DB_DOOR], 0, 0, 3 * DXSIZE, DYSIZE + VYSIZE);
+  ClearRectangle(bitmap_db_door, 0, 0, 3 * DXSIZE, DYSIZE + VYSIZE);
 
   for (x=0; x<MAX_BUF_XSIZE; x++)
     for (y=0; y<MAX_BUF_YSIZE; y++)
index 1fecbd9de3ec9402db6e99da65de77bac9be7973..72ef847bd145d5dca58d393d5158cd57696bfb9c 100644 (file)
@@ -20,6 +20,7 @@
 
 GC             tile_clip_gc;
 Bitmap        *pix[NUM_BITMAPS];
+Bitmap        *bitmap_db_field, *bitmap_db_door;
 Pixmap         tile_clipmask[NUM_TILES];
 DrawBuffer     *fieldbuffer;
 DrawBuffer     *drawto_field;
index 9448687c29c58f46dbcf37df4efc34c2013e8cfd..9e0595fe799d5432e8bd855167aec3880d80798b 100644 (file)
@@ -1625,6 +1625,7 @@ struct NewGraphicInfo
 
 extern GC              tile_clip_gc;
 extern Bitmap         *pix[];
+extern Bitmap         *bitmap_db_field, *bitmap_db_door;
 extern Pixmap          tile_clipmask[];
 extern DrawBuffer      *fieldbuffer;
 extern DrawBuffer      *drawto_field;
index 61e308524a0766bde84c654f7ee6e3c1ea902f8e..adb8c3fb5cfec24957eee64d5bb20cb92ef213c8 100644 (file)
@@ -110,7 +110,7 @@ static void ToggleFullscreenIfNeeded()
   if (setup.fullscreen != video.fullscreen_enabled)
   {
     /* save old door content */
-    BlitBitmap(backbuffer, pix[PIX_DB_DOOR],
+    BlitBitmap(backbuffer, bitmap_db_door,
               DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
 
     /* toggle fullscreen */
@@ -118,10 +118,11 @@ static void ToggleFullscreenIfNeeded()
     setup.fullscreen = video.fullscreen_enabled;
 
     /* redraw background to newly created backbuffer */
-    BlitBitmap(pix[PIX_BACK], backbuffer, 0,0, WIN_XSIZE,WIN_YSIZE, 0,0);
+    BlitBitmap(new_graphic_info[IMG_MENU_BACK].bitmap, backbuffer,
+              0,0, WIN_XSIZE,WIN_YSIZE, 0,0);
 
     /* restore old door content */
-    BlitBitmap(pix[PIX_DB_DOOR], backbuffer,
+    BlitBitmap(bitmap_db_door, backbuffer,
               DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
 
     redraw_mask = REDRAW_ALL;
@@ -2432,11 +2433,6 @@ void HandleGameActions()
 /* ---------- new screen button stuff -------------------------------------- */
 
 /* graphic position and size values for buttons and scrollbars */
-#define SC_SCROLLBUTTON_XPOS           64
-#define SC_SCROLLBUTTON_YPOS           0
-#define SC_SCROLLBAR_XPOS              0
-#define SC_SCROLLBAR_YPOS              64
-
 #define SC_SCROLLBUTTON_XSIZE          32
 #define SC_SCROLLBUTTON_YSIZE          32
 
@@ -2453,21 +2449,21 @@ void HandleGameActions()
 
 static struct
 {
-  int xpos, ypos;
+  int gfx_unpressed, gfx_pressed;
   int x, y;
   int gadget_id;
   char *infotext;
 } scrollbutton_info[NUM_SCREEN_SCROLLBUTTONS] =
 {
   {
-    SC_SCROLLBUTTON_XPOS + 0 * SC_SCROLLBUTTON_XSIZE,   SC_SCROLLBUTTON_YPOS,
-    SC_SCROLL_UP_XPOS,                                 SC_SCROLL_UP_YPOS,
+    IMG_ARROW_BLUE_UP, IMG_ARROW_RED_UP,
+    SC_SCROLL_UP_XPOS, SC_SCROLL_UP_YPOS,
     SCREEN_CTRL_ID_SCROLL_UP,
     "scroll up"
   },
   {
-    SC_SCROLLBUTTON_XPOS + 1 * SC_SCROLLBUTTON_XSIZE,   SC_SCROLLBUTTON_YPOS,
-    SC_SCROLL_DOWN_XPOS,                               SC_SCROLL_DOWN_YPOS,
+    IMG_ARROW_BLUE_DOWN, IMG_ARROW_RED_DOWN,
+    SC_SCROLL_DOWN_XPOS, SC_SCROLL_DOWN_YPOS,
     SCREEN_CTRL_ID_SCROLL_DOWN,
     "scroll down"
   }
@@ -2475,7 +2471,7 @@ static struct
 
 static struct
 {
-  int xpos, ypos;
+  int gfx_unpressed, gfx_pressed;
   int x, y;
   int width, height;
   int type;
@@ -2484,9 +2480,9 @@ static struct
 } scrollbar_info[NUM_SCREEN_SCROLLBARS] =
 {
   {
-    SC_SCROLLBAR_XPOS,                 SC_SCROLLBAR_YPOS,
-    SX + SC_SCROLL_VERTICAL_XPOS,      SY + SC_SCROLL_VERTICAL_YPOS,
-    SC_SCROLL_VERTICAL_XSIZE,          SC_SCROLL_VERTICAL_YSIZE,
+    IMG_SCROLLBAR_BLUE, IMG_SCROLLBAR_RED,
+    SX + SC_SCROLL_VERTICAL_XPOS, SY + SC_SCROLL_VERTICAL_YPOS,
+    SC_SCROLL_VERTICAL_XSIZE, SC_SCROLL_VERTICAL_YSIZE,
     GD_TYPE_SCROLLBAR_VERTICAL,
     SCREEN_CTRL_ID_SCROLL_VERTICAL,
     "scroll level series vertically"
@@ -2495,16 +2491,17 @@ static struct
 
 static void CreateScreenScrollbuttons()
 {
-  Bitmap *gd_bitmap = pix[PIX_MORE];
   struct GadgetInfo *gi;
   unsigned long event_mask;
   int i;
 
   for (i=0; i<NUM_SCREEN_SCROLLBUTTONS; i++)
   {
-    int id = scrollbutton_info[i].gadget_id;
+    Bitmap *gd_bitmap_unpressed, *gd_bitmap_pressed;
+    int gfx_unpressed, gfx_pressed;
     int x, y, width, height;
     int gd_x1, gd_x2, gd_y1, gd_y2;
+    int id = scrollbutton_info[i].gadget_id;
 
     x = scrollbutton_info[i].x;
     y = scrollbutton_info[i].y;
@@ -2515,10 +2512,15 @@ static void CreateScreenScrollbuttons()
     y += SY;
     width = SC_SCROLLBUTTON_XSIZE;
     height = SC_SCROLLBUTTON_YSIZE;
-    gd_x1 = scrollbutton_info[i].xpos;
-    gd_y1 = scrollbutton_info[i].ypos;
-    gd_x2 = gd_x1;
-    gd_y2 = gd_y1 + SC_SCROLLBUTTON_YSIZE;
+
+    gfx_unpressed = scrollbutton_info[i].gfx_unpressed;
+    gfx_pressed   = scrollbutton_info[i].gfx_pressed;
+    gd_bitmap_unpressed = new_graphic_info[gfx_unpressed].bitmap;
+    gd_bitmap_pressed   = new_graphic_info[gfx_pressed].bitmap;
+    gd_x1 = new_graphic_info[gfx_unpressed].src_x;
+    gd_y1 = new_graphic_info[gfx_unpressed].src_y;
+    gd_x2 = new_graphic_info[gfx_pressed].src_x;
+    gd_y2 = new_graphic_info[gfx_pressed].src_y;
 
     gi = CreateGadget(GDI_CUSTOM_ID, id,
                      GDI_CUSTOM_TYPE_ID, i,
@@ -2529,8 +2531,8 @@ static void CreateScreenScrollbuttons()
                      GDI_HEIGHT, height,
                      GDI_TYPE, GD_TYPE_NORMAL_BUTTON,
                      GDI_STATE, GD_BUTTON_UNPRESSED,
-                     GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1,
-                     GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2,
+                     GDI_DESIGN_UNPRESSED, gd_bitmap_unpressed, gd_x1, gd_y1,
+                     GDI_DESIGN_PRESSED, gd_bitmap_pressed, gd_x2, gd_y2,
                      GDI_EVENT_MASK, event_mask,
                      GDI_CALLBACK_ACTION, HandleScreenGadgets,
                      GDI_END);
@@ -2548,35 +2550,29 @@ 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_unpressed, *gd_bitmap_pressed;
+    int gfx_unpressed, gfx_pressed;
     int gd_x1, gd_x2, gd_y1, gd_y2;
     struct GadgetInfo *gi;
     int items_max, items_visible, item_position;
     unsigned long event_mask;
     int num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN - 1;
+    int id = scrollbar_info[i].gadget_id;
 
-#if 0
-    if (num_leveldirs <= MAX_MENU_ENTRIES_ON_SCREEN)
-      num_page_entries = num_leveldirs;
-    else
-      num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN - 1;
-
-    items_max = MAX(num_leveldirs, num_page_entries);
-    items_visible = num_page_entries;
-    item_position = 0;
-#else
     items_max = num_page_entries;
     items_visible = num_page_entries;
     item_position = 0;
-#endif
 
     event_mask = GD_EVENT_MOVING | GD_EVENT_OFF_BORDERS;
 
-    gd_x1 = scrollbar_info[i].xpos;
-    gd_x2 = gd_x1 + scrollbar_info[i].width;
-    gd_y1 = scrollbar_info[i].ypos;
-    gd_y2 = scrollbar_info[i].ypos;
+    gfx_unpressed = scrollbar_info[i].gfx_unpressed;
+    gfx_pressed   = scrollbar_info[i].gfx_pressed;
+    gd_bitmap_unpressed = new_graphic_info[gfx_unpressed].bitmap;
+    gd_bitmap_pressed   = new_graphic_info[gfx_pressed].bitmap;
+    gd_x1 = new_graphic_info[gfx_unpressed].src_x;
+    gd_y1 = new_graphic_info[gfx_unpressed].src_y;
+    gd_x2 = new_graphic_info[gfx_pressed].src_x;
+    gd_y2 = new_graphic_info[gfx_pressed].src_y;
 
     gi = CreateGadget(GDI_CUSTOM_ID, id,
                      GDI_CUSTOM_TYPE_ID, i,
@@ -2590,8 +2586,8 @@ static void CreateScreenScrollbars()
                      GDI_SCROLLBAR_ITEMS_VISIBLE, items_visible,
                      GDI_SCROLLBAR_ITEM_POSITION, item_position,
                      GDI_STATE, GD_BUTTON_UNPRESSED,
-                     GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1,
-                     GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2,
+                     GDI_DESIGN_UNPRESSED, gd_bitmap_unpressed, gd_x1, gd_y1,
+                     GDI_DESIGN_PRESSED, gd_bitmap_pressed, gd_x2, gd_y2,
                      GDI_BORDER_SIZE, SC_BORDER_SIZE,
                      GDI_EVENT_MASK, event_mask,
                      GDI_CALLBACK_ACTION, HandleScreenGadgets,
index b219109fb3528b85246a1059312da05891ea742f..cc2ad928110c0d5d6e753fa6ab855a5ae7b8d330 100644 (file)
@@ -167,7 +167,7 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
   {
     int cx = DOOR_GFX_PAGEX3, cy = DOOR_GFX_PAGEY2;
 
-    BlitBitmap(pix[PIX_DOOR], drawto,
+    BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
               cx + VIDEO_REC_LABEL_XPOS,
               cy + VIDEO_REC_LABEL_YPOS,
               VIDEO_PBEND_LABEL_XSIZE,
@@ -188,7 +188,7 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
        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,
+       BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
                   cx + video_pos[pos][part_label][xpos],
                   cy + video_pos[pos][part_label][ypos],
                   video_pos[pos][part_label][xsize],
@@ -196,7 +196,7 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
                   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,
+       BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
                   cx + video_pos[pos][part_symbol][xpos],
                   cy + video_pos[pos][part_symbol][ypos],
                   video_pos[pos][part_symbol][xsize],
@@ -210,7 +210,7 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
   {
     int cx = DOOR_GFX_PAGEX4, cy = DOOR_GFX_PAGEY2;
 
-    BlitBitmap(pix[PIX_DOOR], drawto,
+    BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
               cx + VIDEO_PLAY_SYMBOL_XPOS,
               cy + VIDEO_PLAY_SYMBOL_YPOS,
               VIDEO_PLAY_SYMBOL_XSIZE - 2,
@@ -223,7 +223,7 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
   {
     int cx = DOOR_GFX_PAGEX6, cy = DOOR_GFX_PAGEY1;
 
-    BlitBitmap(pix[PIX_DOOR], drawto,
+    BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
               cx + VIDEO_PBEND_LABEL_XPOS,
               cy + VIDEO_PBEND_LABEL_YPOS,
               VIDEO_PBEND_LABEL_XSIZE,
@@ -267,9 +267,10 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
 
 void DrawCompleteVideoDisplay()
 {
-  BlitBitmap(pix[PIX_DOOR], drawto, DOOR_GFX_PAGEX3, DOOR_GFX_PAGEY2,
+  BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
+            DOOR_GFX_PAGEX3, DOOR_GFX_PAGEY2,
             gfx.vxsize, gfx.vysize, gfx.vx, gfx.vy);
-  BlitBitmap(pix[PIX_DOOR], drawto,
+  BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
             DOOR_GFX_PAGEX4 + VIDEO_CONTROL_XPOS,
             DOOR_GFX_PAGEY2 + VIDEO_CONTROL_YPOS,
             VIDEO_CONTROL_XSIZE, VIDEO_CONTROL_YSIZE,
@@ -282,7 +283,7 @@ void DrawCompleteVideoDisplay()
     DrawVideoDisplay(VIDEO_STATE_TIME_ON, tape.length_seconds);
   }
 
-  BlitBitmap(drawto, pix[PIX_DB_DOOR], gfx.vx, gfx.vy, gfx.vxsize, gfx.vysize,
+  BlitBitmap(drawto, bitmap_db_door, gfx.vx, gfx.vy, gfx.vxsize, gfx.vysize,
             DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY2);
 }
 
@@ -731,7 +732,7 @@ void CreateTapeButtons()
 
   for (i=0; i<NUM_TAPE_BUTTONS; i++)
   {
-    Bitmap *gd_bitmap = pix[PIX_DOOR];
+    Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
     struct GadgetInfo *gi;
     int gd_xoffset, gd_yoffset;
     int gd_x1, gd_x2, gd_y;
index 56822ab68a2736628fa308aec44e2e9adaa07b20..efb413e13c34a21a3ea589c93f8480c85e2954a8 100644 (file)
@@ -1953,7 +1953,7 @@ boolean Request(char *text, unsigned int req_state)
   CloseDoor(DOOR_CLOSE_1);
 
   /* save old door content */
-  BlitBitmap(pix[PIX_DB_DOOR], pix[PIX_DB_DOOR],
+  BlitBitmap(bitmap_db_door, bitmap_db_door,
             DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE,
             DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1);
 
@@ -2010,7 +2010,7 @@ boolean Request(char *text, unsigned int req_state)
   }
 
   /* copy request gadgets to door backbuffer */
-  BlitBitmap(drawto, pix[PIX_DB_DOOR],
+  BlitBitmap(drawto, bitmap_db_door,
             DX, DY, DXSIZE, DYSIZE,
             DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
 
@@ -2156,7 +2156,7 @@ boolean Request(char *text, unsigned int req_state)
 
     if (!(req_state & REQ_STAY_CLOSED) && (old_door_state & DOOR_OPEN_1))
     {
-      BlitBitmap(pix[PIX_DB_DOOR], pix[PIX_DB_DOOR],
+      BlitBitmap(bitmap_db_door, bitmap_db_door,
                 DOOR_GFX_PAGEX2,DOOR_GFX_PAGEY1, DXSIZE,DYSIZE,
                 DOOR_GFX_PAGEX1,DOOR_GFX_PAGEY1);
       OpenDoor(DOOR_OPEN_1);
@@ -2182,7 +2182,7 @@ unsigned int OpenDoor(unsigned int door_state)
 
   if (door_state & DOOR_COPY_BACK)
   {
-    BlitBitmap(pix[PIX_DB_DOOR], pix[PIX_DB_DOOR],
+    BlitBitmap(bitmap_db_door, bitmap_db_door,
               DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE + VYSIZE,
               DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
     door_state &= ~DOOR_COPY_BACK;
@@ -2197,9 +2197,9 @@ unsigned int CloseDoor(unsigned int door_state)
 {
   unsigned int new_door_state;
 
-  BlitBitmap(backbuffer, pix[PIX_DB_DOOR],
+  BlitBitmap(backbuffer, bitmap_db_door,
             DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
-  BlitBitmap(backbuffer, pix[PIX_DB_DOOR],
+  BlitBitmap(backbuffer, bitmap_db_door,
             VX, VY, VXSIZE, VYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY2);
 
   new_door_state = MoveDoor(door_state);
@@ -2270,7 +2270,7 @@ unsigned int MoveDoor(unsigned int door_state)
 
     for(x=start; x<=DXSIZE; x+=stepsize)
     {
-      Bitmap *bitmap = pix[PIX_DOOR];
+      Bitmap *bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
       GC gc = bitmap->stored_clip_gc;
 
       WaitUntilDelayReached(&door_delay, door_delay_value);
@@ -2280,7 +2280,7 @@ unsigned int MoveDoor(unsigned int door_state)
        int i = (door_state & DOOR_OPEN_1 ? DXSIZE-x : x);
        int j = (DXSIZE - i) / 3;
 
-       BlitBitmap(pix[PIX_DB_DOOR], drawto,
+       BlitBitmap(bitmap_db_door, drawto,
                   DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1 + i/2,
                   DXSIZE,DYSIZE - i/2, DX, DY);
 
@@ -2323,7 +2323,7 @@ unsigned int MoveDoor(unsigned int door_state)
        int i = (door_state & DOOR_OPEN_2 ? VXSIZE - x : x);
        int j = (VXSIZE - i) / 3;
 
-       BlitBitmap(pix[PIX_DB_DOOR], drawto,
+       BlitBitmap(bitmap_db_door, drawto,
                   DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY2 + i/2,
                   VXSIZE, VYSIZE - i/2, VX, VY);
 
@@ -2375,7 +2375,7 @@ unsigned int MoveDoor(unsigned int door_state)
 void DrawSpecialEditorDoor()
 {
   /* draw bigger toolbox window */
-  BlitBitmap(pix[PIX_DOOR], drawto,
+  BlitBitmap(new_graphic_info[IMG_MENU_DOOR].bitmap, drawto,
             DOOR_GFX_PAGEX7, 0, 108, 56, EX - 4, EY - 12);
 
   redraw_mask |= REDRAW_ALL;
@@ -2384,7 +2384,7 @@ void DrawSpecialEditorDoor()
 void UndrawSpecialEditorDoor()
 {
   /* draw normal tape recorder window */
-  BlitBitmap(pix[PIX_BACK], drawto,
+  BlitBitmap(new_graphic_info[IMG_MENU_BACK].bitmap, drawto,
             562, 344, 108, 56, EX - 4, EY - 12);
 
   redraw_mask |= REDRAW_ALL;
@@ -2513,7 +2513,7 @@ void CreateToolButtons()
 
   for (i=0; i<NUM_TOOL_BUTTONS; i++)
   {
-    Bitmap *gd_bitmap = pix[PIX_DOOR];
+    Bitmap *gd_bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap;
     Bitmap *deco_bitmap = None;
     int deco_x = 0, deco_y = 0, deco_xpos = 0, deco_ypos = 0;
     struct GadgetInfo *gi;