[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs f79355209d 060/472: Refactor out functions for cre
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs f79355209d 060/472: Refactor out functions for creating images (#51) |
Date: |
Thu, 6 Jan 2022 21:59:13 -0500 (EST) |
branch: elpa/pacmacs
commit f79355209d0365936b01f25d4e70965c8fd0ed03
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Refactor out functions for creating images (#51)
---
pacman-resources.el | 13 +++++++++++++
pacman.el | 14 ++++----------
2 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/pacman-resources.el b/pacman-resources.el
index 87b9a9327d..781ca7d8d1 100644
--- a/pacman-resources.el
+++ b/pacman-resources.el
@@ -39,6 +39,19 @@
(defun pacman-insert-image (resource resource-vector)
(insert-image resource " " nil resource-vector))
+(defun pacman-create-color-block (width height color)
+ (create-image
+ (make-vector
+ width (make-bool-vector height t))
+ 'xbm t :width width :height height
+ :foreground color))
+
+(defun pacman-create-transparent-block (width height)
+ (create-image
+ (make-vector
+ width (make-bool-vector height nil))
+ 'xbm t :width width :height height))
+
(provide 'pacman-resources)
;;; pacman-anim.el ends here
diff --git a/pacman.el b/pacman.el
index dbff9f7b22..cd4dc6437b 100644
--- a/pacman.el
+++ b/pacman.el
@@ -69,19 +69,13 @@
"sprites/Pacman-Chomping-Right.xpm")))
(defvar pacman-empty-cell nil)
(setq pacman-empty-cell
- (list :animation (pacman-make-anim '((0 0 40 40))
- (create-image
- (make-vector
- 40 (make-bool-vector 40 nil))
- 'xbm t :width 40 :height 40))))
+ (list :animation
+ (pacman-make-anim '((0 0 40 40))
+ (pacman-create-transparent-block 40 40))))
(defun pacman--make-wall-cell (row column)
(list :animation (pacman-make-anim '((0 0 40 40))
- (create-image
- (make-vector
- 40 (make-bool-vector 40 t))
- 'xbm t :width 40 :height 40
- :foreground "red"))
+ (pacman-create-color-block 40 40 "red"))
:row row
:column column))
- [nongnu] elpa/pacmacs 25193bcdbf 289/472: Better running away algorithm (#153), (continued)
- [nongnu] elpa/pacmacs 25193bcdbf 289/472: Better running away algorithm (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8fd7660240 290/472: Terrify ghosts by eating big pill (#153), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e4e4053c26 306/472: Ghost terrified time as constant (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1978363e9d 310/472: Fix handle-ghost-blinking-threshold (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a896a83366 312/472: Merge pull request #164 from codingteam/blink-almost-timed-out-159, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d3c94de6da 320/472: Remove UT for pacmacs--track-point (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8b40dc51cf 330/472: Add 1st big pill level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 49292e34d3 342/472: UT for terrified-ghost-timed-out-p function (#171), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 40a3d00209 367/472: Implement glowing walls (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5c45e17c40 399/472: Add docs for destroy function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f79355209d 060/472: Refactor out functions for creating images (#51),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 080aae5f08 070/472: Use plist-bind for pacman-anim-next-frame function (#54), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1e1cebe39a 073/472: Introduce plist-map utility function (#54), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ba7ad0349d 082/472: Rename pacman to pacmacs. Close #66, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c447091a19 085/472: Fix description in the game headers, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e85c81b077 090/472: Enable entire code base for coverage (#70), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e3d914a1ea 097/472: Dropping support for Emacs 24.1 and 24.2. Close #71, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4b08605994 093/472: UTs for duration frame logic. Close #60, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c865fda214 120/472: Merge branch 'board-refactoring-74'. Close #74, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7e8970628c 122/472: Add sprites for Pacman Death animation. Close #44, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 99a90b9c87 125/472: Fix the tunneling effect. Close #88, ELPA Syncer, 2022/01/06