Ejemplo n.º 1
0
        internal static void _setNetworkLobbyIP(string ip)
        {
            var address = (IntPtr)Addrs.NetworkAddrs.STATIC_NETWORK_LOBBY_IP;

            ASM.Abolish(address, NETWORK_LOBBY_IP_LENGTH);
            Memory.WriteStringASCII(address, ip.Substring(0, NETWORK_LOBBY_IP_LENGTH));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Set the secret code entry message when a player enters a cheat code that is not valid.
        /// </summary>
        /// <param name="msg"></param>
        public static void SetSecretCodeEntryMessage(string msg)
        {
            var address = (IntPtr)Addrs.UIAddrs.STATIC_UI_INVALID_SECRET_CODE_ENTRY_TEXT;

            ASM.Abolish(address, INVALID_SECRET_CODE_ENTRY_TEXT_MAX_LENGTH);
            Memory.WriteStringASCII(address, msg.Substring(0, INVALID_SECRET_CODE_ENTRY_TEXT_MAX_LENGTH));
        }
Ejemplo n.º 3
0
        internal static void _setErrorMsgString(string s)
        {
            var address = (IntPtr)CarbonAddresses.UIAddrs.STATIC_ERROR_ALLOCATED_MSG;

            ASM.Abolish(address, ERROR_MSG_MAX_LENGTH);
            var newString = s;

            if (newString.Length > ERROR_MSG_MAX_LENGTH)
            {
                newString = newString.Substring(0, ERROR_MSG_MAX_LENGTH);
            }
            Memory.WriteStringASCII(address, newString);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Set the code entry message when a player enters a cheat code that is not valid.
        /// </summary>
        /// <param name="msg"></param>
        public static void SetCodeEntryMessage(string msg)
        {
            var addr = Memory.ReadInt32((IntPtr)Memory.getBaseAddress + Addrs.UIAddrs.PNON_STATIC_UI_INVALID_CODE_ENTRY_TEXT);

            addr = Memory.ReadInt32((IntPtr)addr + Addrs.UIAddrs.POINTER_UI_INVALID_CODE_ENTRY_TEXT_1);
            addr = Memory.ReadInt32((IntPtr)addr + Addrs.UIAddrs.POINTER_UI_INVALID_CODE_ENTRY_TEXT_2);
            addr = Memory.ReadInt32((IntPtr)addr + Addrs.UIAddrs.POINTER_UI_INVALID_CODE_ENTRY_TEXT_3);
            addr = Memory.ReadInt32((IntPtr)addr + Addrs.UIAddrs.POINTER_UI_INVALID_CODE_ENTRY_TEXT_4);
            var final = (IntPtr)addr + Addrs.UIAddrs.POINTER_UI_INVALID_CODE_ENTRY_TEXT_5;

            ASM.Abolish(final, INVALID_CODE_ENTRY_TEXT_MAX_LENGTH);
            Memory.WriteStringASCII(final, msg.Substring(0, INVALID_CODE_ENTRY_TEXT_MAX_LENGTH));
        }
Ejemplo n.º 5
0
        internal static void _setDebugErrorString(string s)
        {
            IntPtr address = (IntPtr)UIAddrs.STATIC_DEBUG_ERROR_MSG_ADDRESS;

            ASM.Abolish(address, DEBUG_ERROR_STRING_MAX_LENGTH);
            string newString = s;

            if (newString.Length > DEBUG_ERROR_STRING_MAX_LENGTH)
            {
                newString = newString.Substring(0, DEBUG_ERROR_STRING_MAX_LENGTH);
            }
            memory.WriteStringASCII(address, newString);
        }
Ejemplo n.º 6
0
        internal static void _setHelloWorldString(string s)
        {
            IntPtr address = (IntPtr)UIAddrs.STATIC_STRING_HELLO_WORLD_ADDRESS;

            ASM.Abolish(address, STRING_MAX_LENGTH);
            string newString = s;

            if (newString.Length > STRING_MAX_LENGTH)
            {
                newString = newString.Substring(0, STRING_MAX_LENGTH);
            }
            memory.WriteStringASCII(address, newString);
        }