From: Holger Schemel Date: Wed, 6 Aug 2003 23:49:40 +0000 (+0200) Subject: rnd-20030807-1-src X-Git-Tag: 3.0.1^2~12 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=ddaae9de458b7f07b05461101655a1da4c63b380 rnd-20030807-1-src --- diff --git a/CHANGES b/CHANGES index 10ebc7f0..abd253eb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ +Release Version 3.0.1 [?? ??? ????] +----------------------------------- + Release Version 3.0.0 [05 AUG 2003] ------------------------------------------- +----------------------------------- - final version bumped to 3.0.0 due to the massive changes - graphics and sounds now completely and dynamically customizable - custom elements now have lots of configurable properties diff --git a/Makefile b/Makefile index 0c22aefb..bdd285b5 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/Makefile b/src/Makefile index ff288776..595f5996 100644 --- a/src/Makefile +++ b/src/Makefile @@ -103,7 +103,7 @@ CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR) CONFIG = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(JOYSTICK) -# DEBUG = -DDEBUG -g +DEBUG = -DDEBUG -g # PROFILING = $(PROFILING_FLAGS) # OPTIONS = $(DEBUG) -Wall # only for debugging purposes diff --git a/src/conftime.h b/src/conftime.h index e2c1ccdd..6c63aef2 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-08-05 01:57]" +#define COMPILE_DATE_STRING "[2003-08-07 01:24]" diff --git a/src/editor.c b/src/editor.c index 1749fe25..87184cd8 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1363,7 +1363,7 @@ static struct { ED_SETTINGS_XPOS(0) + 340, ED_COUNTER_YPOS(6) - MINI_TILEY, GADGET_ID_GRAVITY, GADGET_ID_DOUBLE_SPEED, - &level.gravity, + &level.initial_gravity, " ", "gravity", "set level gravity" }, { diff --git a/src/files.c b/src/files.c index bd2539b8..4f24ebbe 100644 --- a/src/files.c +++ b/src/files.c @@ -74,7 +74,7 @@ static void setLevelInfoToDefaults(struct LevelInfo *level) level->time_timegate = 10; level->amoeba_content = EL_DIAMOND; level->double_speed = FALSE; - level->gravity = FALSE; + level->initial_gravity = FALSE; level->em_slippery_gems = FALSE; level->use_custom_template = FALSE; @@ -276,7 +276,7 @@ static int LoadLevel_HEAD(FILE *file, int chunk_size, struct LevelInfo *level) level->time_wheel = getFile8Bit(file); level->amoeba_content = checkLevelElement(getFile8Bit(file)); level->double_speed = (getFile8Bit(file) == 1 ? TRUE : FALSE); - level->gravity = (getFile8Bit(file) == 1 ? TRUE : FALSE); + level->initial_gravity = (getFile8Bit(file) == 1 ? TRUE : FALSE); level->encoding_16bit_field = (getFile8Bit(file) == 1 ? TRUE : FALSE); level->em_slippery_gems = (getFile8Bit(file) == 1 ? TRUE : FALSE); @@ -838,7 +838,7 @@ static void SaveLevel_HEAD(FILE *file, struct LevelInfo *level) putFile8Bit(file, (level->encoding_16bit_amoeba ? EL_EMPTY : level->amoeba_content)); putFile8Bit(file, (level->double_speed ? 1 : 0)); - putFile8Bit(file, (level->gravity ? 1 : 0)); + putFile8Bit(file, (level->initial_gravity ? 1 : 0)); putFile8Bit(file, (level->encoding_16bit_field ? 1 : 0)); putFile8Bit(file, (level->em_slippery_gems ? 1 : 0)); @@ -1198,7 +1198,7 @@ void DumpLevel(struct LevelInfo *level) printf("\n"); printf("Amoeba Speed: %d\n", level->amoeba_speed); printf("\n"); - printf("Gravity: %s\n", (level->gravity ? "yes" : "no")); + printf("Gravity: %s\n", (level->initial_gravity ?"yes":"no")); printf("Double Speed Movement: %s\n", (level->double_speed ? "yes" : "no")); printf("EM style slippery gems: %s\n", (level->em_slippery_gems ? "yes" : "no")); diff --git a/src/game.c b/src/game.c index a9256de7..f5b3ab7b 100644 --- a/src/game.c +++ b/src/game.c @@ -1032,6 +1032,7 @@ void InitGame() game.switchgate_pos = 0; game.balloon_dir = MV_NO_MOVING; game.explosions_delayed = TRUE; + game.current_gravity = level.initial_gravity; for (i=0; i<4; i++) { @@ -6087,7 +6088,7 @@ void ScrollLevel(int dx, int dy) static void CheckGravityMovement(struct PlayerInfo *player) { - if (level.gravity && !player->programmed_action) + if (game.current_gravity && !player->programmed_action) { int move_dir_vertical = player->action & (MV_UP | MV_DOWN); int move_dir_horizontal = player->action & (MV_LEFT | MV_RIGHT); @@ -7085,7 +7086,7 @@ int DigField(struct PlayerInfo *player, element == EL_SP_GRAVITY_PORT_RIGHT || element == EL_SP_GRAVITY_PORT_UP || element == EL_SP_GRAVITY_PORT_DOWN) - level.gravity = !level.gravity; + game.current_gravity = !game.current_gravity; /* automatically move to the next field with double speed */ player->programmed_action = move_direction; diff --git a/src/main.h b/src/main.h index 03e98378..24ecedf4 100644 --- a/src/main.h +++ b/src/main.h @@ -971,9 +971,9 @@ #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 0 -#define PROGRAM_VERSION_PATCH 0 +#define PROGRAM_VERSION_PATCH 1 #define PROGRAM_VERSION_RELEASE 0 -#define PROGRAM_VERSION_STRING "3.0.0" +#define PROGRAM_VERSION_STRING "3.0.1" #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" @@ -1117,7 +1117,7 @@ struct LevelInfo int time_light; int time_timegate; boolean double_speed; - boolean gravity; + boolean initial_gravity; boolean em_slippery_gems; /* EM style "gems slip from wall" behaviour */ short field[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; @@ -1179,6 +1179,7 @@ struct GameInfo int switchgate_pos; int balloon_dir; boolean explosions_delayed; + boolean current_gravity; }; struct GlobalInfo diff --git a/src/tools.c b/src/tools.c index 744065cd..d37a7b0e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -666,13 +666,14 @@ void DrawPlayer(struct PlayerInfo *player) if (player_is_moving && GfxElement[jx][jy] != EL_UNDEFINED) { #if 1 - if (CAN_BE_CRUMBLED(GfxElement[jx][jy])) + /* !!! insert DrawLevelFieldCrumbledSandDigging code here !!! */ + if (player->is_digging && CAN_BE_CRUMBLED(GfxElement[jx][jy])) DrawLevelFieldCrumbledSandDigging(jx, jy, move_dir, player->StepFrame); #else if (GfxElement[jx][jy] == EL_SAND) DrawLevelFieldCrumbledSandDigging(jx, jy, move_dir, player->StepFrame); #endif - else + else /* player->is_collecting */ { int old_element = GfxElement[jx][jy]; int old_graphic = el_act_dir2img(old_element, action, move_dir); @@ -1322,7 +1323,9 @@ void DrawLevelFieldCrumbledSandDigging(int x, int y, int direction, int sx = SCREENX(x), sy = SCREENY(y); DrawGraphic(sx, sy, graphic1, frame1); - DrawLevelFieldCrumbledSandExt(x, y, graphic2, frame2); + + if (graphic1 != IMG_EMPTY_SPACE) + DrawLevelFieldCrumbledSandExt(x, y, graphic2, frame2); } void DrawLevelFieldCrumbledSandNeighbours(int x, int y)