Reduce memory usage with about 15 megs

This commit is contained in:
nobody_ 2004-01-31 10:52:23 +00:00
parent 646d96b58a
commit c9ae53d71f
2 changed files with 6 additions and 0 deletions

View file

@ -1365,6 +1365,11 @@ global void LoadUnitTypeSprite(UnitType* unittype)
fprintf(stdout, "Unit-type %s not found\n", type->SameSprite);
ExitFatal(-1);
}
if (!type->Sprite) {
LoadUnitTypeSprite(type);
}
unittype->Sprite = type->Sprite;
return;
} else {
type = unittype;
}

View file

@ -199,6 +199,7 @@ global Graphic* LoadGraphicPNG(const char* name)
return NULL;
}
#ifdef DEBUG
DebugLevel3Fn("%10d: %s: %d * %d\n" _C_ w * h _C_ name _C_ w _C_ h);
AllocatedGraphicMemory += h * w;
#endif