Exemplo n.º 1
0
        public static void MakeVarsIDArray(List <UseValsID> list)
        {
            string infobase = R._("死亡セリフ");

            InputFormRef InputFormRef = Init(null);
            List <uint>  tracelist    = new List <uint>();
            uint         haiku_addr   = InputFormRef.BaseAddress;

            for (uint i = 0; i < InputFormRef.DataCount; i++, haiku_addr += InputFormRef.BlockSize)
            {
                uint unitid = Program.ROM.u8(haiku_addr + 0);

                string info   = infobase + " " + UnitForm.GetUnitName(unitid);
                uint   textid = Program.ROM.u16(haiku_addr + 6);

                if (textid <= 0)
                {
                    uint event_addr = Program.ROM.p32(haiku_addr + 8);
                    EventCondForm.MakeVarsIDArrayByEventAddress(list, event_addr, info, tracelist);
                }
                else
                {
                    UseValsID.AppendTextID(list, FELint.Type.HAIKU, haiku_addr, info, textid, i);
                }
            }
//            UseValsID.AppendTextID(list, FELint.Type.HAIKU, InputFormRef, new uint[] { 6 });
        }
Exemplo n.º 2
0
        public void MakeVarsIDArray(List <UseValsID> list)
        {
            List <uint> tracelist = new List <uint>();

            foreach (var pair in this.AsmMap)
            {
                if (pair.Value.Length <= 0)
                {
                    continue;
                }

                if (pair.Value.TypeName == "TEXTBATCH")
                {
                    UseValsID.AppendASMDATATextID(list, pair.Value, U.toOffset(pair.Key), 4);
                }
                else if (pair.Value.TypeName == "TEXTBATCHSHORT")
                {
                    UseValsID.AppendASMDATATextID(list, pair.Value, U.toOffset(pair.Key), 2);
                }
                else if (pair.Value.TypeName == "EVENT")
                {
                    uint   event_addr = U.toOffset(pair.Key);
                    string name       = pair.Value.Name;
                    EventCondForm.MakeVarsIDArrayByEventAddress(list, event_addr, name, tracelist);
                }
            }
        }
Exemplo n.º 3
0
        public static void AppendTextID(List <UseValsID> list, FELint.Type dataType, InputFormRef ifr, uint[] textIDIndexes, uint eventIndex, List <uint> tracelist)
        {
            List <U.AddrResult> arlist = ifr.MakeList();

            for (int i = 0; i < ifr.DataCount; i++)
            {
                U.AddrResult ar = arlist[i];
                for (int n = 0; n < textIDIndexes.Length; n++)
                {
                    uint id = Program.ROM.u16(ar.addr + textIDIndexes[n]);
                    if (id == 0 || id >= 0x7FFF)
                    {
                        continue;
                    }
                    list.Add(new UseValsID(dataType, ar.addr, ar.name, id, TargetTypeEnum.TEXTID, (uint)i));
                }
                uint eventAddr = Program.ROM.p32(ar.addr + eventIndex);
                if (U.isSafetyOffset(eventAddr))
                {
                    EventCondForm.MakeVarsIDArrayByEventAddress(list, eventAddr, ar.name, tracelist);
                }
            }
        }