mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-31 04:20:34 +00:00
- Added DavidPH's AProp_ScaleX/Y / A_SetScale submission.
SVN r3000 (trunk)
This commit is contained in:
parent
2f06007ad4
commit
1f43f4e961
5 changed files with 41 additions and 3 deletions
|
@ -312,6 +312,7 @@ static void ReadArrayVars (PNGHandle *png, FWorldGlobalArray *vars, size_t count
|
||||||
{
|
{
|
||||||
SDWORD key, val;
|
SDWORD key, val;
|
||||||
key = arc.ReadCount();
|
key = arc.ReadCount();
|
||||||
|
|
||||||
val = arc.ReadCount();
|
val = arc.ReadCount();
|
||||||
vars[i].Insert (key, val);
|
vars[i].Insert (key, val);
|
||||||
}
|
}
|
||||||
|
@ -2537,8 +2538,10 @@ enum
|
||||||
APROP_MasterTID = 25,
|
APROP_MasterTID = 25,
|
||||||
APROP_TargetTID = 26,
|
APROP_TargetTID = 26,
|
||||||
APROP_TracerTID = 27,
|
APROP_TracerTID = 27,
|
||||||
APROP_WaterLevel = 28
|
APROP_WaterLevel = 28,
|
||||||
};
|
APROP_ScaleX = 29,
|
||||||
|
APROP_ScaleY = 30,
|
||||||
|
};
|
||||||
|
|
||||||
// These are needed for ACS's APROP_RenderStyle
|
// These are needed for ACS's APROP_RenderStyle
|
||||||
static const int LegacyRenderStyleIndices[] =
|
static const int LegacyRenderStyleIndices[] =
|
||||||
|
@ -2718,6 +2721,14 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
||||||
DoSetMaster (actor, other);
|
DoSetMaster (actor, other);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case APROP_ScaleX:
|
||||||
|
actor->scaleX = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_ScaleY:
|
||||||
|
actor->scaleY = value;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// do nothing.
|
// do nothing.
|
||||||
break;
|
break;
|
||||||
|
@ -2780,6 +2791,9 @@ int DLevelScript::GetActorProperty (int tid, int property)
|
||||||
case APROP_TargetTID: return (actor->target != NULL)? actor->target->tid : 0;
|
case APROP_TargetTID: return (actor->target != NULL)? actor->target->tid : 0;
|
||||||
case APROP_TracerTID: return (actor->tracer != NULL)? actor->tracer->tid : 0;
|
case APROP_TracerTID: return (actor->tracer != NULL)? actor->tracer->tid : 0;
|
||||||
case APROP_WaterLevel: return actor->waterlevel;
|
case APROP_WaterLevel: return actor->waterlevel;
|
||||||
|
case APROP_ScaleX: return actor->scaleX;
|
||||||
|
case APROP_ScaleY: return actor->scaleY;
|
||||||
|
|
||||||
default: return 0;
|
default: return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2020,6 +2020,23 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeTo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// A_Scale(float scalex, optional float scaley)
|
||||||
|
//
|
||||||
|
// Scales the actor's graphics. If scaley is 0, use scalex.
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetScale)
|
||||||
|
{
|
||||||
|
ACTION_PARAM_START(2);
|
||||||
|
ACTION_PARAM_FIXED(scalex, 0);
|
||||||
|
ACTION_PARAM_FIXED(scaley, 1);
|
||||||
|
|
||||||
|
self->scaleX = scalex;
|
||||||
|
self->scaleY = scaley ? scaley : scalex;
|
||||||
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
// A_SpawnDebris
|
// A_SpawnDebris
|
||||||
|
@ -2632,6 +2649,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInLOS)
|
||||||
|
|
||||||
if (an > (fov / 2) && an < (ANGLE_MAX - (fov / 2)))
|
if (an > (fov / 2) && an < (ANGLE_MAX - (fov / 2)))
|
||||||
{
|
{
|
||||||
|
|
||||||
return; // [KS] Outside of FOV - return
|
return; // [KS] Outside of FOV - return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,8 @@ DEFINE_MEMBER_VARIABLE(velz, AActor)
|
||||||
DEFINE_MEMBER_VARIABLE_ALIAS(momx, velx, AActor)
|
DEFINE_MEMBER_VARIABLE_ALIAS(momx, velx, AActor)
|
||||||
DEFINE_MEMBER_VARIABLE_ALIAS(momy, vely, AActor)
|
DEFINE_MEMBER_VARIABLE_ALIAS(momy, vely, AActor)
|
||||||
DEFINE_MEMBER_VARIABLE_ALIAS(momz, velz, AActor)
|
DEFINE_MEMBER_VARIABLE_ALIAS(momz, velz, AActor)
|
||||||
|
DEFINE_MEMBER_VARIABLE(scaleX, AActor)
|
||||||
|
DEFINE_MEMBER_VARIABLE(scaleY, AActor)
|
||||||
DEFINE_MEMBER_VARIABLE(Damage, AActor)
|
DEFINE_MEMBER_VARIABLE(Damage, AActor)
|
||||||
DEFINE_MEMBER_VARIABLE(Score, AActor)
|
DEFINE_MEMBER_VARIABLE(Score, AActor)
|
||||||
|
|
||||||
|
@ -675,6 +677,7 @@ FxExpression *FxUnaryNotBoolean::Resolve(FCompileContext& ctx)
|
||||||
{
|
{
|
||||||
CHECKRESOLVED();
|
CHECKRESOLVED();
|
||||||
if (Operand)
|
if (Operand)
|
||||||
|
|
||||||
{
|
{
|
||||||
Operand = Operand->ResolveAsBoolean(ctx);
|
Operand = Operand->ResolveAsBoolean(ctx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
#if SVN_REVISION_NUMBER < MINSAVEVER
|
#if SVN_REVISION_NUMBER < MINSAVEVER
|
||||||
// If we don't know the current revision write something very high to ensure that
|
// If we don't know the current revision write something very high to ensure that
|
||||||
// the reesulting executable can read its own savegames but no regular engine can.
|
// the reesulting executable can read its own savegames but no regular engine can.
|
||||||
#define SAVEVER 9999
|
#define SAVEVER 999999
|
||||||
#define SAVESIG MakeSaveSig()
|
#define SAVESIG MakeSaveSig()
|
||||||
static inline const char *MakeSaveSig()
|
static inline const char *MakeSaveSig()
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,6 +47,8 @@ ACTOR Actor native //: Thinker
|
||||||
native fixed_t momx; // alias for velx
|
native fixed_t momx; // alias for velx
|
||||||
native fixed_t momy; // alias for vely
|
native fixed_t momy; // alias for vely
|
||||||
native fixed_t momz; // alias for velz
|
native fixed_t momz; // alias for velz
|
||||||
|
native fixed_t scaleX;
|
||||||
|
native fixed_t scaleY;
|
||||||
native int score;
|
native int score;
|
||||||
|
|
||||||
// Meh, MBF redundant functions. Only for DeHackEd support.
|
// Meh, MBF redundant functions. Only for DeHackEd support.
|
||||||
|
@ -204,6 +206,7 @@ ACTOR Actor native //: Thinker
|
||||||
action native A_FadeIn(float reduce = 0.1);
|
action native A_FadeIn(float reduce = 0.1);
|
||||||
action native A_FadeOut(float reduce = 0.1, bool remove = true);
|
action native A_FadeOut(float reduce = 0.1, bool remove = true);
|
||||||
action native A_FadeTo(float target, float amount = 0.1, bool remove = false);
|
action native A_FadeTo(float target, float amount = 0.1, bool remove = false);
|
||||||
|
action native A_SetScale(float scalex, float scaley = 0);
|
||||||
action native A_SpawnDebris(class<Actor> spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1);
|
action native A_SpawnDebris(class<Actor> spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1);
|
||||||
action native A_CheckSight(state label);
|
action native A_CheckSight(state label);
|
||||||
action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);
|
action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);
|
||||||
|
|
Loading…
Reference in a new issue