namespace housekeeping
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
#include "Overworld.h"
|
#include "Overworld.h"
|
||||||
|
|
||||||
#include "Tile.h"
|
#include "Graphics/Tile.h"
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace Application {
|
namespace Application {
|
||||||
namespace Data {
|
namespace Data {
|
||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
|
using namespace Graphics;
|
||||||
|
|
||||||
static TileInfo GetTilesInfo(ushort tile) {
|
static TileInfo GetTilesInfo(ushort tile) {
|
||||||
// vhopppcc cccccccc
|
// vhopppcc cccccccc
|
||||||
@@ -50,6 +51,8 @@ Overworld::Overworld(Utils::ROM rom) : rom_(rom) {
|
|||||||
isLoaded = true;
|
isLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Overworld::Load(Utils::ROM rom) {}
|
||||||
|
|
||||||
ushort Overworld::GenerateTile32(int i, int k, int dimension) {
|
ushort Overworld::GenerateTile32(int i, int k, int dimension) {
|
||||||
return (ushort)(rom_.GetRawData()[map32address[dimension] + k + (i)] +
|
return (ushort)(rom_.GetRawData()[map32address[dimension] + k + (i)] +
|
||||||
(((rom_.GetRawData()[map32address[dimension] + (i) +
|
(((rom_.GetRawData()[map32address[dimension] + (i) +
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
#include "Core/Constants.h"
|
#include "Core/Constants.h"
|
||||||
#include "Graphics/Bitmap.h"
|
#include "Graphics/Bitmap.h"
|
||||||
|
#include "Graphics/Tile.h"
|
||||||
#include "OverworldMap.h"
|
#include "OverworldMap.h"
|
||||||
#include "Tile.h"
|
|
||||||
#include "Utils/Compression.h"
|
#include "Utils/Compression.h"
|
||||||
#include "Utils/ROM.h"
|
#include "Utils/ROM.h"
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ class Overworld {
|
|||||||
Overworld() = default;
|
Overworld() = default;
|
||||||
Overworld(Utils::ROM rom);
|
Overworld(Utils::ROM rom);
|
||||||
|
|
||||||
void Load();
|
void Load(Utils::ROM rom);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Utils::ROM rom_;
|
Utils::ROM rom_;
|
||||||
@@ -35,9 +35,9 @@ class Overworld {
|
|||||||
std::vector<std::vector<ushort>> allmapsTilesDW; // 64 maps * (32*32 tiles)
|
std::vector<std::vector<ushort>> allmapsTilesDW; // 64 maps * (32*32 tiles)
|
||||||
std::vector<std::vector<ushort>> allmapsTilesSP; // 32 maps * (32*32 tiles)
|
std::vector<std::vector<ushort>> allmapsTilesSP; // 32 maps * (32*32 tiles)
|
||||||
|
|
||||||
std::vector<Tile16> tiles16;
|
std::vector<Graphics::Tile16> tiles16;
|
||||||
std::vector<Tile32> tiles32;
|
std::vector<Graphics::Tile32> tiles32;
|
||||||
std::vector<Tile32> map16tiles;
|
std::vector<Graphics::Tile32> map16tiles;
|
||||||
|
|
||||||
std::vector<OverworldMap> allmaps;
|
std::vector<OverworldMap> allmaps;
|
||||||
|
|
||||||
@@ -51,10 +51,10 @@ class Overworld {
|
|||||||
Core::Constants::map32TilesBL, Core::Constants::map32TilesBR};
|
Core::Constants::map32TilesBL, Core::Constants::map32TilesBR};
|
||||||
|
|
||||||
std::unique_ptr<int> overworldMapPointer;
|
std::unique_ptr<int> overworldMapPointer;
|
||||||
Utils::Bitmap overworldMapBitmap;
|
Graphics::Bitmap overworldMapBitmap;
|
||||||
|
|
||||||
std::unique_ptr<int> owactualMapPointer;
|
std::unique_ptr<int> owactualMapPointer;
|
||||||
Utils::Bitmap owactualMapBitmap;
|
Graphics::Bitmap owactualMapBitmap;
|
||||||
|
|
||||||
enum Dimension {
|
enum Dimension {
|
||||||
map32TilesTL = 0,
|
map32TilesTL = 0,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace Application {
|
|||||||
namespace Data {
|
namespace Data {
|
||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
|
using namespace Graphics;
|
||||||
|
|
||||||
OverworldMap::OverworldMap(Utils::ROM rom, byte index)
|
OverworldMap::OverworldMap(Utils::ROM rom, byte index)
|
||||||
: rom_(rom), index(index), parent(index) {
|
: rom_(rom), index(index), parent(index) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "Tile.h"
|
|
||||||
#include "Graphics/Bitmap.h"
|
#include "Graphics/Bitmap.h"
|
||||||
|
#include "Graphics/Tile.h"
|
||||||
#include "Utils/ROM.h"
|
#include "Utils/ROM.h"
|
||||||
#include "imgui/imgui.h"
|
#include "imgui/imgui.h"
|
||||||
|
|
||||||
@@ -41,19 +41,19 @@ class OverworldMap {
|
|||||||
void BuildMap(byte* mapParent, int count, int gameState);
|
void BuildMap(byte* mapParent, int count, int gameState);
|
||||||
void CopyTile8bpp16(int x, int y, int tile, int* destbmpPtr,
|
void CopyTile8bpp16(int x, int y, int tile, int* destbmpPtr,
|
||||||
int* sourcebmpPtr);
|
int* sourcebmpPtr);
|
||||||
void CopyTile8bpp16From8(int xP, int yP, int tileID,
|
void CopyTile8bpp16From8(int xP, int yP, int tileID, int* destbmpPtr,
|
||||||
int* destbmpPtr,
|
|
||||||
int* sourcebmpPtr);
|
int* sourcebmpPtr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void BuildTiles16Gfx(int count);
|
void BuildTiles16Gfx(int count);
|
||||||
// void ReloadPalettes() { LoadPalette(); }
|
// void ReloadPalettes() { LoadPalette(); }
|
||||||
|
|
||||||
void CopyTile(int x, int y, int xx, int yy, int offset, TileInfo tile,
|
void CopyTile(int x, int y, int xx, int yy, int offset,
|
||||||
byte* gfx16Pointer, byte* gfx8Pointer);
|
Graphics::TileInfo tile, byte* gfx16Pointer, byte* gfx8Pointer);
|
||||||
|
|
||||||
void CopyTileToMap(int x, int y, int xx, int yy, int offset, TileInfo tile,
|
void CopyTileToMap(int x, int y, int xx, int yy, int offset,
|
||||||
byte* gfx16Pointer, byte* gfx8Pointer);
|
Graphics::TileInfo tile, byte* gfx16Pointer,
|
||||||
|
byte* gfx8Pointer);
|
||||||
|
|
||||||
/* void LoadPalette();
|
/* void LoadPalette();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user