Add project files.
This commit is contained in:
commit
a9ae435321
52 files changed
+65378
No files matched your search
@@ -0,0 +1,39 @@
|
||||
// Hammer++ - map editor built on raylib + Dear ImGui (rlImGui) + libhmap.
|
||||
#include "editor.h"
|
||||
#include "imgui.h"
|
||||
#include "raylib.h"
|
||||
#include "rlImGui.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_VSYNC_HINT | FLAG_MSAA_4X_HINT);
|
||||
InitWindow(1600, 900, "Hammer++");
|
||||
SetWindowMinSize(960, 600);
|
||||
SetExitKey(KEY_NULL); // Esc cancels tools instead of quitting
|
||||
|
||||
rlImGuiSetup(true);
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
#ifdef IMGUI_HAS_DOCK
|
||||
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||
#endif
|
||||
io.IniFilename = "hammerpp.ini";
|
||||
io.ConfigWindowsMoveFromTitleBarOnly = true;
|
||||
hpp::applyTheme();
|
||||
|
||||
hpp::Editor editor;
|
||||
editor.init();
|
||||
if (argc > 1) editor.openMap(argv[1]);
|
||||
|
||||
while (!WindowShouldClose() && !editor.wantQuit) {
|
||||
BeginDrawing();
|
||||
ClearBackground(Color{20, 22, 27, 255});
|
||||
rlImGuiBegin();
|
||||
editor.frame();
|
||||
rlImGuiEnd();
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
editor.shutdown();
|
||||
rlImGuiShutdown();
|
||||
CloseWindow();
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user