From: Holger Schemel Date: Wed, 19 Feb 2020 15:10:06 +0000 (+0100) Subject: renamed constant X-Git-Tag: 4.2.0.0~92 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=3f3cf82da520ddc14fbfd50d284e1eacc620b6b3;p=rocksndiamonds.git renamed constant --- diff --git a/src/game_em/cave.c b/src/game_em/cave.c index ed5dc942..fc872e9c 100644 --- a/src/game_em/cave.c +++ b/src/game_em/cave.c @@ -76,7 +76,7 @@ void setLevelInfoToDefaults_EM(void) for (j = 0; j < 8; j++) cav.ball_array[i][j] = Cblank; - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) cav.android_array[i] = Cblank; for (x = 0; x < CAVE_WIDTH; x++) diff --git a/src/game_em/cave.h b/src/game_em/cave.h index 59b795d8..0e3704d9 100644 --- a/src/game_em/cave.h +++ b/src/game_em/cave.h @@ -262,7 +262,7 @@ struct CAVE short eater_array[8][9]; /* eater data */ short ball_array[8][8]; /* ball data */ - short android_array[TILE_MAX]; /* android clone data */ + short android_array[GAME_TILE_MAX]; /* android clone data */ short cave[CAVE_WIDTH][CAVE_HEIGHT]; /* cave data */ }; diff --git a/src/game_em/convert.c b/src/game_em/convert.c index 9b4b7568..9ebf6f4c 100644 --- a/src/game_em/convert.c +++ b/src/game_em/convert.c @@ -223,7 +223,7 @@ int map_em_element_C_to_X(int element_em_cave) int map_em_element_X_to_C(int element_em_game) { - static unsigned short map_reverse[TILE_MAX]; + static unsigned short map_reverse[GAME_TILE_MAX]; static boolean map_reverse_initialized = FALSE; if (!map_reverse_initialized) @@ -231,7 +231,7 @@ int map_em_element_X_to_C(int element_em_game) int i; // return "Cblank" for all undefined elements in mapping array - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) map_reverse[i] = Cblank; for (i = 0; i < CAVE_TILE_MAX; i++) @@ -240,7 +240,7 @@ int map_em_element_X_to_C(int element_em_game) map_reverse_initialized = TRUE; } - if (element_em_game >= 0 && element_em_game < TILE_MAX) + if (element_em_game >= 0 && element_em_game < GAME_TILE_MAX) { int element_em_cave = map_reverse[element_em_game]; @@ -360,7 +360,7 @@ void prepare_em_level(void) for (j = 0; j < 8; j++) lev.ball_array[i][j] = map[cav.ball_array[i][j]]; - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) lev.android_array[i] = map[cav.android_array[i]]; /* determine number of players in this level */ diff --git a/src/game_em/emerald.h b/src/game_em/emerald.h index 581d8b8d..0bb0993b 100644 --- a/src/game_em/emerald.h +++ b/src/game_em/emerald.h @@ -543,7 +543,7 @@ enum Ygrass_blank, Ydirt_blank, - TILE_MAX + GAME_TILE_MAX }; /* other definitions */ @@ -684,7 +684,7 @@ struct LOGIC short eater_array[8][9]; /* eater data */ short ball_array[8][8]; /* ball data */ - short android_array[TILE_MAX]; /* android clone data */ + short android_array[GAME_TILE_MAX]; /* android clone data */ short cavebuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; short nextbuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; diff --git a/src/game_em/export.h b/src/game_em/export.h index b769d9dc..4766101b 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -93,7 +93,7 @@ struct EngineSnapshotInfo_EM extern struct GlobalInfo_EM global_em_info; extern struct GameInfo_EM game_em; extern struct LevelInfo_EM native_em_level; -extern struct GraphicInfo_EM graphic_info_em_object[TILE_MAX][8]; +extern struct GraphicInfo_EM graphic_info_em_object[GAME_TILE_MAX][8]; extern struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][PLY_MAX][8]; extern struct EngineSnapshotInfo_EM engine_snapshot_em; diff --git a/src/game_em/graphics.c b/src/game_em/graphics.c index d1567b4a..859fc298 100644 --- a/src/game_em/graphics.c +++ b/src/game_em/graphics.c @@ -46,7 +46,7 @@ static int screen_tiles[MAX_PLAYFIELD_WIDTH + 2][MAX_PLAYFIELD_HEIGHT + 2]; static int crumbled_state[MAX_PLAYFIELD_WIDTH + 2][MAX_PLAYFIELD_HEIGHT + 2]; /* graphic info for game objects/frames and players/actions/frames */ -struct GraphicInfo_EM graphic_info_em_object[TILE_MAX][8]; +struct GraphicInfo_EM graphic_info_em_object[GAME_TILE_MAX][8]; struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][PLY_MAX][8]; int getFieldbufferOffsetX_EM(void) diff --git a/src/game_em/logic.c b/src/game_em/logic.c index 9e3b690f..cd2028c9 100644 --- a/src/game_em/logic.c +++ b/src/game_em/logic.c @@ -20,7 +20,7 @@ static short **cave, **next, **boom; static unsigned int seed; static int score; -static const byte is_blank[TILE_MAX] = +static const byte is_blank[GAME_TILE_MAX] = { [Xblank] = 1, [Xsplash_e] = 1, @@ -35,7 +35,7 @@ static const byte is_blank[TILE_MAX] = [Xfake_acid_8] = 1 }; -static const byte is_blank_or_acid[TILE_MAX] = +static const byte is_blank_or_acid[GAME_TILE_MAX] = { [Xblank] = 1, [Xsplash_e] = 1, @@ -58,7 +58,7 @@ static const byte is_blank_or_acid[TILE_MAX] = [Xacid_8] = 1 }; -static const byte is_fake_acid[TILE_MAX] = +static const byte is_fake_acid[GAME_TILE_MAX] = { [Xfake_acid_1] = 1, [Xfake_acid_2] = 1, @@ -70,7 +70,7 @@ static const byte is_fake_acid[TILE_MAX] = [Xfake_acid_8] = 1 }; -static const byte is_amoeba[TILE_MAX] = +static const byte is_amoeba[GAME_TILE_MAX] = { [Xfake_amoeba] = 1, [Yfake_amoeba] = 1, @@ -84,7 +84,7 @@ static const byte is_amoeba[TILE_MAX] = [Xamoeba_8] = 1 }; -static const byte is_android_walkable[TILE_MAX] = +static const byte is_android_walkable[GAME_TILE_MAX] = { [Xblank] = 1, [Xsplash_e] = 1, diff --git a/src/game_em/main_em.h b/src/game_em/main_em.h index 11341158..ab135ec0 100644 --- a/src/game_em/main_em.h +++ b/src/game_em/main_em.h @@ -90,7 +90,7 @@ extern struct LOGIC lev; extern struct PLAYER ply[MAX_PLAYERS]; extern struct LevelInfo_EM native_em_level; -extern struct GraphicInfo_EM graphic_info_em_object[TILE_MAX][8]; +extern struct GraphicInfo_EM graphic_info_em_object[GAME_TILE_MAX][8]; extern struct GraphicInfo_EM graphic_info_em_player[MAX_PLAYERS][PLY_MAX][8]; extern struct GameInfo_EM game_em; diff --git a/src/game_em/reademc.c b/src/game_em/reademc.c index 58733ee7..62f9976f 100644 --- a/src/game_em/reademc.c +++ b/src/game_em/reademc.c @@ -142,7 +142,7 @@ static void init_android_clone_table(short android_clone_bits) boolean android_dynamite = (android_clone_bits & 4096) != 0; int i; - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) cav.android_array[i] = Cblank; if (android_eater) diff --git a/src/tools.c b/src/tools.c index a5638485..d7298fc1 100644 --- a/src/tools.c +++ b/src/tools.c @@ -5736,7 +5736,7 @@ static struct Mapping_EM_to_RND_object int action; int direction; } -em_object_mapping_list[TILE_MAX + 1] = +em_object_mapping_list[GAME_TILE_MAX + 1] = { { Zborder, FALSE, FALSE, @@ -7740,7 +7740,7 @@ int map_element_RND_to_EM_cave(int element_rnd) int map_element_EM_to_RND_cave(int element_em_cave) { - static unsigned short mapping_EM_to_RND[TILE_MAX]; + static unsigned short mapping_EM_to_RND[GAME_TILE_MAX]; static boolean mapping_initialized = FALSE; if (!mapping_initialized) @@ -7748,7 +7748,7 @@ int map_element_EM_to_RND_cave(int element_em_cave) int i; // return "EL_UNKNOWN" for all undefined elements in mapping array - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) mapping_EM_to_RND[i] = EL_UNKNOWN; for (i = 0; em_object_mapping_list[i].element_em != -1; i++) @@ -7768,7 +7768,7 @@ int map_element_EM_to_RND_cave(int element_em_cave) int map_element_EM_to_RND_game(int element_em_game) { - static unsigned short mapping_EM_to_RND[TILE_MAX]; + static unsigned short mapping_EM_to_RND[GAME_TILE_MAX]; static boolean mapping_initialized = FALSE; if (!mapping_initialized) @@ -7776,7 +7776,7 @@ int map_element_EM_to_RND_game(int element_em_game) int i; // return "EL_UNKNOWN" for all undefined elements in mapping array - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) mapping_EM_to_RND[i] = EL_UNKNOWN; for (i = 0; em_object_mapping_list[i].element_em != -1; i++) @@ -7786,7 +7786,7 @@ int map_element_EM_to_RND_game(int element_em_game) mapping_initialized = TRUE; } - if (element_em_game >= 0 && element_em_game < TILE_MAX) + if (element_em_game >= 0 && element_em_game < GAME_TILE_MAX) return mapping_EM_to_RND[element_em_game]; Error(ERR_WARN, "invalid EM game element %d", element_em_game); @@ -7800,7 +7800,7 @@ void map_android_clone_elements_RND_to_EM(struct LevelInfo *level) struct CAVE *cav = level_em->cav; int i, j; - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) cav->android_array[i] = Cblank; for (i = 0; i < level->num_android_clone_elements; i++) @@ -7823,7 +7823,7 @@ void map_android_clone_elements_EM_to_RND(struct LevelInfo *level) level->num_android_clone_elements = 0; - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) { int element_em_cave = cav->android_array[i]; int element_rnd; @@ -8278,7 +8278,7 @@ unsigned int InitRND(int seed) return InitEngineRandom_RND(seed); } -static struct Mapping_EM_to_RND_object object_mapping[TILE_MAX]; +static struct Mapping_EM_to_RND_object object_mapping[GAME_TILE_MAX]; static struct Mapping_EM_to_RND_player player_mapping[MAX_PLAYERS][PLY_MAX]; static int get_effective_element_EM(int tile, int frame_em) @@ -8624,7 +8624,7 @@ void InitGraphicInfo_EM(void) int i, j, p; // always start with reliable default values - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) { object_mapping[i].element_rnd = EL_UNKNOWN; object_mapping[i].is_backside = FALSE; @@ -8673,7 +8673,7 @@ void InitGraphicInfo_EM(void) MV_DIR_FROM_BIT(em_player_mapping_list[i].direction); } - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) { int element = object_mapping[i].element_rnd; int action = object_mapping[i].action; @@ -8938,7 +8938,7 @@ void InitGraphicInfo_EM(void) } } - for (i = 0; i < TILE_MAX; i++) + for (i = 0; i < GAME_TILE_MAX; i++) { for (j = 0; j < 8; j++) {