diff options
Diffstat (limited to 'sword2/driver')
-rw-r--r-- | sword2/driver/driver96.h | 1 | ||||
-rw-r--r-- | sword2/driver/menu.cpp | 4 | ||||
-rw-r--r-- | sword2/driver/misc.cpp | 4 | ||||
-rw-r--r-- | sword2/driver/palette.cpp | 6 | ||||
-rw-r--r-- | sword2/driver/render.cpp | 8 |
5 files changed, 9 insertions, 14 deletions
diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h index 4ecf614da9..510b8cef37 100644 --- a/sword2/driver/driver96.h +++ b/sword2/driver/driver96.h @@ -276,7 +276,6 @@ extern int32 SetLanguageVersion(uint8 version); //----------------------------------------------------------------------------- // Misc functions - from misc.cpp //----------------------------------------------------------------------------- -extern uint32 SVM_timeGetTime(void); extern void SVM_SetFileAttributes(char *file, uint32 atrib); extern void SVM_DeleteFile(char *file); extern int32 SVM_GetVolumeInformation(char *cdPath, char *sCDName, uint32 maxPath, uint8 *, uint32 *dwMaxCompLength, uint32 *dwFSFlags, uint8 *, uint32 a); diff --git a/sword2/driver/menu.cpp b/sword2/driver/menu.cpp index 341fb85de9..bbcd63668a 100644 --- a/sword2/driver/menu.cpp +++ b/sword2/driver/menu.cpp @@ -65,10 +65,10 @@ void Graphics::processMenu(void) { static int32 lastTime = 0; if (lastTime == 0) { - lastTime = SVM_timeGetTime(); + lastTime = g_system->get_msecs(); frameCount = 1; } else { - delta = SVM_timeGetTime() - lastTime; + delta = g_system->get_msecs() - lastTime; if (delta > 250) { lastTime += delta; delta = 250; diff --git a/sword2/driver/misc.cpp b/sword2/driver/misc.cpp index 6e68e622f9..5ccf5ca09a 100644 --- a/sword2/driver/misc.cpp +++ b/sword2/driver/misc.cpp @@ -23,10 +23,6 @@ namespace Sword2 { -uint32 SVM_timeGetTime(void) { - return g_system->get_msecs(); -} - void SVM_SetFileAttributes(char *file, uint32 atrib) { warning("stub SetFileAttributes"); } diff --git a/sword2/driver/palette.cpp b/sword2/driver/palette.cpp index a4098426b3..4b69fbc48c 100644 --- a/sword2/driver/palette.cpp +++ b/sword2/driver/palette.cpp @@ -141,7 +141,7 @@ int32 Graphics::fadeUp(float time) { _fadeTotalTime = (int32) (time * 1000); _fadeStatus = RDFADE_UP; - _fadeStartTime = SVM_timeGetTime(); + _fadeStartTime = g_system->get_msecs(); return RD_OK; } @@ -157,7 +157,7 @@ int32 Graphics::fadeDown(float time) { _fadeTotalTime = (int32) (time * 1000); _fadeStatus = RDFADE_DOWN; - _fadeStartTime = SVM_timeGetTime(); + _fadeStartTime = g_system->get_msecs(); return RD_OK; } @@ -196,7 +196,7 @@ void Graphics::fadeServer(void) { // I don't know if this is necessary, but let's limit how often the // palette is updated, just to be safe. - currentTime = SVM_timeGetTime(); + currentTime = g_system->get_msecs(); if (currentTime - previousTime <= 25) return; diff --git a/sword2/driver/render.cpp b/sword2/driver/render.cpp index 71f01befea..0fb3598d69 100644 --- a/sword2/driver/render.cpp +++ b/sword2/driver/render.cpp @@ -575,7 +575,7 @@ void Graphics::renderParallax(_parallax *p, int16 l) { */ void Graphics::initialiseRenderCycle(void) { - _initialTime = SVM_timeGetTime(); + _initialTime = g_system->get_msecs(); _totalTime = _initialTime + MILLISECSPERCYCLE; } @@ -588,7 +588,7 @@ void Graphics::startRenderCycle(void) { _scrollXOld = _scrollX; _scrollYOld = _scrollY; - _startTime = SVM_timeGetTime(); + _startTime = g_system->get_msecs(); if (_startTime + _renderAverageTime >= _totalTime) { _scrollX = _scrollXTarget; @@ -614,7 +614,7 @@ bool Graphics::endRenderCycle(void) { static int32 renderCountIndex = 0; int32 time; - time = SVM_timeGetTime(); + time = g_system->get_msecs(); renderTimeLog[renderCountIndex] = time - _startTime; _startTime = time; _renderAverageTime = (renderTimeLog[0] + renderTimeLog[1] + renderTimeLog[2] + renderTimeLog[3]) >> 2; @@ -640,7 +640,7 @@ bool Graphics::endRenderCycle(void) { // If we have already reached the scroll target sleep for the // rest of the render cycle. g_sword2->sleepUntil(_totalTime); - _initialTime = SVM_timeGetTime(); + _initialTime = g_system->get_msecs(); _totalTime += MILLISECSPERCYCLE; return true; } |