diff --git a/src/Draw.cpp b/src/Draw.cpp index 73daa462..7673d59b 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -416,17 +416,17 @@ BOOL MakeSurface_Generic(int bxsize, int bysize, SurfaceID surf_no, BOOL bSystem void BackupSurface(SurfaceID surf_no, const RECT *rect) { - static RenderBackend_Rect scaled_rect; // TODO - Not the original variable name - scaled_rect.left = rect->left * mag; - scaled_rect.top = rect->top * mag; - scaled_rect.right = rect->right * mag; - scaled_rect.bottom = rect->bottom * mag; + static RenderBackend_Rect rcSet; // TODO - Not the original variable name + rcSet.left = rect->left * mag; + rcSet.top = rect->top * mag; + rcSet.right = rect->right * mag; + rcSet.bottom = rect->bottom * mag; // Do not draw invalid RECTs - if (scaled_rect.right <= scaled_rect.left || scaled_rect.bottom <= scaled_rect.top) + if (rcSet.right <= rcSet.left || rcSet.bottom <= rcSet.top) return; - RenderBackend_Blit(framebuffer, &scaled_rect, surf[surf_no], scaled_rect.left, scaled_rect.top, FALSE); + RenderBackend_Blit(framebuffer, &rcSet, surf[surf_no], rcSet.left, rcSet.top, FALSE); } void PutBitmap3(const RECT *rcView, int x, int y, const RECT *rect, SurfaceID surf_no) // Transparency diff --git a/src/Main.cpp b/src/Main.cpp index 5925eab8..7ecc3e91 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -45,6 +45,7 @@ static const char* const lpWindowName = "洞窟物語"; // "Cave Story" static const char* const lpWindowName = "Cave Story ~ Doukutsu Monogatari"; #endif +// Framerate stuff static unsigned long CountFramePerSecound(void) { unsigned long current_tick; // The original name for this variable is unknown @@ -72,7 +73,6 @@ static unsigned long CountFramePerSecound(void) return max_count; } -// Framerate stuff void PutFramePerSecound(void) { if (bFPS)