Exemplo n.º 1
0
		static Enums::version_result_code GetVersionResultCode()
		{
			Enums::version_result_code result_code = Enums::_version_result_code_invalid;

			char dir[MAX_PATH];
			GetCurrentDirectory(NUMBEROF(dir), dir);

			char name[64];
			GetModuleBaseName(GetCurrentProcess(), GetModuleHandle(nullptr), name, NUMBEROF(name));
			_strlwr_s(name);

			// Ok, the warning message will get annoying after a while for sapien (and tool) users
			if ( strstr(name,"sapien") != nullptr || strstr(name,"hobo") != nullptr || 
				 strstr(name,"tool") != nullptr )
				return Enums::_version_result_code_dx9_app;

			// Enable OS if the exe name is haloce/OS_ded
			_main_globals.enabled = (strcmp(name, PLATFORM_VALUE("haloce.exe","os_haloceded.exe")) == 0);

			return Enums::_version_result_code_valid;
		}
Exemplo n.º 2
0
	void Initialize()
	{
		PLATFORM_VALUE(Guerilla, Tool, Sapien)::Initialize();

		//TagGroups::Initialize();
	}
Exemplo n.º 3
0
	void Dispose()
	{
		PLATFORM_VALUE(Guerilla, Tool, Sapien)::Dispose();

		TagGroups::Dispose();
	}
		// scenario_yelo_load
		// This is a Tool and Sapien specific hack to use the Yelo's globals tag 
		// override reference.
		static void scenario_yelo_load(cstring scenario_name)
		{
			// References to the string "globals\globals"
			cstring* K_GLOBALS_TAG_NAME_REFERENCES[] = {
				CAST_PTR(cstring*, PLATFORM_VALUE(NULL, 0x4434CA, 0x51675F)),
				CAST_PTR(cstring*, PLATFORM_VALUE(NULL, 0x443C95, 0x517525)),
#if PLATFORM_ID == PLATFORM_TOOL
				CAST_PTR(cstring*, PLATFORM_VALUE(NULL, 0x4541A2, NULL)),
#endif
			};
			// Address of the string "globals\globals"
			cstring K_GLOBALS_TAG_NAME_ADDRESS = CAST_PTR(cstring, 
				PLATFORM_VALUE(NULL, 0x612FA0, 0x9116CC));

			// The new globals reference name which we're going to force the tool code to use.
			// Defaults to the stock globals tag name.
			cstring globals_tag_name = K_GLOBALS_TAG_NAME_ADDRESS;

			// A little trick to reset the globals tag back to the stock reference name
			if(scenario_name == NULL)
				globals_tag_name = K_GLOBALS_TAG_NAME_ADDRESS;
			else
			{
				const bool k_for_cache_build = 
#if PLATFORM_ID == PLATFORM_TOOL
					true
#elif PLATFORM_ID == PLATFORM_SAPIEN || PLATFORM_ID == PLATFORM_GUERILLA
					false