[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 7f980e59a4 435/472: Load game-over sign from signs
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 7f980e59a4 435/472: Load game-over sign from signs folder (#191) |
Date: |
Thu, 6 Jan 2022 21:59:46 -0500 (EST) |
branch: elpa/pacmacs
commit 7f980e59a41c6a66794d1dd6f77017a6693e47a9
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Load game-over sign from signs folder (#191)
---
Cask | 1 +
maps/game-over.txt | 12 ------------
pacmacs.el | 17 +++++++++++++----
3 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/Cask b/Cask
index 9f5be6eb2f..f266b0edf2 100644
--- a/Cask
+++ b/Cask
@@ -5,6 +5,7 @@
(files "*.el"
("maps" "maps/*.txt")
+ ("signs" "signs/*.txt")
("sprites" "sprites/*.json")
("sprites" "sprites/*.xpm"))
diff --git a/maps/game-over.txt b/maps/game-over.txt
deleted file mode 100644
index ee635e1f7c..0000000000
--- a/maps/game-over.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
- ### ### ##### ###
- # # # # # # #
- # # ### # # # ###
- # # # # # # # #
- ### # # # # # ###
-
- ### # # ### ###
- # # # # # # #
- # # # # ### ####
- # # ### # # #
- ### # ### # #
diff --git a/pacmacs.el b/pacmacs.el
index 1a09a7702d..8e008f0fa8 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -592,7 +592,7 @@
(widget-delete widget))))
(defun pacmacs--switch-to-game-over-state ()
- (pacmacs--load-map "game-over")
+ (pacmacs--load-map-sign "game-over")
(pacmacs-destroy)
(setq pacmacs-game-state 'game-over)
(pacmacs--render-state)
@@ -738,9 +738,18 @@
(pacmacs--possible-diagonal-ways row column)))))
(defun pacmacs--load-map (map-name)
- (let* ((lines (split-string (->> map-name
- (format "%s/%s.txt"
(pacmacs--get-levels-folder))
- (f-read-text))
+ (->> map-name
+ (format "%s/%s.txt" (pacmacs--get-levels-folder))
+ (pacmacs--load-map-file)))
+
+(defun pacmacs--load-map-sign (sign-name)
+ (->> sign-name
+ (format "./signs/%s.txt")
+ (pacmacs--find-resource-file)
+ (pacmacs--load-map-file)))
+
+(defun pacmacs--load-map-file (map-file-name)
+ (let* ((lines (split-string (f-read-text map-file-name)
"\n" t))
(board-width (apply 'max (mapcar #'length lines)))
(board-height (length lines)))
- [nongnu] elpa/pacmacs 5f3fbbab5a 319/472: Introduce distance based tracking (#159), (continued)
- [nongnu] elpa/pacmacs 5f3fbbab5a 319/472: Introduce distance based tracking (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 784b5c60e4 350/472: Merge pull request #177 from codingteam/qfix/broken-att-script, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b7a57c2d8e 353/472: Remove w/o BP tutorial level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4ce9773129 365/472: Merge pull request #183 from codingteam/push-instead-of-add-to-list-182, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 25e1fc9f85 369/472: Interactive function to clean wall cache (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b8ad3a5421 370/472: Fix game over sign (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 78be23ea40 392/472: Remove make-terrifed-ghost function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1d52833fef 406/472: Add render-score-record function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs bd030753f0 411/472: Reset pacmacs-score to 0 (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 542e38a612 429/472: Fix README for sprites folder, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7f980e59a4 435/472: Load game-over sign from signs folder (#191),
ELPA Syncer <=
- [nongnu] elpa/pacmacs b7caafa647 436/472: Merge pull request #200 from codingteam/customize-level-folder-191, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f174ccb540 438/472: Enable truncate-lines for Game Over page (#201), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs bc62e40d25 444/472: Make rendering more reusable (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 314809f2a7 443/472: Merge branch 'master' into feature/awesome-score-sign-203, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5f12be8d33 450/472: Move render-object-board to pacmacs-render module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 929b367fa2 453/472: Make render-score-table more dumb (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 548155de50 456/472: Dash the mode labels (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5e0bcba1ee 468/472: Merge pull request #224 from basil-conto/blc/dash, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b68e557f36 064/472: Refactor pacman-load-anim function. Close #53, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 3a3ead9ac1 083/472: Support dash. Close #65, ELPA Syncer, 2022/01/06