mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 08:53:51 +00:00
Cleanup
svn-id: r17913
This commit is contained in:
parent
4120ae9921
commit
fd326b4ce2
17
gob/game.cpp
17
gob/game.cpp
@ -1870,26 +1870,21 @@ void game_playTot(int16 skipPlay) {
|
||||
draw_blitInvalidated();
|
||||
free(game_totFileData);
|
||||
game_totFileData = 0;
|
||||
if (game_totTextData != 0 && needTextFree != 0)
|
||||
free(game_totTextData);
|
||||
|
||||
if (needTextFree)
|
||||
free(game_totTextData);
|
||||
game_totTextData = 0;
|
||||
|
||||
if (game_totResourceTable != 0
|
||||
&& needFreeResTable != 0)
|
||||
if (needFreeResTable)
|
||||
free(game_totResourceTable);
|
||||
|
||||
game_totResourceTable = 0;
|
||||
|
||||
if (game_imFileData != 0)
|
||||
free(game_imFileData);
|
||||
|
||||
free(game_imFileData);
|
||||
game_imFileData = 0;
|
||||
|
||||
if (game_extTable != 0)
|
||||
free(game_extTable);
|
||||
|
||||
free(game_extTable);
|
||||
game_extTable = 0;
|
||||
|
||||
if (game_extHandle >= 0)
|
||||
data_closeData(game_extHandle);
|
||||
|
||||
|
@ -1842,23 +1842,14 @@ void gob_freeObjects(void) {
|
||||
|
||||
for (state = 0; state < 40; state++) {
|
||||
for (col = 0; col < 6; col++) {
|
||||
|
||||
if (gob_goblins[i]->stateMach[state][col] != 0) {
|
||||
free(gob_goblins[i]->
|
||||
stateMach[state][col]);
|
||||
gob_goblins[i]->stateMach[state][col] =
|
||||
0;
|
||||
}
|
||||
free(gob_goblins[i]->stateMach[state][col]);
|
||||
gob_goblins[i]->stateMach[state][col] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 3) {
|
||||
for (state = 40; state < 70; state++) {
|
||||
if (gob_goblins[3]->stateMach[state][0] == 0)
|
||||
continue;
|
||||
|
||||
free(gob_goblins[3]->
|
||||
stateMach[state][0]);
|
||||
free(gob_goblins[3]->stateMach[state][0]);
|
||||
gob_goblins[3]->stateMach[state][0] = 0;
|
||||
}
|
||||
}
|
||||
@ -1876,11 +1867,7 @@ void gob_freeObjects(void) {
|
||||
|
||||
for (state = 0; state < 40; state++) {
|
||||
for (col = 0; col < 6; col++) {
|
||||
if (gob_objects[i]->stateMach[state][col] == 0)
|
||||
continue;
|
||||
|
||||
free(gob_objects[i]->
|
||||
stateMach[state][col]);
|
||||
free(gob_objects[i]->stateMach[state][col]);
|
||||
gob_objects[i]->stateMach[state][col] = 0;
|
||||
}
|
||||
}
|
||||
|
15
gob/init.cpp
15
gob/init.cpp
@ -282,17 +282,10 @@ memBlocks = word ptr -2*/
|
||||
cd_stopPlaying();
|
||||
cd_freeLICbuffer();
|
||||
|
||||
if (inter_variables != 0)
|
||||
free(inter_variables);
|
||||
|
||||
if (game_totFileData != 0)
|
||||
free(game_totFileData);
|
||||
|
||||
if (game_totTextData != 0)
|
||||
free(game_totTextData);
|
||||
|
||||
if (game_totResourceTable != 0)
|
||||
free(game_totResourceTable);
|
||||
free(inter_variables);
|
||||
free(game_totFileData);
|
||||
free(game_totTextData);
|
||||
free(game_totResourceTable);
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
37
gob/mult.cpp
37
gob/mult.cpp
@ -475,11 +475,8 @@ void mult_freeMult(void) {
|
||||
if (anim_underAnimSurf != 0)
|
||||
vid_freeSurfDesc(anim_underAnimSurf);
|
||||
|
||||
if (mult_objects != 0)
|
||||
free(mult_objects);
|
||||
|
||||
if (mult_renderData != 0)
|
||||
free(mult_renderData);
|
||||
free(mult_objects);
|
||||
free(mult_renderData);
|
||||
|
||||
mult_objects = 0;
|
||||
mult_renderData = 0;
|
||||
@ -931,24 +928,19 @@ void mult_playMult(int16 startFrame, int16 endFrame, char checkEscape,
|
||||
|
||||
if (stopNoClear == 0) {
|
||||
if (mult_animDataAllocated) {
|
||||
if (mult_objects)
|
||||
free(mult_objects);
|
||||
free(mult_objects);
|
||||
mult_objects = 0;
|
||||
|
||||
if (mult_renderData)
|
||||
free(mult_renderData);
|
||||
free(mult_renderData);
|
||||
mult_renderData = 0;
|
||||
|
||||
if (mult_animArrayX)
|
||||
free(mult_animArrayX);
|
||||
free(mult_animArrayX);
|
||||
mult_animArrayX = 0;
|
||||
|
||||
if (mult_animArrayY)
|
||||
free(mult_animArrayY);
|
||||
free(mult_animArrayY);
|
||||
mult_animArrayY = 0;
|
||||
|
||||
if (mult_animArrayData)
|
||||
free(mult_animArrayData);
|
||||
free(mult_animArrayData);
|
||||
mult_animArrayData = 0;
|
||||
|
||||
if (anim_underAnimSurf)
|
||||
@ -1178,24 +1170,19 @@ void mult_freeMultKeys(void) {
|
||||
mult_multData = 0;
|
||||
|
||||
if (mult_animDataAllocated != 0) {
|
||||
if (mult_objects)
|
||||
free(mult_objects);
|
||||
free(mult_objects);
|
||||
mult_objects = 0;
|
||||
|
||||
if (mult_renderData)
|
||||
free(mult_renderData);
|
||||
free(mult_renderData);
|
||||
mult_renderData = 0;
|
||||
|
||||
if (mult_animArrayX)
|
||||
free(mult_animArrayX);
|
||||
free(mult_animArrayX);
|
||||
mult_animArrayX = 0;
|
||||
|
||||
if (mult_animArrayY)
|
||||
free(mult_animArrayY);
|
||||
free(mult_animArrayY);
|
||||
mult_animArrayY = 0;
|
||||
|
||||
if (mult_animArrayData)
|
||||
free(mult_animArrayData);
|
||||
free(mult_animArrayData);
|
||||
mult_animArrayData = 0;
|
||||
|
||||
if (anim_underAnimSurf)
|
||||
|
@ -228,10 +228,8 @@ void pal_fade(PalDesc *palDesc, int16 fade, int16 allColors) {
|
||||
util_clearPalette();
|
||||
}
|
||||
|
||||
if (tmpPalBuffer != 0) {
|
||||
free(tmpPalBuffer);
|
||||
tmpPalBuffer = 0;
|
||||
}
|
||||
free(tmpPalBuffer);
|
||||
tmpPalBuffer = 0;
|
||||
}
|
||||
|
||||
} // End of namespace Gob
|
||||
|
Loading…
x
Reference in New Issue
Block a user