shithub: cstory

Download patch

ref: 1790f7485778d59cc43eb5d214432afd3f806368
parent: 44edb7d26e869009825d9074589fa2c512f57b51
author: Gabriel Ravier <gabravier@gmail.com>
date: Tue May 7 10:07:07 EDT 2019

Removed bad parentheses spacing

Basically for all "( expr )" I removed the spaces to be consistent with the rest
Also I used this enormous regex here : "((//|\;)[^ \t]|(for|while|if|while|do|void|int|bool)\(|(for|while|if|while|do)\ \(.*\)\;|\(\ |\ \))"

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

--- a/src/ArmsItem.cpp
+++ b/src/ArmsItem.cpp
@@ -158,9 +158,9 @@
 {
 	int arms_num = 0;
 	int item_num = 0;
-	while ( gArmsData[arms_num].code != 0 )
+	while (gArmsData[arms_num].code != 0)
 		++arms_num;
-	while ( gItemData[item_num].code != 0 )
+	while (gItemData[item_num].code != 0)
 		++item_num;
 
 	if (arms_num == 0 && item_num == 0)
@@ -228,9 +228,9 @@
 			bChange = TRUE;
 		}
 
-		if ( gKeyTrg & gKeyDown )
+		if (gKeyTrg & gKeyDown)
 		{
-			if ( gSelectedItem / 6 == (item_num - 1) / 6 )
+			if (gSelectedItem / 6 == (item_num - 1) / 6)
 				gCampActive = FALSE;
 			else
 				gSelectedItem += 6;
@@ -325,7 +325,7 @@
 		PutNumber4(40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 160) / 2, gArmsData[i].level, 0);
 
 		// Draw ammo
-		if ( gArmsData[i].max_num )
+		if (gArmsData[i].max_num)
 		{
 			PutNumber4(40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 144) / 2, gArmsData[i].num, 0);
 			PutNumber4(40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 128) / 2, gArmsData[i].max_num, 0);