ref: 106f81130c90d2cfd0da260bf131e278a5715072
parent: e48b3897e956e2bc0f284d0e2fc23e5ebcc01bbb
parent: 9f9e319127052174beb4b67afa798fb497d1ff29
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sun May 12 15:56:01 EDT 2019
Merge pull request #30 from GabrielRavier/improveAToE Improve files starting with A to E
--- a/src/Back.cpp
+++ b/src/Back.cpp
@@ -36,8 +36,7 @@
#ifdef NONPORTABLE
// This is ridiculously platform-dependant:
- // It should break on big-endian CPUs, and platforms
- // where short isn't 16-bit and long isn't 32-bit.
+ // It should break on big-endian CPUs, and platforms where short isn't 16-bit and long isn't 32-bit.
unsigned short bmp_header_buffer[7]; // These names aren't the original. This ruins the stack frame layout.
unsigned long bmp_header_buffer2[10];
--- a/src/BossX.cpp
+++ b/src/BossX.cpp
@@ -523,7 +523,7 @@
gBoss[2].direct = 2;
gBoss[3].cond = 0x80;
gBoss[3].life = 60;
- gBoss[3].size = 3; // Redundant: this get overwriten a few lines later
+ gBoss[3].size = 3; // Redundant: this get overwritten a few lines later
gBoss[3].hit_voice = 54;
gBoss[3].destroy_voice = 71;
gBoss[3].size = 2;
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -16,44 +16,44 @@
BOOL LoadConfigData(CONFIG *conf)
{
- //Clear old config data
+ // Clear old configuration data
memset(conf, 0, sizeof(CONFIG));
- //Get path
+ // Get path
char path[PATH_LENGTH];
sprintf(path, "%s/%s", gModulePath, config_filename);
- //Open file
+ // Open file
FILE *fp = fopen(path, "rb");
if (fp == NULL)
return FALSE;
- //Read data
+ // Read data
#ifdef NONPORTABLE
size_t fread_result = fread(conf, sizeof(CONFIG), 1, fp); // Not the original name
#else
- //Read the version id and font name
+ // Read the version id and font name
fread(conf->proof, sizeof(conf->proof), 1, fp);
fread(conf->font_name, sizeof(conf->font_name), 1, fp);
- //Read control settings
+ // Read control settings
conf->move_button_mode = File_ReadLE32(fp);
conf->attack_button_mode = File_ReadLE32(fp);
conf->ok_button_mode = File_ReadLE32(fp);
- //Read display mode (320x240, 640x480, 24-bit fullscreen, 32-bit fullscreen) TODO: add more things?
+ // Read display mode (320x240, 640x480, 24-bit fullscreen, 32-bit fullscreen) TODO: add more things?
conf->display_mode = File_ReadLE32(fp);
- //Read joystick configuration (if enabled, and mappings)
+ // Read joystick configuration (if enabled, and mappings)
conf->bJoystick = File_ReadLE32(fp);
for (int button = 0; button < 8; button++)
conf->joystick_button[button] = File_ReadLE32(fp);
#endif
- //Close file
+ // Close file
fclose(fp);
- //Check if version is not correct, and return if it failed
+ // Check if version is not correct, and return if it failed
#ifdef NONPORTABLE
if (fread_result != 1 || strcmp(conf->proof, config_magic))
#else
@@ -69,13 +69,13 @@
void DefaultConfigData(CONFIG *conf)
{
- //Clear old config data
+ // Clear old configuration data
memset(conf, 0, sizeof(CONFIG));
- //Fun fact: The Linux port added this line:
- //conf->display_mode = 1;
+ // Fun fact: The Linux port added this line:
+ // conf->display_mode = 1;
- //Reset joystick settings (as these can't simply be set to 0)
+ // Reset joystick settings (as these can't simply be set to 0)
conf->bJoystick = 1;
conf->joystick_button[0] = 2;
conf->joystick_button[1] = 1;
--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -443,7 +443,7 @@
SDL_Rect clipRect = RectToSDLRectScaled(rcView);
SDL_Rect frameRect = RectToSDLRectScaled(rect);
- // Get dest rect
+ // Get destination rect
SDL_Rect destRect = {x * magnification, y * magnification, frameRect.w, frameRect.h};
// Set cliprect