Remove all leading whitespace

This commit is contained in:
kittenchilly 2023-10-23 13:24:38 -05:00
parent ad0c28df70
commit 333523e5f7
12 changed files with 31 additions and 31 deletions

View file

@ -150,9 +150,9 @@ Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
<details>
<summary><i>Notes...</i></summary>
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isnt needed.
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isnt needed.
> Note 4: If libpng was saved elsewhere, you will need to specify the full path to where libpng was downloaded, e.g. `cd c:/devkitpro/msys2` if it was saved there.
</details>

View file

@ -741,7 +741,7 @@ u8 GetFactoryMonFixedIV(u8 challengeNum, bool8 isLastBattle)
u8 ivSet;
bool8 useHigherIV = isLastBattle ? TRUE : FALSE;
// The Factory has an out-of-bounds access when generating the rental draft for round 9 (challengeNum==8),
// The Factory has an out-of-bounds access when generating the rental draft for round 9 (challengeNum==8),
// or the "elevated" rentals from round 8 (challengeNum+1==8)
// This happens to land on a number higher than 31, which is interpreted as "random IVs"
#ifdef BUGFIX

View file

@ -230,7 +230,7 @@ enum {
PALTAG_TRIANGLE_CURSOR,
PALTAG_RECTANGLE_CURSOR,
PALTAG_MISC_UI,
PALTAG_RS_INTERVIEW_FRAME,
PALTAG_RS_INTERVIEW_FRAME,
};
enum {
@ -240,7 +240,7 @@ enum {
GFXTAG_START_SELECT_BUTTONS,
GFXTAG_MODE_WINDOW,
GFXTAG_RS_INTERVIEW_FRAME,
GFXTAG_BUTTON_WINDOW,
GFXTAG_BUTTON_WINDOW,
};

View file

@ -498,7 +498,7 @@ static const struct SpritePalette sObjectEventSpritePalettes[] = {
{gObjectEventPal_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN},
{gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY},
#ifdef BUGFIX
{NULL, OBJ_EVENT_PAL_TAG_NONE},
{NULL, OBJ_EVENT_PAL_TAG_NONE},
#else
{}, // BUG: FindObjectEventPaletteIndexByTag looks for OBJ_EVENT_PAL_TAG_NONE and not 0x0.
// If it's looking for a tag that isn't in this table, the game locks in an infinite loop.

View file

@ -41,7 +41,7 @@
#ifndef NDEBUG
struct mini_buff
struct mini_buff
{
char *buffer, *pbuffer;
u32 buffer_len;
@ -95,7 +95,7 @@ static s32 _putsAscii(char *s, s32 len, void *buf)
s32 i;
struct mini_buff *b;
if (!buf)
if (!buf)
return len;
b = buf;
@ -118,7 +118,7 @@ static s32 _putsEncoded(char *s, s32 len, void *buf)
s32 i;
struct mini_buff *b;
if (!buf)
if (!buf)
return len;
b = buf;
@ -159,7 +159,7 @@ static s32 mini_itoa(s32 value, u32 radix, s32 uppercase, bool32 unsig, char *bu
}
/* This builds the string back to front ... */
do
do
{
s32 digit = value % radix;
*(pbuffer++) = (digit < 10 ? '0' + digit : (uppercase ? 'A' : 'a') + digit - 10);
@ -243,7 +243,7 @@ s32 mini_vpprintf(void* buf, const char *fmt, va_list va)
{
len = 1;
len = _putsAscii(&ch, len, buf);
} else
} else
{
char pad_char = ' ';
s32 pad_to = 0;
@ -270,7 +270,7 @@ s32 mini_vpprintf(void* buf, const char *fmt, va_list va)
ch=*(fmt++);
}
switch (ch)
switch (ch)
{
case 0:
goto end;

View file

@ -9,8 +9,8 @@
// The purpose of this struct is for outside applications to be
// able to access parts of the ROM or its save file, like a public API.
// In vanilla, it was used by Colosseum and XD to access pokemon graphics.
//
// If this struct is rearranged in any way, it defeats the purpose of
//
// If this struct is rearranged in any way, it defeats the purpose of
// having it at all. Applications like PKHex or streaming HUDs may find
// these values useful, so there's some potential benefit to keeping it.
// If there's a compilation problem below, just comment out the assignment

View file

@ -1285,7 +1285,7 @@ static void Leader_HandleCommunication(void)
if (sTradeMenu->playerSelectStatus == STATUS_READY
&& sTradeMenu->partnerSelectStatus == STATUS_READY)
{
// Both players have selected a pokemon to trade
// Both players have selected a pokemon to trade
sTradeMenu->callbackId = CB_SET_SELECTED_MONS;
sTradeMenu->linkData[0] = LINKCMD_SET_MONS_TO_TRADE;
sTradeMenu->linkData[1] = sTradeMenu->cursorPosition;

View file

@ -238,7 +238,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
{
FATAL_ERROR("More than one MARK Chunk in file!\n");
}
markers = calloc(num_markers, sizeof(struct Marker));
// Read each marker.
@ -289,7 +289,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
// Skip NoLooping sustain loop.
pos += 4;
}
// Skip release loop, we don't need it.
pos += 6;
}
@ -303,7 +303,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
{
uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t));
memcpy(sample_data, &aif->data[pos], num_samples);
aif_data->samples8 = sample_data;
aif_data->real_num_samples = num_samples;
}
@ -316,7 +316,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
{
sample_data_swapped[i] = __builtin_bswap16(sample_data[i]);
}
aif_data->samples16 = sample_data_swapped;
aif_data->real_num_samples = num_samples;
free(sample_data);
@ -329,12 +329,12 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
pos += chunk_size;
}
}
if (markers)
{
// Resolve loop points.
struct Marker *cur_marker = markers;
// Grab loop start point.
for (int i = 0; i < num_markers; i++, cur_marker++)
{
@ -573,7 +573,7 @@ void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress)
struct Bytes *aif = read_bytearray(aif_filename);
AifData aif_data = {0};
read_aif(aif, &aif_data);
// Convert 16-bit to 8-bit if necessary
if (aif_data.sample_size == 16)
{

View file

@ -26,7 +26,7 @@ static void ConvertFromLatinFont(unsigned char *src, unsigned char *dest, unsign
unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
for (unsigned int i = 0; i < 8; i++) {
unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
unsigned int destPixelsOffset = (pixelsY * 64) + (pixelsX / 4);
dest[destPixelsOffset] = src[srcPixelsOffset + 1];
@ -75,7 +75,7 @@ static void ConvertFromHalfwidthJapaneseFont(unsigned char *src, unsigned char *
for (unsigned int i = 0; i < 8; i++) {
unsigned int pixelsY = (row * 16) + (glyphTile * 8) + i;
unsigned int destPixelsOffset = (pixelsY * 32) + (pixelsX / 4);
dest[destPixelsOffset] = src[srcPixelsOffset + 1];
dest[destPixelsOffset + 1] = src[srcPixelsOffset];
@ -233,7 +233,7 @@ void ReadHalfwidthJapaneseFont(char *path, struct Image *image)
FATAL_ERROR("The file size (%d) is not a multiple of %d.\n", fileSize, glyphSize);
int numGlyphs = fileSize / glyphSize;
if (numGlyphs % 16 != 0)
FATAL_ERROR("The number of glyphs (%d) is not a multiple of 16.\n", numGlyphs);

View file

@ -383,7 +383,7 @@ void CFile::TryConvertIncbin()
if (m_buffer[m_pos] == '\\')
RaiseError("unexpected escape in path string");
m_pos++;
}
@ -418,7 +418,7 @@ void CFile::TryConvertIncbin()
m_pos++;
}
if (m_buffer[m_pos] != ')')
RaiseError("expected ')'");

View file

@ -119,7 +119,7 @@ Lhs CharmapReader::ReadLhs()
break;
}
}
if (m_buffer[m_pos] == '\'')
{
m_pos++;

View file

@ -41,7 +41,7 @@ SourceFileType GetFileType(std::string& path)
return SourceFileType::Inc;
else
FATAL_ERROR("Unrecognized extension \"%s\"\n", extension.c_str());
// Unreachable
return SourceFileType::Cpp;
}
@ -84,7 +84,7 @@ SourceFile::SourceFile(std::string path)
else
incbins.insert(outputPath);
}
new (&m_source_file.asm_wrapper) SourceFile::InnerUnion::AsmWrapper{incbins, includes};
}
}