Пример #1
0
        /// <summary>
        /// Your own user code starts here.
        /// If this is your first time, do consider reading the notice above.
        /// It contains some very useful information.
        /// </summary>
        public static unsafe void Init()
        {
            #if DEBUG
            Debugger.Launch();
            #endif

            Controller = new ReloadedController();
        }
Пример #2
0
        /* Entry Point */
        public static unsafe void Init()
        {
#if DEBUG
            Debugger.Launch();
#endif

            // Setup controllers.
            var controllerManager = new ControllerManager();
            playerOneController   = new ReloadedController(Player.PlayerOne, controllerManager);
            playerTwoController   = new ReloadedController(Player.PlayerTwo, controllerManager);
            playerThreeController = new ReloadedController(Player.PlayerThree, controllerManager);
            playerFourController  = new ReloadedController(Player.PlayerFour, controllerManager);

            // Hook get controls function.
            psPADServerHook = FunctionHook <psPADServerPC> .Create(0x444F30, PSPADServerImpl).Activate();

            // Copy the old function to a new place and create a function from it.
            byte[] periMakeRepeatBytes = GameProcess.ReadMemory((IntPtr)0x00434FF0, 0xDD);
            IntPtr functionPtr         = MemoryBufferManager.Add(periMakeRepeatBytes);

            periMakeRepeatFunction  = FunctionWrapper.CreateWrapperFunction <sGamePeri__MakeRepeatCount>((long)functionPtr);
            periMakeRepeatCountHook = FunctionHook <sGamePeri__MakeRepeatCount> .Create(0x00434FF0, MakeRepeatCountImpl).Activate();
        }