changed tile.h and tile16.cc to snes_tile

This commit is contained in:
Justin Scofield
2022-07-11 20:39:08 -04:00
parent 1fd875421f
commit 08590d824d
14 changed files with 46 additions and 39 deletions

View File

@@ -5,12 +5,27 @@
#include <vector>
#include "app/core/constants.h"
#include "tile.h"
#include "snes_tile.h"
namespace yaze {
namespace app {
namespace gfx {
TileInfo GetTilesInfo(ushort tile) {
// vhopppcc cccccccc
ushort o = 0;
ushort v = 0;
ushort h = 0;
auto tid = (ushort)(tile & 0x3FF);
auto p = (uchar)((tile >> 10) & 0x07);
o = (ushort)((tile & 0x2000) >> 13);
h = (ushort)((tile & 0x4000) >> 14);
v = (ushort)((tile & 0x8000) >> 15);
return TileInfo(tid, p, v, h, o);
}
void BuildTiles16Gfx(uchar *mapblockset16, uchar *currentOWgfx16Ptr,
std::vector<Tile16> &allTiles) {
uchar *gfx16Data = mapblockset16;

View File

@@ -79,6 +79,7 @@ class Tile16 {
}
};
TileInfo GetTilesInfo(ushort tile);
void BuildTiles16Gfx(uchar* mapblockset16, uchar* currentOWgfx16Ptr,
std::vector<Tile16>& allTiles);
void CopyTile16(int x, int y, int xx, int yy, int offset, TileInfo tile,