summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-28 17:58:15 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-28 17:58:15 -0500
commitea8fb5426b0f065b4ef508bb33c2baf30df6b5a4 (patch)
treea3a72aad85e74044c914185754ae8e736776a3f9
parent1cb8cc47c64009999f054f42f6815b05ccfc305c (diff)
downloadtanetane-ea8fb5426b0f065b4ef508bb33c2baf30df6b5a4.tar.gz
tanetane-ea8fb5426b0f065b4ef508bb33c2baf30df6b5a4.tar.bz2
tanetane-ea8fb5426b0f065b4ef508bb33c2baf30df6b5a4.zip
Simplified "animation" map sprite parameter
The filenames for these are fairly regular, and we're gonna want to abstract it away further later on anyway.
-rw-r--r--res/maps/hallucination_beach.tmx2
-rw-r--r--res/maps/hallucination_hot_spring.tmx2
-rw-r--r--res/maps/hallucination_interior.tmx6
-rw-r--r--res/maps/pink_shell.tmx2
-rw-r--r--res/maps/underwater_start.tmx2
-rw-r--r--src/map.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/res/maps/hallucination_beach.tmx b/res/maps/hallucination_beach.tmx index ce6c830..9830cf5 100644 --- a/res/maps/hallucination_beach.tmx +++ b/res/maps/hallucination_beach.tmx
@@ -43,7 +43,7 @@
43 <objectgroup id="3" name="Objects"> 43 <objectgroup id="3" name="Objects">
44 <object id="3" name="flint" type="sprite" x="560.14" y="304.895"> 44 <object id="3" name="flint" type="sprite" x="560.14" y="304.895">
45 <properties> 45 <properties>
46 <property name="animation" value="../res/sprites/flint_anim.txt"/> 46 <property name="animation" value="flint"/>
47 <property name="collisionHeight" type="int" value="8"/> 47 <property name="collisionHeight" type="int" value="8"/>
48 <property name="collisionOffsetX" type="int" value="-8"/> 48 <property name="collisionOffsetX" type="int" value="-8"/>
49 <property name="collisionOffsetY" type="int" value="-8"/> 49 <property name="collisionOffsetY" type="int" value="-8"/>
diff --git a/res/maps/hallucination_hot_spring.tmx b/res/maps/hallucination_hot_spring.tmx index b019681..7ccc0cb 100644 --- a/res/maps/hallucination_hot_spring.tmx +++ b/res/maps/hallucination_hot_spring.tmx
@@ -36,7 +36,7 @@
36 <object id="3" name="water_ionia" type="sprite" x="312" y="104.5"> 36 <object id="3" name="water_ionia" type="sprite" x="312" y="104.5">
37 <properties> 37 <properties>
38 <property name="animName" value="swim_still"/> 38 <property name="animName" value="swim_still"/>
39 <property name="animation" value="../res/sprites/ionia_anim.txt"/> 39 <property name="animation" value="ionia"/>
40 <property name="collisionHeight" type="int" value="8"/> 40 <property name="collisionHeight" type="int" value="8"/>
41 <property name="collisionOffsetX" type="int" value="-8"/> 41 <property name="collisionOffsetX" type="int" value="-8"/>
42 <property name="collisionOffsetY" type="int" value="-8"/> 42 <property name="collisionOffsetY" type="int" value="-8"/>
diff --git a/res/maps/hallucination_interior.tmx b/res/maps/hallucination_interior.tmx index 55e5506..a4ff7b3 100644 --- a/res/maps/hallucination_interior.tmx +++ b/res/maps/hallucination_interior.tmx
@@ -98,7 +98,7 @@
98 </object> 98 </object>
99 <object id="7" name="doria" type="sprite" x="328" y="525"> 99 <object id="7" name="doria" type="sprite" x="328" y="525">
100 <properties> 100 <properties>
101 <property name="animation" value="../res/sprites/doria_anim.txt"/> 101 <property name="animation" value="doria"/>
102 <property name="collisionHeight" type="int" value="8"/> 102 <property name="collisionHeight" type="int" value="8"/>
103 <property name="collisionOffsetX" type="int" value="-8"/> 103 <property name="collisionOffsetX" type="int" value="-8"/>
104 <property name="collisionOffsetY" type="int" value="-8"/> 104 <property name="collisionOffsetY" type="int" value="-8"/>
@@ -114,7 +114,7 @@
114 </object> 114 </object>
115 <object id="9" name="join_claus" type="sprite" x="640.334" y="153.667"> 115 <object id="9" name="join_claus" type="sprite" x="640.334" y="153.667">
116 <properties> 116 <properties>
117 <property name="animation" value="../res/sprites/claus_anim.txt"/> 117 <property name="animation" value="claus"/>
118 <property name="collisionHeight" type="int" value="8"/> 118 <property name="collisionHeight" type="int" value="8"/>
119 <property name="collisionOffsetX" type="int" value="-8"/> 119 <property name="collisionOffsetX" type="int" value="-8"/>
120 <property name="collisionOffsetY" type="int" value="-8"/> 120 <property name="collisionOffsetY" type="int" value="-8"/>
@@ -126,7 +126,7 @@
126 </object> 126 </object>
127 <object id="10" name="ionia" type="sprite" x="821.333" y="135.333"> 127 <object id="10" name="ionia" type="sprite" x="821.333" y="135.333">
128 <properties> 128 <properties>
129 <property name="animation" value="../res/sprites/ionia_anim.txt"/> 129 <property name="animation" value="ionia"/>
130 <property name="collisionHeight" type="int" value="8"/> 130 <property name="collisionHeight" type="int" value="8"/>
131 <property name="collisionOffsetX" type="int" value="-8"/> 131 <property name="collisionOffsetX" type="int" value="-8"/>
132 <property name="collisionOffsetY" type="int" value="-8"/> 132 <property name="collisionOffsetY" type="int" value="-8"/>
diff --git a/res/maps/pink_shell.tmx b/res/maps/pink_shell.tmx index 12eea42..ecff5a8 100644 --- a/res/maps/pink_shell.tmx +++ b/res/maps/pink_shell.tmx
@@ -51,7 +51,7 @@
51 </object> 51 </object>
52 <object id="3" name="ocho" type="sprite" x="280" y="222"> 52 <object id="3" name="ocho" type="sprite" x="280" y="222">
53 <properties> 53 <properties>
54 <property name="animation" value="../res/sprites/human_ocho_anim.txt"/> 54 <property name="animation" value="human_ocho"/>
55 <property name="collisionHeight" type="int" value="8"/> 55 <property name="collisionHeight" type="int" value="8"/>
56 <property name="collisionOffsetX" type="int" value="-8"/> 56 <property name="collisionOffsetX" type="int" value="-8"/>
57 <property name="collisionOffsetY" type="int" value="-8"/> 57 <property name="collisionOffsetY" type="int" value="-8"/>
diff --git a/res/maps/underwater_start.tmx b/res/maps/underwater_start.tmx index 0ced9c4..cd73e07 100644 --- a/res/maps/underwater_start.tmx +++ b/res/maps/underwater_start.tmx
@@ -82,7 +82,7 @@
82 </object> 82 </object>
83 <object id="2" name="fish1" type="sprite" x="216.923" y="198.462"> 83 <object id="2" name="fish1" type="sprite" x="216.923" y="198.462">
84 <properties> 84 <properties>
85 <property name="animation" value="../res/sprites/fish_anim.txt"/> 85 <property name="animation" value="fish"/>
86 <property name="collisionHeight" type="int" value="8"/> 86 <property name="collisionHeight" type="int" value="8"/>
87 <property name="collisionOffsetX" type="int" value="-8"/> 87 <property name="collisionOffsetX" type="int" value="-8"/>
88 <property name="collisionOffsetY" type="int" value="-8"/> 88 <property name="collisionOffsetY" type="int" value="-8"/>
diff --git a/src/map.cpp b/src/map.cpp index 7a3de78..0cf9402 100644 --- a/src/map.cpp +++ b/src/map.cpp
@@ -88,7 +88,7 @@ Map::Map(std::string_view name) : name_(name) {
88 } else if (property.getName() == "collisionHeight") { 88 } else if (property.getName() == "collisionHeight") {
89 p.collisionSize.h() = property.getIntValue(); 89 p.collisionSize.h() = property.getIntValue();
90 } else if (property.getName() == "animation") { 90 } else if (property.getName() == "animation") {
91 p.animationFilename = property.getStringValue(); 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() == "interactionScript") { 94 } else if (property.getName() == "interactionScript") {