From e4f6da650ef07908c390800469f366ecbfe82022 Mon Sep 17 00:00:00 2001 From: shweet Date: Sun, 29 Jun 2025 00:53:26 -0400 Subject: [PATCH] woopsies --- src/imgui.cpp | 8 +++++--- src/imgui.h | 6 +++--- src/snapshots.cpp | 7 +++++-- src/snapshots.h | 8 ++++---- src/state.cpp | 2 +- src/state.h | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/imgui.cpp b/src/imgui.cpp index 75a9129..77eab12 100644 --- a/src/imgui.cpp +++ b/src/imgui.cpp @@ -1842,7 +1842,7 @@ imgui_init Preview* preview, Settings* settings, Tool* tool, - UndoStack* undoStack, + Snapshots* snapshots, SDL_Window* window, SDL_GLContext* glContext ) @@ -1860,7 +1860,7 @@ imgui_init self->preview = preview; self->settings = settings; self->tool = tool; - self->undoStack = undoStack; + self->snapshots = snapshots; self->window = window; self->glContext = glContext; @@ -1926,8 +1926,10 @@ imgui_tick(Imgui* self) _imgui_taskbar(self); _imgui_dock(self); + /* if (key_press(&self->input->keyboard, INPUT_KEYS[INPUT_UNDO])) - undo_stack_pop(self->undoStack, self->anm2); + undo_stack_pop(self->snapshots, self->anm2); + */ } void diff --git a/src/imgui.h b/src/imgui.h index 7256107..96a3997 100644 --- a/src/imgui.h +++ b/src/imgui.h @@ -7,8 +7,8 @@ #include "window.h" #include "input.h" #include "settings.h" +#include "snapshots.h" #include "tool.h" -#include "undo_stack.h" #define IMGUI_IMPL_OPENGL_LOADER_CUSTOM #define IMGUI_ENABLE_DOCKING @@ -101,7 +101,7 @@ struct Imgui Preview* preview = NULL; Settings* settings = NULL; Tool* tool = NULL; - UndoStack* undoStack = NULL; + Snapshots* snapshots = NULL; SDL_Window* window = NULL; SDL_GLContext* glContext = NULL; bool isSwap = false; @@ -123,7 +123,7 @@ imgui_init Preview* preview, Settings* settings, Tool* tool, - UndoStack* undoStack, + Snapshots* snapshots, SDL_Window* window, SDL_GLContext* glContext ); diff --git a/src/snapshots.cpp b/src/snapshots.cpp index 689f8d9..7296bef 100644 --- a/src/snapshots.cpp +++ b/src/snapshots.cpp @@ -1,5 +1,7 @@ -#include "undo_stack.h" +#include "snapshots.h" +/* TODO */ +/* void undo_stack_push(Snapshots* self, Anm2* anm2) { @@ -21,4 +23,5 @@ undo_stack_pop(Snapshots* self, Anm2* anm2) *anm2 = self->snapshots[--self->top]; return true; -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/src/snapshots.h b/src/snapshots.h index 1ce90ef..4f45812 100644 --- a/src/snapshots.h +++ b/src/snapshots.h @@ -14,9 +14,9 @@ struct Snapshots { SnapshotStack undoStack; SnapshotStack redoStack; -} - - +}; +/* void undo_stack_push(UndoStack* self, Anm2* anm2); -bool undo_stack_pop(UndoStack* self, Anm2* anm2); \ No newline at end of file +bool undo_stack_pop(UndoStack* self, Anm2* anm2); +*/ \ No newline at end of file diff --git a/src/state.cpp b/src/state.cpp index 4674229..7270983 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -143,7 +143,7 @@ init(State* state) &state->preview, &state->settings, &state->tool, - &state->undoStack, + &state->snapshots, state->window, &state->glContext ); diff --git a/src/state.h b/src/state.h index 65245be..49e28af 100644 --- a/src/state.h +++ b/src/state.h @@ -22,7 +22,7 @@ struct State Resources resources; Settings settings; Tool tool; - UndoStack undoStack; + Snapshots snapshots; bool isArgument = false; bool isRunning = true; char argument[PATH_MAX] = STRING_EMPTY;