Skip to content

Commit

Permalink
Add algae
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandevai committed Apr 20, 2020
1 parent 8c8a126 commit fb15d82
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
18 changes: 17 additions & 1 deletion source/data.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,25 @@
;; 061:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
;; 062:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
;; 063:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
;; 067:0000000000000000000000000300000003000000033000000330000003330000
;; 068:0000000003300000033300000033300000033300000033000000333000000330
;; 069:0000300000003300000033000000333000003330000033300000033000000330
;; 070:3000000033000000333000000333300000033300000033300000333000003330
;; 077:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00ee0000000000000000000000000
;; 078:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00ee0000000000000000000000000
;; 079:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00ee0000000000000000000000000
;; 083:0033000000333000003330000003330000033330000033300000333300000333
;; 084:0000033000000330000003300000333000003330000333000033330003333300
;; 085:0000033000000330000003300000033000000330000003300000333000003330
;; 086:0003330000333300033330000333000003330000333300003333000033330000
;; 099:0000033300003333000033330003333300033330003330000333300003330000
;; 100:0333300033330000333300003333000033330000033330000333330000333300
;; 101:0003333000033300003333000033330003333300033333000333330003333300
;; 102:3333000033330000033300000333000003330000033300000333300000333000
;; 115:3333000033330000333300003333300033333333033333330033333300033333
;; 116:0033333000333330003333300033333000333330003333330033333300033333
;; 117:0333330000333300003333300033333000333330003333300033333003333300
;; 118:0033300000333300003333000033330000333300003333300333333003333330
;; 128:5555555555555555555555555555555555555555555555555555555555555555
;; 131:0065555505555555007665550005555500575655000057560005675700000050
;; 132:5555555055556000555555005556700056565500657500005757500000500000
Expand Down Expand Up @@ -233,5 +249,5 @@
;; </TRACKS>

;; <PALETTE>
;; 000:141428fa0c36bbcc5204fa0400ff000c0c10202d518e2e913c405591142c5d8161599dcaf2f4f60cff08201834f661ba
;; 000:141428fa0c36bbcc5218282c00ff000c0c10202d518e2e913c405591142c5d8161599dcaf2f4f60cff08201834f661ba
;; </PALETTE>
15 changes: 11 additions & 4 deletions source/main.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -1840,14 +1840,19 @@
(global *enemy-wave* :first-wave)
(global *boss-life* -1)
(global *boss-killed* false)
(global *music-playing* true)

;; Controls which message to display in the game over screen
(global highscore-flag false)
(global *game-state* "win"))
(global *game-state* "menu"))

(fn update-win-screen []
(cls 5)
(music 0)

(when (not *music-playing*)
(global *music-playing* true)
(music 0))

(local title-string "YOU WON!!!")
(local width (print title-string 0 -16 12 true 2))
(print title-string (// (- 240 width) 2) (* 2 8) 12 true 2)
Expand Down Expand Up @@ -1943,9 +1948,11 @@
(= *game-state* "win")
(if (< *time-elapsed* 10)
(do (when (> *cam*.speedx 10) (set *cam*.speedx 10))
(music)
(if *music-playing*
(global *music-playing* false)
(music))
(when (= (% *tick* 45) 0)
(sfx 9 24 -1 3 10 0)
(sfx 9 (r 20 30) -1 0 10 0)
(local emitter (deepcopy *pexplosion-emitter*))
(set emitter.x (r 10 230))
(set emitter.y (r 10 126))
Expand Down

0 comments on commit fb15d82

Please sign in to comment.