From: Holger Schemel Date: Mon, 15 Dec 2003 00:08:55 +0000 (+0100) Subject: rnd-20031215-1-src X-Git-Tag: 3.1.0^2~109 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d703f1f2c94e753d668d793e7d2c6c6c71fc9fa8;p=rocksndiamonds.git rnd-20031215-1-src * fixed bug with wrong penguin graphics (when entering exit) * fixed bug with wrong "Murphy" graphics (when digging etc.) --- diff --git a/ChangeLog b/ChangeLog index 508922ab..599127a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ +2003-12-14 + * fixed bug with wrong penguin graphics (when entering exit) + +2003-12-14 + * fixed bug with wrong "Murphy" graphics (when digging etc.) + 2003-12-14 * Version number set to 3.0.9. diff --git a/src/conftime.h b/src/conftime.h index aa6bde03..9cf18e64 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-12-14 02:31]" +#define COMPILE_DATE_STRING "[2003-12-14 22:52]" diff --git a/src/files.c b/src/files.c index 929ce334..d1bb0144 100644 --- a/src/files.c +++ b/src/files.c @@ -3040,6 +3040,7 @@ void LoadMusicInfo() boolean music_already_used = FALSE; int i; + /* skip all music files that are configured in music config file */ for (i = 0; i < num_music; i++) { music = getMusicListEntry(i); diff --git a/src/game.c b/src/game.c index 05e65026..de6aa0c5 100644 --- a/src/game.c +++ b/src/game.c @@ -4439,8 +4439,13 @@ void StartMoving(int x, int y) { if (Feld[newx][newy] == EL_EXIT_OPEN) { +#if 1 + RemoveField(x, y); + DrawLevelField(x, y); +#else Feld[x][y] = EL_EMPTY; DrawLevelField(x, y); +#endif PlayLevelSound(newx, newy, SND_PENGUIN_PASSING); if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy))) @@ -6759,6 +6764,7 @@ void GameActions() StartMoving(x, y); #if 1 + element = Feld[x][y]; graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]); #if 0 if (element == EL_MOLE) diff --git a/src/init.c b/src/init.c index 9871ed6c..205524ca 100644 --- a/src/init.c +++ b/src/init.c @@ -413,6 +413,9 @@ void InitElementGraphicInfo() int num_property_mappings = getImageListPropertyMappingSize(); int i, act, dir; + if (graphic_info == NULL) /* still at startup phase */ + return; + /* set values to -1 to identify later as "uninitialized" values */ for (i = 0; i < MAX_NUM_ELEMENTS; i++) { @@ -614,9 +617,9 @@ void InitElementGraphicInfo() for (act = 0; act < NUM_ACTIONS; act++) { - boolean act_remove = (act == ACTION_DIGGING || - act == ACTION_SNAPPING || - act == ACTION_COLLECTING); + boolean act_remove = ((IS_DIGGABLE(i) && act == ACTION_DIGGING) || + (IS_SNAPPABLE(i) && act == ACTION_SNAPPING) || + (IS_COLLECTIBLE(i) && act == ACTION_COLLECTING)); boolean act_turning = (act == ACTION_TURNING_FROM_LEFT || act == ACTION_TURNING_FROM_RIGHT || act == ACTION_TURNING_FROM_UP || @@ -3180,6 +3183,9 @@ void InitElementPropertiesEngine(int engine_version) element_info[element].push_delay_random = game.default_push_delay_random; } #endif + + /* this is needed because some graphics depend on element properties */ + InitElementGraphicInfo(); } static void InitGlobal() diff --git a/src/libgame/sound.c b/src/libgame/sound.c index a70ea3ac..b9fd88c6 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -1911,6 +1911,7 @@ void LoadCustomMusic_NoConf(void) boolean music_already_used = FALSE; int i; + /* skip all music files that are configured in music config file */ for (i = 0; i < num_music; i++) { struct FileInfo *music = getMusicListEntry(i); @@ -1959,10 +1960,6 @@ void LoadCustomMusic_NoConf(void) closedir(dir); draw_init_text = FALSE; - - if (num_music_noconf == 0) - Error(ERR_WARN, "cannot find any valid music files in directory '%s'", - music_directory); } int getSoundListSize() diff --git a/src/tools.c b/src/tools.c index 6b8ae646..3f7c0735 100644 --- a/src/tools.c +++ b/src/tools.c @@ -857,7 +857,7 @@ void DrawPlayer(struct PlayerInfo *player) SetDrawtoField(DRAW_DIRECT); } - MarkTileDirty(sx,sy); + MarkTileDirty(sx, sy); } void getGraphicSource(int graphic, int frame, Bitmap **bitmap, int *x, int *y) @@ -981,7 +981,7 @@ void DrawMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic) BlitBitmap(src_bitmap, d, src_x, src_y, MINI_TILEX, MINI_TILEY, x, y); } -void DrawGraphicShifted(int x,int y, int dx,int dy, int graphic, int frame, +void DrawGraphicShifted(int x, int y, int dx, int dy, int graphic, int frame, int cut_mode, int mask_mode) { Bitmap *src_bitmap; @@ -1101,13 +1101,13 @@ void DrawGraphicShifted(int x,int y, int dx,int dy, int graphic, int frame, BlitBitmap(src_bitmap, drawto_field, src_x, src_y, width, height, dest_x, dest_y); - MarkTileDirty(x,y); + MarkTileDirty(x, y); } void DrawGraphicShiftedThruMask(int x, int y, int dx, int dy, int graphic, int frame, int cut_mode) { - DrawGraphicShifted(x,y, dx,dy, graphic, frame, cut_mode, USE_MASKING); + DrawGraphicShifted(x, y, dx, dy, graphic, frame, cut_mode, USE_MASKING); } void DrawScreenElementExt(int x, int y, int dx, int dy, int element,