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>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-03 15:53:34 -04:00
1 parent 65a3546c3b
commit 9f43a210c5
13 files changed
+195 -130

No files matched your search

+1 -1
View File
@@ -109,7 +109,7 @@ file(GLOB PROJECT_SRC CONFIGURE_DEPENDS
set(CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
file(GLOB CORE_SRC CONFIGURE_DEPENDS ${CORE_DIR}/anm2/*.cpp ${CORE_DIR}/edit/*.cpp)
foreach(CORE_FILE log resource/strings resource/image resource/audio_data util/file util/path util/math util/string util/time util/working_directory
foreach(CORE_FILE log resource/strings resource/image resource/audio_data resource/asset_store util/file util/path util/math util/string util/time util/working_directory
util/xml util/pack util/imgui/multiselect snapshots storage playback selection)
list(APPEND CORE_SRC ${CORE_DIR}/${CORE_FILE}.cpp)
endforeach()