shithub: cstory

Download patch

ref: d78f46a384ebdee35e1e96072bd9c6fba636f235
parent: 76ac4771081d42a71334a1f656d8d3c83760e9b2
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Feb 6 08:18:54 EST 2019

Added some widescreen/tallscreen fixes

--- a/src/SelStage.cpp
+++ b/src/SelStage.cpp
@@ -97,15 +97,15 @@
 	RECT rcCur[2];
 	RECT rcTitle1;
 
-	rcView = {0, 0, 320, 240};
+	rcView = {0, 0, WINDOW_WIDTH, WINDOW_HEIGHT};
 	rcCur[0] = {80, 88, 112, 104};
 	rcCur[1] = {80, 104, 112, 120};
 	rcTitle1 = {80, 64, 144, 72};
 
-	if (gStageSelectTitleY > 46)
+	if (gStageSelectTitleY > (WINDOW_HEIGHT / 2) - 74)
 		--gStageSelectTitleY;
 
-	PutBitmap3(&rcView, 128, gStageSelectTitleY, &rcTitle1, SURFACE_ID_TEXT_BOX);
+	PutBitmap3(&rcView, (WINDOW_WIDTH / 2) - 32, gStageSelectTitleY, &rcTitle1, SURFACE_ID_TEXT_BOX);
 
 	int stage_num;
 	for (stage_num = 0; gPermitStage[stage_num].index; ++stage_num);
@@ -114,9 +114,9 @@
 
 	if (stage_num)
 	{
-		int stage_x = (320 - 40 * stage_num) / 2;
+		int stage_x = (WINDOW_WIDTH - 40 * stage_num) / 2;
 
-		PutBitmap3(&rcView, stage_x + 40 * gSelectedStage, 64, &rcCur[(flash >> 1) % 2], SURFACE_ID_TEXT_BOX);
+		PutBitmap3(&rcView, stage_x + 40 * gSelectedStage, (WINDOW_HEIGHT / 2) - 56, &rcCur[(flash >> 1) % 2], SURFACE_ID_TEXT_BOX);
 
 		for (int i = 0; i < 8 && gPermitStage[i].index; ++i)
 		{
@@ -126,7 +126,7 @@
 			rcStage.top = 16 * (gPermitStage[i].index / 8);
 			rcStage.bottom = rcStage.top + 16;
 
-			PutBitmap3(&rcView, stage_x + 40 * i, 64, &rcStage, SURFACE_ID_STAGE_ITEM);
+			PutBitmap3(&rcView, stage_x + 40 * i, (WINDOW_HEIGHT / 2) - 56, &rcStage, SURFACE_ID_STAGE_ITEM);
 		}
 	}
 }
@@ -135,13 +135,13 @@
 {
 	char old_script_path[260];
 
-	RECT rcView = {0, 0, 320, 240};
+	RECT rcView = {0, 0, WINDOW_WIDTH, WINDOW_HEIGHT};
 
 	gSelectedStage = 0;
 	BackupSurface(10, &grcFull);
 	GetTextScriptPath(old_script_path);
 	LoadTextScript2("StageSelect.tsc");
-	gStageSelectTitleY = 54;
+	gStageSelectTitleY = (WINDOW_HEIGHT / 2) - 66;
 	StartTextScript(gPermitStage[gSelectedStage].index + 1000);
 
 	do
--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -473,7 +473,7 @@
 			
 			PutBitmap3(&grcFull, (WINDOW_WIDTH + 112) / 2, i, &rect_yesno, 26);
 			if (gTS.wait == 16)
-				PutBitmap3(&grcFull, 41 * gTS.select + (WINDOW_WIDTH + 102) / 2, 154, &rect_cur, 26);
+				PutBitmap3(&grcFull, 41 * gTS.select + (WINDOW_WIDTH + 102) / 2, WINDOW_HEIGHT - 86, &rect_cur, 26);
 		}
 	}
 }