[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs d7c9d248e6 385/472: Pass wall bits to create-wall-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs d7c9d248e6 385/472: Pass wall bits to create-wall-tile as list (#138) |
Date: |
Thu, 6 Jan 2022 21:59:41 -0500 (EST) |
branch: elpa/pacmacs
commit d7c9d248e60d3e4a9525bb44e80980ad96a6c4d1
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Pass wall bits to create-wall-tile as list (#138)
---
pacmacs-image.el | 15 ++++++---------
pacmacs-render.el | 3 +--
pacmacs.el | 12 ++++++------
3 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/pacmacs-image.el b/pacmacs-image.el
index 90b92757f4..6f2e3d25aa 100644
--- a/pacmacs-image.el
+++ b/pacmacs-image.el
@@ -201,15 +201,12 @@
(pacmacs--put-wall-tile-corner wall-tile (- height weight) (- width
weight) weight
(pacmacs--two-weights-to-color nil nil t
weight)))))
-(defun pacmacs--create-wall-tile (width height
- bottom right
- top left
- left-upper right-upper
- left-bottom right-bottom)
- (let* ((wall-bits (list bottom right top left
- left-upper right-upper
- left-bottom right-bottom))
- (cache-index (-> wall-bits
+(defun pacmacs--create-wall-tile (width height wall-bits)
+ "Creates a wall tile based on the WALL-BITS.
+WALL-BITS go as follow (bottom right top left left-upper
+right-upper left-bottom right-bottom). WIDTH and HEIGHT are the
+size of the tile. All the created tiles are cached."
+ (let* ((cache-index (-> wall-bits
(pacmacs--normalize-wall-bits)
(pacmacs--bit-list-to-integer))))
(-if-let (cached-tile (gethash cache-index pacmacs--wall-tiles-cache))
diff --git a/pacmacs-render.el b/pacmacs-render.el
index bf303db5bc..274a16a1d6 100644
--- a/pacmacs-render.el
+++ b/pacmacs-render.el
@@ -41,8 +41,7 @@
(defun pacmacs--render-empty-cell ()
(pacmacs-insert-image (pacmacs--create-wall-tile
40 40
- nil nil nil nil
- nil nil nil nil)
+ (make-list 8 nil))
'(0 0 40 40)))
(defun pacmacs--render-life-icon ()
diff --git a/pacmacs.el b/pacmacs.el
index 71aa2cc8e0..eb5e387172 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -666,12 +666,12 @@
(apply #'vector)))
(defun pacmacs--wall-tile-at (row column)
- (apply #'pacmacs--create-wall-tile
- 40 40
- (-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--create-wall-tile
+ 40 40
+ (-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
- [nongnu] elpa/pacmacs e228a3c95d 334/472: Add 5th big pill level (#162), (continued)
- [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
- [nongnu] elpa/pacmacs 9cb0cbab39 352/472: Merge pull request #172 from codingteam/unterrified-original-possition-171, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 61c37f08b1 355/472: Update URL in the headers (#178), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fad3786449 361/472: Use push instead of add-to-list (#173), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 6a91d72f35 359/472: terrify-ghost instead of reset-terrified-ghost, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f7f962303b 371/472: Use background for start gradient color (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c7a3a4cbac 388/472: Merge pull request #184 from codingteam/update-readme-179, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ecf71a3f49 378/472: Rename put-bits-dot to put-wall-tile-corner (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d7c9d248e6 385/472: Pass wall bits to create-wall-tile as list (#138),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 66cdd67cbb 387/472: Merge pull request #186 from codingteam/prettier-walls-138, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 365bfaee8e 386/472: Fix create-wall-tile UT (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f9c2eada4c 390/472: Move measure-time function to pacmacs-rr module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e037903a5b 401/472: Switch to game over mode on game over state (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 54af862690 403/472: Add position-of-new-score function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 389db1a10b 412/472: Remove pacmacs-game-over-state-rendered var (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e59d6bda5a 430/472: Add pacmacs-levels-folder custom (#191), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fc06a12e07 441/472: Merge pull request #204 from codingteam/bug/game-over-tiles-soft-wrap-201, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 447882d2ef 439/472: Quit Game Over state with q key (#202), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5317f7c51d 457/472: pacmacs-score is dead, long live pacmacs-score!, ELPA Syncer, 2022/01/06