housekeeping

This commit is contained in:
Justin Scofield
2022-06-20 14:28:04 -04:00
parent 89c5dcfec6
commit 9c7c9bc1e4
15 changed files with 84 additions and 66 deletions

View File

@@ -41,7 +41,7 @@ static TileInfo GetTilesInfo(ushort tile) {
return TileInfo(tid, p, v, h, o);
}
void Overworld::Load(Data::ROM& rom) {
void Overworld::Load(ROM& rom) {
rom_ = rom;
for (int i = 0; i < 0x2B; i++) {
tileLeftEntrance.push_back(constants::overworldEntranceAllowedTilesLeft +

View File

@@ -21,7 +21,7 @@ class Overworld {
Overworld() = default;
~Overworld();
void Load(Data::ROM& rom);
void Load(ROM& rom);
char* overworldMapPointer = new char[0x40000];
gfx::Bitmap* overworldMapBitmap;
@@ -30,7 +30,7 @@ class Overworld {
gfx::Bitmap* owactualMapBitmap;
private:
Data::ROM rom_;
ROM rom_;
int gameState = 1;
bool isLoaded = false;
uchar mapParent[160];

View File

@@ -10,8 +10,8 @@ namespace zelda3 {
using namespace core;
using namespace gfx;
OverworldMap::OverworldMap(Data::ROM& rom,
const std::vector<gfx::Tile16> tiles16, uchar index)
OverworldMap::OverworldMap(ROM& rom, const std::vector<gfx::Tile16> tiles16,
uchar index)
: rom_(rom), index(index), tiles16_(tiles16), parent(index) {
if (index != 0x80) {
if (index <= 150) {

View File

@@ -37,13 +37,12 @@ class OverworldMap {
ushort** tilesUsed;
bool needRefresh = false;
Data::ROM rom_;
ROM rom_;
uchar* currentOWgfx16Ptr = new uchar[(128 * 512) / 2];
std::vector<gfx::Tile16> tiles16_;
OverworldMap(Data::ROM& rom, const std::vector<gfx::Tile16> tiles16,
uchar index);
OverworldMap(ROM& rom, const std::vector<gfx::Tile16> tiles16, uchar index);
void BuildMap(uchar* mapParent, int count, int gameState,
ushort** allmapsTilesLW, ushort** allmapsTilesDW,
ushort** allmapsTilesSP);