mini stage 6

This commit is contained in:
2026-09-01 17:18:24 -04:00
parent 019a2f73fb
commit 92b8fcae24
23 changed files with 293556 additions and 132265 deletions
+3
View File
@@ -0,0 +1,3 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
+2 -2
View File
@@ -1,9 +1,9 @@
build/
build-web/
concept/
resources/
release/
out/
external/
.codex
AGENTS.md
AGENTS.md
resources/icons/
+3 -3
View File
@@ -73,8 +73,8 @@
<InteractArea Type="Kiss" Null="Belly" DialoguePool="BellyKiss" DialoguePoolFull="BellyKiss" />
<InteractArea Type="Smack" Null="Belly" DialoguePool="BellySmack" Layer="Torso" DialoguePoolFull="BellySmack" />
<InteractArea Type="Smack" Null="ButtFront" DialoguePool="ButtSmack" Layer="LegFront" />
<InteractArea Type="Smack" Null="ButtBack" DialoguePool="ButtSmack" Layer="LegBack" />
<InteractArea Type="Turn Around" Null="FullBody" AnimationCursorHover="TurnAround" Animation="IdleBack" />
<InteractArea Type="Turn Around" Null="FullBodyBack" AnimationCursorHover="TurnAroundBack" Animation="Idle" />
<InteractArea Type="Smack" Null="ButtBack" DialoguePool="ButtSmack" Layer="LegBack" DefaultAnimationOnEnd="IdleBack" />
<InteractArea Type="Turn Around" Null="FullBody" AnimationCursorHover="TurnAround" Animation="IdleBack" DefaultAnimationOnEnd="IdleBack" />
<InteractArea Type="Turn Around" Null="FullBodyBack" AnimationCursorHover="TurnAroundBack" Animation="Idle" DefaultAnimationOnEnd="Idle" />
</InteractAreas>
</Character>
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5 -2
View File
@@ -70,14 +70,17 @@
</InteractAreaTypes>
<InteractAreas>
<InteractArea Type="Rub" Null="Head" DialoguePool="HeadRub" DialoguePoolFull="HeadRubFull" />
<InteractArea Type="Rub" Null="HeadBack" DialoguePool="HeadRubBack" DialoguePoolFull="HeadRubBackFull" DefaultAnimationOnEnd="NeutralBack" />
<InteractArea Type="Rub" Null="Belly" AnimationCursorActive="Grab" DialoguePool="BellyRub" DigestionBonusOnHover="0.1" DialoguePoolFull="BellyRubFull" />
<InteractArea Type="Rub" Null="Tail" AnimationCursorActive="Grab" DialoguePool="TailRub" DialoguePoolFull="TailRubFull" />
<InteractArea Type="Rub" Null="TailBack" AnimationCursorActive="Grab" DialoguePool="TailRubBack" DialoguePoolFull="TailRubBackFull" DefaultAnimationOnEnd="NeutralBack" />
<InteractArea Type="Kiss" Null="Mouth" DialoguePool="MouthKiss" DialoguePoolFull="MouthKiss" />
<InteractArea Type="Kiss" Null="Belly" DialoguePool="BellyKiss" DialoguePoolFull="BellyKiss" />
<InteractArea Type="Kiss" Null="Tail" DialoguePool="TailKiss" DialoguePoolFull="TailKiss" />
<InteractArea Type="Smack" Null="Belly" DialoguePool="BellySmack" Layer="Torso" DigestionBonusOnClick="0.25" DialoguePoolFull="BellySmack" />
<InteractArea Type="Smack" Null="Tail" DialoguePool="TailSmack" Layer="Tail" DialoguePoolFull="TailSmack" />
<InteractArea Type="Turn Around" Null="FullBody" AnimationCursorHover="TurnAround" Animation="NeutralBack" />
<InteractArea Type="Turn Around" Null="FullBodyBack" AnimationCursorHover="TurnAroundBack" Animation="Neutral" />
<InteractArea Type="Smack" Null="TailBack" DialoguePool="TailSmackBack" Layer="Tail" DialoguePoolFull="TailSmackBack" DefaultAnimationOnEnd="NeutralBack" />
<InteractArea Type="Turn Around" Null="FullBody" AnimationCursorHover="TurnAround" Animation="NeutralBack" DefaultAnimationOnEnd="NeutralBack" />
<InteractArea Type="Turn Around" Null="FullBodyBack" AnimationCursorHover="TurnAroundBack" Animation="Neutral" DefaultAnimationOnEnd="Neutral" />
</InteractAreas>
</Character>
+173
View File
@@ -1939,6 +1939,69 @@ That&apos;s right, me!" Animation="HeadRub">
<Entry Label="TailRubFull-18" Text="Lovely..." Animation="TailRubFull"/>
<Entry Label="TailRubFull-19" Text="How kind of you..." Animation="TailRubFull"/>
<Entry Label="TailRubFull-20" Text="Ooh..." Animation="TailRubFull"/>
<Entry Label="HeadRubBack1" Text="Mmm, scratch behind there..." Animation="EagerBack"/>
<Entry Label="HeadRubBack2" Text="I can&apos;t help it...being pet does feel good..." Animation="PeevedBack"/>
<Entry Label="HeadRubBack3" Text="Nothing beats head pats..." Animation="EagerBack"/>
<Entry Label="HeadRubBack4" Text="Who&apos;s a good Snivy?
That&apos;s right, me!" Animation="EagerBack">
<Color ColorR="0.25098041" ColorG="1" ColorB="0.25098041" End="18" Start="13"/>
</Entry>
<Entry Label="HeadRubBack5" Text="I&apos;m...yours..." Animation="EagerBack"/>
<Entry Label="HeadRubBack6" Text="Nice..." Animation="EagerBack"/>
<Entry Label="HeadRubBack7" Text="Good..." Animation="EagerBack"/>
<Entry Label="HeadRubBack8" Text="A little more...right over there, yeah." Animation="EagerBack"/>
<Entry Label="HeadRubBack9" Text="Feels good..." Animation="EagerBack"/>
<Entry Label="HeadRubBack10" Text="...mmm..." Animation="EagerBack"/>
<Entry Label="TailRubBack1" Text="Right where I photosynthesize..." Animation="EagerBack"/>
<Entry Label="TailRubBack2" Text="You like the leaf at the end..?" Animation="EagerBack"/>
<Entry Label="TailRubBack3" Text="Nice and long, isn&apos;t it?" Animation="EagerBack"/>
<Entry Label="TailRubBack4" Text="Ooh, my secret favorite spot to touch..." Animation="EagerBack"/>
<Entry Label="TailRubBack5" Text="You like my tail..?" Animation="EagerBack"/>
<Entry Label="TailRubBack6" Text="Mmm..." Animation="EagerBack"/>
<Entry Label="TailRubBack7" Text="Aaahh..." Animation="EagerBack"/>
<Entry Label="TailRubBack8" Text="Lovely..." Animation="EagerBack"/>
<Entry Label="TailRubBack9" Text="How kind of you..." Animation="EagerBack"/>
<Entry Label="TailRubBack10" Text="Ooh..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-1" Text="Mmm, scratch behind there..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-2" Text="I can&apos;t help it...being pet does feel good..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-3" Text="Nothing beats head pats..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-4" Text="Who&apos;s a good Snivy? That&apos;s right, me..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-5" Text="I&apos;m...yours..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-6" Text="Nice..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-7" Text="Good..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-8" Text="A little more...right over there, yeah." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-9" Text="Feels good..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-10" Text="...mmm..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-11" Text="Ooh, that feels good..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-12" Text="You know just where to rub..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-13" Text="That&apos;s the spot..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-14" Text="Feels nice..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-15" Text="Yeah..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-16" Text="Mmm..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-17" Text="Aaahh..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-18" Text="Lovely..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-19" Text="How kind of you..." Animation="EagerBack"/>
<Entry Label="HeadRubBackFull-20" Text="Ooh..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-1" Text="Right where I photosynthesize..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-2" Text="You like the leaf at the end..?" Animation="EagerBack"/>
<Entry Label="TailRubBackFull-3" Text="Nice and long, isn&apos;t it?" Animation="EagerBack"/>
<Entry Label="TailRubBackFull-4" Text="Ooh, my secret favorite spot to touch..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-5" Text="You like my tail..?" Animation="EagerBack"/>
<Entry Label="TailRubBackFull-6" Text="Nice..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-7" Text="Good..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-8" Text="A little more...right over there, yeah." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-9" Text="Feels good..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-10" Text="...mmm..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-11" Text="Ooh, that feels good..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-12" Text="You know just where to rub..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-13" Text="That&apos;s the spot..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-14" Text="Feels nice..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-15" Text="Yeah..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-16" Text="Mmm..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-17" Text="Aaahh..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-18" Text="Lovely..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-19" Text="How kind of you..." Animation="EagerBack"/>
<Entry Label="TailRubBackFull-20" Text="Ooh..." Animation="EagerBack"/>
<Entry Label="MouthKiss1" Text="I..I d-didn&apos;t think..." Animation="Sheepish"/>
<Entry Label="MouthKiss2" Text="How...lovely..." Animation="Sheepish"/>
<Entry Label="MouthKiss3" Text="I&apos;m...yours..." Animation="Sheepish"/>
@@ -2024,6 +2087,36 @@ That&apos;s right, me!" Animation="HeadRub">
<Entry Label="TailSmack5" Text="Stop, I can&apos;t photosynthesize!!" Animation="TailRubFull">
<Shake End="31"/>
</Entry>
<Entry Label="TailSmackBack1" Text="H-hey!" Animation="PeevedBack">
<Shake End="6"/>
</Entry>
<Entry Label="TailSmackBack2" Text="Q-quit it!!" Animation="PeevedBack">
<Shake End="11"/>
</Entry>
<Entry Label="TailSmackBack3" Text="Ow!!" Animation="PeevedBack">
<Shake End="4"/>
</Entry>
<Entry Label="TailSmackBack4" Text="Jerk!!" Animation="PeevedBack">
<Shake End="6"/>
</Entry>
<Entry Label="TailSmackBack5" Text="Stop it!!" Animation="PeevedBack">
<Shake End="9"/>
</Entry>
<Entry Label="TailSmackBack6" Text="Stop spanking me!" Animation="PeevedBack">
<Shake End="17"/>
</Entry>
<Entry Label="TailSmackBack7" Text="Ow, my butt!!" Animation="PeevedBack">
<Shake End="13"/>
</Entry>
<Entry Label="TailSmackBack8" Text="I&apos;ve been a good Snivy!!" Animation="PeevedBack">
<Shake End="24"/>
</Entry>
<Entry Label="TailSmackBack9" Text="My booty!!" Animation="PeevedBack">
<Shake End="10"/>
</Entry>
<Entry Label="TailSmackBack10" Text="Stop, I can&apos;t photosynthesize!!" Animation="PeevedBack">
<Shake End="31"/>
</Entry>
<Entry Label="End" Next="End2" Text="WAHAHAHAHA!" Animation="Horny">
<Scene/>
<Big End="11"/>
@@ -2755,6 +2848,30 @@ Thank you so much." Animation="Neutral"/>
<Entry Label="TailRub9"/>
<Entry Label="TailRub10"/>
</Pool>
<Pool Label="HeadRubBack">
<Entry Label="HeadRubBack1"/>
<Entry Label="HeadRubBack2"/>
<Entry Label="HeadRubBack3"/>
<Entry Label="HeadRubBack4"/>
<Entry Label="HeadRubBack5"/>
<Entry Label="HeadRubBack6"/>
<Entry Label="HeadRubBack7"/>
<Entry Label="HeadRubBack8"/>
<Entry Label="HeadRubBack9"/>
<Entry Label="HeadRubBack10"/>
</Pool>
<Pool Label="TailRubBack">
<Entry Label="TailRubBack1"/>
<Entry Label="TailRubBack2"/>
<Entry Label="TailRubBack3"/>
<Entry Label="TailRubBack4"/>
<Entry Label="TailRubBack5"/>
<Entry Label="TailRubBack6"/>
<Entry Label="TailRubBack7"/>
<Entry Label="TailRubBack8"/>
<Entry Label="TailRubBack9"/>
<Entry Label="TailRubBack10"/>
</Pool>
<Pool Label="MouthKiss">
<Entry Label="MouthKiss1"/>
<Entry Label="MouthKiss2"/>
@@ -2805,6 +2922,18 @@ Thank you so much." Animation="Neutral"/>
<Entry Label="TailSmack4"/>
<Entry Label="TailSmack5"/>
</Pool>
<Pool Label="TailSmackBack">
<Entry Label="TailSmackBack1"/>
<Entry Label="TailSmackBack2"/>
<Entry Label="TailSmackBack3"/>
<Entry Label="TailSmackBack4"/>
<Entry Label="TailSmackBack5"/>
<Entry Label="TailSmackBack6"/>
<Entry Label="TailSmackBack7"/>
<Entry Label="TailSmackBack8"/>
<Entry Label="TailSmackBack9"/>
<Entry Label="TailSmackBack10"/>
</Pool>
<Pool Label="Stage1">
<Entry Label="Stage1-1"/>
<Entry Label="Stage1-2"/>
@@ -2922,6 +3051,50 @@ Thank you so much." Animation="Neutral"/>
<Entry Label="TailRubFull-19"/>
<Entry Label="TailRubFull-20"/>
</Pool>
<Pool Label="HeadRubBackFull">
<Entry Label="HeadRubBackFull-1"/>
<Entry Label="HeadRubBackFull-2"/>
<Entry Label="HeadRubBackFull-3"/>
<Entry Label="HeadRubBackFull-4"/>
<Entry Label="HeadRubBackFull-5"/>
<Entry Label="HeadRubBackFull-6"/>
<Entry Label="HeadRubBackFull-7"/>
<Entry Label="HeadRubBackFull-8"/>
<Entry Label="HeadRubBackFull-9"/>
<Entry Label="HeadRubBackFull-10"/>
<Entry Label="HeadRubBackFull-11"/>
<Entry Label="HeadRubBackFull-12"/>
<Entry Label="HeadRubBackFull-13"/>
<Entry Label="HeadRubBackFull-14"/>
<Entry Label="HeadRubBackFull-15"/>
<Entry Label="HeadRubBackFull-16"/>
<Entry Label="HeadRubBackFull-17"/>
<Entry Label="HeadRubBackFull-18"/>
<Entry Label="HeadRubBackFull-19"/>
<Entry Label="HeadRubBackFull-20"/>
</Pool>
<Pool Label="TailRubBackFull">
<Entry Label="TailRubBackFull-1"/>
<Entry Label="TailRubBackFull-2"/>
<Entry Label="TailRubBackFull-3"/>
<Entry Label="TailRubBackFull-4"/>
<Entry Label="TailRubBackFull-5"/>
<Entry Label="TailRubBackFull-6"/>
<Entry Label="TailRubBackFull-7"/>
<Entry Label="TailRubBackFull-8"/>
<Entry Label="TailRubBackFull-9"/>
<Entry Label="TailRubBackFull-10"/>
<Entry Label="TailRubBackFull-11"/>
<Entry Label="TailRubBackFull-12"/>
<Entry Label="TailRubBackFull-13"/>
<Entry Label="TailRubBackFull-14"/>
<Entry Label="TailRubBackFull-15"/>
<Entry Label="TailRubBackFull-16"/>
<Entry Label="TailRubBackFull-17"/>
<Entry Label="TailRubBackFull-18"/>
<Entry Label="TailRubBackFull-19"/>
<Entry Label="TailRubBackFull-20"/>
</Pool>
</Pools>
<Hooks>
<Hook Type="Start" Entry="StartBegin"/>
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 158 KiB

+10
View File
@@ -1020,11 +1020,21 @@ namespace game
std::string Entity::idle_animation_get() const
{
if (isStageUp) return {};
if (!defaultAnimationOverride.empty()) return defaultAnimationOverride;
auto idle = data.animation_get(resource::xml::Schema::Element::IDLE);
auto idleFull = data.animation_get(resource::xml::Schema::Element::IDLE_FULL);
return is_over_capacity() && !idleFull.empty() ? idleFull : idle;
}
void Entity::default_animation_override_set(const std::string& animation)
{
if (animation.empty()) return;
if (animation == data.animation_get(resource::xml::Schema::Element::IDLE))
defaultAnimationOverride.clear();
else
defaultAnimationOverride = animation;
}
void Entity::spritesheet_set(SpritesheetType type)
{
switch (type)
+2
View File
@@ -121,6 +121,7 @@ namespace game
std::unordered_map<std::string, int> nullMap{};
std::unordered_map<std::string, int> eventMap{};
std::string defaultAnimation{};
std::string defaultAnimationOverride{};
int defaultAnimationID{-1};
std::vector<Anm2::Animation> animations{};
std::unordered_map<std::string, int> animationMap{};
@@ -233,6 +234,7 @@ namespace game
float stage_threshold_next_get(util::measurement::System = util::measurement::METRIC) const;
void expand_areas_apply();
void spritesheet_set(SpritesheetType);
void default_animation_override_set(const std::string&);
std::string idle_animation_get() const;
std::string animation_append_id_get() const;
+2
View File
@@ -204,6 +204,8 @@
"DelayTicks", "", "", delayTicks) \
X(DATA, MEMBER_ATTRIBUTE, defaultAnimation, std::string, "Default Animation", STRING, "DefaultAnimation", "", "", \
defaultAnimation) \
X(DATA, MEMBER_ATTRIBUTE, defaultAnimationOnEnd, std::string, "Default Animation On End", STRING, "DefaultAnimationOnEnd", "", "", \
defaultAnimationOnEnd) \
X(DATA, MEMBER_ATTRIBUTE, description, std::string, "Description", STRING, \
"Description", "", "", description) \
X(DATA, MEMBER_ATTRIBUTE, dialoguePoolID, std::string, "Dialogue Pool", STRING, "DialoguePool", "", "", dialoguePoolID) \
+1
View File
@@ -62,6 +62,7 @@ namespace game::resource::xml
X(ToolsHomeTooltip, "TextToolsHomeTooltip", "Reset camera view.\n(Shortcut: Home)") \
X(ToolsOpenTooltip, "TextToolsOpenTooltip", "Open Tools") \
X(ToolsCloseTooltip, "TextToolsCloseTooltip", "Close Tools") \
X(ToolsAutofeedDisabledTooltip, "TextToolsAutofeedDisabledTooltip", "Disabled while Autofeed is active!") \
X(InventoryEmptyHint, "TextInventoryEmptyHint", "No items.") \
X(InventoryFlavorFormat, "TextInventoryFlavorFormat", "Flavor: %s") \
X(InventoryCaloriesFormat, "TextInventoryCaloriesFormat", "%0.0f kcal") \
+10 -1
View File
@@ -266,8 +266,17 @@ namespace game::state
if (!isSceneActive)
{
tools.update(character, cursor, world, focus, worldCanvas, false, UI_ALPHA_MAX);
auto tool_rub_apply = [&]()
{
static constexpr auto AUTOFEED_INTERACT_TYPE_RUB = "Rub";
auto rubInteractTypeID = character.data.interact_type_id_get(AUTOFEED_INTERACT_TYPE_RUB);
if (rubInteractTypeID != -1) cursor.interactTypeID = rubInteractTypeID;
};
if (autofeed.enabled_get()) tool_rub_apply();
tools.update(character, cursor, world, focus, worldCanvas, false, autofeed.enabled_get(), UI_ALPHA_MAX);
menu.update(resources, itemManager, character, text, autofeed);
if (autofeed.enabled_get()) tool_rub_apply();
toasts.update();
}
+5 -1
View File
@@ -130,6 +130,8 @@ namespace game::state::play
.interrupt = Entity::Interrupt::ALWAYS});
}
interactArea->soundEntries.play();
if (!interactArea->defaultAnimationOnEnd.empty())
character.default_animation_override_set(interactArea->defaultAnimationOnEnd);
for (auto* particle : character.data.children_get(*interactArea, Schema::Element::PARTICLE))
if (particle && !particle->typeString.empty())
particles.push_back({.label = particle->typeString, .position = cursorWorldPosition});
@@ -160,7 +162,9 @@ namespace game::state::play
if (text.is_interruptible() && isDialogueReady)
{
auto* entry = dialogue.dialogue_pool_entry_get(poolID);
if (entry) text.set(entry, character);
if (entry)
text.set(entry, character, true, false,
isInteract ? std::string{} : interactArea->defaultAnimationOnEnd);
}
}
else if (interactArea->dialoguePoolID.empty() && !interactArea->animation.empty())
+13 -1
View File
@@ -119,11 +119,20 @@ namespace game::state::play
}
}
void Text::default_animation_on_end_play(Entity& character)
{
if (defaultAnimationOnEnd.empty()) return;
character.default_animation_override_set(defaultAnimationOnEnd);
character.play({.animation = character.idle_animation_get(), .appendID = character.animation_append_id_get()});
defaultAnimationOnEnd.clear();
}
void Text::set(resource::xml::Schema::Element* dialogueEntry, Entity& character, bool isInterruptible,
bool isSequenceAdvance)
bool isSequenceAdvance, std::string defaultAnimationOnEnd)
{
if (!dialogueEntry) return;
this->entry = dialogueEntry;
if (!isSequenceAdvance) this->defaultAnimationOnEnd = defaultAnimationOnEnd;
if (!isSequenceAdvance) isSceneActive = false;
if (!isSceneActive && !isSequenceAdvance)
@@ -267,6 +276,7 @@ namespace game::state::play
{
isFinished = true;
isEnabled = false;
default_animation_on_end_play(character);
if (isTerminal) isSceneActive = false;
}
return;
@@ -427,6 +437,7 @@ namespace game::state::play
}
else if (isAdvance)
{
default_animation_on_end_play(character);
isEnabled = false;
entry = nullptr;
isSceneActive = false;
@@ -479,6 +490,7 @@ namespace game::state::play
{
if (time += ImGui::GetIO().DeltaTime; time > LIFETIME)
{
default_animation_on_end_play(character);
isEnabled = false;
entry = nullptr;
isSceneActive = false;
+6 -1
View File
@@ -1,6 +1,7 @@
#pragma once
#include <imgui.h>
#include <string>
#include "../../entity.hpp"
#include "../../render/canvas.hpp"
@@ -22,6 +23,9 @@ namespace game::state::play
bool isSceneActive{};
bool isAnimationEntryStarted{};
float animationEntryTimePrevious{};
std::string defaultAnimationOnEnd{};
void default_animation_on_end_play(Entity&);
public:
static constexpr auto LIFETIME = 10.0f;
@@ -31,7 +35,8 @@ namespace game::state::play
bool isEnabled{true};
float time{};
void set(resource::xml::Schema::Element*, Entity&, bool isInterruptible = true, bool isSequenceAdvance = false);
void set(resource::xml::Schema::Element*, Entity&, bool isInterruptible = true, bool isSequenceAdvance = false,
std::string defaultAnimationOnEnd = {});
void update(Entity&, Canvas&);
bool is_interruptible() const;
bool is_finished() const;
+11 -6
View File
@@ -12,7 +12,7 @@ using namespace game::resource::xml;
namespace game::state::play
{
void Tools::update(Entity& character, Entity& cursor, World& world, World::Focus focus, Canvas& canvas,
bool isDisabled, float fadeAlpha)
bool isDisabled, bool isAutofeedEnabled, float fadeAlpha)
{
static constexpr auto WIDTH_MULTIPLIER = 0.05f;
static constexpr auto ALPHA_MIN = 0.0f;
@@ -63,7 +63,7 @@ namespace game::state::play
auto* iconsFont = schema.iconsFont.is_valid() ? schema.iconsFont.get() : nullptr;
auto tool_button = [&](const char* id, const std::string& label, const std::string& iconGlyph,
const std::string& tooltip, bool isActive = false)
const std::string& tooltip, bool isActive = false, bool isToolDisabled = false)
{
auto useIcon = iconsFont && !iconGlyph.empty();
auto result = false;
@@ -71,10 +71,9 @@ namespace game::state::play
ImGui::PushID(id);
if (isActive) ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyleColorVec4(ImGuiCol_ButtonHovered));
ImGui::BeginDisabled(isToolDisabled);
result = WIDGET_FX(ImGui::Button(useIcon ? "##ToolIcon" : label.c_str(), buttonSize));
if (isActive) ImGui::PopStyleColor();
if (useIcon)
{
auto min = ImGui::GetItemRectMin();
@@ -86,6 +85,10 @@ namespace game::state::play
iconGlyph.c_str());
}
ImGui::EndDisabled();
if (isActive) ImGui::PopStyleColor();
if (!tooltip.empty()) ImGui::SetItemTooltip("%s", tooltip.c_str());
ImGui::PopID();
return result;
@@ -101,8 +104,10 @@ namespace game::state::play
break;
}
if (tool_button(name.c_str(), name, iconGlyph, iconsFont && !iconGlyph.empty() ? name : "",
cursor.interactTypeID == interactTypeID))
auto tooltip = isAutofeedEnabled ? strings.get(Strings::ToolsAutofeedDisabledTooltip)
: iconsFont && !iconGlyph.empty() ? name : "";
if (tool_button(name.c_str(), name, iconGlyph, tooltip, cursor.interactTypeID == interactTypeID,
isAutofeedEnabled))
cursor.interactTypeID = interactTypeID;
};
+2 -1
View File
@@ -13,6 +13,7 @@ namespace game::state::play
bool isOpen{};
util::imgui::WindowSlide slide{0.125f, 0.0f};
void update(Entity&, Entity&, World&, World::Focus, Canvas&, bool isDisabled, float fadeAlpha);
void update(Entity&, Entity&, World&, World::Focus, Canvas&, bool isDisabled, bool isAutofeedEnabled,
float fadeAlpha);
};
}