projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b192464
)
rnd-20040822-2-src
author
Holger Schemel
<info@artsoft.org>
Sat, 21 Aug 2004 23:54:35 +0000
(
01:54
+0200)
committer
Holger Schemel
<info@artsoft.org>
Sat, 30 Aug 2014 08:47:52 +0000
(10:47 +0200)
src/conftime.h
patch
|
blob
|
history
src/game.c
patch
|
blob
|
history
src/game_em/game_em.h
patch
|
blob
|
history
src/game_em/global.h
patch
|
blob
|
history
src/game_em/graphics.c
patch
|
blob
|
history
src/game_em/input.c
patch
|
blob
|
history
src/game_em/main.c
patch
|
blob
|
history
src/screens.c
patch
|
blob
|
history
diff --git
a/src/conftime.h
b/src/conftime.h
index 26dc228fd647526c5671a2a89af3da8bad589173..00bdd0291789f2e527a3b526447122d125bd612d 100644
(file)
--- a/
src/conftime.h
+++ b/
src/conftime.h
@@
-1
+1
@@
-#define COMPILE_DATE_STRING "[2004-08-22 0
0:42
]"
+#define COMPILE_DATE_STRING "[2004-08-22 0
1:50
]"
diff --git
a/src/game.c
b/src/game.c
index eaf9ee12e8bb92dae1e76654a6dbbc120132c40b..1d2396b025837c2238432b4b4c30261876cec9e3 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-1124,6
+1124,14
@@
void DrawGameDoorValues()
DrawGameValue_Time(TimeLeft);
}
DrawGameValue_Time(TimeLeft);
}
+void DrawGameDoorValues_EM(int emeralds, int dynamite, int score, int time)
+{
+ DrawGameValue_Emeralds(emeralds);
+ DrawGameValue_Dynamite(dynamite);
+ DrawGameValue_Score(score);
+ DrawGameValue_Time(time);
+}
+
static void resolve_group_element(int group_element, int recursion_depth)
{
static int group_nr;
static void resolve_group_element(int group_element, int recursion_depth)
{
static int group_nr;
@@
-2052,6
+2060,18
@@
void InitGame()
CloseDoor(DOOR_CLOSE_1);
CloseDoor(DOOR_CLOSE_1);
+#if 1
+
+ if (em_main_init_game(level_nr) != 0)
+ {
+ game_status = GAME_MODE_MAIN;
+ DrawMainMenu();
+
+ return;
+ }
+
+#else
+
DrawLevel();
DrawAllPlayers();
DrawLevel();
DrawAllPlayers();
@@
-2065,6
+2085,8
@@
void InitGame()
redraw_mask |= REDRAW_FROM_BACKBUFFER;
FadeToFront();
redraw_mask |= REDRAW_FROM_BACKBUFFER;
FadeToFront();
+#endif
+
/* copy default game door content to main double buffer */
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
/* copy default game door content to main double buffer */
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
diff --git
a/src/game_em/game_em.h
b/src/game_em/game_em.h
index 48012ab228ca10e5c659bab3b79955b5413b23cf..77d001723b81e5197e3ee0edeec700649f27d4d0 100644
(file)
--- a/
src/game_em/game_em.h
+++ b/
src/game_em/game_em.h
@@
-19,7
+19,7
@@
extern void em_open_all();
extern void em_close_all();
extern void em_open_all();
extern void em_close_all();
-extern
void em_main_init_game(
);
+extern
int em_main_init_game(int
);
extern int em_main_handle_game(byte);
#endif /* GAME_EM_H */
extern int em_main_handle_game(byte);
#endif /* GAME_EM_H */
diff --git
a/src/game_em/global.h
b/src/game_em/global.h
index f86171a4d1f850e13188d6664cd1436412ad3a0c..c2a13e894016b11a8746f66d9ecb26668638ca35 100644
(file)
--- a/
src/game_em/global.h
+++ b/
src/game_em/global.h
@@
-26,6
+26,7
@@
extern unsigned int frame;
#define EM_GAME_STATUS_PLAY 2
extern int em_game_status;
#define EM_GAME_STATUS_PLAY 2
extern int em_game_status;
+extern boolean skip_menu;
extern short ulaw_to_linear[256];
extern unsigned char linear_to_ulaw[65536];
extern short ulaw_to_linear[256];
extern unsigned char linear_to_ulaw[65536];
@@
-54,6
+55,7
@@
void sound_play(void);
int cave_convert(char *filename);
void game_init_vars(void);
int cave_convert(char *filename);
void game_init_vars(void);
+int game_play_init(int);
int game_loop(byte);
void synchro_1(void);
int game_loop(byte);
void synchro_1(void);
diff --git
a/src/game_em/graphics.c
b/src/game_em/graphics.c
index 70c45c5393c897cdbce907ec87d7defc02cbc936..d869bc88b68fc423c6f3d3de8357f948229db9c4 100644
(file)
--- a/
src/game_em/graphics.c
+++ b/
src/game_em/graphics.c
@@
-15,6
+15,8
@@
#if defined(TARGET_X11)
#if defined(TARGET_X11)
+extern void DrawGameDoorValues_EM(int, int, int, int);
+
unsigned int frame; /* current frame */
unsigned int screen_x; /* current scroll position */
unsigned int screen_y;
unsigned int frame; /* current frame */
unsigned int screen_x; /* current scroll position */
unsigned int screen_y;
@@
-110,11
+112,13
@@
void blitscreen(void)
SX + MAX_BUF_XSIZE * TILEX - x, SY + MAX_BUF_YSIZE * TILEY - y);
}
SX + MAX_BUF_XSIZE * TILEX - x, SY + MAX_BUF_YSIZE * TILEY - y);
}
- /* draw either the main menu footer or the in-game time/gems/score values */
-
- if (em_game_status == EM_GAME_STATUS_PLAY)
+ if (em_game_status == EM_GAME_STATUS_PLAY && SCR_FIELDY < 17)
+ {
BlitBitmap(scoreBitmap, window, 0, 0, SCR_FIELDX * TILEX, SCOREY,
BlitBitmap(scoreBitmap, window, 0, 0, SCR_FIELDX * TILEX, SCOREY,
- SX, SY + SCR_FIELDY * TILEY - SCOREY);
+ SX, SY + SCR_FIELDY * TILEY);
+ ClearRectangle(window, SX, SY + SCR_FIELDY * TILEY + SCOREY,
+ SCR_FIELDX * TILEX, (17 - SCR_FIELDY) * TILEY - SCOREY);
+ }
XFlush(display);
XFlush(display);
@@
-332,16
+336,22
@@
void game_blitscore(void)
xdebug("game_blitscore");
xdebug("game_blitscore");
+ DrawGameDoorValues_EM(lev.required, ply1.dynamite, lev.score,
+ (lev.time + 4) / 5);
+
i = (lev.time + 4) / 5;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
i = (lev.time + 4) / 5;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
- 7 * SCOREX, 0); i /= 10;
+ 7 * SCOREX, 0);
+ i /= 10;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
- 6 * SCOREX, 0); i /= 10;
+ 6 * SCOREX, 0);
+ i /= 10;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
- 5 * SCOREX, 0); i /= 10;
+ 5 * SCOREX, 0);
+ i /= 10;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
4 * SCOREX, 0);
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
4 * SCOREX, 0);
@@
-349,13
+359,16
@@
void game_blitscore(void)
i = lev.score;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
i = lev.score;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
- 31 * SCOREX, 0); i /= 10;
+ 31 * SCOREX, 0);
+ i /= 10;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
- 30 * SCOREX, 0); i /= 10;
+ 30 * SCOREX, 0);
+ i /= 10;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
- 29 * SCOREX, 0); i /= 10;
+ 29 * SCOREX, 0);
+ i /= 10;
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
28 * SCOREX, 0);
BlitBitmap(botBitmap, scoreBitmap,
(i % 10) * SCOREX, colours[1] * SCOREY, SCOREX, SCOREY,
28 * SCOREX, 0);
diff --git
a/src/game_em/input.c
b/src/game_em/input.c
index 207a80baf74f71c9810aa52e23aa871144d64d23..9c1681ffded48cf3e199ddab69ab451bc28c1dda 100644
(file)
--- a/
src/game_em/input.c
+++ b/
src/game_em/input.c
@@
-331,6
+331,9
@@
int game_loop(byte action)
{
/* stop playing */
{
/* stop playing */
+ if (skip_menu)
+ return 1;
+
em_game_status = EM_GAME_STATUS_MENU;
game_menu_init();
}
em_game_status = EM_GAME_STATUS_MENU;
game_menu_init();
}
diff --git
a/src/game_em/main.c
b/src/game_em/main.c
index a9701d6955711887254b0489b03a69a7b1ce94eb..7ae2810a67b236ad30fd2c040f246c0944e28d0f 100644
(file)
--- a/
src/game_em/main.c
+++ b/
src/game_em/main.c
@@
-26,6
+26,7
@@
int arg_install;
int arg_silence;
int em_game_status;
int arg_silence;
int em_game_status;
+boolean skip_menu = TRUE;
extern void tab_generate();
extern void ulaw_generate();
extern void tab_generate();
extern void ulaw_generate();
@@
-51,10
+52,21
@@
void em_close_all()
close_all();
}
close_all();
}
-
void em_main_init_game(
)
+
int em_main_init_game(int level_nr
)
{
{
- em_game_status = EM_GAME_STATUS_MENU;
- game_menu_init();
+ if (skip_menu)
+ {
+ em_game_status = EM_GAME_STATUS_PLAY;
+ if (game_play_init(level_nr) != 0)
+ return 1;
+ }
+ else
+ {
+ em_game_status = EM_GAME_STATUS_MENU;
+ game_menu_init();
+ }
+
+ return 0;
}
int em_main_handle_game(byte action)
}
int em_main_handle_game(byte action)
diff --git
a/src/screens.c
b/src/screens.c
index ddc28e8d6615a427dcdb009c110e367fe81a762d..d3728d2c2a298ba18a29f04c4f9bc56107f7529b 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-503,15
+503,7
@@
void HandleMainMenu(int mx, int my, int dx, int dy, int button)
{
game_status = GAME_MODE_PLAYING;
StopAnimation();
{
game_status = GAME_MODE_PLAYING;
StopAnimation();
-
-#if 1
-
- em_main_init_game();
-
-#else
InitGame();
InitGame();
-
-#endif
}
}
else if (y == 6)
}
}
else if (y == 6)