Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -75,8 +75,8 @@ static void OpenBankFile(const std::string &filename)
/* Read riff tags */
for (;;) {
uint32 tag = original_sound_file->ReadDword();
uint32 size = original_sound_file->ReadDword();
uint32_t tag = original_sound_file->ReadDword();
uint32_t size = original_sound_file->ReadDword();
if (tag == ' tmf') {
original_sound_file->ReadWord(); // wFormatTag
@@ -132,7 +132,7 @@ static bool SetBankSource(MixerChannel *mc, const SoundEntry *sound)
return false;
}
int8 *mem = MallocT<int8>(sound->file_size + 2);
int8_t *mem = MallocT<int8_t>(sound->file_size + 2);
/* Add two extra bytes so rate conversion can read these
* without reading out of its input buffer. */
mem[sound->file_size ] = 0;
@@ -152,7 +152,7 @@ static bool SetBankSource(MixerChannel *mc, const SoundEntry *sound)
#if TTD_ENDIAN == TTD_BIG_ENDIAN
if (sound->bits_per_sample == 16) {
uint num_samples = sound->file_size / 2;
int16 *samples = (int16 *)mem;
int16_t *samples = (int16_t *)mem;
for (uint i = 0; i < num_samples; i++) {
samples[i] = BSWAP16(samples[i]);
}