palette stuff

This commit is contained in:
Justin Scofield
2022-09-10 09:51:40 -05:00
parent 2ac0c25ac8
commit 8cc9adf41a
12 changed files with 495 additions and 125 deletions

View File

@@ -13,6 +13,7 @@
#include "app/core/common.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/snes_tile.h"
#include "app/zelda3/palettes.h"
#include "app/rom.h"
namespace yaze {
@@ -28,9 +29,9 @@ class OverworldMap {
absl::Status BuildMap(int count, int game_state, int world, uchar* map_parent,
OWBlockset& world_blockset);
auto GetCurrentGraphicsSet() const { return current_graphics_sheet_set; }
auto GetCurrentBlockset() const { return current_blockset_; }
auto GetCurrentGraphics() const { return current_gfx_; }
auto GetCurrentPalette() const { return current_palette_; }
auto GetBitmapData() const { return bitmap_data_; }
auto SetLargeMap(bool is_set) { large_map_ = is_set; }
auto IsLargeMap() const { return large_map_; }
@@ -40,10 +41,10 @@ class OverworldMap {
private:
void LoadAreaInfo();
void LoadAreaGraphics(int game_state, int world_index);
void LoadPalette();
absl::Status BuildTileset();
absl::Status BuildTiles16Gfx(int count);
absl::Status BuildTiles16GfxV2(int count);
absl::Status BuildBitmap(OWBlockset& world_blockset);
int parent_ = 0;
@@ -53,6 +54,9 @@ class OverworldMap {
int area_graphics_ = 0;
int area_palette_ = 0;
// TODO SET ME
int game_state_ = 0;
uchar sprite_graphics_[3];
uchar sprite_palette_[3];
uchar area_music_[4];
@@ -69,8 +73,9 @@ class OverworldMap {
Bytes bitmap_data_;
OWMapTiles map_tiles_;
gfx::SNESPalette current_palette_;
std::vector<gfx::Tile16> tiles16_;
std::unordered_map<int, gfx::Bitmap> current_graphics_sheet_set;
};
} // namespace zelda3