[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 9e7685b818 248/472: Drop XBM support for wall tile
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 9e7685b818 248/472: Drop XBM support for wall tiles (#141) |
Date: |
Thu, 6 Jan 2022 21:59:28 -0500 (EST) |
branch: elpa/pacmacs
commit 9e7685b818a4563e7104b784d66defc1dfdc1ff6
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Drop XBM support for wall tiles (#141)
---
pacmacs-image.el | 27 +++++++++++++++++++++------
pacmacs.el | 2 +-
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/pacmacs-image.el b/pacmacs-image.el
index 8e444c8d11..dc3c518432 100644
--- a/pacmacs-image.el
+++ b/pacmacs-image.el
@@ -80,8 +80,24 @@
(if bit 1 0))))
result))
-(defun pacmacs--create-wall-tile (width
- height color
+(defun pacmacs--bits-to-xpm (bits width height)
+ (concat
+ "/* XPM */\n"
+ "static char *tile[] = {\n"
+ "/**/\n"
+ (format "\"%d %d 2 1\",\n" width height)
+ "\" c None\",\n"
+ "\". c #5555ff\",\n"
+ "/* pixels */\n"
+ (mapconcat
+ (lambda (row)
+ (format "\"%s\""
+ (mapconcat (-lambda (bit) (if bit "." " ")) row "")))
+ bits
+ ",\n")
+ "\n};"))
+
+(defun pacmacs--create-wall-tile (width height
bottom right
top left
@@ -110,7 +126,7 @@
(weight 3))
(dotimes (i width)
- (aset wall-block i (make-bool-vector height nil)))
+ (aset wall-block i (make-vector height nil)))
(when left-upper
(pacmacs--put-bits-dot wall-block 0 0 weight))
@@ -136,9 +152,8 @@
(when bottom
(pacmacs--put-horizontal-bar wall-block (- height weight)
width weight))
- (create-image wall-block 'xbm t :width width :height height
- :foreground color
- :background nil))
+ (create-image (pacmacs--bits-to-xpm wall-block width height)
+ 'xpm t))
pacmacs--wall-blocks))))
(defun pacmacs-create-transparent-block (width height)
diff --git a/pacmacs.el b/pacmacs.el
index 4075f944d5..ffd3103b74 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -512,7 +512,7 @@
(defun pacmacs--wall-tile-at (row column)
(apply #'pacmacs--create-wall-tile
- 40 40 "#5555ff"
+ 40 40
(-map (-lambda ((row . column))
(not (pacmacs--wall-at-p row column)))
(append (pacmacs--possible-side-ways row column)
- [nongnu] elpa/pacmacs cf693bef1c 173/472: UTs for pacmacs--levelname-from-filename function, (continued)
- [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, 2022/01/06
- [nongnu] elpa/pacmacs 9e7685b818 248/472: Drop XBM support for wall tiles (#141),
ELPA Syncer <=
- [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
- [nongnu] elpa/pacmacs 9cb0cbab39 352/472: Merge pull request #172 from codingteam/unterrified-original-possition-171, ELPA Syncer, 2022/01/06