ref: cb730ff9d73bd5f17f3e14fd4a1b58ca18a06e8e
parent: a5dcebec01f11a0cf6a73c5b70a79aa3c9886085
parent: 05949cb772346e021b77bc7e9ed6a6bbaa84ea28
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue May 7 12:42:41 EDT 2019
Merge branch 'master' of https://github.com/Clownacy/Cave-Story-Engine-2
--- 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);
--- a/src/Back.cpp
+++ b/src/Back.cpp
@@ -21,7 +21,7 @@
// Unused, hilariously
color_black = GetCortBoxColor(RGB(0, 0, 0x10));
- //Get width and height
+ // Get width and height
char path[PATH_LENGTH];
sprintf(path, "%s/%s.pbm", gDataPath, fName);
@@ -72,7 +72,7 @@
fclose(fp);
#endif
- //Set background stuff and load texture
+ // Set background stuff and load texture
gBack.flag = 1;
if (!ReloadBitmap_File(fName, SURFACE_ID_LEVEL_BACKGROUND))
return FALSE;
@@ -138,7 +138,7 @@
case 6:
case 7:
- //Sky
+ // Sky
static unsigned int fillNext;
fillNext = 0;
for (int y = 0; y < WINDOW_HEIGHT - 240 + 88; y += 88)
@@ -156,7 +156,7 @@
rect.right = 320;
PutBitmap4(&grcGame, (WINDOW_WIDTH - 320) / 2, WINDOW_HEIGHT - 240, &rect, SURFACE_ID_LEVEL_BACKGROUND);
- //Cloud layer 1
+ // Cloud layer 1
rect.top = 88;
rect.bottom = 123;
rect.left = gBack.fx / 2;
@@ -167,7 +167,7 @@
for (int i = 0; i < ((WINDOW_WIDTH - 1) / 320) + 1; i++)
PutBitmap4(&grcGame, (320 * (i + 1)) - gBack.fx / 2 % 320, 88 + (WINDOW_HEIGHT - 240), &rect, SURFACE_ID_LEVEL_BACKGROUND);
- //Cloud layer 2
+ // Cloud layer 2
rect.top = 123;
rect.bottom = 146;
rect.left = gBack.fx % 320;
@@ -178,7 +178,7 @@
for (int i = 0; i < ((WINDOW_WIDTH - 1) / 320) + 1; i++)
PutBitmap4(&grcGame, (320 * (i + 1)) - gBack.fx % 320, 123 + (WINDOW_HEIGHT - 240), &rect, SURFACE_ID_LEVEL_BACKGROUND);
- //Cloud layer 3
+ // Cloud layer 3
rect.top = 146;
rect.bottom = 176;
rect.left = 2 * gBack.fx % 320;
@@ -189,7 +189,7 @@
for (int i = 0; i < ((WINDOW_WIDTH - 1) / 320) + 1; i++)
PutBitmap4(&grcGame, (320 * (i + 1)) - 2 * gBack.fx % 320, 146 + (WINDOW_HEIGHT - 240), &rect, SURFACE_ID_LEVEL_BACKGROUND);
- //Cloud layer 4
+ // Cloud layer 4
rect.top = 176;
rect.bottom = 240;
rect.left = 4 * gBack.fx % 320;
@@ -248,18 +248,18 @@
}
- //Draw black bars
- if (!(g_GameFlags & 8)) //Detect if credits are running
+ // Draw black bars
+ if (!(g_GameFlags & 8)) // Detect if credits are running
{
- const bool fromFocus = (gStageNo == 31); //Get if we should only draw around a 320x240 area of the focus point
+ const bool fromFocus = (gStageNo == 31); // Get if we should only draw around a 320x240 area of the focus point
- //Get focus rect
+ // Get focus rect
int focusX = gFrame.x + (WINDOW_WIDTH << 8) - (320 << 8);
int focusY = gFrame.y + (WINDOW_HEIGHT << 8) - (240 << 8);
int focusR = focusX + (320 << 9);
int focusB = focusY + (240 << 9);
- //Get borders
+ // Get borders
const int barLeft = fromFocus ? focusX : -0x1000;
const int barTop = fromFocus ? focusY : -0x1000;
@@ -266,10 +266,10 @@
const int barRight = fromFocus ? focusR : (gMap.width << 13) - 0x1000;
const int barBottom = fromFocus ? focusB : (gMap.length << 13) - 0x1000;
- //Draw bars
+ // Draw bars
RECT barRect;
- //Left
+ // Left
barRect.left = 0;
barRect.top = 0;
barRect.right = (barLeft - gFrame.x) >> 9;
@@ -276,7 +276,7 @@
barRect.bottom = WINDOW_HEIGHT;
CortBox(&barRect, 0x000000);
- //Top
+ // Top
barRect.left = 0;
barRect.top = 0;
barRect.right = WINDOW_WIDTH;
@@ -283,7 +283,7 @@
barRect.bottom = (barTop - gFrame.y) >> 9;
CortBox(&barRect, 0x000000);
- //Right
+ // Right
barRect.left = (barRight - gFrame.x) >> 9;
barRect.top = 0;
barRect.right = WINDOW_WIDTH;
@@ -290,7 +290,7 @@
barRect.bottom = WINDOW_HEIGHT;
CortBox(&barRect, 0x000000);
- //Bottom
+ // Bottom
barRect.left = 0;
barRect.top = (barBottom - gFrame.y) >> 9;
barRect.right = WINDOW_WIDTH;