Remove all leading whitespace
This commit is contained in:
parent
ad0c28df70
commit
333523e5f7
12 changed files with 31 additions and 31 deletions
|
@ -150,9 +150,9 @@ Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
|
||||||
<details>
|
<details>
|
||||||
<summary><i>Notes...</i></summary>
|
<summary><i>Notes...</i></summary>
|
||||||
|
|
||||||
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
|
> 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 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 isn’t needed.
|
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn’t 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.
|
> 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>
|
</details>
|
||||||
|
|
||||||
|
|
|
@ -741,7 +741,7 @@ u8 GetFactoryMonFixedIV(u8 challengeNum, bool8 isLastBattle)
|
||||||
u8 ivSet;
|
u8 ivSet;
|
||||||
bool8 useHigherIV = isLastBattle ? TRUE : FALSE;
|
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)
|
// 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"
|
// This happens to land on a number higher than 31, which is interpreted as "random IVs"
|
||||||
#ifdef BUGFIX
|
#ifdef BUGFIX
|
||||||
|
|
|
@ -230,7 +230,7 @@ enum {
|
||||||
PALTAG_TRIANGLE_CURSOR,
|
PALTAG_TRIANGLE_CURSOR,
|
||||||
PALTAG_RECTANGLE_CURSOR,
|
PALTAG_RECTANGLE_CURSOR,
|
||||||
PALTAG_MISC_UI,
|
PALTAG_MISC_UI,
|
||||||
PALTAG_RS_INTERVIEW_FRAME,
|
PALTAG_RS_INTERVIEW_FRAME,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -240,7 +240,7 @@ enum {
|
||||||
GFXTAG_START_SELECT_BUTTONS,
|
GFXTAG_START_SELECT_BUTTONS,
|
||||||
GFXTAG_MODE_WINDOW,
|
GFXTAG_MODE_WINDOW,
|
||||||
GFXTAG_RS_INTERVIEW_FRAME,
|
GFXTAG_RS_INTERVIEW_FRAME,
|
||||||
GFXTAG_BUTTON_WINDOW,
|
GFXTAG_BUTTON_WINDOW,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -498,7 +498,7 @@ static const struct SpritePalette sObjectEventSpritePalettes[] = {
|
||||||
{gObjectEventPal_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN},
|
{gObjectEventPal_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN},
|
||||||
{gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY},
|
{gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY},
|
||||||
#ifdef BUGFIX
|
#ifdef BUGFIX
|
||||||
{NULL, OBJ_EVENT_PAL_TAG_NONE},
|
{NULL, OBJ_EVENT_PAL_TAG_NONE},
|
||||||
#else
|
#else
|
||||||
{}, // BUG: FindObjectEventPaletteIndexByTag looks for OBJ_EVENT_PAL_TAG_NONE and not 0x0.
|
{}, // 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.
|
// If it's looking for a tag that isn't in this table, the game locks in an infinite loop.
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
||||||
struct mini_buff
|
struct mini_buff
|
||||||
{
|
{
|
||||||
char *buffer, *pbuffer;
|
char *buffer, *pbuffer;
|
||||||
u32 buffer_len;
|
u32 buffer_len;
|
||||||
|
@ -95,7 +95,7 @@ static s32 _putsAscii(char *s, s32 len, void *buf)
|
||||||
s32 i;
|
s32 i;
|
||||||
struct mini_buff *b;
|
struct mini_buff *b;
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
b = buf;
|
b = buf;
|
||||||
|
@ -118,7 +118,7 @@ static s32 _putsEncoded(char *s, s32 len, void *buf)
|
||||||
s32 i;
|
s32 i;
|
||||||
struct mini_buff *b;
|
struct mini_buff *b;
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
b = buf;
|
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 ... */
|
/* This builds the string back to front ... */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
s32 digit = value % radix;
|
s32 digit = value % radix;
|
||||||
*(pbuffer++) = (digit < 10 ? '0' + digit : (uppercase ? 'A' : 'a') + digit - 10);
|
*(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 = 1;
|
||||||
len = _putsAscii(&ch, len, buf);
|
len = _putsAscii(&ch, len, buf);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
char pad_char = ' ';
|
char pad_char = ' ';
|
||||||
s32 pad_to = 0;
|
s32 pad_to = 0;
|
||||||
|
@ -270,7 +270,7 @@ s32 mini_vpprintf(void* buf, const char *fmt, va_list va)
|
||||||
ch=*(fmt++);
|
ch=*(fmt++);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
goto end;
|
goto end;
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
// The purpose of this struct is for outside applications to be
|
// 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.
|
// 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.
|
// 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
|
// having it at all. Applications like PKHex or streaming HUDs may find
|
||||||
// these values useful, so there's some potential benefit to keeping it.
|
// these values useful, so there's some potential benefit to keeping it.
|
||||||
// If there's a compilation problem below, just comment out the assignment
|
// If there's a compilation problem below, just comment out the assignment
|
||||||
|
|
|
@ -1285,7 +1285,7 @@ static void Leader_HandleCommunication(void)
|
||||||
if (sTradeMenu->playerSelectStatus == STATUS_READY
|
if (sTradeMenu->playerSelectStatus == STATUS_READY
|
||||||
&& sTradeMenu->partnerSelectStatus == 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->callbackId = CB_SET_SELECTED_MONS;
|
||||||
sTradeMenu->linkData[0] = LINKCMD_SET_MONS_TO_TRADE;
|
sTradeMenu->linkData[0] = LINKCMD_SET_MONS_TO_TRADE;
|
||||||
sTradeMenu->linkData[1] = sTradeMenu->cursorPosition;
|
sTradeMenu->linkData[1] = sTradeMenu->cursorPosition;
|
||||||
|
|
|
@ -238,7 +238,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
|
||||||
{
|
{
|
||||||
FATAL_ERROR("More than one MARK Chunk in file!\n");
|
FATAL_ERROR("More than one MARK Chunk in file!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
markers = calloc(num_markers, sizeof(struct Marker));
|
markers = calloc(num_markers, sizeof(struct Marker));
|
||||||
|
|
||||||
// Read each marker.
|
// Read each marker.
|
||||||
|
@ -289,7 +289,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
|
||||||
// Skip NoLooping sustain loop.
|
// Skip NoLooping sustain loop.
|
||||||
pos += 4;
|
pos += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip release loop, we don't need it.
|
// Skip release loop, we don't need it.
|
||||||
pos += 6;
|
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));
|
uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t));
|
||||||
memcpy(sample_data, &aif->data[pos], num_samples);
|
memcpy(sample_data, &aif->data[pos], num_samples);
|
||||||
|
|
||||||
aif_data->samples8 = sample_data;
|
aif_data->samples8 = sample_data;
|
||||||
aif_data->real_num_samples = num_samples;
|
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]);
|
sample_data_swapped[i] = __builtin_bswap16(sample_data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
aif_data->samples16 = sample_data_swapped;
|
aif_data->samples16 = sample_data_swapped;
|
||||||
aif_data->real_num_samples = num_samples;
|
aif_data->real_num_samples = num_samples;
|
||||||
free(sample_data);
|
free(sample_data);
|
||||||
|
@ -329,12 +329,12 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
|
||||||
pos += chunk_size;
|
pos += chunk_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (markers)
|
if (markers)
|
||||||
{
|
{
|
||||||
// Resolve loop points.
|
// Resolve loop points.
|
||||||
struct Marker *cur_marker = markers;
|
struct Marker *cur_marker = markers;
|
||||||
|
|
||||||
// Grab loop start point.
|
// Grab loop start point.
|
||||||
for (int i = 0; i < num_markers; i++, cur_marker++)
|
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);
|
struct Bytes *aif = read_bytearray(aif_filename);
|
||||||
AifData aif_data = {0};
|
AifData aif_data = {0};
|
||||||
read_aif(aif, &aif_data);
|
read_aif(aif, &aif_data);
|
||||||
|
|
||||||
// Convert 16-bit to 8-bit if necessary
|
// Convert 16-bit to 8-bit if necessary
|
||||||
if (aif_data.sample_size == 16)
|
if (aif_data.sample_size == 16)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ static void ConvertFromLatinFont(unsigned char *src, unsigned char *dest, unsign
|
||||||
unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
|
unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < 8; i++) {
|
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);
|
unsigned int destPixelsOffset = (pixelsY * 64) + (pixelsX / 4);
|
||||||
|
|
||||||
dest[destPixelsOffset] = src[srcPixelsOffset + 1];
|
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++) {
|
for (unsigned int i = 0; i < 8; i++) {
|
||||||
unsigned int pixelsY = (row * 16) + (glyphTile * 8) + i;
|
unsigned int pixelsY = (row * 16) + (glyphTile * 8) + i;
|
||||||
unsigned int destPixelsOffset = (pixelsY * 32) + (pixelsX / 4);
|
unsigned int destPixelsOffset = (pixelsY * 32) + (pixelsX / 4);
|
||||||
|
|
||||||
dest[destPixelsOffset] = src[srcPixelsOffset + 1];
|
dest[destPixelsOffset] = src[srcPixelsOffset + 1];
|
||||||
dest[destPixelsOffset + 1] = src[srcPixelsOffset];
|
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);
|
FATAL_ERROR("The file size (%d) is not a multiple of %d.\n", fileSize, glyphSize);
|
||||||
|
|
||||||
int numGlyphs = fileSize / glyphSize;
|
int numGlyphs = fileSize / glyphSize;
|
||||||
|
|
||||||
if (numGlyphs % 16 != 0)
|
if (numGlyphs % 16 != 0)
|
||||||
FATAL_ERROR("The number of glyphs (%d) is not a multiple of 16.\n", numGlyphs);
|
FATAL_ERROR("The number of glyphs (%d) is not a multiple of 16.\n", numGlyphs);
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ void CFile::TryConvertIncbin()
|
||||||
|
|
||||||
if (m_buffer[m_pos] == '\\')
|
if (m_buffer[m_pos] == '\\')
|
||||||
RaiseError("unexpected escape in path string");
|
RaiseError("unexpected escape in path string");
|
||||||
|
|
||||||
m_pos++;
|
m_pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ void CFile::TryConvertIncbin()
|
||||||
|
|
||||||
m_pos++;
|
m_pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_buffer[m_pos] != ')')
|
if (m_buffer[m_pos] != ')')
|
||||||
RaiseError("expected ')'");
|
RaiseError("expected ')'");
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ Lhs CharmapReader::ReadLhs()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_buffer[m_pos] == '\'')
|
if (m_buffer[m_pos] == '\'')
|
||||||
{
|
{
|
||||||
m_pos++;
|
m_pos++;
|
||||||
|
|
|
@ -41,7 +41,7 @@ SourceFileType GetFileType(std::string& path)
|
||||||
return SourceFileType::Inc;
|
return SourceFileType::Inc;
|
||||||
else
|
else
|
||||||
FATAL_ERROR("Unrecognized extension \"%s\"\n", extension.c_str());
|
FATAL_ERROR("Unrecognized extension \"%s\"\n", extension.c_str());
|
||||||
|
|
||||||
// Unreachable
|
// Unreachable
|
||||||
return SourceFileType::Cpp;
|
return SourceFileType::Cpp;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ SourceFile::SourceFile(std::string path)
|
||||||
else
|
else
|
||||||
incbins.insert(outputPath);
|
incbins.insert(outputPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
new (&m_source_file.asm_wrapper) SourceFile::InnerUnion::AsmWrapper{incbins, includes};
|
new (&m_source_file.asm_wrapper) SourceFile::InnerUnion::AsmWrapper{incbins, includes};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue