X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=f66cd400858a100f9add6ab75b57fc9814883155;hb=7eec2d73cfa570db7704b990d871e23ebfeb215b;hp=b510a0e56c72e434be4d71e74c6784d5e25acd3e;hpb=87f550d868b16979b79b0fd8ac81a0215516977a;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index b510a0e5..f66cd400 100644 --- a/src/game.c +++ b/src/game.c @@ -87,19 +87,6 @@ #define DOUBLE_PLAYER_SPEED(p) (HALVE_MOVE_DELAY((p)->move_delay_value)) #define HALVE_PLAYER_SPEED(p) (DOUBLE_MOVE_DELAY((p)->move_delay_value)) -/* score for elements */ -#define SC_EDELSTEIN 0 -#define SC_DIAMANT 1 -#define SC_KAEFER 2 -#define SC_FLIEGER 3 -#define SC_MAMPFER 4 -#define SC_ROBOT 5 -#define SC_PACMAN 6 -#define SC_KOKOSNUSS 7 -#define SC_DYNAMIT 8 -#define SC_SCHLUESSEL 9 -#define SC_ZEITBONUS 10 - /* game button identifiers */ #define GAME_CTRL_ID_STOP 0 #define GAME_CTRL_ID_PAUSE 1 @@ -606,24 +593,20 @@ void InitGame() DrawAllPlayers(); FadeToFront(); - XCopyArea(display, pix[PIX_DOOR], pix[PIX_DB_DOOR], gc, - DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, - DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1); - DrawTextExt(pix[PIX_DB_DOOR], gc, - DOOR_GFX_PAGEX1 + XX_LEVEL, DOOR_GFX_PAGEY1 + YY_LEVEL, - int2str(level_nr, 2), FS_SMALL, FC_YELLOW); - DrawTextExt(pix[PIX_DB_DOOR], gc, - DOOR_GFX_PAGEX1 + XX_EMERALDS, DOOR_GFX_PAGEY1 + YY_EMERALDS, - int2str(local_player->gems_still_needed,3), FS_SMALL, FC_YELLOW); - DrawTextExt(pix[PIX_DB_DOOR], gc, - DOOR_GFX_PAGEX1 + XX_DYNAMITE, DOOR_GFX_PAGEY1 + YY_DYNAMITE, - int2str(local_player->dynamite, 3), FS_SMALL, FC_YELLOW); - DrawTextExt(pix[PIX_DB_DOOR], gc, - DOOR_GFX_PAGEX1 + XX_SCORE, DOOR_GFX_PAGEY1 + YY_SCORE, - int2str(local_player->score, 5), FS_SMALL, FC_YELLOW); - DrawTextExt(pix[PIX_DB_DOOR], gc, - DOOR_GFX_PAGEX1 + XX_TIME, DOOR_GFX_PAGEY1 + YY_TIME, - int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW); + /* copy default game door content to main double buffer */ + XCopyArea(display, pix[PIX_DOOR], drawto, gc, + DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY); + + DrawText(DX + XX_LEVEL, DY + YY_LEVEL, + int2str(level_nr, 2), FS_SMALL, FC_YELLOW); + DrawText(DX + XX_EMERALDS, DY + YY_EMERALDS, + int2str(local_player->gems_still_needed,3), FS_SMALL, FC_YELLOW); + DrawText(DX + XX_DYNAMITE, DY + YY_DYNAMITE, + int2str(local_player->dynamite, 3), FS_SMALL, FC_YELLOW); + DrawText(DX + XX_SCORE, DY + YY_SCORE, + int2str(local_player->score, 5), FS_SMALL, FC_YELLOW); + DrawText(DX + XX_TIME, DY + YY_TIME, + int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW); UnmapGameButtons(); game_gadget[SOUND_CTRL_ID_MUSIC]->checked = setup.sound_music; @@ -632,12 +615,9 @@ void InitGame() MapGameButtons(); MapTapeButtons(); - /* copy actual game buttons to door double buffer for OpenDoor() */ + /* copy actual game door content to door double buffer for OpenDoor() */ XCopyArea(display, drawto, pix[PIX_DB_DOOR], gc, - DX + GAME_CONTROL_XPOS, DY + GAME_CONTROL_YPOS, - GAME_CONTROL_XSIZE, 2 * GAME_CONTROL_YSIZE, - DOOR_GFX_PAGEX1 + GAME_CONTROL_XPOS, - DOOR_GFX_PAGEY1 + GAME_CONTROL_YPOS); + DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1); OpenDoor(DOOR_OPEN_ALL);