public byte[, ,] loadMinimapDungeon() { byte[] tiles = gb.ReadBytes(0xCBFD0, 0x30); byte[, ,] data = new byte[3, 16, 16]; gb.ReadTiles(3, 1, tiles, ref data); return(data); }
public byte[, ,] draw(byte[] decompressed, ref Bitmap bmp) { byte[, ,] graphicsData = new byte[256, 8, 8]; gb.ReadTiles(16, 16, decompressed, ref graphicsData); for (int i = 0; i < 256; i++) { for (int y = 0; y < 8; y++) { for (int x = 0; x < 8; x++) { bmp.SetPixel(x + ((i % 16) * 8), y + ((i / 16) * 8), bwPalette[graphicsData[i, x, y]]); } } } return(graphicsData); }
public byte[, ,] loadTileset(byte dungeon, byte map, bool overworld, bool crystals, bool sideView) { List <byte> final = new List <byte>(); byte[] animated = new byte[0x40]; byte[] walls = new byte[0x200]; cDungeon = dungeon; cMap = map; overWorld = overworld; cSideView = sideView; foreach (byte b in loadFirstRow()) { final.Add(b); } animated = Animate(); if (!cSideView) { foreach (byte b in loadSOG(cMap, crystals)) { final.Add(b); } if (!overWorld) { foreach (byte b in loadThird()) { final.Add(b); } } foreach (byte b in loadMain()) { final.Add(b); } walls = Walls(); if (!overWorld) { for (int w = 0; w < 0x200; w++) { final[(0x300) + w] = walls[w]; } } } else { if ((dungeon < 10 || map == 0xE9) && dungeon != 6) { gb.BufferLocation = 0xB7800; } else { gb.BufferLocation = 0xB7000; } foreach (byte b in gb.ReadBytes(0x800)) { final.Add(b); } } for (int i = 0; i < 0x40; i++) { final[(0x7C * 16) + i] = animated[i]; } byte[, ,] data = new byte[144, 8, 8]; gb.ReadTiles(16, 9, final.ToArray(), ref data); return(data); }