OpenTyrian: Reverted C++-isms from code, to match upstream more closely

This commit is contained in:
pelya
2014-06-09 00:30:50 +03:00
parent cc172312e5
commit eb81855ac7
22 changed files with 80 additions and 91 deletions

View File

@@ -105,7 +105,7 @@ bool lds_load( FILE *f, unsigned int music_offset, unsigned int music_size )
efread(&numpatch, 2, 1, f);
free(soundbank);
soundbank = (SoundBank *)malloc(sizeof(SoundBank) * numpatch);
soundbank = malloc(sizeof(SoundBank) * numpatch);
for (unsigned int i = 0; i < numpatch; i++)
{
@@ -149,7 +149,7 @@ bool lds_load( FILE *f, unsigned int music_offset, unsigned int music_size )
efread(&numposi, 2, 1, f);
free(positions);
positions = (Position *)malloc(sizeof(Position) * 9 * numposi);
positions = malloc(sizeof(Position) * 9 * numposi);
for (unsigned int i = 0; i < numposi; i++)
{
@@ -173,7 +173,7 @@ bool lds_load( FILE *f, unsigned int music_offset, unsigned int music_size )
unsigned int remaining = music_size - (ftell(f) - music_offset);
free(patterns);
patterns = (Uint16 *)malloc(sizeof(Uint16) * (remaining / 2));
patterns = malloc(sizeof(Uint16) * (remaining / 2));
for (unsigned int i = 0; i < remaining / 2; i++)
efread(&patterns[i], 2, 1, f);