[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 6bb1f0d0a7 375/472: Rename wall-blocks to wall-til
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 6bb1f0d0a7 375/472: Rename wall-blocks to wall-tiles (#138) |
Date: |
Thu, 6 Jan 2022 21:59:40 -0500 (EST) |
branch: elpa/pacmacs
commit 6bb1f0d0a72fca88de1d0a749b062bf4a18e48c6
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Rename wall-blocks to wall-tiles (#138)
---
pacmacs-image.el | 52 ++++++++++++++++++++++++++--------------------------
pacmacs.el | 2 +-
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/pacmacs-image.el b/pacmacs-image.el
index 5ea8c17ba3..06d901ecce 100644
--- a/pacmacs-image.el
+++ b/pacmacs-image.el
@@ -40,12 +40,12 @@
(defconst pacmacs--wall-color "#5555ff")
(defconst pacmacs--wall-weight 10)
-(defvar pacmacs--wall-blocks
+(defvar pacmacs--wall-tiles-cache
(make-hash-table))
-(defun pacmacs--clear-wall-cache ()
+(defun pacmacs--clear-wall-tiles-cache ()
(interactive)
- (clrhash pacmacs--wall-blocks))
+ (clrhash pacmacs--wall-tiles-cache))
(defun pacmacs-load-image (filename)
(create-image filename 'xpm nil :heuristic-mask t))
@@ -146,59 +146,59 @@
(defun pacmacs--wall-bits-get-bars (wall-bits)
(-take 4 wall-bits))
-(defun pacmacs--put-inner-corners (wall-block width height weight wall-bits)
+(defun pacmacs--put-inner-corners (wall-tile width height weight wall-bits)
(-let (((left-upper right-upper left-bottom right-bottom)
(pacmacs--wall-bits-get-corners wall-bits)))
(when left-upper
- (pacmacs--put-bits-dot wall-block 0 0 weight
+ (pacmacs--put-bits-dot wall-tile 0 0 weight
(pacmacs--two-weights-to-color nil nil nil
weight)))
(when right-upper
- (pacmacs--put-bits-dot wall-block 0 (- width weight) weight
+ (pacmacs--put-bits-dot wall-tile 0 (- width weight) weight
(pacmacs--two-weights-to-color nil t nil weight)))
(when left-bottom
- (pacmacs--put-bits-dot wall-block (- height weight) 0 weight
+ (pacmacs--put-bits-dot wall-tile (- height weight) 0 weight
(pacmacs--two-weights-to-color t nil nil weight)))
(when right-bottom
- (pacmacs--put-bits-dot wall-block (- height weight) (- width weight)
weight
+ (pacmacs--put-bits-dot wall-tile (- height weight) (- width weight)
weight
(pacmacs--two-weights-to-color t t nil weight)))))
-(defun pacmacs--put-bars (wall-block width height weight wall-bits)
+(defun pacmacs--put-bars (wall-tile width height weight wall-bits)
(-let (((bottom right top left)
(pacmacs--wall-bits-get-bars wall-bits)))
(when left
- (pacmacs--put-vertical-bar wall-block 0 height weight #'identity))
+ (pacmacs--put-vertical-bar wall-tile 0 height weight #'identity))
(when right
- (pacmacs--put-vertical-bar wall-block (- width weight) height weight
+ (pacmacs--put-vertical-bar wall-tile (- width weight) height weight
(pacmacs--inverted-weight-to-color weight)))
(when top
- (pacmacs--put-horizontal-bar wall-block 0 width weight #'identity))
+ (pacmacs--put-horizontal-bar wall-tile 0 width weight #'identity))
(when bottom
- (pacmacs--put-horizontal-bar wall-block (- height weight) width weight
+ (pacmacs--put-horizontal-bar wall-tile (- height weight) width weight
(pacmacs--inverted-weight-to-color
weight)))))
-(defun pacmacs--put-outer-corners (wall-block width height weight wall-bits)
+(defun pacmacs--put-outer-corners (wall-tile width height weight wall-bits)
(-let (((bottom right top left)
(pacmacs--wall-bits-get-bars wall-bits)))
(when (and left top) ;left-upper
- (pacmacs--put-bits-dot wall-block 0 0 weight
+ (pacmacs--put-bits-dot wall-tile 0 0 weight
(pacmacs--two-weights-to-color t t t weight)))
(when (and right top) ;right-upper
- (pacmacs--put-bits-dot wall-block 0 (- width weight) weight
+ (pacmacs--put-bits-dot wall-tile 0 (- width weight) weight
(pacmacs--two-weights-to-color t nil t weight)))
(when (and left bottom) ;left-bottom
- (pacmacs--put-bits-dot wall-block (- height weight) 0 weight
+ (pacmacs--put-bits-dot wall-tile (- height weight) 0 weight
(pacmacs--two-weights-to-color nil t t weight)))
(when (and right bottom) ;right-bottom
- (pacmacs--put-bits-dot wall-block (- height weight) (- width weight)
weight
+ (pacmacs--put-bits-dot wall-tile (- height weight) (- width weight)
weight
(pacmacs--two-weights-to-color nil nil t weight)))
))
@@ -213,25 +213,25 @@
(cache-index (-> wall-bits
(pacmacs--normalize-wall-bits)
(pacmacs--bit-list-to-integer))))
- (-if-let (cached-tile (gethash cache-index pacmacs--wall-blocks))
+ (-if-let (cached-tile (gethash cache-index pacmacs--wall-tiles-cache))
cached-tile
(puthash cache-index
- (let* ((wall-block (make-vector width nil))
+ (let* ((wall-tile (make-vector width nil))
(palette (pacmacs--color-hex-gradient
(face-attribute 'default :background)
pacmacs--wall-color
pacmacs--wall-weight)))
(dotimes (i width)
- (aset wall-block i (make-vector height nil)))
+ (aset wall-tile i (make-vector height nil)))
- (pacmacs--put-inner-corners wall-block width height
pacmacs--wall-weight wall-bits)
- (pacmacs--put-bars wall-block width height
pacmacs--wall-weight wall-bits)
- (pacmacs--put-outer-corners wall-block width height
pacmacs--wall-weight wall-bits)
+ (pacmacs--put-inner-corners wall-tile width height
pacmacs--wall-weight wall-bits)
+ (pacmacs--put-bars wall-tile width height
pacmacs--wall-weight wall-bits)
+ (pacmacs--put-outer-corners wall-tile width height
pacmacs--wall-weight wall-bits)
- (create-image (pacmacs--bits-to-xpm wall-block width height
palette)
+ (create-image (pacmacs--bits-to-xpm wall-tile width height
palette)
'xpm t))
- pacmacs--wall-blocks))))
+ pacmacs--wall-tiles-cache))))
(provide 'pacmacs-image)
diff --git a/pacmacs.el b/pacmacs.el
index 591e61d39f..71aa2cc8e0 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -98,7 +98,7 @@
(pacmacs-mode))
(defun pacmacs--initialize-game (tick-function)
- (pacmacs--clear-wall-cache)
+ (pacmacs--clear-wall-tiles-cache)
(switch-to-buffer pacmacs-buffer-name)
(buffer-disable-undo pacmacs-buffer-name)
- [nongnu] elpa/pacmacs 3344de1bbe 322/472: Adapt render-track-board for new track board, (continued)
- [nongnu] elpa/pacmacs 3344de1bbe 322/472: Adapt render-track-board for new track board, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 481eb8bd37 326/472: Merge pull request #169 from codingteam/distances-instead-of-directions-159, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 31d7305439 331/472: Add 2nd big pill level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 862f9b7f9e 332/472: Add 3d big pill level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 375d85e49b 344/472: Add pacmacs-replay-finished-hook, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ffc0195b9a 346/472: Merge pull request #176 from codingteam/refactor-it-recorder, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ebeba826ce 356/472: Merge pull request #180 from codingteam/headers-urls-178, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ab77f7a391 360/472: Terrify already terrified ghosts first (#173), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2425a26d88 364/472: Use push instead of add-to-list (#182), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a90b8d6352 372/472: Clear wall cache on game start (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 6bb1f0d0a7 375/472: Rename wall-blocks to wall-tiles (#138),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 20d89a67cf 384/472: Enable debug on error for ATT script (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a97d195e12 391/472: Merge pull request #188 from codingteam/qfix/move-measure-time-to-rr, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 75e26090e5 393/472: Add UT for clear-wall-tiles-cache, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1b658fe6aa 405/472: Calc new score position (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 508d15dff5 415/472: Fix compilation errors (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 953f9901d9 421/472: Remove register-new-score function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 70864bb773 447/472: Indicate that score table is empty (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b9a63f204b 449/472: Rename render-board to render-object-board (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs cd50cff10c 448/472: Disable cursor for score table (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ee83af998d 467/472: Replace deprecated dash-functional dependency, ELPA Syncer, 2022/01/06