diff options
author | Torbjörn Andersson | 2003-09-24 06:40:23 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-09-24 06:40:23 +0000 |
commit | 09a01e4cbeada86167d83608cd0dcd77d7a0168f (patch) | |
tree | 060defc05a52b46cd1e055842302355f47eb08bf /sword2/driver/render.cpp | |
parent | 570e60a48797efa08ae5a6c7102f16678704bae8 (diff) | |
download | scummvm-rg350-09a01e4cbeada86167d83608cd0dcd77d7a0168f.tar.gz scummvm-rg350-09a01e4cbeada86167d83608cd0dcd77d7a0168f.tar.bz2 scummvm-rg350-09a01e4cbeada86167d83608cd0dcd77d7a0168f.zip |
Replaced abs() with ABS and BOOL with bool, plus some minor cleanups.
svn-id: r10391
Diffstat (limited to 'sword2/driver/render.cpp')
-rw-r--r-- | sword2/driver/render.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/sword2/driver/render.cpp b/sword2/driver/render.cpp index d7db73e5b6..4874d92aa3 100644 --- a/sword2/driver/render.cpp +++ b/sword2/driver/render.cpp @@ -809,8 +809,6 @@ int32 SetLocationMetrics(uint16 w, uint16 h) } - - int32 RenderParallax(_parallax *p, int16 l) { int16 x, y; int16 i, j; @@ -854,10 +852,6 @@ int32 RenderParallax(_parallax *p, int16 l) { } - - - - /* #define LOGSIZE 10 int32 previousTimeLog[LOGSIZE]; @@ -902,8 +896,6 @@ int32 InitialiseRenderCycle(void) { return RD_OK; } - - int32 StartRenderCycle(void) { scrollxOld = scrollx; scrollyOld = scrolly; @@ -924,7 +916,6 @@ int32 StartRenderCycle(void) { return RD_OK; } - // FIXME: Move this to some better place? void sleepUntil(int32 time) { @@ -939,7 +930,7 @@ void sleepUntil(int32 time) { } } -int32 EndRenderCycle(BOOL *end) { +int32 EndRenderCycle(bool *end) { int32 time; time = SVM_timeGetTime(); @@ -953,23 +944,23 @@ int32 EndRenderCycle(BOOL *end) { renderCountIndex = 0; if (renderTooSlow) { - *end = TRUE; + *end = true; InitialiseRenderCycle(); } else if (startTime + renderAverageTime >= totalTime) { - *end = TRUE; + *end = true; totalTime += MILLISECSPERCYCLE; initialTime = time; #ifdef LIMIT_FRAME_RATE } else if (scrollxTarget == scrollx && scrollyTarget == scrolly) { // If we have already reached the scroll target sleep for the // rest of the render cycle. - *end = TRUE; + *end = true; sleepUntil(totalTime); initialTime = SVM_timeGetTime(); totalTime += MILLISECSPERCYCLE; #endif } else { - *end = FALSE; + *end = false; // This is an attempt to ensure that we always reach the scroll // target. Otherwise the game frequently tries to pump out new @@ -987,7 +978,6 @@ int32 EndRenderCycle(BOOL *end) { return RD_OK; } - int32 SetScrollTarget(int16 sx, int16 sy) { scrollxTarget = sx; scrollyTarget = sy; @@ -1000,7 +990,6 @@ int32 CopyScreenBuffer(void) { return RD_OK; } - int32 InitialiseBackgroundLayer(_parallax *p) { uint8 *memchunk; uint8 zeros; @@ -1121,7 +1110,6 @@ int32 InitialiseBackgroundLayer(_parallax *p) { } - int32 CloseBackgroundLayer(void) { debug(2, "CloseBackgroundLayer"); @@ -1140,10 +1128,3 @@ int32 CloseBackgroundLayer(void) { layer = 0; return RD_OK; } - - -int32 EraseSoftwareScreenBuffer(void) -{ - // memset(myScreenBuffer, 0, RENDERWIDE * RENDERDEEP); - return(RD_OK); -} |