当前位置: 首页>>代码示例>>C++>>正文


C++ StompHook::initialize方法代码示例

本文整理汇总了C++中StompHook::initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ StompHook::initialize方法的具体用法?C++ StompHook::initialize怎么用?C++ StompHook::initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StompHook的用法示例。


在下文中一共展示了StompHook::initialize方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PatchCoD4_Console

void PatchCoD4_Console()
{
	memset((void*)0x4FCB73, 0x90, 9); // disable null check

	hCreateWindow.initialize(SYS_CREATEWINDOW_HOOK, Sys_CreateConsole);
	hCreateWindow.installHook();

	hDestroyWindow.initialize(SYS_DESTROYWINDOW_HOOK, Sys_DestroyConsole);
	hDestroyWindow.installHook();

	hSysPrint.initialize(SYS_PRINT_HOOK, Sys_Print);
	hSysPrint.installHook();
}
开发者ID:ArmedGuy,项目名称:iw3d,代码行数:13,代码来源:PatchCoD4_Console.cpp

示例2: PatchMW2_Stats

void PatchMW2_Stats()
{
	writeStatsHook.initialize(writeStatsHookLoc, WriteStatsHookStub);
	writeStatsHook.installHook();

	loadOldStatsHook.initialize(loadOldStatsHookLoc, LoadOldStatsHookFunc);
	loadOldStatsHook.installHook();

	readStatsHook.initialize(readStatsHookLoc, ReadStatsHookStub);
	readStatsHook.installHook();

	// make statWriteNeeded ignored (kill stat saving?)
	//*(BYTE*)0x424BD0 = 0xEB;
}
开发者ID:JohannesHei,项目名称:iw4m-lan,代码行数:14,代码来源:PatchMW2Stats.cpp

示例3: PatchT4_NoBorder

void PatchT4_NoBorder()
{
	r_noborder = Dvar_RegisterBool(0, "r_noborder", DVAR_FLAG_ARCHIVE, "Remove the border when running in windowed mode (set vid_xpos and vid_ypos to 0).");

	windowedWindowStyleHook.initialize(windowedWindowStyleHookLoc, WindowedWindowStyleHookStub, 5, false);
	windowedWindowStyleHook.installHook();
}
开发者ID:DidUknowiPwn,项目名称:T4M,代码行数:7,代码来源:PatchT4NoBorder.cpp

示例4: PatchMW2_NoBorder

void PatchMW2_NoBorder()
{
	r_noborder = Dvar_RegisterBool("r_noborder", true, DVAR_FLAG_SAVED, "Do not use a border in windowed mode");

	windowedWindowStyleHook.initialize(windowedWindowStyleHookLoc, WindowedWindowStyleHookStub, 5, false);
	windowedWindowStyleHook.installHook();
}
开发者ID:Call-of-Duty-Scripts,项目名称:fourdeltaone,代码行数:7,代码来源:PatchMW2NoBorder.cpp

示例5: PatchMW2_WeaponCamos

void PatchMW2_WeaponCamos()
{
#if PRE_RELEASE_DEMO
	// before enabling: g_modelindex: overflow
	return;
#endif

	xModelTable.set_empty_key("");
	xMaterialTable.set_empty_key("");

	/*
	xModelLoadHook.initialize(xModelLoadHookLoc, XModelLoadHookFunc);
	xModelLoadHook.installHook();

	xModelLoadHook2.initialize(xModelLoadHook2Loc, XModelLoadHookFunc);
	xModelLoadHook2.installHook();

	xModelLoadHook3.initialize(xModelLoadHook3Loc, XModelLoadHookFunc);
	xModelLoadHook3.installHook();
	*/

	forEachXAssetHook.initialize(forEachXAssetHookLoc, ForEachXAssetHookStub);
	forEachXAssetHook.installHook();

	postWeaponLoadHook.initialize(postWeaponLoadHookLoc, PostWeaponLoadHookStub);
	postWeaponLoadHook.installHook();
}
开发者ID:Call-of-Duty-Scripts,项目名称:fourdeltaone,代码行数:27,代码来源:PatchMW2WeaponCamos.cpp

示例6: PatchMW2_StringTable

// entry point
void PatchMW2_StringTable()
{
	stringTables.set_empty_key("");

	stringTableHook.initialize(stringTableHookLoc, StringTable_GetAsset);
	stringTableHook.installHook();
}
开发者ID:Call-of-Duty-Scripts,项目名称:fourdeltaone,代码行数:8,代码来源:PatchMW2StringTable.cpp

示例7:

static void PatchMW2_ClientConsole_Toggle()
{
	clKeyEventToggleConsoleHook1.initialize((PBYTE)clKeyEventToggleConsoleHook1Loc);
	clKeyEventToggleConsoleHook1.installHook(Con_ToggleConsole, false);

	clKeyEventToggleConsoleHook2.initialize(5, (PBYTE)clKeyEventToggleConsoleHook2Loc);
	clKeyEventToggleConsoleHook2.installHook(Con_ToggleConsole, true, false);
}
开发者ID:HOOman33,项目名称:openiwnet-iw4,代码行数:8,代码来源:PatchMW2ClientConsole.cpp

示例8: PatchMW2_Materialism

void PatchMW2_Materialism()
{
	materialTable.set_empty_key("");

	materialLoadHook.initialize(materialLoadHookLoc, MaterialLoadHookFunc);
	materialLoadHook.installHook();

	Cmd_AddCommand("materialTableDebug", Material_TableDebug_f, &tDebugCmd, 0);
}
开发者ID:Call-of-Duty-Scripts,项目名称:fourdeltaone,代码行数:9,代码来源:PatchMW2Materialism.cpp

示例9: PatchMW2_Console

// patch entry point
void PatchMW2_Console()
{
	createConsoleHook.initialize(5, (PBYTE)HOOK_Sys_CreateConsole);
	createConsoleHook.installHook(Sys_CreateConsole, true, false);

	destroyConsoleHook.initialize(5, (PBYTE)HOOK_Sys_DestroyConsole);
	destroyConsoleHook.installHook(Sys_DestroyConsole, true, false);

	// TODO: get rid of weird casts
	sysPrintHook.initialize(5, (PBYTE)HOOK_Sys_Print);
	sysPrintHook.installHook((void (__cdecl *)(void))Sys_Print, true, false);

	sysErrorHook.initialize(5, (PBYTE)HOOK_Sys_Error);
	sysErrorHook.installHook((void (__cdecl *)(void))Sys_Error, true, false);

	consoleInputHook.initialize((PBYTE)HOOK_Sys_ConsoleInput);
	consoleInputHook.installHook((void (__cdecl *)(void))Sys_ConsoleInput, false);

	//PatchMW2_DebugAllocations();
}
开发者ID:HOOman33,项目名称:openiwnet-iw4,代码行数:21,代码来源:PatchMW2Console.cpp

示例10: PatchMW2_LocalizedStrings

void PatchMW2_LocalizedStrings()
{
	_localizedStrings.set_empty_key("");
 
	loadLocalizeHook.initialize(loadLocalizeHookLoc, SEH_GetLocalizedString);
	loadLocalizeHook.installHook();
 
	call(0x4CE5EE, SetString, PATCH_CALL); //instead of calling CStringEdPackage::SetString in CStringEdPackage::ParseLine we call our SetString
	call(0x41D860, SELoadLanguageHookStub, PATCH_JUMP); //instead of the game loading str files according to loc_language we load them according to loc_modlanguage
 
	Dvar_RegisterEnum("loc_modLanguage", ModLanguageEnum, 0, DVAR_FLAG_SAVED, "Preferred language for custom localized strings.");
}
开发者ID:Call-of-Duty-Scripts,项目名称:fourdeltaone,代码行数:12,代码来源:PatchMW2LocalizedStrings.cpp

示例11: PatchMW2_Load

void PatchMW2_Load()
{
	// rawfile moddability
	rawFileHook1.initialize(rawFileHook1Loc, LoadModdableRawfileStub);
	rawFileHook1.installHook();

	rawFileHook2.initialize(rawFileHook2Loc, LoadModdableRawfileStub);
	rawFileHook2.installHook();

	rawFileHook3.initialize(rawFileHook3Loc, LoadModdableRawfileStub);
	rawFileHook3.installHook();

	rawFileHook4.initialize(rawFileHook4Loc, LoadModdableRawfileStub2);
	rawFileHook4.installHook();

	rawFileHook5.initialize(rawFileHook5Loc, LoadModdableRawfileStub);
	rawFileHook5.installHook();

	rawFileHook6.initialize(rawFileHook6Loc, LoadModdableRawfileStub);
	rawFileHook6.installHook();

	rawFileHook7.initialize(rawFileHook7Loc, LoadModdableRawfileStub);
	rawFileHook7.installHook();

	rawFileHook8.initialize(rawFileHook8Loc, LoadModdableRawfileStub);
	rawFileHook8.installHook();

	//rawFileHook9.initialize(rawFileHook9Loc, LoadModdableRawfileStub);
	//rawFileHook9.installHook();

	//rawFileHook10.initialize(rawFileHook10Loc, LoadModdableRawfileStub);
	//rawFileHook10.installHook();

	// fastfile loading hooks
	uiLoadHook1.initialize(uiLoadHook1Loc, UILoadHook1Stub);
	uiLoadHook1.installHook();

	ffLoadHook1.initialize(ffLoadHook1Loc, FFLoadHook1Stub);
	ffLoadHook1.installHook();

	ffLoadHook2.initialize(ffLoadHook2Loc, FFLoadHook2Stub);
	ffLoadHook2.installHook();

	zoneLoadHook1.initialize(zoneLoadHook1Loc, ZoneLoadHook1Stub);
	zoneLoadHook1.installHook();

	zoneLoadHook2.initialize(zoneLoadHook2Loc, ZoneLoadHook2Stub);
	zoneLoadHook2.installHook();

	getZoneRootHook.initialize(getZoneRootHookLoc, GetZoneRootHookFunc);
	getZoneRootHook.installHook();

	// disable 'ignoring asset' notices
	memset((void*)0x5BB902, 0x90, 5);

	// ignore 'no iwd files found in main'
	memset((void*)0x642A4B, 0x90, 5);

	if (strstr(GetCommandLine(), "fs_cdpath") != NULL)
	{
		// fs_basepath for 'players' -> fs_cdpath
		*(DWORD*)0x482408 = 0x63D0BB0;
	}

	// zone folders -> remove absolute stuff
	zoneTestHook.initialize(zoneTestHookLoc, ZoneTestHookFunc);
	zoneTestHook.installHook();

	zoneSprintfHook.initialize(zoneSprintfHookLoc, ZoneSprintfHookFunc);
	zoneSprintfHook.installHook();
}
开发者ID:enghama,项目名称:iw4lan,代码行数:71,代码来源:PatchMW2Load.cpp

示例12: PatchIW3_VA

void PatchIW3_VA()
{
	vaHook.initialize(vaHookLoc, va);
	vaHook.installHook();
}
开发者ID:Call-of-Duty-Scripts,项目名称:iw3m,代码行数:5,代码来源:PatchIW3VA.cpp

示例13: PatchSP

void PatchSP()
{
        // cg_fov unprotect
        *(DWORD*)0x4A3921 = DVAR_ARCHIVE;

        // small fix for infinite waiting for other players
        *(BYTE*)0x5026BC = 0x0;
        
        // function changes
        Com_Error = (Com_Error_t)0x651D90;
		Com_Printf = (Com_Printf_t)0x43BF30;

        // disable bandwidth testing / better match finding
        *(WORD*)0x693842 = 0x9090;
		
		// enable console (normally this check is !monkeytoy || blah; now it's only 'blah'
        *(BYTE*)0x58761C = 0xEB;

        // console toggling
        toggleConsoleHook1.initialize("", (PBYTE)toggleConsoleHook1Loc);
        toggleConsoleHook1.installHook((void(*)())Con_ToggleConsole, false);

        toggleConsoleHook2.initialize("", (PBYTE)toggleConsoleHook2Loc);
        toggleConsoleHook2.installHook((void(*)())Con_ToggleConsole, false);

        // player_sustainAmmo re-adding
        sustainAmmoHook.initialize("", 7, (PBYTE)sustainAmmoHookLoc);
        sustainAmmoHook.installHook(SustainAmmoHookFunc, true, false);
        
        // cg_drawVersion
        *(BYTE*)0x4A3D46 = 1; // default
        *(BYTE*)0x4A3D44 = 0x50; // flags
		
        // y 450, x 10
        *(DWORD*)0x4A3D7A = (DWORD)&drawVersionX;
        *(DWORD*)0x4A3DAF = (DWORD)&drawVersionY;

        *(DWORD*)0x9A33FC = (DWORD)customTimeBeginPeriod;

        // set port to 28960
        *(DWORD*)0x52E1D5 = 28960;

        // disable UPnP
        //*(WORD*)0x973C6B = 0x9090;

        // remove the windows hook setting function
        //*(BYTE*)0x8683D0 = 0xC3;

        // con stuff
        *(WORD*)0x79E6E5 = 0x9090; // dvar set 1

        *(BYTE*)0x5119B0 = 0xC3;   // dvar reset flag
        *(WORD*)0x4A87EB = 0x9090; // dvar exec
        *(WORD*)0x829CBE = 0x9090; // cmd  exec
        *(WORD*)0x5F5D4E = 0x9090; // dvar enum
        *(WORD*)0x610A94 = 0x9090; // cmd  enum

        windowedWindowStyleHook.initialize("aaaaa", 5, (PBYTE)windowedWindowStyleHookLoc);
        windowedWindowStyleHook.installHook(WindowedWindowStyleHookStub, false, false);

        // gethostbyname
        *(DWORD*)0x9A3470 = (DWORD)custom_gethostbyname;

        // small fix for infinite waiting for other players
        *(BYTE*)0x5026BC = 0x03;
}
开发者ID:Call-of-Duty-Scripts,项目名称:Back-Ops-AlterIWnet,代码行数:66,代码来源:PatchSP.cpp


注:本文中的StompHook::initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。