Пример #1
0
        public static TmosWorldScreenTiles GetWorldScreenTiles(byte[] rom, TmosWorldScreen ws)
        {
            int bottomTileDataStartIndex = 0;
            int topTileDataStartIndex    = 0;

            if (ws.DataPointer >= 0x40 && ws.DataPointer < 0x8f)
            {
                bottomTileDataStartIndex = 0x2000 / TmosData.DataStructures.TileSection.Length;
                topTileDataStartIndex    = 0;
            }

            else if (ws.DataPointer >= 0x8f && ws.DataPointer < 0xA0)
            {
                bottomTileDataStartIndex = 0;
                topTileDataStartIndex    = 0x2000 / TmosData.DataStructures.TileSection.Length;
            }
            else if (ws.DataPointer >= 0xC0)
            {
                topTileDataStartIndex    = 0x2000 / TmosData.DataStructures.TileSection.Length;
                bottomTileDataStartIndex = 0x2000 / TmosData.DataStructures.TileSection.Length;
            }

            TmosWorldScreenTiles wsTiles = new TmosWorldScreenTiles();

            wsTiles.TopTiles    = GetTileSection(rom, ws.TopTiles, topTileDataStartIndex);
            wsTiles.BottomTiles = GetTileSection(rom, ws.BottomTiles, bottomTileDataStartIndex);



            return(wsTiles);
        }
Пример #2
0
        public static TmosWorldScreen GetWorldScreen(byte[] rom, int index)
        {
            byte[]          selectedData = GetDataStructure(rom, DataStructures.WorldScreens, index, 0);
            TmosWorldScreen worldScreen  = new TmosWorldScreen(selectedData);

            return(worldScreen);
        }
Пример #3
0
 public void SaveWorldScreen(int index, TmosWorldScreen worldScreen)
 {
     TmosData.SaveWorldScreen(Bytes, index, worldScreen);
 }
Пример #4
0
 public static void SaveWorldScreen(byte[] rom, int index, TmosWorldScreen worldScreen)
 {
     SaveDataStructure(rom, DataStructures.WorldScreens, index, worldScreen._data);
 }