Commit Graph
72 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 4c569cb1e5 Stage 10a: delete dead code, merge tiny files, unify duplicated concepts
- Dead code: util/map, util/unordered_map, unused vector/math/string/input
  helpers, Document getters, special-interpolation bake leftovers,
  triggers_sort, SnapshotStack::max_size_get, AudioStream capture API.
- Merges: util/xml, util/string, resource/strings.cpp inlined; constants
  into input.hpp; tooltip into layout; Recorder into render; onionskin,
  tools, welcome and frame properties are panel functions; timeline
  popups.cpp folded into timeline.cpp.
- util/origin.hpp replaced by model Origin (the merge setting stays a
  combo index, so saved preferences keep their meaning).
- Item type names/icons/colors moved from model/common.hpp to the
  timeline header; the model no longer includes icon/strings headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:35:22 -04:00
shweetandClaude Opus 5.5 d08f59d7ba Stage 8a: panels as plain functions; content selection on the uid Selection
- New panel kit (imgui/window/panel.*): list/card drawing with multi-select,
  rename, arrow keys, drag hooks and tooltips; a list panel helper for the
  context menu, shortcuts and footer; panels build their Actions inline.
- Layers, nulls, events, sounds, spritesheets, regions, shaders and
  animations are plain functions over a small persistent state struct.
- Content items are selected by uid in the shared Selection (one kind per
  content type, plus a focus per kind); regions are those of the focused
  spritesheet. Selection survives undo, paste and removal like the timeline's.
- Combo labels are computed when drawn (Document::choices_get).
- Deletes the Window callback framework, WINDOW_FLAGS, Storage and the
  per-window selection snapshot fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:47:21 -04:00
shweetandClaude Opus 5.5 e50d76c784 Stage 7b: model/xml.cpp reads and writes tinyxml2 directly; Element tree removed
- Reading goes from tinyxml2 straight into the typed model, including legacy
  layouts (flat GroupId groups, *AnimationGroups with Index, FrameRestore
  backups, baked frames, SoundId, Overlay) and load-time id/region repair.
- Writing builds an XmlNode tree from the typed model for a set of flags:
  id renumbering, region sync, group-root and interpolation baking happen on
  typed data; groups are nested or extracted the way the old pipeline did.
- Unknown XML is kept verbatim (XmlNode) instead of being re-emitted through
  the Element writer.
- model_hash is an FNV hash of the editor-format node tree (what a save would
  write); the per-fixture hash goldens are gone.
- Deletes src/anm2 (Element, normalize, groups, hash, xml) and the unused
  util/xml attribute helpers and ElementType/ItemType table columns.
- All goldens, invariants and the local corpus are byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:20:45 -04:00
shweetandClaude Opus 5.5 0b6f67d9bd Stage 7: typed model; Element tree is internal to model/xml.cpp
- src/model: typed Model (Info, Content, nested TrackGroup/AnimationGroup,
  copy-on-write shared animations, Extras/XmlNode passthrough for unknown XML,
  layout vectors so saves stay byte-identical).
- src/edit, Document, Selection, Snapshots, every window, the timeline, wizards
  and popups now read and edit model::Model; no UI code touches Element.
- anm2/ is reduced to the XML reader/writer/normalizer behind model/xml.cpp;
  dead Element operations (merge, regions, item_add, rect, frame helpers,
  element_get/unused, deserialize) are deleted.
- Goldens, invariants, undo walk and the local corpus (1,251 files) match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 16:53:17 -04:00
shweetandClaude Opus 5.5 9f43a210c5 Stage 5: content-hash AssetStore; undo records asset keys, not pixels
- resource::AssetStore (core) keeps immutable images and sounds keyed by content
  hash for the life of the document; nothing is purged until it closes.
- Undo state holds spritesheet/sound id -> asset key maps (always tracked), so
  every edit can undo texture changes; the textures-only snapshot flag
  (edit_begin(label, true) / push(message, isTextures)) and the pixel/audio
  equality helpers are gone.
- Document::texture_get/sound_get read through the store; texture_set/sound_set
  add assets; texture_edit gives the pencil a private draft that becomes a new
  asset on the next change().
- Spritesheet dirty state compares path + asset key instead of hashing pixels.
- Preview audio reads sounds through the store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:53:34 -04:00
shweetandClaude Opus 5.5 65a3546c3b Stage 4: one uid-based Selection for the timeline and animations list
- Selection { map<kind, set<uid>> uids; Handle focus; } (src/selection.*, core)
  replaces Document::reference, the frames/items/animation Storages,
  groupReferences, and the timeline's selection snapshot/lock/focus state.
- Because selection is by uid it follows elements through edits by itself;
  after an edit or undo, selection_follow only drops removed uids and moves a
  removed focus to its nearest survivor. The Stage 2 handle capture/re-resolve,
  frames_reference_normalize_for, frames_selection_sync_for and the index-based
  frame validity repair are gone.
- Document keeps a UidIndex (rebuilt on every change) and exposes
  reference_get/reference_set, selected_get/selected_set(kind),
  frame_references_get/set and animations_selected_get/set.
- UidIndex records each uid's element type.
- The animations list keeps its ImGui multi-select Storage as a per-frame mirror
  of the Selection; content windows are unchanged until Stage 8.
- tests/selection.cpp and tests/undo.cpp cover selection through inserts,
  reverses, deletes, item and animation removal, regrouping and undo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:46:47 -04:00
shweetandClaude Opus 5.5 700b613c62 Stage 3: operations layer (src/edit) and one undo entry point
- src/edit/ (in anm2ed_core): frame, track, animation, region, grid and
  change-all edits as plain functions of the model. Each returns the uids of what
  it created for the UI to select; copies get fresh uids.
- Document::edit_apply snapshots, runs an operation and commits; edit_begin
  starts drag edits. window_edit, edit_command_push, snapshot_command_push,
  SnapshotKind and the tracks/frames/regions/textures snapshot kinds are gone;
  Snapshots has a single push(message, isTextures).
- Timeline, animations, regions, shaders, items, wizards, taskbar and file merge
  call the edit layer; they keep only selection, scrolling and toasts.
- Snapshots, Storage, Playback and ImGui core build into anm2ed_core, so undo is
  testable: tests/undo.cpp runs a seeded random walk of edits per fixture and
  checks every undo/redo state by hash, plus selection follow through undo.
- types::edit renamed types::edit_state (clashed with the edit namespace).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:26:53 -04:00
shweetandClaude Opus 5.5 26ab394fe4 Stage 1: headless Image and AudioData; GPU and playback caches in the UI
- resource::Image (pixels, size, uid) replaces Texture in documents, undo and
  wizards; it lives in anm2ed_core with no GL. uid changes with the pixels.
- resource::texture::id_get uploads lazily and evicts textures not drawn in a frame
- resource::AudioData (bytes, uid) replaces Audio; resource::audio::play/stop/
  track_detach/is_playing cache decoded audio and tracks per uid
- Resources::icon_id_get shortens the icon call sites
- tests/assets.cpp covers Image png round trip, uid tracking, merge_append

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 14:52:34 -04:00
shweetandClaude Opus 5.5 8953101245 Stage 0: continuity test suite
- anm2ed_core static library (anm2 + non-UI util + log) shared by app and tests
- Logger is inert until session_open, so the core has no SDL dependency
- doctest suite: golden round-trips of 12 synthetic fixtures across every
  serialization preset, format and merge type; save/reload invariants
  (fixed point, hash stability, game view equals re-baked game view);
  operation goldens; env-gated private corpus run (ANM2ED_CORPUS)
- ANM2ED_UPDATE_GOLDEN=1 regenerates goldens; tests/MANUAL.md UI checklist

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 14:34:31 -04:00
shweetandClaude Opus 5.5 41ed347925 Split anm2 and timeline into modules; merge groups by name
Baseline before de-bloat refactor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 12:41:23 -04:00
shweet 1bc5199e3b Holy vibecode Batman! 2026-05-21 21:00:57 -04:00
shweet 8f72f0aef5 autosave fix + item properties change 2026-05-11 23:33:39 -04:00
shweet e9deac2f38 anm2 experiments 2026-04-24 13:44:33 -04:00
shweet b60c4bc295 I N T E R P O L A T I O N 2026-04-14 14:28:14 -04:00
shweet c11b404392 let's actually stage those changes... 2026-03-09 23:09:37 -04:00
shweet 1b7a49c25d regions and a whole bunch of other shit 2026-01-30 01:13:28 -05:00
shweet 044ef8b818 remove unused fix 2026-01-18 16:32:33 -05:00
shweet 3117f190a5 windows dumps... 2026-01-11 18:12:28 -05:00
shweet 29abbb79fb cmakelists fix 2026-01-11 17:25:42 -05:00
shweet a39a816ea9 update cmake 2026-01-11 13:13:45 -05:00
shweet 5539b73374 temp font fix for now 2025-12-28 16:32:08 -05:00
shweet 119bbc4081 Refactor + render animation tweaks + updated frame properties + bug fixes 2025-12-17 23:02:00 -05:00
shweet 8c198d97e5 manifest was a failed experiment 2025-12-01 21:13:58 -05:00
shweet 193c434137 d 2025-12-01 21:03:05 -05:00
shweet c4b4e78fe2 c 2025-12-01 20:49:05 -05:00
shweet cef4af5c1e kill me 2025-12-01 20:48:19 -05:00
shweet d81e68a925 b 2025-12-01 20:44:31 -05:00
shweet 10e2e70244 apparently this will allow for utf-8? 2025-12-01 20:42:47 -05:00
shweet 63c170adbb ehh?? 2025-11-30 23:05:46 -05:00
shweet 294ccd4884 eh? 2025-11-30 23:04:32 -05:00
shweet 04cb191c42 sdl/sdl mixer backends 2025-11-30 22:55:55 -05:00
shweet 131934df1a Fixed issues with renaming/synchronizing state 2025-11-16 00:11:27 -05:00
shweet a7c0698a93 ................................................................................................................................................................................................................................Anm2Ed 2.0 2025-11-13 22:46:34 -05:00
shweet 57b2e3aa4c . 2025-11-11 22:49:06 -05:00
shweet 7de716a6f2 sure? 2025-11-11 22:46:15 -05:00
shweet 38b92a588f opengl! 2025-11-11 22:42:46 -05:00
shweet 2202cdff3a one last thing... 2025-11-11 22:09:44 -05:00
shweet 0ce567c282 nvm fuck libxm, fuck msvc, fuck bill gates and fuck (You) 2025-11-11 22:01:30 -05:00
shweet a2a33e471d aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2025-11-11 20:33:28 -05:00
shweet 24465f29c5 uuuuuuuuuuuuuggggggggggggggggghhhhhhhhhhhhhhhhhh 2025-11-11 20:28:31 -05:00
shweet 9eb0bfffce oops 2025-11-11 18:45:14 -05:00
shweet a01b5ec4eb this might work for libxm 2025-11-11 18:45:03 -05:00
shweet bff73c8936 fix cimpile commands 2025-11-11 18:35:34 -05:00
shweet 7733cb2883 libxm fix? 2025-11-11 16:44:25 -05:00
shweet d9a05947c0 more minor polish there and here 2025-11-11 16:07:02 -05:00
shweet 07096c487b fuck git and fuck vs code 2025-11-11 11:25:46 -05:00
shweet e2799b1e58 timeline refactor, bit broken rn 2025-11-09 10:35:21 -05:00
shweet 62cd94ca78 Big refactor, shuffling a lot of files around 2025-11-01 19:51:19 -04:00
shweet 729d5fb216 Autosave feature, spritesheet editor dashed lines, refactoring, fixes 2025-10-28 15:47:54 -04:00
shweet 5b0f9a39c4 Refactor... 2025-10-21 20:23:27 -04:00