mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- Now that I think about it, why is MBFParamStates an array of pointers, anyway?
SVN r1840 (trunk)
This commit is contained in:
parent
f1dc490151
commit
7b23effc02
1 changed files with 5 additions and 6 deletions
|
@ -152,7 +152,7 @@ struct MBFParamState
|
||||||
FState *state;
|
FState *state;
|
||||||
int pointer;
|
int pointer;
|
||||||
};
|
};
|
||||||
static TArray<MBFParamState *> MBFParamStates;
|
static TArray<MBFParamState> MBFParamStates;
|
||||||
// Data on how to correctly modify the codepointers
|
// Data on how to correctly modify the codepointers
|
||||||
struct CodePointerAlias
|
struct CodePointerAlias
|
||||||
{
|
{
|
||||||
|
@ -1610,9 +1610,9 @@ static void SetPointer(FState *state, PSymbol *sym, int frame = 0)
|
||||||
{
|
{
|
||||||
if (!symname.CompareNoCase(MBFCodePointers[i].name))
|
if (!symname.CompareNoCase(MBFCodePointers[i].name))
|
||||||
{
|
{
|
||||||
MBFParamState *newstate = new MBFParamState;
|
MBFParamState newstate;
|
||||||
newstate->state = state;
|
newstate.state = state;
|
||||||
newstate->pointer = i;
|
newstate.pointer = i;
|
||||||
MBFParamStates.Push(newstate);
|
MBFParamStates.Push(newstate);
|
||||||
break; // No need to cycle through the rest of the list.
|
break; // No need to cycle through the rest of the list.
|
||||||
}
|
}
|
||||||
|
@ -2494,8 +2494,7 @@ static void UnloadDehSupp ()
|
||||||
// Handle MBF params here, before the required arrays are cleared
|
// Handle MBF params here, before the required arrays are cleared
|
||||||
for (unsigned int i=0; i < MBFParamStates.Size(); i++)
|
for (unsigned int i=0; i < MBFParamStates.Size(); i++)
|
||||||
{
|
{
|
||||||
SetDehParams(MBFParamStates[i]->state, MBFParamStates[i]->pointer);
|
SetDehParams(MBFParamStates[i].state, MBFParamStates[i].pointer);
|
||||||
delete MBFParamStates[i];
|
|
||||||
}
|
}
|
||||||
MBFParamStates.Clear();
|
MBFParamStates.Clear();
|
||||||
MBFParamStates.ShrinkToFit();
|
MBFParamStates.ShrinkToFit();
|
||||||
|
|
Loading…
Reference in a new issue