From f7d9a89db443c8449c5f64a1ecf92a9b3abb6fdf Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 17 Apr 2020 09:22:22 -0400 Subject: Day 7 morning progress. --- Makefile.am | 19 +++++++++++++++++++ lisparuga.scm | 34 +++++++++++++++++++++++++++++++++- lisparuga/enemy.scm | 13 ++++++------- lisparuga/game.scm | 12 ++++++------ 4 files changed, 64 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index d0adf2e..a673fef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -56,3 +56,22 @@ SOURCES = \ EXTRA_DIST += \ COPYING + +imagesdir = $(pkgdatadir)/images +dist_images_DATA = \ + assets/images/background.png \ + assets/images/enemies.png \ + assets/images/enemy-bullets.png \ + assets/images/explosion.png \ + assets/images/player-bullets.png \ + assets/images/player.png + +soundsdir = $(pkgdatadir)/sounds +dist_sounds_DATA = \ + assets/sounds/energy-max.wav \ + assets/sounds/explosion.wav \ + assets/sounds/hit.wav \ + assets/sounds/max-chain.wav \ + assets/sounds/player-death.wav \ + assets/sounds/player-missile.wav \ + assets/sounds/player-shoot.wav diff --git a/lisparuga.scm b/lisparuga.scm index 06949cc..125fc55 100644 --- a/lisparuga.scm +++ b/lisparuga.scm @@ -105,6 +105,33 @@ (define-method (win-transition (lisparuga )) (set! (state lisparuga) 'win)) +(define-method (pause-transition (lisparuga )) + (set! (state lisparuga) 'pause) + (pause (& lisparuga game)) + (let ((container (make + #:name 'pause + #:rank 999))) + (attach-to container + (make + #:region (make-rect 80.0 0.0 160.0 240.0) + #:color (make-color 0.0 0.0 0.0 0.4)) + (make