From: Holger Schemel Date: Fri, 18 Jul 2003 22:40:48 +0000 (+0200) Subject: rnd-20030719-1-src X-Git-Tag: 3.0.0^2~18 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=68ce14c8ea8794fbf2c8af7c7119a514b024f7c4;p=rocksndiamonds.git rnd-20030719-1-src --- diff --git a/CHANGES b/CHANGES index 4a745648..71822bc7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,11 @@ -Pre-Release Version 2.2.0rc7 [?? ??? ????] +Pre-Release Version 2.2.0rc8 [?? ??? ????] +------------------------------------------ + +Pre-Release Version 2.2.0rc7 [17 JUL 2003] ------------------------------------------ - fixed bug when picking element in the editor - added more custom elements properties + - fixed bugs when smashing penguin Pre-Release Version 2.2.0rc6 [22 APR 2003] ------------------------------------------ diff --git a/Makefile b/Makefile index bdd285b5..0c22aefb 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,8 @@ CROSS_PATH_WIN32=/usr/local/cross-tools/i386-mingw32msvc SRC_DIR = src MAKE_CMD = $(MAKE) -C $(SRC_DIR) -DEFAULT_TARGET = x11 -# DEFAULT_TARGET = sdl +# DEFAULT_TARGET = x11 +DEFAULT_TARGET = sdl all: @$(MAKE_CMD) TARGET=$(DEFAULT_TARGET) diff --git a/src/conftime.h b/src/conftime.h index d62019f5..dba09655 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-07-17 03:44]" +#define COMPILE_DATE_STRING "[2003-07-19 00:38]" diff --git a/src/init.c b/src/init.c index 839551ba..19e3230b 100644 --- a/src/init.c +++ b/src/init.c @@ -3096,19 +3096,23 @@ void ReloadCustomArtwork() char *mus_new_identifier = artwork.mus_current->identifier; boolean redraw_screen = FALSE; +#if 0 if (leveldir_current_identifier == NULL) leveldir_current_identifier = leveldir_current->identifier; +#endif -#if 0 +#if 1 printf("CURRENT GFX: '%s' ['%s']\n", artwork.gfx_current->identifier, leveldir_current->graphics_set); printf("CURRENT LEV: '%s' / '%s'\n", leveldir_current_identifier, leveldir_current->identifier); #endif -#if 0 +#if 1 printf("graphics --> '%s' ('%s')\n", artwork.gfx_current_identifier, artwork.gfx_current->filename); +#endif +#if 0 printf("sounds --> '%s' ('%s')\n", artwork.snd_current_identifier, artwork.snd_current->filename); printf("music --> '%s' ('%s')\n", @@ -3126,16 +3130,48 @@ void ReloadCustomArtwork() char *identifier_old = leveldir_current_identifier; char *identifier_new = leveldir_current->identifier; - if (getTreeInfoFromIdentifier(artwork.gfx_first, identifier_old) != - getTreeInfoFromIdentifier(artwork.gfx_first, identifier_new)) +#if 1 + printf("::: 1: ['%s'] '%s', '%s' [%lx, %lx]\n", + gfx_new_identifier, identifier_old, identifier_new, + getTreeInfoFromIdentifier(artwork.gfx_first, identifier_old), + getTreeInfoFromIdentifier(artwork.gfx_first, identifier_new)); +#endif + +#if 0 + if (getTreeInfoFromIdentifier(artwork.gfx_first, identifier_new) == NULL) + gfx_new_identifier = GRAPHICS_SUBDIR; + else if (getTreeInfoFromIdentifier(artwork.gfx_first, identifier_old) != + getTreeInfoFromIdentifier(artwork.gfx_first, identifier_new)) + gfx_new_identifier = identifier_new; +#else + if (getTreeInfoFromIdentifier(artwork.gfx_first, identifier_new) == NULL) + gfx_new_identifier = setup.graphics_set; + else gfx_new_identifier = identifier_new; - if (getTreeInfoFromIdentifier(artwork.snd_first, identifier_old) != - getTreeInfoFromIdentifier(artwork.snd_first, identifier_new)) +#endif + +#if 1 + if (leveldir_current_identifier == NULL) + leveldir_current_identifier = leveldir_current->identifier; +#endif + + if (getTreeInfoFromIdentifier(artwork.snd_first, identifier_new) == NULL) + snd_new_identifier = SOUNDS_SUBDIR; + else if (getTreeInfoFromIdentifier(artwork.snd_first, identifier_old) != + getTreeInfoFromIdentifier(artwork.snd_first, identifier_new)) snd_new_identifier = identifier_new; - if (getTreeInfoFromIdentifier(artwork.mus_first, identifier_new) != - getTreeInfoFromIdentifier(artwork.mus_first, identifier_new)) + + if (getTreeInfoFromIdentifier(artwork.mus_first, identifier_new) == NULL) + mus_new_identifier = MUSIC_SUBDIR; + else if (getTreeInfoFromIdentifier(artwork.mus_first, identifier_new) != + getTreeInfoFromIdentifier(artwork.mus_first, identifier_new)) mus_new_identifier = identifier_new; +#if 1 + printf("::: 2: ['%s'] '%s', '%s'\n", + gfx_new_identifier, identifier_old, identifier_new); +#endif + leveldir_current_identifier = leveldir_current->identifier; } @@ -3149,10 +3185,24 @@ void ReloadCustomArtwork() if (leveldir_current->music_set != NULL) mus_new_identifier = leveldir_current->music_set; +#if 1 + printf("CHECKING OLD/NEW GFX:\n OLD: '%s'\n NEW: '%s' ['%s', '%s']\n", + artwork.gfx_current_identifier, gfx_new_identifier, + artwork.gfx_current->identifier, leveldir_current->graphics_set); +#endif + if (strcmp(artwork.gfx_current_identifier, gfx_new_identifier) != 0 || last_override_level_graphics != setup.override_level_graphics) { #if 0 + artwork.gfx_current = + getTreeInfoFromIdentifier(artwork.gfx_first, gfx_new_identifier); +#endif +#if 1 + artwork.gfx_current_identifier = gfx_new_identifier; +#endif + +#if 1 printf("RELOADING GRAPHICS '%s' -> '%s' ('%s')\n", artwork.gfx_current_identifier, artwork.gfx_current->identifier, @@ -3167,10 +3217,22 @@ void ReloadCustomArtwork() FreeTileClipmasks(); InitTileClipmasks(); +#if 0 + artwork.gfx_current = + getTreeInfoFromIdentifier(artwork.gfx_first, gfx_new_identifier); +#endif + printf("::: '%s', %lx\n", gfx_new_identifier, artwork.gfx_current); +#if 0 artwork.gfx_current_identifier = artwork.gfx_current->identifier; +#endif last_override_level_graphics = setup.override_level_graphics; +#if 0 + printf("DONE RELOADING GFX: '%s' ['%s']\n", + artwork.gfx_current_identifier, artwork.gfx_current->identifier); +#endif + redraw_screen = TRUE; } @@ -3190,6 +3252,8 @@ void ReloadCustomArtwork() InitReloadCustomSounds(snd_new_identifier); ReinitializeSounds(); + artwork.snd_current = + getTreeInfoFromIdentifier(artwork.snd_first, setup.sounds_set); artwork.snd_current_identifier = artwork.snd_current->identifier; last_override_level_sounds = setup.override_level_sounds; @@ -3205,6 +3269,8 @@ void ReloadCustomArtwork() InitReloadCustomMusic(mus_new_identifier); ReinitializeMusic(); + artwork.mus_current = + getTreeInfoFromIdentifier(artwork.mus_first, setup.music_set); artwork.mus_current_identifier = artwork.mus_current->identifier; last_override_level_music = setup.override_level_music; diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 3ea7dc18..95ef6eef 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -26,9 +26,9 @@ /* functions from SGE library */ inline void sge_Line(SDL_Surface *, Sint16, Sint16, Sint16, Sint16, Uint32); -#ifdef PLATFORM_WIN32 +/* #ifdef PLATFORM_WIN32 */ #define FULLSCREEN_BUG -#endif +/* #endif */ /* stuff needed to work around SDL/Windows fullscreen drawing bug */ static int fullscreen_width; @@ -866,6 +866,14 @@ void sge_LineRGB(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, inline void SDLPutPixel(Bitmap *dst_bitmap, int x, int y, Pixel pixel) { +#ifdef FULLSCREEN_BUG + if (dst_bitmap == backbuffer || dst_bitmap == window) + { + x += video_xoffset; + y += video_yoffset; + } +#endif + sge_PutPixel(dst_bitmap->surface, x, y, pixel); } diff --git a/src/main.h b/src/main.h index 03df0b6c..4f431f8a 100644 --- a/src/main.h +++ b/src/main.h @@ -964,8 +964,8 @@ #define PROGRAM_VERSION_MAJOR 2 #define PROGRAM_VERSION_MINOR 2 #define PROGRAM_VERSION_PATCH 0 -#define PROGRAM_VERSION_RELEASE 7 -#define PROGRAM_VERSION_STRING "2.2.0rc7" +#define PROGRAM_VERSION_RELEASE 8 +#define PROGRAM_VERSION_STRING "2.2.0rc8" #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel"