Esempio n. 1
0
        public Object(byte area, int level, ROM rom, int addr)
        {
            this.area  = area;
            this.level = level;

            rom.PushOffset(addr);

            position  = new ObjectPosition(rom);
            rotation  = new ObjectRotation(rom);
            act       = rom.Read8(2);
            model     = rom.Read8(3);
            bparams   = rom.Read32(16);
            behaviour = rom.Read32(20);
            this.addr = addr;

            rom.PopOffset();
        }
Esempio n. 2
0
        // If gs code looks like this
        //8107EC40 RRBB
        //8107EC42 GG00
        // passed address should be 7EC40
        public MarioColor(ROM rom, int ramAddr)
        {
            int bank4ROMStart = rom.Read32(bank4ROMStartPtr);

            this.addr = ramAddr - bank4RAMStart + bank4ROMStart;

            rom.PushOffset(addr);
            color = Color.FromArgb(0x00, rom.Read8(0), rom.Read8(2), rom.Read8(1));
            rom.PopOffset();
        }
Esempio n. 3
0
        public MarioColor(ROM rom, int ramAddr, Color color)
        {
            rom.PushOffset(0);
            int bank4ROMStart = rom.Read32(bank4ROMStartPtr);

            rom.PopOffset();
            this.addr = ramAddr - bank4RAMStart + bank4ROMStart;
            rom.PushOffset(addr);
            this.color = Color.FromArgb(0, color.R, color.B, color.G);;
            rom.PopOffset();
        }