[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs e0856fc881 244/472: Refactor wall tiles functions
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs e0856fc881 244/472: Refactor wall tiles functions (#131): |
Date: |
Thu, 6 Jan 2022 21:59:28 -0500 (EST) |
branch: elpa/pacmacs
commit e0856fc8819e312e4ec29a472604f49eebfffeb4
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Refactor wall tiles functions (#131):
- Rename create-wall-block to create-wall-tile
- Introduce wall-tile-at function
---
pacmacs-image.el | 12 ++++++------
pacmacs.el | 15 +++++++++------
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/pacmacs-image.el b/pacmacs-image.el
index 7a0749054d..8e444c8d11 100644
--- a/pacmacs-image.el
+++ b/pacmacs-image.el
@@ -80,13 +80,13 @@
(if bit 1 0))))
result))
-(defun pacmacs--create-wall-block (width
- height color
+(defun pacmacs--create-wall-tile (width
+ height color
- bottom right
- top left
- left-upper right-upper
- left-bottom right-bottom)
+ bottom right
+ top left
+ left-upper right-upper
+ left-bottom right-bottom)
(let ((cache-index
(pacmacs--bit-list-to-integer
(list bottom right top left
diff --git a/pacmacs.el b/pacmacs.el
index bf73ce8517..4075f944d5 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -510,6 +510,14 @@
(-sort #'string-lessp)
(apply #'vector)))
+(defun pacmacs--wall-tile-at (row column)
+ (apply #'pacmacs--create-wall-tile
+ 40 40 "#5555ff"
+ (-map (-lambda ((row . column))
+ (not (pacmacs--wall-at-p row column)))
+ (append (pacmacs--possible-side-ways row column)
+ (pacmacs--possible-diagonal-ways row column)))))
+
(defun pacmacs--load-map (map-name)
(let* ((lines (split-string (->> map-name
(format "./maps/%s.txt")
@@ -551,12 +559,7 @@
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-side-ways row column)
-
(pacmacs--possible-diagonal-ways row column))))))))))
+ (pacmacs--wall-tile-at row column)))))))
(provide 'pacmacs)
- [nongnu] elpa/pacmacs 9fd3009e5a 442/472: Merge pull request #206 from codingteam/bug/quit-game-over-with-q-202, (continued)
- [nongnu] elpa/pacmacs 9fd3009e5a 442/472: Merge pull request #206 from codingteam/bug/quit-game-over-with-q-202, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 95cce606fd 024/472: Support for Aseprite animation format. Close #16, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 09aa49c6b0 065/472: UTs for pacman-image. Close #52, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ee893d28bd 180/472: Add module for recording action (#115), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 95c046205a 187/472: Compilation warnings as errors (#123), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fe40eb20c7 190/472: Merge branch 'coverage-dropped-124' (#124), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8e36b66a6f 199/472: Make object-board contain list of object (#126), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 6b43cde65d 223/472: Add big pill game object (#81), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0546e964b1 222/472: Connected walls proof of concept for #131, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 19ffa64f7e 230/472: Merge branch 'master' into connecte-walls, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e0856fc881 244/472: Refactor wall tiles functions (#131):,
ELPA Syncer <=
- [nongnu] elpa/pacmacs 79aa80e1d2 245/472: Merge branch 'connecte-walls'. Close #131, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2b9811e71b 246/472: Add README for tools, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8e00815b4f 253/472: Disable undo for Pacmacs buffer. Close #143, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8a79a510ea 257/472: Blinking big pill (#81), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 93d8b91792 266/472: Merge branch 'automate-sprite-generting-26'., ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e618da968d 279/472: Add UT for pacmacs--sort-score-table, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9ec0ff9f4d 280/472: Add UT for pacmacs--render-score-table, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 612d7ff1dd 297/472: UT for pacmacs--decrease-terrified-timers (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4ab8f5d799 300/472: Unbind replace-game-objects from glob lists (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4396ec7412 315/472: Fix FIXME in handle-ghost-blinking-threshold, ELPA Syncer, 2022/01/06