From 16a515766862eb69dab70e081170da7ce39602a8 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 6 Mar 2021 21:41:40 -0500 Subject: The mirror reflection changes to Claus, Ionia, and Wess --- res/scripts/hallucination_mirror.lua | 7 +++++++ src/animation_system.cpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/res/scripts/hallucination_mirror.lua b/res/scripts/hallucination_mirror.lua index 5b336af..6e2ef55 100644 --- a/res/scripts/hallucination_mirror.lua +++ b/res/scripts/hallucination_mirror.lua @@ -20,6 +20,13 @@ function hallucination_mirror.mailbox() return end + if not gamestate.read_mirror_message then + animation():initSprite(getSpriteByAlias("double_lucas"), "../res/sprites/claus_anim.txt") + animation():initSprite(getSpriteByAlias("double_kuma"), "../res/sprites/ionia_anim.txt") + animation():initSprite(getSpriteByAlias("double_duster"), "../res/sprites/wess_anim.txt") + --animation():initSprite(getSpriteByAlias("double_boney"), "../res/sprites/claus_anim.txt") + end + gamestate.read_mirror_message = true DisplayMessage("* \n* \n* \n\f...\n\f* You get the feeling you're being watched.", "", SpeakerType.NONE) diff --git a/src/animation_system.cpp b/src/animation_system.cpp index 997b53a..ce5cc02 100644 --- a/src/animation_system.cpp +++ b/src/animation_system.cpp @@ -43,6 +43,7 @@ void AnimationSystem::initSprite(int spriteId, std::string_view filename) { std::getline(framefile, line); // frames std::getline(framefile, line); // blank + sprite.frames.clear(); for (int i=0; i> f.size.w(); @@ -64,6 +65,8 @@ void AnimationSystem::initSprite(int spriteId, std::string_view filename) { std::string animLine; std::getline(datafile, animLine); // blank + sprite.animations.clear(); + sprite.nameDirToAnim.clear(); while (std::getline(datafile, animLine)) { std::regex re(R"(([a-z!._]+)\[([a-z_]+)\](%[0-9]+)?: ([0-9,#]+))"); std::smatch m; -- cgit 1.4.1