fix screen editor
This commit is contained in:
parent
3a70705efc
commit
6502ac76d9
File diff suppressed because one or more lines are too long
|
@ -88,8 +88,7 @@
|
|||
(self:draw-screen-editor (+ self.position.x 10) (+ self.position.y 10))
|
||||
(self:draw-tile-selector (+ self.position.x 10) (+ self.position.y 20 (* screenh screen-scale)) (- self.size.x 20)))
|
||||
|
||||
(fn ScreenEditView.filename [self] "editor/brushes.json")
|
||||
(fn ScreenEditView.spritegen [self] char-to-sprite)
|
||||
(fn ScreenEditView.resource-key [self] "brushes")
|
||||
(fn ScreenEditView.tilesize [self] (values 8 8))
|
||||
(fn ScreenEditView.get_name [self] (.. "Screen: " self.screenfilename))
|
||||
|
||||
|
|
|
@ -29,13 +29,13 @@
|
|||
|
||||
(fn deserialize [key value root]
|
||||
(match key
|
||||
(where (or :tiles :portraits :font)) (tile-deserialize value root)
|
||||
(where (or :tiles :portraits :font :brushes)) (tile-deserialize value root)
|
||||
:levels (do (set value.map (value.map:fromhex)) value)
|
||||
_ value))
|
||||
|
||||
(fn serialize [key value root]
|
||||
(match key
|
||||
(where (or :tiles :portraits :font)) (tile-serialize value root)
|
||||
(where (or :tiles :portraits :font :brushes)) (tile-serialize value root)
|
||||
:levels (do (set value.map (value.map:tohex)) value)
|
||||
_ value))
|
||||
|
||||
|
@ -66,6 +66,7 @@
|
|||
(fn new-cache [game key]
|
||||
(let [spritegen (match key
|
||||
:font tiledraw.char-to-sprite
|
||||
:brushes tiledraw.char-to-sprite
|
||||
:portraits tiledraw.portrait-to-sprite
|
||||
_ tiledraw.tile-to-sprite)
|
||||
gfx (. game key)]
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue