From f8bdceab389c1e994bd1c6a66239014209180dda Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 20 May 2006 09:16:08 +0000 Subject: [PATCH] - Fixed: The automap code had the check for rotation reversed. - Changed type PClass::FreeIndices to TArray because that's the type of the indices. - Fixed: makewad.c needs __cdecl for non-Windows builds. - Fixed: FinishThingdef didn't check whether the WeaponClass pointer in AWeaponPiece was a valid name. SVN r133 (trunk) --- docs/rh-log.txt | 8 ++++++++ src/am_map.cpp | 2 +- src/dobject.cpp | 2 +- src/thingdef.cpp | 12 ++++++------ tools/makewad/makewad.c | 4 ++++ 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 7e9dadb1f..6ae3ce61e 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,11 @@ +May 20, 2006 (Changes by Graf Zahl) +- Fixed: The automap code had the check for rotation reversed. +- Changed type PClass::FreeIndices to TArray because that's + the type of the indices. +- Fixed: makewad.c needs __cdecl for non-Windows builds. +- Fixed: FinishThingdef didn't check whether the WeaponClass pointer in + AWeaponPiece was a valid name. + May 19, 2006 - Fixed: FloorAndCeiling_Raise/Lower did not work with slopes because they used ZatPointDist instead of PointToDist to calculate the destination diff --git a/src/am_map.cpp b/src/am_map.cpp index 058aee353..3aae69d63 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -496,7 +496,7 @@ static void AM_ClipRotatedExtents () { fixed_t rmin_x, rmin_y, rmax_x, rmax_y; - if (am_rotate == 1 || (am_rotate == 2 && viewactive)) + if (am_rotate == 0 || (am_rotate == 2 && !viewactive)) { rmin_x = min_x; rmin_y = min_y; diff --git a/src/dobject.cpp b/src/dobject.cpp index e460045d7..04a37b361 100644 --- a/src/dobject.cpp +++ b/src/dobject.cpp @@ -343,7 +343,7 @@ CCMD (dumpclasses) } TArray DObject::Objects (TArray::NoInit); -TArray DObject::FreeIndices (TArray::NoInit); +TArray DObject::FreeIndices (TArray::NoInit); TArray DObject::ToDestroy (TArray::NoInit); bool DObject::Inactive; diff --git a/src/thingdef.cpp b/src/thingdef.cpp index 689242625..05ce24d9c 100644 --- a/src/thingdef.cpp +++ b/src/thingdef.cpp @@ -3632,7 +3632,7 @@ void FinishThingdef() v = defaults->AmmoType1; if (v != NAME_None && v.IsValidName()) { - defaults->AmmoType1 = PClass::FindClass(v.GetChars()); + defaults->AmmoType1 = PClass::FindClass(v); if (!defaults->AmmoType1) { SC_ScriptError("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); @@ -3646,7 +3646,7 @@ void FinishThingdef() v = defaults->AmmoType2; if (v != NAME_None && v.IsValidName()) { - defaults->AmmoType2 = PClass::FindClass(v.GetChars()); + defaults->AmmoType2 = PClass::FindClass(v); if (!defaults->AmmoType2) { SC_ScriptError("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); @@ -3660,7 +3660,7 @@ void FinishThingdef() v = defaults->SisterWeaponType; if (v != NAME_None && v.IsValidName()) { - defaults->SisterWeaponType = PClass::FindClass(v.GetChars()); + defaults->SisterWeaponType = PClass::FindClass(v); if (!defaults->SisterWeaponType) { SC_ScriptError("Unknown sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); @@ -3689,14 +3689,14 @@ void FinishThingdef() fuglyname v; v = defaults->WeaponClass; - if (v != NAME_None) + if (v != NAME_None && v.IsValidName()) { - defaults->WeaponClass = PClass::FindClass(v.GetChars()); + defaults->WeaponClass = PClass::FindClass(v); if (!defaults->WeaponClass) { SC_ScriptError("Unknown weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); } - else if (defaults->WeaponClass->ParentClass != RUNTIME_CLASS(AWeapon)) + else if (!defaults->WeaponClass->IsDescendantOf(RUNTIME_CLASS(AWeapon))) { SC_ScriptError("Invalid weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); } diff --git a/tools/makewad/makewad.c b/tools/makewad/makewad.c index b4d05827b..8e0540460 100644 --- a/tools/makewad/makewad.c +++ b/tools/makewad/makewad.c @@ -450,6 +450,10 @@ int buildwad (FILE *listfile, char *listfilename, char *makecmd, char *makefile) return ret; } +#if !defined(_MSC_VER) +#define __cdecl +#endif + int __cdecl main (int argc, char **argv) { FILE *listfile = NULL;