Prepare zone patches

This commit is contained in:
momo5502 2016-09-18 15:10:23 +02:00
parent 05488339d8
commit 2ab995a2a5
5 changed files with 44 additions and 1 deletions

View File

@ -28,6 +28,7 @@ namespace Components
Loader::Register(new Menus()); Loader::Register(new Menus());
Loader::Register(new Toast()); Loader::Register(new Toast());
Loader::Register(new Party()); Loader::Register(new Party());
Loader::Register(new Zones());
Loader::Register(new Colors()); Loader::Register(new Colors());
Loader::Register(new D3D9Ex()); Loader::Register(new D3D9Ex());
Loader::Register(new Logger()); Loader::Register(new Logger());

View File

@ -39,6 +39,7 @@ namespace Components
#include "Modules\Flags.hpp" #include "Modules\Flags.hpp"
#include "Modules\Menus.hpp" #include "Modules\Menus.hpp"
#include "Modules\Toast.hpp" #include "Modules\Toast.hpp"
#include "Modules\Zones.hpp"
#include "Modules\Colors.hpp" #include "Modules\Colors.hpp"
#include "Modules\D3D9Ex.hpp" #include "Modules\D3D9Ex.hpp"
#include "Modules\Script.hpp" #include "Modules\Script.hpp"

View File

@ -147,11 +147,13 @@ namespace Components
{ {
Game::DB_ReadXFileUncompressed(version, size); Game::DB_ReadXFileUncompressed(version, size);
// Allow loading out custom version // Allow loading of custom version
if (*version == XFILE_VERSION_IW4X) if (*version == XFILE_VERSION_IW4X)
{ {
*version = XFILE_VERSION; *version = XFILE_VERSION;
} }
Zones::InstallPatches(*version);
} }
FastFiles::FastFiles() FastFiles::FastFiles()

View File

@ -0,0 +1,21 @@
#include "STDInclude.hpp"
namespace Components
{
int Zones::ZoneVersion;
void Zones::InstallPatches(int version)
{
Zones::ZoneVersion = version;
}
Zones::Zones()
{
}
Zones::~Zones()
{
}
}

View File

@ -0,0 +1,18 @@
namespace Components
{
class Zones : public Component
{
public:
Zones();
~Zones();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Zones"; };
#endif
static void InstallPatches(int version);
private:
static int ZoneVersion;
};
}