Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
timer.c
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup shell
4 * @brief Win32 frame timer and developer step waiting.
5 *
6 * Address range 42afa0-42b04f.
7 */
8#include "wc1.h"
9
10
11/* Linker commons defined here; LINK orders them by identifier hash. */
16struct Shape *pCockpitWeaponShapePtr; /* 0x005a7564 */
18char szDefaultTxtBuf[0xc8]; /* 0x005a7590 */
19struct Shape *pCockpitIndicatorShape; /* 0x005a7658 */
20struct Shape *pCurrentConstellationShape; /* 0x005a765c */
21
22/* Function start: 0x42AFA0 */
24{
25 while (TakeDebugStepFlag() == 0) ;
26}
27
28/* Function start: 0x42AFB0 */
29void CALLBACK FrameTimerCallback(UINT timerId, UINT message,
30 DWORD user, DWORD first, DWORD second)
31{
32 (void)timerId;
33 (void)message;
34 (void)user;
35 (void)first;
36 (void)second;
38}
39
40/* Function start: 0x42AFC0 */
42{
43 int milliseconds = period * 1000 / 60;
44
45 if (period == 0) {
48 timeKillEvent(nCurrentFrameTimerIdValue);
50 }
51 } else {
53 timeKillEvent(nCurrentFrameTimerIdValue);
55 }
57 nCurrentFrameTimerIdValue = timeSetEvent(milliseconds, milliseconds,
58 FrameTimerCallback, 0, 0);
59 }
60}
void(__cdecl *pIxFree)(void *)
Viewport stPilotHandBackdropView
Definition timer.c:15
Viewport stRightVduViewport
Definition timer.c:14
struct Shape * pCockpitWeaponShapePtr
Definition timer.c:16
struct Shape * pCurrentConstellationShape
Definition timer.c:20
Viewport stCurrentConvTextViewport
Definition timer.c:17
char szDefaultTxtBuf[0xc8]
Definition timer.c:18
Viewport stSpaceBufferViewport
Definition timer.c:13
TextContext stLeftVduTextContext
Definition timer.c:12
struct Shape * pCockpitIndicatorShape
Definition timer.c:19
volatile int bFrameTickPendingFlag
Definition mathfp.c:16
unsigned int nCurrentFrameTimerIdValue
Definition main.c:90
Umbrella header for the game core.
void WaitForDebugStep(void)
Definition timer.c:23
void SetMultimediaTimerCallback(int period)
Definition timer.c:41
void CALLBACK FrameTimerCallback(UINT timerId, UINT message, DWORD user, DWORD first, DWORD second)
Definition timer.c:29
unsigned char TakeDebugStepFlag(void)
Definition pilot.cpp:194