- Added Martin Howe's fixes for morphing and DECORATE function prototypes.

- Minor fixes in texture code.


SVN r922 (trunk)
This commit is contained in:
Christoph Oelckers 2008-04-17 20:34:58 +00:00
parent 87a480041c
commit 5d0dc65044
7 changed files with 19 additions and 7 deletions

View file

@ -1,3 +1,7 @@
April 17, 2008 (Changes by Graf Zahl)
- Added Martin Howe's fixes for morphing and DECORATE function prototypes.
- Minor fixes in texture code.
April 16, 2008 April 16, 2008
- Fixed: The FMOD::System object was never released, only closed, so - Fixed: The FMOD::System object was never released, only closed, so
snd_reset would eventually run into the hard limit on the total number snd_reset would eventually run into the hard limit on the total number

View file

@ -535,6 +535,7 @@ void APowerStrength::InitEffect ()
void APowerStrength::Tick () void APowerStrength::Tick ()
{ {
// Strength counts up to diminish the fade. // Strength counts up to diminish the fade.
assert(EffectTics < (INT_MAX - 1)); // I can't see a game lasting nearly two years, but...
EffectTics += 2; EffectTics += 2;
Super::Tick(); Super::Tick();
} }
@ -998,6 +999,7 @@ void APowerFlight::Tick ()
// The Wings of Wrath only expire in multiplayer and non-hub games // The Wings of Wrath only expire in multiplayer and non-hub games
if (!multiplayer && (level.flags & LEVEL_INFINITE_FLIGHT)) if (!multiplayer && (level.flags & LEVEL_INFINITE_FLIGHT))
{ {
assert(EffectTics < INT_MAX); // I can't see a game lasting nearly two years, but...
EffectTics++; EffectTics++;
} }

View file

@ -42,6 +42,7 @@ struct FCopyInfo;
class FBitmap class FBitmap
{ {
protected:
BYTE *data; BYTE *data;
int Width; int Width;
int Height; int Height;
@ -109,6 +110,11 @@ public:
return data; return data;
} }
BYTE *GetPixels()
{
return data;
}
virtual void CopyPixelDataRGB(int originx, int originy, const BYTE *patch, int srcwidth, virtual void CopyPixelDataRGB(int originx, int originy, const BYTE *patch, int srcwidth,
int srcheight, int step_x, int step_y, int rotate, int ct, FCopyInfo *inf = NULL); int srcheight, int step_x, int step_y, int rotate, int ct, FCopyInfo *inf = NULL);

View file

@ -121,7 +121,7 @@ FTexture::FTexture ()
: LeftOffset(0), TopOffset(0), : LeftOffset(0), TopOffset(0),
WidthBits(0), HeightBits(0), xScale(FRACUNIT), yScale(FRACUNIT), WidthBits(0), HeightBits(0), xScale(FRACUNIT), yScale(FRACUNIT),
UseType(TEX_Any), bNoDecals(false), bNoRemap0(false), bWorldPanning(false), UseType(TEX_Any), bNoDecals(false), bNoRemap0(false), bWorldPanning(false),
bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(0), bIsPatch(false), bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(0), bIsPatch(false), bComplex(false),
Rotations(0xFFFF), Width(0), Height(0), WidthMask(0), Native(NULL) Rotations(0xFFFF), Width(0), Height(0), WidthMask(0), Native(NULL)
{ {
*Name = 0; *Name = 0;

View file

@ -313,7 +313,7 @@ void A_PlaySoundEx (AActor *self)
int soundid = StateParameters[index]; int soundid = StateParameters[index];
ENamedName channel = ENamedName(StateParameters[index + 1]); ENamedName channel = ENamedName(StateParameters[index + 1]);
INTBOOL looping = StateParameters[index + 2]; INTBOOL looping = EvalExpressionI(StateParameters[index + 2], self);
int attenuation_raw = EvalExpressionI(StateParameters[index + 3], self); int attenuation_raw = EvalExpressionI(StateParameters[index + 3], self);
int attenuation; int attenuation;

View file

@ -754,11 +754,11 @@ static int ParseMorphStyle (FScanner &sc)
{ {
static const char * morphstyles[]={ static const char * morphstyles[]={
"MRF_ADDSTAMINA", "MRF_FULLHEALTH", "MRF_UNDOBYTOMEOFPOWER", "MRF_UNDOBYCHAOSDEVICE", "MRF_ADDSTAMINA", "MRF_FULLHEALTH", "MRF_UNDOBYTOMEOFPOWER", "MRF_UNDOBYCHAOSDEVICE",
"MRF_FAILNOTELEFRAG", "MRF_FAILNOLAUGH", "MRF_WHENINVULNERABLE", NULL}; "MRF_FAILNOTELEFRAG", "MRF_FAILNOLAUGH", "MRF_WHENINVULNERABLE", "MRF_LOSEACTUALWEAPON", NULL};
static const int morphstyle_values[]={ static const int morphstyle_values[]={
MORPH_ADDSTAMINA, MORPH_FULLHEALTH, MORPH_UNDOBYTOMEOFPOWER, MORPH_UNDOBYCHAOSDEVICE, MORPH_ADDSTAMINA, MORPH_FULLHEALTH, MORPH_UNDOBYTOMEOFPOWER, MORPH_UNDOBYCHAOSDEVICE,
MORPH_FAILNOTELEFRAG, MORPH_FAILNOLAUGH, MORPH_WHENINVULNERABLE}; MORPH_FAILNOTELEFRAG, MORPH_FAILNOLAUGH, MORPH_WHENINVULNERABLE, MORPH_LOSEACTUALWEAPON};
// May be given flags by number... // May be given flags by number...
if (sc.CheckNumber()) if (sc.CheckNumber())

View file

@ -124,7 +124,7 @@ class Actor extends Thinker
action native A_FLoopActiveSound(); action native A_FLoopActiveSound();
action native A_LoopActiveSound(); action native A_LoopActiveSound();
action native A_StopSound(); action native A_StopSound();
action native A_PlaySoundEx(sound whattoplay, coerce name slot, optional bool looping, optional eval int attenuation); action native A_PlaySoundEx(sound whattoplay, coerce name slot, optional eval bool looping, optional eval int attenuation);
action native A_StopSoundEx(coerce name slot); action native A_StopSoundEx(coerce name slot);
action native A_SeekerMissile(eval int threshold, eval int turnmax); action native A_SeekerMissile(eval int threshold, eval int turnmax);
action native A_Jump(eval int chance, state label, ...); action native A_Jump(eval int chance, state label, ...);
@ -174,8 +174,8 @@ class Actor extends Thinker
action native A_LookEx(optional eval int flags, optional eval float minseedist, optional eval float maxseedist, optional eval float maxheardist, optional eval float fov, optional state label); action native A_LookEx(optional eval int flags, optional eval float minseedist, optional eval float maxseedist, optional eval float maxheardist, optional eval float fov, optional state label);
action native A_ClearTarget(); action native A_ClearTarget();
action native A_JumpIfTargetInLOS (state label, optional eval float fov); action native A_JumpIfTargetInLOS (state label, optional eval float fov);
action native A_DamageMaster(int amount, optional name damagetype); action native A_DamageMaster(eval int amount, optional name damagetype);
action native A_DamageChildren(int amount, optional name damagetype); action native A_DamageChildren(eval int amount, optional name damagetype);
action native A_SelectWeapon(class<Weapon> whichweapon); action native A_SelectWeapon(class<Weapon> whichweapon);
action native A_Punch(); action native A_Punch();
} }