// 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();
        }
Example #2
0
 public Song(ROM rom, int addr, int offset)
 {
     rom.PushOffset(addr);
     this.seqNumber = rom.Read8(offset); // Read the Sequence number
     rom.PopOffset();
     this.addr        = addr;
     this.musicOffset = offset; // 0x03 for menu music, 0x05 for course music
 }
Example #3
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();
        }
Example #4
0
 public WarpTo(ROM rom)
 {
     course = rom.Read8(3);
     area   = rom.Read8(4);
     id     = rom.Read8(5);
 }
Example #5
0
 public WarpFrom(ROM rom)
 {
     id = rom.Read8(2);
 }