feat: distinct material palette for BSP 2 courtyard
This commit is contained in:
parent
2fb4042fba
commit
9f657ffcf9
2 changed files with 25 additions and 10 deletions
|
|
@ -41,6 +41,7 @@
|
|||
(var cam-z 416)
|
||||
(var camera nil)
|
||||
(var ceiling-tex nil)
|
||||
(var current-bsp-id 1)
|
||||
(var floor-tex nil)
|
||||
(var land-squash 0)
|
||||
(var last-dt 0.016)
|
||||
|
|
@ -63,6 +64,11 @@
|
|||
(local STONE_WALL_START 2)
|
||||
(local WOOD_COLOR 88)
|
||||
|
||||
(local ASHLAR_COLOR 64)
|
||||
(local ASHLAR_MOSS 68)
|
||||
(local STONE_FLOOR_COLOR 72)
|
||||
(local STONE_TRIM_COLOR 72)
|
||||
|
||||
(fn preload []
|
||||
(when (not network)
|
||||
(set network (net.get))
|
||||
|
|
@ -83,6 +89,20 @@
|
|||
(let [chunk (world:active_chunk)]
|
||||
(and chunk (chunk:ready)))))
|
||||
|
||||
(fn setup-textures [bsp-id]
|
||||
(if (= bsp-id 2)
|
||||
(do
|
||||
(set floor-tex (textures.rough-stone 44442 STONE_FLOOR_COLOR))
|
||||
(set wall-tex (textures.ashlar-wall 55552 ASHLAR_COLOR ASHLAR_MOSS))
|
||||
(set trim-tex (textures.rough-stone 77772 STONE_TRIM_COLOR))
|
||||
(set ceiling-tex (textures.plaster-wall 66662 PLASTER_COLOR)))
|
||||
(do
|
||||
(set floor-tex (textures.wood-planks 44444 WOOD_COLOR))
|
||||
(set wall-tex (textures.cobble-timber 55555 STONE_WALL_START MOSS_COLOR WOOD_COLOR))
|
||||
(set trim-tex (textures.wood-trim 77777 WOOD_COLOR))
|
||||
(set ceiling-tex (textures.plaster-wall 66666 PLASTER_COLOR))))
|
||||
(set current-bsp-id bsp-id))
|
||||
|
||||
(fn init []
|
||||
(pxl8.set_relative_mouse_mode true)
|
||||
(pxl8.load_palette "res/palettes/palette.ase")
|
||||
|
|
@ -113,14 +133,7 @@
|
|||
(set smooth-cam-x cam-x)
|
||||
(set smooth-cam-z cam-z))
|
||||
|
||||
(when (not ceiling-tex)
|
||||
(set ceiling-tex (textures.plaster-wall 66666 PLASTER_COLOR)))
|
||||
(when (not floor-tex)
|
||||
(set floor-tex (textures.wood-planks 44444 WOOD_COLOR)))
|
||||
(when (not trim-tex)
|
||||
(set trim-tex (textures.wood-trim 77777 WOOD_COLOR)))
|
||||
(when (not wall-tex)
|
||||
(set wall-tex (textures.cobble-timber 55555 STONE_WALL_START MOSS_COLOR WOOD_COLOR))))
|
||||
(setup-textures 1))
|
||||
|
||||
(fn setup-materials []
|
||||
(when (and world (not bsp-materials-setup) floor-tex trim-tex wall-tex)
|
||||
|
|
@ -182,6 +195,7 @@
|
|||
(set smooth-cam-x 416)
|
||||
(set smooth-cam-z 416)
|
||||
(set bsp-materials-setup false)
|
||||
(setup-textures 2)
|
||||
(set portal-cooldown 2.0))
|
||||
(= current-id 2)
|
||||
(do
|
||||
|
|
@ -194,6 +208,7 @@
|
|||
(set smooth-cam-x 416)
|
||||
(set smooth-cam-z 416)
|
||||
(set bsp-materials-setup false)
|
||||
(setup-textures 1)
|
||||
(set portal-cooldown 2.0)))))))
|
||||
|
||||
(when world
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue