Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byte[] mapData = ReadROM(ofd.FileName, map1, 1024); // read the first map (1024 bytes)
- byte[,] map = new byte[32, 32];
- int count = 0;
- for (int i = 0; i < 32; i++)
- {
- for (int j = 0; j < 32; j++)
- {
- map[j, i] = mapData[count++];
- }
- }
- // display the map in the textbox
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < 32; i++)
- {
- for (int j = 0; j < 32; j++)
- {
- sb.AppendFormat("{0:x2} ", map[j, i]);
- }
- sb.AppendLine();
- }
- textBox1.Text = sb.ToString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment