ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
HouseTypeClass
The HouseTypeClass holds default settings for Houses which are loaded from an INI file.
HouseTypes are also known as Countries.
Class specifications
Property | Value |
---|---|
General: | |
Derivation | AbstractClass → AbstractTypeClass → HouseTypeClass |
GUID | {1DD43928-046B-11D2-ACA4-006008055BB5} |
VT address (YR 1.001) | 0x7EAB58 |
Size of member data (YR 1.001) | 0x1B0 bytes |
AbstractClass derivative: | |
AbstractDerivation ID | 0x0E |
Member variables
Offset | Type | Name | Description |
---|---|---|---|
AbstractClass: | |||
0x0 | ptr | VirtualTable | Pointer to the class's Virtual Table |
0x4 | ptr | IRTTITypeInfo VTable | Pointer to an extended VTable (not sure what exactly it does) |
0x8 | ptr | INoticeSink VTable | Pointer to an extended VTable (not sure what exactly it does) |
0xC | ptr | INoticeSource VTable | Pointer to an extended VTable (not sure what exactly it does) |
0x10 | DWORD | unknown | |
0x14 | DWORD | DerivationFlags | Bit 0: set if the instance is or derives from a TechnoClass Bit 1: set if the instance is or derives from a ObjectClass Bit 2: set if the instance is or derives from a FootClass |
0x18 | DWORD | unknown | |
0x1C | DWORD | unknown | |
0x20 | bool | Dirty | Was the object changed since it was last saved? |
0x21 | BYTE | unused | |
0x22 | WORD | unused | |
AbstractTypeClass: | |||
0x24 | char[0x18] | ID | The INI name of this type (for example: SMCV). |
0x3C | BYTE | reserved | Zero-termination of the ID. |
0x3D | char[0x20] | UIName | Stringtable reference given by the UIName tag. |
0x5D | BYTE | reserved | Zero-termination of the UIName. |
0x5E | WORD | unused | |
0x60 | wchar* | UIName | Pointer to the UIName unicode string inside the stringtable. |
0x64 | char[0x31] | Name | Name given by the Name tag. |
0x95 | BYTE | reserved | Zero-termination of the Name. |
0x96 | WORD | unused | |
HouseTypeClass: | |||
0x98 | char[0x18] | ParentCountry | |
0xB0 | BYTE | reserved | Zero-termination of the ParentCountry string. |
0xB1 | BYTE | unused | |
0xB2 | WORD | unused | |
0xB4 | int | Index | Index in the global HouseTypeClass array. |
0xB8 | int | Index | Index in the global HouseTypeClass array. (stored twice for some reason?) |
0xBC | int | Side index | Index of this country's side in the global SideClass array. |
0xC0 | ColorScheme* | Color | |
0xC4 | DWORD | unused | |
0xC8 | double | Firepower | |
0xD0 | double | Groundspeed | |
0xD8 | double | Airspeed | |
0xE0 | double | Armor | |
0xE8 | double | ROF | |
0xF0 | double | Cost | |
0xF8 | double | BuildTime | |
0x100 | float | ArmorInfantryMult | |
0x104 | float | ArmorUnitsMult | |
0x108 | float | ArmorAircraftMult | |
0x10C | float | ArmorBuildingsMult | |
0x110 | float | ArmorDefensesMult | |
0x114 | float | CostInfantryMult | |
0x118 | float | CostUnitsMult | |
0x11C | float | CostAircraftMult | |
0x120 | float | CostBuildingsMult | |
0x124 | float | CostDefensesMult | |
0x128 | float | SpeedInfantryMult | |
0x12C | float | SpeedUnitsMult | |
0x130 | float | SpeedAircraftMult | |
0x134 | float | BuildTimeInfantryMult | |
0x138 | float | BuildTimeUnitsMult | |
0x13C | float | BuildTimeAircraftMult | |
0x140 | float | BuildTimeBuildingsMult | |
0x144 | float | BuildTimeDefensesMult | |
0x148 | float | IncomeMult | |
0x14C | vector<InfantryTypeClass*> | VeteranInfantry | |
0x168 | vector<UnitTypeClass*> | VeteranUnits | |
0x184 | vector<AircraftTypeClass*> | VeteranAircraft | |
0x1A0 | char[0x4] | Suffix | |
0x1A4 | char[0x1] | Prefix | |
0x1A5 | bool | Multiplay | |
0x1A6 | bool | MultiplayPassive | |
0x1A7 | bool | WallOwner | |
0x1A8 | bool | SmartAI | |
0x1A9 | BYTE | unused | |
0x1AA | WORD | unused | |
0x1AC | DWORD | unused |
AbstractClass - Member Variables |
AbstractTypeClass - Member Variables |
HouseTypeClass - Member Variables |
Virtual Table
Offset | Return Type | Name | Arguments | Description |
---|---|---|---|---|
IUnknown: | ||||
0x0 | HRESULT | QueryInterface | REFIID iid void ** ppvObject |
MSDN: "Returns a pointer to a specified interface on an object to which a client currently holds an interface pointer." |
0x4 | ULONG | AddRef | none | MSDN: "[...] increments the reference count for an interface on an object. It should be called for every new copy of a pointer to an interface on a given object." |
0x8 | ULONG | Release | none | MSDN: "Decrements the reference count for the calling interface on a object. If the reference count on the object falls to 0, the object is freed from memory." |
IPersist: | ||||
0xC | HRESULT | GetClassID | CLSID * pClassID | MSDN: "Retrieves the class identifier (CLSID) of an object. The CLSID is a unique value that identifies the code that can manipulate the persistent data." |
IPersistStream: | ||||
0x10 | HRESULT | IsDirty | none | MSDN: "Checks the object for changes since it was last saved." |
0x14 | HRESULT | Load | IStream* stream AbstractClass* dst |
MSDN: "Initializes an object from the stream where it was previously saved." |
0x18 | HRESULT | Save | IStream* stream AbstractClass* src (3rd is unknown) |
MSDN: "Saves an object to the specified stream." |
0x1C | HRESULT | GetMaxSize | ULARGE_INTEGER * pcbSize | MSDN: "Returns the size in bytes of the stream needed to save the object." |
AbstractClass: | ||||
0x20 | none (DTOR) | Destructor | none | Frees memory and removes this instance from global arrays. |
0x24 | unknown | unknown | unknown | |
0x28 | unknown | unknown | unknown | |
0x2C | int | GetAbstractDerivationID | none | Gets the AbstractDerivationID of this class. Used to find out "what something is". |
0x30 | int | GetSize | none | Gets the size of the member data. |
0x34 | unsigned long | GetCRC | unknown | Calculates a CRC sum of this instance. |
0x38 | int | GetOwningHouseIndex | none | Gets the index of the House (player) who owns this object. |
0x3C | HouseClass* | GetOwningHouse | none | Gets a pointer to the House (player) who owns this object. |
0x40 | int | GetArrayIndex | none | Gets the index of this class instance in the global array. This will return 0 for abstract classes. |
0x44 | bool | IsDead | none | Finds out whether this instance is dead. This is only used for "living" objects with a health. |
0x48 | void | Get3DCoords | int* dst_xyz | Loads 3D coordinates into dst_xyz. |
0x4C | void | Get3DCoords_var | int* dst_xyz | Loads 3D coordinates into variables, then into dst_xyz. This method is obsolete (use 0x48). |
0x50 | unknown | unknown | unknown | |
0x54 | unknown | unknown | unknown | |
0x58 | unknown | unknown | unknown | |
0x5C | void | AdvanceFrame | none | This is an updating routine, called every frame. |
AbstractTypeClass: | ||||
0x60 | unknown | unknown | unknown | |
0x64 | bool | LoadFromINI | CCINIClass* ini | Initializes the type based on the INI file section ID. |
0x68 | bool | SaveToINI | CCINIClass* ini | Saves this type to an INI file. |
AbstractClass - Virtual Table |
AbstractTypeClass - Virtual Table |
Member functions
Address (YR 1.001) | Return Type | Name | Arguments | Description |
---|---|---|---|---|
0x5113F0 | ptr (CTOR) | Constructor | char* ID | Creates an instance. |