worked on adding tile16 for overworld support
This commit is contained in:
@@ -23,11 +23,21 @@ class Overworld {
|
||||
~Overworld();
|
||||
|
||||
void Load(app::rom::ROM& rom);
|
||||
inline auto GetTiles16() const { return tiles16; }
|
||||
inline auto GetCurrentGfxSetPtr() { return currentOWgfx16Ptr; }
|
||||
inline auto GetMapBlockset16Ptr() { return mapblockset16; }
|
||||
|
||||
char* overworldMapPointer = new char[0x40000];
|
||||
gfx::Bitmap* overworldMapBitmap;
|
||||
|
||||
private:
|
||||
ushort GenerateTile32(int i, int k, int dimension);
|
||||
void AssembleMap32Tiles();
|
||||
void AssembleMap16Tiles();
|
||||
void DecompressAllMapTiles();
|
||||
void FetchLargeMaps();
|
||||
void LoadOverworldMap();
|
||||
|
||||
app::rom::ROM rom_;
|
||||
int gameState = 1;
|
||||
bool isLoaded = false;
|
||||
@@ -37,23 +47,19 @@ class Overworld {
|
||||
ushort** allmapsTilesDW; // 64 maps * (32*32 tiles)
|
||||
ushort** allmapsTilesSP; // 32 maps * (32*32 tiles)
|
||||
|
||||
std::vector<gfx::Tile16> tiles16;
|
||||
std::vector<gfx::Tile32> tiles32;
|
||||
std::vector<gfx::Tile32> map16tiles;
|
||||
|
||||
std::vector<OverworldMap> allmaps;
|
||||
|
||||
std::vector<ushort> tileLeftEntrance;
|
||||
std::vector<ushort> tileRightEntrance;
|
||||
|
||||
std::shared_ptr<uchar> mapblockset16;
|
||||
std::shared_ptr<uchar> currentOWgfx16Ptr;
|
||||
|
||||
gfx::Bitmap mapblockset16Bitmap;
|
||||
|
||||
uchar* mapblockset16 = new uchar[1048576];
|
||||
uchar* currentOWgfx16Ptr = new uchar[(128 * 512) / 2];
|
||||
SDL_Texture* overworld_map_texture;
|
||||
|
||||
int map32address[4] = {
|
||||
std::vector<gfx::Tile16> tiles16;
|
||||
std::vector<gfx::Tile32> tiles32;
|
||||
std::vector<gfx::Tile32> map16tiles;
|
||||
std::vector<OverworldMap> overworld_maps_;
|
||||
|
||||
const int map32address[4] = {
|
||||
core::constants::map32TilesTL, core::constants::map32TilesTR,
|
||||
core::constants::map32TilesBL, core::constants::map32TilesBR};
|
||||
|
||||
@@ -63,13 +69,6 @@ class Overworld {
|
||||
map32TilesBL = 2,
|
||||
map32TilesBR = 3
|
||||
};
|
||||
|
||||
ushort GenerateTile32(int i, int k, int dimension);
|
||||
void AssembleMap32Tiles();
|
||||
void AssembleMap16Tiles();
|
||||
void DecompressAllMapTiles();
|
||||
void FetchLargeMaps();
|
||||
void LoadOverworldMap();
|
||||
};
|
||||
|
||||
} // namespace zelda3
|
||||
|
||||
Reference in New Issue
Block a user