Update to latest json library. Test build of refactored code.

This commit is contained in:
2025-07-04 10:50:44 -04:00
parent d79c47a828
commit 5d404ea079
7 changed files with 12 additions and 11 deletions

View File

@@ -147,11 +147,14 @@ int EditorApp::CellToIndex(Vector2i cell, int width)
return cell.y*width + cell.x;
}
EditorApp::EditorApp(): OpenGLWindow("Editor App", 1776, 1000, GL_VER_MAJOR, GL_VER_MINOR)
EditorApp::EditorApp(int width, int height) : OpenGLWindow("Editor App", width, height, GL_VER_MAJOR, GL_VER_MINOR)
{
camera.DefaultState();
}
EditorApp::EditorApp(): EditorApp(1024, 600) {}
void EditorApp::LoadPreferences()
{
if (std::filesystem::exists("preferences.json"))

View File

@@ -1,4 +1,5 @@
#include <Format/Level.hpp>
#include <Colors.hpp>
Level::Level(): rows(0), cols(0)

View File

@@ -1,6 +1,7 @@
#include <Colors.hpp>
#include <Re2DLevelAPI.hpp>
#include <fstream>
#include <json.hpp>
Color4 JsonConversions::parse_color(const json::value& v)
@@ -14,7 +15,7 @@ Color4 JsonConversions::parse_color(const json::value& v)
int g = color_array[1].number.value();
int b = color_array[2].number.value();
int a = 255;
if (color_array.value::array.value().size() == 4)
if (color_array.size() == 4)
a = color_array[3].number.value();
return Color4(r, g, b, a);
}