Merged New Inventory Project into main branch

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2008-03-08 15:15:25 +00:00
parent e16d166277
commit 43ca24dda8
649 changed files with 93359 additions and 82507 deletions
+26 -26
View File
@@ -22,52 +22,52 @@ UINT32 guiCurrentTime;
void CALLBACK Clock( HWND hWindow, UINT uMessage, UINT idEvent, DWORD dwTime )
{
guiCurrentTime = GetTickCount();
if (guiCurrentTime < guiStartupTime)
{ // Adjust guiCurrentTime because of loopback on the timer value
guiCurrentTime = guiCurrentTime + (0xffffffff - guiStartupTime);
}
else
{ // Adjust guiCurrentTime because of loopback on the timer value
guiCurrentTime = guiCurrentTime - guiStartupTime;
}
guiCurrentTime = GetTickCount();
if (guiCurrentTime < guiStartupTime)
{ // Adjust guiCurrentTime because of loopback on the timer value
guiCurrentTime = guiCurrentTime + (0xffffffff - guiStartupTime);
}
else
{ // Adjust guiCurrentTime because of loopback on the timer value
guiCurrentTime = guiCurrentTime - guiStartupTime;
}
}
BOOLEAN InitializeClockManager(void)
{
// Register the start time (use WIN95 API call)
guiCurrentTime = guiStartupTime = GetTickCount();
SetTimer(ghWindow, MAIN_TIMER_ID, 10, (TIMERPROC)Clock);
// Register the start time (use WIN95 API call)
guiCurrentTime = guiStartupTime = GetTickCount();
SetTimer(ghWindow, MAIN_TIMER_ID, 10, (TIMERPROC)Clock);
return TRUE;
return TRUE;
}
void ShutdownClockManager(void)
void ShutdownClockManager(void)
{
// Make sure we kill the timer
KillTimer(ghWindow, MAIN_TIMER_ID);
// Make sure we kill the timer
KillTimer(ghWindow, MAIN_TIMER_ID);
}
TIMER GetClock(void)
TIMER GetClock(void)
{
return guiCurrentTime;
return guiCurrentTime;
}
TIMER SetCountdownClock(UINT32 uiTimeToElapse)
TIMER SetCountdownClock(UINT32 uiTimeToElapse)
{
return (guiCurrentTime + uiTimeToElapse);
return (guiCurrentTime + uiTimeToElapse);
}
UINT32 ClockIsTicking(TIMER uiTimer)
{
if (uiTimer > guiCurrentTime)
{ // Well timer still hasn't elapsed
return (uiTimer - guiCurrentTime);
}
// Time's up
return 0;
if (uiTimer > guiCurrentTime)
{ // Well timer still hasn't elapsed
return (uiTimer - guiCurrentTime);
}
// Time's up
return 0;
}