diff options
Diffstat (limited to 'src/GameInitDispose.cpp')
-rw-r--r-- | src/GameInitDispose.cpp | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp index 0a21275..86bb2bb 100644 --- a/src/GameInitDispose.cpp +++ b/src/GameInitDispose.cpp @@ -998,15 +998,8 @@ void initGame(Game* game) glClearColor(fogcolorr,fogcolorg,fogcolorb,1); game->initialized = true; - /* - for(int i=0;i<sprites.howmanysprites;i++){ - sprites.DeleteSprite(0); - } - for(int i=0;i<decals.howmanydecals;i++){ - decals.DeleteDecal(0); - }*/ - decals.howmanydecals=0; + decals.len = 0; sprites.howmanysprites=0; game->losedelay = 1; } @@ -1032,19 +1025,20 @@ void initGl(Game* game) sprites.raintextureptr = loadTexture("sprites/white.qoi"); sprites.snowtextureptr = loadTexture("sprites/white.qoi"); - decals.bulletholetextureptr = loadTexture("black.qoi"); - decals.cratertextureptr = loadTexture("black.qoi"); - decals.bloodtextureptr[0u] = loadTexture("blood/00.qoi"); - decals.bloodtextureptr[1u] = loadTexture("blood/01.qoi"); - decals.bloodtextureptr[2u] = loadTexture("blood/02.qoi"); - decals.bloodtextureptr[3u] = loadTexture("blood/03.qoi"); - decals.bloodtextureptr[4u] = loadTexture("blood/04.qoi"); - decals.bloodtextureptr[5u] = loadTexture("blood/05.qoi"); - decals.bloodtextureptr[6u] = loadTexture("blood/06.qoi"); - decals.bloodtextureptr[7u] = loadTexture("blood/07.qoi"); - decals.bloodtextureptr[8u] = loadTexture("blood/08.qoi"); - decals.bloodtextureptr[9u] = loadTexture("blood/09.qoi"); - decals.bloodtextureptr[10] = loadTexture("blood/10.qoi"); + // TODO: use more detailed textuures for hole decals + decals.hole_textures[0] = loadTexture("black.qoi"); + decals.hole_textures[1] = loadTexture("black.qoi"); + decals.blood_textures[0u] = loadTexture("blood/00.qoi"); + decals.blood_textures[1u] = loadTexture("blood/01.qoi"); + decals.blood_textures[2u] = loadTexture("blood/02.qoi"); + decals.blood_textures[3u] = loadTexture("blood/03.qoi"); + decals.blood_textures[4u] = loadTexture("blood/04.qoi"); + decals.blood_textures[5u] = loadTexture("blood/05.qoi"); + decals.blood_textures[6u] = loadTexture("blood/06.qoi"); + decals.blood_textures[7u] = loadTexture("blood/07.qoi"); + decals.blood_textures[8u] = loadTexture("blood/08.qoi"); + decals.blood_textures[9u] = loadTexture("blood/09.qoi"); + decals.blood_textures[10] = loadTexture("blood/10.qoi"); } struct Scores getScores(Game* game) @@ -1067,4 +1061,5 @@ void closeGame(Game* game) glDeleteTextures(5, textures); alDeleteSources(33 + game->musictoggle * 4, gSourceID); alDeleteBuffers(33 + game->musictoggle * 4, gSampleSet); + destroyDecals(&decals); } |