refactor pt 1; getting each thing right and then will push to main

This commit is contained in:
2025-09-19 17:57:48 -04:00
parent 9a6810d1bb
commit dbb6d13f34
37 changed files with 7313 additions and 8950 deletions

View File

@@ -2,35 +2,31 @@
#include "anm2.h"
#include "preview.h"
#include "texture.h"
#define SNAPSHOT_STACK_MAX 100
#define SNAPSHOT_ACTION "Action"
struct Snapshot
{
Anm2 anm2;
Anm2Reference reference;
f32 time = 0.0f;
std::string action = SNAPSHOT_ACTION;
struct Snapshot {
Anm2 anm2;
Anm2Reference reference;
float time = 0.0f;
std::string action = SNAPSHOT_ACTION;
};
struct SnapshotStack
{
Snapshot snapshots[SNAPSHOT_STACK_MAX];
s32 top = 0;
struct SnapshotStack {
Snapshot snapshots[SNAPSHOT_STACK_MAX];
int top = 0;
bool is_empty() const { return top == 0; }
bool is_empty() const { return top == 0; }
};
struct Snapshots
{
Anm2* anm2 = nullptr;
Preview* preview = nullptr;
Anm2Reference* reference = nullptr;
std::string action = SNAPSHOT_ACTION;
SnapshotStack undoStack;
SnapshotStack redoStack;
struct Snapshots {
Anm2* anm2 = nullptr;
Preview* preview = nullptr;
Anm2Reference* reference = nullptr;
std::string action = SNAPSHOT_ACTION;
SnapshotStack undoStack;
SnapshotStack redoStack;
};
void snapshots_undo_push(Snapshots* self, Snapshot* snapshot);