namespace housekeeping

This commit is contained in:
Justin Scofield
2022-06-20 14:10:57 -04:00
parent d878382697
commit 89c5dcfec6
4 changed files with 17 additions and 19 deletions

View File

@@ -5,7 +5,7 @@
namespace yaze {
namespace app {
namespace Data {
namespace zelda3 {
using namespace core;
using namespace gfx;
@@ -343,6 +343,6 @@ void Overworld::LoadOverworldMap() {
// owactualMapBitmap.Palette = cp;
}
} // namespace Data
} // namespace zelda3
} // namespace app
} // namespace yaze

View File

@@ -14,7 +14,7 @@
namespace yaze {
namespace app {
namespace Data {
namespace zelda3 {
class Overworld {
public:
@@ -67,7 +67,7 @@ class Overworld {
void LoadOverworldMap();
};
} // namespace Data
} // namespace zelda3
} // namespace app
} // namespace yaze

View File

@@ -1,18 +1,17 @@
#include "overworld_map.h"
#include "rom.h"
#include "gfx/tile.h"
#include "rom.h"
namespace yaze {
namespace app {
namespace Data {
namespace zelda3 {
using namespace core;
using namespace gfx;
OverworldMap::OverworldMap(Data::ROM & rom,
const std::vector<gfx::Tile16> tiles16,
uchar index)
OverworldMap::OverworldMap(Data::ROM& rom,
const std::vector<gfx::Tile16> tiles16, uchar index)
: rom_(rom), index(index), tiles16_(tiles16), parent(index) {
if (index != 0x80) {
if (index <= 150) {
@@ -293,8 +292,8 @@ void OverworldMap::BuildTileset(int gameState) {
for (int i = 0; i < 4; i++) {
staticgfx[12 + i] =
(uchar)(rom_.GetRawData()[constants::sprite_blockset_pointer +
(sprgfx[gameState] * 4) + i] +
115);
(sprgfx[gameState] * 4) + i] +
115);
}
// Main Blocksets
@@ -354,6 +353,6 @@ void OverworldMap::BuildTileset(int gameState) {
}
}
} // namespace Data
} // namespace zelda3
} // namespace app
} // namespace yaze

View File

@@ -3,13 +3,13 @@
#include <cstddef>
#include <memory>
#include "rom.h"
#include "gfx/bitmap.h"
#include "gfx/tile.h"
#include "rom.h"
namespace yaze {
namespace app {
namespace Data {
namespace zelda3 {
using ushort = unsigned short;
@@ -42,7 +42,7 @@ class OverworldMap {
uchar* currentOWgfx16Ptr = new uchar[(128 * 512) / 2];
std::vector<gfx::Tile16> tiles16_;
OverworldMap(Data::ROM & rom, const std::vector<gfx::Tile16> tiles16,
OverworldMap(Data::ROM& rom, const std::vector<gfx::Tile16> tiles16,
uchar index);
void BuildMap(uchar* mapParent, int count, int gameState,
ushort** allmapsTilesLW, ushort** allmapsTilesDW,
@@ -56,9 +56,8 @@ class OverworldMap {
void BuildTiles16Gfx(int count);
// void ReloadPalettes() { LoadPalette(); }
void CopyTile(int x, int y, int xx, int yy, int offset,
gfx::TileInfo tile, uchar* gfx16Pointer,
uchar* gfx8Pointer);
void CopyTile(int x, int y, int xx, int yy, int offset, gfx::TileInfo tile,
uchar* gfx16Pointer, uchar* gfx8Pointer);
void CopyTileToMap(int x, int y, int xx, int yy, int offset,
gfx::TileInfo tile, uchar* gfx16Pointer,
uchar* gfx8Pointer);
@@ -72,6 +71,6 @@ class OverworldMap {
void BuildTileset(int gameState);
};
} // namespace Data
} // namespace zelda3
} // namespace app
} // namespace yaze