2007-03-21
* improved menu fading, adding separate fading definitions for entering
and leaving a menu and for fading between menu and "content" screens
+ * fixed small bug with recognizing also ".font_xyz" style definitions
2007-03-20
* improved menu fading, adding separate fading definitions for fading
-#define COMPILE_DATE_STRING "2007-03-21 20:42"
+#define COMPILE_DATE_STRING "2007-03-22 00:11"
strcmp(s1, s2) == 0);
}
+boolean strEqualN(char *s1, char *s2, int n)
+{
+ return (s1 == NULL && s2 == NULL ? TRUE :
+ s1 == NULL && s2 != NULL ? FALSE :
+ s1 != NULL && s2 == NULL ? FALSE :
+ strncmp(s1, s2, n) == 0);
+}
+
/* ------------------------------------------------------------------------- */
/* command line option handling functions */
string_has_parameter(value, "crossfade") ? FADE_MODE_CROSSFADE :
FADE_MODE_DEFAULT);
}
- else if (strEqual(suffix, ".font"))
+ else if (strEqualN(suffix, ".font", 5)) /* (may also be ".font_xyz") */
{
result = gfx.get_font_from_token_function(value);
}
char *getStringToLower(char *);
void setString(char **, char *);
boolean strEqual(char *, char *);
+boolean strEqualN(char *, char *, int);
void GetOptions(char **, void (*print_usage_function)(void));
}
#endif
+#if 0
+ {
+ game_status = GAME_MODE_PSEUDO_PREVIEW;
+
+ DrawText(20, 400, "text_3.PREVIEW", FONT_TEXT_3);
+ DrawText(20, 420, "text_4.PREVIEW", FONT_TEXT_4);
+
+ game_status = GAME_MODE_MAIN;
+
+ DrawText(20, 440, "text_3.MAIN", FONT_TEXT_3);
+ DrawText(20, 460, "text_4.MAIN", FONT_TEXT_4);
+ }
+#endif
+
#if 1
FadeIn(redraw_mask);
#else
DrawInfoScreen_NotAvailable("Title screen information:",
"No title screen for this level set.");
+#if 0
/* use default settings for fading, but always disable auto delay */
fading = title_default;
fading.auto_delay = -1;
+#endif
return;
}
return;
}
+#if 1
+ if (fading.auto_delay > 0 && DelayReached(&title_delay, fading.auto_delay))
+ button = MB_MENU_CHOICE;
+#else
if (fading.auto_delay > -1 && DelayReached(&title_delay, fading.auto_delay))
button = MB_MENU_CHOICE;
+#endif
if (button == MB_MENU_LEAVE)
{