Пример #1
0
	bool OBSEPlugin_Load(const OBSEInterface * obse)
	{
		g_pluginHandle = obse->GetPluginHandle();
		_MESSAGE("RuntimeEditorIDs Initializing...");
		gLog.Indent();

		if(!obse->isEditor)
		{
			for (int i = 0; i < VTBLTableSize; i++)
			{
				UInt32 PatchAddress = g_VTBLTable[i].Address + kTESForm_SetEditorID_VTBLOffset;
				SafeWrite32(PatchAddress, (UInt32)TESForm_HandleEditorID);

				_MESSAGE("Patched '%s' VTBL offset 0x%08X", g_VTBLTable[i].Class, PatchAddress);
			}
		}

		obse->SetOpcodeBase(0x2740);		// 0x2740 - 0x274F
		obse->RegisterTypedCommand(&kCommandInfo_GetRuntimeEditorID, kRetnType_String);

		g_msgIntfc->RegisterListener(g_pluginHandle, "OBSE", OBSEMessageHandler);

		gLog.Outdent();
		_MESSAGE("RuntimeEditorIDs Initialized!\n\n");
		return true;
	}
Пример #2
0
    bool OBSEPlugin_Load(const OBSEInterface * obse)
    {
        g_pluginHandle = obse->GetPluginHandle();
        _MESSAGE("RuntimeScriptProfiler Initializing...");
        gLog.Indent();

        gLog.SetAutoFlush(false);
        g_AppPath = obse->GetOblivionDirectory();
        g_INIPath = g_AppPath + "Data\\OBSE\\Plugins\\RuntimeScriptProfiler.ini";

        g_INIManager->SetINIPath(g_INIPath);
        g_INIManager->Initialize();

        PatchScriptRunnerPerformanceCounter();
        PatchTESExecuteScriptsMainLoop();

        gLog.Outdent();
        _MESSAGE("RuntimeScriptProfiler Initialized!\n\n");

        _MESSAGE("Script\t\t\t\t\t\t\t\t\t\tElapsed Time\n");
        return true;
    }