Initialize rottile values to -1 with a loop like this instead, because doing it the C++ way increases the binary size by like 120KB

git-svn-id: https://svn.eduke32.com/eduke32@7255 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-12-15 01:37:19 +00:00
parent 891bac2b0f
commit ae39954376
2 changed files with 5 additions and 2 deletions

View File

@ -832,7 +832,7 @@ typedef struct {
uint8_t sf; // anim. speed and flags
} picanm_t;
EXTERN picanm_t picanm[MAXTILES];
typedef struct { int16_t newtile = -1; int16_t owner = -1; } rottile_t;
typedef struct { int16_t newtile; int16_t owner; } rottile_t;
EXTERN rottile_t rottile[MAXTILES];
EXTERN intptr_t waloff[MAXTILES]; // stores pointers to cache -- SA

View File

@ -555,9 +555,12 @@ int32_t artLoadFiles(const char *filename, int32_t askedsize)
Bmemset(&tilesiz[0], 0, sizeof(vec2s_t) * MAXTILES);
Bmemset(picanm, 0, sizeof(picanm));
for (auto &rot : rottile)
rot = { -1, -1 };
// artsize = 0;
for (bssize_t tilefilei=0; tilefilei<MAXARTFILES_BASE; tilefilei++)
for (int tilefilei=0; tilefilei<MAXARTFILES_BASE; tilefilei++)
artReadIndexedFile(tilefilei);
Bmemset(gotpic, 0, sizeof(gotpic));