Reduce memory usage with about 15 megs
This commit is contained in:
parent
646d96b58a
commit
c9ae53d71f
2 changed files with 6 additions and 0 deletions
src
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue