remove overworld namespace
This commit is contained in:
@@ -127,7 +127,7 @@ bool DrawEntranceInserterPopup() {
|
||||
|
||||
// TODO: Implement deleting OverworldEntrance objects, currently only hides them
|
||||
bool DrawOverworldEntrancePopup(
|
||||
zelda3::overworld::OverworldEntrance &entrance) {
|
||||
zelda3::OverworldEntrance &entrance) {
|
||||
static bool set_done = false;
|
||||
if (set_done) {
|
||||
set_done = false;
|
||||
@@ -177,7 +177,7 @@ void DrawExitInserterPopup() {
|
||||
}
|
||||
}
|
||||
|
||||
bool DrawExitEditorPopup(zelda3::overworld::OverworldExit &exit) {
|
||||
bool DrawExitEditorPopup(zelda3::OverworldExit &exit) {
|
||||
static bool set_done = false;
|
||||
if (set_done) {
|
||||
set_done = false;
|
||||
@@ -316,8 +316,8 @@ void DrawItemInsertPopup() {
|
||||
Text("Add Item");
|
||||
BeginChild("ScrollRegion", ImVec2(150, 150), true,
|
||||
ImGuiWindowFlags_AlwaysVerticalScrollbar);
|
||||
for (size_t i = 0; i < zelda3::overworld::kSecretItemNames.size(); i++) {
|
||||
if (Selectable(zelda3::overworld::kSecretItemNames[i].c_str(),
|
||||
for (size_t i = 0; i < zelda3::kSecretItemNames.size(); i++) {
|
||||
if (Selectable(zelda3::kSecretItemNames[i].c_str(),
|
||||
i == new_item_id)) {
|
||||
new_item_id = i;
|
||||
}
|
||||
@@ -340,7 +340,7 @@ void DrawItemInsertPopup() {
|
||||
}
|
||||
|
||||
// TODO: Implement deleting OverworldItem objects, currently only hides them
|
||||
bool DrawItemEditorPopup(zelda3::overworld::OverworldItem &item) {
|
||||
bool DrawItemEditorPopup(zelda3::OverworldItem &item) {
|
||||
static bool set_done = false;
|
||||
if (set_done) {
|
||||
set_done = false;
|
||||
@@ -350,8 +350,8 @@ bool DrawItemEditorPopup(zelda3::overworld::OverworldItem &item) {
|
||||
BeginChild("ScrollRegion", ImVec2(150, 150), true,
|
||||
ImGuiWindowFlags_AlwaysVerticalScrollbar);
|
||||
ImGui::BeginGroup();
|
||||
for (size_t i = 0; i < zelda3::overworld::kSecretItemNames.size(); i++) {
|
||||
if (Selectable(zelda3::overworld::kSecretItemNames[i].c_str(),
|
||||
for (size_t i = 0; i < zelda3::kSecretItemNames.size(); i++) {
|
||||
if (Selectable(zelda3::kSecretItemNames[i].c_str(),
|
||||
item.id_ == i)) {
|
||||
item.id_ = i;
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@ void HandleEntityDragging(zelda3::GameEntity *entity, ImVec2 canvas_p0,
|
||||
bool free_movement = false);
|
||||
|
||||
bool DrawEntranceInserterPopup();
|
||||
bool DrawOverworldEntrancePopup(zelda3::overworld::OverworldEntrance &entrance);
|
||||
bool DrawOverworldEntrancePopup(zelda3::OverworldEntrance &entrance);
|
||||
|
||||
void DrawExitInserterPopup();
|
||||
bool DrawExitEditorPopup(zelda3::overworld::OverworldExit &exit);
|
||||
bool DrawExitEditorPopup(zelda3::OverworldExit &exit);
|
||||
|
||||
void DrawItemInsertPopup();
|
||||
|
||||
bool DrawItemEditorPopup(zelda3::overworld::OverworldItem &item);
|
||||
bool DrawItemEditorPopup(zelda3::OverworldItem &item);
|
||||
|
||||
enum MyItemColumnID {
|
||||
MyItemColumnID_ID,
|
||||
|
||||
@@ -920,8 +920,8 @@ void OverworldEditor::DrawOverworldItems() {
|
||||
}
|
||||
}
|
||||
std::string item_name = "";
|
||||
if (item.id_ < zelda3::overworld::kSecretItemNames.size()) {
|
||||
item_name = zelda3::overworld::kSecretItemNames[item.id_];
|
||||
if (item.id_ < zelda3::kSecretItemNames.size()) {
|
||||
item_name = zelda3::kSecretItemNames[item.id_];
|
||||
} else {
|
||||
item_name = absl::StrFormat("0x%02X", item.id_);
|
||||
}
|
||||
@@ -1049,10 +1049,10 @@ absl::Status OverworldEditor::LoadGraphics() {
|
||||
|
||||
// Copy the tile16 data into individual tiles.
|
||||
auto tile16_data = overworld_.tile16_blockset_data();
|
||||
tile16_individual_.reserve(zelda3::overworld::kNumTile16Individual);
|
||||
tile16_individual_.reserve(zelda3::kNumTile16Individual);
|
||||
|
||||
// Loop through the tiles and copy their pixel data into separate vectors
|
||||
for (uint i = 0; i < zelda3::overworld::kNumTile16Individual; i++) {
|
||||
for (uint i = 0; i < zelda3::kNumTile16Individual; i++) {
|
||||
std::vector<uint8_t> tile_data(kTile16Size * kTile16Size, 0x00);
|
||||
|
||||
// Copy the pixel data for the current tile into the vector
|
||||
@@ -1075,7 +1075,7 @@ absl::Status OverworldEditor::LoadGraphics() {
|
||||
}
|
||||
|
||||
// Render the overworld maps loaded from the ROM.
|
||||
for (int i = 0; i < zelda3::overworld::kNumOverworldMaps; ++i) {
|
||||
for (int i = 0; i < zelda3::kNumOverworldMaps; ++i) {
|
||||
overworld_.set_current_map(i);
|
||||
auto palette = overworld_.current_area_palette();
|
||||
RETURN_IF_ERROR(Renderer::GetInstance().CreateAndRenderBitmap(
|
||||
@@ -1218,7 +1218,7 @@ absl::Status OverworldEditor::RefreshTile16Blockset() {
|
||||
|
||||
std::vector<std::future<void>> futures;
|
||||
// Loop through the tiles and copy their pixel data into separate vectors
|
||||
for (uint i = 0; i < zelda3::overworld::kNumTile16Individual; i++) {
|
||||
for (uint i = 0; i < zelda3::kNumTile16Individual; i++) {
|
||||
futures.push_back(std::async(
|
||||
std::launch::async,
|
||||
[&](int index) {
|
||||
@@ -1242,7 +1242,7 @@ absl::Status OverworldEditor::RefreshTile16Blockset() {
|
||||
}
|
||||
|
||||
// Render the bitmaps of each tile.
|
||||
for (uint id = 0; id < zelda3::overworld::kNumTile16Individual; id++) {
|
||||
for (uint id = 0; id < zelda3::kNumTile16Individual; id++) {
|
||||
RETURN_IF_ERROR(tile16_individual_[id].ApplyPalette(palette_));
|
||||
Renderer::GetInstance().UpdateBitmap(&tile16_individual_[id]);
|
||||
}
|
||||
|
||||
@@ -284,14 +284,14 @@ class OverworldEditor : public Editor,
|
||||
gfx::BitmapTable current_graphics_set_;
|
||||
gfx::BitmapTable sprite_previews_;
|
||||
|
||||
zelda3::overworld::Overworld overworld_;
|
||||
zelda3::Overworld overworld_;
|
||||
zelda3::OWBlockset refresh_blockset_;
|
||||
|
||||
zelda3::Sprite current_sprite_;
|
||||
|
||||
zelda3::overworld::OverworldEntrance current_entrance_;
|
||||
zelda3::overworld::OverworldExit current_exit_;
|
||||
zelda3::overworld::OverworldItem current_item_;
|
||||
zelda3::OverworldEntrance current_entrance_;
|
||||
zelda3::OverworldExit current_exit_;
|
||||
zelda3::OverworldItem current_item_;
|
||||
|
||||
zelda3::GameEntity* current_entity_;
|
||||
zelda3::GameEntity* dragged_entity_;
|
||||
@@ -307,6 +307,7 @@ class OverworldEditor : public Editor,
|
||||
gui::Canvas properties_canvas_;
|
||||
|
||||
gui::Table toolset_table_{"##ToolsetTable0", 22, kToolsetTableFlags};
|
||||
gui::Table map_settings_table_{kOWMapTable.data(), 8, kOWMapFlags, ImVec2(0,0)};
|
||||
|
||||
gui::zeml::Node layout_node_;
|
||||
absl::Status status_;
|
||||
|
||||
Reference in New Issue
Block a user