Split package definitions into packages.lisp
This commit is contained in:
parent
b38d4ca436
commit
d0cb621320
|
@ -1,2 +1,3 @@
|
|||
res/maps/flashback-school.tmx.lisp
|
||||
res/maps/casino.tmx.lisp
|
||||
res/maps/outdoors.tmx.lisp
|
||||
|
|
|
@ -16,20 +16,8 @@
|
|||
;;;; 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 :💬)
|
||||
(:use :cl)
|
||||
(:export #:dialogue-state #:make-dialogue-state
|
||||
#:start-dialogue #:face #:say #:mumble #:move
|
||||
:normal-face :talking-face))
|
||||
|
||||
(in-package :flora-search-aurora.dialogue)
|
||||
|
||||
|
||||
|
||||
;;; ———————————————————————————————————
|
||||
;;; Misc. utilities
|
||||
|
|
|
@ -16,12 +16,6 @@
|
|||
;;;; FLORA-SEARCH-AURORA.DISPLAY
|
||||
;;;; All display-related curses go here.
|
||||
|
||||
(defpackage :flora-search-aurora.display
|
||||
(:nicknames :fsa.d :display :✎)
|
||||
(:use :cl)
|
||||
(:export #:make-screen-matrix #:print-screen-matrix #:matrix-delta
|
||||
#:hide-cursor #:show-cursor #:clear-screen))
|
||||
|
||||
(in-package :flora-search-aurora.display)
|
||||
|
||||
|
||||
|
|
|
@ -17,12 +17,6 @@
|
|||
;;;; The core of the game’s engine, the loop. Not much to see here other
|
||||
;;;; than a loop. Honest!
|
||||
|
||||
|
||||
(defpackage :flora-search-aurora.engine
|
||||
(:nicknames :fsa.eng :engine :⚙)
|
||||
(:export #:state-loop #:main)
|
||||
(:use :cl))
|
||||
|
||||
(in-package :flora-search-aurora.engine)
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
:build-operation "program-op"
|
||||
:build-pathname "flora-search-aurora"
|
||||
:entry-point "flora-search-aurora:main"
|
||||
:components ((:file "util")
|
||||
:components ((:file "packages")
|
||||
(:file "util")
|
||||
(:file "display")
|
||||
(:file "input")
|
||||
(:file "ui")
|
||||
|
|
|
@ -17,14 +17,6 @@
|
|||
;;;; A simple TUI-game made for the text-flavoured LibreJam of 2023-06!
|
||||
;;;; See: https://jamgaroo.xyz/jams/2
|
||||
|
||||
(defpackage :flora-search-aurora
|
||||
(:nicknames :fsa :✿)
|
||||
(:export #:main)
|
||||
(:use :cl
|
||||
:flora-search-aurora.input :flora-search-aurora.display
|
||||
:flora-search-aurora.overworld :flora-search-aurora.dialogue
|
||||
:flora-search-aurora.ui))
|
||||
|
||||
(in-package :flora-search-aurora)
|
||||
|
||||
(defvar *casino-map* nil)
|
||||
|
@ -468,7 +460,7 @@ avoid triggering this."
|
|||
|
||||
|
||||
;;; ———————————————————————————————————
|
||||
;;; Invocation station! 🚆
|
||||
;;; Invocation station! Choo-choo! 🚆
|
||||
;;; ———————————————————————————————————
|
||||
(defun main ()
|
||||
"A pathetic fascimile of a main loop. What does it do? WHAST DOES TI DODOO?
|
||||
|
|
11
input.lisp
11
input.lisp
|
@ -16,17 +16,6 @@
|
|||
;;;; FLORA-SEARCH-AURORA.INPUT
|
||||
;;;; All input-related voodoo goes here: Input reading, translating, parsing, etc.
|
||||
|
||||
(defpackage :flora-search-aurora.input
|
||||
(:use :cl)
|
||||
(:nicknames :fsa.i :input :⌨)
|
||||
(:export #:read-char-plist #:read-gamefied-char-plist
|
||||
#:normalize-char-plist #:gameify-char-plist
|
||||
#:plist-char-p
|
||||
:control :meta :shift
|
||||
+qwerty-layout+ +dvorak-layout+
|
||||
+arrows-game-layout+ +wasd-game-layout+ +ijkl-game-layout+
|
||||
:↑ :← :→ :↓ :🆗 :❎))
|
||||
|
||||
(in-package :flora-search-aurora.input)
|
||||
|
||||
;; Yup, they're hardcoded like this. Horrid, ain't it? ^_^
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
;;;; Copyright © 2023, Jaidyn Ann <jadedctrl@posteo.at>
|
||||
;;;;
|
||||
;;;; This program is free software: you can redistribute it and/or
|
||||
|
@ -17,11 +16,6 @@
|
|||
;;;; FLORA-SEARCH-AURORA.INVENTORY
|
||||
;;;; The menu for inventory selection/management.
|
||||
|
||||
(defpackage :flora-search-aurora.inventory
|
||||
(:nicknames :fsa.inv :inventory :🎒)
|
||||
(:use :cl)
|
||||
(:export #:inventory-state #:make-inventory-state))
|
||||
|
||||
(in-package :flora-search-aurora.inventory)
|
||||
|
||||
|
||||
|
|
|
@ -17,25 +17,6 @@
|
|||
;;;; 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
|
||||
:flora-search-aurora.overworld.util)
|
||||
(:export #:overworld-state #:make-overworld-state #:overworld-state-draw
|
||||
#:merge-maps
|
||||
#:world-coords->screen-coords
|
||||
#:getf-entity #:getf-entity-data #:removef-entity
|
||||
#:aget-item #:getf-act #:getf-know
|
||||
#:move-entity-to #:move-entity
|
||||
#:plist->map
|
||||
:left :right))
|
||||
|
||||
|
||||
(in-package :flora-search-aurora.overworld)
|
||||
|
||||
|
||||
|
|
|
@ -16,16 +16,6 @@
|
|||
;;;; FLORA-SEARCH-AURORA.OVERWORLD.UTIL
|
||||
;;;; Utility functions used by multiple overworld packages (overworld.tiled & overworld).
|
||||
|
||||
(defpackage :flora-search-aurora.overworld.util
|
||||
(:nicknames :fsa.o.u :overworld.util :🌍.…)
|
||||
(:use :cl)
|
||||
(:export #:coords->symbol #:symbol->coords
|
||||
#:world-coords->screen-coords
|
||||
#:world-coords-chunk
|
||||
#:map->plist #:plist->map
|
||||
#:string->symbol
|
||||
#:save-map-to-file))
|
||||
|
||||
(in-package :flora-search-aurora.overworld.util)
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
;;;; Copyright © 2023, Jaidyn Ann <jadedctrl@posteo.at>
|
||||
;;;;
|
||||
;;;; This program is free software: you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU General Public License as
|
||||
;;;; published by the Free Software Foundation, either version 3 of
|
||||
;;;; the License, or (at your option) any later version.
|
||||
;;;;
|
||||
;;;; This program is distributed in the hope that it will be useful,
|
||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;;; GNU General Public License for more details.
|
||||
;;;;
|
||||
;;;; You should have received a copy of the GNU General Public License
|
||||
;;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;;; This contains package definitions for Flora Serĉ’ Kolora.
|
||||
|
||||
(defpackage :flora-search-aurora.util
|
||||
(:nicknames :fsa.utl :util :…)
|
||||
(:use :cl :assoc-utils)
|
||||
(:export #:split-string-by-length
|
||||
#:plist=
|
||||
#:incf-0
|
||||
#:at-least #:at-most
|
||||
#:system-language #:langcode->keysym #:getf-lang))
|
||||
|
||||
(defpackage :flora-search-aurora.input
|
||||
(:use :cl)
|
||||
(:nicknames :fsa.imp :input :⌨)
|
||||
(:export #:read-char-plist #:read-gamefied-char-plist
|
||||
#:normalize-char-plist #:gameify-char-plist
|
||||
#:plist-char-p
|
||||
:control :meta :shift
|
||||
+qwerty-layout+ +dvorak-layout+
|
||||
+arrows-game-layout+ +wasd-game-layout+ +ijkl-game-layout+
|
||||
:↑ :← :→ :↓ :🆗 :❎))
|
||||
|
||||
(defpackage :flora-search-aurora.display
|
||||
(:nicknames :fsa.d :display :✎)
|
||||
(:use :cl)
|
||||
(:export #:make-screen-matrix #:print-screen-matrix #:matrix-delta
|
||||
#:hide-cursor #:show-cursor #:clear-screen))
|
||||
|
||||
(defpackage :flora-search-aurora.ui
|
||||
(:nicknames :fsa.u :ui :📋)
|
||||
(:use :cl :assoc-utils)
|
||||
(:export #:menu-state #:make-menu-state
|
||||
#:render-line #:render-string #:render-string-partially
|
||||
:label :selection :selected))
|
||||
|
||||
(defpackage :flora-search-aurora.dialogue
|
||||
(:nicknames :fsa.dia :dialogue :💬)
|
||||
(:use :cl)
|
||||
(:export #:dialogue-state #:make-dialogue-state
|
||||
#:start-dialogue #:face #:say #:mumble #:move
|
||||
:normal-face :talking-face))
|
||||
|
||||
(defpackage :flora-search-aurora.inventory
|
||||
(:nicknames :fsa.inv :inventory :🎒)
|
||||
(:use :cl)
|
||||
(:export #:inventory-state #:make-inventory-state))
|
||||
|
||||
(defpackage :flora-search-aurora.overworld.util
|
||||
(:nicknames :fsa.o.u :overworld.util :🌍.…)
|
||||
(:use :cl)
|
||||
(:export #:coords->symbol #:symbol->coords
|
||||
#:world-coords->screen-coords
|
||||
#:world-coords-chunk
|
||||
#:map->plist #:plist->map
|
||||
#:string->symbol
|
||||
#:save-map-to-file))
|
||||
|
||||
(defpackage :flora-search-aurora.overworld
|
||||
(:nicknames :fsa.o :overworld :🌍)
|
||||
(:use :cl
|
||||
:flora-search-aurora.overworld.util)
|
||||
(:export #:overworld-state #:make-overworld-state #:overworld-state-draw
|
||||
#:merge-maps
|
||||
#:world-coords->screen-coords
|
||||
#:getf-entity #:getf-entity-data #:removef-entity
|
||||
#:aget-item #:getf-act #:getf-know
|
||||
#:move-entity-to #:move-entity
|
||||
#:plist->map
|
||||
:left :right))
|
||||
|
||||
(defpackage :flora-search-aurora.engine
|
||||
(:nicknames :fsa.eng :engine :⚙)
|
||||
(:export #:state-loop #:main)
|
||||
(:use :cl))
|
||||
|
||||
(defpackage :flora-search-aurora
|
||||
(:nicknames :fsa :✿)
|
||||
(:export #:main
|
||||
:player)
|
||||
(:use :cl
|
||||
:flora-search-aurora.input :flora-search-aurora.display
|
||||
:flora-search-aurora.overworld :flora-search-aurora.dialogue
|
||||
:flora-search-aurora.ui))
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
(ql:quickload '(alexandria cl-tiled assoc-utils str uiop))
|
||||
(load "packages.lisp")
|
||||
(load "util.lisp")
|
||||
(load "overworld.util.lisp")
|
||||
(load "overworld.tiled.lisp")
|
||||
|
||||
(defpackage :flora-search-aurora
|
||||
(:nicknames :fsa :✿)
|
||||
(:export #:main)
|
||||
(:use :cl))
|
||||
|
||||
|
||||
(defun local-path (subpath)
|
||||
(format nil "~A~A" (uiop:getcwd) subpath))
|
||||
|
@ -21,3 +17,5 @@
|
|||
":FLORA-SEARCH-AURORA"
|
||||
(format nil "*~A-map*" map-name)))
|
||||
'("casino" "outdoors" "flashback-school"))
|
||||
|
||||
(quit)
|
||||
|
|
7
ui.lisp
7
ui.lisp
|
@ -17,13 +17,6 @@
|
|||
;;;; Generic menu-making, displaying, and management.
|
||||
;;;; Let's get to it, we're on a deadline!
|
||||
|
||||
(defpackage :flora-search-aurora.ui
|
||||
(:nicknames :fsa.u :ui :📋)
|
||||
(:use :cl :assoc-utils)
|
||||
(:export #:menu-state #:make-menu-state
|
||||
#:render-line #:render-string #:render-string-partially
|
||||
:label :selection :selected))
|
||||
|
||||
(in-package :flora-search-aurora.ui)
|
||||
|
||||
|
||||
|
|
13
util.lisp
13
util.lisp
|
@ -13,19 +13,10 @@
|
|||
;;;; You should have received a copy of the GNU General Public License
|
||||
;;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;;; FLORA-SEARCH-AURORA.UI
|
||||
;;;; Generic menu-making, displaying, and management.
|
||||
;;;; FLORA-SEARCH-AURORA.UTIL
|
||||
;;;; Useful misc. utilities used in multiple packages.
|
||||
;;;; Let's get to it, we're on a deadline!
|
||||
|
||||
(defpackage :flora-search-aurora.util
|
||||
(:nicknames :fsa.ut :util :…)
|
||||
(:use :cl :assoc-utils)
|
||||
(:export #:split-string-by-length
|
||||
#:plist=
|
||||
#:incf-0
|
||||
#:at-least #:at-most
|
||||
#:system-language #:langcode->keysym #:getf-lang))
|
||||
|
||||
(in-package :flora-search-aurora.util)
|
||||
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue