Пример #1
0
        static internal MemoryData GetData()
        {
            var data = MemoryData.New();

            var p = ProcessManager.Instance.Process;

            //Cha
            data.sel_player_num = ProcessUtility.ReadMemByte(p, GetPtr(MemTypeEnum.sel_player_num));
            data.player_num     = ProcessUtility.ReadMemByte(p, GetPtr(MemTypeEnum.player_num));
            for (int i = 0; i < 4; i++)
            {
                data.sel_p[i]    = ProcessUtility.ReadMemByte(p, AddPtr(GetPtr(MemTypeEnum.sel_p1), sub_sel_p * i));
                data.p[i]        = ProcessUtility.ReadMemByte(p, AddPtr(GetPtr(MemTypeEnum.p1), sub_p * i));
                data.life[i]     = ProcessUtility.ReadMemByte(p, AddPtr(GetPtr(MemTypeEnum.p1_life), sub_p * i));
                data.cash[i]     = ProcessUtility.ReadMemInt(p, AddPtr(GetPtr(MemTypeEnum.cash_p1), sub_p * i));
                data.bank[i]     = ProcessUtility.ReadMemInt(p, AddPtr(GetPtr(MemTypeEnum.bank_p1), sub_p * i));
                data.loanDate[i] = ProcessUtility.ReadMemInt(p, AddPtr(GetPtr(MemTypeEnum.p1_loanDay), sub_p * i));
            }

            //Course
            data.cur   = ProcessUtility.ReadMemByte(p, GetPtr(MemTypeEnum.cur));
            data.total = ProcessUtility.ReadMemByte(p, GetPtr(MemTypeEnum.total));
            data.date  = ProcessUtility.ReadMemInt(p, GetPtr(MemTypeEnum.date));

            data.CPI   = ProcessUtility.ReadMemInt(p, GetPtr(MemTypeEnum.CPI));
            data.scene = ProcessUtility.ReadMemByte(p, GetPtr(MemTypeEnum.scene));
            return(data);
        }