mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-23 15:52:42 +02:00
Crash-log snprintf (D478), start-mp folder (D479), shader pre-warm (D480), render worker thread (#92 low-end 45 to 60 fps, D481), lighter first-launch defaults (D482), sniper crouch/zoom fixes (D483-D485, #136), Rareware text TMEM swap (D75), D173 residual, turret/explosion fidelity (D486, #126), 21-level Windows golden rebase with a two-tier gate, PAL and JP convert/build/ boot (D258) with PAL frame height (D487) and osTvType (D488). Refs: D478 D479 D480 D481 D482 D483 D484 D485 D486 D75 D173 D258 D487 D488 #136 #126
23 lines
882 B
C
23 lines
882 B
C
#ifndef PORT_PORTTICK_H
|
|
#define PORT_PORTTICK_H
|
|
|
|
#include <ultra64.h>
|
|
|
|
/* D486 (RULE-2, D13 class): some decomp code advances a counter once per
|
|
* rendered frame. The N64 rendered at 2 ticks per frame (more under load);
|
|
* the port renders 1 tick per frame at 60 fps (0 when uncapped), so those
|
|
* counters ran 2-3x faster in real time. portN64FrameStep() is true on every
|
|
* call at >= 2 ticks per frame (identical to the N64 path) and on every
|
|
* second tick below that, so a per-frame counter gated by it keeps the N64's
|
|
* 2-ticks-per-frame pace -- the same reference D427/D451 use for auto-fire.
|
|
* Stateless: it only looks at the tick counter crossing an even boundary. */
|
|
extern s32 g_ClockTimer;
|
|
extern s32 g_GlobalTimer;
|
|
|
|
static inline int portN64FrameStep(void)
|
|
{
|
|
return g_ClockTimer >= 2 || ((g_GlobalTimer >> 1) != ((g_GlobalTimer - g_ClockTimer) >> 1));
|
|
}
|
|
|
|
#endif
|