move OWBlockset and OWMapTiles

This commit is contained in:
scawful
2024-08-10 00:22:47 -04:00
parent 251441f9fa
commit c2dfb96773
6 changed files with 20 additions and 14 deletions

View File

@@ -125,15 +125,6 @@ using Bytes = std::vector<uint8_t>;
namespace yaze { namespace yaze {
namespace app { namespace app {
using OWBlockset = std::vector<std::vector<uint16_t>>;
struct OWMapTiles {
OWBlockset light_world; // 64 maps
OWBlockset dark_world; // 64 maps
OWBlockset special_world; // 32 maps
};
using OWMapTiles = struct OWMapTiles;
namespace core { namespace core {
constexpr uint32_t kRedPen = 0xFF0000FF; constexpr uint32_t kRedPen = 0xFF0000FF;

View File

@@ -411,7 +411,7 @@ void MasterEditor::DrawYazeMenu() {
} }
PopStyleColor(); PopStyleColor();
Text("yaze v%s", core::kYazeVersion.c_str()); Text("yaze v%s", core::kYazeVersion.data());
EndMenuBar(); EndMenuBar();
} }

View File

@@ -1314,7 +1314,7 @@ absl::Status OverworldEditor::LoadAnimatedMaps() {
map.DrawAnimatedTiles(); map.DrawAnimatedTiles();
RETURN_IF_ERROR(map.BuildTileset()); RETURN_IF_ERROR(map.BuildTileset());
RETURN_IF_ERROR(map.BuildTiles16Gfx(overworld_.tiles16().size())); RETURN_IF_ERROR(map.BuildTiles16Gfx(overworld_.tiles16().size()));
OWBlockset blockset; zelda3::OWBlockset blockset;
if (current_world_ == 0) { if (current_world_ == 0) {
blockset = overworld_.map_tiles().light_world; blockset = overworld_.map_tiles().light_world;
} else if (current_world_ == 1) { } else if (current_world_ == 1) {

View File

@@ -288,7 +288,7 @@ class OverworldEditor : public Editor,
gfx::BitmapTable sprite_previews_; gfx::BitmapTable sprite_previews_;
gfx::BitmapTable animated_maps_; gfx::BitmapTable animated_maps_;
OWBlockset refresh_blockset_; zelda3::OWBlockset refresh_blockset_;
gui::zeml::Node layout_node_; gui::zeml::Node layout_node_;
absl::Status status_; absl::Status status_;

View File

@@ -9,6 +9,21 @@ namespace app {
*/ */
namespace zelda3 { namespace zelda3 {
/**
* @brief Represents tile32 data for the overworld.
*/
using OWBlockset = std::vector<std::vector<uint16_t>>;
/**
* @brief Overworld map tile32 data.
*/
struct OWMapTiles {
OWBlockset light_world; // 64 maps
OWBlockset dark_world; // 64 maps
OWBlockset special_world; // 32 maps
};
using OWMapTiles = struct OWMapTiles;
/** /**
* @class OverworldEntity * @class OverworldEntity
* @brief Base class for all overworld entities. * @brief Base class for all overworld entities.

View File

@@ -1,8 +1,6 @@
#ifndef YAZE_APP_ZELDA3_OVERWORLD_MAP_H #ifndef YAZE_APP_ZELDA3_OVERWORLD_MAP_H
#define YAZE_APP_ZELDA3_OVERWORLD_MAP_H #define YAZE_APP_ZELDA3_OVERWORLD_MAP_H
#include "imgui/imgui.h"
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
@@ -16,6 +14,8 @@
#include "app/gfx/snes_palette.h" #include "app/gfx/snes_palette.h"
#include "app/gfx/snes_tile.h" #include "app/gfx/snes_tile.h"
#include "app/rom.h" #include "app/rom.h"
#include "app/zelda3/common.h"
#include "imgui/imgui.h"
namespace yaze { namespace yaze {
namespace app { namespace app {