Skip to content

Commit a8163a2

Browse files
author
Doomhack
committed
Merge remote-tracking branch 'origin/kk_pr'
2 parents 6e75da4 + e0708b5 commit a8163a2

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

include/d_englsh.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@
377377
#define STSTR_ROCKETON "Enemy Rockets On"
378378
#define STSTR_ROCKETOFF "Enemy Rockets Off"
379379

380+
#define STSTR_FPSON "FPS Counter On"
381+
#define STSTR_FPSOFF "FPS Counter Off"
382+
380383
/* f_finale.c */
381384

382385
#define E1TEXT \

source/d_main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ const boolean nodrawers = false;
9595

9696
static const char* timedemo = NULL;//"demo1";
9797

98-
static const boolean show_fps = false;
99-
10098
/*
10199
* D_PostEvent - Event handling
102100
*
@@ -287,7 +285,7 @@ static void D_DoomLoop(void)
287285
D_Display();
288286

289287

290-
if(show_fps)
288+
if(_g->fps_show)
291289
{
292290
D_UpdateFPS();
293291
}
@@ -746,7 +744,7 @@ static void D_DoomMainSetup(void)
746744

747745
_g->idmusnum = -1; //jff 3/17/98 insure idmus number is blank
748746

749-
_g->fps_show = show_fps;
747+
_g->fps_show = false;
750748

751749
I_InitGraphics();
752750

source/m_cheat.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ static void cheat_map(void);
1818
static void cheat_goggles(void);
1919
static void cheat_exit(void);
2020
static void cheat_rockets(void);
21+
static void cheat_fps(void);
2122

2223

2324

@@ -49,6 +50,7 @@ static const c_cheat cheat_def[] =
4950

5051
//Because Goldeneye!
5152
{"Enemy Rockets", CHEAT_SEQ(KEYD_A, KEYD_B, KEYD_L, KEYD_R, KEYD_R, KEYD_L, KEYD_B, KEYD_A), cheat_rockets},
53+
{"FPS Counter Ammo",CHEAT_SEQ(KEYD_A, KEYD_B, KEYD_L, KEYD_UP, KEYD_DOWN, KEYD_B, KEYD_LEFT, KEYD_LEFT), cheat_fps},
5254
};
5355

5456
static const unsigned int num_cheats = sizeof(cheat_def) / sizeof (c_cheat);
@@ -252,3 +254,15 @@ static void cheat_rockets()
252254
_g->player.message = STSTR_ROCKETOFF;
253255
}
254256
}
257+
258+
static void cheat_fps()
259+
{
260+
_g->fps_show = !_g->fps_show;
261+
if(_g->fps_show)
262+
{
263+
_g->player.message = STSTR_FPSON;
264+
}else
265+
{
266+
_g->player.message = STSTR_FPSOFF;
267+
}
268+
}

0 commit comments

Comments
 (0)