[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs a7a4146732 234/472: Fix the wall corner gaps (#131
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs a7a4146732 234/472: Fix the wall corner gaps (#131) |
Date: |
Thu, 6 Jan 2022 21:59:27 -0500 (EST) |
branch: elpa/pacmacs
commit a7a4146732509c8647c8305340c9bc618ae61b63
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Fix the wall corner gaps (#131)
---
pacmacs-image.el | 40 +++++++++++++++++++++++++++++-----------
pacmacs.el | 6 +++++-
2 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/pacmacs-image.el b/pacmacs-image.el
index ca67c29157..67730913e3 100644
--- a/pacmacs-image.el
+++ b/pacmacs-image.el
@@ -54,40 +54,58 @@
:foreground nil
:background color))))
-(defun pacmacs--create-wall-block (width height color bottom right top left)
+(defun pacmacs--put-dot (bits row column weight)
+ (dotimes (i weight)
+ (dotimes (j weight)
+ (aset (aref bits (+ i row)) (+ j column) t))))
+
+(defun pacmacs--create-wall-block (width
+ height color
+ bottom right top left
+ left-upper right-upper
+ left-bottom right-bottom)
(let ((wall-block (make-vector
- width nil)))
+ width nil))
+ (weight 3))
(dotimes (i width)
(aset wall-block i (make-bool-vector height nil)))
-
+
+ (when left-upper
+ (pacmacs--put-dot wall-block 0 0 weight))
+
+ (when right-upper
+ (pacmacs--put-dot wall-block 0 (- width weight) weight))
+
+ (when left-bottom
+ (pacmacs--put-dot wall-block (- height weight) 0 weight))
+
+ (when right-bottom
+ (pacmacs--put-dot wall-block (- height weight) (- width weight) weight))
+
(when left
(dotimes (i height)
(aset (aref wall-block i) 0 t)
(aset (aref wall-block i) 1 t)
- (aset (aref wall-block i) 2 t)
- ))
+ (aset (aref wall-block i) 2 t)))
(when right
(dotimes (i height)
(aset (aref wall-block i) (1- width) t)
(aset (aref wall-block i) (- width 2) t)
- (aset (aref wall-block i) (- width 3) t)
- ))
+ (aset (aref wall-block i) (- width 3) t)))
(when top
(dotimes (i width)
(aset (aref wall-block 0) i t)
(aset (aref wall-block 1) i t)
- (aset (aref wall-block 2) i t)
- ))
+ (aset (aref wall-block 2) i t)))
(when bottom
(dotimes (i width)
(aset (aref wall-block (1- height)) i t)
(aset (aref wall-block (- height 2)) i t)
- (aset (aref wall-block (- height 3)) i t)
- ))
+ (aset (aref wall-block (- height 3)) i t)))
(create-image wall-block 'xbm t :width width :height height
:foreground color
diff --git a/pacmacs.el b/pacmacs.el
index 59f9fa3a93..a84418f825 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -464,7 +464,11 @@
40 40 "#5555ff"
(-map (-lambda ((row . column))
(not
(pacmacs--wall-at-p row column)))
- (pacmacs--possible-ways
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))))))
(insert "\n")))
(insert "\n")
- [nongnu] elpa/pacmacs 05e30ca856 076/472: Implement support for frame duration. Close #23, (continued)
- [nongnu] elpa/pacmacs 05e30ca856 076/472: Implement support for frame duration. Close #23, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 05c88e5eef 100/472: UTs for pacmacs--object-at-p (#75), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 01388a06a0 104/472: UTs for pacmacs--track-object (#75), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d9ddd5dab4 132/472: Refactor pacmacs--detect-ghost-collision (#97), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7601c1ae5c 143/472: Rename board vars to buffers (#105), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e69a35e2b3 168/472: Small typo in the README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 63e41ffe23 169/472: Fix the dev workflow in the README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9525cd168b 172/472: Update README about the pause feature, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 98599015bb 229/472: Fix UTs broken by #133 implementation, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e294101a92 231/472: Fix Game Over sign for connected walls (#131), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a7a4146732 234/472: Fix the wall corner gaps (#131),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 528ca62e28 251/472: Merge branch 'drop-xbm-support-141'. Close #141, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7d58295e93 281/472: Fix pacmacs--render-score-table function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c501625be6 282/472: Add Blinking Terrified Ghost animation. Close #155, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs da727a84c1 287/472: Double dash play state logic function (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d49e28e468 293/472: Remove pacmacs--opposite-direction-name (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e12ed88fe7 298/472: Generalize run-away-direction function (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs be52b6410f 294/472: UT for pacmacs--squared-distance (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0103a77462 302/472: Remove replace-filtered-game-objects (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ee76ee2dc0 299/472: UT for pacmacs--run-away-direction (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs cec13dd618 308/472: Fix Emacs 24.3 build fail (#159), ELPA Syncer, 2022/01/06