diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 40aff2012..ef7f167fe 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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 - Fixed: The FMOD::System object was never released, only closed, so snd_reset would eventually run into the hard limit on the total number diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 4c89b8c5d..4643bad3b 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -535,6 +535,7 @@ void APowerStrength::InitEffect () void APowerStrength::Tick () { // 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; Super::Tick(); } @@ -998,6 +999,7 @@ void APowerFlight::Tick () // The Wings of Wrath only expire in multiplayer and non-hub games if (!multiplayer && (level.flags & LEVEL_INFINITE_FLIGHT)) { + assert(EffectTics < INT_MAX); // I can't see a game lasting nearly two years, but... EffectTics++; } diff --git a/src/textures/bitmap.h b/src/textures/bitmap.h index ad42152c2..6fd2ed6b0 100644 --- a/src/textures/bitmap.h +++ b/src/textures/bitmap.h @@ -42,6 +42,7 @@ struct FCopyInfo; class FBitmap { +protected: BYTE *data; int Width; int Height; @@ -109,6 +110,11 @@ public: return data; } + BYTE *GetPixels() + { + return data; + } + 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); diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 4417e1b71..8bea144c7 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -121,7 +121,7 @@ FTexture::FTexture () : LeftOffset(0), TopOffset(0), WidthBits(0), HeightBits(0), xScale(FRACUNIT), yScale(FRACUNIT), 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) { *Name = 0; diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e74359194..32462a470 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -313,7 +313,7 @@ void A_PlaySoundEx (AActor *self) int soundid = StateParameters[index]; 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; diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 0496de609..1501edfaa 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -754,11 +754,11 @@ static int ParseMorphStyle (FScanner &sc) { static const char * morphstyles[]={ "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[]={ 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... if (sc.CheckNumber()) diff --git a/wadsrc/decorate/nativeclasses.txt b/wadsrc/decorate/nativeclasses.txt index 2a46114c0..7b0aed679 100644 --- a/wadsrc/decorate/nativeclasses.txt +++ b/wadsrc/decorate/nativeclasses.txt @@ -124,7 +124,7 @@ class Actor extends Thinker action native A_FLoopActiveSound(); action native A_LoopActiveSound(); 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_SeekerMissile(eval int threshold, eval int turnmax); 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_ClearTarget(); action native A_JumpIfTargetInLOS (state label, optional eval float fov); - action native A_DamageMaster(int amount, optional name damagetype); - action native A_DamageChildren(int amount, optional name damagetype); + action native A_DamageMaster(eval int amount, optional name damagetype); + action native A_DamageChildren(eval int amount, optional name damagetype); action native A_SelectWeapon(class whichweapon); action native A_Punch(); }