diff options
author | Boutade <thegoofist@protonmail.com> | 2019-10-11 08:47:42 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-10-11 08:47:42 -0500 |
commit | c85f71217c22ef26ff7a02d47bf31a175764fd55 (patch) | |
tree | 9309945bd8f6826de95bd1501a3507f5a607f4ae | |
parent | 89a57373ad50be71d863bba415f40e04467e560a (diff) |
added nance assets
-rw-r--r-- | assets.lisp | 21 | ||||
-rw-r--r-- | assets/Nance.png | bin | 0 -> 148181 bytes | |||
-rw-r--r-- | the-price-of-a-cup-of-coffee.asd | 1 | ||||
-rw-r--r-- | the-price-of-a-cup-of-coffee.lisp | 2 |
4 files changed, 24 insertions, 0 deletions
diff --git a/assets.lisp b/assets.lisp new file mode 100644 index 0000000..0adf417 --- /dev/null +++ b/assets.lisp @@ -0,0 +1,21 @@ + +(in-package #:the-price-of-a-cup-of-coffee) + + +(defparameter +nance-sheet-image+ "assets/Nance.png") + +(defparameter +nance-tiles+ + '((:NAME "Back" :X 256 :Y 128 :WIDTH 64 :HEIGHT 128) + (:NAME "Front" :X 320 :Y 0 :WIDTH 64 :HEIGHT 128) + (:NAME "ProfileLeft" :X 192 :Y 128 :PATH :WIDTH 64 :HEIGHT 128) + (:NAME "ProfileRight" :X 256 :Y 0 :PATH :WIDTH 64 :HEIGHT 128) + (:NAME "WalkBack1" :X 64 :Y 128 :WIDTH 64 :HEIGHT 128) + (:NAME "WalkBack2" :X 128 :Y 128 :WIDTH 64 :HEIGHT 128) + (:NAME "WalkForward1" :X 0 :Y 256 :WIDTH 64 :HEIGHT 128) + (:NAME "WalkForward2" :X 192 :Y 0 :WIDTH 64 :HEIGHT 128) + (:NAME "WalkLeft1" :X 128 :Y 0 :WIDTH 64 :HEIGHT 128) + (:NAME "WalkLeft2" :X 0 :Y 128 :WIDTH 64 :HEIGHT 128) + (:NAME "WalkRight1" :X 64 :Y 0 :WIDTH 64 :HEIGHT 128) + (:NAME "WalkRight2" :X 0 :Y 0 :WIDTH 64 :HEIGHT 128))) + + diff --git a/assets/Nance.png b/assets/Nance.png Binary files differnew file mode 100644 index 0000000..42bd6f8 --- /dev/null +++ b/assets/Nance.png diff --git a/the-price-of-a-cup-of-coffee.asd b/the-price-of-a-cup-of-coffee.asd index 00bb264..59de235 100644 --- a/the-price-of-a-cup-of-coffee.asd +++ b/the-price-of-a-cup-of-coffee.asd @@ -8,4 +8,5 @@ :serial t :depends-on (#:animise #:sdl2 #:sdl2-image #:harmony) :components ((:file "package") + (:file "assets") (:file "the-price-of-a-cup-of-coffee"))) diff --git a/the-price-of-a-cup-of-coffee.lisp b/the-price-of-a-cup-of-coffee.lisp index 50f8cf3..af7e73a 100644 --- a/the-price-of-a-cup-of-coffee.lisp +++ b/the-price-of-a-cup-of-coffee.lisp @@ -25,6 +25,7 @@ :initform nil :initarg (make-keyword-symbol slot)))))) + (def-normal-class pedestrian () (walk-vec (list 2 0)) (comfort-rad 60) @@ -49,6 +50,7 @@ (sdl2:with-window (win :w 800 :h 600 :title "The Price Of A Cup Of Coffee" :flags '(:shown)) (sdl2:with-renderer (rndr win :flags '(:accelerated)) (sdl2:with-event-loop (:method :poll) + (:keydown (:keysym keysym) (if (sdl2:scancode= (sdl2:scancode-value keysym) :scancode-escape) (sdl2:push-event :quit))) |