public override bool OnInitialize()
        {
            base.OnInitialize();

            if (WorkingUncompressed.Length != sizeof(AllstarFighterData))
            {
                throw new Exception("Wrong size for AllstarFighterNode");
            }

            // Copy the data from the address
            AllstarFighterData *ptr = (AllstarFighterData *)WorkingUncompressed.Address;

            _fighterID = ptr->_fighterID;
            _unknown01 = ptr->_unknown01;
            _unknown02 = ptr->_unknown02;
            _unknown03 = ptr->_unknown03;
            _unknown04 = ptr->_unknown04;

            if (_name == null)
            {
                var fighter = Fighter.Fighters.Where(s => s.ID == FighterID).FirstOrDefault();
                _name = (fighter == null ? "" : fighter.Name + " ") + "(0x" + FighterID.ToString("X2") + ")";
            }

            return(true);
        }
        public override void OnPopulate()
        {
            AllstarFighterData *ptr = &((AllstarStageTbl *)WorkingUncompressed.Address)->_opponent1;

            for (int i = 0; i < 5; i++)
            {
                DataSource source = new DataSource(ptr, sizeof(AllstarFighterData));
                new AllstarFighterNode().Initialize(this, source);
                ptr++;
            }
        }
Exemple #3
0
        public override void OnRebuild(VoidPtr address, int length, bool force)
        {
            // Copy the data back to the address
            AllstarFighterData *header_ptr = (AllstarFighterData *)address;

            header_ptr->_fighterID = _fighterID;
            header_ptr->_unknown04 = _unknown04;

            // Rebuild children using new address
            VoidPtr ptr = address + 8;

            for (int i = 0; i < Children.Count; i++)
            {
                Children[i].Rebuild(ptr, sizeof(AllstarDifficultyData), true);
                ptr += sizeof(AllstarDifficultyData);
            }
        }
        public override void OnRebuild(VoidPtr address, int length, bool force)
        {
            // Copy the data back to the address
            AllstarStageTbl *dataPtr = (AllstarStageTbl *)address;

            dataPtr->_stage1 = _stage1;
            dataPtr->_stage2 = _stage2;
            dataPtr->_stage3 = _stage3;
            dataPtr->_stage4 = _stage4;
            dataPtr->_stage5 = _stage5;

            // Rebuild children using new address
            AllstarFighterData *ptr = &((AllstarStageTbl *)address)->_opponent1;

            for (int i = 0; i < Children.Count; i++)
            {
                Children[i].Rebuild(ptr, sizeof(AllstarFighterData), true);
                ptr++;
            }
        }
Exemple #5
0
        public override void OnRebuild(VoidPtr address, int length, bool force)
        {
            // Copy the data back to the address
            ClassicStageBlock *dataPtr = (ClassicStageBlock *)address;

            dataPtr->_stages._unknown00 = data._unknown00;
            dataPtr->_stages._stageID1  = data._stageID1;
            dataPtr->_stages._stageID2  = data._stageID2;
            dataPtr->_stages._stageID3  = data._stageID3;
            dataPtr->_stages._stageID4  = data._stageID4;

            // Rebuild children using new address
            AllstarFighterData *ptr = &((ClassicStageBlock *)address)->_opponent1;

            for (int i = 0; i < Children.Count; i++)
            {
                Children[i].Rebuild(ptr, sizeof(AllstarFighterData), true);
                ptr++;
            }
        }