big cleanup, replace Bytes alias with std::vector<uint8_t> to reduce ambiguity

This commit is contained in:
scawful
2024-08-20 12:02:47 -04:00
parent 2443336f9d
commit 49611d4944
33 changed files with 141 additions and 281 deletions

View File

@@ -6,7 +6,7 @@ namespace yaze {
namespace app {
namespace zelda3 {
void Sprite::InitSprite(const Bytes& src, uchar mapid, uchar id, uchar x,
void Sprite::InitSprite(const std::vector<uint8_t>& src, uchar mapid, uchar id, uchar x,
uchar y, int map_x, int map_y) {
current_gfx_ = src;
overworld_ = true;
@@ -27,7 +27,7 @@ void Sprite::InitSprite(const Bytes& src, uchar mapid, uchar id, uchar x,
}
}
Sprite::Sprite(Bytes src, uchar mapid, uchar id, uchar x, uchar y, int map_x,
Sprite::Sprite(std::vector<uint8_t> src, uchar mapid, uchar id, uchar x, uchar y, int map_x,
int map_y)
: current_gfx_(src),
map_id_(static_cast<int>(mapid)),

View File

@@ -26,9 +26,9 @@ namespace zelda3 {
class Sprite : public OverworldEntity {
public:
Sprite() = default;
Sprite(Bytes src, uchar mapid, uchar id, uchar x, uchar y, int map_x,
Sprite(std::vector<uint8_t> src, uchar mapid, uchar id, uchar x, uchar y, int map_x,
int map_y);
void InitSprite(const Bytes& src, uchar mapid, uchar id, uchar x, uchar y,
void InitSprite(const std::vector<uint8_t>& src, uchar mapid, uchar id, uchar x, uchar y,
int map_x, int map_y);
void updateBBox();
@@ -64,7 +64,7 @@ class Sprite : public OverworldEntity {
auto set_deleted(bool deleted) { deleted_ = deleted; }
private:
Bytes current_gfx_;
std::vector<uint8_t> current_gfx_;
bool overworld_;
uchar map_id_;
@@ -81,7 +81,7 @@ class Sprite : public OverworldEntity {
int map_x_;
int map_y_;
Bytes preview_gfx_;
std::vector<uint8_t> preview_gfx_;
uchar lowerX_;
uchar lowerY_;
uchar higherX_;