From 03bc9da727c3ce9585be09256c8d67bf9693187b Mon Sep 17 00:00:00 2001 From: s1lentq Date: Mon, 7 Dec 2015 15:32:06 +0600 Subject: [PATCH] added compatibility with old STL containers list/vector from Visual Studio 6.0 SP6 --- regamedll/dlls/bot/cs_bot_chatter.cpp | 5 - regamedll/dlls/bot/cs_bot_chatter.h | 41 +- regamedll/dlls/bot/cs_bot_manager.h | 4 +- regamedll/dlls/util.h | 6 + regamedll/game_shared/bot/nav_area.cpp | 28 +- regamedll/game_shared/bot/nav_area.h | 44 +- regamedll/hookers/6153_hooker.cpp | 5 +- regamedll/hookers/stl/iosfwd | 309 ++++++++++++ regamedll/hookers/stl/iterator | 255 ++++++++++ regamedll/hookers/stl/list | 445 +++++++++++++++++ regamedll/hookers/stl/memory | 166 +++++++ regamedll/hookers/stl/use_ansi.h | 25 + regamedll/hookers/stl/utility | 342 +++++++++++++ regamedll/hookers/stl/vector | 594 +++++++++++++++++++++++ regamedll/hookers/stl/xmemory | 85 ++++ regamedll/hookers/stl/xstddef | 52 ++ regamedll/hookers/stl/xutility | 103 ++++ regamedll/msvc/ReGameDLL.vcxproj | 14 +- regamedll/msvc/ReGameDLL.vcxproj.filters | 33 ++ regamedll/regamedll/precompiled.h | 6 +- 20 files changed, 2461 insertions(+), 101 deletions(-) create mode 100644 regamedll/hookers/stl/iosfwd create mode 100644 regamedll/hookers/stl/iterator create mode 100644 regamedll/hookers/stl/list create mode 100644 regamedll/hookers/stl/memory create mode 100644 regamedll/hookers/stl/use_ansi.h create mode 100644 regamedll/hookers/stl/utility create mode 100644 regamedll/hookers/stl/vector create mode 100644 regamedll/hookers/stl/xmemory create mode 100644 regamedll/hookers/stl/xstddef create mode 100644 regamedll/hookers/stl/xutility diff --git a/regamedll/dlls/bot/cs_bot_chatter.cpp b/regamedll/dlls/bot/cs_bot_chatter.cpp index d612b699..013794e4 100644 --- a/regamedll/dlls/bot/cs_bot_chatter.cpp +++ b/regamedll/dlls/bot/cs_bot_chatter.cpp @@ -242,11 +242,6 @@ char *BotPhrase::GetSpeakable(int bankIndex, float *duration) const BotSpeakableVector *speakables = m_voiceBank[ bankIndex ]; int &index = m_index[ bankIndex ]; -#ifdef HOOK_GAMEDLL - // TODO: temporary fix of std::vector padding - *(byte *)&speakables += 4; -#endif // HOOK_GAMEDLL - const BotSpeakable *speak = (*speakables)[index++]; if (m_index[ bankIndex ] >= m_count[ bankIndex ]) diff --git a/regamedll/dlls/bot/cs_bot_chatter.h b/regamedll/dlls/bot/cs_bot_chatter.h index 171aab2f..1e50e781 100644 --- a/regamedll/dlls/bot/cs_bot_chatter.h +++ b/regamedll/dlls/bot/cs_bot_chatter.h @@ -191,8 +191,8 @@ public: };/* size: 16, cachelines: 1, members: 4 */ -typedef std::vector BotSpeakableVector; -typedef std::vector BotVoiceBankVector; +typedef std::STD_VECTOR BotSpeakableVector; +typedef std::STD_VECTOR BotVoiceBankVector; class BotPhrase { @@ -237,32 +237,16 @@ public: bool m_isPlace; GameEventType m_radioEvent; bool m_isImportant; - -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding; -#endif // HOOK_GAMEDLL - mutable BotVoiceBankVector m_voiceBank; - -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding2; -#endif // HOOK_GAMEDLL - - std::vector< int > m_count; - -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding3; -#endif // HOOK_GAMEDLL - - mutable std::vector< int > m_index; - + std::STD_VECTOR m_count; + mutable std::STD_VECTOR< int > m_index; int m_numVoiceBanks; mutable PlaceCriteria m_placeCriteria; mutable CountCriteria m_countCriteria; };/* size: 68, cachelines: 2, members: 11 */ -typedef std::list BotPhraseList; +typedef std::STD_LIST BotPhraseList; /* <2fea0e> ../cstrike/dlls/bot/cs_bot_chatter.h:239 */ inline void BotPhrase::ClearCriteria(void) const @@ -329,23 +313,9 @@ public: int FindPlaceIndex(Place where) const; -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - // The member m_placeList on Windows must be with offset +4 - // on Linux : +0 - int unknown_padding1; - -#endif // HOOK_GAMEDLL - // master list of all phrase collections BotPhraseList m_list; -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - // The member m_placeList on Windows must be with offset +16 - // on Linux : +8 - int unknown_padding2; - -#endif // HOOK_GAMEDLL - // master list of all Place phrases BotPhraseList m_placeList; @@ -354,6 +324,7 @@ public: Place placeID; IntervalTimer timer; }; + mutable PlaceTimeInfo m_placeStatementHistory[ MAX_PLACES_PER_MAP ]; mutable int m_placeCount; diff --git a/regamedll/dlls/bot/cs_bot_manager.h b/regamedll/dlls/bot/cs_bot_manager.h index 56b75558..26a9fc8f 100644 --- a/regamedll/dlls/bot/cs_bot_manager.h +++ b/regamedll/dlls/bot/cs_bot_manager.h @@ -216,9 +216,7 @@ public: { return GetClosestZone(&entity->pev->origin); } - template< - typename CostFunctor - > + template const Zone *GetClosestZone(CNavArea *startArea, CostFunctor costFunc, float *travelDistance = NULL) const { const Zone *closeZone = NULL; diff --git a/regamedll/dlls/util.h b/regamedll/dlls/util.h index d422bf8f..5f48e7fd 100644 --- a/regamedll/dlls/util.h +++ b/regamedll/dlls/util.h @@ -46,11 +46,17 @@ // Makes these more explicit, and easier to find #ifdef HOOK_GAMEDLL +#define STD_LIST list_vs6 // use STL containers of the old version from Visual Studio 6.0 sp6 +#define STD_VECTOR vector_vs6 + #define FILE_GLOBAL static #define DLL_GLOBAL #else +#define STD_LIST list +#define STD_VECTOR vector + #define FILE_GLOBAL #define DLL_GLOBAL diff --git a/regamedll/game_shared/bot/nav_area.cpp b/regamedll/game_shared/bot/nav_area.cpp index 8d4fe49e..2505c4ac 100644 --- a/regamedll/game_shared/bot/nav_area.cpp +++ b/regamedll/game_shared/bot/nav_area.cpp @@ -356,23 +356,17 @@ NOBODY void CNavArea::MergeAdjacentConnections(CNavArea *adjArea) /* <4c760a> ../game_shared/bot/nav_area.cpp:486 */ NOBODY void CNavArea::AssignNodes(CNavArea *area) { -// { -// class CNavNode *horizLast; // 488 -// { -// class CNavNode *vertNode; // 490 -// { -// class CNavNode *horizNode; // 492 -// AssignArea(CNavNode *const this, -// class CNavArea *area); // 494 -// GetConnectedNode(const class CNavNode *const this, -// enum NavDirType dir); // 492 -// } -// GetConnectedNode(const class CNavNode *const this, -// enum NavDirType dir); // 490 -// GetConnectedNode(const class CNavNode *const this, -// enum NavDirType dir); // 497 -// } -// } + CNavNode *horizLast = m_node[ NORTH_EAST ]; + + for (CNavNode *vertNode = m_node[ NORTH_WEST ]; vertNode != m_node[ SOUTH_WEST ]; vertNode = vertNode->GetConnectedNode(SOUTH)) + { + for (CNavNode *horizNode = vertNode; horizNode != horizLast; horizNode = horizNode->GetConnectedNode(EAST)) + { + horizNode->AssignArea(area); + } + + horizLast = horizLast->GetConnectedNode(SOUTH); + } } /* <4d690e> ../game_shared/bot/nav_area.cpp:507 */ diff --git a/regamedll/game_shared/bot/nav_area.h b/regamedll/game_shared/bot/nav_area.h index 18f07b3b..f6e1530e 100644 --- a/regamedll/game_shared/bot/nav_area.h +++ b/regamedll/game_shared/bot/nav_area.h @@ -99,7 +99,7 @@ union NavConnect } }; -typedef std::list NavConnectList; +typedef std::STD_LIST NavConnectList; enum LadderDirectionType { @@ -159,7 +159,7 @@ public: };/* size: 68, cachelines: 2, members: 12 */ -typedef std::list NavLadderList; +typedef std::STD_LIST NavLadderList; class HidingSpot { @@ -234,7 +234,7 @@ public: };/* size: 24, cachelines: 1, members: 6 */ -typedef std::list HidingSpotList; +typedef std::STD_LIST HidingSpotList; /* <4ec0bd> ../game_shared/bot/nav_area.h:164 */ struct SpotOrder @@ -248,7 +248,7 @@ struct SpotOrder };/* size: 8, cachelines: 1, members: 2 */ -typedef std::list SpotOrderList; +typedef std::STD_LIST SpotOrderList; /* <4c3a51> ../game_shared/bot/nav_area.h:179 */ struct SpotEncounter @@ -262,8 +262,8 @@ struct SpotEncounter };/* size: 48, cachelines: 1, members: 6 */ -typedef std::list SpotEncounterList; -typedef std::list NavAreaList; +typedef std::STD_LIST SpotEncounterList; +typedef std::STD_LIST NavAreaList; class CNavArea { @@ -473,7 +473,11 @@ public: m_ladder[LADDER_DOWN].push_back(ladder); } +#ifdef HOOK_GAMEDLL +public: +#else private: +#endif // HOOK_GAMEDLL bool IsHidingSpotCollision(const Vector *pos) const; void AddSpotEncounters(const CNavArea *from, NavDirType fromDir, const CNavArea *to, NavDirType toDir); void Strip(void); @@ -523,15 +527,8 @@ private: float m_danger[MAX_AREA_TEAMS]; float m_dangerTimestamp[MAX_AREA_TEAMS]; -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding1; -#endif // HOOK_GAMEDLL - HidingSpotList m_hidingSpotList; -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding2; -#endif // HOOK_GAMEDLL #ifdef HOOK_GAMEDLL public: #endif // HOOK_GAMEDLL @@ -570,31 +567,10 @@ private: CNavArea *m_prevOpen; unsigned int m_openMarker; -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding3; -#endif // HOOK_GAMEDLL NavConnectList m_connect[ NUM_DIRECTIONS ]; - -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding4; - int unknown_padding5; - - int unknown_padding6; - int unknown_padding7; -#endif // HOOK_GAMEDLL - NavLadderList m_ladder[ NUM_LADDER_DIRECTIONS ]; - -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding8; -#endif // HOOK_GAMEDLL - CNavNode *m_node[ NUM_CORNERS ]; -#if defined(_WIN32) && defined(HOOK_GAMEDLL) - int unknown_padding9; -#endif // HOOK_GAMEDLL - NavAreaList m_overlapList; CNavArea *m_prevHash; diff --git a/regamedll/hookers/6153_hooker.cpp b/regamedll/hookers/6153_hooker.cpp index fbf29ba2..193c036b 100644 --- a/regamedll/hookers/6153_hooker.cpp +++ b/regamedll/hookers/6153_hooker.cpp @@ -6025,7 +6025,7 @@ AddressRef g_DataRefs[] = { 0x01E11EF8, "cv_hostage_stop", (size_t)&pcv_hostage_stop }, //{ 0x0, "_ZL14placeDirectory", (size_t)&pplaceDirectory }, - { 0x01E2A0E8, "TheNavLadderList", (size_t)&pTheNavLadderList }, + { 0x01E2A0E4, "TheNavLadderList", (size_t)&pTheNavLadderList }, { 0x01E2A0F4, "TheHidingSpotList", (size_t)&pTheHidingSpotList }, { 0x01E14C5C, "sPlayerModelFiles", (size_t)&psPlayerModelFiles }, { 0x01E5D6F0, "g_flTimeLimit", (size_t)&pg_flTimeLimit }, @@ -6042,9 +6042,8 @@ AddressRef g_DataRefs[] = { 0x01E5D718, "_ZL14g_serveractive", (size_t)&pg_serveractive }, { 0x01E2A0AC, "_ZL17goodSizedAreaList", (size_t)&pgoodSizedAreaList }, - { 0x01E2A0DC, "TheNavAreaList", (size_t)&pTheNavAreaList }, + { 0x01E2A0D8, "TheNavAreaList", (size_t)&pTheNavAreaList }, { 0x01E29888, "TheNavAreaGrid", (size_t)&pTheNavAreaGrid }, - { 0x01E2A250, "_ZN8CNavNode6m_listE", mfunc_ptr_cast(&CNavNode::pm_list) }, //{ 0x0, "_ZN8CNavArea8m_nextIDE", mfunc_ptr_cast(&CNavArea::m_nextID) }, { 0x01E11584, "_ZN8CNavArea14m_masterMarkerE", mfunc_ptr_cast(&CNavArea::pm_masterMarker) }, diff --git a/regamedll/hookers/stl/iosfwd b/regamedll/hookers/stl/iosfwd new file mode 100644 index 00000000..9f8c6dab --- /dev/null +++ b/regamedll/hookers/stl/iosfwd @@ -0,0 +1,309 @@ +#pragma once + +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER +_STD_BEGIN + // STREAM POSITIONING TYPES (from ) +typedef long streamoff_; +const streamoff_ __BADOFF = -1; +typedef int streamsize_; +#undef _Fpz +extern _CRTIMP2 const fpos_t _Fpz; + // TEMPLATE CLASS fpos_ (from ) +template + class fpos_ { + typedef fpos_<_St> _Myt; +public: +#ifdef _MT + fpos_(streamoff_ _O = 0) + : _Off(_O), _Fpos(_Fpz) + {_Lockit _Lk; + _State = _Stz; } +#else + fpos_(streamoff_ _O = 0) + : _Off(_O), _Fpos(_Fpz), _State(_Stz) {} +#endif + fpos_(_St _S, fpos_t _F) + : _Off(0), _Fpos(_F), _State(_S) {} + _St state() const + {return (_State); } + void state(_St _S) + {_State = _S; } + fpos_t get_fpos_t() const + {return (_Fpos); } + operator streamoff_() const + {return (_Off + _FPOSOFF(_Fpos)); } + streamoff_ operator-(const _Myt& _R) const + {return ((streamoff_)*this - (streamoff_)_R); } + _Myt& operator+=(streamoff_ _O) + {_Off += _O; + return (*this); } + _Myt& operator-=(streamoff_ _O) + {_Off -= _O; + return (*this); } + _Myt operator+(streamoff_ _O) const + {_Myt _Tmp = *this; + return (_Tmp += _O); } + _Myt operator-(streamoff_ _O) const + {_Myt _Tmp = *this; + return (_Tmp -= _O); } + bool operator==(const _Myt& _R) const + {return ((streamoff_)*this == (streamoff_)_R); } + bool operator!=(const _Myt& _R) const + {return (!(*this == _R)); } +private: + static _St _Stz; + streamoff_ _Off; + fpos_t _Fpos; + _St _State; + }; +template + _St fpos_<_St>::_Stz; +typedef fpos_ streampos_; +typedef streampos_ wstreampos_; + // TEMPLATE STRUCT char_traits_ (FROM ) +template + struct char_traits_ { + typedef _E char_type; + typedef _E int_type; + typedef streampos_ pos_type; + typedef streamoff_ off_type; + typedef mbstate_t state_type; + static void __cdecl assign(_E& _X, const _E& _Y) + {_X = _Y; } + static bool __cdecl eq(const _E& _X, const _E& _Y) + {return (_X == _Y); } + static bool __cdecl lt(const _E& _X, const _E& _Y) + {return (_X < _Y); } + static int __cdecl compare(const _E *_U, const _E *_V, size_t _N) + {for (size_t _I = 0; _I < _N; ++_I, ++_U, ++_V) + if (!eq(*_U, *_V)) + return (lt(*_U, *_V) ? -1 : +1); + return (0); } + static size_t __cdecl length(const _E *_U) + {size_t _N; + for (_N = 0; !eq(*_U, _E(0)); ++_U) + ++_N; + return (_N); } + static _E * __cdecl copy(_E *_U, const _E *_V, size_t _N) + {_E *_S = _U; + for (; 0 < _N; --_N, ++_U, ++_V) + assign(*_U, *_V); + return (_S); } + static const _E * __cdecl find(const _E *_U, size_t _N, + const _E& _C) + {for (; 0 < _N; --_N, ++_U) + if (eq(*_U, _C)) + return (_U); + return (0); } + static _E * __cdecl move(_E *_U, const _E *_V, size_t _N) + {_E *_Ans = _U; + if (_V < _U && _U < _V + _N) + for (_U += _N, _V += _N; 0 < _N; --_N) + assign(*--_U, *--_V); + else + for (; 0 < _N; --_N, ++_U, ++_V) + assign(*_U, *_V); + return (_Ans); } + static _E * __cdecl assign(_E *_U, size_t _N, const _E& _C) + {_E *_Ans = _U; + for (; 0 < _N; --_N, ++_U) + assign(*_U, _C); + return (_Ans); } + static _E __cdecl to_char_type(const int_type& _C) + {return ((_E)_C); } + static int_type __cdecl to_int_type(const _E& _C) + {return ((int_type)_C); } + static bool __cdecl eq_int_type(const int_type& _X, + const int_type& _Y) + {return (_X == _Y); } + static int_type __cdecl eof() + {return (EOF); } + static int_type __cdecl not_eof(const int_type& _C) + {return (_C != eof() ? _C : !eof()); } + }; + // STRUCT char_traits_ +template<> struct _CRTIMP2 char_traits_ { + typedef wchar_t _E; + typedef _E char_type; // for overloads + typedef wint_t int_type; + typedef streampos_ pos_type; + typedef streamoff_ off_type; + typedef mbstate_t state_type; + static void __cdecl assign(_E& _X, const _E& _Y) + {_X = _Y; } + static bool __cdecl eq(const _E& _X, const _E& _Y) + {return (_X == _Y); } + static bool __cdecl lt(const _E& _X, const _E& _Y) + {return (_X < _Y); } + static int __cdecl compare(const _E *_U, const _E *_V, size_t _N) + {return (wmemcmp(_U, _V, _N)); } + static size_t __cdecl length(const _E *_U) + {return (wcslen(_U)); } + static _E *__cdecl copy(_E *_U, const _E *_V, size_t _N) + {return (wmemcpy(_U, _V, _N)); } + static const _E * __cdecl find(const _E *_U, size_t _N, + const _E& _C) + {return ((const _E *)wmemchr(_U, _C, _N)); } + static _E * __cdecl move(_E *_U, const _E *_V, size_t _N) + {return (wmemmove(_U, _V, _N)); } + static _E * __cdecl assign(_E *_U, size_t _N, const _E& _C) + {return (wmemset(_U, _C, _N)); } + static _E __cdecl to_char_type(const int_type& _C) + {return ((_E)_C); } + static int_type __cdecl to_int_type(const _E& _C) + {return ((int_type)_C); } + static bool __cdecl eq_int_type(const int_type& _X, + const int_type& _Y) + {return (_X == _Y); } + static int_type __cdecl eof() + {return (WEOF); } + static int_type __cdecl not_eof(const int_type& _C) + {return (_C != eof() ? _C : !eof()); } + }; + // STRUCT char_traits_ (FROM ) +template<> struct _CRTIMP2 char_traits_ { + typedef char _E; + typedef _E char_type; + typedef int int_type; + typedef streampos_ pos_type; + typedef streamoff_ off_type; + typedef mbstate_t state_type; + static void __cdecl assign(_E& _X, const _E& _Y) + {_X = _Y; } + static bool __cdecl eq(const _E& _X, const _E& _Y) + {return (_X == _Y); } + static bool __cdecl lt(const _E& _X, const _E& _Y) + {return (_X < _Y); } + static int __cdecl compare(const _E *_U, const _E *_V, size_t _N) + {return (memcmp(_U, _V, _N)); } + static size_t __cdecl length(const _E *_U) + {return (strlen(_U)); } + static _E * __cdecl copy(_E *_U, const _E *_V, size_t _N) + {return ((_E *)memcpy(_U, _V, _N)); } + static const _E * __cdecl find(const _E *_U, size_t _N, + const _E& _C) + {return ((const _E *)memchr(_U, _C, _N)); } + static _E * __cdecl move(_E *_U, const _E *_V, size_t _N) + {return ((_E *)memmove(_U, _V, _N)); } + static _E * __cdecl assign(_E *_U, size_t _N, const _E& _C) + {return ((_E *)memset(_U, _C, _N)); } + static _E __cdecl to_char_type(const int_type& _C) + {return ((_E)_C); } + static int_type __cdecl to_int_type(const _E& _C) + {return ((int_type)((unsigned char)_C)); } + static bool __cdecl eq_int_type(const int_type& _X, + const int_type& _Y) + {return (_X == _Y); } + static int_type __cdecl eof() + {return (EOF); } + static int_type __cdecl not_eof(const int_type& _C) + {return (_C != eof() ? _C : !eof()); } + }; + // FORWARD REFERENCES +template + class allocator_; +class ios_base; +template > + class basic_ios; +template > + class istreambuf_iterator_; +template > + class ostreambuf_iterator_; +template > + class basic_streambuf; +template > + class basic_istream; +template > + class basic_ostream; +template > + class basic_iostream; +template, + class _A = allocator_<_E> > + class basic_stringbuf; +template, + class _A = allocator_<_E> > + class basic_istringstream; +template, + class _A = allocator_<_E> > + class basic_ostringstream; +template, + class _A = allocator_<_E> > + class basic_stringstream; +template > + class basic_filebuf; +template > + class basic_ifstream; +template > + class basic_ofstream; +template > + class basic_fstream; + + // char TYPEDEFS +typedef basic_ios > ios_; +typedef basic_streambuf > streambuf_; +typedef basic_istream > istream_; +typedef basic_ostream > ostream_; +typedef basic_iostream > iostream_; +typedef basic_stringbuf, + allocator_ > stringbuf_; +typedef basic_istringstream, + allocator_ > istringstream_; +typedef basic_ostringstream, + allocator_ > ostringstream_; +typedef basic_stringstream, + allocator_ > stringstream_; +typedef basic_filebuf > filebuf_; +typedef basic_ifstream > ifstream_; +typedef basic_ofstream > ofstream_; +typedef basic_fstream > fstream_; + // wchar_t TYPEDEFS +typedef basic_ios > wios_; +typedef basic_streambuf > + wstreambuf_; +typedef basic_istream > wistream_; +typedef basic_ostream > wostream_; +typedef basic_iostream > wiostream_; +typedef basic_stringbuf, + allocator_ > wstringbuf_; +typedef basic_istringstream, + allocator_ > wistringstream_; +typedef basic_ostringstream, + allocator_ > wostringstream_; +typedef basic_stringstream, + allocator_ > wstringstream_; +typedef basic_filebuf > wfilebuf_; +typedef basic_ifstream > wifstream_; +typedef basic_ofstream > wofstream_; +typedef basic_fstream > wfstream_; + +#ifdef _DLL +template + class num_get; +template + class num_put; +template + class collate; + +typedef num_get > > numget_; +typedef num_get > > wnumget_; + +typedef num_put > > numput_; +typedef num_put > > wnumput_; + +typedef collate ncollate; +typedef collate wcollate; + +#endif // _DLL + +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/iterator b/regamedll/hookers/stl/iterator new file mode 100644 index 00000000..0e724acc --- /dev/null +++ b/regamedll/hookers/stl/iterator @@ -0,0 +1,255 @@ +#pragma once + +#include "utility" + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER + +_STD_BEGIN + // TEMPLATE CLASS reverse_bidirectional_iterator +template + class reverse_bidirectional_iterator + : public _Bidit<_Ty, _D> { +public: + typedef reverse_bidirectional_iterator<_BI, + _Ty, _Rt, _Pt, _D> _Myt; + typedef _BI iter_type; + typedef _Rt reference_type; + typedef _Pt pointer_type; + reverse_bidirectional_iterator() + {} + explicit reverse_bidirectional_iterator(_BI _X) + : current(_X) {} + _BI base() const + {return (current); } + _Rt operator*() const + {_BI _Tmp = current; + return (*--_Tmp); } + _Pt operator->() const + {return (&**this); } + _Myt& operator++() + {--current; + return (*this); } + _Myt operator++(int) + {_Myt _Tmp = *this; + --current; + return (_Tmp); } + _Myt& operator--() + {++current; + return (*this); } + _Myt operator--(int) + {_Myt _Tmp = *this; + ++current; + return (_Tmp); } +protected: + _BI current; +}; + +template inline + bool operator==(const reverse_bidirectional_iterator<_BI, + _Ty, _Rt, _Pt, _D>& _X, + const reverse_bidirectional_iterator<_BI, + _Ty, _Rt, _Pt, _D>& _Y) + {return (_X.base() == _Y.base()); } +template inline + bool operator!=(const reverse_bidirectional_iterator<_BI, + _Ty, _Rt, _Pt, _D>& _X, + const reverse_bidirectional_iterator<_BI, + _Ty, _Rt, _Pt, _D>& _Y) + {return (!(_X == _Y)); } + // TEMPLATE CLASS back_insert_iterator_ +template + class back_insert_iterator_ + : public iterator_ { +public: + typedef _C container_type; + typedef typename _C::value_type value_type; + explicit back_insert_iterator_(_C& _X) + : container(_X) {} + back_insert_iterator_<_C>& operator=( + const value_type& _V) + {container.push_back(_V); + return (*this); } + back_insert_iterator_<_C>& operator*() + {return (*this); } + back_insert_iterator_<_C>& operator++() + {return (*this); } + back_insert_iterator_<_C> operator++(int) + {return (*this); } +protected: + _C& container; +}; + +template inline + back_insert_iterator_<_C> back_inserter(_C& _X) + {return (back_insert_iterator_<_C>(_X)); } + // TEMPLATE CLASS front_insert_iterator_ +template + class front_insert_iterator_ + : public iterator_ { +public: + typedef _C container_type; + typedef typename _C::value_type value_type; + explicit front_insert_iterator_(_C& _X) + : container(_X) {} + front_insert_iterator_<_C>& operator=( + const value_type& _V) + {container.push_front(_V); + return (*this); } + front_insert_iterator_<_C>& operator*() + {return (*this); } + front_insert_iterator_<_C>& operator++() + {return (*this); } + front_insert_iterator_<_C> operator++(int) + {return (*this); } +protected: + _C& container; + }; +template inline + front_insert_iterator_<_C> front_inserter(_C& _X) + {return (front_insert_iterator_<_C>(_X)); } + // TEMPLATE CLASS insert_iterator_ +template + class insert_iterator_ + : public iterator_ { +public: + typedef _C container_type; + typedef typename _C::value_type value_type; + insert_iterator_(_C& _X, typename _C::iterator_ _I) + : container(_X), iter(_I) {} + insert_iterator_<_C>& operator=( + const value_type& _V) + {iter = container.insert(iter, _V); + ++iter; + return (*this); } + insert_iterator_<_C>& operator*() + {return (*this); } + insert_iterator_<_C>& operator++() + {return (*this); } + insert_iterator_<_C>& operator++(int) + {return (*this); } +protected: + _C& container; + typename _C::iterator_ iter; +}; + +template inline + insert_iterator_<_C> inserter(_C& _X, _XI _I) + {return (insert_iterator_<_C>(_X, _C::iterator_(_I))); } + // TEMPLATE CLASS istream_iterator_ +template > + class istream_iterator_ + : public iterator_ { +public: + typedef _E char_type; + typedef _Tr traits_type; + typedef basic_istream<_E, _Tr> istream_type; + istream_iterator_() + : _Istr(0) {} + istream_iterator_(istream_type& _I) + : _Istr(&_I) {_Getval(); } + const _U& operator*() const + {return (_Val); } + const _U *operator->() const + {return (&**this); } + istream_iterator_<_U, _E, _Tr>& operator++() + {_Getval(); + return (*this); } + istream_iterator_<_U, _E, _Tr> operator++(int) + {istream_iterator_<_U, _E, _Tr> _Tmp = *this; + _Getval(); + return (_Tmp); } + bool _Equal(const istream_iterator_<_U, _E, _Tr>& _X) const + {return (_Istr == _X._Istr); } +protected: + void _Getval() + {if (_Istr != 0 && !(*_Istr >> _Val)) + _Istr = 0; } + istream_type *_Istr; + _U _Val; +}; + +template inline + bool operator==(const istream_iterator_<_U, _E, _Tr>& _X, + const istream_iterator_<_U, _E, _Tr>& _Y) + {return (_X._Equal(_Y)); } +template inline + bool operator!=(const istream_iterator_<_U, _E, _Tr>& _X, + const istream_iterator_<_U, _E, _Tr>& _Y) + {return (!(_X == _Y)); } + // TEMPLATE CLASS ostream_iterator_ +template > + class ostream_iterator_ + : public iterator_ { +public: + typedef _U value_type; + typedef _E char_type; + typedef _Tr traits_type; + typedef basic_ostream<_E, _Tr> ostream_type; + ostream_iterator_(ostream_type& _O, + const _E *_D = 0) + : _Ostr(&_O), _Delim(_D) {} + ostream_iterator_<_U, _E, _Tr>& operator=(const _U& _X) + {*_Ostr << _X; + if (_Delim != 0) + *_Ostr << _Delim; + return (*this); } + ostream_iterator_<_U, _E, _Tr>& operator*() + {return (*this); } + ostream_iterator_<_U, _E, _Tr>& operator++() + {return (*this); } + ostream_iterator_<_U, _E, _Tr> operator++(int) + {return (*this); } +protected: + const _E *_Delim; + ostream_type *_Ostr; +}; + // TEMPLATE FUNCTION _Val_type +template inline + _Ty *_Val_type(const iterator_<_C, _Ty, _D>&) + {return ((_Ty *)0); } +template inline + _Ty *_Val_type(const _Ty *) + {return ((_Ty *)0); } + // TEMPLATE FUNCTION advance_ +template inline + void advance_(_II& _I, _D _N) + {_Advance(_I, _N, _Iter_cat(_I)); } +/*template inline + void _Advance(_II& _I, _D _N, input_iterator_tag) + {for (; 0 < _N; --_N) + ++_I; } +template inline + void _Advance(_FI& _I, _D _N, forward_iterator_tag) + {for (; 0 < _N; --_N) + ++_I; } +template inline + void _Advance(_BI& _I, _D _N, bidirectional_iterator_tag) + {for (; 0 < _N; --_N) + ++_I; + for (; _N < 0; ++_N) + --_I; } +template inline + void _Advance(_RI& _I, _D _N, random_access_iterator_tag) + {_I += _N; }*/ + // TEMPLATE FUNCTION _Dist_type +template inline + _D *_Dist_type(const iterator_<_C, _Ty, _D>&) + {return ((_D *)0); } +template inline + ptrdiff_t *_Dist_type(const _Ty *) + {return ((ptrdiff_t *)0); } +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/list b/regamedll/hookers/stl/list new file mode 100644 index 00000000..90a796c3 --- /dev/null +++ b/regamedll/hookers/stl/list @@ -0,0 +1,445 @@ +#pragma once + +#include + +// custom +#include "use_ansi.H" +#include "iterator" +#include "memory" + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER +_STD_BEGIN + // TEMPLATE CLASS list_vs6 +template > + class list_vs6 { +protected: + struct _Node; + friend struct _Node; + + typedef _POINTER_X(_Node, _A) _Mapptr; + typedef _POINTER_X(_Node, _A) _Nodeptr; + struct _Node { + _Nodeptr _Next, _Prev; + _Ty _Value; + }; + struct _Acc; + friend struct _Acc; + struct _Acc { + typedef _REFERENCE_X(_Nodeptr, _A) _Nodepref; + typedef typename _A::reference _Vref; + static _Nodepref _Next(_Nodeptr _P) + {return ((_Nodepref)(*_P)._Next); } + static _Nodepref _Prev(_Nodeptr _P) + {return ((_Nodepref)(*_P)._Prev); } + static _Vref _Value(_Nodeptr _P) + {return ((_Vref)(*_P)._Value); } + }; +public: + typedef list_vs6<_Ty, _A> _Myt; + typedef _A allocator_type; + typedef typename _A::size_type size_type; + typedef typename _A::difference_type difference_type; + typedef typename _A::pointer _Tptr; + typedef typename _A::const_pointer _Ctptr; + typedef typename _A::reference reference; + typedef typename _A::const_reference const_reference; + typedef typename _A::value_type value_type; + // CLASS const_iterator + class iterator; + class const_iterator; + friend class const_iterator; + + class const_iterator : public _Bidit<_Ty, difference_type> { + public: + const_iterator() + {} + const_iterator(_Nodeptr _P) + : _Ptr(_P) {} + const_iterator(const iterator& _X) + : _Ptr(_X._Ptr) {} + const_reference operator*() const + {return (_Acc::_Value(_Ptr)); } + _Ctptr operator->() const + {return (&**this); } + const_iterator& operator++() + {_Ptr = _Acc::_Next(_Ptr); + return (*this); } + const_iterator operator++(int) + {const_iterator _Tmp = *this; + ++*this; + return (_Tmp); } + const_iterator& operator--() + {_Ptr = _Acc::_Prev(_Ptr); + return (*this); } + const_iterator operator--(int) + {const_iterator _Tmp = *this; + --*this; + return (_Tmp); } + bool operator==(const const_iterator& _X) const + {return (_Ptr == _X._Ptr); } + bool operator!=(const const_iterator& _X) const + {return (!(*this == _X)); } + _Nodeptr _Mynode() const + {return (_Ptr); } + protected: + _Nodeptr _Ptr; + }; + // CLASS iterator + friend class iterator; + class iterator : public const_iterator { + public: + iterator() + {} + iterator(_Nodeptr _P) + : const_iterator(_P) {} + reference operator*() const + {return (_Acc::_Value(_Ptr)); } + _Tptr operator->() const + {return (&**this); } + iterator& operator++() + {_Ptr = _Acc::_Next(_Ptr); + return (*this); } + iterator operator++(int) + {iterator _Tmp = *this; + ++*this; + return (_Tmp); } + iterator& operator--() + {_Ptr = _Acc::_Prev(_Ptr); + return (*this); } + iterator operator--(int) + {iterator _Tmp = *this; + --*this; + return (_Tmp); } + bool operator==(const iterator& _X) const + {return (_Ptr == _X._Ptr); } + bool operator!=(const iterator& _X) const + {return (!(*this == _X)); } + }; + typedef reverse_bidirectional_iterator + reverse_iterator; + typedef reverse_bidirectional_iterator + const_reverse_iterator; + explicit list_vs6(const _A& _Al = _A()) + : allocator(_Al), + _Head(_Buynode()), _Size(0) {} + explicit list_vs6(size_type _N, const _Ty& _V = _Ty(), + const _A& _Al = _A()) + : allocator(_Al), + _Head(_Buynode()), _Size(0) + {insert(begin(), _N, _V); } + list_vs6(const _Myt& _X) + : allocator(_X.allocator), + _Head(_Buynode()), _Size(0) + {insert(begin(), _X.begin(), _X.end()); } + list_vs6(const _Ty *_F, const _Ty *_L, const _A& _Al = _A()) + : allocator(_Al), + _Head(_Buynode()), _Size(0) + {insert(begin(), _F, _L); } + typedef const_iterator _It; + list_vs6(_It _F, _It _L, const _A& _Al = _A()) + : allocator(_Al), + _Head(_Buynode()), _Size(0) + {insert(begin(), _F, _L); } + ~list_vs6() + {erase(begin(), end()); + _Freenode(_Head); + _Head = 0, _Size = 0; } + _Myt& operator=(const _Myt& _X) + {if (this != &_X) + {iterator _F1 = begin(); + iterator _L1 = end(); + const_iterator _F2 = _X.begin(); + const_iterator _L2 = _X.end(); + for (; _F1 != _L1 && _F2 != _L2; ++_F1, ++_F2) + *_F1 = *_F2; + erase(_F1, _L1); + insert(_L1, _F2, _L2); } + return (*this); } + iterator begin() + {return (iterator(_Acc::_Next(_Head))); } + const_iterator begin() const + {return (const_iterator(_Acc::_Next(_Head))); } + iterator end() + {return (iterator(_Head)); } + const_iterator end() const + {return (const_iterator(_Head)); } + reverse_iterator rbegin() + {return (reverse_iterator(end())); } + const_reverse_iterator rbegin() const + {return (const_reverse_iterator(end())); } + reverse_iterator rend() + {return (reverse_iterator(begin())); } + const_reverse_iterator rend() const + {return (const_reverse_iterator(begin())); } + void resize(size_type _N, _Ty _X = _Ty()) + {if (size() < _N) + insert(end(), _N - size(), _X); + else + while (_N < size()) + pop_back(); } + size_type size() const + {return (_Size); } + size_type max_size() const + {return (allocator.max_size()); } + bool empty() const + {return (size() == 0); } + _A get_allocator() const + {return (allocator); } + reference front() + {return (*begin()); } + const_reference front() const + {return (*begin()); } + reference back() + {return (*(--end())); } + const_reference back() const + {return (*(--end())); } + void push_front(const _Ty& _X) + {insert(begin(), _X); } + void pop_front() + {erase(begin()); } + void push_back(const _Ty& _X) + {insert(end(), _X); } + void pop_back() + {erase(--end()); } + void assign(_It _F, _It _L) + {erase(begin(), end()); + insert(begin(), _F, _L); } + void assign(size_type _N, const _Ty& _X = _Ty()) + {erase(begin(), end()); + insert(begin(), _N, _X); } + iterator insert(iterator _P, const _Ty& _X = _Ty()) + {_Nodeptr _S = _P._Mynode(); + _Acc::_Prev(_S) = _Buynode(_S, _Acc::_Prev(_S)); + _S = _Acc::_Prev(_S); + _Acc::_Next(_Acc::_Prev(_S)) = _S; + allocator.construct(&_Acc::_Value(_S), _X); + ++_Size; + return (iterator(_S)); } + void insert(iterator _P, size_type _M, const _Ty& _X) + {for (; 0 < _M; --_M) + insert(_P, _X); } + void insert(iterator _P, const _Ty *_F, const _Ty *_L) + {for (; _F != _L; ++_F) + insert(_P, *_F); } + void insert(iterator _P, _It _F, _It _L) + {for (; _F != _L; ++_F) + insert(_P, *_F); } + iterator erase(iterator _P) + {_Nodeptr _S = (_P++)._Mynode(); + _Acc::_Next(_Acc::_Prev(_S)) = _Acc::_Next(_S); + _Acc::_Prev(_Acc::_Next(_S)) = _Acc::_Prev(_S); + allocator.destroy(&_Acc::_Value(_S)); + _Freenode(_S); + --_Size; + return (_P); } + iterator erase(iterator _F, iterator _L) + {while (_F != _L) + erase(_F++); + return (_F); } + void clear() + {erase(begin(), end()); } + void swap(_Myt& _X) + {if (allocator == _X.allocator) + {std::swap(_Head, _X._Head); + std::swap(_Size, _X._Size); } + else + {iterator _P = begin(); + splice(_P, _X); + _X.splice(_X.begin(), *this, _P, end()); }} + friend void swap(_Myt& _X, _Myt& _Y) + {_X.swap(_Y); } + void splice(iterator _P, _Myt& _X) + {if (!_X.empty()) + {_Splice(_P, _X, _X.begin(), _X.end()); + _Size += _X._Size; + _X._Size = 0; }} + void splice(iterator _P, _Myt& _X, iterator _F) + {iterator _L = _F; + if (_P != _F && _P != ++_L) + {_Splice(_P, _X, _F, _L); + ++_Size; + --_X._Size; }} + void splice(iterator _P, _Myt& _X, iterator _F, iterator _L) + {if (_F != _L) + {if (&_X != this) + {difference_type _N = 0; + _Distance(_F, _L, _N); + _Size += _N; + _X._Size -= _N; } + _Splice(_P, _X, _F, _L); }} + void remove(const _Ty& _V) + {iterator _L = end(); + for (iterator _F = begin(); _F != _L; ) + if (*_F == _V) + erase(_F++); + else + ++_F; } + typedef binder2nd > _Pr1; + void remove_if(_Pr1 _Pr) + {iterator _L = end(); + for (iterator _F = begin(); _F != _L; ) + if (_Pr(*_F)) + erase(_F++); + else + ++_F; } + void unique() + {iterator _F = begin(), _L = end(); + if (_F != _L) + for (iterator _M = _F; ++_M != _L; _M = _F) + if (*_F == *_M) + erase(_M); + else + _F = _M; } + typedef not_equal_to<_Ty> _Pr2; + void unique(_Pr2 _Pr) + {iterator _F = begin(), _L = end(); + if (_F != _L) + for (iterator _M = _F; ++_M != _L; _M = _F) + if (_Pr(*_F, *_M)) + erase(_M); + else + _F = _M; } + void merge(_Myt& _X) + {if (&_X != this) + {iterator _F1 = begin(), _L1 = end(); + iterator _F2 = _X.begin(), _L2 = _X.end(); + while (_F1 != _L1 && _F2 != _L2) + if (*_F2 < *_F1) + {iterator _Mid2 = _F2; + _Splice(_F1, _X, _F2, ++_Mid2); + _F2 = _Mid2; } + else + ++_F1; + if (_F2 != _L2) + _Splice(_L1, _X, _F2, _L2); + _Size += _X._Size; + _X._Size = 0; }} + typedef greater<_Ty> _Pr3; + void merge(_Myt& _X, _Pr3 _Pr) + {if (&_X != this) + {iterator _F1 = begin(), _L1 = end(); + iterator _F2 = _X.begin(), _L2 = _X.end(); + while (_F1 != _L1 && _F2 != _L2) + if (_Pr(*_F2, *_F1)) + {iterator _Mid2 = _F2; + _Splice(_F1, _X, _F2, ++_Mid2); + _F2 = _Mid2; } + else + ++_F1; + if (_F2 != _L2) + _Splice(_L1, _X, _F2, _L2); + _Size += _X._Size; + _X._Size = 0; }} + void sort() + {if (2 <= size()) + {const size_t _MAXN = 15; + _Myt _X(allocator), _A[_MAXN + 1]; + size_t _N = 0; + while (!empty()) + {_X.splice(_X.begin(), *this, begin()); + size_t _I; + for (_I = 0; _I < _N && !_A[_I].empty(); ++_I) + {_A[_I].merge(_X); + _A[_I].swap(_X); } + if (_I == _MAXN) + _A[_I].merge(_X); + else + {_A[_I].swap(_X); + if (_I == _N) + ++_N; }} + while (0 < _N) + merge(_A[--_N]); }} + void sort(_Pr3 _Pr) + {if (2 <= size()) + {const size_t _MAXN = 15; + _Myt _X(allocator), _A[_MAXN + 1]; + size_t _N = 0; + while (!empty()) + {_X.splice(_X.begin(), *this, begin()); + size_t _I; + for (_I = 0; _I < _N && !_A[_I].empty(); ++_I) + {_A[_I].merge(_X, _Pr); + _A[_I].swap(_X); } + if (_I == _MAXN) + _A[_I].merge(_X, _Pr); + else + {_A[_I].swap(_X); + if (_I == _N) + ++_N; }} + while (0 < _N) + merge(_A[--_N], _Pr); }} + void reverse() + {if (2 <= size()) + {iterator _L = end(); + for (iterator _F = ++begin(); _F != _L; ) + {iterator _M = _F; + _Splice(begin(), *this, _M, ++_F); }}} +protected: + _Nodeptr _Buynode(_Nodeptr _Narg = 0, _Nodeptr _Parg = 0) + {_Nodeptr _S = (_Nodeptr)allocator._Charalloc( + 1 * sizeof (_Node)); + _Acc::_Next(_S) = _Narg != 0 ? _Narg : _S; + _Acc::_Prev(_S) = _Parg != 0 ? _Parg : _S; + return (_S); } + void _Freenode(_Nodeptr _S) + {allocator.deallocate(_S, 1); } + void _Splice(iterator _P, _Myt& _X, iterator _F, iterator _L) + {if (allocator == _X.allocator) + {_Acc::_Next(_Acc::_Prev(_L._Mynode())) = + _P._Mynode(); + _Acc::_Next(_Acc::_Prev(_F._Mynode())) = + _L._Mynode(); + _Acc::_Next(_Acc::_Prev(_P._Mynode())) = + _F._Mynode(); + _Nodeptr _S = _Acc::_Prev(_P._Mynode()); + _Acc::_Prev(_P._Mynode()) = + _Acc::_Prev(_L._Mynode()); + _Acc::_Prev(_L._Mynode()) = + _Acc::_Prev(_F._Mynode()); + _Acc::_Prev(_F._Mynode()) = _S; } + else + {insert(_P, _F, _L); + _X.erase(_F, _L); }} + void _Xran() const + {_THROW(out_of_range, "invalid list_vs6 subscript"); } + _A allocator; + _Nodeptr _Head; + size_type _Size; +}; + +// list_vs6 TEMPLATE OPERATORS +template inline + bool operator==(const list_vs6<_Ty, _A>& _X, + const list_vs6<_Ty, _A>& _Y) + {return (_X.size() == _Y.size() + && equal(_X.begin(), _X.end(), _Y.begin())); } +template inline + bool operator!=(const list_vs6<_Ty, _A>& _X, + const list_vs6<_Ty, _A>& _Y) + {return (!(_X == _Y)); } +template inline + bool operator<(const list_vs6<_Ty, _A>& _X, + const list_vs6<_Ty, _A>& _Y) + {return (lexicographical_compare(_X.begin(), _X.end(), + _Y.begin(), _Y.end())); } +template inline + bool operator>(const list_vs6<_Ty, _A>& _X, + const list_vs6<_Ty, _A>& _Y) + {return (_Y < _X); } +template inline + bool operator<=(const list_vs6<_Ty, _A>& _X, + const list_vs6<_Ty, _A>& _Y) + {return (!(_Y < _X)); } +template inline + bool operator>=(const list_vs6<_Ty, _A>& _X, + const list_vs6<_Ty, _A>& _Y) + {return (!(_X < _Y)); } +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/memory b/regamedll/hookers/stl/memory new file mode 100644 index 00000000..d04428f6 --- /dev/null +++ b/regamedll/hookers/stl/memory @@ -0,0 +1,166 @@ +#pragma once + +#include "xmemory" + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER + + // TEMPLATE OPERATOR new +template + inline void *operator new(size_t _N, std::allocator_<_Ty>& _Al) + {return (_Al._Charalloc(_N)); } +_STD_BEGIN + // TEMPLATE FUNCTION get_temporary_buffer_ +template inline + pair_<_Ty _FARQ *, _PDFT> + get_temporary_buffer_(_PDFT _N, _Ty _FARQ *) + {_Ty _FARQ *_P; + for (_P = 0; 0 < _N; _N /= 2) + if ((_P = (_Ty _FARQ *)operator new( + (_SIZT)_N * sizeof (_Ty), nothrow)) != 0) + break; + return (pair_<_Ty _FARQ *, _PDFT>(_P, _N)); } + // TEMPLATE FUNCTION return_temporary_buffer_ +template inline + void return_temporary_buffer_(_Ty *_P) + {operator delete(_P); } + // TEMPLATE FUNCTION uninitialized_copy_ +template inline + _FI uninitialized_copy_(_II _F, _II _L, _FI _X) + {for (; _F != _L; ++_X, ++_F) + __Construct(&*_X, *_F); + return (_X); } + // TEMPLATE FUNCTION uninitialized_fill_ +template inline + void uninitialized_fill_(_FI _F, _FI _L, const _Ty& _X) + {for (; _F != _L; ++_F) + __Construct(&*_F, _X); } + // TEMPLATE FUNCTION uninitialized_fill_n +template inline + void uninitialized_fill_n(_FI _F, _S _N, const _Ty& _X) + {for (; 0 < _N; --_N, ++_F) + __Construct(&*_F, _X); } + // TEMPLATE CLASS raw_storage_iterator_ +template + class raw_storage_iterator_ + : public iterator_ { +public: + typedef _OI iterator_type; + typedef _Ty element_type; + explicit raw_storage_iterator_(_OI _X) + : _Next(_X) {} + raw_storage_iterator_<_OI, _Ty>& operator*() + {return (*this); } + raw_storage_iterator_<_OI, _Ty>& operator=(const _Ty& _X) + {__Construct(&*_Next, _X); + return (*this); } + raw_storage_iterator_<_OI, _Ty>& operator++() + {++_Next; + return (*this); } + raw_storage_iterator_<_OI, _Ty> operator++(int) + {raw_storage_iterator_<_OI, _Ty> _Ans = *this; + ++_Next; + return (_Ans); } +private: + _OI _Next; + }; + // TEMPLATE CLASS _Temp_iterator_ +template + class _Temp_iterator_ + : public iterator_ { +public: + typedef _Ty _FARQ *_Pty; + _Temp_iterator_(_PDFT _N = 0) + {pair_<_Pty, _PDFT> _Pair = + get_temporary_buffer_(_N, (_Pty)0); + _Buf._Begin = _Pair.first; + _Buf._Cur = _Pair.first; + _Buf._Hiwater = _Pair.first; + _Buf._Len = _Pair.second; + _Pb = &_Buf; } + _Temp_iterator_(const _Temp_iterator_<_Ty>& _X) + {_Buf._Begin = 0; + _Buf._Cur = 0; + _Buf._Hiwater = 0; + _Buf._Len = 0; + *this = _X; } + ~_Temp_iterator_() + {if (_Buf._Begin != 0) + {for (_Pty _F = _Buf._Begin; + _F != _Buf._Hiwater; ++_F) + __Destroy(&*_F); + return_temporary_buffer_(_Buf._Begin); }} + _Temp_iterator_<_Ty>& operator=(const _Temp_iterator_<_Ty>& _X) + {_Pb = _X._Pb; + return (*this); } + _Temp_iterator_<_Ty>& operator=(const _Ty& _V) + {if (_Pb->_Cur < _Pb->_Hiwater) + *_Pb->_Cur++ = _V; + else + {__Construct(&*_Pb->_Cur, _V); + _Pb->_Hiwater = ++_Pb->_Cur; } + return (*this); } + _Temp_iterator_<_Ty>& operator*() + {return (*this); } + _Temp_iterator_<_Ty>& operator++() + {return (*this); } + _Temp_iterator_<_Ty>& operator++(int) + {return (*this); } + _Temp_iterator_<_Ty>& _Init() + {_Pb->_Cur = _Pb->_Begin; + return (*this); } + _Pty _First() const + {return (_Pb->_Begin); } + _Pty _Last() const + {return (_Pb->_Cur); } + _PDFT _Maxlen() const + {return (_Pb->_Len); } +private: + struct _Bufpar { + _Pty _Begin; + _Pty _Cur; + _Pty _Hiwater; + _PDFT _Len; + } _Buf, *_Pb; + }; + // TEMPLATE CLASS auto_ptr +template + class auto_ptr_ { +public: + typedef _Ty element_type; + explicit auto_ptr_(_Ty *_P = 0) _THROW0() + : _Owns(_P != 0), _Ptr(_P) {} + auto_ptr_(const auto_ptr_<_Ty>& _Y) _THROW0() + : _Owns(_Y._Owns), _Ptr(_Y.release()) {} + auto_ptr_<_Ty>& operator=(const auto_ptr_<_Ty>& _Y) _THROW0() + {if (this != &_Y) + {if (_Ptr != _Y.get()) + {if (_Owns) + delete _Ptr; + _Owns = _Y._Owns; } + else if (_Y._Owns) + _Owns = true; + _Ptr = _Y.release(); } + return (*this); } + ~auto_ptr_() + {if (_Owns) + delete _Ptr; } + _Ty& operator*() const _THROW0() + {return (*get()); } + _Ty *operator->() const _THROW0() + {return (get()); } + _Ty *get() const _THROW0() + {return (_Ptr); } + _Ty *release() const _THROW0() + {((auto_ptr_<_Ty> *)this)->_Owns = false; + return (_Ptr); } +private: + bool _Owns; + _Ty *_Ptr; + }; +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/use_ansi.h b/regamedll/hookers/stl/use_ansi.h new file mode 100644 index 00000000..e3eded15 --- /dev/null +++ b/regamedll/hookers/stl/use_ansi.h @@ -0,0 +1,25 @@ +#pragma once + +#ifdef _MT +#ifdef _DLL +#ifdef _DEBUG +#pragma comment(lib,"msvcprtd") +#else // _DEBUG +#pragma comment(lib,"msvcprt") +#endif // _DEBUG + +#else // _DLL +#ifdef _DEBUG +#pragma comment(lib,"libcpmtd") +#else // _DEBUG +#pragma comment(lib,"libcpmt") +#endif // _DEBUG +#endif // _DLL + +#else // _MT +#ifdef _DEBUG +#pragma comment(lib,"libcpd") +#else // _DEBUG +#pragma comment(lib,"libcp") +#endif // _DEBUG +#endif // _MT diff --git a/regamedll/hookers/stl/utility b/regamedll/hookers/stl/utility new file mode 100644 index 00000000..09bef6c7 --- /dev/null +++ b/regamedll/hookers/stl/utility @@ -0,0 +1,342 @@ +#pragma once + +#include "iosfwd" +#include "xstddef" + +#ifdef _MSC_VER +#pragma pack(push,8) +#endif // _MSC_VER + +_STD_BEGIN + // TEMPLATE STRUCT pair_ +template struct pair_ { + typedef _T1 first_type; + typedef _T2 second_type; + pair_() + : first(_T1()), second(_T2()) {} + pair_(const _T1& _V1, const _T2& _V2) + : first(_V1), second(_V2) {} + template pair_(const pair_ &p) + : first(p.first), second(p.second) {} + _T1 first; + _T2 second; +}; + +template inline + bool __cdecl operator==(const pair_<_T1, _T2>& _X, + const pair_<_T1, _T2>& _Y) + {return (_X.first == _Y.first && _X.second == _Y.second); } + +template inline + bool __cdecl operator!=(const pair_<_T1, _T2>& _X, + const pair_<_T1, _T2>& _Y) + {return (!(_X == _Y)); } +template inline + bool __cdecl operator<(const pair_<_T1, _T2>& _X, + const pair_<_T1, _T2>& _Y) + {return (_X.first < _Y.first || + !(_Y.first < _X.first) && _X.second < _Y.second); } +template inline + bool __cdecl operator>(const pair_<_T1, _T2>& _X, + const pair_<_T1, _T2>& _Y) + {return (_Y < _X); } +template inline + bool __cdecl operator<=(const pair_<_T1, _T2>& _X, + const pair_<_T1, _T2>& _Y) + {return (!(_Y < _X)); } +template inline + bool __cdecl operator>=(const pair_<_T1, _T2>& _X, + const pair_<_T1, _T2>& _Y) + {return (!(_X < _Y)); } +template inline + pair_<_T1, _T2> __cdecl make_pair(const _T1& _X, const _T2& _Y) + {return (pair_<_T1, _T2>(_X, _Y)); } + // ITERATOR TAGS (from ) + +struct input_iterator_tag_ {}; +struct output_iterator_tag_ {}; +struct forward_iterator_tag_ + : public input_iterator_tag_ {}; +struct bidirectional_iterator_tag_ + : public forward_iterator_tag_ {}; +struct random_access_iterator_tag_ + : public bidirectional_iterator_tag_ {}; + // TEMPLATE CLASS iterator_ (from ) +template + struct iterator_ { + typedef _C iterator_category; + typedef _Ty value_type; + typedef _D distance_type; +}; + +template + struct _Bidit : public iterator_ {}; +template + struct _Ranit : public iterator_ {}; + // TEMPLATE CLASS iterator_traits_ (from ) +template + struct iterator_traits_ { + typedef typename _It::iterator_category iterator_category; + typedef typename _It::value_type value_type; + typedef typename _It::distance_type distance_type; + }; + // TEMPLATE FUNCTION _Iter_cat (from ) +template inline + _C __cdecl _Iter_cat(const iterator_<_C, _Ty, _D>&) + {_C _IterCatTag; + _C* _pIterCatTag; + _pIterCatTag = &_IterCatTag; // Workaround for C4700 warning + return (_IterCatTag); } +template inline + random_access_iterator_tag_ __cdecl _Iter_cat(const _Ty *) + {random_access_iterator_tag_ _RandIterTag; + random_access_iterator_tag_* _pRandIterTag; + _pRandIterTag = &_RandIterTag; // Workaround for C4700 warning + return (_RandIterTag); } + // TEMPLATE FUNCTION __Distance +template inline + _CNTSIZ(_II) __cdecl distance(_II _F, _II _L) + {_CNTSIZ(_II) _N = 0; + __Distance(_F, _L, _N, _Iter_cat(_F)); + return (_N); } +template inline + void __cdecl __Distance(_II _F, _II _L, _D& _N) + {__Distance(_F, _L, _N, _Iter_cat(_F)); } +template inline + void __cdecl __Distance(_II _F, _II _L, _D& _N, input_iterator_tag_) + {for (; _F != _L; ++_F) + ++_N; } +template inline + void __cdecl __Distance(_II _F, _II _L, _D& _N, forward_iterator_tag_) + {for (; _F != _L; ++_F) + ++_N; } +template inline + void __cdecl __Distance(_II _F, _II _L, _D& _N, + bidirectional_iterator_tag_) + {for (; _F != _L; ++_F) + ++_N; } +template inline + void __cdecl __Distance(_RI _F, _RI _L, _D& _N, + random_access_iterator_tag_) + {_N += _L - _F; } + // TEMPLATE CLASS reverse_iterator_ (from ) +template + class reverse_iterator_ : public _Ranit<_Ty, _D> { +public: + typedef reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D> _Myt; + typedef _RI iter_type; + typedef _Rt reference_type; + typedef _Pt pointer_type; + reverse_iterator_() + {} + explicit reverse_iterator_(_RI _X) + : current(_X) {} + _RI base() const + {return (current); } + _Rt operator*() const + {return (*(current - 1)); } + _Pt operator->() const + {return (&**this); } + _Myt& operator++() + {--current; + return (*this); } + _Myt operator++(int) + {_Myt _Tmp = *this; + --current; + return (_Tmp); } + _Myt& operator--() + {++current; + return (*this); } + _Myt operator--(int) + {_Myt _Tmp = *this; + ++current; + return (_Tmp); } + _Myt& operator+=(_D _N) + {current -= _N; + return (*this); } + _Myt operator+(_D _N) const + {return (_Myt(current - _N)); } + _Myt& operator-=(_D _N) + {current += _N; + return (*this); } + _Myt operator-(_D _N) const + {return (_Myt(current + _N)); } + _Rt operator[](_D _N) const + {return (*(*this + _N)); } +protected: + _RI current; + }; + +template inline + bool __cdecl operator==( + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (_X.base() == _Y.base()); } + +template inline + bool __cdecl operator!=( + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (!(_X == _Y)); } +template inline + bool __cdecl operator<( + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (_Y.base() < _X.base()); } +template inline + bool __cdecl operator>( + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (_Y < _X); } +template inline + bool __cdecl operator<=( + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (!(_Y < _X)); } +template inline + bool __cdecl operator>=( + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (!(_X < _Y)); } +template inline + _D __cdecl operator-( + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _X, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (_Y.base() - _X.base()); } +template inline + reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D> __cdecl operator+(_D _N, + const reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>& _Y) + {return (reverse_iterator_<_RI, _Ty, _Rt, _Pt, _D>( + _Y.base() - _N)); } + // TEMPLATE CLASS istreambuf_iterator_ (from ) + +template + class istreambuf_iterator_ + : public iterator_ { +public: + typedef istreambuf_iterator_<_E, _Tr> _Myt; + typedef _E char_type; + typedef _Tr traits_type; + typedef typename _Tr::int_type int_type; + typedef basic_streambuf<_E, _Tr> streambuf_type; + typedef basic_istream<_E, _Tr> istream_type; + istreambuf_iterator_(streambuf_type *_Sb = 0) _THROW0() + : _Sbuf(_Sb), _Got(_Sb == 0) {} + istreambuf_iterator_(istream_type& _I) _THROW0() + : _Sbuf(_I.rdbuf()), _Got(_I.rdbuf() == 0) {} + const _E& operator*() const + {if (!_Got) + ((_Myt *)this)->_Peek(); + return (_Val); } + const _E *operator->() const + {return (&**this); } + _Myt& operator++() + {_Inc(); + return (*this); } + _Myt operator++(int) + {if (!_Got) + _Peek(); + _Myt _Tmp = *this; + _Inc(); + return (_Tmp); } + bool equal(const _Myt& _X) const + {if (!_Got) + ((_Myt *)this)->_Peek(); + if (!_X._Got) + ((_Myt *)&_X)->_Peek(); + return (_Sbuf == 0 && _X._Sbuf == 0 + || _Sbuf != 0 && _X._Sbuf != 0); } +private: + void _Inc() + {if (_Sbuf == 0 + || _Tr::eq_int_type(_Tr::eof(), _Sbuf->sbumpc())) + _Sbuf = 0, _Got = true; + else + _Got = false; } + _E _Peek() + {int_type _C; + if (_Sbuf == 0 + || _Tr::eq_int_type(_Tr::eof(), _C = _Sbuf->sgetc())) + _Sbuf = 0; + else + _Val = _Tr::to_char_type(_C); + _Got = true; + return (_Val); } + streambuf_type *_Sbuf; + bool _Got; + _E _Val; +}; + +template inline + bool __cdecl operator==(const istreambuf_iterator_<_E, _Tr>& _X, + const istreambuf_iterator_<_E, _Tr>& _Y) + {return (_X.equal(_Y)); } +template inline + bool __cdecl operator!=(const istreambuf_iterator_<_E, _Tr>& _X, + const istreambuf_iterator_<_E, _Tr>& _Y) + {return (!(_X == _Y)); } + // TEMPLATE CLASS ostreambuf_iterator_ (from ) +template + class ostreambuf_iterator_ + : public iterator_ { + typedef ostreambuf_iterator_<_E, _Tr> _Myt; +public: + typedef _E char_type; + typedef _Tr traits_type; + typedef basic_streambuf<_E, _Tr> streambuf_type; + typedef basic_ostream<_E, _Tr> ostream_type; + ostreambuf_iterator_(streambuf_type *_Sb) _THROW0() + : _Failed(false), _Sbuf(_Sb) {} + ostreambuf_iterator_(ostream_type& _O) _THROW0() + : _Failed(false), _Sbuf(_O.rdbuf()) {} + _Myt& operator=(_E _X) + {if (_Sbuf == 0 + || _Tr::eq_int_type(_Tr::eof(), _Sbuf->sputc(_X))) + _Failed = true; + return (*this); } + _Myt& operator*() + {return (*this); } + _Myt& operator++() + {return (*this); } + _Myt& operator++(int) + {return (*this); } + bool failed() const _THROW0() + {return (_Failed); } +private: + bool _Failed; + streambuf_type *_Sbuf; +}; + // TEMPLATE OPERATORS + namespace rel_ops_ { +template inline + bool __cdecl operator!=(const _Ty& _X, const _Ty& _Y) + {return (!(_X == _Y)); } +template inline + bool __cdecl operator>(const _Ty& _X, const _Ty& _Y) + {return (_Y < _X); } +template inline + bool __cdecl operator<=(const _Ty& _X, const _Ty& _Y) + {return (!(_Y < _X)); } +template inline + bool __cdecl operator>=(const _Ty& _X, const _Ty& _Y) + {return (!(_X < _Y)); } + _STD_END +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/vector b/regamedll/hookers/stl/vector new file mode 100644 index 00000000..909bebe9 --- /dev/null +++ b/regamedll/hookers/stl/vector @@ -0,0 +1,594 @@ +#pragma once + +#include "iterator" +#include "memory" + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER + +_STD_BEGIN + // TEMPLATE CLASS vector_vs6 +template > + class vector_vs6 { +public: + typedef vector_vs6<_Ty, _A> _Myt; + typedef _A allocator_type; + typedef typename _A::size_type size_type; + typedef typename _A::difference_type difference_type; + typedef typename _A::pointer _Tptr; + typedef typename _A::const_pointer _Ctptr; + typedef typename _A::reference reference; + typedef typename _A::const_reference const_reference; + typedef typename _A::value_type value_type; + typedef _Tptr iterator; + typedef _Ctptr const_iterator; + typedef reverse_iterator_ + const_reverse_iterator; + typedef reverse_iterator_ + reverse_iterator; + explicit vector_vs6(const _A& _Al = _A()) + : allocator(_Al), _First(0), _Last(0), _End(0) {} + explicit vector_vs6(size_type _N, const _Ty& _V = _Ty(), + const _A& _Al = _A()) + : allocator(_Al) + {_First = allocator.allocate(_N, (void *)0); + _Ufill(_First, _N, _V); + _Last = _First + _N; + _End = _Last; } + vector_vs6(const _Myt& _X) + : allocator(_X.allocator) + {_First = allocator.allocate(_X.size(), (void *)0); + _Last = _Ucopy(_X.begin(), _X.end(), _First); + _End = _Last; } + typedef const_iterator _It; + vector_vs6(_It _F, _It _L, const _A& _Al = _A()) + : allocator(_Al), _First(0), _Last(0), _End(0) + {insert(begin(), _F, _L); } + ~vector_vs6() + {__Destroy(_First, _Last); + allocator.deallocate(_First, _End - _First); + _First = 0, _Last = 0, _End = 0; } + _Myt& operator=(const _Myt& _X) + {if (this == &_X) + ; + else if (_X.size() <= size()) + {iterator_ _S = copy_(_X.begin(), _X.end(), _First); + __Destroy(_S, _Last); + _Last = _First + _X.size(); } + else if (_X.size() <= capacity()) + {const_iterator _S = _X.begin() + size(); + copy_(_X.begin(), _S, _First); + _Ucopy(_S, _X.end(), _Last); + _Last = _First + _X.size(); } + else + {__Destroy(_First, _Last); + allocator.deallocate(_First, _End - _First); + _First = allocator.allocate(_X.size(), (void *)0); + _Last = _Ucopy(_X.begin(), _X.end(), + _First); + _End = _Last; } + return (*this); } + void reserve(size_type _N) + {if (capacity() < _N) + {iterator_ _S = allocator.allocate(_N, (void *)0); + _Ucopy(_First, _Last, _S); + __Destroy(_First, _Last); + allocator.deallocate(_First, _End - _First); + _End = _S + _N; + _Last = _S + size(); + _First = _S; }} + size_type capacity() const + {return (_First == 0 ? 0 : _End - _First); } + iterator begin() + {return (_First); } + const_iterator begin() const + {return ((const_iterator)_First); } + iterator end() + {return (_Last); } + const_iterator end() const + {return ((const_iterator)_Last); } + reverse_iterator rbegin() + {return (reverse_iterator(end())); } + const_reverse_iterator rbegin() const + {return (const_reverse_iterator(end())); } + reverse_iterator rend() + {return (reverse_iterator(begin())); } + const_reverse_iterator rend() const + {return (const_reverse_iterator(begin())); } + void resize(size_type _N, const _Ty& _X = _Ty()) + {if (size() < _N) + insert(end(), _N - size(), _X); + else if (_N < size()) + erase(begin() + _N, end()); } + size_type size() const + {return (_First == 0 ? 0 : _Last - _First); } + size_type max_size() const + {return (allocator.max_size()); } + bool empty() const + {return (size() == 0); } + _A get_allocator() const + {return (allocator); } + const_reference at(size_type _P) const + {if (size() <= _P) + _Xran(); + return (*(begin() + _P)); } + reference at(size_type _P) + {if (size() <= _P) + _Xran(); + return (*(begin() + _P)); } + const_reference operator[](size_type _P) const + {return (*(begin() + _P)); } + reference operator[](size_type _P) + {return (*(begin() + _P)); } + reference front() + {return (*begin()); } + const_reference front() const + {return (*begin()); } + reference back() + {return (*(end() - 1)); } + const_reference back() const + {return (*(end() - 1)); } + void push_back(const _Ty& _X) + {insert(end(), _X); } + void pop_back() + {erase(end() - 1); } + void assign(_It _F, _It _L) + {erase(begin(), end()); + insert(begin(), _F, _L); } + void assign(size_type _N, const _Ty& _X = _Ty()) + {erase(begin(), end()); + insert(begin(), _N, _X); } + iterator insert(iterator _P, const _Ty& _X = _Ty()) + {size_type _O = _P - begin(); + insert(_P, 1, _X); + return (begin() + _O); } + void insert(iterator _P, size_type _M, const _Ty& _X) + {if (_End - _Last < _M) + {size_type _N = size() + (_M < size() ? size() : _M); + iterator_ _S = allocator.allocate(_N, (void *)0); + iterator_ _Q = _Ucopy(_First, _P, _S); + _Ufill(_Q, _M, _X); + _Ucopy(_P, _Last, _Q + _M); + __Destroy(_First, _Last); + allocator.deallocate(_First, _End - _First); + _End = _S + _N; + _Last = _S + size() + _M; + _First = _S; } + else if (_Last - _P < _M) + {_Ucopy(_P, _Last, _P + _M); + _Ufill(_Last, _M - (_Last - _P), _X); + fill_(_P, _Last, _X); + _Last += _M; } + else if (0 < _M) + {_Ucopy(_Last - _M, _Last, _Last); + copy_backward_(_P, _Last - _M, _Last); + fill_(_P, _P + _M, _X); + _Last += _M; }} + void insert(iterator _P, _It _F, _It _L) + {size_type _M = 0; + __Distance(_F, _L, _M); + if (_End - _Last < _M) + {size_type _N = size() + (_M < size() ? size() : _M); + iterator_ _S = allocator.allocate(_N, (void *)0); + iterator_ _Q = _Ucopy(_First, _P, _S); + _Q = _Ucopy(_F, _L, _Q); + _Ucopy(_P, _Last, _Q); + __Destroy(_First, _Last); + allocator.deallocate(_First, _End - _First); + _End = _S + _N; + _Last = _S + size() + _M; + _First = _S; } + else if (_Last - _P < _M) + {_Ucopy(_P, _Last, _P + _M); + _Ucopy(_F + (_Last - _P), _L, _Last); + copy_(_F, _F + (_Last - _P), _P); + _Last += _M; } + else if (0 < _M) + {_Ucopy(_Last - _M, _Last, _Last); + copy_backward_(_P, _Last - _M, _Last); + copy_(_F, _L, _P); + _Last += _M; }} + iterator erase(iterator _P) + {copy_(_P + 1, end(), _P); + __Destroy(_Last - 1, _Last); + --_Last; + return (_P); } + iterator erase(iterator _F, iterator _L) + {iterator_ _S = copy_(_L, end(), _F); + __Destroy(_S, end()); + _Last = _S; + return (_F); } + void clear() + {erase(begin(), end()); } + bool _Eq(const _Myt& _X) const + {return (size() == _X.size() + && equal_(begin(), end(), _X.begin())); } + bool _Lt(const _Myt& _X) const + {return (lexicographical_compare_(begin(), end(), + _X.begin(), _X.end())); } + void swap(_Myt& _X) + {if (allocator == _X.allocator) + {std::swap_(_First, _X._First); + std::swap_(_Last, _X._Last); + std::swap_(_End, _X._End); } + else + {_Myt _Ts = *this; *this = _X, _X = _Ts; }} + friend void swap(_Myt& _X, _Myt& _Y) + {_X.swap_(_Y); } +protected: + void __Destroy(iterator _F, iterator _L) + {for (; _F != _L; ++_F) + allocator.destroy(_F); } + iterator _Ucopy(const_iterator _F, const_iterator _L, + iterator _P) + {for (; _F != _L; ++_P, ++_F) + allocator.construct(_P, *_F); + return (_P); } + void _Ufill(iterator _F, size_type _N, const _Ty &_X) + {for (; 0 < _N; --_N, ++_F) + allocator.construct(_F, _X); } + void _Xran() const + {_THROW(out_of_range, "invalid vector_vs6 subscript"); } + _A allocator; + iterator _First, _Last, _End; + }; + // CLASS vector_vs6<_Bool, allocator> +typedef unsigned int _Vbase; // word type for vector representation +const int __VBITS = CHAR_BIT * sizeof (_Vbase); // at least CHAR_BITS bits per word + +typedef allocator_<_Vbase> _Bool_allocator; +template +class vector_vs6<_Bool, _Bool_allocator> { +public: + typedef _Bool_allocator _A; + typedef _Bool _Ty; + typedef vector_vs6<_Ty, _A> _Myt; + typedef vector_vs6<_Vbase, _A> _Vbtype; + typedef _A allocator_type; + typedef typename _A::size_type size_type; + typedef typename _A::difference_type difference_type; + + // CLASS reference + class reference { + public: + reference() + : _Mask(0), _Ptr(0) {} + reference(size_t _O, _Vbase *_P) + : _Mask((_Vbase)1 << _O), _Ptr(_P) {} + reference& operator=(const reference& _X) + {return (*this = bool(_X)); } + reference& operator=(bool _V) + {if (_V) + *_Ptr |= _Mask; + else + *_Ptr &= ~_Mask; + return (*this); } + void flip() + {*_Ptr ^= _Mask; } + bool operator~() const + {return (!bool(*this)); } + operator bool() const + {return ((*_Ptr & _Mask) != 0); } + protected: + _Vbase _Mask, *_Ptr; + }; + + typedef const reference const_reference; + typedef bool value_type; + // CLASS const_iterator + class iterator_; + class const_iterator : public _Ranit<_Bool, difference_type> { + public: + const_iterator() + : _Off(0), _Ptr(0) {} + const_iterator(size_t _O, const _Vbase *_P) + : _Off(_O), _Ptr((_Vbase*)_P) {} + const_iterator(const iterator_& _X) + : _Off(_X._Off), _Ptr(_X._Ptr) {} + const_reference operator*() const + {return (const_reference(_Off, _Ptr)); } + const_iterator& operator++() + {_Inc(); + return (*this); } + const_iterator operator++(int) + {const_iterator _Tmp = *this; + _Inc(); + return (_Tmp); } + const_iterator& operator--() + {_Dec(); + return (*this); } + const_iterator operator--(int) + {const_iterator _Tmp = *this; + _Dec(); + return (_Tmp); } + const_iterator& operator+=(difference_type _N) + {_Off += _N; + _Ptr += _Off / __VBITS; + _Off %= __VBITS; + return (*this); } + const_iterator& operator-=(difference_type _N) + {return (*this += -_N); } + const_iterator operator+(difference_type _N) const + {const_iterator _Tmp = *this; + return (_Tmp += _N); } + const_iterator operator-(difference_type _N) const + {const_iterator _Tmp = *this; + return (_Tmp -= _N); } + difference_type operator-(const const_iterator _X) const + {return (__VBITS * (_Ptr - _X._Ptr) + + (difference_type)_Off + - (difference_type)_X._Off); } + const_reference operator[](difference_type _N) const + {return (*(*this + _N)); } + bool operator==(const const_iterator& _X) const + {return (_Ptr == _X._Ptr && _Off == _X._Off); } + bool operator!=(const const_iterator& _X) const + {return (!(*this == _X)); } + bool operator<(const const_iterator& _X) const + {return (_Ptr < _X._Ptr + || _Ptr == _X._Ptr && _Off < _X._Off); } + bool operator>(const const_iterator& _X) const + {return (_X < *this); } + bool operator<=(const const_iterator& _X) const + {return (!(_X < *this)); } + bool operator>=(const const_iterator& _X) const + {return (!(*this < _X)); } + protected: + void _Dec() + {if (_Off != 0) + --_Off; + else + _Off = __VBITS - 1, --_Ptr; } + void _Inc() + {if (_Off < __VBITS - 1) + ++_Off; + else + _Off = 0, ++_Ptr; } + size_t _Off; + _Vbase *_Ptr; + }; + // CLASS iterator_ + class iterator_ : public const_iterator { + public: + iterator_() + : const_iterator() {} + iterator_(size_t _O, _Vbase *_P) + : const_iterator(_O, _P) {} + reference operator*() const + {return (reference(_Off, _Ptr)); } + iterator_& operator++() + {_Inc(); + return (*this); } + iterator_ operator++(int) + {iterator_ _Tmp = *this; + _Inc(); + return (_Tmp); } + iterator_& operator--() + {_Dec(); + return (*this); } + iterator_ operator--(int) + {iterator_ _Tmp = *this; + _Dec(); + return (_Tmp); } + iterator_& operator+=(difference_type _N) + {_Off += _N; + _Ptr += _Off / __VBITS; + _Off %= __VBITS; + return (*this); } + iterator_& operator-=(difference_type _N) + {return (*this += -_N); } + iterator_ operator+(difference_type _N) const + {iterator_ _Tmp = *this; + return (_Tmp += _N); } + iterator_ operator-(difference_type _N) const + {iterator_ _Tmp = *this; + return (_Tmp -= _N); } + difference_type operator-(const iterator_ _X) const + {return (__VBITS * (_Ptr - _X._Ptr) + + (difference_type)_Off + - (difference_type)_X._Off); } + reference operator[](difference_type _N) const + {return (*(*this + _N)); } + bool operator==(const iterator_& _X) const + {return (_Ptr == _X._Ptr && _Off == _X._Off); } + bool operator!=(const iterator_& _X) const + {return (!(*this == _X)); } + bool operator<(const iterator_& _X) const + {return (_Ptr < _X._Ptr + || _Ptr == _X._Ptr && _Off < _X._Off); } + bool operator>(const iterator_& _X) const + {return (_X < *this); } + bool operator<=(const iterator_& _X) const + {return (!(_X < *this)); } + bool operator>=(const iterator_& _X) const + {return (!(*this < _X)); } + }; + typedef reverse_iterator_ + const_reverse_iterator; + typedef reverse_iterator_ + reverse_iterator; + explicit vector_vs6(const _A& _Al = _A()) + : _Size(0), _Vec(_Al) {} + explicit vector_vs6(size_type _N, const bool _V = false, + const _A& _Al = _A()) + : _Vec(_Nw(_N), _V ? -1 : 0, _Al) {_Trim(_N); } + typedef const_iterator _It; + vector_vs6(_It _F, _It _L, const _A& _Al = _A()) + : _Size(0), _Vec(_Al) + {insert(begin(), _F, _L); } + ~vector_vs6() + {_Size = 0; } + void reserve(size_type _N) + {_Vec.reserve(_Nw(_N)); } + size_type capacity() const + {return (_Vec.capacity() * __VBITS); } + iterator_ begin() + {return (iterator_(0, _Vec.begin())); } + const_iterator begin() const + {return (const_iterator(0, _Vec.begin())); } + iterator_ end() + {iterator_ _Tmp = begin(); + if (0 < _Size) + _Tmp += _Size; + return (_Tmp); } + const_iterator end() const + {const_iterator _Tmp = begin(); + if (0 < _Size) + _Tmp += _Size; + return (_Tmp); } + reverse_iterator rbegin() + {return (reverse_iterator(end())); } + const_reverse_iterator rbegin() const + {return (const_reverse_iterator(end())); } + reverse_iterator rend() + {return (reverse_iterator(begin())); } + const_reverse_iterator rend() const + {return (const_reverse_iterator(begin())); } + void resize(size_type _N, bool _X = false) + {if (size() < _N) + insert(end(), _N - size(), _X); + else if (_N < size()) + erase(begin() + _N, end()); } + size_type size() const + {return (_Size); } + size_type max_size() const + {return (_Vec.max_size() * __VBITS); } + bool empty() const + {return (size() == 0); } + _A get_allocator() const + {return (_Vec.get_allocator()); } + const_reference at(size_type _P) const + {if (size() <= _P) + _Xran(); + return (*(begin() + _P)); } + reference at(size_type _P) + {if (size() <= _P) + _Xran(); + return (*(begin() + _P)); } + const_reference operator[](size_type _P) const + {return (*(begin() + _P)); } + reference operator[](size_type _P) + {return (*(begin() + _P)); } + reference front() + {return (*begin()); } + const_reference front() const + {return (*begin()); } + reference back() + {return (*(end() - 1)); } + const_reference back() const + {return (*(end() - 1)); } + void push_back(const bool _X) + {insert(end(), _X); } + void pop_back() + {erase(end() - 1); } + void assign(_It _F, _It _L) + {erase(begin(), end()); + insert(begin(), _F, _L); } + void assign(size_type _N, const bool _X = false) + {erase(begin(), end()); + insert(begin(), _N, _X); } + iterator_ insert(iterator_ _P, const bool _X = false) + {size_type _O = _P - begin(); + insert(_P, 1, _X); + return (begin() + _O); } + void insert(iterator_ _P, size_type _M, const bool _X) + {if (0 < _M) + {if (capacity() - size() < _M) + {size_type _O = _P - begin(); + _Vec.resize(_Nw(size() + _M), 0); + _P = begin() + _O; } + copy_backward_(_P, end(), end() + _M); + fill_(_P, _P + _M, _X); + _Size += _M; }} + void insert(iterator_ _P, _It _F, _It _L) + {size_type _M = 0; + __Distance(_F, _L, _M); + if (0 < _M) + {if (capacity() - size() < _M) + {size_type _O = _P - begin(); + _Vec.resize(_Nw(size() + _M), 0); + _P = begin() + _O; } + copy_backward_(_P, end(), end() + _M); + copy_(_F, _L, _P); + _Size += _M; }} + iterator_ erase(iterator_ _P) + {copy_(_P + 1, end(), _P); + _Trim(_Size - 1); + return (_P); } + iterator_ erase(iterator_ _F, iterator_ _L) + {iterator_ _S = copy_(_L, end(), _F); + _Trim(_S - begin()); + return (_F); } + void clear() + {erase(begin(), end()); } + void flip() + {for (_Vbtype::iterator_ _S = _Vec.begin(); + _S != _Vec.end(); ++_S) + *_S = ~*_S; + _Trim(_Size); } + bool _Eq(const _Myt& _X) const + {return (_Size == _X._Size && _Vec._Eq(_X._Vec)); } + bool _Lt(const _Myt& _X) const + {return (_Size < _X._Size + || _Size == _X._Size && _Vec._Lt(_X._Vec)); } + void swap(_Myt& _X) + {std::swap_(_Size, _X._Size); + _Vec.swap_(_X._Vec); } + friend void swap(_Myt& _X, _Myt& _Y) + {_X.swap_(_Y); } + static void swap(reference _X, reference _Y) + {bool _V = _X; + _X = _Y; + _Y = _V; } +protected: + static size_type _Nw(size_type _N) + {return ((_N + __VBITS - 1) / __VBITS); } + void _Trim(size_type _N) + {size_type _M = _Nw(_N); + if (_M < _Vec.size()) + _Vec.erase(_Vec.begin() + _M, _Vec.end()); + _Size = _N; + _N %= __VBITS; + if (0 < _N) + _Vec[_M - 1] &= ((_Vbase)1 << _N) - 1; } + void _Xran() const + {_THROW(out_of_range, "invalid vector_vs6 subscript"); } + size_type _Size; + _Vbtype _Vec; + }; +typedef vector_vs6<_Bool, _Bool_allocator> _Bvector; + // vector_vs6 TEMPLATE OPERATORS +template inline + bool operator==(const vector_vs6<_Ty, _A>& _X, + const vector_vs6<_Ty, _A>& _Y) + {return (_X._Eq(_Y)); } +template inline + bool operator!=(const vector_vs6<_Ty, _A>& _X, + const vector_vs6<_Ty, _A>& _Y) + {return (!(_X == _Y)); } +template inline + bool operator<(const vector_vs6<_Ty, _A>& _X, + const vector_vs6<_Ty, _A>& _Y) + {return (_X._Lt(_Y)); } +template inline + bool operator>(const vector_vs6<_Ty, _A>& _X, + const vector_vs6<_Ty, _A>& _Y) + {return (_Y < _X); } +template inline + bool operator<=(const vector_vs6<_Ty, _A>& _X, + const vector_vs6<_Ty, _A>& _Y) + {return (!(_Y < _X)); } +template inline + bool operator>=(const vector_vs6<_Ty, _A>& _X, + const vector_vs6<_Ty, _A>& _Y) + {return (!(_X < _Y)); } +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/xmemory b/regamedll/hookers/stl/xmemory new file mode 100644 index 00000000..3cc4a31d --- /dev/null +++ b/regamedll/hookers/stl/xmemory @@ -0,0 +1,85 @@ +#pragma once + +#include +#include + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER + +#ifndef _FARQ // specify standard memory model + #define _FARQ + #define _PDFT ptrdiff_t + #define _SIZT size_t +#endif + #define _POINTER_X(T, A) T _FARQ * + #define _REFERENCE_X(T, A) T _FARQ & +_STD_BEGIN + // TEMPLATE FUNCTION _Allocate +template inline + _Ty _FARQ *_Allocate(_PDFT _N, _Ty _FARQ *) + {if (_N < 0) + _N = 0; + return ((_Ty _FARQ *)operator new( + (_SIZT)_N * sizeof (_Ty))); } + // TEMPLATE FUNCTION __Construct +template inline + void __Construct(_T1 _FARQ *_P, const _T2& _V) + {new ((void _FARQ *)_P) _T1(_V); } + // TEMPLATE FUNCTION __Destroy +template inline + void __Destroy(_Ty _FARQ *_P) + {_DESTRUCTOR(_Ty, _P); } +inline void __Destroy(char _FARQ *_P) + {} +inline void __Destroy(wchar_t _FARQ *_P) + {} + // TEMPLATE CLASS allocator +template + class allocator_ { +public: + typedef _SIZT size_type; + typedef _PDFT difference_type; + typedef _Ty _FARQ *pointer; + typedef const _Ty _FARQ *const_pointer; + typedef _Ty _FARQ& reference; + typedef const _Ty _FARQ& const_reference; + typedef _Ty value_type; + pointer address(reference _X) const + {return (&_X); } + const_pointer address(const_reference _X) const + {return (&_X); } + pointer allocate(size_type _N, const void *) + {return (_Allocate((difference_type)_N, (pointer)0)); } + char _FARQ *_Charalloc(size_type _N) + {return (_Allocate((difference_type)_N, + (char _FARQ *)0)); } + void deallocate(void _FARQ *_P, size_type) + {operator delete(_P); } + void construct(pointer _P, const _Ty& _V) + {__Construct(_P, _V); } + void destroy(pointer _P) + {__Destroy(_P); } + _SIZT max_size() const + {_SIZT _N = (_SIZT)(-1) / sizeof (_Ty); + return (0 < _N ? _N : 1); } + }; +template inline + bool operator==(const allocator_<_Ty>&, const allocator_<_U>&) + {return (true); } +template inline + bool operator!=(const allocator_<_Ty>&, const allocator_<_U>&) + {return (false); } + // CLASS allocator_ +template<> class _CRTIMP2 allocator_ { +public: + typedef void _Ty; + typedef _Ty _FARQ *pointer; + typedef const _Ty _FARQ *const_pointer; + typedef _Ty value_type; + }; +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/xstddef b/regamedll/hookers/stl/xstddef new file mode 100644 index 00000000..38b6f95a --- /dev/null +++ b/regamedll/hookers/stl/xstddef @@ -0,0 +1,52 @@ +#pragma once + +#include + +#ifndef _CRTIMP2 +#ifdef CRTDLL2 +#define _CRTIMP2 __declspec(dllexport) +#else // CRTDLL2 +#ifdef _DLL +#define _CRTIMP2 __declspec(dllimport) +#else // _DLL +#define _CRTIMP2 +#endif // _DLL +#endif // CRTDLL2 +#endif // _CRTIMP2 + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER + +_STD_BEGIN + // EXCEPTION MACROS + #define _TRY_BEGIN try { + #define _CATCH(x) } catch (x) { + #define _CATCH_ALL } catch (...) { + #define _CATCH_END } + #define _RAISE(x) throw (x) + #define _RERAISE throw + #define _THROW0() throw () + #define _THROW1(x) throw (x) + #define _THROW(x, y) throw x(y) + // explicit KEYWORD + // BITMASK MACROS + #define _BITMASK(E, T) typedef int T + #define _BITMASK_OPS(T) + // MISCELLANEOUS MACROS +#define _DESTRUCTOR(ty, ptr) (ptr)->~ty() +#define _PROTECTED public +#define _TDEF(x) = x +#define _TDEF2(x, y) = x, y +#define _CNTSIZ(iter) ptrdiff_t +#define _TDEFP(x) +#define _STCONS(ty, name, val) enum {name = val} + // TYPE DEFINITIONS +//enum _Uninitialized {_Noinit}; + // FUNCTIONS +_CRTIMP2 void __cdecl _Nomemory(); +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/hookers/stl/xutility b/regamedll/hookers/stl/xutility new file mode 100644 index 00000000..30921abb --- /dev/null +++ b/regamedll/hookers/stl/xutility @@ -0,0 +1,103 @@ +#pragma once + +#include "utility" + +#ifdef _MSC_VER +#pragma pack(push, 8) +#endif // _MSC_VER + +_STD_BEGIN + // TEMPLATE FUNCTION copy +template inline + _OI copy_(_II _F, _II _L, _OI _X) + {for (; _F != _L; ++_X, ++_F) + *_X = *_F; + return (_X); } + // TEMPLATE FUNCTION copy_backward +template inline + _BI2 copy_backward_(_BI1 _F, _BI1 _L, _BI2 _X) + {while (_F != _L) + *--_X = *--_L; + return (_X); } + // TEMPLATE FUNCTION equal +template inline + bool equal_(_II1 _F, _II1 _L, _II2 _X) + {return (mismatch(_F, _L, _X).first == _L); } + // TEMPLATE FUNCTION equal WITH PRED +template inline + bool equal_(_II1 _F, _II1 _L, _II2 _X, _Pr _P) + {return (mismatch(_F, _L, _X, _P).first == _L); } + // TEMPLATE FUNCTION fill +template inline + void fill_(_FI _F, _FI _L, const _Ty& _X) + {for (; _F != _L; ++_F) + *_F = _X; } + // TEMPLATE FUNCTION fill_n +template inline + void fill_n(_OI _F, _Sz _N, const _Ty& _X) + {for (; 0 < _N; --_N, ++_F) + *_F = _X; } + // TEMPLATE FUNCTION lexicographical_compare +template inline + bool lexicographical_compare_(_II1 _F1, _II1 _L1, + _II2 _F2, _II2 _L2) + {for (; _F1 != _L1 && _F2 != _L2; ++_F1, ++_F2) + if (*_F1 < *_F2) + return (true); + else if (*_F2 < *_F1) + return (false); + return (_F1 == _L1 && _F2 != _L2); } + // TEMPLATE FUNCTION lexicographical_compare WITH PRED +template inline + bool lexicographical_compare_(_II1 _F1, _II1 _L1, + _II2 _F2, _II2 _L2, _Pr _P) + {for (; _F1 != _L1 && _F2 != _L2; ++_F1, ++_F2) + if (_P(*_F1, *_F2)) + return (true); + else if (_P(*_F2, *_F1)) + return (false); + return (_F1 == _L1 && _F2 != _L2); } + // TEMPLATE FUNCTION max + +#ifndef _MAX + #define _MAX _cpp_max + #define _MIN _cpp_min +#endif // _MAX + +template inline + const _Ty& _cpp_max(const _Ty& _X, const _Ty& _Y) + {return (_X < _Y ? _Y : _X); } + // TEMPLATE FUNCTION max WITH PRED +template inline + const _Ty& _cpp_max(const _Ty& _X, const _Ty& _Y, _Pr _P) + {return (_P(_X, _Y) ? _Y : _X); } + // TEMPLATE FUNCTION min +template inline + const _Ty& _cpp_min(const _Ty& _X, const _Ty& _Y) + {return (_Y < _X ? _Y : _X); } + // TEMPLATE FUNCTION min WITH PRED +template inline + const _Ty& _cpp_min(const _Ty& _X, const _Ty& _Y, _Pr _P) + {return (_P(_Y, _X) ? _Y : _X); } + // TEMPLATE FUNCTION mismatch +template inline + pair_<_II1, _II2> mismatch(_II1 _F, _II1 _L, _II2 _X) + {for (; _F != _L && *_F == *_X; ++_F, ++_X) + ; + return (pair_<_II1, _II2>(_F, _X)); } + // TEMPLATE FUNCTION mismatch WITH PRED +template inline + pair_<_II1, _II2> mismatch(_II1 _F, _II1 _L, _II2 _X, _Pr _P) + {for (; _F != _L && _P(*_F, *_X); ++_F, ++_X) + ; + return (pair_<_II1, _II2>(_F, _X)); } + // TEMPLATE FUNCTION swap +template inline + void swap_(_Ty& _X, _Ty& _Y) + {_Ty _Tmp = _X; + _X = _Y, _Y = _Tmp; } +_STD_END + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER diff --git a/regamedll/msvc/ReGameDLL.vcxproj b/regamedll/msvc/ReGameDLL.vcxproj index 9c0d8862..6c3c98c6 100644 --- a/regamedll/msvc/ReGameDLL.vcxproj +++ b/regamedll/msvc/ReGameDLL.vcxproj @@ -866,6 +866,7 @@ + @@ -926,6 +927,15 @@ + + + + + + + + + true true @@ -1144,9 +1154,7 @@ $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") - -IF EXIST "$(ProjectDir)START_VIP.bat" (CALL "$(ProjectDir)START_VIP.bat") + IF EXIST "$(ProjectDir)PostBuild.bat" (CALL "$(ProjectDir)PostBuild.bat" "$(TargetDir)" "$(TargetName)" "$(TargetExt)" "$(ProjectDir)") Automatic deployment script diff --git a/regamedll/msvc/ReGameDLL.vcxproj.filters b/regamedll/msvc/ReGameDLL.vcxproj.filters index 42ef595b..f12523bd 100644 --- a/regamedll/msvc/ReGameDLL.vcxproj.filters +++ b/regamedll/msvc/ReGameDLL.vcxproj.filters @@ -79,6 +79,9 @@ {d1cb44c6-0982-4410-a099-0b3666ace636} + + {e0c6021c-de51-464f-b971-89942190e545} + @@ -1121,6 +1124,9 @@ dlls + + hookers\stl + @@ -1129,5 +1135,32 @@ linux + + hookers\stl + + + hookers\stl + + + hookers\stl + + + hookers\stl + + + hookers\stl + + + hookers\stl + + + hookers\stl + + + hookers\stl + + + hookers\stl + \ No newline at end of file diff --git a/regamedll/regamedll/precompiled.h b/regamedll/regamedll/precompiled.h index efe357c5..49ae1316 100644 --- a/regamedll/regamedll/precompiled.h +++ b/regamedll/regamedll/precompiled.h @@ -20,6 +20,11 @@ #ifdef HOOK_GAMEDLL #include "hooker.h" + +// STL containers Visual Studio 6.0 +#include "stl/vector" +#include "stl/list" + #endif // HOOK_GAMEDLL #include "dlls.h" @@ -35,7 +40,6 @@ #include "utlsymbol.h" //testsuite - #include "testsuite/testsuite.h" #include "testsuite/funccalls.h" #include "testsuite/recorder.h"