Make comment style consistent
Just added a space if there was no space after "//" Also I changed my regex to "((//|\;)[^ ]|(for|while|if|while|do|void|int|bool)\(|(for|while|if|while|do)\ \(.*\)\;)" Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
44edb7d26e
commit
4f208b3b8e
1 changed files with 17 additions and 17 deletions
34
src/Back.cpp
34
src/Back.cpp
|
@ -21,7 +21,7 @@ BOOL InitBack(const char *fName, int type)
|
||||||
// Unused, hilariously
|
// Unused, hilariously
|
||||||
color_black = GetCortBoxColor(RGB(0, 0, 0x10));
|
color_black = GetCortBoxColor(RGB(0, 0, 0x10));
|
||||||
|
|
||||||
//Get width and height
|
// Get width and height
|
||||||
char path[PATH_LENGTH];
|
char path[PATH_LENGTH];
|
||||||
sprintf(path, "%s/%s.pbm", gDataPath, fName);
|
sprintf(path, "%s/%s.pbm", gDataPath, fName);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ BOOL InitBack(const char *fName, int type)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Set background stuff and load texture
|
// Set background stuff and load texture
|
||||||
gBack.flag = 1;
|
gBack.flag = 1;
|
||||||
if (!ReloadBitmap_File(fName, SURFACE_ID_LEVEL_BACKGROUND))
|
if (!ReloadBitmap_File(fName, SURFACE_ID_LEVEL_BACKGROUND))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -138,7 +138,7 @@ void PutBack(int fx, int fy)
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
case 7:
|
case 7:
|
||||||
//Sky
|
// Sky
|
||||||
static unsigned int fillNext;
|
static unsigned int fillNext;
|
||||||
fillNext = 0;
|
fillNext = 0;
|
||||||
for (int y = 0; y < WINDOW_HEIGHT - 240 + 88; y += 88)
|
for (int y = 0; y < WINDOW_HEIGHT - 240 + 88; y += 88)
|
||||||
|
@ -156,7 +156,7 @@ void PutBack(int fx, int fy)
|
||||||
rect.right = 320;
|
rect.right = 320;
|
||||||
PutBitmap4(&grcGame, (WINDOW_WIDTH - 320) / 2, WINDOW_HEIGHT - 240, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, (WINDOW_WIDTH - 320) / 2, WINDOW_HEIGHT - 240, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
//Cloud layer 1
|
// Cloud layer 1
|
||||||
rect.top = 88;
|
rect.top = 88;
|
||||||
rect.bottom = 123;
|
rect.bottom = 123;
|
||||||
rect.left = gBack.fx / 2;
|
rect.left = gBack.fx / 2;
|
||||||
|
@ -167,7 +167,7 @@ void PutBack(int fx, int fy)
|
||||||
for (int i = 0; i < ((WINDOW_WIDTH - 1) / 320) + 1; i++)
|
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);
|
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.top = 123;
|
||||||
rect.bottom = 146;
|
rect.bottom = 146;
|
||||||
rect.left = gBack.fx % 320;
|
rect.left = gBack.fx % 320;
|
||||||
|
@ -178,7 +178,7 @@ void PutBack(int fx, int fy)
|
||||||
for (int i = 0; i < ((WINDOW_WIDTH - 1) / 320) + 1; i++)
|
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);
|
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.top = 146;
|
||||||
rect.bottom = 176;
|
rect.bottom = 176;
|
||||||
rect.left = 2 * gBack.fx % 320;
|
rect.left = 2 * gBack.fx % 320;
|
||||||
|
@ -189,7 +189,7 @@ void PutBack(int fx, int fy)
|
||||||
for (int i = 0; i < ((WINDOW_WIDTH - 1) / 320) + 1; i++)
|
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);
|
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.top = 176;
|
||||||
rect.bottom = 240;
|
rect.bottom = 240;
|
||||||
rect.left = 4 * gBack.fx % 320;
|
rect.left = 4 * gBack.fx % 320;
|
||||||
|
@ -248,49 +248,49 @@ void PutFront(int fx, int fy)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw black bars
|
// Draw black bars
|
||||||
if (!(g_GameFlags & 8)) //Detect if credits are running
|
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 focusX = gFrame.x + (WINDOW_WIDTH << 8) - (320 << 8);
|
||||||
int focusY = gFrame.y + (WINDOW_HEIGHT << 8) - (240 << 8);
|
int focusY = gFrame.y + (WINDOW_HEIGHT << 8) - (240 << 8);
|
||||||
int focusR = focusX + (320 << 9);
|
int focusR = focusX + (320 << 9);
|
||||||
int focusB = focusY + (240 << 9);
|
int focusB = focusY + (240 << 9);
|
||||||
|
|
||||||
//Get borders
|
// Get borders
|
||||||
const int barLeft = fromFocus ? focusX : -0x1000;
|
const int barLeft = fromFocus ? focusX : -0x1000;
|
||||||
const int barTop = fromFocus ? focusY : -0x1000;
|
const int barTop = fromFocus ? focusY : -0x1000;
|
||||||
|
|
||||||
const int barRight = fromFocus ? focusR : (gMap.width << 13) - 0x1000;
|
const int barRight = fromFocus ? focusR : (gMap.width << 13) - 0x1000;
|
||||||
const int barBottom = fromFocus ? focusB : (gMap.length << 13) - 0x1000;
|
const int barBottom = fromFocus ? focusB : (gMap.length << 13) - 0x1000;
|
||||||
|
|
||||||
//Draw bars
|
// Draw bars
|
||||||
RECT barRect;
|
RECT barRect;
|
||||||
|
|
||||||
//Left
|
// Left
|
||||||
barRect.left = 0;
|
barRect.left = 0;
|
||||||
barRect.top = 0;
|
barRect.top = 0;
|
||||||
barRect.right = (barLeft - gFrame.x) >> 9;
|
barRect.right = (barLeft - gFrame.x) >> 9;
|
||||||
barRect.bottom = WINDOW_HEIGHT;
|
barRect.bottom = WINDOW_HEIGHT;
|
||||||
CortBox(&barRect, 0x000000);
|
CortBox(&barRect, 0x000000);
|
||||||
|
|
||||||
//Top
|
// Top
|
||||||
barRect.left = 0;
|
barRect.left = 0;
|
||||||
barRect.top = 0;
|
barRect.top = 0;
|
||||||
barRect.right = WINDOW_WIDTH;
|
barRect.right = WINDOW_WIDTH;
|
||||||
barRect.bottom = (barTop - gFrame.y) >> 9;
|
barRect.bottom = (barTop - gFrame.y) >> 9;
|
||||||
CortBox(&barRect, 0x000000);
|
CortBox(&barRect, 0x000000);
|
||||||
|
|
||||||
//Right
|
// Right
|
||||||
barRect.left = (barRight - gFrame.x) >> 9;
|
barRect.left = (barRight - gFrame.x) >> 9;
|
||||||
barRect.top = 0;
|
barRect.top = 0;
|
||||||
barRect.right = WINDOW_WIDTH;
|
barRect.right = WINDOW_WIDTH;
|
||||||
barRect.bottom = WINDOW_HEIGHT;
|
barRect.bottom = WINDOW_HEIGHT;
|
||||||
CortBox(&barRect, 0x000000);
|
CortBox(&barRect, 0x000000);
|
||||||
|
|
||||||
//Bottom
|
// Bottom
|
||||||
barRect.left = 0;
|
barRect.left = 0;
|
||||||
barRect.top = (barBottom - gFrame.y) >> 9;
|
barRect.top = (barBottom - gFrame.y) >> 9;
|
||||||
barRect.right = WINDOW_WIDTH;
|
barRect.right = WINDOW_WIDTH;
|
||||||
|
|
Loading…
Add table
Reference in a new issue