Split init loop into separate loops based on size

This commit is contained in:
Peje Nilsson 2017-06-07 09:15:03 +00:00
parent 91ad0185ff
commit 850620ac30

View file

@ -262,13 +262,18 @@ int read_database(FILE* database) {
* section 6's stuff. CTEXT(N) points to a player-class message. TTEXT is for * section 6's stuff. CTEXT(N) points to a player-class message. TTEXT is for
* section 14. We also clear COND (see description of section 9 for details). */ * section 14. We also clear COND (see description of section 9 for details). */
for (int I=1; I<=300; I++) { for (int I=1; I<=NOBJECTS; I++) {
if(I <= NOBJECTS) PTEXT[I] = 0; PTEXT[I] = 0;
if(I <= RTXSIZ) RTEXT[I] = 0; OBJSND[I] = 0;
if(I <= CLSMAX) CTEXT[I] = 0; OBJTXT[I] = 0;
if(I <= NOBJECTS) OBJSND[I] = 0; }
if(I <= NOBJECTS) OBJTXT[I] = 0; for (int I=1; I<=RTXSIZ; I++) {
if(I > LOCSIZ) break; RTEXT[I] = 0;
}
for (int I=1; I<=CLSMAX; I++) {
CTEXT[I] = 0;
}
for (int I=1; I<=LOCSIZ; I++) {
STEXT[I] = 0; STEXT[I] = 0;
LTEXT[I] = 0; LTEXT[I] = 0;
COND[I] = 0; COND[I] = 0;