remove app namespace

This commit is contained in:
scawful
2024-12-28 21:28:51 -05:00
parent 3ebe17c7bd
commit e05e7c35db
174 changed files with 475 additions and 658 deletions

View File

@@ -7,7 +7,6 @@
#include "app/gui/icons.h"
namespace yaze {
namespace app {
namespace editor {
using core::FileDialogWrapper;
@@ -364,5 +363,4 @@ absl::Status AssemblyEditor::Redo() {
absl::Status AssemblyEditor::Update() { return absl::OkStatus(); }
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -9,7 +9,6 @@
#include "app/gui/style.h"
namespace yaze {
namespace app {
namespace editor {
/**
@@ -69,7 +68,6 @@ class AssemblyEditor : public Editor {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif

View File

@@ -28,7 +28,6 @@
#include "imgui_memory_editor.h"
namespace yaze {
namespace app {
namespace editor {
using ImGui::SameLine;
@@ -78,7 +77,6 @@ struct MemoryEditorWithDiffChecker : public SharedRom {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_CODE_MEMORY_EDITOR_H

View File

@@ -13,7 +13,6 @@
#include "zelda3/dungeon/room.h"
namespace yaze {
namespace app {
namespace editor {
using core::Renderer;
@@ -72,6 +71,7 @@ absl::Status DungeonEditor::Update() {
absl::Status DungeonEditor::Initialize() {
auto dungeon_man_pal_group = rom()->palette_group().dungeon_main;
for (int i = 0; i < 0x100 + 40; i++) {
rooms_.emplace_back(zelda3::dungeon::Room(/*room_id=*/i));
rooms_[i].LoadHeader();
@@ -123,7 +123,24 @@ absl::Status DungeonEditor::RefreshGraphics() {
current_palette_group_[current_palette_id_], 0));
Renderer::GetInstance().UpdateBitmap(&graphics_bin_[block]);
}
std::for_each_n(rooms_[current_room_id_].blocks().begin(), 8,
[this](int block) -> absl::Status {
RETURN_IF_ERROR(
graphics_bin_[block].ApplyPaletteWithTransparent(
current_palette_group_[current_palette_id_], 0));
Renderer::GetInstance().UpdateBitmap(&graphics_bin_[block]);
return absl::OkStatus();
});
auto sprites_aux1_pal_group = rom()->palette_group().sprites_aux1;
std::for_each_n(rooms_[current_room_id_].blocks().begin() + 8, 8,
[this, &sprites_aux1_pal_group](int block) -> absl::Status {
RETURN_IF_ERROR(
graphics_bin_[block].ApplyPaletteWithTransparent(
sprites_aux1_pal_group[current_palette_id_], 0));
Renderer::GetInstance().UpdateBitmap(&graphics_bin_[block]);
return absl::OkStatus();
});
for (int i = 9; i < 16; i++) {
int block = rooms_[current_room_id_].blocks()[i];
RETURN_IF_ERROR(graphics_bin_[block].ApplyPaletteWithTransparent(
@@ -135,13 +152,13 @@ absl::Status DungeonEditor::RefreshGraphics() {
void DungeonEditor::LoadDungeonRoomSize() {
std::map<int, std::vector<int>> rooms_by_bank;
for (const auto& room : room_size_addresses_) {
for (const auto &room : room_size_addresses_) {
int bank = room.second >> 16;
rooms_by_bank[bank].push_back(room.second);
}
// Process and calculate room sizes within each bank
for (auto& bank_rooms : rooms_by_bank) {
for (auto &bank_rooms : rooms_by_bank) {
// Sort the rooms within this bank
std::sort(bank_rooms.second.begin(), bank_rooms.second.end());
@@ -151,7 +168,7 @@ void DungeonEditor::LoadDungeonRoomSize() {
// Identify the room ID for the current room pointer
int room_id =
std::find_if(room_size_addresses_.begin(), room_size_addresses_.end(),
[room_ptr](const auto& entry) {
[room_ptr](const auto &entry) {
return entry.second == room_ptr;
})
->first;
@@ -315,7 +332,7 @@ void DungeonEditor::DrawRoomSelector() {
gui::InputHexWord("Room ID", &current_room_id_);
gui::InputHex("Palette ID", &current_palette_id_);
if (ImGuiID child_id = ImGui::GetID((void*)(intptr_t)9);
if (ImGuiID child_id = ImGui::GetID((void *)(intptr_t)9);
BeginChild(child_id, ImGui::GetContentRegionAvail(), true,
ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
int i = 0;
@@ -421,7 +438,7 @@ void DungeonEditor::DrawDungeonTabView() {
// Room is already open
next_tab_id++;
}
active_rooms_.push_back(next_tab_id++); // Add new tab
active_rooms_.push_back(next_tab_id++); // Add new tab
}
// Submit our regular tabs
@@ -514,7 +531,7 @@ void DungeonEditor::DrawRoomGraphics() {
void DungeonEditor::DrawTileSelector() {
if (BeginTabBar("##TabBar", ImGuiTabBarFlags_FittingPolicyScroll)) {
if (BeginTabItem("Room Graphics")) {
if (ImGuiID child_id = ImGui::GetID((void*)(intptr_t)3);
if (ImGuiID child_id = ImGui::GetID((void *)(intptr_t)3);
BeginChild(child_id, ImGui::GetContentRegionAvail(), true,
ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
DrawRoomGraphics();
@@ -577,7 +594,7 @@ void DungeonEditor::DrawObjectRenderer() {
if (object_loaded_) {
ImGui::Begin("Memory Viewer", &object_loaded_, 0);
static MemoryEditor mem_edit;
mem_edit.DrawContents((void*)object_renderer_.mutable_memory(),
mem_edit.DrawContents((void *)object_renderer_.mutable_memory(),
object_renderer_.mutable_memory()->size());
ImGui::End();
}
@@ -586,7 +603,7 @@ void DungeonEditor::DrawObjectRenderer() {
// ============================================================================
void DungeonEditor::CalculateUsageStats() {
for (const auto& room : rooms_) {
for (const auto &room : rooms_) {
if (blockset_usage_.find(room.blockset) == blockset_usage_.end()) {
blockset_usage_[room.blockset] = 1;
} else {
@@ -608,15 +625,15 @@ void DungeonEditor::CalculateUsageStats() {
}
void DungeonEditor::RenderSetUsage(
const absl::flat_hash_map<uint16_t, int>& usage_map, uint16_t& selected_set,
const absl::flat_hash_map<uint16_t, int> &usage_map, uint16_t &selected_set,
int spriteset_offset) {
// Sort the usage map by set number
std::vector<std::pair<uint16_t, int>> sorted_usage(usage_map.begin(),
usage_map.end());
std::sort(sorted_usage.begin(), sorted_usage.end(),
[](const auto& a, const auto& b) { return a.first < b.first; });
[](const auto &a, const auto &b) { return a.first < b.first; });
for (const auto& [set, count] : sorted_usage) {
for (const auto &[set, count] : sorted_usage) {
std::string display_str;
if (spriteset_offset != 0x00) {
display_str = absl::StrFormat("%#02x, %#02x: %d", set,
@@ -626,7 +643,7 @@ void DungeonEditor::RenderSetUsage(
absl::StrFormat("%#02x: %d", (set + spriteset_offset), count);
}
if (ImGui::Selectable(display_str.c_str(), selected_set == set)) {
selected_set = set; // Update the selected set when clicked
selected_set = set; // Update the selected set when clicked
}
}
}
@@ -637,7 +654,7 @@ namespace {
// Range for spritesets 0-0x8F
// Range for palettes 0-0x47
template <typename T>
void RenderUnusedSets(const absl::flat_hash_map<T, int>& usage_map, int max_set,
void RenderUnusedSets(const absl::flat_hash_map<T, int> &usage_map, int max_set,
int spriteset_offset = 0x00) {
std::vector<int> unused_sets;
for (int i = 0; i < max_set; i++) {
@@ -645,7 +662,7 @@ void RenderUnusedSets(const absl::flat_hash_map<T, int>& usage_map, int max_set,
unused_sets.push_back(i);
}
}
for (const auto& set : unused_sets) {
for (const auto &set : unused_sets) {
if (spriteset_offset != 0x00) {
Text("%#02x, %#02x", set, (set + spriteset_offset));
} else {
@@ -653,7 +670,7 @@ void RenderUnusedSets(const absl::flat_hash_map<T, int>& usage_map, int max_set,
}
}
}
} // namespace
} // namespace
void DungeonEditor::DrawUsageStats() {
if (Button("Refresh")) {
@@ -744,7 +761,7 @@ void DungeonEditor::DrawUsageGrid() {
int totalSquares = 296;
int squaresWide = 16;
int squaresTall = (totalSquares + squaresWide - 1) /
squaresWide; // Ceiling of totalSquares/squaresWide
squaresWide; // Ceiling of totalSquares/squaresWide
for (int row = 0; row < squaresTall; ++row) {
ImGui::NewLine();
@@ -755,7 +772,7 @@ void DungeonEditor::DrawUsageGrid() {
break;
}
// Determine if this square should be highlighted
const auto& room = rooms_[row * squaresWide + col];
const auto &room = rooms_[row * squaresWide + col];
// Create a button or selectable for each square
ImGui::BeginGroup();
@@ -765,10 +782,10 @@ void DungeonEditor::DrawUsageGrid() {
color.z = color.z / 255;
color.w = 1.0f;
if (rooms_[row * squaresWide + col].room_size() > 0xFFFF) {
color = ImVec4(1.0f, 0.0f, 0.0f, 1.0f); // Or any highlight color
color = ImVec4(1.0f, 0.0f, 0.0f, 1.0f); // Or any highlight color
}
if (rooms_[row * squaresWide + col].room_size() == 0) {
color = ImVec4(0.0f, 0.0f, 0.0f, 1.0f); // Or any highlight color
color = ImVec4(0.0f, 0.0f, 0.0f, 1.0f); // Or any highlight color
}
ImGui::PushStyleColor(ImGuiCol_Button, color);
// Make the button text darker
@@ -782,7 +799,7 @@ void DungeonEditor::DrawUsageGrid() {
if (highlight) {
ImGui::PushStyleColor(
ImGuiCol_Button,
ImVec4(1.0f, 0.5f, 0.0f, 1.0f)); // Or any highlight color
ImVec4(1.0f, 0.5f, 0.0f, 1.0f)); // Or any highlight color
}
if (Button(absl::StrFormat("%#x",
rooms_[row * squaresWide + col].room_size())
@@ -827,6 +844,6 @@ void DungeonEditor::DrawUsageGrid() {
}
}
} // namespace editor
} // namespace app
} // namespace yaze
} // namespace editor
} // namespace yaze

View File

@@ -14,7 +14,6 @@
#include "zelda3/dungeon/room_object.h"
namespace yaze {
namespace app {
namespace editor {
constexpr ImGuiTabItemFlags kDungeonTabFlags =
@@ -143,7 +142,6 @@ class DungeonEditor : public Editor,
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif

View File

@@ -4,7 +4,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
absl::Status DrawEditor(EditorLayoutParams *params) {
@@ -48,5 +47,5 @@ absl::Status DrawEditor(EditorLayoutParams *params) {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -11,10 +11,9 @@
#include "app/editor/system/resource_manager.h"
namespace yaze {
namespace app {
/**
* @namespace yaze::app::editor
* @namespace yaze::editor
* @brief Editors are the view controllers for the application.
*/
namespace editor {
@@ -99,7 +98,6 @@ typedef struct EditorLayoutParams {
absl::Status DrawEditor(EditorLayoutParams *params);
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_CORE_EDITOR_H

View File

@@ -24,7 +24,6 @@
#include "imgui/misc/cpp/imgui_stdlib.h"
namespace yaze {
namespace app {
namespace editor {
using namespace ImGui;
@@ -816,5 +815,4 @@ absl::Status EditorManager::OpenProject() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -21,7 +21,6 @@
#include "app/rom.h"
namespace yaze {
namespace app {
namespace editor {
/**
@@ -110,7 +109,6 @@ class EditorManager : public SharedRom, public core::ExperimentFlags {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_EDITOR_MANAGER_H

View File

@@ -11,7 +11,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
using ImGui::BeginChild;
@@ -297,5 +296,4 @@ void GfxGroupEditor::DrawPaletteViewer() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -7,7 +7,6 @@
#include "app/rom.h"
namespace yaze {
namespace app {
namespace editor {
/**
@@ -43,6 +42,5 @@ class GfxGroupEditor : public SharedRom {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_GFX_GROUP_EDITOR_H

View File

@@ -23,7 +23,6 @@
#include "imgui_memory_editor.h"
namespace yaze {
namespace app {
namespace editor {
using core::Renderer;
@@ -844,5 +843,4 @@ absl::Status GraphicsEditor::DecompressSuperDonkey() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -16,7 +16,6 @@
#include "imgui_memory_editor.h"
namespace yaze {
namespace app {
namespace editor {
// "99973","A3D80",
@@ -196,7 +195,6 @@ class GraphicsEditor : public SharedRom, public Editor {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_GRAPHICS_EDITOR_H

View File

@@ -8,7 +8,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
using ImGui::AcceptDragDropPayload;
@@ -472,5 +471,4 @@ absl::Status PaletteEditor::ResetColorToOriginal(
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -14,7 +14,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
namespace palette_internal {
@@ -120,7 +119,6 @@ class PaletteEditor : public SharedRom, public Editor {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif

View File

@@ -18,7 +18,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
using core::Renderer;
@@ -392,6 +391,22 @@ void ScreenEditor::DrawDungeonMapsEditor() {
sheets_.emplace(1, rom()->gfx_sheets()[213]);
sheets_.emplace(2, rom()->gfx_sheets()[214]);
sheets_.emplace(3, rom()->gfx_sheets()[215]);
int current_tile8 = 0;
int tile_data_offset = 0;
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 32; j++) {
std::vector<uint8_t> tile_data(64, 0); // 8x8 tile (64 bytes
int tile_index = current_tile8 + j;
int x = (j % 8) * 8;
int y = (j / 8) * 8;
sheets_[i].Get8x8Tile(tile_index, 0, 0, tile_data, tile_data_offset);
tile8_individual_.emplace_back(gfx::Bitmap(8, 8, 4, tile_data));
RETURN_VOID_IF_ERROR(tile8_individual_.back().ApplyPalette(
*rom()->mutable_dungeon_palette(3)));
Renderer::GetInstance().RenderBitmap(&tile8_individual_.back());
}
tile_data_offset = 0;
}
dungeon_maps_loaded_ = true;
} else {
ImGui::Text("Failed to load dungeon map tile16");
@@ -470,8 +485,12 @@ void ScreenEditor::DrawDungeonMapsEditor() {
}
ImGui::Separator();
current_tile_canvas_.DrawBackground(ImVec2(64 * 2 + 2, 64 * 2 + 4));
current_tile_canvas_.DrawBackground(); // ImVec2(64 * 2 + 2, 64 * 2 + 4));
current_tile_canvas_.DrawContextMenu();
if (current_tile_canvas_.DrawTilePainter(
tile8_individual_[selected_tile8_], 16)) {
// Modify the tile16 based on the selected tile and current_tile16_info
}
current_tile_canvas_.DrawBitmap(tile16_individual_[selected_tile16_], 2,
4.0f);
current_tile_canvas_.DrawGrid(16.f);
@@ -589,5 +608,4 @@ void ScreenEditor::DrawToolset() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -15,7 +15,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
/**
@@ -86,12 +85,13 @@ private:
bool copy_button_pressed = false;
bool paste_button_pressed = false;
std::vector<uint8_t> all_gfx_;
std::array<uint16_t, 4> current_tile16_data_;
std::unordered_map<int, gfx::Bitmap> tile16_individual_;
std::vector<gfx::Bitmap> tile8_individual_;
std::vector<uint8_t> all_gfx_;
std::vector<uint8_t> gfx_bin_data_;
std::vector<zelda3::screen::DungeonMap> dungeon_maps_;
std::vector<std::vector<std::array<std::string, 25>>> dungeon_map_labels_;
std::array<uint16_t, 4> current_tile16_data_;
std::vector<uint8_t> gfx_bin_data_;
absl::Status status_;
@@ -100,18 +100,18 @@ private:
gfx::Tilesheet tile16_sheet_;
gfx::InternalTile16 current_tile16_info;
gui::Canvas current_tile_canvas_{"##CurrentTileCanvas"};
gui::Canvas current_tile_canvas_{"##CurrentTileCanvas", ImVec2(32, 32),
gui::CanvasGridSize::k16x16, 2.0f};
gui::Canvas screen_canvas_;
gui::Canvas tilesheet_canvas_;
gui::Canvas tilemap_canvas_{"##TilemapCanvas",
ImVec2(128 + 2, (192) + 4),
gui::Canvas tilemap_canvas_{"##TilemapCanvas", ImVec2(128 + 2, (192) + 4),
gui::CanvasGridSize::k8x8, 2.f};
zelda3::screen::Inventory inventory_;
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif

View File

@@ -21,7 +21,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
using core::Renderer;
@@ -251,7 +250,7 @@ absl::Status Tile16Editor::DrawTileEditControls() {
gui::InputHexByte("Palette", &notify_palette.mutable_get());
notify_palette.apply_changes();
if (notify_palette.modified()) {
auto palette = palettesets_[current_palette_].main;
auto palette = palettesets_[current_palette_].main_;
auto value = notify_palette.get();
if (notify_palette.get() > 0x04 && notify_palette.get() < 0x06) {
palette = palettesets_[current_palette_].aux1;
@@ -400,5 +399,4 @@ absl::Status Tile16Editor::UpdateTransferTileCanvas() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -13,7 +13,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
/**
@@ -100,6 +99,5 @@ class Tile16Editor : public GfxContext, public SharedRom {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_TILE16EDITOR_H

View File

@@ -3,7 +3,6 @@
#include "app/core/common.h"
namespace yaze {
namespace app {
namespace editor {
uint8_t FindMatchingCharacter(char value) {
@@ -145,7 +144,7 @@ std::vector<uint8_t> ParseMessageToData(std::string str) {
return bytes;
}
std::vector<DictionaryEntry> BuildDictionaryEntries(app::Rom* rom) {
std::vector<DictionaryEntry> BuildDictionaryEntries(Rom* rom) {
std::vector<DictionaryEntry> AllDictionaries;
for (int i = 0; i < kNumDictionaryEntries; i++) {
std::vector<uint8_t> bytes;
@@ -178,5 +177,4 @@ std::vector<DictionaryEntry> BuildDictionaryEntries(app::Rom* rom) {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -11,7 +11,6 @@
#include "app/rom.h"
namespace yaze {
namespace app {
namespace editor {
const uint8_t kMessageTerminator = 0x7F;
@@ -78,7 +77,7 @@ constexpr int kTextDataEnd = 0xE7FFF;
constexpr int kNumDictionaryEntries = 97;
constexpr int kPointersDictionaries = 0x74703;
std::vector<DictionaryEntry> BuildDictionaryEntries(app::Rom* rom);
std::vector<DictionaryEntry> BuildDictionaryEntries(Rom* rom);
std::string ReplaceAllDictionaryWords(std::string str,
std::vector<DictionaryEntry> dictionary);
@@ -278,7 +277,6 @@ ParsedElement FindMatchingElement(const std::string& str);
std::string ParseTextDataByte(uint8_t value);
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_MESSAGE_MESSAGE_DATA_H

View File

@@ -18,7 +18,6 @@
#include "imgui/misc/cpp/imgui_stdlib.h"
namespace yaze {
namespace app {
namespace editor {
using core::Renderer;
@@ -700,5 +699,4 @@ void MessageEditor::SelectAll() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -12,7 +12,6 @@
#include "app/rom.h"
namespace yaze {
namespace app {
namespace editor {
constexpr int kGfxFont = 0x70000; // 2bpp format
@@ -163,7 +162,6 @@ class MessageEditor : public Editor, public SharedRom {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_MESSAGE_EDITOR_H

View File

@@ -9,7 +9,6 @@
#include "app/gui/input.h"
namespace yaze {
namespace app {
namespace editor {
absl::Status MusicEditor::Update() {
@@ -218,5 +217,4 @@ void MusicEditor::DrawToolset() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -12,7 +12,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
static const char* kGameSongs[] = {"Title",
@@ -85,7 +84,6 @@ class MusicEditor : public SharedRom, public Editor {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif

View File

@@ -5,7 +5,6 @@
#include "app/gui/style.h"
namespace yaze {
namespace app {
namespace editor {
using ImGui::BeginChild;
@@ -489,5 +488,4 @@ bool DrawSpriteEditorPopup(zelda3::Sprite &sprite) {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -7,7 +7,6 @@
#include "app/zelda3/overworld/overworld.h"
namespace yaze {
namespace app {
namespace editor {
bool IsMouseHoveringOverEntity(const zelda3::GameEntity &entity,
@@ -81,7 +80,6 @@ void DrawSpriteInserterPopup();
bool DrawSpriteEditorPopup(zelda3::Sprite &sprite);
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_OVERWORLD_ENTITY_H

View File

@@ -24,7 +24,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
using core::Renderer;
@@ -1530,5 +1529,4 @@ void OverworldEditor::InitializeZeml() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -15,7 +15,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
constexpr uint k4BPP = 4;
@@ -309,7 +308,6 @@ class OverworldEditor : public Editor,
absl::Status status_;
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif

View File

@@ -7,7 +7,6 @@
#include "app/zelda3/sprite/sprite.h"
namespace yaze {
namespace app {
namespace editor {
using ImGui::BeginTable;
@@ -275,5 +274,4 @@ void SpriteEditor::DrawCustomSpritesMetadata() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -8,7 +8,6 @@
#include "app/rom.h"
namespace yaze {
namespace app {
namespace editor {
constexpr ImGuiTabItemFlags kSpriteTabFlags =
@@ -111,7 +110,6 @@ class SpriteEditor : public SharedRom, public Editor {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_SPRITE_EDITOR_H

View File

@@ -13,7 +13,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
/**
* @brief Namespace for the ZSprite format from Zarby's ZSpriteMaker.
@@ -390,7 +389,6 @@ struct ZSprite {
} // namespace zsprite
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_SPRITE_ZSPRITE_H

View File

@@ -5,7 +5,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
ImGuiKey MapKeyToImGuiKey(char key) {
@@ -139,5 +138,4 @@ void CommandManager::LoadKeybindings(const std::string &filepath) {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -7,17 +7,15 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
namespace yaze {namespace editor {
ImGuiKey MapKeyToImGuiKey(char key);
class CommandManager {
public:
public:
CommandManager() = default;
~CommandManager() = default;
using Command = std::function<void()>;
struct CommandInfo {
@@ -27,7 +25,9 @@ public:
std::string desc;
CommandInfo(Command command, char mnemonic, const std::string &name,
const std::string &desc)
: command(std::move(command)), mnemonic(mnemonic), name(name),
: command(std::move(command)),
mnemonic(mnemonic),
name(name),
desc(desc) {}
CommandInfo() = default;
};
@@ -72,12 +72,10 @@ public:
void SaveKeybindings(const std::string &filepath);
void LoadKeybindings(const std::string &filepath);
private:
private:
std::unordered_map<std::string, CommandInfoOrPrefix> commands_;
};
} // namespace editor
} // namespace app
} // namespace yaze
} // namespace editor} // namespace yaze
#endif // YAZE_APP_EDITOR_SYSTEM_COMMAND_MANAGER_H
#endif // YAZE_APP_EDITOR_SYSTEM_COMMAND_MANAGER_H

View File

@@ -7,7 +7,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
class ConstantManager {
@@ -71,7 +70,6 @@ class ConstantManager {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_SYSTEM_CONSTANT_MANAGER_H

View File

@@ -5,13 +5,12 @@
#include <dlfcn.h>
#endif
#include <system/extension.h>
#include <yaze.h>
#include <iostream>
#include <vector>
namespace yaze {
namespace app {
namespace editor {
void ExtensionManager::LoadExtension(const std::string& filename,
@@ -81,5 +80,4 @@ void ExtensionManager::ExecuteExtensionUI(yaze_editor_context* context) {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -1,14 +1,12 @@
#ifndef YAZE_APP_EDITOR_SYSTEM_EXTENSION_MANAGER_H
#define YAZE_APP_EDITOR_SYSTEM_EXTENSION_MANAGER_H
#include <system/extension.h>
#include <yaze.h>
#include <string>
#include <vector>
namespace yaze {
namespace app {
namespace editor {
namespace yaze {namespace editor {
class ExtensionManager {
public:
@@ -22,8 +20,6 @@ class ExtensionManager {
std::vector<yaze_extension*> extensions_;
};
} // namespace editor
} // namespace app
} // namespace yaze
} // namespace editor} // namespace yaze
#endif // YAZE_APP_EDITOR_SYSTEM_EXTENSION_MANAGER_H

View File

@@ -5,7 +5,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
using ImGui::BeginMenu;
@@ -58,7 +57,6 @@ struct FlagsMenu : public core::ExperimentFlags {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_UTILS_FLAGS_H_

View File

@@ -6,7 +6,6 @@
#include <vector>
namespace yaze {
namespace app {
namespace editor {
// System history manager, undo and redo.
@@ -26,7 +25,6 @@ class HistoryManager {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_SYSTEM_HISTORY_MANAGER_H

View File

@@ -3,7 +3,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
PopupManager::PopupManager() {
@@ -15,5 +14,5 @@ PopupManager::~PopupManager() {
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -2,7 +2,6 @@
#define YAZE_APP_EDITOR_POPUP_MANAGER_H
namespace yaze {
namespace app {
namespace editor {
// ImGui popup manager.
@@ -15,7 +14,7 @@ class PopupManager {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_POPUP_MANAGER_H

View File

@@ -4,7 +4,6 @@
#include <cstddef>
namespace yaze {
namespace app {
namespace editor {
// System resource manager.
@@ -24,7 +23,7 @@ class ResourceManager {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_SYSTEM_RESOURCE_MANAGER_H

View File

@@ -6,7 +6,6 @@
#include "imgui/imgui.h"
namespace yaze {
namespace app {
namespace editor {
using ImGui::BeginChild;
@@ -79,5 +78,4 @@ absl::Status SettingsEditor::DrawKeyboardShortcuts() {
}
} // namespace editor
} // namespace app
} // namespace yaze

View File

@@ -7,7 +7,6 @@
#include "app/editor/editor.h"
namespace yaze {
namespace app {
namespace editor {
// Simple representation for a tree
@@ -226,7 +225,6 @@ class SettingsEditor : public Editor {
};
} // namespace editor
} // namespace app
} // namespace yaze
#endif // YAZE_APP_EDITOR_SETTINGS_EDITOR_H_