From 808df2b720842d75bf88b84d9a68bf47429ef566 Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Wed, 8 May 2019 08:37:58 +0200 Subject: [PATCH 1/6] Added a newline for a weird for and added a space after a comment in Font.cpp Signed-off-by: Gabriel Ravier --- src/Font.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 915cd499..69f342c4 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -14,7 +14,7 @@ #include "File.h" // Uncomment for that authentic pre-Windows Vista feel -//#define DISABLE_FONT_ANTIALIASING +// #define DISABLE_FONT_ANTIALIASING #undef MIN #undef MAX @@ -1655,7 +1655,8 @@ static unsigned long UTF8ToUnicode(const unsigned char *string, unsigned int *by unsigned long charcode; unsigned int zero_bit = 0; - for (unsigned char lead_byte = string[0]; zero_bit < 5 && (lead_byte & 0x80); ++zero_bit, lead_byte <<= 1); + for (unsigned char lead_byte = string[0]; zero_bit < 5 && (lead_byte & 0x80); ++zero_bit, lead_byte <<= 1) + ; switch (zero_bit) { From 182dda4dd9335704b78347f74c37f7343c4c65cd Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Wed, 8 May 2019 08:39:55 +0200 Subject: [PATCH 2/6] Correct comment formatting in Frame.cpp Signed-off-by: Gabriel Ravier --- src/Frame.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Frame.cpp b/src/Frame.cpp index 2a148902..203a36c0 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -85,7 +85,7 @@ void MoveFrame3() gFrame.y = ((map_l - 1) * 0x10 - WINDOW_HEIGHT) * 0x200; #endif - //Quake + // Quake if (gFrame.quake2) { gFrame.x += (Random(-5, 5) * 0x200); @@ -114,18 +114,18 @@ void GetFramePosition(int *fx, int *fy) void SetFramePosition(int fx, int fy) { - //End quake + // End quake gFrame.quake = 0; gFrame.quake2 = 0; - //Move frame position + // Move frame position int16_t map_w, map_l; GetMapData(0, &map_w, &map_l); gFrame.x = fx; gFrame.y = fy; - //Keep in bounds + // Keep in bounds if (gFrame.x / 0x200 < 0) gFrame.x = 0; if (gFrame.y / 0x200 < 0) @@ -139,7 +139,7 @@ void SetFramePosition(int fx, int fy) void SetFrameMyChar() { - //Move frame position + // Move frame position int mc_x, mc_y; GetMyCharPosition(&mc_x, &mc_y); @@ -149,7 +149,7 @@ void SetFrameMyChar() gFrame.x = mc_x - (WINDOW_WIDTH << 8); gFrame.y = mc_y - (WINDOW_HEIGHT << 8); - //Keep in bounds + // Keep in bounds if (gFrame.x / 0x200 < 0) gFrame.x = 0; if (gFrame.y / 0x200 < 0) From e294162040ff91344460d8f3ca267f2e9577a370 Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Wed, 8 May 2019 08:29:50 +0200 Subject: [PATCH 3/6] Fixed some comment formatting in Flags.cpp Signed-off-by: Gabriel Ravier --- src/Flags.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Flags.cpp b/src/Flags.cpp index c7e3d192..1b427919 100644 --- a/src/Flags.cpp +++ b/src/Flags.cpp @@ -7,7 +7,7 @@ unsigned char gFlagNPC[1000]; unsigned char gSkipFlag[8]; -//Flag inits +// Flag inits void InitFlags() { memset(gFlagNPC, 0, sizeof(gFlagNPC)); @@ -18,7 +18,7 @@ void InitSkipFlags() memset(gSkipFlag, 0, sizeof(gSkipFlag)); } -//NPC flags +// NPC flags void SetNPCFlag(long a) { gFlagNPC[a / 8] |= 1 << a % 8; @@ -37,7 +37,7 @@ BOOL GetNPCFlag(long a) return FALSE; } -//Skip flags +// Skip flags void SetSkipFlag(long a) { gSkipFlag[a / 8] |= 1 << a % 8; From 18ae3e6bf7874ceffeee78b2a764de2ea1343ef1 Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Fri, 10 May 2019 09:15:31 +0200 Subject: [PATCH 4/6] Corrected technically orthographically false comment Signed-off-by: Gabriel Ravier --- src/Flags.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Flags.cpp b/src/Flags.cpp index 1b427919..f8a21181 100644 --- a/src/Flags.cpp +++ b/src/Flags.cpp @@ -7,7 +7,7 @@ unsigned char gFlagNPC[1000]; unsigned char gSkipFlag[8]; -// Flag inits +// Flag initializers void InitFlags() { memset(gFlagNPC, 0, sizeof(gFlagNPC)); From 45fb8940af5c82d41a131c2c1e4cc9e92c9fe6c3 Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Tue, 14 May 2019 08:24:52 +0200 Subject: [PATCH 5/6] Correct style in Font.cpp Signed-off-by: Gabriel Ravier --- src/Font.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 69f342c4..7e008530 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -1655,8 +1655,7 @@ static unsigned long UTF8ToUnicode(const unsigned char *string, unsigned int *by unsigned long charcode; unsigned int zero_bit = 0; - for (unsigned char lead_byte = string[0]; zero_bit < 5 && (lead_byte & 0x80); ++zero_bit, lead_byte <<= 1) - ; + for (unsigned char lead_byte = string[0]; zero_bit < 5 && (lead_byte & 0x80); ++zero_bit, lead_byte <<= 1); switch (zero_bit) { From ccb37e12b1f54c6dc24d29f8b4f696b28883f2cd Mon Sep 17 00:00:00 2001 From: Gabriel Ravier <31440290+GabrielRavier@users.noreply.github.com> Date: Tue, 14 May 2019 11:22:38 +0200 Subject: [PATCH 6/6] Remove space before commented out code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ಠ_ಠ Co-Authored-By: Clownacy --- src/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Font.cpp b/src/Font.cpp index 7e008530..915cd499 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -14,7 +14,7 @@ #include "File.h" // Uncomment for that authentic pre-Windows Vista feel -// #define DISABLE_FONT_ANTIALIASING +//#define DISABLE_FONT_ANTIALIASING #undef MIN #undef MAX