summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--res/maps/pink_shell.tmx15
-rw-r--r--res/scripts/pink_shell.lua4
-rw-r--r--res/sprites/human_mixolydia.pngbin0 -> 9244 bytes
-rw-r--r--res/sprites/human_mixolydia_anim.txt18
-rw-r--r--res/sprites/human_mixolydia_frames.txt57
-rw-r--r--src/game.cpp1
-rw-r--r--src/map.cpp2
-rw-r--r--src/map.h1
8 files changed, 97 insertions, 1 deletions
diff --git a/res/maps/pink_shell.tmx b/res/maps/pink_shell.tmx index ecff5a8..d7915d9 100644 --- a/res/maps/pink_shell.tmx +++ b/res/maps/pink_shell.tmx
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="32" height="32" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="4"> 2<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="32" height="32" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5">
3 <properties> 3 <properties>
4 <property name="music" value="are_you_gorgeous"/> 4 <property name="music" value="are_you_gorgeous"/>
5 </properties> 5 </properties>
@@ -61,6 +61,19 @@
61 </properties> 61 </properties>
62 <point/> 62 <point/>
63 </object> 63 </object>
64 <object id="4" name="mixolydia" type="sprite" x="248" y="136">
65 <properties>
66 <property name="animation" value="human_mixolydia"/>
67 <property name="collisionHeight" type="int" value="8"/>
68 <property name="collisionOffsetX" type="int" value="-8"/>
69 <property name="collisionOffsetY" type="int" value="-8"/>
70 <property name="collisionWidth" type="int" value="12"/>
71 <property name="direction" value="up"/>
72 <property name="interactionScript" value="talk_to_mixolydia"/>
73 <property name="shadow" type="bool" value="true"/>
74 </properties>
75 <point/>
76 </object>
64 </objectgroup> 77 </objectgroup>
65 <layer id="1" name="Upper" width="32" height="32"> 78 <layer id="1" name="Upper" width="32" height="32">
66 <properties> 79 <properties>
diff --git a/res/scripts/pink_shell.lua b/res/scripts/pink_shell.lua index 1719c4f..4223188 100644 --- a/res/scripts/pink_shell.lua +++ b/res/scripts/pink_shell.lua
@@ -13,3 +13,7 @@ function pink_shell.talk_to_ocho()
13 SetAnimation("ocho", "still") 13 SetAnimation("ocho", "still")
14 HideCutsceneBars() 14 HideCutsceneBars()
15end 15end
16
17function pink_shell.talk_to_mixolydia()
18 SetDirection("mixolydia", Direction.UP)
19end
diff --git a/res/sprites/human_mixolydia.png b/res/sprites/human_mixolydia.png new file mode 100644 index 0000000..65f11dc --- /dev/null +++ b/res/sprites/human_mixolydia.png
Binary files differ
diff --git a/res/sprites/human_mixolydia_anim.txt b/res/sprites/human_mixolydia_anim.txt new file mode 100644 index 0000000..f48364b --- /dev/null +++ b/res/sprites/human_mixolydia_anim.txt
@@ -0,0 +1,18 @@
1../res/sprites/human_mixolydia.png
2../res/sprites/human_mixolydia_frames.txt
3still[down]: 0
4still[left]: 1
5still[up]: 2
6still[right]: 3
7talk[down]: 4,5
8talk[left]: 6,7
9talk[up]: 8,9
10talk[right]: 10,11
11holding_stick[down]: 15
12holding_stick[down_left]: 16
13holding_stick[left]: 17
14holding_stick[right]: 18
15holding_stick[down_right]: 19
16walk[left]: 20,21
17walk[right]: 22,23
18smack![down]: 15,24,25,26,27 \ No newline at end of file
diff --git a/res/sprites/human_mixolydia_frames.txt b/res/sprites/human_mixolydia_frames.txt new file mode 100644 index 0000000..e1f0c22 --- /dev/null +++ b/res/sprites/human_mixolydia_frames.txt
@@ -0,0 +1,57 @@
132,32 cell size
210 frames per row
353 frames
4
516,32,8,32
616,32,8,32
732,32,16,32
816,32,7,32
916,32,8,32
1016,32,8,32
1116,32,8,32
1216,32,8,32
1332,32,16,32
1432,32,16,32
1516,32,8,32
1616,32,8,32
1716,32,8,32
1816,32,8,32
1916,32,7,32
2032,32,16,32
2132,32,16,32
2232,32,16,32
2332,32,15,32
2432,32,15,32
2532,31,16,31
2632,31,16,31
2732,31,15,31
2832,31,15,31
2916,32,8,32
3016,32,8,32
3132,32,16,32
3232,32,16,32
3332,32,16,32
3432,32,16,32
3532,32,16,32
3632,32,16,32
3732,32,16,32
3832,32,16,32
3932,32,16,32
4032,32,16,32
4132,32,16,32
4232,32,16,32
4332,32,16,32
4432,32,16,32
4532,32,16,32
4632,32,16,32
4732,32,16,32
4832,32,16,32
4932,32,16,32
5032,32,16,32
5132,32,16,32
5232,32,16,32
5332,32,16,32
5432,32,16,32
5532,32,16,32
5632,32,16,32
5732,32,16,32
diff --git a/src/game.cpp b/src/game.cpp index 8ba4c85..5b5c506 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -64,6 +64,7 @@ void Game::loadMap(std::string filename) {
64 if (!p.animName.empty()) { 64 if (!p.animName.empty()) {
65 getSystem<AnimationSystem>().setSpriteAnimation(spriteId, p.animName); 65 getSystem<AnimationSystem>().setSpriteAnimation(spriteId, p.animName);
66 } 66 }
67 getSystem<AnimationSystem>().setSpriteDirection(spriteId, p.dir);
67 } 68 }
68 getSprite(spriteId).interactionScript = p.interactionScript; 69 getSprite(spriteId).interactionScript = p.interactionScript;
69 if (p.movementSpeed != -1) { 70 if (p.movementSpeed != -1) {
diff --git a/src/map.cpp b/src/map.cpp index 0cf9402..c3ac828 100644 --- a/src/map.cpp +++ b/src/map.cpp
@@ -91,6 +91,8 @@ Map::Map(std::string_view name) : name_(name) {
91 p.animationFilename = "../res/sprites/" + property.getStringValue() + "_anim.txt"; 91 p.animationFilename = "../res/sprites/" + property.getStringValue() + "_anim.txt";
92 } else if (property.getName() == "animName") { 92 } else if (property.getName() == "animName") {
93 p.animName = property.getStringValue(); 93 p.animName = property.getStringValue();
94 } else if (property.getName() == "direction") {
95 p.dir = directionFromString(property.getStringValue());
94 } else if (property.getName() == "interactionScript") { 96 } else if (property.getName() == "interactionScript") {
95 p.interactionScript = property.getStringValue(); 97 p.interactionScript = property.getStringValue();
96 } else if (property.getName() == "shadow") { 98 } else if (property.getName() == "shadow") {
diff --git a/src/map.h b/src/map.h index ee88920..80a79b0 100644 --- a/src/map.h +++ b/src/map.h
@@ -25,6 +25,7 @@ struct Prototype {
25 vec2i collisionSize; 25 vec2i collisionSize;
26 std::string animationFilename; 26 std::string animationFilename;
27 std::string animName; 27 std::string animName;
28 Direction dir = Direction::down;
28 std::string interactionScript; 29 std::string interactionScript;
29 bool shadow = false; 30 bool shadow = false;
30 bool wander = false; 31 bool wander = false;