summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets.lisp21
-rw-r--r--assets/Nance.pngbin0 -> 148181 bytes
-rw-r--r--the-price-of-a-cup-of-coffee.asd1
-rw-r--r--the-price-of-a-cup-of-coffee.lisp2
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
new file mode 100644
index 0000000..42bd6f8
--- /dev/null
+++ b/assets/Nance.png
Binary files differ
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)))