bug fixes.

This commit is contained in:
Bryce Covert
2015-08-25 23:17:22 -07:00
parent ecbec4250a
commit fee02f0a58
6 changed files with 10 additions and 11 deletions

View File

@@ -423,7 +423,7 @@
(loop [zipper (make-zipper choices)]
(let [selected-index (atom nil)
node (zip/node zipper)
_ (clojure.pprint/pprint node)
dialogue-choices (filter first (partition 2 (:choices node)))]
(run-action entities
(begin [this screen entities]
@@ -444,8 +444,7 @@
:skip))
(let [zipper (nth-child zipper (inc (* 2 @selected-index)))
node (zip/node zipper)
_ (clojure.pprint/pprint node)]
node (zip/node zipper)]
(when-let [run (:run node)]
(run (-> dialogue-choices
(nth @selected-index)

View File

@@ -211,6 +211,7 @@
{:run #(actions/talk entities :ego %)}
"So I'm destined to be a sword?"
{:run #(actions/talk entities :ego %)}]})
(actions/do-dialogue entities :fairy-godfather "No, no, no!")
(actions/update-entities entities #(update-in % [:room :entities :fairy-godfather] dissoc :path))
(actions/walk-straight-to entities :fairy-godfather [87 120] :speed 1.75 :update-baseline? false)
(actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :path (catmull-rom-spline (map #(apply vector-2* %) [[87 120] [87 124]]) true))))

View File

@@ -57,13 +57,13 @@
"Is there anything here you will sell?"
{:run #(actions/respond entities %
:shopkeep "No, not until my son returns.")
:choices #(-> % zip/left)}
:choices #(-> % zip/left zip/left)}
"If I get some light in here, will you open up shop?"
{:run #(actions/respond entities %
:shopkeep "No."
:shopkeep "I need my son to help around the shop anyways."
:shopkeep "And there's a lot to fix up before we're ready to open shop again.")
:choices #(-> % zip/left zip/left)}
:choices #(-> % zip/left zip/left zip/left zip/left)}
"Something else."
{:choices actions/something-else}]}
"Are those lava mints on the desk?"
@@ -172,7 +172,7 @@
(when (actions/has-item? entities :portrait)
(return-portrait entities))
(when (has-to-return-teddy? entities)
(return-teddy teddy)))
(return-teddy entities)))
(actions/walk-to entities :ego [235 15] :stop? false :skip-type :end)
(actions/walk-straight-to entities :ego [320 -5])

View File

@@ -409,9 +409,8 @@
{:run #(do (actions/respond entities % :wizard "Friend? "
:wizard "What kind of friend would do what you did to me?")
(Thread/sleep 500)
(actions/talk entities :wizard "You don't even remember what you did, do you?")
)
:choices #(-> % zip/left)}
(actions/talk entities :wizard "You don't even remember what you did, do you?"))
:choices #(-> % zip/left zip/left)}
"Or else what?"
{:run #(do (actions/talk entities :ego %)
(actions/talk entities :wizard "Or else I'll turn you into a frog!" :anim :talk-angry :stop? false)

View File

@@ -1130,7 +1130,7 @@ void main()
(fn [screen entities]
(let [screen (assoc screen :total-time 0)]
(utils/setup-viewport screen 640 480)
{:label (assoc (label "Demo version - DO NOT COPY" (color :white) ) :y 0 :x 5 :baseline 0 :opacity 0.5)}))
{:label (assoc (label "Demo version - DO NOT COPY" (color :white) ) :y 460 :x 5 :baseline 0 :opacity 0.5)}))
:on-render
(fn [screen [entities]]

View File

@@ -198,7 +198,7 @@
(tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 1.0
:finish (fn [entities]
(utils/stop-sound (:music entities))
(set-screen! @(resolve 'advent.core/advent) scene/scene scene/hud dialogue/talking-screen dialogue/choice-screen inventory/inventory-screen safe/safe-screen scene/demo fade/fade-screen)
(set-screen! @(resolve 'advent.core/advent) scene/scene scene/demo scene/hud dialogue/talking-screen dialogue/choice-screen inventory/inventory-screen safe/safe-screen fade/fade-screen)
entities)
:ease tween/ease-in-cubic))
(assoc-in [:tweens :fade-out-music]