diff options
-rw-r--r-- | src/BulletTrace.h | 10 | ||||
-rw-r--r-- | src/BulletTraces.h | 2 | ||||
-rw-r--r-- | src/Pickup.h | 44 | ||||
-rw-r--r-- | src/control/Replay.h | 136 | ||||
-rw-r--r-- | src/templates.h | 42 |
5 files changed, 117 insertions, 117 deletions
diff --git a/src/BulletTrace.h b/src/BulletTrace.h index 2c5fa522..d6831ef1 100644 --- a/src/BulletTrace.h +++ b/src/BulletTrace.h @@ -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; }; diff --git a/src/BulletTraces.h b/src/BulletTraces.h index ba8cac79..34d2bcc6 100644 --- a/src/BulletTraces.h +++ b/src/BulletTraces.h @@ -5,5 +5,5 @@ class CBulletTraces { public: - static CBulletTrace(&aTraces)[16]; + static CBulletTrace(&aTraces)[16]; }; diff --git a/src/Pickup.h b/src/Pickup.h index 77986846..efef15fe 100644 --- a/src/Pickup.h +++ b/src/Pickup.h @@ -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; }; diff --git a/src/control/Replay.h b/src/control/Replay.h index 45a7be04..e54918b1 100644 --- a/src/control/Replay.h +++ b/src/control/Replay.h @@ -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 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 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 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 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 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 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 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); diff --git a/src/templates.h b/src/templates.h index 7da0b3d6..0e9eba99 100644 --- a/src/templates.h +++ b/src/templates.h @@ -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> |