rnd-20030220-1-src
authorHolger Schemel <info@artsoft.org>
Thu, 20 Feb 2003 00:59:06 +0000 (01:59 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:40:27 +0000 (10:40 +0200)
16 files changed:
src/conf_chr.c
src/conf_chr.h
src/conf_cus.c
src/conf_cus.h
src/conf_e2g.c
src/conf_esg.c
src/conf_gfx.c
src/conf_gfx.h
src/conf_snd.h
src/conftime.h
src/game.c
src/libgame/gadgets.c
src/libgame/system.c
src/main.h
src/screens.c
src/tools.c

index 72eda55171df702dffe94630c87ad3006a282d2c..52940986bed096965d2742259e186ad443be765b 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_chr.c                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index 9063c7c74500f29e269cc475d2b9b3ee350d6271..4f8abbc1e283a5d0b615c4b8979a936506b47b80 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_chr.h                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index 33deebce79d6c0970ccbe99be88722b9a2805f83..d0d10b1b6c6f55ff4d973b0190bcd716f99e0e8b 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_cus.c                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index 3fa751d63c2a974d76d172ee6fde1cfae7aaa1db..425334be397f5cf9cf103ed6e186b479a9a542bf 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_cus.h                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index 81a18fcef2e2ed658cf35c24b19be048bdf5641b..c659b598709140c232c484d883ec7a5ccd235775 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_e2g.c                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index bd63c25a1bcc8b949520a51cec458ce48d936ef6..83ddda904ad4454547a4642f73748588c46781ce 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_esg.c                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index 8496c637eeaf30231ddb8a162d45ea03ce4465e0..f71a2b2c7ba1aa573b7e6b872b319dae53299716 100644 (file)
@@ -2194,24 +2194,32 @@ struct ConfigInfo image_config[] =
   { "player1.moving.right.xpos",               "4"                     },
   { "player1.moving.right.ypos",               "1"                     },
   { "player1.moving.right.frames",             "4"                     },
-  { "player1.moving.right.delay",              "4"                     },
   { "player1.moving.right.start_frame",                "1"                     },
+  { "player1.moving.right.delay",              "4"                     },
   { "player1.digging.down",                    "RocksHeroes.pcx"       },
   { "player1.digging.down.xpos",               "0"                     },
   { "player1.digging.down.ypos",               "0"                     },
   { "player1.digging.down.frames",             "4"                     },
+  { "player1.digging.down.start_frame",                "1"                     },
+  { "player1.digging.down.delay",              "4"                     },
   { "player1.digging.up",                      "RocksHeroes.pcx"       },
   { "player1.digging.up.xpos",                 "4"                     },
   { "player1.digging.up.ypos",                 "0"                     },
   { "player1.digging.up.frames",               "4"                     },
+  { "player1.digging.up.start_frame",          "1"                     },
+  { "player1.digging.up.delay",                        "4"                     },
   { "player1.digging.left",                    "RocksHeroes.pcx"       },
   { "player1.digging.left.xpos",               "0"                     },
   { "player1.digging.left.ypos",               "1"                     },
   { "player1.digging.left.frames",             "4"                     },
+  { "player1.digging.left.start_frame",                "1"                     },
+  { "player1.digging.left.delay",              "4"                     },
   { "player1.digging.right",                   "RocksHeroes.pcx"       },
   { "player1.digging.right.xpos",              "4"                     },
   { "player1.digging.right.ypos",              "1"                     },
   { "player1.digging.right.frames",            "4"                     },
+  { "player1.digging.right.start_frame",       "1"                     },
+  { "player1.digging.right.delay",             "4"                     },
   { "player1.pushing.down",                    "RocksHeroes.pcx"       },
   { "player1.pushing.down.xpos",               "0"                     },
   { "player1.pushing.down.ypos",               "0"                     },
index cd81afd090c2268315298e13c1f0b5e20114b270..65c3c846e693483d84a6f663dbcaf613806179e1 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_gfx.h                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index d5104cb3b0575a1b3489d3666bcd298a2d64570f..60ea119fa792e3a71b3f81461fb4887a52b62f7d 100644 (file)
@@ -1,3 +1,15 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_snd.h                                               *
+***********************************************************/
 
 /* ----- this file was automatically generated -- do not edit by hand ----- */
 
index 1e331afe3d07b043059363d86a764043a224f104..4f715e1464bb803a04f20cf940b42c17053eb7ea 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-02-18 21:01]"
+#define COMPILE_DATE_STRING "[2003-02-20 01:47]"
index b36eda0dc9c922e1a03be0f1b53a6a45be979cd3..629b323f1721143fe3cb0269347f08992dfaa471 100644 (file)
@@ -276,6 +276,10 @@ static void InitField(int x, int y, boolean init_game)
          Feld[x][y] = EL_SP_MURPHY_CLONE;
          break;
        }
+       else
+       {
+         stored_player[0].use_murphy_graphic = TRUE;
+       }
 
        Feld[x][y] = EL_PLAYER1;
       }
@@ -641,6 +645,10 @@ void InitGame()
     player->GfxPos = 0;
     player->Frame = 0;
 
+    player->GfxAction = ACTION_DEFAULT;
+
+    player->use_murphy_graphic = FALSE;
+
     player->actual_frame_counter = 0;
 
     player->frame_reset_delay = 0;
@@ -648,6 +656,9 @@ void InitGame()
     player->last_move_dir = MV_NO_MOVING;
     player->is_moving = FALSE;
 
+    player->is_moving = FALSE;
+    player->is_waiting = FALSE;
+
     player->move_delay       = game.initial_move_delay;
     player->move_delay_value = game.initial_move_delay_value;
 
@@ -2920,6 +2931,10 @@ void StartMoving(int x, int y)
       started_moving = TRUE;
 
       Store[x][y] = EL_ACID;
+#if 0
+      /* !!! TEST !!! better use "_FALLING" etc. !!! */
+      GfxAction[x][y+1] = ACTION_ACTIVE;
+#endif
     }
     else if (CAN_SMASH(element) && Feld[x][y+1] == EL_BLOCKED &&
             JustStopped[x][y])
@@ -5781,6 +5796,8 @@ int DigField(struct PlayerInfo *player,
                        dy == +1 ? MV_DOWN : MV_NO_MOVING);
   int element;
 
+  player->is_digging = FALSE;
+
   if (player->MovPos == 0)
     player->Pushing = FALSE;
 
@@ -6459,6 +6476,9 @@ int DigField(struct PlayerInfo *player,
 
   player->push_delay = 0;
 
+  if (Feld[x][y] != element)           /* really digged something */
+    player->is_digging = TRUE;
+
   return MF_MOVING;
 }
 
@@ -6479,6 +6499,7 @@ boolean SnapField(struct PlayerInfo *player, int dx, int dy)
       player->Pushing = FALSE;
 
     player->snapped = FALSE;
+    player->is_digging = FALSE;
     return FALSE;
   }
 
@@ -6494,6 +6515,7 @@ boolean SnapField(struct PlayerInfo *player, int dx, int dy)
     return FALSE;
 
   player->snapped = TRUE;
+  player->is_digging = FALSE;
   DrawLevelField(x, y);
   BackToFront();
 
index 2405c137aeab6bb16af471e140241587677b784b..66a8e2b340bfcd7848cb05e3e349b15c1c3bbb1a 100644 (file)
@@ -138,28 +138,29 @@ static void DrawGadget(struct GadgetInfo *gi, boolean pressed, boolean direct)
        int font_type = gi->text.font_type;
        int font_width = getFontWidth(font_type);
        int border = gi->border.size;
+
        strcpy(text, gi->text.value);
        strcat(text, " ");
 
        /* left part of gadget */
-       BlitBitmap(gd->bitmap, drawto,
-                  gd->x, gd->y, border, gi->height, gi->x, gi->y);
+       BlitBitmapOnBackground(gd->bitmap, drawto,
+                              gd->x, gd->y, border, gi->height, gi->x, gi->y);
 
        /* middle part of gadget */
        for (i=0; i<=gi->text.size; i++)
-         BlitBitmap(gd->bitmap, drawto,
-                    gd->x + border, gd->y, font_width, gi->height,
-                    gi->x + border + i * font_width, gi->y);
+         BlitBitmapOnBackground(gd->bitmap, drawto,
+                                gd->x + border, gd->y, font_width, gi->height,
+                                gi->x + border + i * font_width, gi->y);
 
        /* right part of gadget */
-       BlitBitmap(gd->bitmap, drawto,
-                  gd->x + gi->border.width - border, gd->y,
-                  border, gi->height, gi->x + gi->width - border, gi->y);
+       BlitBitmapOnBackground(gd->bitmap, drawto,
+                              gd->x + gi->border.width -border, gd->y, border,
+                              gi->height, gi->x + gi->width - border, gi->y);
 
        /* gadget text value */
        DrawTextExt(drawto,
                    gi->x + border, gi->y + border, text,
-                   font_type, FONT_OPAQUE);
+                   font_type, FONT_MASKED);
 
        cursor_letter = gi->text.value[gi->text.cursor_position];
        cursor_string[0] = '~';
@@ -171,7 +172,7 @@ static void DrawGadget(struct GadgetInfo *gi, boolean pressed, boolean direct)
          DrawTextExt(drawto,
                      gi->x + border + gi->text.cursor_position * font_width,
                      gi->y + border, cursor_string,
-                     font_type, FONT_OPAQUE);
+                     font_type, FONT_MASKED);
       }
       break;
 
index 119bf479bb7a55c3061e27b31a990aa746f1c908..201d0131e2ecbe10fa1722859886821e32874a34 100644 (file)
@@ -571,7 +571,7 @@ inline void BlitBitmapOnBackground(Bitmap *src_bitmap, Bitmap *dst_bitmap,
                                   int width, int height,
                                   int dst_x, int dst_y)
 {
-  if (DrawingOnBackground(src_x, src_y))
+  if (DrawingOnBackground(dst_x, dst_y))
   {
     /* draw background */
     BlitBitmap(gfx.background_bitmap, dst_bitmap, dst_x, dst_y, width, height,
index 856d4d144ffb9ffdce612e48c2c4eb4933f9dfe1..7664426e19ae4c1d533d0340b02f470bee4ca28c 100644 (file)
@@ -894,13 +894,20 @@ struct PlayerInfo
   int MovDir, MovPos, GfxPos;
   int Frame;
 
+  int GfxAction;
+
+  boolean use_murphy_graphic;
+
   boolean Pushing;
   boolean Switching;
   boolean LevelSolved, GameOver;
   boolean snapped;
 
   int last_move_dir;
-  int is_moving;
+  boolean is_moving;
+
+  boolean is_digging;
+  boolean is_waiting;
 
   unsigned long move_delay;
   int move_delay_value;
index 097eb44eb20429ede54279bd86ad47bd0fe9fc46..4c17a8b5b95cf6f5a29a9170c06247cca081fe4f 100644 (file)
@@ -72,7 +72,8 @@ static struct GadgetInfo *screen_gadget[NUM_SCREEN_GADGETS];
 static int setup_mode = SETUP_MODE_MAIN;
 
 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
-static Bitmap *scrollbar_bitmap[4];
+#define NUM_SCROLLBAR_BITMAPS          2
+static Bitmap *scrollbar_bitmap[NUM_SCROLLBAR_BITMAPS];
 #endif
 
 
@@ -3061,7 +3062,7 @@ void CreateScreenGadgets()
 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
   int i;
 
-  for (i=0; i<2; i++)
+  for (i=0; i < NUM_SCROLLBAR_BITMAPS; i++)
   {
     scrollbar_bitmap[i] = CreateBitmap(TILEX, TILEY, DEFAULT_DEPTH);
 
@@ -3088,7 +3089,7 @@ void FreeScreenGadgets()
   int i;
 
 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
-  for (i=0; i<4; i++)
+  for (i=0; i < NUM_SCROLLBAR_BITMAPS; i++)
   {
     /* prevent freeing clip mask and GC twice */
     scrollbar_bitmap[i]->clip_mask = None;
index 8ed2e29b604f1c462b048c66ef845fe6093a4918..6cf2d9e6cb55fbbb54ba5b8c815d8f49d34d5463 100644 (file)
@@ -609,7 +609,7 @@ void DrawPlayer(struct PlayerInfo *player)
 
   /* draw player himself */
 
-  if (game.emulation == EMU_SUPAPLEX)
+  if (player->use_murphy_graphic)
   {
     static int last_dir = MV_LEFT;
     int action = (player->programmed_action ? player->programmed_action :
@@ -666,19 +666,27 @@ void DrawPlayer(struct PlayerInfo *player)
   {
     if (player->MovDir == MV_LEFT)
       graphic = (player->Pushing ? IMG_PLAYER1_PUSHING_LEFT :
+                player->is_digging ? IMG_PLAYER1_DIGGING_LEFT :
                 player->is_moving ? IMG_PLAYER1_MOVING_LEFT :
+                player->snapped ? IMG_PLAYER1_SNAPPING_LEFT :
                 IMG_PLAYER1_LEFT);
     else if (player->MovDir == MV_RIGHT)
       graphic = (player->Pushing ? IMG_PLAYER1_PUSHING_RIGHT :
+                player->is_digging ? IMG_PLAYER1_DIGGING_RIGHT :
                 player->is_moving ? IMG_PLAYER1_MOVING_RIGHT :
+                player->snapped ? IMG_PLAYER1_SNAPPING_RIGHT :
                 IMG_PLAYER1_RIGHT);
     else if (player->MovDir == MV_UP)
       graphic = (player->Pushing ? IMG_PLAYER1_PUSHING_UP :
+                player->is_digging ? IMG_PLAYER1_DIGGING_UP :
                 player->is_moving ? IMG_PLAYER1_MOVING_UP :
+                player->snapped ? IMG_PLAYER1_SNAPPING_UP :
                 IMG_PLAYER1_UP);
     else       /* MV_DOWN || MV_NO_MOVING */
       graphic = (player->Pushing ? IMG_PLAYER1_PUSHING_DOWN :
+                player->is_digging ? IMG_PLAYER1_DIGGING_DOWN :
                 player->is_moving ? IMG_PLAYER1_MOVING_DOWN :
+                player->snapped ? IMG_PLAYER1_SNAPPING_DOWN :
                 IMG_PLAYER1_DOWN);
 
     graphic = PLAYER_NR_GFX(graphic, player->index_nr);