mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- State parser fixes.
SVN r1255 (trunk)
This commit is contained in:
parent
9adef560c2
commit
0b120116ab
3 changed files with 8 additions and 4 deletions
|
@ -59,12 +59,11 @@ extern void LoadDecorations ();
|
|||
int GetSpriteIndex(const char * spritename)
|
||||
{
|
||||
// Make sure that the string is upper case and 4 characters long
|
||||
char upper[5];
|
||||
char upper[5]={0,0,0,0,0};
|
||||
for (int i = 0; spritename[i] != 0 && i < 4; i++)
|
||||
{
|
||||
upper[i] = toupper (spritename[i]);
|
||||
}
|
||||
upper[4] = 0;
|
||||
|
||||
for (unsigned i = 0; i < sprites.Size (); ++i)
|
||||
{
|
||||
|
|
|
@ -540,6 +540,7 @@ void FStateDefinitions::MakeStateList(const FStateLabels *list, TArray<FStateDef
|
|||
|
||||
def.Label = list->Labels[i].Label;
|
||||
def.State = list->Labels[i].State;
|
||||
def.DefineFlags = SDF_STATE;
|
||||
dest.Push(def);
|
||||
if (list->Labels[i].Children != NULL)
|
||||
{
|
||||
|
@ -721,10 +722,11 @@ void FStateDefinitions::FixStatePointers (FActorInfo *actor, TArray<FStateDefine
|
|||
{
|
||||
for(unsigned i=0;i<list.Size(); i++)
|
||||
{
|
||||
size_t v=(size_t)list[i].State;
|
||||
if (v >= 1 && v < 0x10000)
|
||||
if (list[i].DefineFlags == SDF_INDEX)
|
||||
{
|
||||
size_t v=(size_t)list[i].State;
|
||||
list[i].State = actor->OwnedStates + v - 1;
|
||||
list[i].DefineFlags = SDF_STATE;
|
||||
}
|
||||
if (list[i].Children.Size() > 0) FixStatePointers(actor, list[i].Children);
|
||||
}
|
||||
|
@ -764,6 +766,8 @@ int FStateDefinitions::FinishStates (FActorInfo *actor, AActor *defaults, TArray
|
|||
static int c=0;
|
||||
int count = StateArray.Size();
|
||||
|
||||
DPrintf("Finishing states for %s\n", actor->Class->TypeName.GetChars());
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
FState *realstates = new FState[count];
|
||||
|
|
|
@ -311,6 +311,7 @@ bool ParsePropertyParams(FScanner &sc, FPropertyInfo *prop, AActor *defaults, Ba
|
|||
|
||||
nocomma = false;
|
||||
conv.s = NULL;
|
||||
pref.s = NULL;
|
||||
pref.i = -1;
|
||||
switch ((*p) & 223)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue