52 lines
1022 B
C++
52 lines
1022 B
C++
#include <ReWindow/types/Window.h>
|
|
|
|
#include "ReWindow/Logger.h"
|
|
#include <Format/Level.hpp>
|
|
#include <JGL/JGL.h>
|
|
#include <JUI/Widgets/FpsGraph.hpp>
|
|
#include <JUI/Widgets/Scene.hpp>
|
|
#include <JUI/Widgets/Window.hpp>
|
|
#include <SimpleAABBSolver.hpp>
|
|
|
|
#include "Editor/EditorCamera.hpp"
|
|
#include "JUI/Widgets/ListLayout.hpp"
|
|
#include "JUI/Widgets/Slider.hpp"
|
|
|
|
#include <DemoGame/TestGameApp.hpp>
|
|
|
|
template <typename T>
|
|
struct Range {
|
|
T min;
|
|
T max;
|
|
};
|
|
|
|
template <typename T>
|
|
T map(T value, T in_min, T in_max, T out_min, T out_max) {
|
|
return (value - in_min) / (in_max - in_min) * (out_max - out_min) + out_min;
|
|
}
|
|
|
|
template <typename T>
|
|
T map(T value, const Range<T>& in, const Range<T>& out) {
|
|
return map(value, in.min, in.max, out.min, out.max);
|
|
}
|
|
|
|
int main()
|
|
{
|
|
|
|
ReWindow::Logger::Debug.EnableConsole(false);
|
|
|
|
TestGame::TestGameAppWindow* app = new TestGame::TestGameAppWindow();
|
|
|
|
bool success = app->Open();
|
|
|
|
if (!success)
|
|
return -1;
|
|
|
|
while (app->IsOpen())
|
|
app->ManagedRefresh();
|
|
|
|
app->Close();
|
|
|
|
return 0;
|
|
|
|
} |