diff --git a/src/app/gfx/bitmap.cc b/src/app/gfx/bitmap.cc index a455762e..59c473b8 100644 --- a/src/app/gfx/bitmap.cc +++ b/src/app/gfx/bitmap.cc @@ -2,6 +2,7 @@ #include +#include #include #include "absl/status/status.h" diff --git a/src/app/gfx/bitmap.h b/src/app/gfx/bitmap.h index d00d85f3..b4e34d26 100644 --- a/src/app/gfx/bitmap.h +++ b/src/app/gfx/bitmap.h @@ -3,9 +3,12 @@ #include +#include #include +#include "absl/status/status.h" #include "absl/status/statusor.h" +#include "absl/strings/str_cat.h" #include "app/core/constants.h" #include "app/gfx/snes_palette.h" diff --git a/src/app/gfx/snes_palette.cc b/src/app/gfx/snes_palette.cc index 51539d90..664f2b48 100644 --- a/src/app/gfx/snes_palette.cc +++ b/src/app/gfx/snes_palette.cc @@ -10,6 +10,8 @@ #include #include +#include "app/core/constants.h" + namespace yaze { namespace app { namespace gfx { @@ -36,7 +38,7 @@ snes_color ConvertSNEStoRGB(const ushort color) { snes_palette* Extract(const char* data, const unsigned int offset, const unsigned int palette_size) { - snes_palette* toret = palette_create(palette_size, 0); + snes_palette* toret = nullptr; // palette_create(palette_size, 0) unsigned colnum = 0; for (int i = 0; i < palette_size * 2; i += 2) { unsigned short snes_color; @@ -76,7 +78,7 @@ void SNESColor::setRgb(ImVec4 val) { col.red = val.x; col.blue = val.y; col.green = val.z; - snes = convertcolor_rgb_to_snes(col); + snes = ConvertRGBtoSNES(col); } void SNESColor::setSNES(uint16_t val) { @@ -113,7 +115,7 @@ SNESPalette::SNESPalette(const unsigned char* snes_pal) SNESColor col; col.snes = snes_pal[i + 1] << (uint16_t)8; col.snes = col.snes | snes_pal[i]; - snes_color mColor = convertcolor_snes_to_rgb(col.snes); + snes_color mColor = ConvertSNEStoRGB(col.snes); col.rgb = ImVec4(mColor.red, mColor.green, mColor.blue, 1.f); colors.push_back(col); } diff --git a/src/app/gfx/snes_palette.h b/src/app/gfx/snes_palette.h index 1c3168f2..7b1a9246 100644 --- a/src/app/gfx/snes_palette.h +++ b/src/app/gfx/snes_palette.h @@ -11,6 +11,8 @@ #include #include +#include "app/core/constants.h" + namespace yaze { namespace app { namespace gfx { diff --git a/src/app/gfx/snes_tile.cc b/src/app/gfx/snes_tile.cc index 2755ec8b..6a90226b 100644 --- a/src/app/gfx/snes_tile.cc +++ b/src/app/gfx/snes_tile.cc @@ -3,6 +3,8 @@ #include #include +#include "app/core/constants.h" + namespace yaze { namespace app { namespace gfx { diff --git a/src/app/gfx/snes_tile.h b/src/app/gfx/snes_tile.h index a5310bfa..4bec72d5 100644 --- a/src/app/gfx/snes_tile.h +++ b/src/app/gfx/snes_tile.h @@ -4,6 +4,8 @@ #include #include +#include "app/core/constants.h" + namespace yaze { namespace app { namespace gfx { @@ -14,8 +16,6 @@ typedef struct { unsigned int palette_id; } tile8; -TileInfo GetTilesInfo(ushort tile); - // vhopppcc cccccccc // [0, 1] // [2, 3] @@ -35,6 +35,8 @@ class TileInfo { palette_(palette) {} }; +TileInfo GetTilesInfo(ushort tile); + class Tile32 { public: ushort tile0_;