Changed filenames to match google style and adjusted some header includes

This commit is contained in:
Justin Scofield
2022-06-12 20:21:42 -04:00
parent 7721e321a4
commit 1822a07e6f
20 changed files with 220 additions and 186 deletions

View File

@@ -1,23 +1,30 @@
#include "Controller.h"
#include "controller.h"
#include <SDL2/SDL.h>
#include <imgui/imgui.h>
#include <imgui/imgui_internal.h>
#include "core/renderer.h"
#include "core/window.h"
#include "editor/editor.h"
namespace yaze {
namespace Application {
namespace Core {
bool Controller::isActive() const { return active; }
bool Controller::isActive() const { return active_; }
void Controller::onEntry() noexcept(false) {
window.Create();
renderer.Create(window.Get());
void Controller::onEntry() {
window_.Create();
renderer_.Create(window_.Get());
ImGuiIO &io = ImGui::GetIO();
io.KeyMap[ImGuiKey_Backspace] = SDL_GetScancodeFromKey(SDLK_BACKSPACE);
io.KeyMap[ImGuiKey_Enter] = SDL_GetScancodeFromKey(SDLK_RETURN);
io.KeyMap[ImGuiKey_UpArrow] = SDL_GetScancodeFromKey(SDLK_UP);
io.KeyMap[ImGuiKey_DownArrow] = SDL_GetScancodeFromKey(SDLK_DOWN);
io.KeyMap[ImGuiKey_Tab] = SDL_GetScancodeFromKey(SDLK_TAB);
io.KeyMap[ImGuiKey_LeftCtrl] = SDL_GetScancodeFromKey(SDLK_LCTRL);
active = true;
active_ = true;
}
void Controller::onInput() {
@@ -55,7 +62,7 @@ void Controller::onInput() {
case SDL_WINDOWEVENT:
switch (event.window.event) {
case SDL_WINDOWEVENT_CLOSE:
active = false;
active_ = false;
break;
case SDL_WINDOWEVENT_SIZE_CHANGED:
io.DisplaySize.x = static_cast<float>(event.window.data1);
@@ -86,19 +93,19 @@ void Controller::onInput() {
io.MouseWheel = static_cast<float>(wheel);
}
void Controller::onLoad() { editor.UpdateScreen(); }
void Controller::onLoad() { editor_.UpdateScreen(); }
void Controller::doRender() {
SDL_Delay(10);
renderer.Render();
renderer_.Render();
}
void Controller::onExit() {
ImGui_ImplSDLRenderer_Shutdown();
ImGui_ImplSDL2_Shutdown();
ImGui::DestroyContext();
window.Destroy();
renderer.Destroy();
window_.Destroy();
renderer_.Destroy();
SDL_Quit();
}

View File

@@ -3,17 +3,12 @@
#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>
#include <imgui/imgui.h>
#include <imgui/imgui_internal.h>
#include <memory>
#include "Editor/Editor.h"
#include "Renderer.h"
#include "Window.h"
#include "imgui/backends/imgui_impl_sdl.h"
#include "imgui/backends/imgui_impl_sdlrenderer.h"
#include "imgui/imgui.h"
#include "imgui/imgui_internal.h"
#include "imgui/misc/cpp/imgui_stdlib.h"
#include "core/renderer.h"
#include "core/window.h"
#include "editor/editor.h"
int main(int argc, char** argv);
@@ -26,7 +21,6 @@ class Controller {
Controller() = default;
bool isActive() const;
void onEntry();
void onInput();
void onLoad();
@@ -34,12 +28,13 @@ class Controller {
void onExit();
private:
Window window;
Renderer renderer;
Editor::Editor editor;
bool active = false;
void quit() { active = false; }
inline void quit() { active_ = false; }
friend int ::main(int argc, char** argv);
bool active_;
Window window_;
Renderer renderer_;
Editor::Editor editor_;
};
} // namespace Core

View File

@@ -1,5 +1,13 @@
#include "Renderer.h"
#include <SDL2/SDL.h>
#include <imgui/backends/imgui_impl_sdl.h>
#include <imgui/backends/imgui_impl_sdlrenderer.h>
#include <imgui/imgui.h>
#include "graphics/icons.h"
#include "graphics/style.h"
namespace yaze {
namespace Application {
namespace Core {
@@ -29,7 +37,7 @@ void Renderer::Create(SDL_Window* window) {
// Load available fonts
const ImGuiIO& io = ImGui::GetIO();
io.Fonts->AddFontFromFileTTF("assets/Fonts/Karla-Regular.ttf", 14.0f);
io.Fonts->AddFontFromFileTTF("assets/Fonts/Karla-Regular.ttf", 14.0f);
// merge in icons from Google Material Design
static const ImWchar icons_ranges[] = {ICON_MIN_MD, 0xf900, 0};
@@ -42,10 +50,10 @@ void Renderer::Create(SDL_Window* window) {
icons_ranges);
io.Fonts->AddFontFromFileTTF("assets/Fonts/Roboto-Medium.ttf", 14.0f);
io.Fonts->AddFontFromFileTTF("assets/Fonts/Cousine-Regular.ttf", 14.0f);
io.Fonts->AddFontFromFileTTF("assets/Fonts/DroidSans.ttf", 16.0f);
io.Fonts->AddFontFromFileTTF("assets/Fonts/DroidSans.ttf", 16.0f);
Style::StyleColorsYaze();
// Set the default style
Style::ColorsYaze();
// Build a new ImGui frame
ImGui_ImplSDLRenderer_NewFrame();

View File

@@ -2,13 +2,12 @@
#define YAZE_APPLICATION_CORE_RENDERER_H
#include <SDL2/SDL.h>
#include "Graphics/Icons.h"
#include "Graphics/Style.h"
#include "imgui/backends/imgui_impl_sdl.h"
#include "imgui/backends/imgui_impl_sdlrenderer.h"
#include <imgui/backends/imgui_impl_sdl.h>
#include <imgui/backends/imgui_impl_sdlrenderer.h>
#include <imgui/imgui.h>
// #include "imgui/imgui_internal.h"
#include "graphics/icons.h"
#include "graphics/style.h"
namespace yaze {
namespace Application {

View File

@@ -1,11 +1,10 @@
#ifndef YAZE_APPLICATION_CONTROLLER_ENTRYPOINT_H
#define YAZE_APPLICATION_CONTROLLER_ENTRYPOINT_H
#include "Controller.h"
#include "controller.h"
int main(int argc, char** argv) {
yaze::Application::Core::Controller controller;
controller.onEntry();
while (controller.isActive()) {
controller.onInput();
@@ -13,7 +12,6 @@ int main(int argc, char** argv) {
controller.doRender();
}
controller.onExit();
return EXIT_SUCCESS;
}

View File

@@ -1,6 +1,6 @@
#include "Overworld.h"
#include "overworld.h"
#include "Graphics/Tile.h"
#include "graphics/tile.h"
namespace yaze {
namespace Application {

View File

@@ -1,16 +1,16 @@
#ifndef YAZE_APPLICATION_DATA_OVERWORLD_H
#define YAZE_APPLICATION_DATA_OVERWORLD_H
#include <memory>
#include <vector>
#include <rommapping.h>
#include "Core/Constants.h"
#include "Graphics/Bitmap.h"
#include "Graphics/Tile.h"
#include "OverworldMap.h"
#include <memory>
#include <vector>
#include "Data/ROM.h"
#include "core/constants.h"
#include "data/rom.h"
#include "graphics/bitmap.h"
#include "graphics/tile.h"
#include "overworld_map.h"
namespace yaze {
namespace Application {
@@ -40,9 +40,9 @@ class Overworld {
bool isLoaded = false;
byte mapParent[160];
ushort **allmapsTilesLW; // 64 maps * (32*32 tiles)
ushort **allmapsTilesDW; // 64 maps * (32*32 tiles)
ushort **allmapsTilesSP; // 32 maps * (32*32 tiles)
ushort** allmapsTilesLW; // 64 maps * (32*32 tiles)
ushort** allmapsTilesDW; // 64 maps * (32*32 tiles)
ushort** allmapsTilesSP; // 32 maps * (32*32 tiles)
std::vector<Graphics::Tile16> tiles16;
std::vector<Graphics::Tile32> tiles32;

View File

@@ -1,7 +1,7 @@
#include "OverworldMap.h"
#include "overworld_map.h"
#include "Data/ROM.h"
#include "Graphics/Tile.h"
#include "data/rom.h"
#include "graphics/tile.h"
namespace yaze {
namespace Application {

View File

@@ -1,8 +1,8 @@
#include <memory>
#include "Data/ROM.h"
#include "data/rom.h"
#include "Graphics/Bitmap.h"
#include "Graphics/Tile.h"
#include "graphics/tile.h"
#include "imgui/imgui.h"

View File

@@ -10,7 +10,7 @@
#include <vector>
#include "Core/Constants.h"
#include "Graphics/Tile.h"
#include "graphics/tile.h"
#include "compressions/alttpcompression.h"
#include "compressions/stdnintendo.h"
#include "rommapping.h"

View File

@@ -9,10 +9,10 @@
#include <memory>
#include "Core/Constants.h"
#include "Data/ROM.h"
#include "Graphics/Icons.h"
#include "OverworldEditor.h"
#include "Core/constants.h"
#include "Data/rom.h"
#include "Graphics/icons.h"
#include "overworld_editor.h"
namespace yaze {
namespace Application {

View File

@@ -1,4 +1,4 @@
#include "OverworldEditor.h"
#include "overworld_editor.h"
#include <imgui.h>
@@ -6,7 +6,7 @@
#include "Graphics/Bitmap.h"
#include "Graphics/Icons.h"
#include "Graphics/Tile.h"
#include "graphics/tile.h"
// first step would be to decompress all graphics data from the game
// (in alttp that's easy they're all located in the same location all the

View File

@@ -7,7 +7,7 @@
#include "Data/OW/Overworld.h"
#include "Graphics/Palette.h"
#include "Graphics/Scene.h"
#include "Graphics/Tile.h"
#include "graphics/tile.h"
namespace yaze {
namespace Application {

View File

@@ -1,6 +1,6 @@
#include "Bitmap.h"
#include "Data/ROM.h"
#include "data/rom.h"
#include "rommapping.h"
namespace yaze {

View File

@@ -8,7 +8,7 @@
#include <vector>
#include "Core/Renderer.h"
#include "Graphics/Tile.h"
#include "graphics/tile.h"
namespace yaze {
namespace Application {

View File

@@ -9,108 +9,11 @@ namespace Application {
namespace Core {
namespace Style {
inline static void StyleColorsYaze() {
ImGuiStyle *style = &ImGui::GetStyle();
ImVec4 *colors = style->Colors;
void ColorsYaze();
style->WindowPadding = ImVec2(10.f, 10.f);
style->FramePadding = ImVec2(10.f, 3.f);
style->CellPadding = ImVec2(4.f, 5.f);
style->ItemSpacing = ImVec2(10.f, 5.f);
style->ItemInnerSpacing = ImVec2(5.f, 5.f);
style->TouchExtraPadding = ImVec2(0.f, 0.f);
style->IndentSpacing = 20.f;
style->ScrollbarSize = 14.f;
style->GrabMinSize = 15.f;
style->WindowBorderSize = 0.f;
style->ChildBorderSize = 1.f;
style->PopupBorderSize = 1.f;
style->FrameBorderSize = 0.f;
style->TabBorderSize = 0.f;
style->WindowRounding = 0.f;
style->ChildRounding = 0.f;
style->FrameRounding = 5.4;
style->PopupRounding = 0.f;
style->ScrollbarRounding = 5.f;
ImVec4 alttpDarkGreen = ImVec4(0.18f, 0.26f, 0.18f, 1.0f);
ImVec4 alttpMidGreen = ImVec4(0.28f, 0.36f, 0.28f, 1.0f);
ImVec4 allttpLightGreen = ImVec4(0.36f, 0.45f, 0.36f, 1.0f);
ImVec4 allttpLightestGreen = ImVec4(0.49f, 0.57f, 0.49f, 1.0f);
colors[ImGuiCol_MenuBarBg] = alttpDarkGreen;
colors[ImGuiCol_TitleBg] = alttpMidGreen;
colors[ImGuiCol_Header] = alttpDarkGreen;
colors[ImGuiCol_HeaderHovered] = allttpLightGreen;
colors[ImGuiCol_HeaderActive] = alttpMidGreen;
colors[ImGuiCol_TitleBgActive] = alttpDarkGreen;
colors[ImGuiCol_TitleBgCollapsed] = alttpMidGreen;
colors[ImGuiCol_Tab] = alttpDarkGreen;
colors[ImGuiCol_TabHovered] = alttpMidGreen;
colors[ImGuiCol_TabActive] = ImLerp(colors[ImGuiCol_HeaderActive],
colors[ImGuiCol_TitleBgActive], 0.60f);
colors[ImGuiCol_Button] = alttpMidGreen;
colors[ImGuiCol_ButtonHovered] = allttpLightestGreen;
colors[ImGuiCol_ButtonActive] = allttpLightGreen;
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.36f, 0.45f, 0.36f, 0.60f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.36f, 0.45f, 0.36f, 0.30f);
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.36f, 0.45f, 0.36f, 0.40f);
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.36f, 0.45f, 0.36f, 0.60f);
colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.85f);
colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.11f, 0.11f, 0.14f, 0.92f);
colors[ImGuiCol_Border] = allttpLightGreen;
colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.43f, 0.43f, 0.43f, 0.39f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.28f, 0.36f, 0.28f, 0.40f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.28f, 0.36f, 0.28f, 0.69f);
colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f);
colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.36f, 0.45f, 0.36f, 0.60f);
colors[ImGuiCol_Separator] = ImVec4(0.50f, 0.50f, 0.50f, 0.60f);
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.60f, 0.60f, 0.70f, 1.00f);
colors[ImGuiCol_SeparatorActive] = ImVec4(0.70f, 0.70f, 0.90f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.10f);
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.78f, 0.82f, 1.00f, 0.60f);
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.78f, 0.82f, 1.00f, 0.90f);
colors[ImGuiCol_TabUnfocused] =
ImLerp(colors[ImGuiCol_Tab], colors[ImGuiCol_TitleBg], 0.80f);
colors[ImGuiCol_TabUnfocusedActive] =
ImLerp(colors[ImGuiCol_TabActive], colors[ImGuiCol_TitleBg], 0.40f);
colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
colors[ImGuiCol_TableHeaderBg] = alttpDarkGreen;
colors[ImGuiCol_TableBorderStrong] = alttpMidGreen;
colors[ImGuiCol_TableBorderLight] =
ImVec4(0.26f, 0.26f, 0.28f, 1.00f); // Prefer using Alpha=1.0 here
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.07f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
}
} // namespace Style
} // namespace Core
} // namespace Application
} // namespace yaze
} // namespace Style
} // namespace Core
} // namespace Application
} // namespace yaze
#endif

View File

@@ -0,0 +1,113 @@
#include "Style.h"
#include "imgui/imgui.h"
#include "imgui/imgui_internal.h"
namespace yaze {
namespace Application {
namespace Core {
namespace Style {
void ColorsYaze() {
ImGuiStyle *style = &ImGui::GetStyle();
ImVec4 *colors = style->Colors;
style->WindowPadding = ImVec2(10.f, 10.f);
style->FramePadding = ImVec2(10.f, 3.f);
style->CellPadding = ImVec2(4.f, 5.f);
style->ItemSpacing = ImVec2(10.f, 5.f);
style->ItemInnerSpacing = ImVec2(5.f, 5.f);
style->TouchExtraPadding = ImVec2(0.f, 0.f);
style->IndentSpacing = 20.f;
style->ScrollbarSize = 14.f;
style->GrabMinSize = 15.f;
style->WindowBorderSize = 0.f;
style->ChildBorderSize = 1.f;
style->PopupBorderSize = 1.f;
style->FrameBorderSize = 0.f;
style->TabBorderSize = 0.f;
style->WindowRounding = 0.f;
style->ChildRounding = 0.f;
style->FrameRounding = 5.4;
style->PopupRounding = 0.f;
style->ScrollbarRounding = 5.f;
ImVec4 alttpDarkGreen = ImVec4(0.18f, 0.26f, 0.18f, 1.0f);
ImVec4 alttpMidGreen = ImVec4(0.28f, 0.36f, 0.28f, 1.0f);
ImVec4 allttpLightGreen = ImVec4(0.36f, 0.45f, 0.36f, 1.0f);
ImVec4 allttpLightestGreen = ImVec4(0.49f, 0.57f, 0.49f, 1.0f);
colors[ImGuiCol_MenuBarBg] = alttpDarkGreen;
colors[ImGuiCol_TitleBg] = alttpMidGreen;
colors[ImGuiCol_Header] = alttpDarkGreen;
colors[ImGuiCol_HeaderHovered] = allttpLightGreen;
colors[ImGuiCol_HeaderActive] = alttpMidGreen;
colors[ImGuiCol_TitleBgActive] = alttpDarkGreen;
colors[ImGuiCol_TitleBgCollapsed] = alttpMidGreen;
colors[ImGuiCol_Tab] = alttpDarkGreen;
colors[ImGuiCol_TabHovered] = alttpMidGreen;
colors[ImGuiCol_TabActive] = ImLerp(colors[ImGuiCol_HeaderActive],
colors[ImGuiCol_TitleBgActive], 0.60f);
colors[ImGuiCol_Button] = alttpMidGreen;
colors[ImGuiCol_ButtonHovered] = allttpLightestGreen;
colors[ImGuiCol_ButtonActive] = allttpLightGreen;
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.36f, 0.45f, 0.36f, 0.60f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.36f, 0.45f, 0.36f, 0.30f);
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.36f, 0.45f, 0.36f, 0.40f);
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.36f, 0.45f, 0.36f, 0.60f);
colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.85f);
colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.11f, 0.11f, 0.14f, 0.92f);
colors[ImGuiCol_Border] = allttpLightGreen;
colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.43f, 0.43f, 0.43f, 0.39f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.28f, 0.36f, 0.28f, 0.40f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.28f, 0.36f, 0.28f, 0.69f);
colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f);
colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.36f, 0.45f, 0.36f, 0.60f);
colors[ImGuiCol_Separator] = ImVec4(0.50f, 0.50f, 0.50f, 0.60f);
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.60f, 0.60f, 0.70f, 1.00f);
colors[ImGuiCol_SeparatorActive] = ImVec4(0.70f, 0.70f, 0.90f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.10f);
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.78f, 0.82f, 1.00f, 0.60f);
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.78f, 0.82f, 1.00f, 0.90f);
colors[ImGuiCol_TabUnfocused] =
ImLerp(colors[ImGuiCol_Tab], colors[ImGuiCol_TitleBg], 0.80f);
colors[ImGuiCol_TabUnfocusedActive] =
ImLerp(colors[ImGuiCol_TabActive], colors[ImGuiCol_TitleBg], 0.40f);
colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
colors[ImGuiCol_TableHeaderBg] = alttpDarkGreen;
colors[ImGuiCol_TableBorderStrong] = alttpMidGreen;
colors[ImGuiCol_TableBorderLight] =
ImVec4(0.26f, 0.26f, 0.28f, 1.00f); // Prefer using Alpha=1.0 here
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.07f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
}
} // namespace Style
} // namespace Core
} // namespace Application
} // namespace yaze

View File

@@ -5,8 +5,8 @@ find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
# gui libraries ---------------------------------------------------------------------------------------------------
set(IMGUI_PATH "Library/imgui") # Set where the ImGui files are stored
file(GLOB IMGUI_SOURCES ${IMGUI_PATH}/*.cpp) # Compile as static library
set(IMGUI_PATH "Library/imgui")
file(GLOB IMGUI_SOURCES ${IMGUI_PATH}/*.cpp)
add_library("ImGui" STATIC ${IMGUI_SOURCES})
target_include_directories("ImGui" PUBLIC ${IMGUI_PATH})
target_include_directories(ImGui PUBLIC ${SDL2_INCLUDE_DIR})
@@ -34,18 +34,19 @@ add_library("NintendoCompression" STATIC ${SNESHACKING_SOURCES})
add_executable(
yaze
yaze.cc
Application/Core/Controller.cc
Application/Core/Renderer.cc
Application/Core/Window.cc
Application/Data/ROM.cc
Application/Data/OW/Overworld.cc
Application/Data/OW/OverworldMap.cc
Application/Graphics/Bitmap.cc
Application/Graphics/Tile.cc
Application/Graphics/Palette.cc
Application/Graphics/Scene.cc
Application/Editor/Editor.cc
Application/Editor/OverworldEditor.cc
Application/Core/controller.cc
Application/Core/renderer.cc
Application/Core/window.cc
Application/Data/rom.cc
Application/Data/OW/overworld.cc
Application/Data/OW/overworld_map.cc
Application/Graphics/bitmap.cc
Application/Graphics/tile.cc
Application/Graphics/palette.cc
Application/Graphics/style.cc
Application/Graphics/scene.cc
Application/Editor/editor.cc
Application/Editor/overworld_editor.cc
# GUI libraries
${IMGUI_PATH}/imgui.cpp
${IMGUI_PATH}/imgui_demo.cpp
@@ -92,6 +93,13 @@ target_link_libraries(
NintendoCompression
)
set_target_properties(yaze
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
set (source "${CMAKE_SOURCE_DIR}/assets")
set (destination "${CMAKE_CURRENT_BINARY_DIR}/assets")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD

View File

@@ -14,7 +14,7 @@
#include <unordered_map>
#include <unordered_set>
#include "Application/Core/Controller.h"
#include "Application/Core/EntryPoint.h"
#include "Application/Core/controller.h"
#include "Application/Core/entry_point.h"
#endif // YAZE_YAZE_H