diff --git a/dialogue.lisp b/dialogue.lisp index b6c375b..5084917 100644 --- a/dialogue.lisp +++ b/dialogue.lisp @@ -13,9 +13,12 @@ ;;;; You should have received a copy of the GNU General Public License ;;;; along with this program. If not, see . -;;;; FLORA-SEARCH-AURORA.OVERWORLD -;;;; All game-functions and data relating to the “overworld” (that is, -;;;; the primary gameplay, the RPG-ish-ish bits). +;;;; FLORA-SEARCH-AURORA.DIALOGUE +;;;; The dialogue-scripting part of the game. This handles all dialogue! + +(defpackage :flora-search-aurora + (:nicknames :fsa :✿) + (:export :player)) (defpackage :flora-search-aurora.dialogue (:nicknames :fsa.dia :dialogue :💬) @@ -298,7 +301,7 @@ The data returned is a list of the box’es top-left coordinate, max-column, and max-row; for use with RENDER-STRING. Like so: ((:x X :y Y) MAX-COLUMN MAX-ROW)" (let* ((speaker-id (dialogue-speaker dialogue)) - (playerp (eq speaker-id 'player)) + (playerp (eq speaker-id '✿:player)) (leftp (not (🌍:getf-entity-data map speaker-id :facing-right))) (text (getf dialogue :text)) (coords (🌍:world-coords->screen-coords (🌍:getf-entity-data map speaker-id :coords)))) diff --git a/overworld.lisp b/overworld.lisp index 44ea661..38ac26d 100644 --- a/overworld.lisp +++ b/overworld.lisp @@ -17,6 +17,11 @@ ;;;; All game-functions and data relating to the “overworld” (that is, ;;;; the primary gameplay, the RPG-ish-ish bits). +(defpackage :flora-search-aurora + (:nicknames :fsa :✿) + (:export :player)) + + (defpackage :flora-search-aurora.overworld (:nicknames :fsa.o :overworld :🌍) (:use :cl @@ -28,8 +33,8 @@ #:aget-item #:getf-act #:getf-know #:move-entity-to #:move-entity #:plist->map - :left :right - :player)) + :left :right)) + (in-package :flora-search-aurora.overworld) @@ -168,8 +173,8 @@ Used primarily in moving between different maps in an overworld state." ;; Copy specific bits of player data from map-a’s :ENTITIES. (mapcar (lambda (player-key) - (setf (getf-entity-data map-b 'player player-key) - (getf-entity-data map-a 'player player-key))) + (setf (getf-entity-data map-b '✿:player player-key) + (getf-entity-data map-a '✿:player player-key))) '(:face :normal-face :talking-face)) map-b) @@ -217,7 +222,7 @@ Returns parameters to be used in the next invocation of OVERWORLD-STATE." (case (getf input :semantic) ;; Interacting with nearby characters/entities ('⌨:🆗 - (let* ((player (getf-entity map 'player)) + (let* ((player (getf-entity map '✿:player)) (interactee (car (entities-near-entity player (gethash :entities map)))) (interactee-id (car interactee)) (interaction (getf (cdr interactee) :interact))) @@ -241,8 +246,8 @@ Returns parameters to be used in the next invocation of OVERWORLD-STATE." (defun move-player (map &key (Δx 0) (Δy 0)) - (move-entity map 'player :Δx Δx :Δy Δy) - (let* ((coords (getf-entity-data map 'player :coords)) + (move-entity map '✿:player :Δx Δx :Δy Δy) + (let* ((coords (getf-entity-data map '✿:player :coords)) (trigger (trigger-at-coords map (list :x (getf coords :x) :y (getf coords :y))))) (if (and trigger (getf trigger :function)) (apply (string->symbol (getf trigger :function)) @@ -288,7 +293,7 @@ Returns parameters to be used in the next invocation of OVERWORLD-STATE." (defun overworld-state-draw (matrix map) "Draw the overworld map to the given matrix. A core part of OVERWORLD-STATE." - (let* ((chunk (world-coords-chunk (getf-entity-data map 'player :coords)))) + (let* ((chunk (world-coords-chunk (getf-entity-data map '✿:player :coords)))) (matrix-write-tiles matrix (gethash :tiles map) chunk) (matrix-write-entities matrix map chunk) (when (gethash :seconds map)