projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20031104-1-src
[rocksndiamonds.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index 309f1ec97db488f9fd2f13ed69044e51ea4f2b18..c90105062b2608d3002666895e2f1453fcdbae93 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-44,6
+44,7
@@
short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short ChangePage[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
@@
-52,7
+53,8
@@
boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
boolean Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
unsigned long Changed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
unsigned long ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
boolean Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
unsigned long Changed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
unsigned long ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short AmoebaCnt[MAX_NUM_AMOEBA];
short AmoebaCnt2[MAX_NUM_AMOEBA];
short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short AmoebaCnt[MAX_NUM_AMOEBA];
short AmoebaCnt2[MAX_NUM_AMOEBA];
@@
-62,9
+64,10
@@
short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
unsigned long Properties[MAX_NUM_ELEMENTS][NUM_EP_BITFIELDS];
int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
unsigned long Properties[MAX_NUM_ELEMENTS][NUM_EP_BITFIELDS];
int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int lev_fieldx, lev_fieldy;
int scroll_x, scroll_y;
int lev_fieldx, lev_fieldy;
int scroll_x, scroll_y;
@@
-161,12
+164,12
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
{
"bug",
"bug",
{
"bug",
"bug",
- "bug"
+ "bug
(random start direction)
"
},
{
"spaceship",
"spaceship",
},
{
"spaceship",
"spaceship",
- "spaceship"
+ "spaceship
(random start direction)
"
},
{
"yamyam",
},
{
"yamyam",
@@
-254,7
+257,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"biomaze"
},
{
"biomaze"
},
{
- "dynamite
_
active",
+ "dynamite
.
active",
"dynamite",
"burning dynamite"
},
"dynamite",
"burning dynamite"
},
@@
-269,7
+272,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"magic wheel"
},
{
"magic wheel"
},
{
- "robot_wheel
_
active",
+ "robot_wheel
.
active",
"robot_wheel",
"magic wheel (running)"
},
"robot_wheel",
"magic wheel (running)"
},
@@
-338,7
+341,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
{
"pacman",
"pacman",
{
"pacman",
"pacman",
- "pac man"
+ "pac man
(random start direction)
"
},
{
"invisible_wall",
},
{
"invisible_wall",
@@
-351,7
+354,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"lamp (off)"
},
{
"lamp (off)"
},
{
- "lamp
_
active",
+ "lamp
.
active",
"lamp",
"lamp (on)"
},
"lamp",
"lamp (on)"
},
@@
-461,51
+464,51
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"sokoban field with object"
},
{
"sokoban field with object"
},
{
- "bd_butterfly
_
right",
+ "bd_butterfly
.
right",
"bd_butterfly",
"butterfly (starts moving right)"},
{
"bd_butterfly",
"butterfly (starts moving right)"},
{
- "bd_butterfly
_
up",
+ "bd_butterfly
.
up",
"bd_butterfly",
"butterfly (starts moving up)"
},
{
"bd_butterfly",
"butterfly (starts moving up)"
},
{
- "bd_butterfly
_
left",
+ "bd_butterfly
.
left",
"bd_butterfly",
"butterfly (starts moving left)"},
{
"bd_butterfly",
"butterfly (starts moving left)"},
{
- "bd_butterfly
_
down",
+ "bd_butterfly
.
down",
"bd_butterfly",
"butterfly (starts moving down)"},
{
"bd_butterfly",
"butterfly (starts moving down)"},
{
- "bd_firefly
_
right",
+ "bd_firefly
.
right",
"bd_firefly",
"firefly (starts moving right)"
},
{
"bd_firefly",
"firefly (starts moving right)"
},
{
- "bd_firefly
_
up",
+ "bd_firefly
.
up",
"bd_firefly",
"firefly (starts moving up)"
},
{
"bd_firefly",
"firefly (starts moving up)"
},
{
- "bd_firefly
_
left",
+ "bd_firefly
.
left",
"bd_firefly",
"firefly (starts moving left)"
},
{
"bd_firefly",
"firefly (starts moving left)"
},
{
- "bd_firefly
_
down",
+ "bd_firefly
.
down",
"bd_firefly",
"firefly (starts moving down)"
},
{
"bd_butterfly",
"bd_butterfly",
"bd_firefly",
"firefly (starts moving down)"
},
{
"bd_butterfly",
"bd_butterfly",
- "butterfly"
+ "butterfly
(random start direction)
"
},
{
"bd_firefly",
"bd_firefly",
},
{
"bd_firefly",
"bd_firefly",
- "firefly"
+ "firefly
(random start direction)
"
},
{
"player_1",
},
{
"player_1",
@@
-528,59
+531,59
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"blue player"
},
{
"blue player"
},
{
- "bug
_
right",
+ "bug
.
right",
"bug",
"bug (starts moving right)"
},
{
"bug",
"bug (starts moving right)"
},
{
- "bug
_
up",
+ "bug
.
up",
"bug",
"bug (starts moving up)"
},
{
"bug",
"bug (starts moving up)"
},
{
- "bug
_
left",
+ "bug
.
left",
"bug",
"bug (starts moving left)"
},
{
"bug",
"bug (starts moving left)"
},
{
- "bug
_
down",
+ "bug
.
down",
"bug",
"bug (starts moving down)"
},
{
"bug",
"bug (starts moving down)"
},
{
- "spaceship
_
right",
+ "spaceship
.
right",
"spaceship",
"spaceship (starts moving right)"},
{
"spaceship",
"spaceship (starts moving right)"},
{
- "spaceship
_
up",
+ "spaceship
.
up",
"spaceship",
"spaceship (starts moving up)"
},
{
"spaceship",
"spaceship (starts moving up)"
},
{
- "spaceship
_
left",
+ "spaceship
.
left",
"spaceship",
"spaceship (starts moving left)"},
{
"spaceship",
"spaceship (starts moving left)"},
{
- "spaceship
_
down",
+ "spaceship
.
down",
"spaceship",
"spaceship (starts moving down)"},
{
"spaceship",
"spaceship (starts moving down)"},
{
- "pacman
_
right",
+ "pacman
.
right",
"pacman",
"pac man (starts moving right)"
},
{
"pacman",
"pac man (starts moving right)"
},
{
- "pacman
_
up",
+ "pacman
.
up",
"pacman",
"pac man (starts moving up)"
},
{
"pacman",
"pac man (starts moving up)"
},
{
- "pacman
_
left",
+ "pacman
.
left",
"pacman",
"pac man (starts moving left)"
},
{
"pacman",
"pac man (starts moving left)"
},
{
- "pacman
_
down",
+ "pacman
.
down",
"pacman",
"pac man (starts moving down)"
},
"pacman",
"pac man (starts moving down)"
},
@@
-657,7
+660,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
{
"mole",
"mole",
{
"mole",
"mole",
- "mole"
+ "mole
(random start direction)
"
},
{
"penguin",
},
{
"penguin",
@@
-1595,7
+1598,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"light switch (off)"
},
{
"light switch (off)"
},
{
- "light_switch
_
active",
+ "light_switch
.
active",
"light_switch",
"light switch (on)"
},
"light_switch",
"light switch (on)"
},
@@
-1660,22
+1663,22
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"sign (other)"
},
{
"sign (other)"
},
{
- "mole
_
left",
+ "mole
.
left",
"mole",
"mole (starts moving left)"
},
{
"mole",
"mole (starts moving left)"
},
{
- "mole
_
right",
+ "mole
.
right",
"mole",
"mole (starts moving right)"
},
{
"mole",
"mole (starts moving right)"
},
{
- "mole
_
up",
+ "mole
.
up",
"mole",
"mole (starts moving up)"
},
{
"mole",
"mole (starts moving up)"
},
{
- "mole
_
down",
+ "mole
.
down",
"mole",
"mole (starts moving down)"
},
"mole",
"mole (starts moving down)"
},
@@
-1725,7
+1728,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"time gate (closed)"
},
{
"time gate (closed)"
},
{
- "timegate_switch
_
active",
+ "timegate_switch
.
active",
"timegate_switch",
"switch for time gate"
},
"timegate_switch",
"switch for time gate"
},
@@
-3230,162
+3233,172
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
/* ----------------------------------------------------------------------- */
{
/* ----------------------------------------------------------------------- */
{
- "dynabomb_player_1
_
active",
+ "dynabomb_player_1
.
active",
"dynabomb",
"-"
},
{
"dynabomb",
"-"
},
{
- "dynabomb_player_2
_
active",
+ "dynabomb_player_2
.
active",
"dynabomb",
"-"
},
{
"dynabomb",
"-"
},
{
- "dynabomb_player_3
_
active",
+ "dynabomb_player_3
.
active",
"dynabomb",
"-"
},
{
"dynabomb",
"-"
},
{
- "dynabomb_player_4
_
active",
+ "dynabomb_player_4
.
active",
"dynabomb",
"-"
},
{
"dynabomb",
"-"
},
{
- "sp_disk_red
_
active",
+ "sp_disk_red
.
active",
"dynamite",
"-"
},
{
"dynamite",
"-"
},
{
- "switchgate
_
opening",
+ "switchgate
.
opening",
"switchgate",
"-"
},
{
"switchgate",
"-"
},
{
- "switchgate
_
closing",
+ "switchgate
.
closing",
"switchgate",
"-"
},
{
"switchgate",
"-"
},
{
- "timegate
_
opening",
+ "timegate
.
opening",
"timegate",
"-"
},
{
"timegate",
"-"
},
{
- "timegate
_
closing",
+ "timegate
.
closing",
"timegate",
"-"
},
{
"timegate",
"-"
},
{
- "pearl
_
breaking",
+ "pearl
.
breaking",
"pearl",
"-"
},
{
"pearl",
"-"
},
{
- "trap
_
active",
+ "trap
.
active",
"trap",
"-"
},
{
"trap",
"-"
},
{
- "invisible_steelwall
_
active",
+ "invisible_steelwall
.
active",
"wall",
"-"
},
{
"wall",
"-"
},
{
- "invisible_wall
_
active",
+ "invisible_wall
.
active",
"wall",
"-"
},
{
"wall",
"-"
},
{
- "invisible_sand
_
active",
+ "invisible_sand
.
active",
"sand",
"-"
},
{
"sand",
"-"
},
{
- "conveyor_belt_1_left
_
active",
+ "conveyor_belt_1_left
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_1_middle
_
active",
+ "conveyor_belt_1_middle
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_1_right
_
active",
+ "conveyor_belt_1_right
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_2_left
_
active",
+ "conveyor_belt_2_left
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_2_middle
_
active",
+ "conveyor_belt_2_middle
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_2_right
_
active",
+ "conveyor_belt_2_right
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_3_left
_
active",
+ "conveyor_belt_3_left
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_3_middle
_
active",
+ "conveyor_belt_3_middle
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_3_right
_
active",
+ "conveyor_belt_3_right
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_4_left
_
active",
+ "conveyor_belt_4_left
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_4_middle
_
active",
+ "conveyor_belt_4_middle
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "conveyor_belt_4_right
_
active",
+ "conveyor_belt_4_right
.
active",
"conveyor_belt",
"-"
},
{
"conveyor_belt",
"-"
},
{
- "exit
_
opening",
+ "exit
.
opening",
"exit",
"-"
},
{
"exit",
"-"
},
{
- "exit
_
closing",
+ "exit
.
closing",
"exit",
"-"
},
"exit",
"-"
},
+ {
+ "sp_exit.opening",
+ "sp_exit",
+ "-"
+ },
+ {
+ "sp_exit.closing",
+ "sp_exit",
+ "-"
+ },
{
"sp_exit_open",
"sp_exit",
"-"
},
{
{
"sp_exit_open",
"sp_exit",
"-"
},
{
- "sp_terminal
_
active",
+ "sp_terminal
.
active",
"sp_terminal",
"-"
},
{
"sp_terminal",
"-"
},
{
- "sp_buggy_base
_
activating",
+ "sp_buggy_base
.
activating",
"sp_buggy_base",
"-"
},
{
"sp_buggy_base",
"-"
},
{
- "sp_buggy_base
_
active",
+ "sp_buggy_base
.
active",
"sp_buggy_base",
"-"
},
"sp_buggy_base",
"-"
},
@@
-3395,22
+3408,22
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"-"
},
{
"-"
},
{
- "amoeba
_
dropping",
+ "amoeba
.
dropping",
"amoeba",
"-"
},
{
"amoeba",
"-"
},
{
- "quicksand
_
emptying",
+ "quicksand
.
emptying",
"quicksand",
"-"
},
{
"quicksand",
"-"
},
{
- "magic_wall
_
active",
+ "magic_wall
.
active",
"magic_wall",
"-"
},
{
"magic_wall",
"-"
},
{
- "bd_magic_wall
_
active",
+ "bd_magic_wall
.
active",
"magic_wall",
"-"
},
"magic_wall",
"-"
},
@@
-3425,12
+3438,12
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"-"
},
{
"-"
},
{
- "magic_wall
_
emptying",
+ "magic_wall
.
emptying",
"magic_wall",
"-"
},
{
"magic_wall",
"-"
},
{
- "bd_magic_wall
_
emptying",
+ "bd_magic_wall
.
emptying",
"magic_wall",
"-"
},
"magic_wall",
"-"
},
@@
-3490,7
+3503,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"-"
},
{
"-"
},
{
- "expandable_wall
_
growing",
+ "expandable_wall
.
growing",
"-",
"-"
},
"-",
"-"
},
@@
-3505,17
+3518,17
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"-"
},
{
"-"
},
{
- "quicksand
_
filling",
+ "quicksand
.
filling",
"quicksand",
"-"
},
{
"quicksand",
"-"
},
{
- "magic_wall
_
filling",
+ "magic_wall
.
filling",
"-",
"-"
},
{
"-",
"-"
},
{
- "bd_magic_wall
_
filling",
+ "bd_magic_wall
.
filling",
"-",
"-"
},
"-",
"-"
},
@@
-3590,7
+3603,7
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"-"
},
{
"-"
},
{
- "dynabomb
_
active",
+ "dynabomb
.
active",
"-",
"-"
},
"-",
"-"
},
@@
-3615,12
+3628,12
@@
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
"-"
},
{
"-"
},
{
- "shield_normal
_
active",
+ "shield_normal
.
active",
"-",
"-"
},
{
"-",
"-"
},
{
- "shield_deadly
_
active",
+ "shield_deadly
.
active",
"-",
"-"
},
"-",
"-"
},
@@
-3687,6
+3700,10
@@
struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
{ ".changing", ACTION_CHANGING, FALSE },
{ ".exploding", ACTION_EXPLODING, FALSE },
{ ".dying", ACTION_DYING, FALSE },
{ ".changing", ACTION_CHANGING, FALSE },
{ ".exploding", ACTION_EXPLODING, FALSE },
{ ".dying", ACTION_DYING, FALSE },
+ { ".xxx_left", ACTION_XXX_LEFT, FALSE },
+ { ".xxx_right", ACTION_XXX_RIGHT, FALSE },
+ { ".xxx_up", ACTION_XXX_UP, FALSE },
+ { ".xxx_down", ACTION_XXX_DOWN, FALSE },
{ ".other", ACTION_OTHER, FALSE },
/* empty suffix always matches -- check as last entry in InitSoundInfo() */
{ ".other", ACTION_OTHER, FALSE },
/* empty suffix always matches -- check as last entry in InitSoundInfo() */
@@
-3783,6
+3800,10
@@
struct FontInfo font_info[NUM_FONTS + 1] =
{ "font.text_2" },
{ "font.text_3" },
{ "font.text_4" },
{ "font.text_2" },
{ "font.text_3" },
{ "font.text_4" },
+ { "font.envelope_1" },
+ { "font.envelope_2" },
+ { "font.envelope_3" },
+ { "font.envelope_4" },
{ "font.input_1.active" },
{ "font.input_2.active" },
{ "font.input_1" },
{ "font.input_1.active" },
{ "font.input_2.active" },
{ "font.input_1" },