From: Holger Schemel Date: Wed, 10 Feb 1999 01:26:55 +0000 (+0100) Subject: rnd-19990210-1 X-Git-Tag: 1.4.0^2~51 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=fd18ece8535cd87bd72989d7d39092d55b283939;p=rocksndiamonds.git rnd-19990210-1 --- diff --git a/src/Makefile b/src/Makefile index 37352916..4c0a427b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -69,9 +69,9 @@ CONFIG = $(CONFIG_GAME_DIR) $(SOUNDS) $(JOYSTICK) \ $(CONFIG_SCORE_ENTRIES) $(XPM_INCLUDE_FILE) # DEBUG = -DDEBUG -g -Wall -ansi -pedantic -# DEBUG = -DDEBUG -g -Wall +DEBUG = -DDEBUG -g -Wall # DEBUG = -O3 -Wall -ansi -pedantic -DEBUG = -O3 -Wall +# DEBUG = -O3 -Wall # DEBUG = -O3 # SYSTEM = -Aa -D_HPUX_SOURCE -Dhpux # for HP-UX (obsolete) diff --git a/src/main.h b/src/main.h index f25774b4..3f73b76c 100644 --- a/src/main.h +++ b/src/main.h @@ -1121,6 +1121,7 @@ extern char *element_info[]; #define GFX2_SP_ELECTRON (GFX_START_ROCKSMORE + 10 * MORE_PER_LINE + 8) #define GFX2_SP_TERMINAL (GFX_START_ROCKSMORE + 11 * MORE_PER_LINE + 8) #define GFX2_SP_TERMINAL_ACTIVE (GFX_START_ROCKSMORE + 12 * MORE_PER_LINE + 8) +#define GFX2_SP_ZONK (GFX_START_ROCKSMORE + 13 * MORE_PER_LINE + 8) /* graphics from "RocksFont" */ #define GFX_CHAR_START (GFX_START_ROCKSFONT) diff --git a/src/tools.c b/src/tools.c index df5c62d5..211a96c4 100644 --- a/src/tools.c +++ b/src/tools.c @@ -612,12 +612,23 @@ void DrawPlayer(struct PlayerInfo *player) if (element == EL_FELSBROCKEN && sxx) { - int phase = (player->GfxPos / (TILEX/4)); + int phase = (player->GfxPos / (TILEX / 4)); if (player->MovDir == MV_LEFT) graphic += phase; else - graphic += (phase+4)%4; + graphic += (phase + 4) % 4; + } + else if (element == EL_SP_ZONK && sxx) + { + int phase = (player->GfxPos / (TILEX / 4)); + + graphic = GFX2_SP_ZONK; + + if (player->MovDir == MV_LEFT) + graphic += phase; + else + graphic += (phase + 4) % 4; } DrawGraphicShifted(px, py, sxx, syy, graphic, NO_CUTTING, NO_MASKING); @@ -1226,9 +1237,29 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element, { graphic += !phase2; } - else if ((element == EL_FELSBROCKEN || IS_GEM(element)) && !cut_mode) + else if ((element == EL_FELSBROCKEN || element == EL_SP_ZONK || + IS_GEM(element)) && !cut_mode) { - if (element != EL_SP_INFOTRON) + if (element == EL_SP_ZONK) + { + /* + graphic = GFX2_SP_ZONK + phase2 * 2; + */ + + /* + printf("-> %d\n", phase4); + */ + + graphic = GFX2_SP_ZONK; + + if (dir == MV_LEFT) + graphic += (4 - phase4) % 4; + else if (dir == MV_RIGHT) + graphic += phase4; + else + graphic += phase2 * 2; + } + else if (element != EL_SP_INFOTRON) graphic += phase2 * (element == EL_FELSBROCKEN ? 2 : 1); } else if (element == EL_SIEB_LEER || element == EL_SIEB2_LEER ||