projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20080120-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 77427f9a6a6a444c924df0071849bf36918d5f95..441793cef025f261b769d8f6dab212a4b23825dc 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-2433,35
+2433,38
@@
void UpdateGameControlValues()
if (gpc->type == TYPE_ELEMENT)
{
if (gpc->type == TYPE_ELEMENT)
{
- int last_anim_random_frame = gfx.anim_random_frame;
- int element = gpc->value;
- int graphic = el2panelimg(element);
-
- if (gpc->value != gpc->last_value)
- {
- gpc->gfx_frame = 0;
- gpc->gfx_random = INIT_GFX_RANDOM();
- }
- else
+ if (gpc->value != EL_UNDEFINED && gpc->value != EL_EMPTY)
{
{
- gpc->gfx_frame++;
+ int last_anim_random_frame = gfx.anim_random_frame;
+ int element = gpc->value;
+ int graphic = el2panelimg(element);
- if (ANIM_MODE(graphic) == ANIM_RANDOM &&
- IS_NEXT_FRAME(gpc->gfx_frame, graphic))
+ if (gpc->value != gpc->last_value)
+ {
+ gpc->gfx_frame = 0;
gpc->gfx_random = INIT_GFX_RANDOM();
gpc->gfx_random = INIT_GFX_RANDOM();
- }
+ }
+ else
+ {
+ gpc->gfx_frame++;
- if (ANIM_MODE(graphic) == ANIM_RANDOM)
- gfx.anim_random_frame = gpc->gfx_random;
+ if (ANIM_MODE(graphic) == ANIM_RANDOM &&
+ IS_NEXT_FRAME(gpc->gfx_frame, graphic))
+ gpc->gfx_random = INIT_GFX_RANDOM();
+ }
+
+ if (ANIM_MODE(graphic) == ANIM_RANDOM)
+ gfx.anim_random_frame = gpc->gfx_random;
- if (ANIM_MODE(graphic) == ANIM_CE_SCORE)
- gpc->gfx_frame = element_info[element].collect_score;
+
if (ANIM_MODE(graphic) == ANIM_CE_SCORE)
+
gpc->gfx_frame = element_info[element].collect_score;
- gpc->frame = getGraphicAnimationFrame(el2panelimg(gpc->value),
- gpc->gfx_frame);
+
gpc->frame = getGraphicAnimationFrame(el2panelimg(gpc->value),
+
gpc->gfx_frame);
- if (ANIM_MODE(graphic) == ANIM_RANDOM)
- gfx.anim_random_frame = last_anim_random_frame;
+ if (ANIM_MODE(graphic) == ANIM_RANDOM)
+ gfx.anim_random_frame = last_anim_random_frame;
+ }
}
}
}
}
}
}