type cleaning and housekeeping

This commit is contained in:
scawful
2022-06-13 18:43:19 -04:00
parent da7a202130
commit 32d19edbfc
12 changed files with 92 additions and 106 deletions

View File

@@ -1,5 +1,6 @@
#include <imgui/imgui.h>
#include <cstddef>
#include <memory>
#include "Data/rom.h"
@@ -10,41 +11,40 @@ namespace yaze {
namespace Application {
namespace Data {
using byte = unsigned char;
using ushort = unsigned short;
class OverworldMap {
public:
byte parent = 0;
byte index = 0;
byte gfx = 0;
byte palette = 0;
uchar parent = 0;
uchar index = 0;
uchar gfx = 0;
uchar palette = 0;
bool firstLoad = false;
short messageID = 0;
bool largeMap = false;
byte sprgfx[3];
byte sprpalette[3];
byte musics[4];
uchar sprgfx[3];
uchar sprpalette[3];
uchar musics[4];
int* gfxPtr = new int[512 * 512];
int* mapblockset16 = new int[1048576];
Graphics::Bitmap mapblockset16Bitmap;
Graphics::Bitmap gfxBitmap;
byte* staticgfx =
new byte[16]; // Need to be used to display map and not pre render it!
uchar* staticgfx =
new uchar[16]; // Need to be used to display map and not pre render it!
ushort** tilesUsed;
bool needRefresh = false;
Data::ROM rom_;
byte* currentOWgfx16Ptr = new byte[(128 * 512) / 2];
uchar* currentOWgfx16Ptr = new uchar[(128 * 512) / 2];
std::vector<Graphics::Tile16> tiles16_;
OverworldMap(Data::ROM rom, const std::vector<Graphics::Tile16> tiles16,
byte index);
void BuildMap(byte* mapParent, int count, int gameState,
uchar index);
void BuildMap(uchar* mapParent, int count, int gameState,
ushort** allmapsTilesLW, ushort** allmapsTilesDW,
ushort** allmapsTilesSP);
void CopyTile8bpp16(int x, int y, int tile, int* destbmpPtr,
@@ -57,10 +57,11 @@ class OverworldMap {
// void ReloadPalettes() { LoadPalette(); }
void CopyTile(int x, int y, int xx, int yy, int offset,
Graphics::TileInfo tile, byte* gfx16Pointer, byte* gfx8Pointer);
Graphics::TileInfo tile, uchar* gfx16Pointer,
uchar* gfx8Pointer);
void CopyTileToMap(int x, int y, int xx, int yy, int offset,
Graphics::TileInfo tile, byte* gfx16Pointer,
byte* gfx8Pointer);
Graphics::TileInfo tile, uchar* gfx16Pointer,
uchar* gfx8Pointer);
void LoadPalette();