shithub: cstory

Download patch

ref: d7813fd900763c7580bdf407b4ce585acdc848c6
parent: 08d9ca4ad8fe0d274e900545d1b26fd1cab4902e
author: Clownacy <[email protected]>
date: Wed Feb 13 10:43:35 EST 2019

Fixed some warnings

--- a/src/Back.cpp
+++ b/src/Back.cpp
@@ -167,11 +167,11 @@
 	if (gBack.type == 3)
 	{
 		int x_1 = fx / 0x4000;
-		int x_2 = fx / 0x4000 + (((WINDOW_WIDTH + 31) >> 5) + 1);
+		int x_2 = x_1 + (((WINDOW_WIDTH + 31) >> 5) + 1);
 		int y_1 = 0;
-		int y_2 = 32;
+		int y_2 = y_1 + 32;
 		
-		for (int y = 0; y < y_2; y++)
+		for (int y = y_1; y < y_2; y++)
 		{
 			int ypos = (y << 14) / 0x200 - fy / 0x200 + gWaterY / 0x200;
 			
--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -58,7 +58,7 @@
 		case 3:
 		case 4:
 			length = zero_bit;
-			charcode = string[0] & ((1 << (8 - zero_bit))) - 1;
+			charcode = string[0] & ((1 << (8 - zero_bit)) - 1);
 
 			for (unsigned int i = 1; i < zero_bit; ++i)
 			{
--- a/src/NpcAct160.cpp
+++ b/src/NpcAct160.cpp
@@ -1178,7 +1178,7 @@
 
 		if (npc->ym > 0x5FF)
 			npc->ym = 0x5FF;
-		if ( npc->ym < -0x5FFu )
+		if (npc->ym < -0x5FF)
 			npc->ym = 0x5FF;
 
 		npc->x += npc->xm;
--- a/src/NpcAct180.cpp
+++ b/src/NpcAct180.cpp
@@ -564,6 +564,7 @@
 			npc->ani_no = 1;
 			npc->act_wait = 0;
 			npc->bits |= npc_ignoreSolid;
+			// Fallthrough
 		case 11:
 			switch (npc->direct)
 			{
@@ -960,11 +961,6 @@
 //Water level
 void ActNpc191(NPCHAR *npc)
 {
-	int v1; // edx
-	int v2; // edx
-	int v3; // edx
-	int v4; // edx
-
 	switch ( npc->act_no )
 	{
 		case 0:
--- a/src/NpcAct320.cpp
+++ b/src/NpcAct320.cpp
@@ -515,7 +515,7 @@
 			npc->act_no = 41;
 			npc->act_wait = 0;
 			npc->ani_no = 0;
-			//Fallthorugh
+			//Fallthrough
 		case 41:
 			if (++npc->act_wait == 30)
 				npc->ani_no = 1;