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

@@ -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};
}
}