projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20140307-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index cc32a2f4180582396ddeab1ca46c87f7356e19eb..11a6fed866271b03c2f5ff544ec29cd68827848c 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-1014,8
+1014,10
@@
static struct GamePanelControlInfo game_panel_controls[] =
#define SOUND_CTRL_ID_MUSIC 3
#define SOUND_CTRL_ID_LOOPS 4
#define SOUND_CTRL_ID_SIMPLE 5
#define SOUND_CTRL_ID_MUSIC 3
#define SOUND_CTRL_ID_LOOPS 4
#define SOUND_CTRL_ID_SIMPLE 5
+#define GAME_CTRL_ID_SAVE 6
+#define GAME_CTRL_ID_LOAD 7
-#define NUM_GAME_BUTTONS
6
+#define NUM_GAME_BUTTONS
8
/* forward declaration for internal use */
/* forward declaration for internal use */
@@
-1082,7
+1084,6
@@
static void PlayLevelSoundActionIfLoop(int, int, int);
static void StopLevelSoundActionIfLoop(int, int, int);
static void PlayLevelMusic();
static void StopLevelSoundActionIfLoop(int, int, int);
static void PlayLevelMusic();
-static void MapGameButtons();
static void HandleGameButtons(struct GadgetInfo *);
int AmoebeNachbarNr(int, int);
static void HandleGameButtons(struct GadgetInfo *);
int AmoebeNachbarNr(int, int);
@@
-4516,8
+4517,12
@@
void InitGame()
MapTapeButtons();
/* copy actual game door content to door double buffer for OpenDoor() */
MapTapeButtons();
/* copy actual game door content to door double buffer for OpenDoor() */
+#if 1
+ BlitBitmap(drawto, bitmap_db_door_1, DX, DY, DXSIZE, DYSIZE, 0, 0);
+#else
BlitBitmap(drawto, bitmap_db_door,
DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
BlitBitmap(drawto, bitmap_db_door,
DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
+#endif
OpenDoor(DOOR_OPEN_ALL);
OpenDoor(DOOR_OPEN_ALL);
@@
-16803,6
+16808,14
@@
static struct
{
IMG_GAME_BUTTON_GFX_SOUND_SIMPLE, &game.button.sound_simple,
SOUND_CTRL_ID_SIMPLE, "normal sounds on/off"
{
IMG_GAME_BUTTON_GFX_SOUND_SIMPLE, &game.button.sound_simple,
SOUND_CTRL_ID_SIMPLE, "normal sounds on/off"
+ },
+ {
+ IMG_GAME_BUTTON_GFX_SAVE, &game.button.save,
+ GAME_CTRL_ID_SAVE, "save game"
+ },
+ {
+ IMG_GAME_BUTTON_GFX_LOAD, &game.button.load,
+ GAME_CTRL_ID_LOAD, "load game"
}
};
}
};
@@
-16828,9
+16841,18
@@
void CreateGameButtons()
int gd_yap = gfx->src_y + gfx->active_yoffset + gfx->pressed_yoffset;
int id = i;
int gd_yap = gfx->src_y + gfx->active_yoffset + gfx->pressed_yoffset;
int id = i;
+ if (gfx->bitmap == NULL)
+ {
+ game_gadget[id] = NULL;
+
+ continue;
+ }
+
if (id == GAME_CTRL_ID_STOP ||
id == GAME_CTRL_ID_PAUSE ||
if (id == GAME_CTRL_ID_STOP ||
id == GAME_CTRL_ID_PAUSE ||
- id == GAME_CTRL_ID_PLAY)
+ id == GAME_CTRL_ID_PLAY ||
+ id == GAME_CTRL_ID_SAVE ||
+ id == GAME_CTRL_ID_LOAD)
{
button_type = GD_TYPE_NORMAL_BUTTON;
checked = FALSE;
{
button_type = GD_TYPE_NORMAL_BUTTON;
checked = FALSE;
@@
-16879,7
+16901,7
@@
void FreeGameButtons()
FreeGadget(game_gadget[i]);
}
FreeGadget(game_gadget[i]);
}
-
static
void MapGameButtons()
+void MapGameButtons()
{
int i;
{
int i;
@@
-16985,6
+17007,14
@@
static void HandleGameButtonsExt(int id)
}
break;
}
break;
+ case GAME_CTRL_ID_SAVE:
+ TapeQuickSave();
+ break;
+
+ case GAME_CTRL_ID_LOAD:
+ TapeQuickLoad();
+ break;
+
default:
break;
}
default:
break;
}