projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
eea88cc
)
white space changes
author
Holger Schemel
<info@artsoft.org>
Thu, 15 Feb 2024 20:05:05 +0000
(21:05 +0100)
committer
Holger Schemel
<info@artsoft.org>
Sun, 18 Feb 2024 15:16:59 +0000
(16:16 +0100)
src/game_bd/bd_c64import.c
patch
|
blob
|
history
src/game_bd/bd_cave.h
patch
|
blob
|
history
src/game_bd/bd_caveengine.c
patch
|
blob
|
history
src/game_bd/bd_caveobject.c
patch
|
blob
|
history
src/game_bd/bd_elements.h
patch
|
blob
|
history
diff --git
a/src/game_bd/bd_c64import.c
b/src/game_bd/bd_c64import.c
index 40764a4baef6ba1e5d634193c59b9f11854444df..36e2dc080d0cdaa3aa6b7f5f808776a15bfaa108 100644
(file)
--- a/
src/game_bd/bd_c64import.c
+++ b/
src/game_bd/bd_c64import.c
@@
-698,7
+698,7
@@
static int cave_copy_from_bd1(GdCave *cave, const guint8 *data, int remaining_by
}
else
{
}
else
{
- /* object is code
&
3f, object type is upper 2 bits */
+ /* object is code
&
3f, object type is upper 2 bits */
elem = import_func(code & 0x3F, index);
switch ((code >> 6) & 3)
elem = import_func(code & 0x3F, index);
switch ((code >> 6) & 3)
@@
-2138,14
+2138,14
@@
static int cave_copy_from_crli(GdCave *cave, const guint8 *data, int remaining_b
if (uncompressed[0x380])
cave->creatures_direction_auto_change_time = uncompressed[0x381];
if (uncompressed[0x380])
cave->creatures_direction_auto_change_time = uncompressed[0x381];
- cave->colorb = gd_c64_color(uncompressed[0x384]
&
0xf); /* border */
- cave->color0 = gd_c64_color(uncompressed[0x385]
&
0xf);
- cave->color1 = gd_c64_color(uncompressed[0x386]
&
0xf);
- cave->color2 = gd_c64_color(uncompressed[0x387]
&
0xf);
- cave->color3 = gd_c64_color(uncompressed[0x388]
&0x7);
/* lower 3 bits only! */
+ cave->colorb = gd_c64_color(uncompressed[0x384]
&
0xf); /* border */
+ cave->color0 = gd_c64_color(uncompressed[0x385]
&
0xf);
+ cave->color1 = gd_c64_color(uncompressed[0x386]
&
0xf);
+ cave->color2 = gd_c64_color(uncompressed[0x387]
&
0xf);
+ cave->color3 = gd_c64_color(uncompressed[0x388]
& 0x7);
/* lower 3 bits only! */
cave->color4 = cave->color3;
cave->color5 = cave->color1;
cave->color4 = cave->color3;
cave->color5 = cave->color1;
- cave->intermission = uncompressed[0x389]
!=
0;
+ cave->intermission = uncompressed[0x389]
!=
0;
/* if it is intermission but not scrollable */
if (cave->intermission && !uncompressed[0x38c])
/* if it is intermission but not scrollable */
if (cave->intermission && !uncompressed[0x38c])
diff --git
a/src/game_bd/bd_cave.h
b/src/game_bd/bd_cave.h
index 1255e5414685c8893908fdacbdc72211a2497946..189e2777d69687375c72e2a86bd283d57050f359 100644
(file)
--- a/
src/game_bd/bd_cave.h
+++ b/
src/game_bd/bd_cave.h
@@
-253,7
+253,7
@@
typedef enum _direction
GD_MV_LEFT = 7,
GD_MV_UP_LEFT = 8,
GD_MV_LEFT = 7,
GD_MV_UP_LEFT = 8,
- /* to be able to type GD_MV_TWICE
+
GD_MV_DOWN, for example */
+ /* to be able to type GD_MV_TWICE
+
GD_MV_DOWN, for example */
GD_MV_TWICE = 8,
/* directions * 2 */
GD_MV_TWICE = 8,
/* directions * 2 */
diff --git
a/src/game_bd/bd_caveengine.c
b/src/game_bd/bd_caveengine.c
index 1fe5b2b017c8dee40e53d71d888736ed05e6f954..d33222e0ffb330846331d899edd0b07cc9a12b43 100644
(file)
--- a/
src/game_bd/bd_caveengine.c
+++ b/
src/game_bd/bd_caveengine.c
@@
-489,7
+489,7
@@
static inline boolean is_element_dir(const GdCave *cave, const int x, const int
static inline boolean is_space_dir(const GdCave *cave, const int x, const int y,
const GdDirection dir)
{
static inline boolean is_space_dir(const GdCave *cave, const int x, const int y,
const GdDirection dir)
{
- GdElement e = get_dir(cave, x, y, dir)
&
O_MASK;
+ GdElement e = get_dir(cave, x, y, dir)
&
O_MASK;
return (e == O_SPACE || e == O_LAVA);
}
return (e == O_SPACE || e == O_LAVA);
}
@@
-519,7
+519,7
@@
static inline void store_sc(GdCave *cave, const int x, const int y, const GdElem
static inline void store_dir(GdCave *cave, const int x, const int y,
const GdDirection dir, const GdElement element)
{
static inline void store_dir(GdCave *cave, const int x, const int y,
const GdDirection dir, const GdElement element)
{
- store(cave, x + gd_dx[dir], y + gd_dy[dir], element
|
SCANNED);
+ store(cave, x + gd_dx[dir], y + gd_dy[dir], element
|
SCANNED);
}
/* store an element to a neighbouring cell */
}
/* store an element to a neighbouring cell */
@@
-1600,7
+1600,7
@@
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
{
/* if we find a scanned element, change it to the normal one, and that's all. */
/* this is required, for example for chasing stones, which have moved, always passing slime! */
{
/* if we find a scanned element, change it to the normal one, and that's all. */
/* this is required, for example for chasing stones, which have moved, always passing slime! */
- if (get(cave, x, y)
&
SCANNED)
+ if (get(cave, x, y)
&
SCANNED)
{
store(cave, x, y, get(cave, x, y) & ~SCANNED);
{
store(cave, x, y, get(cave, x, y) & ~SCANNED);
diff --git
a/src/game_bd/bd_caveobject.c
b/src/game_bd/bd_caveobject.c
index 254f373db3161b596963a956a833d7635e505207..750543d2c5ab24007dfb83cff797a606f960f370 100644
(file)
--- a/
src/game_bd/bd_caveobject.c
+++ b/
src/game_bd/bd_caveobject.c
@@
-1277,7
+1277,7
@@
static void draw_random_fill(GdCave *cave, const GdObject *object, int level)
rand = g_rand_new_with_seed(seed);
/* for c64 random, use the 2*8 lsb. */
rand = g_rand_new_with_seed(seed);
/* for c64 random, use the 2*8 lsb. */
- gd_c64_random_set_seed(&c64_rand, seed
/256%256, seed%
256);
+ gd_c64_random_set_seed(&c64_rand, seed
/ 256 % 256, seed %
256);
/* change coordinates if not in correct order */
if (y1 > y2)
/* change coordinates if not in correct order */
if (y1 > y2)
diff --git
a/src/game_bd/bd_elements.h
b/src/game_bd/bd_elements.h
index 8d670430010ff06fb12f595f3deef766b87f939b..875841707e0d69bfe501b78f0cd8fa7f91f7b275 100644
(file)
--- a/
src/game_bd/bd_elements.h
+++ b/
src/game_bd/bd_elements.h
@@
-306,8
+306,8
@@
typedef enum _element
O_MAX_ALL,
O_MAX_ALL,
- SCANNED
=
0x100,
- COVERED
=
0x200,
+ SCANNED
=
0x100,
+ COVERED
=
0x200,
/* binary AND this to elements to get rid of properties above. */
O_MASK = ~(SCANNED | COVERED)
/* binary AND this to elements to get rid of properties above. */
O_MASK = ~(SCANNED | COVERED)