summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-07-21 22:51:32 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-07-27 17:15:46 +0200
commitd50866f2fdd582f67ba3af5d335e5197515d6154 (patch)
treee1c25214b39265ea353360ccf375a0b966ec1e94
parentc30d1dabc129bf170123c39191dce8d984a0cd39 (diff)
Move actions and positions to separate layers.
-rw-r--r--assets/maps/01.tmx16
-rw-r--r--scenes/game.scm2
2 files changed, 12 insertions, 6 deletions
diff --git a/assets/maps/01.tmx b/assets/maps/01.tmx
index 1647a8e..9db7d95 100644
--- a/assets/maps/01.tmx
+++ b/assets/maps/01.tmx
@@ -578,10 +578,16 @@
<object id="33" name="hedge" type="obstacle" x="1181.53" y="705.446" width="84.8256" height="12.5668"/>
<object id="38" name="bench" type="obstacle" x="787.669" y="781.578" width="40.8668" height="14.562"/>
<object id="43" name="rock" type="obstacle" x="929.339" y="757.511" width="29.6503" height="25.1849"/>
- <object id="52" name="enter-house" type="action" x="870.638" y="763.599" width="34.3533" height="8.35621"/>
- <object id="53" name="exit-house" type="action" x="647.617" y="86.325" width="31.6779" height="27.3826"/>
- <object id="57" name="talk-to-reaper" type="action" x="759.03" y="1200.95" width="57.047" height="46.4206"/>
- <object id="60" name="player" type="start-position" x="752" y="1215.92" width="16" height="16"/>
- <object id="62" name="reaper" type="start-position" x="800.087" y="1216.11" width="16" height="16"/>
+ </objectgroup>
+ <objectgroup name="actions">
+ <object id="78" name="enter-house" type="action" x="870.638" y="763.599" width="34.3533" height="8.35621"/>
+ <object id="79" name="exit-house" type="action" x="647.617" y="86.325" width="31.6779" height="27.3826"/>
+ <object id="80" name="talk-to-reaper" type="action" x="759.03" y="1200.95" width="57.047" height="46.4206"/>
+ <object id="81" name="player" type="start-position" x="752" y="1215.92" width="16" height="16"/>
+ <object id="82" name="reaper" type="start-position" x="800.087" y="1216.11" width="16" height="16"/>
+ </objectgroup>
+ <objectgroup name="positions">
+ <object id="86" name="player" type="start-position" x="752" y="1215.92" width="16" height="16"/>
+ <object id="87" name="reaper" type="start-position" x="800.087" y="1216.11" width="16" height="16"/>
</objectgroup>
</map>
diff --git a/scenes/game.scm b/scenes/game.scm
index bc3f690..3ab3512 100644
--- a/scenes/game.scm
+++ b/scenes/game.scm
@@ -100,7 +100,7 @@ map's object layer."
(eq? 'start-position
(map-object-type obj)))
(object-layer-objects
- (tile-map-layer-ref (asset-ref (tile-map game)) "collision"))))
+ (tile-map-layer-ref (asset-ref (tile-map game)) "positions"))))
(offset (origin game)))
(or (and=> (find (lambda (obj)
(equal? (map-object-name obj) name))