- added compile time checks for bad state links and state label references.
- preserve a state's source line information for the postprocessing phase so that the checker can output more useful information. - added missing check for weapon psprites to DPSprite::SetState.
This commit is contained in:
parent
647e1399f1
commit
96d093d01f
10 changed files with 179 additions and 45 deletions
|
|
@ -913,7 +913,7 @@ bool FStateDefinitions::SetLoop()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int FStateDefinitions::AddStates(FState *state, const char *framechars)
|
||||
int FStateDefinitions::AddStates(FState *state, const char *framechars, const FScriptPosition &sc)
|
||||
{
|
||||
bool error = false;
|
||||
int frame = 0;
|
||||
|
|
@ -939,6 +939,7 @@ int FStateDefinitions::AddStates(FState *state, const char *framechars)
|
|||
state->Frame = frame;
|
||||
state->SameFrame = noframe;
|
||||
StateArray.Push(*state);
|
||||
SourceLines.Push(sc);
|
||||
++count;
|
||||
|
||||
// NODELAY flag is not carried past the first state
|
||||
|
|
@ -968,6 +969,7 @@ int FStateDefinitions::FinishStates(PClassActor *actor, AActor *defaults)
|
|||
memcpy(realstates, &StateArray[0], count*sizeof(FState));
|
||||
actor->OwnedStates = realstates;
|
||||
actor->NumOwnedStates = count;
|
||||
SaveStateSourceLines(realstates, SourceLines);
|
||||
|
||||
// adjust the state pointers
|
||||
// In the case new states are added these must be adjusted, too!
|
||||
|
|
@ -1012,6 +1014,7 @@ int FStateDefinitions::FinishStates(PClassActor *actor, AActor *defaults)
|
|||
}
|
||||
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Prints all state label info to the logfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue