public void SaveSigns(int mapGroup) { gb.BufferLocation = 0x1B784 + mapGroup * 2; gb.BufferLocation = 0x18000 + gb.ReadByte() + ((gb.ReadByte() - 0x40) * 0x100); foreach (Sign s in signs) { gb.WriteByte(s.yx); gb.WriteByte(s.map); gb.WriteByte(s.text); } gb.WriteByte(0); }
private void nDeathMinimap_ValueChanged(object sender, EventArgs e) { if (dung == 0xFF) { gb.BufferLocation = 0x19B3; } else { gb.BufferLocation = 0x50E41 + dung; } gb.WriteByte((byte)nDeathMinimap.Value); }
public void SaveTeleports(GBFile gb, EssenceTeleport[] teleports) { gb.BufferLocation = 0x2874F; for (int i = 0; i < 8; i++) { if (teleports[i].realmapgroup == 0) { teleports[i].realmapgroup = 0x80; } gb.WriteByte((byte)(((teleports[i].realmapgroup >> 4) << 4) + teleports[i].mapgroup)); gb.WriteByte(teleports[i].map); gb.WriteByte(teleports[i].yx); gb.WriteByte(teleports[i].unknown); } }
public void defaultMusic(bool music) { if (music) { gb.WriteBytes(0x8156, new byte[] { 0x58, 0x41 }); gb.WriteByte(0xBB47, 0); LALE.Properties.Settings.Default.DefaultMusic = true; LALE.Properties.Settings.Default.Save(); } else { gb.WriteBytes(0x8156, new byte[] { 0xA2, 0x41 }); gb.WriteByte(0xBB47, 0x41); LALE.Properties.Settings.Default.DefaultMusic = false; LALE.Properties.Settings.Default.Save(); } }
private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (!checkBox1.Checked) { activeFlag &= (0xFF ^ 1); } else { activeFlag |= 1; } groupBox1.Text = "Flags - " + activeFlag.ToString("X"); gb.WriteByte(location, activeFlag); }
public void SaveEnemy(Enemy e) { gb.BufferLocation = e.baseLocation; gb.WriteByte(e.sprite); gb.WriteByte(e.vulnerable); gb.BufferLocation = e.subPointer + 1; gb.WriteByte(e.paletteFace); gb.BufferLocation -= 2; byte b = gb.ReadByte(); b = (byte)(b * 2); gb.BufferLocation = 0xFDFB9 + b * 2; gb.WriteByte(e.collisionHeight); gb.WriteByte(e.collisionWidth); gb.WriteByte(e.damageDealt); gb.WriteByte(e.health); gb.BufferLocation = e.aiPointer; gb.WriteBytes(gb.Get2BytePointer(e.aiFinal)); }
public void saveChestInfo(bool overWorld, byte map, byte dungeon, byte chest) { if (overWorld) { gb.BufferLocation = 0x50560 + map; } else { if (dungeon >= 6 && dungeon < 0x1A) { gb.BufferLocation = 0x50760 + map; } else if (dungeon == 0xFF) { gb.BufferLocation = 0x50860 + map; } else { gb.BufferLocation = 0x50660 + map; } } gb.WriteByte(chest); }
public bool addStaticObject(int dungeon, int map) { int count = staticObjects.Count * 6 + 7; //+1 for FF and +6 for the new object int address = findFreeSpace(count, 0x16); if (address == -1) { return(false); } //Erase the old stuff gb.BufferLocation = 0x590A7 + dungeon * 2; gb.BufferLocation = 0x58000 + gb.ReadByte() + ((gb.ReadByte() - 0x40) * 0x100); if (gb.BufferLocation != 0x59107) { foreach (StaticObject o in staticObjects) { for (int i = 0; i < 6; i++) { gb.WriteByte(0); } } gb.WriteByte(0); //Clear the FF } gb.BufferLocation = 0x590A7 + dungeon * 2; gb.WriteByte((byte)address); gb.WriteByte((byte)(((address - 0x58000) >> 8) + 0x40)); StaticObject obj = new StaticObject(); obj.map = (byte)map; obj.x = obj.y = 8; staticObjects.Add(obj); saveObjects(dungeon); return(true); }
public static void crystalSwitches(GBFile gb) { gb.WriteByte(0x3657, 0xFF); }
public static void sixteenOverworld(GBFile gb) { gb.WriteByte(0x41A5, 0xF); gb.WriteByte(0x41AE, 0xF0); }
public static void removeForestRand(GBFile gb) { gb.WriteByte(0x5F54, 0x18); }