Refactor include paths and remove redundant headers in core and editor modules

This commit is contained in:
scawful
2024-11-15 23:38:44 -05:00
parent 30b72dba70
commit b336d14233
9 changed files with 14 additions and 20 deletions

View File

@@ -41,6 +41,7 @@ target_include_directories(
lib/ lib/
app/ app/
${ASAR_INCLUDE_DIR} ${ASAR_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/incl/
${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/src/
${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine ${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine
${PNG_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS}

View File

@@ -7,10 +7,8 @@
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include "app/core/platform/file_path.h"
#include "app/core/platform/font_loader.h" #include "app/core/platform/font_loader.h"
#include "app/editor/editor_manager.h" #include "app/editor/editor_manager.h"
#include "app/gui/icons.h"
#include "app/gui/style.h" #include "app/gui/style.h"
#include "core/utils/file_util.h" #include "core/utils/file_util.h"
#include "imgui/backends/imgui_impl_sdl2.h" #include "imgui/backends/imgui_impl_sdl2.h"
@@ -314,15 +312,7 @@ absl::Status Controller::CreateGuiContext() {
Renderer::GetInstance().renderer()); Renderer::GetInstance().renderer());
ImGui_ImplSDLRenderer2_Init(Renderer::GetInstance().renderer()); ImGui_ImplSDLRenderer2_Init(Renderer::GetInstance().renderer());
// const auto assets_path = std::filesystem::path("assets");
RETURN_IF_ERROR(LoadFontFamilies()); RETURN_IF_ERROR(LoadFontFamilies());
// #ifdef __APPLE__
// LoadSystemFonts();
// #else
// return absl::InternalError(
// "Could not find assets/fonts directory in the current working "
// "directory");
// #endif
// Set the default style // Set the default style
gui::ColorsYaze(); gui::ColorsYaze();

View File

@@ -5,11 +5,11 @@
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
#include <system/extension.h>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include "incl/system/extension.h"
namespace yaze { namespace yaze {
namespace app { namespace app {
namespace editor { namespace editor {

View File

@@ -1,11 +1,11 @@
#ifndef YAZE_APP_EDITOR_SYSTEM_EXTENSION_MANAGER_H #ifndef YAZE_APP_EDITOR_SYSTEM_EXTENSION_MANAGER_H
#define YAZE_APP_EDITOR_SYSTEM_EXTENSION_MANAGER_H #define YAZE_APP_EDITOR_SYSTEM_EXTENSION_MANAGER_H
#include <system/extension.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include "incl/system/extension.h"
namespace yaze { namespace yaze {
namespace app { namespace app {
namespace editor { namespace editor {

View File

@@ -1,11 +1,12 @@
#ifndef YAZE_APP_GFX_SNES_COLOR_H_ #ifndef YAZE_APP_GFX_SNES_COLOR_H_
#define YAZE_APP_GFX_SNES_COLOR_H_ #define YAZE_APP_GFX_SNES_COLOR_H_
#include <snes_color.h>
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
#include "imgui/imgui.h" #include "imgui/imgui.h"
#include "incl/snes_color.h"
namespace yaze { namespace yaze {
namespace app { namespace app {

View File

@@ -12,7 +12,7 @@
#include "app/core/constants.h" #include "app/core/constants.h"
#include "app/gfx/snes_color.h" #include "app/gfx/snes_color.h"
#include "imgui/imgui.h" #include "imgui/imgui.h"
#include "incl/snes_color.h" #include "snes_color.h"
namespace yaze { namespace yaze {
namespace app { namespace app {

View File

@@ -1,12 +1,12 @@
#ifndef YAZE_APP_GFX_SNES_TILE_H #ifndef YAZE_APP_GFX_SNES_TILE_H
#define YAZE_APP_GFX_SNES_TILE_H #define YAZE_APP_GFX_SNES_TILE_H
#include <snes_tile.h>
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include "incl/snes_tile.h"
namespace yaze { namespace yaze {
namespace app { namespace app {
namespace gfx { namespace gfx {

View File

@@ -1,5 +1,7 @@
#include "room.h" #include "room.h"
#include <dungeon.h>
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
@@ -12,7 +14,6 @@
#include "app/rom.h" #include "app/rom.h"
#include "app/zelda3/dungeon/room_object.h" #include "app/zelda3/dungeon/room_object.h"
#include "app/zelda3/sprite/sprite.h" #include "app/zelda3/sprite/sprite.h"
#include "incl/dungeon.h"
namespace yaze { namespace yaze {
namespace app { namespace app {

View File

@@ -1,6 +1,8 @@
#ifndef YAZE_APP_ZELDA3_DUNGEON_ROOM_H #ifndef YAZE_APP_ZELDA3_DUNGEON_ROOM_H
#define YAZE_APP_ZELDA3_DUNGEON_ROOM_H #define YAZE_APP_ZELDA3_DUNGEON_ROOM_H
#include <dungeon.h>
#include <cstdint> #include <cstdint>
#include <fstream> #include <fstream>
#include <string> #include <string>
@@ -15,7 +17,6 @@
#include "app/rom.h" #include "app/rom.h"
#include "app/zelda3/dungeon/room_object.h" #include "app/zelda3/dungeon/room_object.h"
#include "app/zelda3/sprite/sprite.h" #include "app/zelda3/sprite/sprite.h"
#include "incl/dungeon.h"
namespace yaze { namespace yaze {
namespace app { namespace app {