aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sword2/driver/render.cpp')
-rw-r--r--sword2/driver/render.cpp29
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);
-}