diff --git a/AbstractClass.h b/AbstractClass.h index 72b0f78e..466f1700 100644 --- a/AbstractClass.h +++ b/AbstractClass.h @@ -87,11 +87,11 @@ class NOVTABLE AbstractClass : public IPersistStream, public IRTTITypeInfo, publ virtual HouseClass* GetOwningHouse() const R0; virtual int GetArrayIndex() const R0; virtual bool IsDead() const R0; - virtual CoordStruct* GetCoords(CoordStruct* pCrd) const R0; - virtual CoordStruct* GetDestination(CoordStruct* pCrd, TechnoClass* pDocker = nullptr) const R0; // where this is moving, or a building's dock for a techno. iow, a rendez-vous point + virtual CoordStruct GetCoords() const RT(CoordStruct); + virtual CoordStruct GetDestination(TechnoClass* pDocker = nullptr) const RT(CoordStruct); // where this is moving, or a building's dock for a techno. iow, a rendez-vous point virtual bool IsOnFloor() const R0; virtual bool IsInAir() const R0; - virtual CoordStruct* GetCenterCoords(CoordStruct* pCrd) const R0; + virtual CoordStruct GetCenterCoords() const RT(CoordStruct); virtual void Update() RX; //non-virtual @@ -104,24 +104,6 @@ class NOVTABLE AbstractClass : public IPersistStream, public IRTTITypeInfo, publ AnnounceExpiredPointer(this, removed); } - CoordStruct GetCoords() const { - CoordStruct ret; - this->GetCoords(&ret); - return ret; - } - - CoordStruct GetDestination(TechnoClass* pDocker = nullptr) const { - CoordStruct ret; - this->GetDestination(&ret, pDocker); - return ret; - } - - CoordStruct GetCenterCoords() const { - CoordStruct ret; - this->GetCenterCoords(&ret); - return ret; - } - DirStruct* GetTargetDirection(DirStruct* pDir, AbstractClass* pTarget) const { JMP_THIS(0x5F3DB0); } diff --git a/BounceClass.h b/BounceClass.h index 13eb22c7..06ce88d7 100644 --- a/BounceClass.h +++ b/BounceClass.h @@ -29,24 +29,12 @@ class BounceClass double maxVelocity, const Vector3D& velocity, double angularVelocity) { JMP_THIS(0x4397E0); } - CoordStruct* GetCoords(CoordStruct* pBuffer) const + CoordStruct GetCoords() const { JMP_THIS(0x4399A0); } - CoordStruct GetCoords() const { - CoordStruct buffer; - this->GetCoords(&buffer); - return buffer; - } - - Matrix3D* GetDrawingMatrix(Matrix3D* pBuffer) const + Matrix3D GetDrawingMatrix() const { JMP_THIS(0x4399E0); } - Matrix3D GetDrawingMatrix() const { - Matrix3D buffer; - this->GetDrawingMatrix(&buffer); - return buffer; - } - Status Update() { JMP_THIS(0x439B00); } diff --git a/BuildingClass.h b/BuildingClass.h index 5bbb0d6c..fcd449d6 100644 --- a/BuildingClass.h +++ b/BuildingClass.h @@ -200,7 +200,7 @@ class NOVTABLE BuildingClass : public TechnoClass bool CheckFog() { JMP_THIS(0x457A10); } - Matrix3D* GetVoxelBarrelOffsetMatrix(Matrix3D& ret) + Matrix3D GetVoxelBarrelOffsetMatrix() { JMP_THIS(0x458810); } // returns false if this is a gate that is closed, true otherwise diff --git a/CCINIClass.h b/CCINIClass.h index 4d1a50bb..6c4ccebe 100644 --- a/CCINIClass.h +++ b/CCINIClass.h @@ -150,10 +150,10 @@ class NOVTABLE INIClass //Reads three integer values. int* Read3Integers(int* pBuffer, const char* pSection, const char* pKey, int* pDefault) { JMP_THIS(0x529CA0); } - CoordStruct* ReadPoint3D(CoordStruct& ret, const char* pSection, const char* pKey, CoordStruct& defValue) + CoordStruct ReadPoint3D(const char* pSection, const char* pKey, CoordStruct& defValue) { JMP_THIS(0x529CA0); } void GetPoint3D(const char* pSection, const char* pKey, CoordStruct& value) - { ReadPoint3D(value, pSection, pKey, value); } + { value = ReadPoint3D(pSection, pKey, value); } //Reads three byte values. byte* Read3Bytes(byte* pBuffer, const char* pSection, const char* pKey, byte* pDefault) diff --git a/CellClass.h b/CellClass.h index 54f93d42..5020adea 100644 --- a/CellClass.h +++ b/CellClass.h @@ -186,15 +186,8 @@ class NOVTABLE CellClass : public AbstractClass { JMP_THIS(0x47B3A0); } // Factors in cell height from ramps, level etc. - CoordStruct* GetCellCoords(CoordStruct* pOutBuffer) const - { JMP_THIS(0x480A30); } - CoordStruct GetCellCoords() const - { - CoordStruct buffer; - GetCellCoords(&buffer); - return buffer; - } + { JMP_THIS(0x480A30); } void ActivateVeins() { JMP_THIS(0x486920); } @@ -337,7 +330,7 @@ class NOVTABLE CellClass : public AbstractClass CALL(0x489270); } - CoordStruct* FindInfantrySubposition(CoordStruct* pOutBuffer, const CoordStruct& coords, bool ignoreContents, bool alt, bool useCellCoords) + CoordStruct FindInfantrySubposition(CoordStruct* pOutBuffer, const CoordStruct& coords, bool ignoreContents, bool alt, bool useCellCoords) { JMP_THIS(0x481180); } CoordStruct FindInfantrySubposition(const CoordStruct& coords, bool ignoreContents, bool alt, bool useCellCoords) diff --git a/DisplayClass.h b/DisplayClass.h index bda0faa8..034e068e 100644 --- a/DisplayClass.h +++ b/DisplayClass.h @@ -56,15 +56,9 @@ class NOVTABLE DisplayClass : public MapClass { JMP_THIS(0x692610); } /* pass in CurrentFoundationData and receive the width/height of a bounding rectangle in cells */ - CellStruct* FoundationBoundsSize(CellStruct& outBuffer, CellStruct const* const pFoundationData) const + CellStruct FoundationBoundsSize(CellStruct const* const pFoundationData) const { JMP_THIS(0x4A94F0); } - CellStruct FoundationBoundsSize(CellStruct const* const pFoundationData) const { - CellStruct outBuffer; - FoundationBoundsSize(outBuffer, pFoundationData); - return outBuffer; - } - /* marks or unmarks the cells pointed to by CurrentFoundationData as containing a building */ void MarkFoundation(CellStruct * BaseCell, bool Mark) { JMP_THIS(0x4A95A0); } diff --git a/DropPodLocomotionClass.h b/DropPodLocomotionClass.h index 63649e5c..ef439b5a 100644 --- a/DropPodLocomotionClass.h +++ b/DropPodLocomotionClass.h @@ -19,7 +19,7 @@ class NOVTABLE DropPodLocomotionClass : public LocomotionClass, public IPiggybac //ILocomotion virtual bool __stdcall Is_Moving() R0; - virtual CoordStruct* __stdcall Destination(CoordStruct* pcoord) R0; + virtual CoordStruct __stdcall Destination() RT(CoordStruct); virtual bool __stdcall Process() R0; virtual void __stdcall Move_To(CoordStruct to) RX; virtual void __stdcall Stop_Moving() RX; diff --git a/EBolt.h b/EBolt.h index 49b42de9..5bfae6f1 100644 --- a/EBolt.h +++ b/EBolt.h @@ -27,15 +27,9 @@ class EBolt void ClearOwner() { JMP_THIS(0x4C1E50); } - CoordStruct* GetSourceCoords(CoordStruct* outBuffer) const + CoordStruct GetSourceCoords() const { JMP_THIS(0x4C2B40); } - CoordStruct GetSourceCoords() const { - CoordStruct buffer; - GetSourceCoords(&buffer); - return buffer; - } - void Fire(CoordStruct P1, CoordStruct P2, DWORD arg18) { JMP_THIS(0x4C2A60); } diff --git a/FlyLocomotionClass.h b/FlyLocomotionClass.h index 15c5d82f..eb50455e 100644 --- a/FlyLocomotionClass.h +++ b/FlyLocomotionClass.h @@ -16,7 +16,7 @@ class NOVTABLE FlyLocomotionClass : public LocomotionClass //ILocomotion virtual bool __stdcall Is_Moving() R0; - virtual CoordStruct* __stdcall Destination(CoordStruct* pcoord) R0; + virtual CoordStruct __stdcall Destination() RT(CoordStruct); virtual bool __stdcall Process() R0; virtual void __stdcall Move_To(CoordStruct to) RX; virtual void __stdcall Stop_Moving() RX; diff --git a/FootClass.h b/FootClass.h index 877b382b..6cfbcca7 100644 --- a/FootClass.h +++ b/FootClass.h @@ -41,7 +41,7 @@ class NOVTABLE FootClass : public TechnoClass virtual bool CanDeployNow() const R0; virtual void AddSensorsAt(CellStruct cell) RX; virtual void RemoveSensorsAt(CellStruct cell) RX; - virtual CoordStruct* vt_entry_4F0(CoordStruct* pCrd) R0; + virtual CoordStruct vt_entry_4F0() RT(CoordStruct); virtual void vt_entry_4F4() RX; virtual bool vt_entry_4F8() R0; virtual bool MoveTo(CoordStruct* pCrd) R0; diff --git a/HouseClass.h b/HouseClass.h index 2887eef4..08c7d2bc 100644 --- a/HouseClass.h +++ b/HouseClass.h @@ -657,24 +657,12 @@ class NOVTABLE HouseClass : public AbstractClass, public IHouse, public IPublicH bool Fire_SW(int idx, const CellStruct &coords) { JMP_THIS(0x4FAE50); } - CellStruct* PickTargetByType(CellStruct &outBuffer, QuarryType targetType) const + CellStruct PickTargetByType(QuarryType targetType) const { JMP_THIS(0x50D170); } - CellStruct PickTargetByType(QuarryType targetType) const { - CellStruct outBuffer; - this->PickTargetByType(outBuffer, targetType); - return outBuffer; - } - - CellStruct* PickIonCannonTarget(CellStruct &outBuffer) const + CellStruct PickIonCannonTarget() const { JMP_THIS(0x50CBF0); } - CellStruct PickIonCannonTarget() const { - CellStruct outBuffer; - this->PickIonCannonTarget(outBuffer); - return outBuffer; - } - bool IsIonCannonEligibleTarget(const TechnoClass* pTechno) const; void UpdateFlagCoords(UnitClass *NewCarrier, DWORD dwUnk) diff --git a/IsometricTileTypeClass.h b/IsometricTileTypeClass.h index d506dbd6..7a8235f1 100644 --- a/IsometricTileTypeClass.h +++ b/IsometricTileTypeClass.h @@ -25,7 +25,7 @@ class NOVTABLE IsometricTileTypeClass : public ObjectTypeClass virtual int GetArrayIndex() const R0; //ObjectTypeClass - virtual CoordStruct* vt_entry_6C(CoordStruct* pDest, CoordStruct* pSrc) const R0; + virtual CoordStruct vt_entry_6C(CoordStruct* pSrc) const RT(CoordStruct); virtual bool SpawnAtMapCoords(CellStruct* pMapCoords, HouseClass* pOwner) R0; diff --git a/JumpjetLocomotionClass.h b/JumpjetLocomotionClass.h index e66e959d..8c184aa9 100644 --- a/JumpjetLocomotionClass.h +++ b/JumpjetLocomotionClass.h @@ -34,7 +34,7 @@ class NOVTABLE JumpjetLocomotionClass : public LocomotionClass, public IPiggybac //ILocomotion virtual bool __stdcall Is_Moving() R0; - virtual CoordStruct* __stdcall Destination(CoordStruct* pcoord) R0; + virtual CoordStruct __stdcall Destination() RT(CoordStruct); virtual bool __stdcall Process() R0; virtual void __stdcall Move_To(CoordStruct to) RX; virtual void __stdcall Stop_Moving() RX; diff --git a/MPGameModeClass.h b/MPGameModeClass.h index 6b107e0b..18a946b1 100644 --- a/MPGameModeClass.h +++ b/MPGameModeClass.h @@ -218,8 +218,7 @@ class MPGameModeClass virtual void CreateMPTeams(DynamicVectorClass *vecTeams) { JMP_THIS(0x5D6690); } - virtual CellStruct * AssignStartingPositionsToHouse(CellStruct *result, int idxHouse, - DynamicVectorClass *vecCoords, byte *housesSatisfied) + virtual CellStruct AssignStartingPositionsToHouse(int idxHouse, DynamicVectorClass *vecCoords, byte *housesSatisfied) { JMP_THIS(0x5D6890); } virtual bool SpawnBaseUnits(HouseClass *House, DWORD dwUnused) diff --git a/MapClass.h b/MapClass.h index 8ba37adc..cf324d0c 100644 --- a/MapClass.h +++ b/MapClass.h @@ -255,26 +255,13 @@ class NOVTABLE MapClass : public GScreenClass } // gets a coordinate in a random direction a fixed distance in leptons away from coords - static CoordStruct* __fastcall GetRandomCoordsNear(CoordStruct &outBuffer, const CoordStruct &coords, int distance, bool center) { + static CoordStruct __fastcall GetRandomCoordsNear(const CoordStruct &coords, int distance, bool center) { JMP_STD(0x49F420); } - // gets a coordinate in a random direction a fixed distance in leptons away from coords - static CoordStruct GetRandomCoordsNear(const CoordStruct &coords, int distance, bool center) { - CoordStruct outBuffer; - GetRandomCoordsNear(outBuffer, coords, distance, center); - return outBuffer; - } - - static CoordStruct* __stdcall PickInfantrySublocation(CoordStruct &outBuffer, const CoordStruct &coords, bool ignoreContents = false) + static CoordStruct __stdcall PickInfantrySublocation(const CoordStruct &coords, bool ignoreContents = false) { JMP_STD(0x4ACA10); } - static CoordStruct PickInfantrySublocation(const CoordStruct &coords, bool ignoreContents = false) { - CoordStruct outBuffer; - PickInfantrySublocation(outBuffer, coords, ignoreContents); - return outBuffer; - } - static void __fastcall UnselectAll() { JMP_STD(0x48DC90); } @@ -330,17 +317,9 @@ class NOVTABLE MapClass : public GScreenClass int GetCellFloorHeight(const CoordStruct& crd) const { JMP_THIS(0x578080); } - CellStruct * PickCellOnEdge(CellStruct &buffer, Edge Edge, const CellStruct &CurrentLocation, const CellStruct &Fallback, - SpeedType SpeedType, bool ValidateReachability, MovementZone MovZone) const - { JMP_THIS(0x4AA440); } - CellStruct PickCellOnEdge(Edge Edge, const CellStruct &CurrentLocation, const CellStruct &Fallback, SpeedType SpeedType, bool ValidateReachability, MovementZone MovZone) const - { - CellStruct buffer; - this->PickCellOnEdge(buffer, Edge, CurrentLocation, Fallback, SpeedType, ValidateReachability, MovZone); - return buffer; - } + { JMP_THIS(0x4AA440); } // Pathfinding voodoo // do not touch them, mmkay, they trigger ZoneConnection recalc which is a MUST for firestorm to work @@ -352,15 +331,9 @@ class NOVTABLE MapClass : public GScreenClass { JMP_THIS(0x586990); } // Find nearest spot - CellStruct* NearByLocation(CellStruct &outBuffer, const CellStruct &position, SpeedType SpeedType, int a5, MovementZone MovementZone, bool alt, int SpaceSizeX, int SpaceSizeY, bool disallowOverlay, bool a11, bool requireBurrowable, bool allowBridge, const CellStruct &closeTo, bool a15, bool buildable) + CellStruct NearByLocation(const CellStruct &position, SpeedType SpeedType, int a5, MovementZone MovementZone, bool alt, int SpaceSizeX, int SpaceSizeY, bool disallowOverlay, bool a11, bool requireBurrowable, bool allowBridge, const CellStruct &closeTo, bool a15, bool buildable) { JMP_THIS(0x56DC20); } - CellStruct NearByLocation(const CellStruct &position, SpeedType SpeedType, int a5, MovementZone MovementZone, bool alt, int SpaceSizeX, int SpaceSizeY, bool disallowOverlay, bool a11, bool requireBurrowable, bool allowBridge, const CellStruct &closeTo, bool a15, bool buildable) { - CellStruct outBuffer; - NearByLocation(outBuffer, position, SpeedType, a5, MovementZone, alt, SpaceSizeX, SpaceSizeY, disallowOverlay, a11, requireBurrowable, allowBridge, closeTo, a15, buildable); - return outBuffer; - } - void AddContentAt(CellStruct *coords, TechnoClass *Content) { JMP_THIS(0x5683C0); } @@ -386,24 +359,6 @@ class NOVTABLE MapClass : public GScreenClass bool PlacePowerupCrate(CellStruct cell, Powerup type) { JMP_THIS(0x56BEC0); } -// ==================================== -// FIRESTORM RELATED -// ==================================== - - CoordStruct* FindFirstFirestorm( - CoordStruct* pOutBuffer, const CoordStruct& start, - const CoordStruct& end, HouseClass const* pHouse = nullptr) const - { JMP_THIS(0x5880A0); } - - CoordStruct FindFirstFirestorm( - const CoordStruct& start, const CoordStruct& end, - HouseClass const* pHouse = nullptr) const - { - CoordStruct outBuffer; - FindFirstFirestorm(&outBuffer, start, end, pHouse); - return outBuffer; - } - // ==================================== // MAP REVEAL BRAINDAMAGE // ==================================== diff --git a/ObjectClass.h b/ObjectClass.h index 13e14fbb..1bf5b618 100644 --- a/ObjectClass.h +++ b/ObjectClass.h @@ -95,12 +95,12 @@ class NOVTABLE ObjectClass : public AbstractClass virtual bool IsControllable() const R0; // On non-buildings this is same as GetCenterCoord(), on buildings it returns the target coordinate that is affected by TargetCoordOffset. - virtual CoordStruct* GetTargetCoords(CoordStruct* pCrd) const R0; + virtual CoordStruct GetTargetCoords() const RT(CoordStruct); // gets a building's free dock coordinates for a unit. falls back to this->GetCoords(pCrd); - virtual CoordStruct* GetDockCoords(CoordStruct* pCrd, TechnoClass* docker) const R0; - virtual CoordStruct* GetRenderCoords(CoordStruct* pCrd) const { JMP_THIS(0x41BE00); } - virtual CoordStruct* GetFLH(CoordStruct *pDest, int idxWeapon, CoordStruct BaseCoords) const R0; - virtual CoordStruct* GetExitCoords(CoordStruct* pCrd, DWORD dwUnk) const R0; + virtual CoordStruct GetDockCoords(TechnoClass* docker) const RT(CoordStruct); + virtual CoordStruct GetRenderCoords() const { JMP_THIS(0x41BE00); } + virtual CoordStruct GetFLH(int idxWeapon, CoordStruct BaseCoords = CoordStruct {0, 0, 0}) const RT(CoordStruct); + virtual CoordStruct GetExitCoords(DWORD dwUnk) const RT(CoordStruct); virtual int GetYSort() const { JMP_THIS(0x5F6BD0); } virtual bool IsOnBridge(TechnoClass* pDocker = nullptr) const R0; // pDocker is passed to GetDestination virtual bool IsStandingStill() const R0; @@ -178,11 +178,11 @@ class NOVTABLE ObjectClass : public AbstractClass virtual void SetLocation(const CoordStruct& crd) RX; // these two work through the object's Location - virtual CellStruct* GetMapCoords(CellStruct* pUCell) const R0; + virtual CellStruct GetMapCoords() const RT(CellStruct); virtual CellClass* GetCell() const R0; // these two call ::GetCoords_() instead - virtual CellStruct* GetMapCoordsAgain(CellStruct* pUCell) const R0; + virtual CellStruct GetMapCoordsAgain() const RT(CellStruct); virtual CellClass* GetCellAgain() const R0; virtual int GetHeight() const R0; @@ -233,38 +233,6 @@ class NOVTABLE ObjectClass : public AbstractClass bool IsCrushable(TechnoClass* pCrusher) { JMP_THIS(0x5F6CD0); } - CellStruct GetMapCoords() const { - CellStruct ret; - this->GetMapCoords(&ret); - return ret; - } - - CellStruct GetMapCoordsAgain() const { - CellStruct ret; - this->GetMapCoordsAgain(&ret); - return ret; - } - - // On non-buildings this is same as GetCenterCoord(), on buildings it returns the target coordinate that is affected by TargetCoordOffset. - CoordStruct GetTargetCoords() const - { - CoordStruct ret; - this->GetTargetCoords(&ret); - return ret; - } - - CoordStruct GetRenderCoords() const { - CoordStruct ret; - this->GetRenderCoords(&ret); - return ret; - } - - CoordStruct GetFLH(int idxWeapon, const CoordStruct& base) const { - CoordStruct ret; - this->GetFLH(&ret, idxWeapon, base); - return ret; - } - //Constructor NEVER CALL IT DIRECTLY /*ObjectClass() noexcept { JMP_THIS(0x5F3900); }*/ diff --git a/ObjectTypeClass.h b/ObjectTypeClass.h index fe726e0d..85d5169b 100644 --- a/ObjectTypeClass.h +++ b/ObjectTypeClass.h @@ -28,7 +28,7 @@ class NOVTABLE ObjectTypeClass : public AbstractTypeClass virtual ~ObjectTypeClass() RX; //ObjectTypeClass - virtual CoordStruct* vt_entry_6C(CoordStruct* pDest, CoordStruct* pSrc) const R0; + virtual CoordStruct vt_entry_6C(CoordStruct* pSrc) const RT(CoordStruct); virtual DWORD GetOwners() const R0; virtual int GetPipMax() const R0; virtual void vt_entry_78(DWORD dwUnk) const RX; diff --git a/OverlayTypeClass.h b/OverlayTypeClass.h index 2457aeaa..605ab078 100644 --- a/OverlayTypeClass.h +++ b/OverlayTypeClass.h @@ -32,7 +32,7 @@ class NOVTABLE OverlayTypeClass : public ObjectTypeClass virtual int Size() const R0; //ObjectTypeClass - virtual CoordStruct* vt_entry_6C(CoordStruct* pDest,CoordStruct* pSrc) const R0; + virtual CoordStruct vt_entry_6C(CoordStruct* pSrc) const RT(CoordStruct); virtual bool SpawnAtMapCoords(CellStruct* pMapCoords,HouseClass* pOwner) R0; virtual ObjectClass* CreateObject(HouseClass* pOwner) R0; diff --git a/RocketLocomotionClass.h b/RocketLocomotionClass.h index bf7f2a5b..de50c8fa 100644 --- a/RocketLocomotionClass.h +++ b/RocketLocomotionClass.h @@ -14,7 +14,7 @@ class NOVTABLE RocketLocomotionClass : public LocomotionClass //ILocomotion virtual bool __stdcall Is_Moving() R0; - virtual CoordStruct* __stdcall Destination(CoordStruct* pcoord) R0; + virtual CoordStruct __stdcall Destination() RT(CoordStruct); virtual bool __stdcall Process() R0; virtual void __stdcall Move_To(CoordStruct to) RX; virtual void __stdcall Stop_Moving() RX; diff --git a/ScenarioClass.h b/ScenarioClass.h index 36a19e0c..9af1c2cd 100644 --- a/ScenarioClass.h +++ b/ScenarioClass.h @@ -112,15 +112,9 @@ class ScenarioClass bool IsDefinedWaypoint(int idx) { JMP_THIS(0x68BD80); } - CellStruct * GetWaypointCoords(CellStruct *dest, int idx) + CellStruct GetWaypointCoords(int idx) { JMP_THIS(0x68BCC0); } - CellStruct GetWaypointCoords(int idx) { - CellStruct dest; - GetWaypointCoords(&dest, idx); - return dest; - } - //CTOR / DTOR protected: ScenarioClass() { THISCALL(0x6832C0); } diff --git a/TacticalClass.h b/TacticalClass.h index b0ed869c..86e5dc8d 100644 --- a/TacticalClass.h +++ b/TacticalClass.h @@ -26,7 +26,7 @@ class NOVTABLE TacticalClass : public AbstractClass void SetTacticalPosition(CoordStruct* pCoord) JMP_THIS(0x6D6070); - CellStruct* CoordsToCell(CellStruct* pDest, CoordStruct* pSource) + CellStruct CoordsToCell(CoordStruct* pSource) JMP_THIS(0x6D6590); [[deprecated]]// inlined in game @@ -53,15 +53,8 @@ class NOVTABLE TacticalClass : public AbstractClass return Point2D { x, y - AdjustForZ(coord.Z) }; } - CoordStruct* ClientToCoords(CoordStruct* pOutBuffer, Point2D const& client) const - JMP_THIS(0x6D2280); - CoordStruct ClientToCoords(Point2D const& client) const - { - CoordStruct buffer; - this->ClientToCoords(&buffer, client); - return buffer; - } + JMP_THIS(0x6D2280); char GetOcclusion(const CellStruct& cell, bool fog) const JMP_THIS(0x6D8700); diff --git a/TeamTypeClass.h b/TeamTypeClass.h index 952ba6dd..bfe28f7e 100644 --- a/TeamTypeClass.h +++ b/TeamTypeClass.h @@ -48,10 +48,10 @@ class NOVTABLE TeamTypeClass : public AbstractTypeClass int GetGroup() const { JMP_THIS(0x6F1870); } - CellStruct* GetWaypoint(CellStruct *buffer) const + CellStruct GetWaypoint() const { JMP_THIS(0x6F18A0); } - CellStruct* GetTransportWaypoint(CellStruct *buffer) const + CellStruct GetTransportWaypoint() const { JMP_THIS(0x6F18E0); } bool CanRecruitUnit(FootClass* pUnit, HouseClass* pOwner) const diff --git a/TechnoClass.h b/TechnoClass.h index 19016318..d975c5b5 100644 --- a/TechnoClass.h +++ b/TechnoClass.h @@ -227,8 +227,8 @@ class NOVTABLE TechnoClass : public RadioClass virtual ZGradient GetZGradient() const RT(ZGradient); virtual CellStruct GetLastFlightMapCoords() const RT(CellStruct); virtual void SetLastFlightMapCoords(CellStruct coord) RX; - virtual CellStruct* vt_entry_2FC(CellStruct* Buffer, DWORD dwUnk2, DWORD dwUnk3) const R0; - virtual CoordStruct* vt_entry_300(CoordStruct* Buffer, DWORD dwUnk2) const R0; + virtual CellStruct vt_entry_2FC(DWORD dwUnk2, DWORD dwUnk3) const RT(CellStruct); + virtual CoordStruct vt_entry_300(DWORD dwUnk2) const RT(CoordStruct); virtual DWORD vt_entry_304(DWORD dwUnk, DWORD dwUnk2) const R0; virtual DirStruct* GetRealFacing(DirStruct* pBuffer) const R0; virtual InfantryTypeClass* GetCrew() const R0; @@ -242,7 +242,7 @@ class NOVTABLE TechnoClass : public RadioClass virtual bool IsSensorVisibleToHouse(HouseClass* House) const R0; virtual bool IsEngineer() const R0; virtual void ProceedToNextPlanningWaypoint() RX; - virtual CellStruct* ScanForTiberium(CellStruct*, int range, DWORD dwUnk3) const R0; + virtual CellStruct ScanForTiberium(int range, DWORD dwUnk3) const RT(CellStruct) virtual bool EnterGrinder() R0; virtual bool EnterBioReactor() R0; virtual bool EnterTankBunker() R0; @@ -306,7 +306,7 @@ class NOVTABLE TechnoClass : public RadioClass virtual void Reload() RX; virtual void vt_entry_428() RX; // Returns target's coordinates if on attack mission & have target, otherwise own coordinates. - virtual CoordStruct* GetAttackCoordinates(CoordStruct* pCrd) const R0; + virtual CoordStruct GetAttackCoordinates() const RT(CoordStruct); virtual bool IsNotWarpingIn() const R0; virtual bool vt_entry_434(DWORD dwUnk) const R0; virtual void DrawActionLines(bool Force, DWORD dwUnk2) RX; @@ -343,7 +343,7 @@ class NOVTABLE TechnoClass : public RadioClass virtual bool HaveMegaMission() const R0; virtual bool HaveAttackMoveTarget() const R0; virtual Mission GetMegaMission() const RT(Mission); - virtual CoordStruct* GetAttackMoveCoords(CoordStruct* pBuffer) R0; + virtual CoordStruct GetAttackMoveCoords() RT(CoordStruct); virtual bool CanUseWaypoint() const R0; virtual bool CanAttackOnTheMove() const R0; virtual bool MegaMissionIsAttackMove() const R0; diff --git a/TechnoTypeClass.h b/TechnoTypeClass.h index 745f9bd0..ec909bc1 100644 --- a/TechnoTypeClass.h +++ b/TechnoTypeClass.h @@ -127,15 +127,8 @@ class NOVTABLE TechnoTypeClass : public ObjectTypeClass return this->TurretCount > 0; } - CoordStruct* GetParticleSysOffset(CoordStruct* pBuffer) const - { JMP_THIS(0x7178C0); } - CoordStruct GetParticleSysOffset() const - { - CoordStruct buffer; - GetParticleSysOffset(&buffer); - return buffer; - } + { JMP_THIS(0x7178C0); } bool InOwners(DWORD const bitHouseType) const { return 0u != (this->GetOwners() & bitHouseType); diff --git a/TeleportLocomotionClass.h b/TeleportLocomotionClass.h index 5bef980f..19608e9b 100644 --- a/TeleportLocomotionClass.h +++ b/TeleportLocomotionClass.h @@ -23,7 +23,7 @@ class NOVTABLE TeleportLocomotionClass : public LocomotionClass, public IPiggyba //ILocomotion virtual bool __stdcall Is_Moving() R0; - virtual CoordStruct* __stdcall Destination(CoordStruct* pcoord) R0; + virtual CoordStruct __stdcall Destination() RT(CoordStruct); virtual bool __stdcall Process() R0; virtual void __stdcall Move_To(CoordStruct to) RX; virtual void __stdcall Stop_Moving() RX;