namespace housekeeping continued again

This commit is contained in:
Justin Scofield
2022-06-20 14:00:59 -04:00
parent 27f8eb7639
commit f9e0ed17bf
26 changed files with 82 additions and 82 deletions

View File

@@ -36,13 +36,13 @@ add_executable(
gui/style.cc gui/style.cc
gui/editor/editor.cc gui/editor/editor.cc
gui/editor/overworld_editor.cc gui/editor/overworld_editor.cc
application/rom.cc app/rom.cc
application/core/controller.cc app/core/controller.cc
application/zelda3/overworld.cc app/zelda3/overworld.cc
application/zelda3/overworld_map.cc app/zelda3/overworld_map.cc
application/gfx/bitmap.cc app/gfx/bitmap.cc
application/gfx/tile.cc app/gfx/tile.cc
application/gfx/palette.cc app/gfx/palette.cc
# GUI libraries # GUI libraries
${IMGUI_PATH}/imgui.cpp ${IMGUI_PATH}/imgui.cpp
${IMGUI_PATH}/imgui_demo.cpp ${IMGUI_PATH}/imgui_demo.cpp
@@ -66,7 +66,7 @@ target_include_directories(
yaze PUBLIC yaze PUBLIC
/ /
Library/ Library/
application/ app/
"C:/msys64/mingw64/include/libpng16" "C:/msys64/mingw64/include/libpng16"
"C:/msys64/mingw64/include/SDL2" "C:/msys64/mingw64/include/SDL2"
"C:/msys64/mingw64/include" "C:/msys64/mingw64/include"

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_CORE_CONSTANTS_H #ifndef YAZE_APP_CORE_CONSTANTS_H
#define YAZE_APPLICATION_CORE_CONSTANTS_H #define YAZE_APP_CORE_CONSTANTS_H
#include <array> #include <array>
#include <string> #include <string>
@@ -21,7 +21,7 @@ using uint = unsigned int;
using uchar = unsigned char; using uchar = unsigned char;
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace core { namespace core {
namespace Constants { namespace Constants {
@@ -1226,7 +1226,7 @@ static const std::string TileTypeNames[] = {
} // namespace Constants } // namespace Constants
} // namespace Core } // namespace Core
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif #endif

View File

@@ -11,7 +11,7 @@
#include "gui/editor/editor.h" #include "gui/editor/editor.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace core { namespace core {
bool Controller::isActive() const { return active_; } bool Controller::isActive() const { return active_; }
@@ -181,5 +181,5 @@ void Controller::CreateGuiContext() {
} }
} // namespace core } // namespace core
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_CORE_CONTROLLER_H #ifndef YAZE_APP_CORE_CONTROLLER_H
#define YAZE_APPLICATION_CORE_CONTROLLER_H #define YAZE_APP_CORE_CONTROLLER_H
#define SDL_MAIN_HANDLED #define SDL_MAIN_HANDLED
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
@@ -15,7 +15,7 @@
int main(int argc, char **argv); int main(int argc, char **argv);
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace core { namespace core {
class Controller { class Controller {
@@ -49,7 +49,7 @@ class Controller {
}; };
} // namespace core } // namespace core
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif // YAZE_APPLICATION_CORE_CONTROLLER_H #endif // YAZE_APP_CORE_CONTROLLER_H

View File

@@ -1,10 +1,10 @@
#ifndef YAZE_APPLICATION_CONTROLLER_ENTRYPOINT_H #ifndef YAZE_APP_CONTROLLER_ENTRYPOINT_H
#define YAZE_APPLICATION_CONTROLLER_ENTRYPOINT_H #define YAZE_APP_CONTROLLER_ENTRYPOINT_H
#include "controller.h" #include "controller.h"
int main(int argc, char** argv) { int main(int argc, char** argv) {
yaze::application::core::Controller controller; yaze::app::core::Controller controller;
controller.onEntry(); controller.onEntry();
while (controller.isActive()) { while (controller.isActive()) {
controller.onInput(); controller.onInput();
@@ -15,4 +15,4 @@ int main(int argc, char** argv) {
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
#endif // YAZE_APPLICATION_CONTROLLER_ENTRYPOINT_H #endif // YAZE_APP_CONTROLLER_ENTRYPOINT_H

View File

@@ -5,7 +5,7 @@
#include "rom.h" #include "rom.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace gfx { namespace gfx {
int GetPCGfxAddress(char *romData, char id) { int GetPCGfxAddress(char *romData, char id) {
@@ -174,5 +174,5 @@ void CreateAllGfxData(char *romData, char *allgfx16Ptr) {
} }
} // namespace gfx } // namespace gfx
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,12 +1,12 @@
#ifndef YAZE_APPLICATION_UTILS_BITMAP_H #ifndef YAZE_APP_UTILS_BITMAP_H
#define YAZE_APPLICATION_UTILS_BITMAP_H #define YAZE_APP_UTILS_BITMAP_H
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include "Core/constants.h" #include "Core/constants.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace gfx { namespace gfx {
class Bitmap { class Bitmap {
@@ -31,7 +31,7 @@ char *CreateAllGfxDataRaw(char *romData);
void CreateAllGfxData(char *romData, char *allgfx16Ptr); void CreateAllGfxData(char *romData, char *allgfx16Ptr);
} // namespace gfx } // namespace gfx
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif #endif

View File

@@ -4,7 +4,7 @@
#include <cstring> #include <cstring>
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace gfx { namespace gfx {
SNESColor::SNESColor() : rgb(ImVec4(0.f, 0.f, 0.f, 0.f)) {} SNESColor::SNESColor() : rgb(ImVec4(0.f, 0.f, 0.f, 0.f)) {}
@@ -109,5 +109,5 @@ SDL_Palette* SNESPalette::GetSDL_Palette() {
} }
} // namespace gfx } // namespace gfx
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_gfx_PALETTE_H #ifndef YAZE_APP_gfx_PALETTE_H
#define YAZE_APPLICATION_gfx_PALETTE_H #define YAZE_APP_gfx_PALETTE_H
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include <imgui/imgui.h> #include <imgui/imgui.h>
@@ -12,7 +12,7 @@
#include <vector> #include <vector>
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace gfx { namespace gfx {
struct SNESColor { struct SNESColor {
@@ -44,7 +44,7 @@ class SNESPalette {
}; };
} // namespace gfx } // namespace gfx
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif // YAZE_APPLICATION_gfx_PALETTE_H #endif // YAZE_APP_gfx_PALETTE_H

View File

@@ -9,7 +9,7 @@
#include <regex> #include <regex>
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace gfx { namespace gfx {
TilesPattern::TilesPattern() { TilesPattern::TilesPattern() {
@@ -109,5 +109,5 @@ std::vector<std::vector<tile8> > TilesPattern::transform(
} }
} // namespace gfx } // namespace gfx
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_DATA_TILE_H #ifndef YAZE_APP_DATA_TILE_H
#define YAZE_APPLICATION_DATA_TILE_H #define YAZE_APP_DATA_TILE_H
#include <tile.h> #include <tile.h>
@@ -12,7 +12,7 @@
#include "gfx/palette.h" #include "gfx/palette.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace gfx { namespace gfx {
// vhopppcc cccccccc // vhopppcc cccccccc
@@ -97,7 +97,7 @@ class TilePreset {
}; };
} // namespace gfx } // namespace gfx
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif #endif

View File

@@ -5,7 +5,7 @@
#include "Core/constants.h" #include "Core/constants.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Data { namespace Data {
ROM::~ROM() { ROM::~ROM() {
@@ -292,5 +292,5 @@ int AddressFromBytes(uchar addr1, uchar addr2, uchar addr3) {
} }
} // namespace Data } // namespace Data
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_UTILS_ROM_H #ifndef YAZE_APP_UTILS_ROM_H
#define YAZE_APPLICATION_UTILS_ROM_H #define YAZE_APP_UTILS_ROM_H
#include <compressions/alttpcompression.h> #include <compressions/alttpcompression.h>
#include <rommapping.h> #include <rommapping.h>
@@ -17,7 +17,7 @@
#include "gfx/tile.h" #include "gfx/tile.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Data { namespace Data {
int AddressFromBytes(uchar addr1, uchar addr2, uchar addr3); int AddressFromBytes(uchar addr1, uchar addr2, uchar addr3);
@@ -69,7 +69,7 @@ class ROM {
}; };
} // namespace Data } // namespace Data
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif #endif

View File

@@ -4,7 +4,7 @@
#include "rom.h" #include "rom.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Data { namespace Data {
using namespace core; using namespace core;
@@ -344,5 +344,5 @@ void Overworld::LoadOverworldMap() {
} }
} // namespace Data } // namespace Data
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_DATA_OVERWORLD_H #ifndef YAZE_APP_DATA_OVERWORLD_H
#define YAZE_APPLICATION_DATA_OVERWORLD_H #define YAZE_APP_DATA_OVERWORLD_H
#include <rommapping.h> #include <rommapping.h>
@@ -13,7 +13,7 @@
#include "rom.h" #include "rom.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Data { namespace Data {
class Overworld { class Overworld {
@@ -68,7 +68,7 @@ class Overworld {
}; };
} // namespace Data } // namespace Data
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif #endif

View File

@@ -4,7 +4,7 @@
#include "gfx/tile.h" #include "gfx/tile.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Data { namespace Data {
using namespace core; using namespace core;
@@ -355,5 +355,5 @@ void OverworldMap::BuildTileset(int gameState) {
} }
} // namespace Data } // namespace Data
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -8,7 +8,7 @@
#include "gfx/tile.h" #include "gfx/tile.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Data { namespace Data {
using ushort = unsigned short; using ushort = unsigned short;
@@ -73,5 +73,5 @@ class OverworldMap {
}; };
} // namespace Data } // namespace Data
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -15,7 +15,7 @@
#include "rom.h" #include "rom.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Editor { namespace Editor {
using namespace core; using namespace core;
@@ -521,5 +521,5 @@ void Editor::DrawHUDEditor() {
} }
} // namespace Editor } // namespace Editor
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_VIEW_EDITOR_H #ifndef YAZE_APP_VIEW_EDITOR_H
#define YAZE_APPLICATION_VIEW_EDITOR_H #define YAZE_APP_VIEW_EDITOR_H
#include <ImGuiColorTextEdit/TextEditor.h> #include <ImGuiColorTextEdit/TextEditor.h>
#include <ImGuiFileDialog/ImGuiFileDialog.h> #include <ImGuiFileDialog/ImGuiFileDialog.h>
@@ -15,7 +15,7 @@
#include "rom.h" #include "rom.h"
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Editor { namespace Editor {
class Editor { class Editor {
@@ -68,7 +68,7 @@ class Editor {
}; };
} // namespace Editor } // namespace Editor
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif // YAZE_APPLICATION_VIEW_EDITOR_H #endif // YAZE_APP_VIEW_EDITOR_H

View File

@@ -28,7 +28,7 @@
// have an overworld map viewer, in less than few hours if are able to // have an overworld map viewer, in less than few hours if are able to
// understand the data quickly // understand the data quickly
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Editor { namespace Editor {
void OverworldEditor::SetupROM(Data::ROM &rom) { rom_ = rom; } void OverworldEditor::SetupROM(Data::ROM &rom) { rom_ = rom; }
@@ -378,5 +378,5 @@ void OverworldEditor::Loadgfx() {
} }
} // namespace Editor } // namespace Editor
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_EDITOR_OVERWORLDEDITOR_H #ifndef YAZE_APP_EDITOR_OVERWORLDEDITOR_H
#define YAZE_APPLICATION_EDITOR_OVERWORLDEDITOR_H #define YAZE_APP_EDITOR_OVERWORLDEDITOR_H
#include <imgui/imgui.h> #include <imgui/imgui.h>
@@ -10,7 +10,7 @@
namespace yaze { namespace yaze {
namespace application { namespace app {
namespace Editor { namespace Editor {
static constexpr unsigned int k4BPP = 4; static constexpr unsigned int k4BPP = 4;
@@ -73,7 +73,7 @@ class OverworldEditor {
ImGuiTableFlags_SizingStretchSame; ImGuiTableFlags_SizingStretchSame;
}; };
} // namespace Editor } // namespace Editor
} // namespace application } // namespace app
} // namespace yaze } // namespace yaze
#endif #endif

View File

@@ -1696,7 +1696,7 @@
#define ICON_MD_SET_MEAL "\xef\x87\xaa" // U+f1ea #define ICON_MD_SET_MEAL "\xef\x87\xaa" // U+f1ea
#define ICON_MD_SETTINGS "\xee\xa2\xb8" // U+e8b8 #define ICON_MD_SETTINGS "\xee\xa2\xb8" // U+e8b8
#define ICON_MD_SETTINGS_ACCESSIBILITY "\xef\x81\x9d" // U+f05d #define ICON_MD_SETTINGS_ACCESSIBILITY "\xef\x81\x9d" // U+f05d
#define ICON_MD_SETTINGS_applicationS "\xee\xa2\xb9" // U+e8b9 #define ICON_MD_SETTINGS_APPLICATIONS "\xee\xa2\xb9" // U+e8b9
#define ICON_MD_SETTINGS_BACKUP_RESTORE "\xee\xa2\xba" // U+e8ba #define ICON_MD_SETTINGS_BACKUP_RESTORE "\xee\xa2\xba" // U+e8ba
#define ICON_MD_SETTINGS_BLUETOOTH "\xee\xa2\xbb" // U+e8bb #define ICON_MD_SETTINGS_BLUETOOTH "\xee\xa2\xbb" // U+e8bb
#define ICON_MD_SETTINGS_BRIGHTNESS "\xee\xa2\xbd" // U+e8bd #define ICON_MD_SETTINGS_BRIGHTNESS "\xee\xa2\xbd" // U+e8bd

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_CORE_INPUT_H #ifndef YAZE_APP_CORE_INPUT_H
#define YAZE_APPLICATION_CORE_INPUT_H #define YAZE_APP_CORE_INPUT_H
#include <imgui/imgui.h> #include <imgui/imgui.h>
#include <imgui/imgui_internal.h> #include <imgui/imgui_internal.h>

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_CORE_STYLE_H #ifndef YAZE_APP_CORE_STYLE_H
#define YAZE_APPLICATION_CORE_STYLE_H #define YAZE_APP_CORE_STYLE_H
#include <imgui/imgui.h> #include <imgui/imgui.h>
#include <imgui/imgui_internal.h> #include <imgui/imgui_internal.h>

View File

@@ -1,7 +1,7 @@
#ifndef YAZE_YAZE_H #ifndef YAZE_YAZE_H
#define YAZE_YAZE_H #define YAZE_YAZE_H
#include "application/Core/controller.h" #include "app/Core/controller.h"
#include "application/Core/entry_point.h" #include "app/Core/entry_point.h"
#endif // YAZE_YAZE_H #endif // YAZE_YAZE_H

View File

@@ -16,10 +16,10 @@ set(SNESHACKING_PATH "../src/Library/sneshacking/src")
add_executable( add_executable(
yaze_test yaze_test
yaze_test.cc yaze_test.cc
../src/application/rom.cc ../src/app/rom.cc
../src/application/gfx/tile.cc ../src/app/gfx/tile.cc
../src/application/gfx/tile.cc ../src/app/gfx/tile.cc
../src/application/gfx/palette.cc ../src/app/gfx/palette.cc
${SNESHACKING_PATH}/compressions/alttpcompression.c ${SNESHACKING_PATH}/compressions/alttpcompression.c
${SNESHACKING_PATH}/compressions/stdnintendo.c ${SNESHACKING_PATH}/compressions/stdnintendo.c
${SNESHACKING_PATH}/tile.c ${SNESHACKING_PATH}/tile.c