diff options
-rw-r--r-- | res/scripts/hallucination_mirror.lua | 7 | ||||
-rw-r--r-- | src/animation_system.cpp | 3 |
2 files changed, 10 insertions, 0 deletions
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() | |||
20 | return | 20 | return |
21 | end | 21 | end |
22 | 22 | ||
23 | if not gamestate.read_mirror_message then | ||
24 | animation():initSprite(getSpriteByAlias("double_lucas"), "../res/sprites/claus_anim.txt") | ||
25 | animation():initSprite(getSpriteByAlias("double_kuma"), "../res/sprites/ionia_anim.txt") | ||
26 | animation():initSprite(getSpriteByAlias("double_duster"), "../res/sprites/wess_anim.txt") | ||
27 | --animation():initSprite(getSpriteByAlias("double_boney"), "../res/sprites/claus_anim.txt") | ||
28 | end | ||
29 | |||
23 | gamestate.read_mirror_message = true | 30 | gamestate.read_mirror_message = true |
24 | 31 | ||
25 | DisplayMessage("* <Your eyes that watch me walking by\nYour ears that listen to me cry\nYour mouth, alit with laughter strong\nYour forehead creased to say I'm wrong>\n* <They think you're dead, but here you stare\nReflected in the mirror's glare\nWith pounding fists and fevered moans\nThat shake me to my very bones>\n* <One day I know you'll fall right through\nTo haunt me in my life anew>\n\f...\n\f* You get the feeling you're being watched.", "", SpeakerType.NONE) | 32 | DisplayMessage("* <Your eyes that watch me walking by\nYour ears that listen to me cry\nYour mouth, alit with laughter strong\nYour forehead creased to say I'm wrong>\n* <They think you're dead, but here you stare\nReflected in the mirror's glare\nWith pounding fists and fevered moans\nThat shake me to my very bones>\n* <One day I know you'll fall right through\nTo haunt me in my life anew>\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) { | |||
43 | std::getline(framefile, line); // frames | 43 | std::getline(framefile, line); // frames |
44 | std::getline(framefile, line); // blank | 44 | std::getline(framefile, line); // blank |
45 | 45 | ||
46 | sprite.frames.clear(); | ||
46 | for (int i=0; i<numFrames; i++) { | 47 | for (int i=0; i<numFrames; i++) { |
47 | SpriteFrame f; | 48 | SpriteFrame f; |
48 | framefile >> f.size.w(); | 49 | framefile >> f.size.w(); |
@@ -64,6 +65,8 @@ void AnimationSystem::initSprite(int spriteId, std::string_view filename) { | |||
64 | 65 | ||
65 | std::string animLine; | 66 | std::string animLine; |
66 | std::getline(datafile, animLine); // blank | 67 | std::getline(datafile, animLine); // blank |
68 | sprite.animations.clear(); | ||
69 | sprite.nameDirToAnim.clear(); | ||
67 | while (std::getline(datafile, animLine)) { | 70 | while (std::getline(datafile, animLine)) { |
68 | std::regex re(R"(([a-z!._]+)\[([a-z_]+)\](%[0-9]+)?: ([0-9,#]+))"); | 71 | std::regex re(R"(([a-z!._]+)\[([a-z_]+)\](%[0-9]+)?: ([0-9,#]+))"); |
69 | std::smatch m; | 72 | std::smatch m; |