Skip to content

Commit

Permalink
Fixing layout of ScenarioClass, adding some stuff to House/HouseType,…
Browse files Browse the repository at this point in the history
… and potentially fixing Verses.

git-svn-id: svn://svn.renegadeprojects.com/yrpp/trunk@283 bbc44d77-a14d-0410-bbfb-905795908d03
  • Loading branch information
DCoderLT committed Mar 28, 2010
1 parent 143e1b2 commit bed12f4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1,081 deletions.
2 changes: 2 additions & 0 deletions Conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ class Conversions
}
if(CLOSE_ENOUGH(vs, 0.01)) {
*specialFX &= ~verses_Retaliate;
specialed = true;
}
if(CLOSE_ENOUGH(vs, 0.00)) {
*specialFX &= ~verses_ForceFire;
specialed = true;
}
if(!specialed) {
*specialFX |= verses_ForceFire;
Expand Down
9 changes: 6 additions & 3 deletions HouseClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ class HouseClass : public AbstractClass, public IHouse, public IPublicHouse, pub
public:
enum {AbsID = abs_House};

// <Player @ A> and friends map to these constants
enum {PlayerAtA = 4475, PlayerAtB, PlayerAtC, PlayerAtD, PlayerAtE, PlayerAtF, PlayerAtG, PlayerAtH};

//Static
static DynamicVectorClass<HouseClass*>* Array;

Expand Down Expand Up @@ -270,10 +273,10 @@ class HouseClass : public AbstractClass, public IHouse, public IPublicHouse, pub
// these are for mostly for map actions - HouseClass* foo = IsMP() ? Find_YesMP() : Find_NoMP();
static bool Index_IsMP(int idx)
{ JMP_STD(0x510F60); }
static HouseClass * FindByIndex_NoMP(int idxHouse)
static HouseClass * FindByCountryIndex(int HouseType) // find first house of this houseType
{ JMP_STD(0x502D30); }
static HouseClass * FindByIndex_YesMP(int idxHouse)
{ JMP_STD(0x510ED0); }
static HouseClass * FindByIndex(int idxHouse) // find house at given index
{ JMP_STD(0x510ED0); } // 0..15 map to ScenarioClass::HouseIndices, also supports PlayerAtA and up

CellStruct * PickIonCannonTarget(CellStruct &dest)
{ JMP_THIS(0x50CBF0); }
Expand Down
3 changes: 3 additions & 0 deletions HouseTypeClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class HouseTypeClass : public AbstractTypeClass
HouseTypeClass(const char* pID) : AbstractTypeClass(false)
{ JMP_THIS(0x5113F0); }

static signed int FindIndexOfName(const char *name)
{ JMP_STD(0x5117D0); }

protected:
HouseTypeClass() : AbstractTypeClass(false) { }

Expand Down
Loading

0 comments on commit bed12f4

Please sign in to comment.