let's actually stage those changes...

This commit is contained in:
2026-03-09 23:09:37 -04:00
parent 2d27b7e8fb
commit c11b404392
127 changed files with 1200 additions and 427 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#include "dockspace.h"
#include "dockspace.hpp"
namespace anm2ed::imgui
{
+16 -16
View File
@@ -1,21 +1,21 @@
#pragma once
#include "documents.h"
#include "taskbar.h"
#include "window/animation_preview.h"
#include "window/animations.h"
#include "window/regions.h"
#include "window/events.h"
#include "window/frame_properties.h"
#include "window/layers.h"
#include "window/nulls.h"
#include "window/onionskin.h"
#include "window/sounds.h"
#include "window/spritesheet_editor.h"
#include "window/spritesheets.h"
#include "window/timeline.h"
#include "window/tools.h"
#include "window/welcome.h"
#include "documents.hpp"
#include "taskbar.hpp"
#include "window/animation_preview.hpp"
#include "window/animations.hpp"
#include "window/regions.hpp"
#include "window/events.hpp"
#include "window/frame_properties.hpp"
#include "window/layers.hpp"
#include "window/nulls.hpp"
#include "window/onionskin.hpp"
#include "window/sounds.hpp"
#include "window/spritesheet_editor.hpp"
#include "window/spritesheets.hpp"
#include "window/timeline.hpp"
#include "window/tools.hpp"
#include "window/welcome.hpp"
namespace anm2ed::imgui
{
+6 -6
View File
@@ -1,13 +1,13 @@
#include "documents.h"
#include "documents.hpp"
#include <format>
#include <vector>
#include "path_.h"
#include "strings.h"
#include "time_.h"
#include "toast.h"
#include "log.h"
#include "path_.hpp"
#include "strings.hpp"
#include "time_.hpp"
#include "toast.hpp"
#include "log.hpp"
using namespace anm2ed::resource;
using namespace anm2ed::types;
+5 -5
View File
@@ -1,10 +1,10 @@
#pragma once
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "strings.h"
#include "taskbar.h"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
#include "strings.hpp"
#include "taskbar.hpp"
namespace anm2ed::imgui
{
+3 -3
View File
@@ -6,9 +6,9 @@
#include <sstream>
#include <unordered_map>
#include "imgui_.h"
#include "path_.h"
#include "strings.h"
#include "imgui_.hpp"
#include "path_.hpp"
#include "strings.hpp"
using namespace anm2ed::types;
using namespace anm2ed::util;
+2 -2
View File
@@ -8,8 +8,8 @@
#include <unordered_map>
#include <vector>
#include "strings.h"
#include "types.h"
#include "strings.hpp"
#include "types.hpp"
namespace anm2ed::imgui
{
+7 -7
View File
@@ -1,4 +1,4 @@
#include "taskbar.h"
#include "taskbar.hpp"
#include <filesystem>
#include <format>
@@ -7,12 +7,12 @@
#include <imgui/imgui.h>
#include "document.h"
#include "log.h"
#include "path_.h"
#include "strings.h"
#include "toast.h"
#include "types.h"
#include "document.hpp"
#include "log.hpp"
#include "path_.hpp"
#include "strings.hpp"
#include "toast.hpp"
#include "types.hpp"
using namespace anm2ed::resource;
using namespace anm2ed::types;
+12 -12
View File
@@ -1,18 +1,18 @@
#pragma once
#include "canvas.h"
#include "dialog.h"
#include "imgui_.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "strings.h"
#include "canvas.hpp"
#include "dialog.hpp"
#include "imgui_.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
#include "strings.hpp"
#include "wizard/about.h"
#include "wizard/change_all_frame_properties.h"
#include "wizard/configure.h"
#include "wizard/generate_animation_from_grid.h"
#include "wizard/render_animation.h"
#include "wizard/about.hpp"
#include "wizard/change_all_frame_properties.hpp"
#include "wizard/configure.hpp"
#include "wizard/generate_animation_from_grid.hpp"
#include "wizard/render_animation.hpp"
namespace anm2ed::imgui
{
+3 -3
View File
@@ -1,9 +1,9 @@
#include "toast.h"
#include "toast.hpp"
#include "log.h"
#include "log.hpp"
#include <imgui/imgui.h>
#include "types.h"
#include "types.hpp"
using namespace anm2ed::types;
+18 -13
View File
@@ -1,4 +1,4 @@
#include "animation_preview.h"
#include "animation_preview.hpp"
#include <algorithm>
#include <chrono>
@@ -10,14 +10,14 @@
#include <glm/gtc/type_ptr.hpp>
#include "imgui_.h"
#include "log.h"
#include "math_.h"
#include "path_.h"
#include "strings.h"
#include "toast.h"
#include "tool.h"
#include "types.h"
#include "imgui_.hpp"
#include "log.hpp"
#include "math_.hpp"
#include "path_.hpp"
#include "strings.hpp"
#include "toast.hpp"
#include "tool.hpp"
#include "types.hpp"
using namespace anm2ed::types;
using namespace anm2ed::util;
@@ -265,11 +265,16 @@ namespace anm2ed::imgui
{
if (auto trigger = animation->triggers.frame_generate(playback.time, anm2::TRIGGER); trigger.isVisible)
{
auto soundID = trigger.soundIDs.size() > 1
? (int)trigger.soundIDs[math::random_in_range(0, trigger.soundIDs.size())]
: (int)trigger.soundIDs.front();
if (!trigger.soundIDs.empty())
{
auto soundIndex = trigger.soundIDs.size() > 1
? (size_t)math::random_in_range(0.0f, (float)trigger.soundIDs.size())
: (size_t)0;
soundIndex = std::min(soundIndex, trigger.soundIDs.size() - 1);
auto soundID = trigger.soundIDs[soundIndex];
if (anm2.content.sounds.contains(soundID)) anm2.content.sounds[soundID].audio.play(false, mixer);
if (anm2.content.sounds.contains(soundID)) anm2.content.sounds[soundID].audio.play(false, mixer);
}
}
}
}
+5 -5
View File
@@ -2,11 +2,11 @@
#include <filesystem>
#include "audio_stream.h"
#include "canvas.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "audio_stream.hpp"
#include "canvas.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+5 -5
View File
@@ -1,12 +1,12 @@
#include "animations.h"
#include "animations.hpp"
#include <format>
#include <ranges>
#include "log.h"
#include "strings.h"
#include "toast.h"
#include "vector_.h"
#include "log.hpp"
#include "strings.hpp"
#include "toast.hpp"
#include "vector_.hpp"
using namespace anm2ed::util;
using namespace anm2ed::resource;
+5 -5
View File
@@ -1,10 +1,10 @@
#pragma once
#include "clipboard.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "strings.h"
#include "clipboard.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
#include "strings.hpp"
namespace anm2ed::imgui
{
+5 -5
View File
@@ -1,11 +1,11 @@
#include "events.h"
#include "events.hpp"
#include <ranges>
#include "log.h"
#include "map_.h"
#include "strings.h"
#include "toast.h"
#include "log.hpp"
#include "map_.hpp"
#include "strings.hpp"
#include "toast.hpp"
using namespace anm2ed::util;
using namespace anm2ed::resource;
+4 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "clipboard.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "clipboard.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+4 -4
View File
@@ -1,13 +1,13 @@
#include "frame_properties.h"
#include "frame_properties.hpp"
#include <glm/gtc/type_ptr.hpp>
#include <limits>
#include <ranges>
#include <vector>
#include "math_.h"
#include "strings.h"
#include "types.h"
#include "math_.hpp"
#include "strings.hpp"
#include "types.hpp"
using namespace anm2ed::util::math;
using namespace anm2ed::types;
+2 -2
View File
@@ -2,8 +2,8 @@
#include <glm/vec2.hpp>
#include "manager.h"
#include "wizard/change_all_frame_properties.h"
#include "manager.hpp"
#include "wizard/change_all_frame_properties.hpp"
namespace anm2ed::imgui
{
+5 -5
View File
@@ -1,11 +1,11 @@
#include "layers.h"
#include "layers.hpp"
#include <ranges>
#include "log.h"
#include "map_.h"
#include "strings.h"
#include "toast.h"
#include "log.hpp"
#include "map_.hpp"
#include "strings.hpp"
#include "toast.hpp"
using namespace anm2ed::util;
using namespace anm2ed::resource;
+4 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "clipboard.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "clipboard.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+5 -5
View File
@@ -1,11 +1,11 @@
#include "nulls.h"
#include "nulls.hpp"
#include <ranges>
#include "log.h"
#include "map_.h"
#include "strings.h"
#include "toast.h"
#include "log.hpp"
#include "map_.hpp"
#include "strings.hpp"
#include "toast.hpp"
using namespace anm2ed::resource;
using namespace anm2ed::util;
+4 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "clipboard.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "clipboard.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+3 -3
View File
@@ -1,9 +1,9 @@
#include "onionskin.h"
#include "onionskin.hpp"
#include <glm/gtc/type_ptr.hpp>
#include "imgui_.h"
#include "strings.h"
#include "imgui_.hpp"
#include "strings.hpp"
using namespace anm2ed::types;
using namespace glm;
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once
#include "manager.h"
#include "manager.hpp"
namespace anm2ed::imgui
{
+10 -10
View File
@@ -1,4 +1,4 @@
#include "regions.h"
#include "regions.hpp"
#include <algorithm>
#include <ranges>
@@ -6,16 +6,16 @@
#include <filesystem>
#include <format>
#include "document.h"
#include "log.h"
#include "map_.h"
#include "math_.h"
#include "path_.h"
#include "strings.h"
#include "toast.h"
#include "vector_.h"
#include "document.hpp"
#include "log.hpp"
#include "map_.hpp"
#include "math_.hpp"
#include "path_.hpp"
#include "strings.hpp"
#include "toast.hpp"
#include "vector_.hpp"
#include "../../util/map_.h"
#include "../../util/map_.hpp"
using namespace anm2ed::types;
using namespace anm2ed::resource;
+4 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "clipboard.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "clipboard.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+5 -5
View File
@@ -1,13 +1,13 @@
#include "sounds.h"
#include "sounds.hpp"
#include <algorithm>
#include <ranges>
#include <vector>
#include "log.h"
#include "path_.h"
#include "strings.h"
#include "toast.h"
#include "log.hpp"
#include "path_.hpp"
#include "strings.hpp"
#include "toast.hpp"
using namespace anm2ed::util;
using namespace anm2ed::types;
+5 -5
View File
@@ -1,10 +1,10 @@
#pragma once
#include "clipboard.h"
#include "dialog.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "clipboard.hpp"
#include "dialog.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+6 -6
View File
@@ -1,15 +1,15 @@
#include "spritesheet_editor.h"
#include "spritesheet_editor.hpp"
#include <cmath>
#include <format>
#include <utility>
#include "imgui_.h"
#include "imgui_.hpp"
#include "imgui_internal.h"
#include "math_.h"
#include "strings.h"
#include "tool.h"
#include "types.h"
#include "math_.hpp"
#include "strings.hpp"
#include "tool.hpp"
#include "types.hpp"
using namespace anm2ed::types;
using namespace anm2ed::resource;
+4 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "canvas.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "canvas.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+7 -7
View File
@@ -1,4 +1,4 @@
#include "spritesheets.h"
#include "spritesheets.hpp"
#include <algorithm>
#include <ranges>
@@ -8,12 +8,12 @@
#include <format>
#include <functional>
#include "document.h"
#include "log.h"
#include "path_.h"
#include "strings.h"
#include "toast.h"
#include "working_directory.h"
#include "document.hpp"
#include "log.hpp"
#include "path_.hpp"
#include "strings.hpp"
#include "toast.hpp"
#include "working_directory.hpp"
using namespace anm2ed::types;
using namespace anm2ed::resource;
+5 -5
View File
@@ -1,10 +1,10 @@
#pragma once
#include "clipboard.h"
#include "dialog.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "clipboard.hpp"
#include "dialog.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui
{
+4 -4
View File
@@ -1,4 +1,4 @@
#include "timeline.h"
#include "timeline.hpp"
#include <algorithm>
#include <cmath>
@@ -6,10 +6,10 @@
#include <imgui_internal.h>
#include "log.h"
#include "toast.h"
#include "log.hpp"
#include "toast.hpp"
#include "vector_.h"
#include "vector_.hpp"
using namespace anm2ed::resource;
using namespace anm2ed::types;
+5 -5
View File
@@ -2,11 +2,11 @@
#include <vector>
#include "clipboard.h"
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "strings.h"
#include "clipboard.hpp"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
#include "strings.hpp"
namespace anm2ed::imgui
{
+4 -4
View File
@@ -1,11 +1,11 @@
#include "tools.h"
#include "tools.hpp"
#include <glm/gtc/type_ptr.hpp>
#include "strings.h"
#include "tool.h"
#include "types.h"
#include "strings.hpp"
#include "tool.hpp"
#include "types.hpp"
using namespace anm2ed::resource;
using namespace anm2ed::types;
+4 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "manager.h"
#include "resources.h"
#include "settings.h"
#include "strings.h"
#include "manager.hpp"
#include "resources.hpp"
#include "settings.hpp"
#include "strings.hpp"
namespace anm2ed::imgui
{
+3 -3
View File
@@ -1,9 +1,9 @@
#include "welcome.h"
#include "welcome.hpp"
#include <ranges>
#include "path_.h"
#include "strings.h"
#include "path_.hpp"
#include "strings.hpp"
using namespace anm2ed::util;
using namespace anm2ed::resource;
+4 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "documents.h"
#include "manager.h"
#include "strings.h"
#include "taskbar.h"
#include "documents.hpp"
#include "manager.hpp"
#include "strings.hpp"
#include "taskbar.hpp"
namespace anm2ed::imgui
{
+2 -2
View File
@@ -1,10 +1,10 @@
#include "about.h"
#include "about.hpp"
#include <cmath>
#include <imgui.h>
#include <vector>
#include "strings.h"
#include "strings.hpp"
using namespace anm2ed::resource;
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once
#include "../../resources.h"
#include "../../resources.hpp"
namespace anm2ed::imgui::wizard
{
@@ -1,9 +1,9 @@
#include "change_all_frame_properties.h"
#include "change_all_frame_properties.hpp"
#include <string>
#include <vector>
#include "math_.h"
#include "math_.hpp"
using namespace anm2ed::util::math;
using namespace glm;
@@ -1,7 +1,7 @@
#pragma once
#include "document.h"
#include "settings.h"
#include "document.hpp"
#include "settings.hpp"
namespace anm2ed::imgui::wizard
{
+2 -2
View File
@@ -1,6 +1,6 @@
#include "configure.h"
#include "configure.hpp"
#include "imgui_.h"
#include "imgui_.hpp"
using namespace anm2ed::types;
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once
#include "manager.h"
#include "manager.hpp"
namespace anm2ed::imgui::wizard
{
@@ -1,7 +1,7 @@
#include "generate_animation_from_grid.h"
#include "generate_animation_from_grid.hpp"
#include "math_.h"
#include "types.h"
#include "math_.hpp"
#include "types.hpp"
using namespace anm2ed::types;
using namespace anm2ed::util;
@@ -1,9 +1,9 @@
#pragma once
#include "canvas.h"
#include "document.h"
#include "resources.h"
#include "settings.h"
#include "canvas.hpp"
#include "document.hpp"
#include "resources.hpp"
#include "settings.hpp"
namespace anm2ed::imgui::wizard
{
+6 -6
View File
@@ -1,13 +1,13 @@
#include "render_animation.h"
#include "render_animation.hpp"
#include <ranges>
#include <string>
#include "imgui_.h"
#include "log.h"
#include "path_.h"
#include "process_.h"
#include "toast.h"
#include "imgui_.hpp"
#include "log.hpp"
#include "path_.hpp"
#include "process_.hpp"
#include "toast.hpp"
using namespace anm2ed::resource;
using namespace anm2ed::util;
+3 -3
View File
@@ -1,8 +1,8 @@
#pragma once
#include "dialog.h"
#include "manager.h"
#include "resources.h"
#include "dialog.hpp"
#include "manager.hpp"
#include "resources.hpp"
namespace anm2ed::imgui::wizard
{