projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd18ece
)
rnd-19990211-1
author
Holger Schemel
<info@artsoft.org>
Wed, 10 Feb 1999 23:18:08 +0000
(
00:18
+0100)
committer
Holger Schemel
<info@artsoft.org>
Sat, 30 Aug 2014 08:33:34 +0000
(10:33 +0200)
src/main.h
patch
|
blob
|
history
src/tools.c
patch
|
blob
|
history
diff --git
a/src/main.h
b/src/main.h
index 3f73b76cf513a6d914dd145d23104020026a017d..d9ff3664d5bcea3942f41ec4c56af620f03fd521 100644
(file)
--- a/
src/main.h
+++ b/
src/main.h
@@
-1055,7
+1055,9
@@
extern char *element_info[];
/* graphics from "RocksMore" */
#define GFX_SP_EMPTY (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 0)
/* graphics from "RocksMore" */
#define GFX_SP_EMPTY (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 0)
+/*
#define GFX_SP_ZONK (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 1)
#define GFX_SP_ZONK (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 1)
+*/
#define GFX_SP_BASE (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 2)
#define GFX_SP_MURPHY (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 3)
#define GFX_SP_INFOTRON (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 4)
#define GFX_SP_BASE (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 2)
#define GFX_SP_MURPHY (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 3)
#define GFX_SP_INFOTRON (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 4)
@@
-1097,6
+1099,7
@@
extern char *element_info[];
#define GFX_INVISIBLE_STEEL (GFX_START_ROCKSMORE + 5 * MORE_PER_LINE + 3)
#define GFX_UNSICHTBAR (GFX_START_ROCKSMORE + 5 * MORE_PER_LINE + 7)
#define GFX_INVISIBLE_STEEL (GFX_START_ROCKSMORE + 5 * MORE_PER_LINE + 3)
#define GFX_UNSICHTBAR (GFX_START_ROCKSMORE + 5 * MORE_PER_LINE + 7)
+#define GFX_SP_ZONK (GFX_START_ROCKSMORE + 6 * MORE_PER_LINE + 0)
#define GFX_MURPHY_GO_LEFT (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 8)
#define GFX_MURPHY_ANY_LEFT (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 9)
#define GFX_MURPHY_GO_LEFT (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 8)
#define GFX_MURPHY_ANY_LEFT (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 9)
@@
-1121,7
+1124,6
@@
extern char *element_info[];
#define GFX2_SP_ELECTRON (GFX_START_ROCKSMORE + 10 * MORE_PER_LINE + 8)
#define GFX2_SP_TERMINAL (GFX_START_ROCKSMORE + 11 * MORE_PER_LINE + 8)
#define GFX2_SP_TERMINAL_ACTIVE (GFX_START_ROCKSMORE + 12 * MORE_PER_LINE + 8)
#define GFX2_SP_ELECTRON (GFX_START_ROCKSMORE + 10 * MORE_PER_LINE + 8)
#define GFX2_SP_TERMINAL (GFX_START_ROCKSMORE + 11 * MORE_PER_LINE + 8)
#define GFX2_SP_TERMINAL_ACTIVE (GFX_START_ROCKSMORE + 12 * MORE_PER_LINE + 8)
-#define GFX2_SP_ZONK (GFX_START_ROCKSMORE + 13 * MORE_PER_LINE + 8)
/* graphics from "RocksFont" */
#define GFX_CHAR_START (GFX_START_ROCKSFONT)
/* graphics from "RocksFont" */
#define GFX_CHAR_START (GFX_START_ROCKSFONT)
diff --git
a/src/tools.c
b/src/tools.c
index 211a96c4c60cd04dd0b4c191c4ea80860fedf2f7..56f7de4b48eb3ec2738eedefd7fd5b88d9fa0151 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-553,15
+553,15
@@
void DrawPlayer(struct PlayerInfo *player)
else if (action_moving)
{
if (player->MovDir == MV_LEFT)
else if (action_moving)
{
if (player->MovDir == MV_LEFT)
- graphic = GFX_MURPHY_
ANY
_LEFT;
+ graphic = GFX_MURPHY_
GO
_LEFT;
else if (player->MovDir == MV_RIGHT)
else if (player->MovDir == MV_RIGHT)
- graphic = GFX_MURPHY_
ANY
_RIGHT;
+ graphic = GFX_MURPHY_
GO
_RIGHT;
else if (player->MovDir & (MV_UP | MV_DOWN) && last_dir == MV_LEFT)
else if (player->MovDir & (MV_UP | MV_DOWN) && last_dir == MV_LEFT)
- graphic = GFX_MURPHY_
ANY
_LEFT;
+ graphic = GFX_MURPHY_
GO
_LEFT;
else if (player->MovDir & (MV_UP | MV_DOWN) && last_dir == MV_RIGHT)
else if (player->MovDir & (MV_UP | MV_DOWN) && last_dir == MV_RIGHT)
- graphic = GFX_MURPHY_
ANY
_RIGHT;
+ graphic = GFX_MURPHY_
GO
_RIGHT;
- graphic
-= getGraphicAnimationPhase(2, 4, ANIM_NORMAL
);
+ graphic
+= getGraphicAnimationPhase(3, 2, ANIM_OSCILLATE
);
}
if (player->MovDir == MV_LEFT || player->MovDir == MV_RIGHT)
}
if (player->MovDir == MV_LEFT || player->MovDir == MV_RIGHT)
@@
-610,7
+610,7
@@
void DrawPlayer(struct PlayerInfo *player)
int element = Feld[next_jx][next_jy];
int graphic = el2gfx(element);
int element = Feld[next_jx][next_jy];
int graphic = el2gfx(element);
- if (
element == EL_FELSBROCKEN
&& sxx)
+ if (
(element == EL_FELSBROCKEN || element == EL_SP_ZONK)
&& sxx)
{
int phase = (player->GfxPos / (TILEX / 4));
{
int phase = (player->GfxPos / (TILEX / 4));
@@
-619,17
+619,6
@@
void DrawPlayer(struct PlayerInfo *player)
else
graphic += (phase + 4) % 4;
}
else
graphic += (phase + 4) % 4;
}
- else if (element == EL_SP_ZONK && sxx)
- {
- int phase = (player->GfxPos / (TILEX / 4));
-
- graphic = GFX2_SP_ZONK;
-
- if (player->MovDir == MV_LEFT)
- graphic += phase;
- else
- graphic += (phase + 4) % 4;
- }
DrawGraphicShifted(px, py, sxx, syy, graphic, NO_CUTTING, NO_MASKING);
}
DrawGraphicShifted(px, py, sxx, syy, graphic, NO_CUTTING, NO_MASKING);
}
@@
-1240,18
+1229,21
@@
void DrawScreenElementExt(int x, int y, int dx, int dy, int element,
else if ((element == EL_FELSBROCKEN || element == EL_SP_ZONK ||
IS_GEM(element)) && !cut_mode)
{
else if ((element == EL_FELSBROCKEN || element == EL_SP_ZONK ||
IS_GEM(element)) && !cut_mode)
{
- if (element == EL_SP_ZONK)
+ if (element == EL_
FELSBROCKEN || element == EL_
SP_ZONK)
{
{
- /*
-
graphic = GFX2_SP_ZONK + phase2 * 2
;
- */
-
- /*
-
printf("-> %d\n", phase4)
;
- */
-
- graphic
= GFX2_SP_ZONK
;
+ if (dir == MV_LEFT)
+
graphic += (4 - phase4) % 4
;
+ else if (dir == MV_RIGHT)
+ graphic += phase4;
+ else
+
graphic += phase2 * 2
;
+ }
+ else if (element != EL_SP_INFOTRON)
+ graphic
+= phase2
;
+ /*
+ if (element == EL_SP_ZONK)
+ {
if (dir == MV_LEFT)
graphic += (4 - phase4) % 4;
else if (dir == MV_RIGHT)
if (dir == MV_LEFT)
graphic += (4 - phase4) % 4;
else if (dir == MV_RIGHT)
@@
-1261,6
+1253,8
@@
void DrawScreenElementExt(int x, int y, int dx, int dy, int element,
}
else if (element != EL_SP_INFOTRON)
graphic += phase2 * (element == EL_FELSBROCKEN ? 2 : 1);
}
else if (element != EL_SP_INFOTRON)
graphic += phase2 * (element == EL_FELSBROCKEN ? 2 : 1);
+ */
+
}
else if (element == EL_SIEB_LEER || element == EL_SIEB2_LEER ||
element == EL_SIEB_VOLL || element == EL_SIEB2_VOLL)
}
else if (element == EL_SIEB_LEER || element == EL_SIEB2_LEER ||
element == EL_SIEB_VOLL || element == EL_SIEB2_VOLL)
@@
-2732,6
+2726,8
@@
int el2gfx(int element)
case EL_SPEED_PILL: return GFX_SPEED_PILL;
case EL_SP_TERMINAL_ACTIVE: return GFX_SP_TERMINAL;
case EL_SP_BUG_ACTIVE: return GFX_SP_BUG_ACTIVE;
case EL_SPEED_PILL: return GFX_SPEED_PILL;
case EL_SP_TERMINAL_ACTIVE: return GFX_SP_TERMINAL;
case EL_SP_BUG_ACTIVE: return GFX_SP_BUG_ACTIVE;
+ case EL_SP_ZONK: return GFX_SP_ZONK;
+ /* ^^^^^^^^^^ non-standard position in supaplex graphic set! */
case EL_INVISIBLE_STEEL: return GFX_INVISIBLE_STEEL;
case EL_BLACK_ORB: return GFX_BLACK_ORB;
case EL_INVISIBLE_STEEL: return GFX_INVISIBLE_STEEL;
case EL_BLACK_ORB: return GFX_BLACK_ORB;