diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 9ba4c1b6e..72e98e82a 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ 0.2: +- Planet scan should now take ~2secs on all computers -PhracturedBlue - Updated earth image to look nicer (no vertical lines) -PhracturedBlue - Clock semaphore is now created with a value of 0 -PhracturedBlue - Rewrote Semaphore debugging code to be more useful - PhracturedBlue diff --git a/sc2/src/sc2code/planets/scan.c b/sc2/src/sc2code/planets/scan.c index 8f567fd0d..6a47f2a20 100644 --- a/sc2/src/sc2code/planets/scan.c +++ b/sc2/src/sc2code/planets/scan.c @@ -693,7 +693,7 @@ DoScan (INPUT_STATE InputState, PMENU_STATE pMS) { //STAMP s; - + DWORD TimeIn, WaitTime; if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); @@ -846,6 +846,8 @@ DoScan (INPUT_STATE InputState, PMENU_STATE ClearSemaphore (GraphicsSem); PressState = AnyButtonPress (TRUE); + WaitTime = (ONE_SECOND << 1) / MAP_HEIGHT; + TimeIn = GetTimeCounter (); for (i = 0; i < MAP_HEIGHT + NUM_FLASH_COLORS + 1; i++) { ButtonState = AnyButtonPress (TRUE); @@ -866,7 +868,8 @@ DoScan (INPUT_STATE InputState, PMENU_STATE UnbatchGraphics (); ClearSemaphore (GraphicsSem); // FlushGraphics (); - SleepThread (2); + SleepThreadUntil (TimeIn + WaitTime); + TimeIn = GetTimeCounter (); } pSolarSysState->Tint_rgb = 0;