mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-22 08:49:46 +01:00
Minor visual cleanup of reloadresources
This commit is contained in:
parent
f422d02dcd
commit
21b6c22195
1 changed files with 16 additions and 16 deletions
|
@ -2824,23 +2824,23 @@ void Graphics::reloadresources() {
|
||||||
grphx = GraphicsResources();
|
grphx = GraphicsResources();
|
||||||
grphx.init();
|
grphx.init();
|
||||||
|
|
||||||
for (size_t i = 0; i < images.size(); i++){ SDL_FreeSurface(images[i]); }
|
#define CLEAR_ARRAY(name) \
|
||||||
images.clear();
|
for (size_t i = 0; i < name.size(); i += 1) \
|
||||||
for (size_t i = 0; i < tiles.size(); i++){ SDL_FreeSurface(tiles[i]); }
|
{ \
|
||||||
tiles.clear();
|
SDL_FreeSurface(name[i]); \
|
||||||
for (size_t i = 0; i < tiles2.size(); i++){ SDL_FreeSurface(tiles2[i]); }
|
} \
|
||||||
tiles2.clear();
|
name.clear();
|
||||||
for (size_t i = 0; i < tiles3.size(); i++){ SDL_FreeSurface(tiles3[i]); }
|
|
||||||
tiles3.clear();
|
|
||||||
for (size_t i = 0; i < entcolours.size(); i++){ SDL_FreeSurface(entcolours[i]); }
|
|
||||||
entcolours.clear();
|
|
||||||
for (size_t i = 0; i < sprites.size(); i++){ SDL_FreeSurface(sprites[i]); }
|
|
||||||
sprites.clear();
|
|
||||||
for (size_t i = 0; i < flipsprites.size(); i++){ SDL_FreeSurface(flipsprites[i]); }
|
|
||||||
flipsprites.clear();
|
|
||||||
|
|
||||||
for (size_t i = 0; i < tele.size(); i++){ SDL_FreeSurface(tele[i]); }
|
CLEAR_ARRAY(images)
|
||||||
tele.clear();
|
CLEAR_ARRAY(tiles)
|
||||||
|
CLEAR_ARRAY(tiles2)
|
||||||
|
CLEAR_ARRAY(tiles3)
|
||||||
|
CLEAR_ARRAY(entcolours)
|
||||||
|
CLEAR_ARRAY(sprites)
|
||||||
|
CLEAR_ARRAY(flipsprites)
|
||||||
|
CLEAR_ARRAY(tele)
|
||||||
|
|
||||||
|
#undef CLEAR_ARRAY
|
||||||
|
|
||||||
MakeTileArray();
|
MakeTileArray();
|
||||||
MakeSpriteArray();
|
MakeSpriteArray();
|
||||||
|
|
Loading…
Reference in a new issue