{
SaveNativeLevel(&level);
}
+ else if (is_string_suffix(cheat_input, ":frames-per-second") ||
+ is_string_suffix(cheat_input, ":fps"))
+ {
+ global.show_frames_per_second = !global.show_frames_per_second;
+ }
}
else if (game_status == GAME_MODE_PLAYING)
{
AdvanceFrameAndPlayerCounters(-1); /* advance counters for all players */
- if (options.debug) /* calculate frames per second */
+ if (global.show_frames_per_second)
{
static unsigned int fps_counter = 0;
static int fps_frames = 0;
fps_frames++;
- if (fps_delay_ms >= 500) /* calculate fps every 0.5 seconds */
+ if (fps_delay_ms >= 500) /* calculate FPS every 0.5 seconds */
{
global.frames_per_second = 1000 * (float)fps_frames / fps_delay_ms;
global.create_images_dir = NULL;
global.frames_per_second = 0;
+ global.show_frames_per_second = FALSE;
global.border_status = GAME_MODE_LOADING;
global.anim_status = global.anim_status_next = GAME_MODE_LOADING;
int num_toons;
float frames_per_second;
+ boolean show_frames_per_second;
/* global values for fading screens and masking borders */
int border_status;