void horseRaceInit() { udword i; horseGetNumBars(&horseBarInfo); //initialize current bar to the 0th bar localbar=0; for(i=0;i<MAX_MULTIPLAYER_PLAYERS;i++) { horseracestatus.barnum[i] = 0; horseracestatus.percent[i] = 0; horseracestatus.hrstatusstr[i][0] = 0; if (autodownloadmapRequired()) TTimerStart(&hrPlayerDropoutTimers[i],HorseRacePlayerDropoutTime*2.0f); // give double time for autodownloads else TTimerStart(&hrPlayerDropoutTimers[i],HorseRacePlayerDropoutTime); PlayersAlreadyDrawnDropped[i] = FALSE; } for (i=0;i<NUM_CHAT_LINES;i++) { chathistory[i].message[0] = 0; } listInit(&horseCrapRegion.cutouts); JustInit = TRUE; if (!hrScreensHandle) { feCallbackAddMultiple(hrCallBack); feDrawCallbackAddMultiple(hrDrawCallback); hrScreensHandle = feScreensLoad(HR_FIBFile); } if (!ShouldHaveMousePtr) mouseCursorHide(); if (singlePlayerGame) { hrBaseRegion = feScreenStart(&horseCrapRegion, HR_SingleRaceScreen); } else { hrBaseRegion = feScreenStart(&horseCrapRegion, (multiPlayerGame) ? HR_RaceScreen : HR_RaceScreenNotNetwork); } playernamefont = frFontRegister(HR_PlayerNameFont); hrRunning=TRUE; if (RGLtype == SWtype && feShouldSaveMouseCursor()) { rglFeature(RGL_SAVEBUFFER_ON); } hrBackgroundDirty = (RGLtype == SWtype) ? 10000 : 3; hrBackgroundReinit = FALSE; }
DWORD TTimerRestart( DWORD dwHandle ) { DWORD dwRet = TTimerStop( dwHandle ); if ( !dwRet ) { dwRet = TTimerStart( dwHandle ); } return dwRet; }