Exemple #1
0
        public static void AddHooks()
        {
            if (inited)
            {
                return;
            }
            inited = true;

            Process.AddFastHook(AdvanceAni, 0x57CE90, 0x7);
        }
Exemple #2
0
        public static void AddHooks()
        {
            if (inited)
            {
                return;
            }
            inited = true;

            Process.AddFastHook(GetName, 0x71BC30, 0x5).SetOriCodeReturn(1);
            Logger.Log("Added Mob hooks.");
        }
Exemple #3
0
        static void Hook()
        {
            if (hooked)
            {
                return;
            }
            hooked = true;

            Process.AddFastHook(Render, 0x53099C, 5);
            //Process.AddHook(Render, 0x6BB92A, 5);

            Logger.Log("Added barrier hooks.");
        }
Exemple #4
0
        public static void AddHooks()
        {
            if (inited)
            {
                return;
            }
            inited = true;

            var h = Process.AddFastHook(hook_ParticleMaximum, 0x005E2049, 8);

            Process.WriteBytes(h.OriCodeInMethodCode + 4, BitConverter.GetBytes(0x005E23EC - (h.OriCodeInMethodCode + 8))); // re-adjust JLE

            Process.WriteBytes(0x005EAF54, 0xE9, 0x8D, 0x00, 0x00, 0x00);                                                   // jmp over rain weight calculation
        }
Exemple #5
0
        public static void AddHooks()
        {
            if (inited)
            {
                return;
            }
            inited = true;


            Process.AddFastHook(RbtForwardHook, 0x687B71, 6);
            Process.AddFastHook(RbtStandHook, 0x683BEA, 6);
            Process.AddFastHook(RbtStandHook, 0x686AF8, 6);
            Process.AddFastHook(RbtStandHook, 0x686B62, 6);

            Logger.Log("Added npc hooks.");
        }
Exemple #6
0
        static void AddHooks_Physical()
        {
            /*h = Process.AddHook(File_Append, 0x444270, 6);
            *  h = Process.AddHook(File_ChangeDir, 0x446670, 6, 1);
            *  h = Process.AddHook(File_Close, 0x444010, 7);
            *  h = Process.AddHook(File_Create, 0x4439F0, 7);
            *  h = Process.AddHook(File_DirCreate, 0x4472F0, 7);
            *  h = Process.AddHook(File_DirExists, 0x447500, 7);
            *  h = Process.AddHook(File_DirRemove, 0x447400, 7);
            *  h = Process.AddHook(File_DirStepInto, 0x4468C0, 7, 1);
            *  h = Process.AddHook(File_Eof, 0x444290, 6);
            *  h = Process.AddHook(File_Exists, 0x4436B0, 6);*/

            Process.AddFastHook(DirectFileConvert, 0x442390, 0x6);
            Process.AddFastHook(File_Open, 0x7D2010, 6).SetOriCodeReturn();   // fopen
            Process.AddFastHook(File_Exists, 0x7D197A, 0xA).SetOriCodeSkip(); // fexists
        }
Exemple #7
0
        static void AddHooks_Virtual()
        {
            Process.AddFastHook(VDFS_Exists, 0x449020, 6).SetOriCodeReturn(0);
            Process.AddFastHook(VDFS_Open, 0x449120, 6).SetOriCodeReturn(1);
            Process.AddFastHook(VDFS_Close, 0x4493A0, 8).SetOriCodeReturn(0);
            Process.AddFastHook(VDFS_Close, 0x448ED0, 7); // zFile_VDFS Destructor

            Process.AddFastHook(VDFS_Seek, 0x449490, 6).SetOriCodeReturn(1);
            Process.AddFastHook(VDFS_Pos, 0x449A50, 5).SetOriCodeReturn(0);
            Process.AddFastHook(VDFS_EOF, 0x449470, 5).SetOriCodeReturn(0);
            Process.AddFastHook(VDFS_Size, 0x449410, 5).SetOriCodeReturn(0);

            Process.AddFastHook(VDFS_ReadSize, 0x44ABF0, 6).SetOriCodeReturn(2);
            Process.AddFastHook(VDFS_ReadString, 0x44A8D0, 6).SetOriCodeReturn(1);

            Process.AddFastHook(VDFS_SearchFile, 0x449E80, 6).SetOriCodeReturn(3);
        }
Exemple #8
0
        public static void AddHooks()
        {
            if (inited)
            {
                return;
            }
            inited = true;

            // should never be called anyway, but just to be sure
            Process.AddFastHook(r => GothicGlobals.UpdateGameAddress(), 0x426F5E, 0xB);   // GameSessionInit
            Process.AddFastHook(r => GothicGlobals.UpdateGameAddress(), 0x0042705B, 0xB); // GameSessionDone

            // hook outgame loop and kick out the original menus
            Process.AddFastHook(RunOutgame, 0x004292D0, 7).SetOriCodeReturn(1);

            // hook ingame loop
            Process.AddFastHook(RunIngame, 0x6C86A0, 7); // before gothic's precache

            // first render
            Process.AddFastHook(FirstRender, 0x6C876B, 6);

            Logger.Log("Added game loop hooks.");
        }