projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version number set to 4.2.1.0
[rocksndiamonds.git]
/
src
/
game_mm
/
mm_tools.c
diff --git
a/src/game_mm/mm_tools.c
b/src/game_mm/mm_tools.c
index d7f4326e19ed2fd6ed5f4351701ba83c042ce3f5..0906862b33cbaa3d6f478e8f6d0d9697b1fa4c89 100644
(file)
--- a/
src/game_mm/mm_tools.c
+++ b/
src/game_mm/mm_tools.c
@@
-654,6
+654,11
@@
static byte xsn_bits_0[] = { 0x05, 0x02, 0x05 };
static byte xsn_bits_1[] = { 0x22, 0x6b, 0x14, 0x2a, 0x14, 0x6b, 0x22 };
static byte xsn_bits_2[] = { 0x14, 0x08, 0x49, 0x36, 0x49, 0x08, 0x14 };
static byte xsn_bits_1[] = { 0x22, 0x6b, 0x14, 0x2a, 0x14, 0x6b, 0x22 };
static byte xsn_bits_2[] = { 0x14, 0x08, 0x49, 0x36, 0x49, 0x08, 0x14 };
+char debug_xsn_mode[] = { 76,101,116,32,105,116,32,115,110,111,119,33,0 };
+
+void setHideSetupEntry(void *);
+void removeHideSetupEntry(void *);
+
static struct
{
int size;
static struct
{
int size;
@@
-913,7
+918,24
@@
static void DrawTileCursor_Xsn(int draw_target)
if (DelayReached(&check_delay, check_delay_value))
{
percent = (debug ? debug_value * 100 / XSN_DEBUG_STEPS : xsn_percent());
if (DelayReached(&check_delay, check_delay_value))
{
percent = (debug ? debug_value * 100 / XSN_DEBUG_STEPS : xsn_percent());
+
+ if (debug)
+ setup.debug.xsn_percent = percent;
+
+ if (setup.debug.xsn_mode != AUTO)
+ percent = setup.debug.xsn_percent;
+
+ setup.debug.xsn_percent = percent;
+
active = (percent > 0);
active = (percent > 0);
+
+ if ((active && !active_last) || setup.debug.xsn_mode != AUTO)
+ removeHideSetupEntry(&setup.debug.xsn_mode);
+ else if (!active && active_last)
+ setHideSetupEntry(&setup.debug.xsn_mode);
+
+ if (setup.debug.xsn_mode == FALSE)
+ active = FALSE;
}
else if (tile_cursor.xsn_debug)
{
}
else if (tile_cursor.xsn_debug)
{
@@
-923,22
+945,13
@@
static void DrawTileCursor_Xsn(int draw_target)
DelayReached(&check_delay, 0);
DelayReached(&check_delay, 0);
+ setup.debug.xsn_mode = (debug_value > 0);
tile_cursor.xsn_debug = FALSE;
}
if (!active)
return;
tile_cursor.xsn_debug = FALSE;
}
if (!active)
return;
- if (!active_last)
- {
- start_delay_value = (debug ? 0 : XSN_RND(XSN_START_DELAY * 2) * 1000);
- started = FALSE;
-
- DelayReached(&start_delay, 0);
-
- reinitialize = TRUE;
- }
-
if (!initialized)
{
xsn.area_xsize = gfx.win_xsize;
if (!initialized)
{
xsn.area_xsize = gfx.win_xsize;
@@
-978,6
+991,17
@@
static void DrawTileCursor_Xsn(int draw_target)
initialized = TRUE;
}
initialized = TRUE;
}
+ if (!active_last)
+ {
+ start_delay_value = (debug || setup.debug.xsn_mode == TRUE ? 0 :
+ (XSN_START_DELAY + XSN_RND(XSN_START_DELAY)) * 1000);
+ started = FALSE;
+
+ DelayReached(&start_delay, 0);
+
+ reinitialize = TRUE;
+ }
+
if (reinitialize)
{
xsn.num_items = 0;
if (reinitialize)
{
xsn.num_items = 0;