File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 3232
3333(defvar *ui-font* )
3434
35- (defvar *ui-context* )
35+ (defvar *ui-context* ( cffi :null-pointer) )
3636
3737(defvar *quit* )
Original file line number Diff line number Diff line change 8181 +button-background-path+ )
8282 *button-background2*
8383 (al :ensure-loaded #' nk:allegro-create-image
84- +button-background2-path+ )
85- *ui-context*
86- (nk :allegro-init
87- *ui-font* display +window-width+ +window-height+ ))
84+ +button-background2-path+ ))
8885 (setf *storage* (ecs :make-storage))
8986 (load-sprites)
9087 (load-sounds)
104101 (setf *player-entity* player
105102 *deathp* nil ))
106103 (ecs :run-systems *storage* :dt 0d0 ) ; ; HACK: prime system bitmaps
104+ (setf *ui-context*
105+ (nk :allegro-init
106+ *ui-font* display +window-width+ +window-height+ ))
107107 (livesupport :setup-lisp-repl)
108108 (trivial-garbage :gc :full t )
109109 (loop :named event-loop
Original file line number Diff line number Diff line change 1717
1818(ecs :defsystem ui
1919 (:components-rw (ui))
20- (when (plusp ui-active)
20+ (when (and (not (cffi :null-pointer-p *ui-context* ))
21+ (plusp ui-active))
2122 (nk :with-styles *ui-context*
2223 ((:item nk :+style-window-fixed-background+
2324 (nk :style-item-image *window-background* ))
You can’t perform that action at this time.
0 commit comments