From: Holger Schemel Date: Wed, 30 Jul 2003 00:30:29 +0000 (+0200) Subject: rnd-20030730-1-src X-Git-Tag: 3.0.0^2~10 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2bcba5d4d363ba2f58c9d3f22aba6a455522f499;p=rocksndiamonds.git rnd-20030730-1-src --- 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 8fc19667..34487a73 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-07-29 00:38]" +#define COMPILE_DATE_STRING "[2003-07-30 02:23]" diff --git a/src/editor.c b/src/editor.c index 77557f6e..4806b842 100644 --- a/src/editor.c +++ b/src/editor.c @@ -4789,9 +4789,13 @@ static void DrawPropertiesInfo() properties[] = { /* configurable properties */ - { EP_INDESTRUCTIBLE, "- undestructible" }, - { EP_SLIPPERY, "- slippery for falling objects" }, - { EP_EM_SLIPPERY_WALL, "- slippery for some gems (EM style)" }, + + { EP_WALKABLE_OVER, "- player can walk over it" }, + { EP_WALKABLE_INSIDE, "- player can walk inside it" }, + { EP_WALKABLE_UNDER, "- player can walk under it" }, + { EP_PASSABLE_OVER, "- player can pass over it" }, + { EP_PASSABLE_INSIDE, "- player can pass through it" }, + { EP_PASSABLE_UNDER, "- player can pass under it" }, { EP_DIGGABLE, "- diggable" }, { EP_COLLECTIBLE, "- collectible" }, @@ -4799,27 +4803,27 @@ static void DrawPropertiesInfo() { EP_CAN_MOVE, "- can move" }, { EP_CAN_FALL, "- can fall" }, -#if 0 - { EP_CAN_SMASH, "- can smash" }, -#endif + { EP_CAN_SMASH_PLAYER, "- can smash player" }, +#if 0 { EP_CAN_SMASH_ENEMIES, "- can smash good and bad guys" }, +#endif { EP_CAN_SMASH_EVERYTHING, "- can smash everything smashable" }, - { EP_CAN_EXPLODE, "- can explode" }, - { EP_CAN_EXPLODE_BY_FIRE, " - by fire or explosions" }, - { EP_CAN_EXPLODE_SMASHED, " - when smashed" }, - { EP_CAN_EXPLODE_IMPACT, " - on impact" }, + + { EP_SLIPPERY, "- slippery for falling objects" }, + { EP_EM_SLIPPERY_WALL, "- slippery for some gems (EM style)" }, { EP_DONT_RUN_INTO, "- deadly when running into" }, { EP_DONT_COLLIDE_WITH, "- deadly when colliding with" }, { EP_DONT_TOUCH, "- deadly when touching" }, - { EP_WALKABLE_OVER, "- player can walk over it" }, - { EP_WALKABLE_INSIDE, "- player can walk inside it" }, - { EP_WALKABLE_UNDER, "- player can walk under it" }, - { EP_PASSABLE_OVER, "- player can pass over it" }, - { EP_PASSABLE_INSIDE, "- player can pass through it" }, - { EP_PASSABLE_UNDER, "- player can pass under it" }, + { EP_INDESTRUCTIBLE, "- undestructible" }, + + { EP_CAN_EXPLODE_BY_FIRE, "- can explode by fire or explosions" }, + { EP_CAN_EXPLODE_SMASHED, "- can explode when smashed" }, + { EP_CAN_EXPLODE_IMPACT, "- can explode on impact" }, + + { EP_CAN_CHANGE, "- can change to other element" }, /* pre-defined properties */ { EP_CAN_PASS_MAGIC_WALL, "- can pass magic walls" }, diff --git a/src/game.c b/src/game.c index 54d67849..2c577f2f 100644 --- a/src/game.c +++ b/src/game.c @@ -1893,7 +1893,7 @@ void Explode(int ex, int ey, int phase, int mode) PlaySoundLevelAction(ex, ey, ACTION_EXPLODING); /* remove things displayed in background while burning dynamite */ - if (!IS_INDESTRUCTIBLE(Back[ex][ey])) + if (Back[ex][ey] != EL_EMPTY && !IS_INDESTRUCTIBLE(Back[ex][ey])) Back[ex][ey] = 0; if (IS_MOVING(ex, ey) || IS_BLOCKED(ex, ey)) @@ -1927,7 +1927,7 @@ void Explode(int ex, int ey, int phase, int mode) #if 1 -#if 1 +#if 0 if (IS_EXPLOSION_PROOF(element)) continue; #else @@ -1958,11 +1958,11 @@ void Explode(int ex, int ey, int phase, int mode) } /* save walkable background elements while explosion on same tile */ -#if 1 +#if 0 if (IS_INDESTRUCTIBLE(element)) Back[x][y] = element; #else - if (IS_INDESTRUCTIBLE(element) && IS_WALKABLE(element)) + if (IS_WALKABLE(element) && IS_INDESTRUCTIBLE(element)) Back[x][y] = element; #endif @@ -2136,6 +2136,9 @@ void Explode(int ex, int ey, int phase, int mode) InitMovDir(x, y); DrawLevelField(x, y); + if (CAN_BE_CRUMBLED(element)) + DrawLevelFieldCrumbledSandNeighbours(x, y); + if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present) StorePlayer[x][y] = 0; } @@ -4055,7 +4058,8 @@ void StartMoving(int x, int y) TurnRound(x, y); #if 1 - DrawLevelElementAnimation(x, y, element); + if (GFX_ELEMENT(element) != EL_SAND) + DrawLevelElementAnimation(x, y, element); #else if (element == EL_BUG || element == EL_SPACESHIP || diff --git a/src/init.c b/src/init.c index b859112c..b4ce8d89 100644 --- a/src/init.c +++ b/src/init.c @@ -758,6 +758,12 @@ static void InitGraphicInfo() printf("::: image: '%s'\n", image->token); #endif +#if 0 + printf("::: image # %d: '%s' ['%s']\n", + i, image->token, + getTokenFromImageID(i)); +#endif + set_graphic_parameters(i, image->parameter); /* now check if no animation frames are outside of the loaded image */ diff --git a/src/libgame/image.c b/src/libgame/image.c index 3fb28c92..925147ab 100644 --- a/src/libgame/image.c +++ b/src/libgame/image.c @@ -718,7 +718,7 @@ static void *Load_PCX(char *filename) { ImageInfo *img_info; -#if 1 +#if 0 printf("loading PCX file '%s'\n", filename); #endif @@ -800,9 +800,16 @@ Bitmap *getBitmapFromImageID(int pos) char *getTokenFromImageID(int graphic) { +#if 0 + /* !!! this does not work for dynamic artwork (crash!) !!! */ struct FileInfo *file_list = (struct FileInfo *)image_info->file_list; return file_list[graphic].token; +#else + struct FileInfo *file_list = getImageListEntry(graphic); + + return (file_list != NULL ? file_list->token : NULL); +#endif } char *getImageConfigFilename() diff --git a/src/tools.c b/src/tools.c index e7b99635..a20e1177 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1200,7 +1200,8 @@ static void DrawLevelFieldCrumbledSandExt(int x, int y, int graphic, int frame) if (!IN_LEV_FIELD(x, y)) return; - element = (GfxElement[x][y] != EL_UNDEFINED ? GfxElement[x][y] : Feld[x][y]); + element = (GfxElement[x][y] != EL_UNDEFINED && Feld[x][y] != EL_EXPLOSION ? + GfxElement[x][y] : Feld[x][y]); /* crumble field itself */ if (CAN_BE_CRUMBLED(element) && !IS_MOVING(x, y)) @@ -1221,6 +1222,13 @@ static void DrawLevelFieldCrumbledSandExt(int x, int y, int graphic, int frame) if (CAN_BE_CRUMBLED(element) && !IS_MOVING(xx, yy)) continue; +#if 0 + if (Feld[x][y] == EL_CUSTOM_START + 123) + printf("::: crumble [%d] THE CHAOS ENGINE (%d, %d): %d, %d\n", + i, Feld[x][y], element, + CAN_BE_CRUMBLED(element), IS_MOVING(x, y)); +#endif + if (i == 1 || i == 2) { width = snip;