[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs e06beacb11 242/472: Assign wall tiles on load map
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs e06beacb11 242/472: Assign wall tiles on load map (#131) |
Date: |
Thu, 6 Jan 2022 21:59:28 -0500 (EST) |
branch: elpa/pacmacs
commit e06beacb117b24c368d1b0c2e03aaad0a8fdfc7d
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Assign wall tiles on load map (#131)
---
pacmacs.el | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/pacmacs.el b/pacmacs.el
index a84418f825..61fe4e964d 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -124,8 +124,7 @@
(pacmacs--load-current-level))
(defun pacmacs--make-wall-cell (row column)
- (list :current-animation (pacmacs-make-anim (list (pacmacs-make-frame '(0 0
40 40) 100))
- (pacmacs-create-color-block 40
40 "red"))
+ (list :current-animation nil
:row row
:column column
:type 'wall))
@@ -456,20 +455,7 @@
(dotimes (column width)
(let ((anim-object (car (pacmacs--cell-wrapped-get
pacmacs--object-board
row column))))
- (plist-bind ((type :type))
- anim-object
- (if (not (equal type 'wall))
- (pacmacs--render-object anim-object)
- (pacmacs-insert-image (apply #'pacmacs--create-wall-block
- 40 40 "#5555ff"
- (-map (-lambda ((row . column))
- (not
(pacmacs--wall-at-p row column)))
- (append
(pacmacs--possible-ways row column)
- (list (cons (1-
row) (1- column)) ;left-upper
- (cons (1-
row) (1+ column)) ;right-upper
- (cons (1+
row) (1- column)) ;left-bottom
- (cons (1+
row) (1+ column)))))) ;right-bottom
- '(0 0 40 40))))))
+ (pacmacs--render-object anim-object)))
(insert "\n")))
(insert "\n")
(dotimes (i pacmacs-lives)
@@ -550,7 +536,24 @@
((char-equal x ?g)
(add-to-list 'pacmacs--ghosts (pacmacs--make-ghost
row column))))))
- (pacmacs--fill-object-board)))
+
+ (pacmacs--fill-object-board)
+
+ (dolist (wall pacmacs--wall-cells)
+ (plist-bind ((row :row)
+ (column :column))
+ wall
+ (plist-put wall :current-animation
+ (pacmacs-make-anim (list (pacmacs-make-frame '(0 0 40 40)
100))
+ (apply #'pacmacs--create-wall-block
+ 40 40 "#5555ff"
+ (-map (-lambda ((row . column))
+ (not (pacmacs--wall-at-p
row column)))
+ (append
(pacmacs--possible-ways row column)
+ (list (cons (1-
row) (1- column))
+ (cons (1-
row) (1+ column))
+ (cons (1+
row) (1- column))
+ (cons (1+
row) (1+ column))))))))))))
(provide 'pacmacs)
- [nongnu] elpa/pacmacs 13f24ef937 171/472: Implement pause. Close #112, (continued)
- [nongnu] elpa/pacmacs 13f24ef937 171/472: Implement pause. Close #112, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs cf693bef1c 173/472: UTs for pacmacs--levelname-from-filename function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 239e27b0f2 178/472: Update README.md, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d128a6f057 183/472: Enable lexical binding, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9f9a514129 165/472: Add MELPA badge. Close #93, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 02c5a40cd3 193/472: Rename cell get/set as wrapped operations (#105), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs bddb837ffd 200/472: Rename object vars according to convension (#126), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a3b2a5ce44 216/472: Replace pacmacs--file-content with f-read-text (#122), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8f9b38b16e 233/472: Revert all the refactoring in the scope of #81, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 52fec0d180 241/472: Normalize wall generating bits (#131), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e06beacb11 242/472: Assign wall tiles on load map (#131),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 9e7685b818 248/472: Drop XBM support for wall tiles (#141), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5ec5ce8e67 267/472: Remove that pacmacs--object-at-p already!, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c571f5874c 272/472: Extract wall bits normalization, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9a9ecb6679 283/472: Implement direction switching callbacks (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e710f00f69 295/472: Remove pacmacs--unterrify-all-ghosts (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e1ae35d526 316/472: Minimal version of 24.4 as the package requirement, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 73fcaa8a91 324/472: Remove pacmacs--vector+ (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e228a3c95d 334/472: Add 5th big pill level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4924601822 341/472: UT for unterrify-ghost function (#171), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0990672a5b 348/472: Fix stupid typos and mistakes -_-, ELPA Syncer, 2022/01/06