1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 00:20:01 +00:00
This commit is contained in:
Nikolay Korolev 2019-06-22 21:35:23 +03:00
parent 666ee73ac8
commit 4e07396076
5 changed files with 111 additions and 111 deletions

View file

@ -4,9 +4,9 @@
struct CBulletTrace
{
CVector m_vecInf;
CVector m_vecSup;
bool m_bInUse;
uint8 m_bFramesInUse;
uint8 m_bLifeTime;
CVector m_vecInf;
CVector m_vecSup;
bool m_bInUse;
uint8 m_bFramesInUse;
uint8 m_bLifeTime;
};

View file

@ -5,5 +5,5 @@
class CBulletTraces
{
public:
static CBulletTrace(&aTraces)[16];
static CBulletTrace(&aTraces)[16];
};

View file

@ -4,30 +4,30 @@
enum ePickupType
{
PICKUP_NONE = 0,
PICKUP_IN_SHOP = 1,
PICKUP_ON_STREET = 2,
PICKUP_ONCE = 3,
PICKUP_ONCE_TIMEOUT = 4,
PICKUP_COLLECTABLE1 = 5,
PICKUP_IN_SHOP_OUT_OF_STOCK = 6,
PICKUP_MONEY = 7,
PICKUP_MINE_INACTIVE = 8,
PICKUP_MINE_ARMED = 9,
PICKUP_NAUTICAL_MINE_INACTIVE = 10,
PICKUP_NAUTICAL_MINE_ARMED = 11,
PICKUP_FLOATINGPACKAGE = 12,
PICKUP_FLOATINGPACKAGE_FLOATING = 13,
PICKUP_ON_STREET_SLOW = 14,
PICKUP_NONE = 0,
PICKUP_IN_SHOP = 1,
PICKUP_ON_STREET = 2,
PICKUP_ONCE = 3,
PICKUP_ONCE_TIMEOUT = 4,
PICKUP_COLLECTABLE1 = 5,
PICKUP_IN_SHOP_OUT_OF_STOCK = 6,
PICKUP_MONEY = 7,
PICKUP_MINE_INACTIVE = 8,
PICKUP_MINE_ARMED = 9,
PICKUP_NAUTICAL_MINE_INACTIVE = 10,
PICKUP_NAUTICAL_MINE_ARMED = 11,
PICKUP_FLOATINGPACKAGE = 12,
PICKUP_FLOATINGPACKAGE_FLOATING = 13,
PICKUP_ON_STREET_SLOW = 14,
};
class CPickup
{
ePickupType m_eType;
uint16 m_wQuantity;
CObject *m_pObject;
uint32 m_nTimer;
int16 m_eModelIndex;
int16 m_wIndex;
CVector m_vecPos;
ePickupType m_eType;
uint16 m_wQuantity;
CObject *m_pObject;
uint32 m_nTimer;
int16 m_eModelIndex;
int16 m_wIndex;
CVector m_vecPos;
};

View file

@ -81,70 +81,70 @@ class CReplay
};
struct tGeneralPacket
{
uint8 type;
bool in_rcvehicle;
CMatrix camera_pos;
CVector player_pos;
};
static_assert(sizeof(tGeneralPacket) == 88, "tGeneralPacket: error");
struct tGeneralPacket
{
uint8 type;
bool in_rcvehicle;
CMatrix camera_pos;
CVector player_pos;
};
static_assert(sizeof(tGeneralPacket) == 88, "tGeneralPacket: error");
struct tClockPacket
{
uint8 type;
uint8 hours;
uint8 minutes;
private:
uint8 __align;
};
static_assert(sizeof(tClockPacket) == 4, "tClockPacket: error");
struct tClockPacket
{
uint8 type;
uint8 hours;
uint8 minutes;
private:
uint8 __align;
};
static_assert(sizeof(tClockPacket) == 4, "tClockPacket: error");
struct tWeatherPacket
{
uint8 type;
uint8 old_weather;
uint8 new_weather;
float interpolation;
};
static_assert(sizeof(tWeatherPacket) == 8, "tWeatherPacket: error");
struct tWeatherPacket
{
uint8 type;
uint8 old_weather;
uint8 new_weather;
float interpolation;
};
static_assert(sizeof(tWeatherPacket) == 8, "tWeatherPacket: error");
struct tTimerPacket
{
uint8 type;
uint32 timer;
};
static_assert(sizeof(tTimerPacket) == 8, "tTimerPacket: error");
struct tTimerPacket
{
uint8 type;
uint32 timer;
};
static_assert(sizeof(tTimerPacket) == 8, "tTimerPacket: error");
struct tPedHeaderPacket
{
uint8 type;
uint8 index;
uint16 mi;
uint8 pedtype;
private:
uint8 __align[3];
};
static_assert(sizeof(tPedHeaderPacket) == 8, "tPedHeaderPacket: error");
struct tPedHeaderPacket
{
uint8 type;
uint8 index;
uint16 mi;
uint8 pedtype;
private:
uint8 __align[3];
};
static_assert(sizeof(tPedHeaderPacket) == 8, "tPedHeaderPacket: error");
struct tBulletTracePacket
{
uint8 type;
uint8 frames;
uint8 lifetime;
uint8 index;
CVector inf;
CVector sup;
};
static_assert(sizeof(tBulletTracePacket) == 28, "tBulletTracePacket: error");
struct tBulletTracePacket
{
uint8 type;
uint8 frames;
uint8 lifetime;
uint8 index;
CVector inf;
CVector sup;
};
static_assert(sizeof(tBulletTracePacket) == 28, "tBulletTracePacket: error");
struct tEndOfFramePacket
{
uint8 type;
private:
uint8 __align[3];
};
static_assert(sizeof(tEndOfFramePacket) == 4, "tEndOfFramePacket: error");
struct tEndOfFramePacket
{
uint8 type;
private:
uint8 __align[3];
};
static_assert(sizeof(tEndOfFramePacket) == 4, "tEndOfFramePacket: error");
private:
static uint8 &Mode;
@ -179,8 +179,8 @@ private:
public:
static void Init(void);
static void DisableReplays(void);
static void EnableReplays(void);
static void DisableReplays(void);
static void EnableReplays(void);
static void Update(void);
static void FinishPlayback(void);
static void Shutdown(void);
@ -189,8 +189,8 @@ public:
static void StreamAllNecessaryCarsAndPeds(void);
static bool ShouldStandardCameraBeProcessed(void);
inline static bool IsPlayingBack() { return Mode == MODE_PLAYBACK; }
inline static bool IsPlayingBackFromFile() { return bPlayingBackFromFile; }
inline static bool IsPlayingBack() { return Mode == MODE_PLAYBACK; }
inline static bool IsPlayingBackFromFile() { return bPlayingBackFromFile; }
private:
static void RecordThisFrame(void);

View file

@ -101,27 +101,27 @@ public:
n++;
return n;
}
void ClearStorage(uint8 **flags, U **entries){
delete[] flags;
delete[] entries;
*flags = nil;
*entries = nil;
}
void CopyBack(uint8 **flags, U **entries){
memcpy(m_flags, *flags, sizeof(Flags)*m_size);
memcpy(m_entries, *entries, sizeof(U)*m_size);
debug("Size copied:%d (%d)", sizeof(U)*m_size, sizeof(Flags)*m_size);
m_allocPtr = 0;
ClearStorage(flags, entries);
debug("CopyBack:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
}
void Store(uint8 **flags, U** entries){
*flags = (Flags*)malloc(sizeof(Flags)*size);
*entries = (U*)malloc(sizeof(U)*size);
memcpy(*flags, m_flags, sizeof(Flags)*m_size);
memcpy(*entries, m_entries, sizeof(U)*m_size);
debug("Stored:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
}
void ClearStorage(uint8 **flags, U **entries){
delete[] flags;
delete[] entries;
*flags = nil;
*entries = nil;
}
void CopyBack(uint8 **flags, U **entries){
memcpy(m_flags, *flags, sizeof(Flags)*m_size);
memcpy(m_entries, *entries, sizeof(U)*m_size);
debug("Size copied:%d (%d)", sizeof(U)*m_size, sizeof(Flags)*m_size);
m_allocPtr = 0;
ClearStorage(flags, entries);
debug("CopyBack:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
}
void Store(uint8 **flags, U** entries){
*flags = (Flags*)malloc(sizeof(Flags)*size);
*entries = (U*)malloc(sizeof(U)*size);
memcpy(*flags, m_flags, sizeof(Flags)*m_size);
memcpy(*entries, m_entries, sizeof(U)*m_size);
debug("Stored:%d (/%d)", GetNoOfUsedSpaces(), m_size); /* Assumed inlining */
}
};
template<typename T>