projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1b947aa
)
white space changes
author
Holger Schemel
<info@artsoft.org>
Mon, 19 Feb 2024 23:55:41 +0000
(
00:55
+0100)
committer
Holger Schemel
<info@artsoft.org>
Mon, 19 Feb 2024 23:55:41 +0000
(
00:55
+0100)
src/game_bd/bd_bdcff.c
patch
|
blob
|
history
src/game_bd/bd_c64import.c
patch
|
blob
|
history
src/game_bd/bd_cave.c
patch
|
blob
|
history
src/game_bd/bd_cavedb.c
patch
|
blob
|
history
src/game_bd/bd_caveengine.c
patch
|
blob
|
history
src/game_bd/bd_caveobject.c
patch
|
blob
|
history
src/game_mm/mm_game.c
patch
|
blob
|
history
src/game_mm/mm_tools.c
patch
|
blob
|
history
diff --git
a/src/game_bd/bd_bdcff.c
b/src/game_bd/bd_bdcff.c
index 235938b723c3e0d56e21a3cf4a0dc2b852db35bc..490dc1afbe43bf27dd608cb84b1aded6eb6ebd61 100644
(file)
--- a/
src/game_bd/bd_bdcff.c
+++ b/
src/game_bd/bd_bdcff.c
@@
-107,17
+107,17
@@
static boolean attrib_is_valid_for_cave(const char *attrib)
int i;
/* bdcff engine flag............ */
int i;
/* bdcff engine flag............ */
- if (strcasecmp(attrib, "Engine")
==
0)
+ if (strcasecmp(attrib, "Engine")
==
0)
return TRUE;
/* old flags - for compatibility */
return TRUE;
/* old flags - for compatibility */
- if (strcasecmp(attrib, "BD1Scheduling")
==
0)
+ if (strcasecmp(attrib, "BD1Scheduling")
==
0)
return TRUE;
return TRUE;
- if (strcasecmp(attrib, "SnapExplosions")
==
0)
+ if (strcasecmp(attrib, "SnapExplosions")
==
0)
return TRUE;
return TRUE;
- if (strcasecmp(attrib, "AmoebaProperties")
==
0)
+ if (strcasecmp(attrib, "AmoebaProperties")
==
0)
return TRUE;
/* search in property database */
return TRUE;
/* search in property database */
diff --git
a/src/game_bd/bd_c64import.c
b/src/game_bd/bd_c64import.c
index 36e2dc080d0cdaa3aa6b7f5f808776a15bfaa108..327de812799034394c9a59041519f4660d1d7818 100644
(file)
--- a/
src/game_bd/bd_c64import.c
+++ b/
src/game_bd/bd_c64import.c
@@
-813,7
+813,7
@@
static int cave_copy_from_bd2(GdCave *cave, const guint8 *data, int remaining_by
gd_cave_set_engine_defaults(cave, GD_ENGINE_BD2);
gd_cave_set_engine_defaults(cave, GD_ENGINE_BD2);
- if (format
==
GD_FORMAT_BD2_ATARI)
+ if (format
==
GD_FORMAT_BD2_ATARI)
cave->scheduling = GD_SCHEDULING_BD2_PLCK_ATARI;
/* set visible size for intermission */
cave->scheduling = GD_SCHEDULING_BD2_PLCK_ATARI;
/* set visible size for intermission */
@@
-829,11
+829,11
@@
static int cave_copy_from_bd2(GdCave *cave, const guint8 *data, int remaining_by
for (i = 0; i < 5; i++)
{
/* 0 immediately underflowed to 999, so we use 999. example: sendydash 3, cave 02. */
for (i = 0; i < 5; i++)
{
/* 0 immediately underflowed to 999, so we use 999. example: sendydash 3, cave 02. */
- cave->level_amoeba_time[i] = data[0]
==
0 ? 999 : data[0];
+ cave->level_amoeba_time[i] = data[0]
==
0 ? 999 : data[0];
cave->level_rand[i] = data[13 + i];
/* gate opening is checked AFTER adding to diamonds collected, so 0 here is 1000 needed */
cave->level_rand[i] = data[13 + i];
/* gate opening is checked AFTER adding to diamonds collected, so 0 here is 1000 needed */
- cave->level_diamonds[i] = data[8 + i]
==
0 ? 1000 : data[8 + i];
+ cave->level_diamonds[i] = data[8 + i]
==
0 ? 1000 : data[8 + i];
cave->level_time[i] = data[3 + i];
cave->level_magic_wall_time[i] = data[0];
}
cave->level_time[i] = data[3 + i];
cave->level_magic_wall_time[i] = data[0];
}
@@
-1231,7
+1231,7
@@
static int cave_copy_from_plck(GdCave *cave, const guint8 *data,
cave->map[cave->h - 1][x] = O_STEEL;
/*
cave->map[cave->h - 1][x] = O_STEEL;
/*
- if (steels && data[0]
==
0x55)
+ if (steels && data[0]
==
0x55)
cave->map[cave->h - 1][0] = cave->map[cave->h - 1][1] = O_STEEL;
*/
cave->map[cave->h - 1][0] = cave->map[cave->h - 1][1] = O_STEEL;
*/
@@
-2194,7
+2194,7
@@
static int cave_copy_from_crli(GdCave *cave, const guint8 *data, int remaining_b
}
cave->biter_delay_frame = uncompressed[0x394];
}
cave->biter_delay_frame = uncompressed[0x394];
- cave->magic_wall_stops_amoeba = uncompressed[0x395]
==
0; /* negated!! */
+ cave->magic_wall_stops_amoeba = uncompressed[0x395]
==
0; /* negated!! */
cave->bomb_explosion_effect = import(uncompressed[0x396], 0x396);
cave->explosion_effect = import(uncompressed[0x397], 0x397);
cave->stone_bouncing_effect = import(uncompressed[0x398], 0x398);
cave->bomb_explosion_effect = import(uncompressed[0x396], 0x396);
cave->explosion_effect = import(uncompressed[0x397], 0x397);
cave->stone_bouncing_effect = import(uncompressed[0x398], 0x398);
@@
-2320,7
+2320,7
@@
GList *gd_caveset_import_from_buffer (const guint8 *buf, gsize length)
}
format = gd_caveset_imported_get_format(buf);
}
format = gd_caveset_imported_get_format(buf);
- if (format
==
GD_FORMAT_UNKNOWN)
+ if (format
==
GD_FORMAT_UNKNOWN)
{
Warn("buffer does not contain a GDash datafile");
return NULL;
{
Warn("buffer does not contain a GDash datafile");
return NULL;
@@
-2496,7
+2496,7
@@
GList *gd_caveset_import_from_buffer (const guint8 *buf, gsize length)
/* use numbering instead of letters, if following formats or too many caves
(as we would run out of letters) */
/* use numbering instead of letters, if following formats or too many caves
(as we would run out of letters) */
- numbering = format == GD_FORMAT_PLC || format
==
GD_FORMAT_CRLI || g_list_length(caveset) > 26;
+ numbering = format == GD_FORMAT_PLC || format
==
GD_FORMAT_CRLI || g_list_length(caveset) > 26;
for (iter = caveset; iter != NULL; iter = iter->next)
{
for (iter = caveset; iter != NULL; iter = iter->next)
{
diff --git
a/src/game_bd/bd_cave.c
b/src/game_bd/bd_cave.c
index 2ffb071e365097f3b117888785b61a8c606bd91d..9e281798013e74526ca05b0938fc0e620d906de4 100644
(file)
--- a/
src/game_bd/bd_cave.c
+++ b/
src/game_bd/bd_cave.c
@@
-548,7
+548,7
@@
void gd_cave_free(GdCave *cave)
/* free GStrings */
for (i = 0; gd_cave_properties[i].identifier != NULL; i++)
/* free GStrings */
for (i = 0; gd_cave_properties[i].identifier != NULL; i++)
- if (gd_cave_properties[i].type
==
GD_TYPE_LONGSTRING)
+ if (gd_cave_properties[i].type
==
GD_TYPE_LONGSTRING)
g_string_free(G_STRUCT_MEMBER(GString *, cave, gd_cave_properties[i].offset), TRUE);
/* map */
g_string_free(G_STRUCT_MEMBER(GString *, cave, gd_cave_properties[i].offset), TRUE);
/* map */
@@
-596,7
+596,7
@@
void gd_cave_copy(GdCave *dest, const GdCave *src)
/* for longstrings */
for (i = 0; gd_cave_properties[i].identifier != NULL; i++)
/* for longstrings */
for (i = 0; gd_cave_properties[i].identifier != NULL; i++)
- if (gd_cave_properties[i].type
==
GD_TYPE_LONGSTRING)
+ if (gd_cave_properties[i].type
==
GD_TYPE_LONGSTRING)
G_STRUCT_MEMBER(GString *, dest, gd_cave_properties[i].offset) =
g_string_new(G_STRUCT_MEMBER(GString *, src, gd_cave_properties[i].offset)->str);
G_STRUCT_MEMBER(GString *, dest, gd_cave_properties[i].offset) =
g_string_new(G_STRUCT_MEMBER(GString *, src, gd_cave_properties[i].offset)->str);
@@
-879,9
+879,9
@@
void gd_cave_auto_shrink(GdCave *cave)
case O_INBOX:
/* shrink only lines, which have only ONE player or outbox.
this is for bd4 intermission 2, for example. */
case O_INBOX:
/* shrink only lines, which have only ONE player or outbox.
this is for bd4 intermission 2, for example. */
- if (empty
==
STEEL_OR_OTHER)
+ if (empty
==
STEEL_OR_OTHER)
empty = NO_SHRINK;
empty = NO_SHRINK;
- if (empty
==
STEEL_ONLY)
+ if (empty
==
STEEL_ONLY)
empty = STEEL_OR_OTHER;
break;
empty = STEEL_OR_OTHER;
break;
@@
-914,9
+914,9
@@
void gd_cave_auto_shrink(GdCave *cave)
case O_PRE_OUTBOX:
case O_PRE_INVIS_OUTBOX:
case O_INBOX:
case O_PRE_OUTBOX:
case O_PRE_INVIS_OUTBOX:
case O_INBOX:
- if (empty
==
STEEL_OR_OTHER)
+ if (empty
==
STEEL_OR_OTHER)
empty = NO_SHRINK;
empty = NO_SHRINK;
- if (empty
==
STEEL_ONLY)
+ if (empty
==
STEEL_ONLY)
empty = STEEL_OR_OTHER;
break;
empty = STEEL_OR_OTHER;
break;
@@
-951,9
+951,9
@@
void gd_cave_auto_shrink(GdCave *cave)
case O_PRE_OUTBOX:
case O_PRE_INVIS_OUTBOX:
case O_INBOX:
case O_PRE_OUTBOX:
case O_PRE_INVIS_OUTBOX:
case O_INBOX:
- if (empty
==
STEEL_OR_OTHER)
+ if (empty
==
STEEL_OR_OTHER)
empty = NO_SHRINK;
empty = NO_SHRINK;
- if (empty
==
STEEL_ONLY)
+ if (empty
==
STEEL_ONLY)
empty = STEEL_OR_OTHER;
break;
empty = STEEL_OR_OTHER;
break;
diff --git
a/src/game_bd/bd_cavedb.c
b/src/game_bd/bd_cavedb.c
index f8d4b878d0ea0b38c37ebc2204c55f684f470024..781deab58949ccc0d34508397ec6e9f727cf4009 100644
(file)
--- a/
src/game_bd/bd_cavedb.c
+++ b/
src/game_bd/bd_cavedb.c
@@
-994,7
+994,7
@@
void gd_cave_db_init(void)
gd_create_char_to_element_table();
g_print("Free characters: ");
for (i = 32; i < 128; i++)
gd_create_char_to_element_table();
g_print("Free characters: ");
for (i = 32; i < 128; i++)
- if (gd_char_to_element[i]
==
O_UNKNOWN)
+ if (gd_char_to_element[i]
==
O_UNKNOWN)
g_print("%c", i);
g_print("\n");
*/
g_print("%c", i);
g_print("\n");
*/
diff --git
a/src/game_bd/bd_caveengine.c
b/src/game_bd/bd_caveengine.c
index 3019aeca80dea04636e5379ab4978c992781eb56..ab4becd4ebc97e67cbcb62e154de81925f6a3a69 100644
(file)
--- a/
src/game_bd/bd_caveengine.c
+++ b/
src/game_bd/bd_caveengine.c
@@
-1347,10
+1347,10
@@
static boolean do_fall_try_magic(GdCave *cave, int x, int y,
{
play_sound_of_element(cave, O_DIAMOND, x, y); /* always play diamond sound */
{
play_sound_of_element(cave, O_DIAMOND, x, y); /* always play diamond sound */
- if (cave->magic_wall_state
==
GD_MW_DORMANT)
+ if (cave->magic_wall_state
==
GD_MW_DORMANT)
cave->magic_wall_state = GD_MW_ACTIVE;
cave->magic_wall_state = GD_MW_ACTIVE;
- if (cave->magic_wall_state
==
GD_MW_ACTIVE &&
+ if (cave->magic_wall_state
==
GD_MW_ACTIVE &&
is_space_dir(cave, x, y, GD_MV_TWICE+fall_dir))
{
/* if magic wall active and place underneath, it turns element
is_space_dir(cave, x, y, GD_MV_TWICE+fall_dir))
{
/* if magic wall active and place underneath, it turns element
@@
-1856,10
+1856,10
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
player_move parameter) */
/* only allow changing direction if the new dir is not diagonal */
if (cave->gravity_switch_active &&
player_move parameter) */
/* only allow changing direction if the new dir is not diagonal */
if (cave->gravity_switch_active &&
- (player_move
==
GD_MV_LEFT ||
- player_move
==
GD_MV_RIGHT ||
- player_move
==
GD_MV_UP ||
- player_move
==
GD_MV_DOWN))
+ (player_move
==
GD_MV_LEFT ||
+ player_move
==
GD_MV_RIGHT ||
+ player_move
==
GD_MV_UP ||
+ player_move
==
GD_MV_DOWN))
{
gd_sound_play(cave, GD_S_SWITCH_GRAVITY, what, x, y);
cave->gravity_will_change =
{
gd_sound_play(cave, GD_S_SWITCH_GRAVITY, what, x, y);
cave->gravity_will_change =
@@
-2636,7
+2636,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
/* is space over the bladder? */
if (is_space_dir(cave, x, y, opposite[grav_compat]))
{
/* is space over the bladder? */
if (is_space_dir(cave, x, y, opposite[grav_compat]))
{
- if (get(cave, x, y)
==
O_BLADDER_8)
+ if (get(cave, x, y)
==
O_BLADDER_8)
{
/* if it is a bladder 8, really move up */
move(cave, x, y, opposite[grav_compat], O_BLADDER_1);
{
/* if it is a bladder 8, really move up */
move(cave, x, y, opposite[grav_compat], O_BLADDER_1);
@@
-2754,7
+2754,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
}
/* if alive, check in which dir to grow (or not) */
}
/* if alive, check in which dir to grow (or not) */
- if (cave->amoeba_state
==
GD_AM_AWAKE)
+ if (cave->amoeba_state
==
GD_AM_AWAKE)
{
if (g_rand_int_range(cave->random, 0, 1000000) < cave->amoeba_growth_prob)
{
{
if (g_rand_int_range(cave->random, 0, 1000000) < cave->amoeba_growth_prob)
{
@@
-2918,8
+2918,8
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
if (((get(cave, x, y) == O_H_EXPANDING_WALL ||
get(cave, x, y) == O_H_EXPANDING_STEEL_WALL) &&
!cave->expanding_wall_changed) ||
if (((get(cave, x, y) == O_H_EXPANDING_WALL ||
get(cave, x, y) == O_H_EXPANDING_STEEL_WALL) &&
!cave->expanding_wall_changed) ||
- ((get(cave, x, y)
==
O_V_EXPANDING_WALL ||
- get(cave, x, y)
==
O_V_EXPANDING_STEEL_WALL) &&
+ ((get(cave, x, y)
==
O_V_EXPANDING_WALL ||
+ get(cave, x, y)
==
O_V_EXPANDING_STEEL_WALL) &&
cave->expanding_wall_changed))
{
if (is_space_dir(cave, x, y, GD_MV_LEFT))
cave->expanding_wall_changed))
{
if (is_space_dir(cave, x, y, GD_MV_LEFT))
@@
-3044,13
+3044,13
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
store_dir(cave, x, y, oppos, O_BLADDER_1);
play_sound_of_element(cave, O_SLIME, x, y);
}
store_dir(cave, x, y, oppos, O_BLADDER_1);
play_sound_of_element(cave, O_SLIME, x, y);
}
- else if (get_dir(cave, x, y, grav)
==
O_FLYING_STONE)
+ else if (get_dir(cave, x, y, grav)
==
O_FLYING_STONE)
{
store_dir(cave, x, y, grav, O_SPACE);
store_dir(cave, x, y, oppos, O_FLYING_STONE_F);
play_sound_of_element(cave, O_SLIME, x, y);
}
{
store_dir(cave, x, y, grav, O_SPACE);
store_dir(cave, x, y, oppos, O_FLYING_STONE_F);
play_sound_of_element(cave, O_SLIME, x, y);
}
- else if (get_dir(cave, x, y, grav)
==
O_FLYING_DIAMOND)
+ else if (get_dir(cave, x, y, grav)
==
O_FLYING_DIAMOND)
{
store_dir(cave, x, y, grav, O_SPACE);
store_dir(cave, x, y, oppos, O_FLYING_DIAMOND_F);
{
store_dir(cave, x, y, grav, O_SPACE);
store_dir(cave, x, y, oppos, O_FLYING_DIAMOND_F);
@@
-3367,7
+3367,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
/* this loop finds the coordinates of the player. needed for scrolling and chasing stone.*/
/* but we only do this, if a living player was found. if not yet, the setup
routine coordinates are used */
/* this loop finds the coordinates of the player. needed for scrolling and chasing stone.*/
/* but we only do this, if a living player was found. if not yet, the setup
routine coordinates are used */
- if (cave->player_state
==
GD_PL_LIVING)
+ if (cave->player_state
==
GD_PL_LIVING)
{
if (cave->active_is_first_found)
{
{
if (cave->active_is_first_found)
{
diff --git
a/src/game_bd/bd_caveobject.c
b/src/game_bd/bd_caveobject.c
index 69e886171db50893cd98671b1e8bd90557a4a1ed..dc105cdad01f6802a16b9c9fd76cd050e6ab8cf9 100644
(file)
--- a/
src/game_bd/bd_caveobject.c
+++ b/
src/game_bd/bd_caveobject.c
@@
-1318,7
+1318,7
@@
static void draw_random_fill(GdCave *cave, const GdObject *object, int level)
if (randm < object->random_fill_probability[3])
element = object->random_fill[3];
if (randm < object->random_fill_probability[3])
element = object->random_fill[3];
- if (object->element
==
O_NONE ||
+ if (object->element
==
O_NONE ||
gd_cave_get_rc(cave, x, y) == object->element)
gd_cave_store_rc(cave, x, y, element, object);
}
gd_cave_get_rc(cave, x, y) == object->element)
gd_cave_store_rc(cave, x, y, element, object);
}
diff --git
a/src/game_mm/mm_game.c
b/src/game_mm/mm_game.c
index fd3cf9ff973258a62a2338032309704addae8fb0..20592f1b25b268e4603d002773cd71a4cd2b0724 100644
(file)
--- a/
src/game_mm/mm_game.c
+++ b/
src/game_mm/mm_game.c
@@
-1624,7
+1624,7
@@
void DrawLaser(int start_edge, int mode)
continue;
#if 0
continue;
#if 0
- Debug("game:mm:DrawLaser", "DL_LASER_ENABLED: i
==
%d: %d, %d",
+ Debug("game:mm:DrawLaser", "DL_LASER_ENABLED: i
==
%d: %d, %d",
i, laser.beamer_edge[i], tmp_start_edge);
#endif
i, laser.beamer_edge[i], tmp_start_edge);
#endif
diff --git
a/src/game_mm/mm_tools.c
b/src/game_mm/mm_tools.c
index 12ca83cee8e22041ee608e659ad1f106c5d1ac3a..3deac03390bad2d1a6e2fa3c6fa99648817320b1 100644
(file)
--- a/
src/game_mm/mm_tools.c
+++ b/
src/game_mm/mm_tools.c
@@
-165,35
+165,35
@@
void DrawGraphicShifted_MM(int x, int y, int dx, int dy, int graphic,
return;
}
return;
}
- if (dx || dy) // Verschiebung der Grafik?
+ if (dx || dy)
// Verschiebung der Grafik?
{
{
- if (x < BX1) // Element kommt von links ins Bild
+ if (x < BX1)
// Element kommt von links ins Bild
{
x = BX1;
width = dx;
cx = TILEX - dx;
dx = 0;
}
{
x = BX1;
width = dx;
cx = TILEX - dx;
dx = 0;
}
- else if (x > BX2) // Element kommt von rechts ins Bild
+ else if (x > BX2)
// Element kommt von rechts ins Bild
{
x = BX2;
width = -dx;
dx = TILEX + dx;
}
{
x = BX2;
width = -dx;
dx = TILEX + dx;
}
- else if (x
==BX1 && dx < 0)
// Element verläßt links das Bild
+ else if (x
== BX1 && dx < 0)
// Element verläßt links das Bild
{
width += dx;
cx = -dx;
dx = 0;
}
{
width += dx;
cx = -dx;
dx = 0;
}
- else if (x
==BX2 && dx > 0)
// Element verläßt rechts das Bild
+ else if (x
== BX2 && dx > 0)
// Element verläßt rechts das Bild
width -= dx;
width -= dx;
- else if (dx) // allg. Bewegung in x-Richtung
+ else if (dx)
// allg. Bewegung in x-Richtung
MarkTileDirty(x + SIGN(dx), y);
MarkTileDirty(x + SIGN(dx), y);
- if (y < BY1) // Element kommt von oben ins Bild
+ if (y < BY1)
// Element kommt von oben ins Bild
{
{
- if (cut_mode
==CUT_BELOW)
// Element oberhalb des Bildes
+ if (cut_mode
== CUT_BELOW)
// Element oberhalb des Bildes
return;
y = BY1;
return;
y = BY1;
@@
-201,13
+201,13
@@
void DrawGraphicShifted_MM(int x, int y, int dx, int dy, int graphic,
cy = TILEY - dy;
dy = 0;
}
cy = TILEY - dy;
dy = 0;
}
- else if (y > BY2) // Element kommt von unten ins Bild
+ else if (y > BY2)
// Element kommt von unten ins Bild
{
y = BY2;
height = -dy;
dy = TILEY + dy;
}
{
y = BY2;
height = -dy;
dy = TILEY + dy;
}
- else if (y
==BY1 && dy < 0)
// Element verläßt oben das Bild
+ else if (y
== BY1 && dy < 0)
// Element verläßt oben das Bild
{
height += dy;
cy = -dy;
{
height += dy;
cy = -dy;
@@
-215,19
+215,19
@@
void DrawGraphicShifted_MM(int x, int y, int dx, int dy, int graphic,
}
else if (dy > 0 && cut_mode == CUT_ABOVE)
{
}
else if (dy > 0 && cut_mode == CUT_ABOVE)
{
- if (y == BY2) // Element unterhalb des Bildes
+ if (y == BY2)
// Element unterhalb des Bildes
return;
height = dy;
cy = TILEY - dy;
dy = TILEY;
MarkTileDirty(x, y + 1);
return;
height = dy;
cy = TILEY - dy;
dy = TILEY;
MarkTileDirty(x, y + 1);
- } // Element verläßt unten das Bild
+ }
// Element verläßt unten das Bild
else if (dy > 0 && (y == BY2 || cut_mode == CUT_BELOW))
{
height -= dy;
}
else if (dy > 0 && (y == BY2 || cut_mode == CUT_BELOW))
{
height -= dy;
}
- else if (dy) // allg. Bewegung in y-Richtung
+ else if (dy)
// allg. Bewegung in y-Richtung
{
MarkTileDirty(x, y + SIGN(dy));
}
{
MarkTileDirty(x, y + SIGN(dy));
}