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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_CORE_CONTROLLER_H
#define YAZE_APPLICATION_CORE_CONTROLLER_H
#ifndef YAZE_APP_CORE_CONTROLLER_H
#define YAZE_APP_CORE_CONTROLLER_H
#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>
@@ -15,7 +15,7 @@
int main(int argc, char **argv);
namespace yaze {
namespace application {
namespace app {
namespace core {
class Controller {
@@ -49,7 +49,7 @@ class Controller {
};
} // namespace core
} // namespace application
} // namespace app
} // 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
#define YAZE_APPLICATION_CONTROLLER_ENTRYPOINT_H
#ifndef YAZE_APP_CONTROLLER_ENTRYPOINT_H
#define YAZE_APP_CONTROLLER_ENTRYPOINT_H
#include "controller.h"
int main(int argc, char** argv) {
yaze::application::core::Controller controller;
yaze::app::core::Controller controller;
controller.onEntry();
while (controller.isActive()) {
controller.onInput();
@@ -15,4 +15,4 @@ int main(int argc, char** argv) {
return EXIT_SUCCESS;
}
#endif // YAZE_APPLICATION_CONTROLLER_ENTRYPOINT_H
#endif // YAZE_APP_CONTROLLER_ENTRYPOINT_H

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
#ifndef YAZE_APPLICATION_VIEW_EDITOR_H
#define YAZE_APPLICATION_VIEW_EDITOR_H
#ifndef YAZE_APP_VIEW_EDITOR_H
#define YAZE_APP_VIEW_EDITOR_H
#include <ImGuiColorTextEdit/TextEditor.h>
#include <ImGuiFileDialog/ImGuiFileDialog.h>
@@ -15,7 +15,7 @@
#include "rom.h"
namespace yaze {
namespace application {
namespace app {
namespace Editor {
class Editor {
@@ -68,7 +68,7 @@ class Editor {
};
} // namespace Editor
} // namespace application
} // namespace app
} // 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
// understand the data quickly
namespace yaze {
namespace application {
namespace app {
namespace Editor {
void OverworldEditor::SetupROM(Data::ROM &rom) { rom_ = rom; }
@@ -378,5 +378,5 @@ void OverworldEditor::Loadgfx() {
}
} // namespace Editor
} // namespace application
} // namespace app
} // namespace yaze

View File

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

View File

@@ -1696,7 +1696,7 @@
#define ICON_MD_SET_MEAL "\xef\x87\xaa" // U+f1ea
#define ICON_MD_SETTINGS "\xee\xa2\xb8" // U+e8b8
#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_BLUETOOTH "\xee\xa2\xbb" // U+e8bb
#define ICON_MD_SETTINGS_BRIGHTNESS "\xee\xa2\xbd" // U+e8bd

View File

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

View File

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

View File

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