mirror of
https://github.com/YimMenu/RDR-Classes.git
synced 2024-12-22 14:37:30 +08:00
parent
22102c8ef5
commit
59eed0b48b
@ -4,6 +4,9 @@
|
||||
#include "base/fwRefAwareBaseImpl.hpp"
|
||||
#include "base/pgBase.hpp"
|
||||
#include "entity/fwEntity.hpp"
|
||||
#include "event/CEvent.hpp"
|
||||
#include "event/CEventGroup.hpp"
|
||||
#include "event/CEventInventoryItemPickedUp.hpp"
|
||||
#include "network/CNetGamePlayer.hpp"
|
||||
#include "network/CNetworkPlayerMgr.hpp"
|
||||
#include "network/CScriptedGameEvent.hpp"
|
||||
|
17
event/CEvent.hpp
Normal file
17
event/CEvent.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
class CEvent
|
||||
{
|
||||
public:
|
||||
virtual ~CEvent() = default;
|
||||
virtual CEvent* Clone() = 0;
|
||||
virtual bool operator==(CEvent& other) = 0;
|
||||
virtual int _0x18() = 0;
|
||||
virtual float _0x20() = 0;
|
||||
virtual float _0x28() = 0;
|
||||
virtual bool IsEventScriptCommand() = 0;
|
||||
virtual bool ExtractData(void* data, int size) = 0;
|
||||
|
||||
char m_pad[0x58];
|
||||
};
|
||||
static_assert(sizeof(CEvent) == 0x60);
|
15
event/CEventGroup.hpp
Normal file
15
event/CEventGroup.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
class CEvent;
|
||||
class CEventGroup
|
||||
{
|
||||
public:
|
||||
virtual ~CEventGroup() = default;
|
||||
virtual void AddEvent(CEvent* event, bool) = 0;
|
||||
virtual void Cleanup() = 0;
|
||||
virtual int GetEventGroupType() = 0;
|
||||
};
|
||||
|
||||
class CEventGroupNetwork : public CEventGroup
|
||||
{
|
||||
};
|
14
event/CEventInventoryItemPickedUp.hpp
Normal file
14
event/CEventInventoryItemPickedUp.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "CEvent.hpp"
|
||||
#include "script/types.hpp"
|
||||
|
||||
class CEventInventoryItemPickedUp : public CEvent
|
||||
{
|
||||
SCR_INT m_Unk;
|
||||
SCR_INT m_RewardHash;
|
||||
SCR_INT m_ItemHash;
|
||||
SCR_BOOL m_Unk2;
|
||||
SCR_BOOL m_Unk3;
|
||||
PICKUP_INDEX m_Pickup;
|
||||
};
|
||||
static_assert(sizeof(CEventInventoryItemPickedUp) == 0x90);
|
@ -40,6 +40,58 @@ namespace rage
|
||||
z()
|
||||
{
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
vector3<T> operator+(const vector3<T>& other)
|
||||
{
|
||||
vector3<T> vec;
|
||||
vec.x = this->x + other.x;
|
||||
vec.y = this->y + other.y;
|
||||
vec.z = this->z + other.z;
|
||||
return vec;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
vector3<T> operator-(const vector3<T>& other)
|
||||
{
|
||||
vector3<T> vec;
|
||||
vec.x = this->x - other.x;
|
||||
vec.y = this->y - other.y;
|
||||
vec.z = this->z - other.z;
|
||||
return vec;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
vector3<T> operator*(const vector3<T>& other)
|
||||
{
|
||||
vector3<T> vec;
|
||||
vec.x = this->x * other.x;
|
||||
vec.y = this->y * other.y;
|
||||
vec.z = this->z * other.z;
|
||||
return vec;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
vector3<T> operator*(const float& other)
|
||||
{
|
||||
vector3<T> vec;
|
||||
vec.x = this->x * other;
|
||||
vec.y = this->y * other;
|
||||
vec.z = this->z * other;
|
||||
return vec;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator==(const vector3<T>& other)
|
||||
{
|
||||
return this->x == other.x && this->y == other.y && this->z == other.z;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator!=(const vector3<T>& other)
|
||||
{
|
||||
return this->x != other.x || this->y != other.y || this->z != other.z;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
@ -80,6 +80,11 @@ namespace rage
|
||||
return os;
|
||||
}
|
||||
|
||||
operator rage::fvector3()
|
||||
{
|
||||
return { x, y, z };
|
||||
}
|
||||
|
||||
alignas(8) float x{};
|
||||
alignas(8) float y{};
|
||||
alignas(8) float z{};
|
||||
|
@ -41,11 +41,12 @@ typedef int PopZone;
|
||||
typedef int PersChar;
|
||||
typedef int Prompt;
|
||||
|
||||
#define PLAYER_INDEX alignas(8) Player
|
||||
#define ENTITY_INDEX alignas(8) Entity
|
||||
#define PED_INDEX alignas(8) Ped
|
||||
#define VEHICLE_INDEX alignas(8) Vehicle
|
||||
#define INTERIOR_INDEX alignas(8) Interior
|
||||
#define PLAYER_INDEX alignas(8) int
|
||||
#define ENTITY_INDEX alignas(8) int
|
||||
#define PED_INDEX alignas(8) int
|
||||
#define PICKUP_INDEX alignas(8) int
|
||||
#define VEHICLE_INDEX alignas(8) int
|
||||
#define INTERIOR_INDEX alignas(8) int
|
||||
#define NETWORK_INDEX alignas(8) int
|
||||
|
||||
#define SCR_HASH alignas(8) Hash
|
||||
|
Loading…
Reference in New Issue
Block a user