src/sauer_client
src/sauer_server
bin_unix/*
+packages/base/*.BAK
]
materialreset
-texture water "textures/water2.jpg" // water surface
-texture 1 "textures/waterfall.jpg" // waterfall
-texture 1 "textures/watern.jpg" // water normals
-texture 1 "textures/waterdudv.jpg" // water distortion
-texture 1 "textures/waterfalln.jpg" // waterfall normals
-texture 1 "textures/waterfalldudv.jpg" // waterfall distortion
+texture water "textures/water2.png" // water surface
+texture 1 "textures/waterfall.png" // waterfall
+texture 1 "textures/watern.png" // water normals
+texture 1 "textures/waterdudv.png" // water distortion
+texture 1 "textures/waterfalln.png" // waterfall normals
+texture 1 "textures/waterfalldudv.png" // waterfall distortion
-texture lava "textures/floor_lava2.jpg" 0 0 0 2 // lava surface
-texture 1 "textures/floor_lava2.jpg" 0 0 0 2 // falling lava
+texture lava "textures/floor_lava2.png" 0 0 0 2 // lava surface
+texture 1 "textures/floor_lava2.png" 0 0 0 2 // falling lava
// texture definitions for the map:
texturereset // starts the texture slot/index at 0
togglezoom = [ zoom (if (= $zoom 1) -1 1) ]
sayteamcommand = [inputcommand (if (>= $numargs 1) [result $arg1] [result ""]) [sayteam $commandbuf] "[team]"]
-mapcomplete = [ complete $arg1 packages/base ogz ]
+mapcomplete = [ complete $arg1 packages/maps ogz ]
mapcomplete map
modenames = "ffa coop teamplay insta instateam effic efficteam"
guibar
mname = (checkrolloveraction "map " [if (> $numargs 0) [result $arg1] [at $guirollovername 0]])
guilist [
- guiimage (concatword "packages/base/" $mname ".jpg") (checkrolloveraction "map ") 4 1 "data/cube.png" $mname
+ guiimage (concatword "packages/maps/" $mname ".png") (checkrolloveraction "map ") 4 1 "data/cube.png" $mname
]
]
] "custom maps"
showcustommaps = [
custommaps = ""
- loopfiles curmap "packages/base" "ogz" [
+ loopfiles curmap "packages/maps" "ogz" [
if (< (indexof $allmaps $curmap) 0) [
custommaps = (concat $custommaps (escape $curmap))
]
guilist [
guibutton "light..^t^t^t^t^t" "resetlight;showgui newlight"
guibutton "playerstart" "newent playerstart"
- guibutton "base" "newent base"
- guibutton "trigger.." "showgui triggers"
]
guilist [
guibutton "mapmodel..^t^t^f2[F4]^t^t" "showgui mapmodels"
guibutton "playerstart team-1" "newent playerstart 1"
- guibutton "flag team-1" "newent flag 1"
- guibutton "monster.." "showgui monsters"
]
guilist [
guibutton "teleport.." "showgui newteleport"
- guibutton "playerstart team-2" "newent playerstart 2"
- guibutton "flag team-2" "newent flag 2"
]
]
guitext "pickup entities:"
guibutton "cartridges" "newent cartridges"
]
guilist [
+ guibutton "tinyhealth" "newent tinyhealth"
+ guibutton "tinyarmour" "newent tinyarmour"
guibutton "health" "newent health"
guibutton "healthboost" "newent healthboost"
guibutton "greenarmour" "newent greenarmour"
guilist [
guilist [
guitext "cloudlayer^t^t^t^t^t^t"
- guibutton "skyboxes/clouds01.png" [cloudlayer "skyboxes/clouds01.png"]
- guibutton "skyboxes/clouds02.png" [cloudlayer "skyboxes/clouds02.png"]
- guibutton "skyboxes/clouds03.png" [cloudlayer "skyboxes/clouds03.png"]
- guibutton "skyboxes/white_bk.jpg" [cloudlayer "skyboxes/white_bk.jpg"]
+ guibutton "clouds/clouds01.png" [cloudlayer "clouds/clouds01.png"]
+ guibutton "clouds/clouds02.png" [cloudlayer "clouds/clouds02.png"]
+ guibutton "clouds/clouds03.png" [cloudlayer "clouds/clouds03.png"]
]
guilist [
- guibutton "*no clouds*" [cloudlayer ""]
- guibutton "blindabuser/blindaclouds.png" [cloudlayer "blindabuser/blindaclouds.png"]
- guibutton "skyboxes/cloud_ring.png" [cloudlayer "skyboxes/cloud_ring.png"]
- guibutton "textures/razgriz/cloud03.png" [cloudlayer "textures/razgriz/cloud03.png"]
- guibutton "textures/razgriz/cloud04.png" [cloudlayer "textures/razgriz/cloud04.png"]
+ guibutton "*no clouds*" [cloudlayer ""]
+ guibutton "clouds/cloud_ring.png" [cloudlayer "clouds/cloud_ring.png"]
]
]
]
--- /dev/null
+md3load model.md3\r
+md3skin * "diffuse.png" "mask.png"\r
+md3bumpmap * "normal.png"\r
+mdlambient 40\r
+mdlspec 120\r
+mdlscale 75\r
--- /dev/null
+md3load model.md3\r
+md3skin * "diffuse.png" "mask.png"\r
+md3bumpmap * "normal.png"\r
+mdlambient 40\r
+mdlspec 120\r
+mdlscale 75\r
setshader bumpspecmapparallaxglowworld\r
-setshaderparam specscale 2 2 2\r
+setshaderparam specscale 0.6 0.6 0.6\r
setshaderparam parallaxscale 0.04 -0.02\r
setshaderparam glowcolor 1 0.59 0.01\r
\r
-texture 0 "textures/yves_allaire/ex/light_u201_d.jpg"\r
-texture n "textures/yves_allaire/ex/light_u201_local.png"\r
-texture s "textures/yves_allaire/ex/light_u201_s.jpg"\r
-texture z "textures/yves_allaire/ex/light_u201_h.jpg"\r
-texture g "textures/yves_allaire/ex/light_u201_add.jpg"\r
+texture 0 "textures/ex/light_u201_d.png"\r
+texture n "textures/ex/light_u201_local.png"\r
+texture s "textures/ex/light_u201_s.png"\r
+texture z "textures/ex/light_u201_h.png"\r
+texture g "textures/ex/light_u201_add.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/lightpanel_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/lightpanel_01_local.png"\r
-texture s "textures/yves_allaire/ex/lightpanel_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/lightpanel_01_h.jpg"\r
-texture g "textures/yves_allaire/ex/lightpanel_01_add.jpg"\r
+texture 0 "textures/ex/lightpanel_01_d.png"\r
+texture n "textures/ex/lightpanel_01_local.png"\r
+texture s "textures/ex/lightpanel_01_s.png"\r
+texture z "textures/ex/lightpanel_01_h.png"\r
+texture g "textures/ex/lightpanel_01_add.png"\r
texscale 0.5\r
\r
setshader bumpspecmapparallaxworld\r
-setshaderparam specscale 2 2 2\r
+setshaderparam specscale 0.6 0.6 0.6\r
setshaderparam parallaxscale 0.04 -0.02\r
\r
-texture 0 "textures/yves_allaire/ex/clangfloor_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/clangfloor_01_local.png"\r
-texture s "textures/yves_allaire/ex/clangfloor_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/clangfloor_01_h.jpg"\r
+texture 0 "textures/ex/clangfloor_01_d.png"\r
+texture n "textures/ex/clangfloor_01_local.png"\r
+texture s "textures/ex/clangfloor_01_s.png"\r
+texture z "textures/ex/clangfloor_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/clangfloor_01b_d.jpg"\r
-texture n "textures/yves_allaire/ex/clangfloor_01_local.png"\r
-texture s "textures/yves_allaire/ex/clangfloor_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/clangfloor_01_h.jpg"\r
+texture 0 "textures/ex/clangfloor_01b_d.png"\r
+texture n "textures/ex/clangfloor_01_local.png"\r
+texture s "textures/ex/clangfloor_01_s.png"\r
+texture z "textures/ex/clangfloor_01_h.png"\r
texscale 0.5\r
\r
-setshaderparam specscale 1 1 1\r
+setshaderparam specscale 0.3 0.3 0.3\r
\r
-texture 0 "textures/yves_allaire/ex/cretebase_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretebase_01_local.png"\r
-texture s "textures/yves_allaire/ex/cretebase_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretebase_01_h.jpg"\r
+texture 0 "textures/ex/cretebase_01_d.png"\r
+texture n "textures/ex/cretebase_01_local.png"\r
+texture s "textures/ex/cretebase_01_s.png"\r
+texture z "textures/ex/cretebase_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretebase_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretebase_01_local.png"\r
-texture s "textures/yves_allaire/ex/cretebase_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretebase_01_h.jpg"\r
+texture 0 "textures/ex/cretebase_02_d.png"\r
+texture n "textures/ex/cretebase_01_local.png"\r
+texture s "textures/ex/cretebase_01_s.png"\r
+texture z "textures/ex/cretebase_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretebase_03_dark_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretebase_01_local.png"\r
-texture s "textures/yves_allaire/ex/cretebase_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretebase_01_h.jpg"\r
+texture 0 "textures/ex/cretebase_03_dark_d.png"\r
+texture n "textures/ex/cretebase_01_local.png"\r
+texture s "textures/ex/cretebase_01_s.png"\r
+texture z "textures/ex/cretebase_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretefloor_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretefloor_01_local.png"\r
-texture s "textures/yves_allaire/ex/cretefloor_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretefloor_01_h.jpg"\r
+texture 0 "textures/ex/cretefloor_01_d.png"\r
+texture n "textures/ex/cretefloor_01_local.png"\r
+texture s "textures/ex/cretefloor_01_s.png"\r
+texture z "textures/ex/cretefloor_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretefloor_01b_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretefloor_01b_local.png"\r
-texture s "textures/yves_allaire/ex/cretefloor_01b_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretefloor_01b_h.jpg"\r
+texture 0 "textures/ex/cretefloor_01b_d.png"\r
+texture n "textures/ex/cretefloor_01b_local.png"\r
+texture s "textures/ex/cretefloor_01b_s.png"\r
+texture z "textures/ex/cretefloor_01b_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretewall_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretewall_01_local.png"\r
-texture s "textures/yves_allaire/ex/cretewall_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretewall_01_h.jpg"\r
+texture 0 "textures/ex/cretewall_01_d.png"\r
+texture n "textures/ex/cretewall_01_local.png"\r
+texture s "textures/ex/cretewall_01_s.png"\r
+texture z "textures/ex/cretewall_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretewall_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretewall_02_local.png"\r
-texture s "textures/yves_allaire/ex/cretewall_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretewall_02_h.jpg"\r
+texture 0 "textures/ex/cretewall_02_d.png"\r
+texture n "textures/ex/cretewall_02_local.png"\r
+texture s "textures/ex/cretewall_02_s.png"\r
+texture z "textures/ex/cretewall_02_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretewall_03_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretewall_03_local.png"\r
-texture s "textures/yves_allaire/ex/cretewall_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretewall_03_h.jpg"\r
+texture 0 "textures/ex/cretewall_03_d.png"\r
+texture n "textures/ex/cretewall_03_local.png"\r
+texture s "textures/ex/cretewall_03_s.png"\r
+texture z "textures/ex/cretewall_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/cretewall_03b_d.jpg"\r
-texture n "textures/yves_allaire/ex/cretewall_03b_local.png"\r
-texture s "textures/yves_allaire/ex/cretewall_03b_s.jpg"\r
-texture z "textures/yves_allaire/ex/cretewall_03b_h.jpg"\r
+texture 0 "textures/ex/cretewall_03b_d.png"\r
+texture n "textures/ex/cretewall_03b_local.png"\r
+texture s "textures/ex/cretewall_03b_s.png"\r
+texture z "textures/ex/cretewall_03b_h.png"\r
texscale 0.5\r
\r
-setshaderparam specscale 2 2 2\r
+setshaderparam specscale 0.6 0.6 0.6\r
\r
-texture 0 "textures/yves_allaire/ex/deswall_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/deswall_01_local.png"\r
-texture s "textures/yves_allaire/ex/deswall_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/deswall_01_h.jpg"\r
+texture 0 "textures/ex/deswall_01_d.png"\r
+texture n "textures/ex/deswall_01_local.png"\r
+texture s "textures/ex/deswall_01_s.png"\r
+texture z "textures/ex/deswall_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_grate_03_128_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_grate_03_128_local.png"\r
-texture s "textures/yves_allaire/ex/floor_grate_03_128_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_grate_03_128_h.jpg"\r
+texture 0 "textures/ex/floor_grate_03_128_d.png"\r
+texture n "textures/ex/floor_grate_03_128_local.png"\r
+texture s "textures/ex/floor_grate_03_128_s.png"\r
+texture z "textures/ex/floor_grate_03_128_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_grate_03_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_grate_03_local.png"\r
-texture s "textures/yves_allaire/ex/floor_grate_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_grate_03_h.jpg"\r
+texture 0 "textures/ex/floor_grate_03_d.png"\r
+texture n "textures/ex/floor_grate_03_local.png"\r
+texture s "textures/ex/floor_grate_03_s.png"\r
+texture z "textures/ex/floor_grate_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_grate03_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_grate03_local.png"\r
-texture s "textures/yves_allaire/ex/floor_grate03_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_grate03_h.jpg"\r
+texture 0 "textures/ex/floor_grate03_d.png"\r
+texture n "textures/ex/floor_grate03_local.png"\r
+texture s "textures/ex/floor_grate03_s.png"\r
+texture z "textures/ex/floor_grate03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_mtl_grate_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_mtl_grate_01_local.png"\r
-texture s "textures/yves_allaire/ex/floor_mtl_grate_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_mtl_grate_01_h.jpg"\r
+texture 0 "textures/ex/floor_mtl_grate_01_d.png"\r
+texture n "textures/ex/floor_mtl_grate_01_local.png"\r
+texture s "textures/ex/floor_mtl_grate_01_s.png"\r
+texture z "textures/ex/floor_mtl_grate_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_mtl_wrn_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_mtl_wrn_01_local.png"\r
-texture s "textures/yves_allaire/ex/floor_mtl_wrn_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_mtl_wrn_01_h.jpg"\r
+texture 0 "textures/ex/floor_mtl_wrn_01_d.png"\r
+texture n "textures/ex/floor_mtl_wrn_01_local.png"\r
+texture s "textures/ex/floor_mtl_wrn_01_s.png"\r
+texture z "textures/ex/floor_mtl_wrn_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_simple_05_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_simple_05_local.png"\r
-texture s "textures/yves_allaire/ex/floor_simple_05_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_simple_05_h.jpg"\r
+texture 0 "textures/ex/floor_simple_05_d.png"\r
+texture n "textures/ex/floor_simple_05_local.png"\r
+texture s "textures/ex/floor_simple_05_s.png"\r
+texture z "textures/ex/floor_simple_05_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_simplines_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_simplines_local.png"\r
-texture s "textures/yves_allaire/ex/floor_simplines_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_simplines_h.jpg"\r
+texture 0 "textures/ex/floor_simplines_d.png"\r
+texture n "textures/ex/floor_simplines_local.png"\r
+texture s "textures/ex/floor_simplines_s.png"\r
+texture z "textures/ex/floor_simplines_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_tile_03_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_tile_03_local.png"\r
-texture s "textures/yves_allaire/ex/floor_tile_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_tile_03_h.jpg"\r
+texture 0 "textures/ex/floor_tile_03_d.png"\r
+texture n "textures/ex/floor_tile_03_local.png"\r
+texture s "textures/ex/floor_tile_03_s.png"\r
+texture z "textures/ex/floor_tile_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floor_tread_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/floor_tread_01_local.png"\r
-texture s "textures/yves_allaire/ex/floor_tread_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/floor_tread_01_h.jpg"\r
+texture 0 "textures/ex/floor_tread_01_d.png"\r
+texture n "textures/ex/floor_tread_01_local.png"\r
+texture s "textures/ex/floor_tread_01_s.png"\r
+texture z "textures/ex/floor_tread_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/floorpanel_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/floorpanel_01_local.png"\r
-texture s "textures/yves_allaire/ex/floorpanel_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/floorpanel_01_h.jpg"\r
+texture 0 "textures/ex/floorpanel_01_d.png"\r
+texture n "textures/ex/floorpanel_01_local.png"\r
+texture s "textures/ex/floorpanel_01_s.png"\r
+texture z "textures/ex/floorpanel_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metalplate_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/metalplate_01_local.png"\r
-texture s "textures/yves_allaire/ex/metalplate_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/metalplate_01_h.jpg"\r
+texture 0 "textures/ex/metalplate_01_d.png"\r
+texture n "textures/ex/metalplate_01_local.png"\r
+texture s "textures/ex/metalplate_01_s.png"\r
+texture z "textures/ex/metalplate_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_supp_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_supp_01_local.png"\r
-texture s "textures/yves_allaire/ex/metal_supp_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_supp_01_h.jpg"\r
+texture 0 "textures/ex/metal_supp_01_d.png"\r
+texture n "textures/ex/metal_supp_01_local.png"\r
+texture s "textures/ex/metal_supp_01_s.png"\r
+texture z "textures/ex/metal_supp_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_wall_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_wall_02_local.png"\r
-texture s "textures/yves_allaire/ex/metal_wall_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_wall_02_h.jpg"\r
+texture 0 "textures/ex/metal_wall_02_d.png"\r
+texture n "textures/ex/metal_wall_02_local.png"\r
+texture s "textures/ex/metal_wall_02_s.png"\r
+texture z "textures/ex/metal_wall_02_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/mtl_bigplate_04_d.jpg"\r
-texture n "textures/yves_allaire/ex/mtl_bigplate_04_local.png"\r
-texture s "textures/yves_allaire/ex/mtl_bigplate_04_s.jpg"\r
-texture z "textures/yves_allaire/ex/mtl_bigplate_04_h.jpg"\r
+texture 0 "textures/ex/mtl_bigplate_04_d.png"\r
+texture n "textures/ex/mtl_bigplate_04_local.png"\r
+texture s "textures/ex/mtl_bigplate_04_s.png"\r
+texture z "textures/ex/mtl_bigplate_04_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/mtl_bigplate_04b_d.jpg"\r
-texture n "textures/yves_allaire/ex/mtl_bigplate_04b_local.png"\r
-texture s "textures/yves_allaire/ex/mtl_bigplate_04b_s.jpg"\r
-texture z "textures/yves_allaire/ex/mtl_bigplate_04b_h.jpg"\r
+texture 0 "textures/ex/mtl_bigplate_04b_d.png"\r
+texture n "textures/ex/mtl_bigplate_04b_local.png"\r
+texture s "textures/ex/mtl_bigplate_04b_s.png"\r
+texture z "textures/ex/mtl_bigplate_04b_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/mtl_panel_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/mtl_panel_02_local.png"\r
-texture s "textures/yves_allaire/ex/mtl_panel_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/mtl_panel_02_h.jpg"\r
+texture 0 "textures/ex/mtl_panel_02_d.png"\r
+texture n "textures/ex/mtl_panel_02_local.png"\r
+texture s "textures/ex/mtl_panel_02_s.png"\r
+texture z "textures/ex/mtl_panel_02_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/mtl_panel_03_d.jpg"\r
-texture n "textures/yves_allaire/ex/mtl_panel_03_local.png"\r
-texture s "textures/yves_allaire/ex/mtl_panel_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/mtl_panel_03_h.jpg"\r
+texture 0 "textures/ex/mtl_panel_03_d.png"\r
+texture n "textures/ex/mtl_panel_03_local.png"\r
+texture s "textures/ex/mtl_panel_03_s.png"\r
+texture z "textures/ex/mtl_panel_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/mtl_panel_04_d.jpg"\r
-texture n "textures/yves_allaire/ex/mtl_panel_04_local.png"\r
-texture s "textures/yves_allaire/ex/mtl_panel_04_s.jpg"\r
-texture z "textures/yves_allaire/ex/mtl_panel_04_h.jpg"\r
+texture 0 "textures/ex/mtl_panel_04_d.png"\r
+texture n "textures/ex/mtl_panel_04_local.png"\r
+texture s "textures/ex/mtl_panel_04_s.png"\r
+texture z "textures/ex/mtl_panel_04_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/q2_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/q2_01_local.png"\r
-texture s "textures/yves_allaire/ex/q2_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/q2_01_h.jpg"\r
+texture 0 "textures/ex/q2_01_d.png"\r
+texture n "textures/ex/q2_01_local.png"\r
+texture s "textures/ex/q2_01_s.png"\r
+texture z "textures/ex/q2_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/q2_01b_d.jpg"\r
-texture n "textures/yves_allaire/ex/q2_01b_local.png"\r
-texture s "textures/yves_allaire/ex/q2_01b_s.jpg"\r
-texture z "textures/yves_allaire/ex/q2_01b_h.jpg"\r
+texture 0 "textures/ex/q2_01b_d.png"\r
+texture n "textures/ex/q2_01b_local.png"\r
+texture s "textures/ex/q2_01b_s.png"\r
+texture z "textures/ex/q2_01b_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/q2_01c_d.jpg"\r
-texture n "textures/yves_allaire/ex/q2_01c_local.png"\r
-texture s "textures/yves_allaire/ex/q2_01c_s.jpg"\r
-texture z "textures/yves_allaire/ex/q2_01c_h.jpg"\r
+texture 0 "textures/ex/q2_01c_d.png"\r
+texture n "textures/ex/q2_01c_local.png"\r
+texture s "textures/ex/q2_01c_s.png"\r
+texture z "textures/ex/q2_01c_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/q2_01d_d.jpg"\r
-texture n "textures/yves_allaire/ex/q2_01d_local.png"\r
-texture s "textures/yves_allaire/ex/q2_01d_s.jpg"\r
-texture z "textures/yves_allaire/ex/q2_01d_h.jpg"\r
+texture 0 "textures/ex/q2_01d_d.png"\r
+texture n "textures/ex/q2_01d_local.png"\r
+texture s "textures/ex/q2_01d_s.png"\r
+texture z "textures/ex/q2_01d_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/q2_01e_d.jpg"\r
-texture n "textures/yves_allaire/ex/q2_01e_local.png"\r
-texture s "textures/yves_allaire/ex/q2_01e_s.jpg"\r
-texture z "textures/yves_allaire/ex/q2_01e_h.jpg"\r
+texture 0 "textures/ex/q2_01e_d.png"\r
+texture n "textures/ex/q2_01e_local.png"\r
+texture s "textures/ex/q2_01e_s.png"\r
+texture z "textures/ex/q2_01e_h.png"\r
texscale 0.5\r
\r
setshaderparam parallaxscale 0.02 -0.01\r
\r
-texture 0 "textures/yves_allaire/ex/rndfloor_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/rndfloor_01_local.png"\r
-texture s "textures/yves_allaire/ex/rndfloor_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/rndfloor_01_h.jpg"\r
+texture 0 "textures/ex/rndfloor_01_d.png"\r
+texture n "textures/ex/rndfloor_01_local.png"\r
+texture s "textures/ex/rndfloor_01_s.png"\r
+texture z "textures/ex/rndfloor_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/rndfloor_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/rndfloor_02_local.png"\r
-texture s "textures/yves_allaire/ex/rndfloor_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/rndfloor_02_h.jpg"\r
+texture 0 "textures/ex/rndfloor_02_d.png"\r
+texture n "textures/ex/rndfloor_02_local.png"\r
+texture s "textures/ex/rndfloor_02_s.png"\r
+texture z "textures/ex/rndfloor_02_h.png"\r
texscale 0.5\r
\r
setshaderparam parallaxscale 0.04 -0.02\r
\r
-texture 0 "textures/yves_allaire/ex/rplates_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/rplates_01_local.png"\r
-texture s "textures/yves_allaire/ex/rplates_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/rplates_01_h.jpg"\r
+texture 0 "textures/ex/rplates_01_d.png"\r
+texture n "textures/ex/rplates_01_local.png"\r
+texture s "textures/ex/rplates_01_s.png"\r
+texture z "textures/ex/rplates_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/steptop_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/steptop_01_local.png"\r
-texture s "textures/yves_allaire/ex/steptop_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/steptop_01_h.jpg"\r
+texture 0 "textures/ex/steptop_01_d.png"\r
+texture n "textures/ex/steptop_01_local.png"\r
+texture s "textures/ex/steptop_01_s.png"\r
+texture z "textures/ex/steptop_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_01_local.png"\r
-texture s "textures/yves_allaire/ex/trim_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_01_h.jpg"\r
+texture 0 "textures/ex/trim_01_d.png"\r
+texture n "textures/ex/trim_01_local.png"\r
+texture s "textures/ex/trim_01_s.png"\r
+texture z "textures/ex/trim_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_baseboard_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_baseboard_02_local.png"\r
-texture s "textures/yves_allaire/ex/trim_baseboard_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_baseboard_02_h.jpg"\r
+texture 0 "textures/ex/trim_baseboard_02_d.png"\r
+texture n "textures/ex/trim_baseboard_02_local.png"\r
+texture s "textures/ex/trim_baseboard_02_s.png"\r
+texture z "textures/ex/trim_baseboard_02_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_baseboard_03_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_baseboard_03_local.png"\r
-texture s "textures/yves_allaire/ex/trim_baseboard_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_baseboard_03_h.jpg"\r
+texture 0 "textures/ex/trim_baseboard_03_d.png"\r
+texture n "textures/ex/trim_baseboard_03_local.png"\r
+texture s "textures/ex/trim_baseboard_03_s.png"\r
+texture z "textures/ex/trim_baseboard_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_baseboard_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_baseboard_local.png"\r
-texture s "textures/yves_allaire/ex/trim_baseboard_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_baseboard_h.jpg"\r
+texture 0 "textures/ex/trim_baseboard_d.png"\r
+texture n "textures/ex/trim_baseboard_local.png"\r
+texture s "textures/ex/trim_baseboard_s.png"\r
+texture z "textures/ex/trim_baseboard_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_psimple_04_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_psimple_04_local.png"\r
-texture s "textures/yves_allaire/ex/trim_psimple_04_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_psimple_04_h.jpg"\r
+texture 0 "textures/ex/trim_psimple_04_d.png"\r
+texture n "textures/ex/trim_psimple_04_local.png"\r
+texture s "textures/ex/trim_psimple_04_s.png"\r
+texture z "textures/ex/trim_psimple_04_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_psimple_05_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_psimple_05_local.png"\r
-texture s "textures/yves_allaire/ex/trim_psimple_05_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_psimple_05_h.jpg"\r
+texture 0 "textures/ex/trim_psimple_05_d.png"\r
+texture n "textures/ex/trim_psimple_05_local.png"\r
+texture s "textures/ex/trim_psimple_05_s.png"\r
+texture z "textures/ex/trim_psimple_05_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_simple_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_simple_01_local.png"\r
-texture s "textures/yves_allaire/ex/trim_simple_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_simple_01_h.jpg"\r
+texture 0 "textures/ex/trim_simple_01_d.png"\r
+texture n "textures/ex/trim_simple_01_local.png"\r
+texture s "textures/ex/trim_simple_01_s.png"\r
+texture z "textures/ex/trim_simple_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_simple03_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_simple03_local.png"\r
-texture s "textures/yves_allaire/ex/trim_simple03_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_simple03_h.jpg"\r
+texture 0 "textures/ex/trim_simple03_d.png"\r
+texture n "textures/ex/trim_simple03_local.png"\r
+texture s "textures/ex/trim_simple03_s.png"\r
+texture z "textures/ex/trim_simple03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_support_03_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_support_03_local.png"\r
-texture s "textures/yves_allaire/ex/trim_support_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_support_03_h.jpg"\r
+texture 0 "textures/ex/trim_support_03_d.png"\r
+texture n "textures/ex/trim_support_03_local.png"\r
+texture s "textures/ex/trim_support_03_s.png"\r
+texture z "textures/ex/trim_support_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/trim_vert_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/trim_vert_01_local.png"\r
-texture s "textures/yves_allaire/ex/trim_vert_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/trim_vert_01_h.jpg"\r
+texture 0 "textures/ex/trim_vert_01_d.png"\r
+texture n "textures/ex/trim_vert_01_local.png"\r
+texture s "textures/ex/trim_vert_01_s.png"\r
+texture z "textures/ex/trim_vert_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_01_local.png"\r
-texture s "textures/yves_allaire/ex/wall_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_01_h.jpg"\r
+texture 0 "textures/ex/wall_01_d.png"\r
+texture n "textures/ex/wall_01_local.png"\r
+texture s "textures/ex/wall_01_s.png"\r
+texture z "textures/ex/wall_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_01b_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_01_local.png"\r
-texture s "textures/yves_allaire/ex/wall_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_01_h.jpg"\r
+texture 0 "textures/ex/wall_01b_d.png"\r
+texture n "textures/ex/wall_01_local.png"\r
+texture s "textures/ex/wall_01_s.png"\r
+texture z "textures/ex/wall_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_b01_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_b01_local.png"\r
-texture s "textures/yves_allaire/ex/wall_b01_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_b01_h.jpg"\r
+texture 0 "textures/ex/wall_b01_d.png"\r
+texture n "textures/ex/wall_b01_local.png"\r
+texture s "textures/ex/wall_b01_s.png"\r
+texture z "textures/ex/wall_b01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_bigrib_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_bigrib_02_local.png"\r
-texture s "textures/yves_allaire/ex/wall_bigrib_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_bigrib_02_h.jpg"\r
+texture 0 "textures/ex/wall_bigrib_02_d.png"\r
+texture n "textures/ex/wall_bigrib_02_local.png"\r
+texture s "textures/ex/wall_bigrib_02_s.png"\r
+texture z "textures/ex/wall_bigrib_02_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_bplate_06_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_bplate_06_local.png"\r
-texture s "textures/yves_allaire/ex/wall_bplate_06_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_bplate_06_h.jpg"\r
+texture 0 "textures/ex/wall_bplate_06_d.png"\r
+texture n "textures/ex/wall_bplate_06_local.png"\r
+texture s "textures/ex/wall_bplate_06_s.png"\r
+texture z "textures/ex/wall_bplate_06_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_panel_05_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_panel_05_local.png"\r
-texture s "textures/yves_allaire/ex/wall_panel_05_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_panel_05_h.jpg"\r
+texture 0 "textures/ex/wall_panel_05_d.png"\r
+texture n "textures/ex/wall_panel_05_local.png"\r
+texture s "textures/ex/wall_panel_05_s.png"\r
+texture z "textures/ex/wall_panel_05_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_panels_08_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_panels_08_local.png"\r
-texture s "textures/yves_allaire/ex/wall_panels_08_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_panels_08_h.jpg"\r
+texture 0 "textures/ex/wall_panels_08_d.png"\r
+texture n "textures/ex/wall_panels_08_local.png"\r
+texture s "textures/ex/wall_panels_08_s.png"\r
+texture z "textures/ex/wall_panels_08_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/wall_panels_08b_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_panels_08b_local.png"\r
-texture s "textures/yves_allaire/ex/wall_panels_08b_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_panels_08b_h.jpg"\r
+texture 0 "textures/ex/wall_panels_08b_d.png"\r
+texture n "textures/ex/wall_panels_08b_local.png"\r
+texture s "textures/ex/wall_panels_08b_s.png"\r
+texture z "textures/ex/wall_panels_08b_h.png"\r
texscale 0.5\r
\r
setshader bumpspecmapworld\r
-setshaderparam specscale 2 2 2\r
+setshaderparam specscale 0.6 0.6 0.6\r
\r
-texture 0 "textures/yves_allaire/ex/wall_pipe_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_pipe_local.png"\r
-texture s "textures/yves_allaire/ex/wall_pipe_s.jpg"\r
+texture 0 "textures/ex/wall_pipe_d.png"\r
+texture n "textures/ex/wall_pipe_local.png"\r
+texture s "textures/ex/wall_pipe_s.png"\r
texscale 0.5\r
\r
setshader bumpspecmapparallaxworld\r
-setshaderparam specscale 2 2 2\r
+setshaderparam specscale 0.6 0.6 0.6\r
setshaderparam parallaxscale 0.04 -0.02\r
\r
-texture 0 "textures/yves_allaire/ex/wall_u207_d.jpg"\r
-texture n "textures/yves_allaire/ex/wall_u207_local.png"\r
-texture s "textures/yves_allaire/ex/wall_u207_s.jpg"\r
-texture z "textures/yves_allaire/ex/wall_u207_h.jpg"\r
+texture 0 "textures/ex/wall_u207_d.png"\r
+texture n "textures/ex/wall_u207_local.png"\r
+texture s "textures/ex/wall_u207_s.png"\r
+texture z "textures/ex/wall_u207_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_plate_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_plate_01_local.png"\r
-texture s "textures/yves_allaire/ex/metal_plate_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_plate_01_h.jpg"\r
+texture 0 "textures/ex/metal_plate_01_d.png"\r
+texture n "textures/ex/metal_plate_01_local.png"\r
+texture s "textures/ex/metal_plate_01_s.png"\r
+texture z "textures/ex/metal_plate_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_plate_01b_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_plate_01b_local.png"\r
-texture s "textures/yves_allaire/ex/metal_plate_01b_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_plate_01b_h.jpg"\r
+texture 0 "textures/ex/metal_plate_01b_d.png"\r
+texture n "textures/ex/metal_plate_01b_local.png"\r
+texture s "textures/ex/metal_plate_01b_s.png"\r
+texture z "textures/ex/metal_plate_01b_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_plate_01c_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_plate_01c_local.png"\r
-texture s "textures/yves_allaire/ex/metal_plate_01c_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_plate_01c_h.jpg"\r
+texture 0 "textures/ex/metal_plate_01c_d.png"\r
+texture n "textures/ex/metal_plate_01c_local.png"\r
+texture s "textures/ex/metal_plate_01c_s.png"\r
+texture z "textures/ex/metal_plate_01c_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_base_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_base_01_local.png"\r
-texture s "textures/yves_allaire/ex/metal_base_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_base_01_h.jpg"\r
+texture 0 "textures/ex/metal_base_01_d.png"\r
+texture n "textures/ex/metal_base_01_local.png"\r
+texture s "textures/ex/metal_base_01_s.png"\r
+texture z "textures/ex/metal_base_01_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_base_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_base_02_local.png"\r
-texture s "textures/yves_allaire/ex/metal_base_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_base_02_h.jpg"\r
+texture 0 "textures/ex/metal_base_02_d.png"\r
+texture n "textures/ex/metal_base_02_local.png"\r
+texture s "textures/ex/metal_base_02_s.png"\r
+texture z "textures/ex/metal_base_02_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_base_03_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_base_03_local.png"\r
-texture s "textures/yves_allaire/ex/metal_base_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_base_03_h.jpg"\r
+texture 0 "textures/ex/metal_base_03_d.png"\r
+texture n "textures/ex/metal_base_03_local.png"\r
+texture s "textures/ex/metal_base_03_s.png"\r
+texture z "textures/ex/metal_base_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_base_04_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_base_03_local.png"\r
-texture s "textures/yves_allaire/ex/metal_base_03_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_base_03_h.jpg"\r
+texture 0 "textures/ex/metal_base_04_d.png"\r
+texture n "textures/ex/metal_base_03_local.png"\r
+texture s "textures/ex/metal_base_03_s.png"\r
+texture z "textures/ex/metal_base_03_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_base_05_rust_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_base_05_rust_local.png"\r
-texture s "textures/yves_allaire/ex/metal_base_05_rust_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_base_05_rust_h.jpg"\r
+texture 0 "textures/ex/metal_base_05_rust_d.png"\r
+texture n "textures/ex/metal_base_05_rust_local.png"\r
+texture s "textures/ex/metal_base_05_rust_s.png"\r
+texture z "textures/ex/metal_base_05_rust_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_base_06_rust_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_base_05_rust_local.png"\r
-texture s "textures/yves_allaire/ex/metal_base_05_rust_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_base_05_rust_h.jpg"\r
+texture 0 "textures/ex/metal_base_06_rust_d.png"\r
+texture n "textures/ex/metal_base_05_rust_local.png"\r
+texture s "textures/ex/metal_base_05_rust_s.png"\r
+texture z "textures/ex/metal_base_05_rust_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_base_07_rust_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_base_05_rust_local.png"\r
-texture s "textures/yves_allaire/ex/metal_base_05_rust_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_base_05_rust_h.jpg"\r
+texture 0 "textures/ex/metal_base_07_rust_d.png"\r
+texture n "textures/ex/metal_base_05_rust_local.png"\r
+texture s "textures/ex/metal_base_05_rust_s.png"\r
+texture z "textures/ex/metal_base_05_rust_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_floor_02_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_floor_02_local.png"\r
-texture s "textures/yves_allaire/ex/metal_floor_02_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_floor_02_h.jpg"\r
+texture 0 "textures/ex/metal_floor_02_d.png"\r
+texture n "textures/ex/metal_floor_02_local.png"\r
+texture s "textures/ex/metal_floor_02_s.png"\r
+texture z "textures/ex/metal_floor_02_h.png"\r
texscale 0.5\r
\r
-texture 0 "textures/yves_allaire/ex/metal_rib_01_d.jpg"\r
-texture n "textures/yves_allaire/ex/metal_rib_01_local.png"\r
-texture s "textures/yves_allaire/ex/metal_rib_01_s.jpg"\r
-texture z "textures/yves_allaire/ex/metal_rib_01_h.jpg"\r
+texture 0 "textures/ex/metal_rib_01_d.png"\r
+texture n "textures/ex/metal_rib_01_local.png"\r
+texture s "textures/ex/metal_rib_01_s.png"\r
+texture z "textures/ex/metal_rib_01_h.png"\r
texscale 0.5\r
enum {FIELDCOMMIT, FIELDABORT, FIELDEDIT, FIELDSHOW, FIELDKEY};
-static int fieldmode = FIELDSHOW;
+static int fieldmode = FIELDSHOW;
static bool fieldsactive = false;
static bool hascursor;
return oldval;
}
- void autotab()
- {
+ void autotab()
+ {
if(tcurrent)
{
if(layoutpass && !tpos) tcurrent = NULL; //disable tabs because you didn't start with one
- if(shouldautotab && !curdepth && (layoutpass ? 0 : cury) + ysize > guiautotab*FONTH) tab(NULL, tcolor);
+ if(shouldautotab && !curdepth && (layoutpass ? 0 : cury) + ysize > guiautotab*FONTH) tab(NULL, tcolor);
}
}
bool visible() { return (!tcurrent || tpos==*tcurrent) && !layoutpass; }
//tab is always at top of page
- void tab(const char *name, int color)
+ void tab(const char *name, int color)
{
if(curdepth != 0) return;
if(color) tcolor = color;
- tpos++;
- if(!name) name = intstr(tpos);
+ tpos++;
+ if(!name) name = intstr(tpos);
int w = max(text_width(name) - 2*INSERT, 0);
- if(layoutpass)
- {
- ty = max(ty, ysize);
+ if(layoutpass)
+ {
+ ty = max(ty, ysize);
ysize = 0;
}
- else
- {
+ else
+ {
cury = -ysize;
int h = FONTH-2*INSERT,
x1 = curx + tx,
y1 = cury - ((skiny[6]-skiny[1])-(skiny[3]-skiny[2]))*SKIN_SCALE-h,
y2 = cury;
bool hit = tcurrent && windowhit==this && hitx>=x1 && hity>=y1 && hitx<x2 && hity<y2;
- if(hit && (!guiclicktab || mousebuttons&G3D_DOWN))
+ if(hit && (!guiclicktab || mousebuttons&G3D_DOWN))
*tcurrent = tpos; //roll-over to switch tab
-
+
drawskin(x1-skinx[visible()?2:6]*SKIN_SCALE, y1-skiny[1]*SKIN_SCALE, w, h, visible()?10:19, 9, gui2d ? 1 : 2, light, alpha);
text_(name, x1 + (skinx[3]-skinx[2])*SKIN_SCALE - (w ? INSERT : INSERT/2), y1 + (skiny[2]-skiny[1])*SKIN_SCALE - INSERT, tcolor, visible());
}
- tx += w + ((skinx[5]-skinx[4]) + (skinx[3]-skinx[2]))*SKIN_SCALE;
+ tx += w + ((skinx[5]-skinx[4]) + (skinx[3]-skinx[2]))*SKIN_SCALE;
}
bool ishorizontal() const { return curdepth&1; }
bool isvertical() const { return !ishorizontal(); }
void pushlist()
- {
+ {
if(layoutpass)
{
if(curlist>=0)
ysize = l.h;
}
}
- curdepth++;
+ curdepth++;
}
void poplist()
curlist = l.parent;
curdepth--;
if(lists.inrange(curlist))
- {
+ {
int w = xsize, h = ysize;
if(ishorizontal()) cury -= h; else curx -= w;
list &p = lists[curlist];
{
list &s = lists[p.parent];
if(ishorizontal()) xsize = s.w; else ysize = s.h;
- }
+ }
layout(w, h);
}
}
//add space between list items
void space(float size) { layout(isvertical() ? 0 : int(size*FONTW), isvertical() ? int(size*FONTH) : 0); }
- void spring(int weight)
- {
+ void spring(int weight)
+ {
if(curlist < 0) return;
list &l = lists[curlist];
if(layoutpass) { if(l.parent >= 0) l.springs += weight; return; }
}
}
- bool mergehits(bool on)
- {
+ bool mergehits(bool on)
+ {
bool oldval = shouldmergehits;
- shouldmergehits = on;
+ shouldmergehits = on;
return oldval;
}
if(visible()) icon_(t, overlaid!=NULL, curx, cury, size, ishit(size+SHADOW, size+SHADOW), overlaid);
return layout(size+SHADOW, size+SHADOW);
}
-
+
int texture(VSlot &vslot, float scale, bool overlaid)
{
autotab();
}
return layout(size+SHADOW, size+SHADOW);
}
-
+
void slider(int &val, int vmin, int vmax, int color, const char *label)
{
autotab();
}
char *field_(const char *name, int color, int length, int height, const char *initval, int initmode, int fieldtype = FIELDEDIT)
- {
+ {
editor *e = useeditor(name, initmode, false, initval); // generate a new editor if necessary
if(layoutpass)
{
e->maxx = (e->linewrap) ? -1 : length;
e->maxy = (height<=0)?1:-1;
e->pixelwidth = abs(length)*FONTW;
- if(e->linewrap && e->maxy==1)
+ if(e->linewrap && e->maxy==1)
{
int temp;
text_bounds(e->lines[0].text, temp, e->pixelheight, e->pixelwidth); //only single line editors can have variable height
}
- else
- e->pixelheight = FONTH*max(height, 1);
+ else
+ e->pixelheight = FONTH*max(height, 1);
}
int h = e->pixelheight;
int w = e->pixelwidth + FONTW;
-
+
bool wasvertical = isvertical();
if(wasvertical && e->maxy != 1) pushlist();
-
+
char *result = NULL;
if(visible() && !layoutpass)
{
e->rendered = true;
bool hit = ishit(w, h);
- if(hit)
+ if(hit)
{
if(mousebuttons&G3D_DOWN) //mouse request focus
- {
+ {
if(fieldtype==FIELDKEY) e->clear();
- useeditor(name, initmode, true);
+ useeditor(name, initmode, true);
e->mark(false);
fieldmode = fieldtype;
- }
+ }
}
bool editing = (fieldmode != FIELDSHOW) && (e==currentfocus());
if(hit && editing && (mousebuttons&G3D_PRESSED)!=0 && fieldtype==FIELDEDIT) e->hit(int(floor(hitx-(curx+FONTW/2))), int(floor(hity-cury)), (mousebuttons&G3D_DRAGGED)!=0); //mouse request position
- if(editing && ((fieldmode==FIELDCOMMIT) || (fieldmode==FIELDABORT) || !hit)) // commit field if user pressed enter or wandered out of focus
+ if(editing && ((fieldmode==FIELDCOMMIT) || (fieldmode==FIELDABORT) || !hit)) // commit field if user pressed enter or wandered out of focus
{
if(fieldmode==FIELDCOMMIT || (fieldmode!=FIELDABORT && !hit)) result = e->currentline().text;
e->active = (e->mode!=EDITORFOCUSED);
fieldmode = FIELDSHOW;
- }
+ }
else fieldsactive = true;
-
+
e->draw(curx+FONTW/2, cury, color, hit && editing);
-
+
hudnotextureshader->set();
glDisable(GL_BLEND);
if(editing) gle::colorf(1, 0, 0);
hudshader->set();
}
layout(w, h);
-
+
if(e->maxy != 1)
{
int slines = e->limitscrolly();
- if(slines > 0)
+ if(slines > 0)
{
int pos = e->scrolly;
slider(e->scrolly, slines, 0, color, NULL);
- if(pos != e->scrolly) e->cy = e->scrolly;
+ if(pos != e->scrolly) e->cy = e->scrolly;
}
if(wasvertical) poplist();
}
-
+
return result;
}
xtraverts += gle::end();
}
- void text_(const char *text, int x, int y, int color, bool shadow, bool force = false)
+ void text_(const char *text, int x, int y, int color, bool shadow, bool force = false)
{
if(shadow) draw_text(text, x+SHADOW, y+SHADOW, 0x00, 0x00, 0x00, -0xC0);
draw_text(text, x, y, color>>16, (color>>8)&0xFF, color&0xFF, force ? -0xFF : 0xFF);
hudnotextureshader->set();
gle::colorub(color>>16, (color>>8)&0xFF, color&0xFF, 0x80);
int w = xsize, h = ysize;
- if(inheritw>0)
+ if(inheritw>0)
{
int parentw = curlist, parentdepth = 0;
for(;parentdepth < inheritw && lists[parentw].parent>=0; parentdepth++)
rect_(x, y, xs, ys, 0);
if(title) text_(title, x + xs/12, y + ys - ys/12 - FONTH, hit ? 0xFF0000 : 0xFFFFFF, hit && actionon, hit);
}
- }
+ }
void previewslot(VSlot &vslot, bool overlaid, int x, int y, int size, bool hit)
{
else if(slot.thumbnail && slot.thumbnail != notexture) t = slot.thumbnail;
else return;
float xt = min(1.0f, t->xs/(float)t->ys), yt = min(1.0f, t->ys/(float)t->xs), xs = size, ys = size;
- if(hit && actionon)
+ if(hit && actionon)
{
hudnotextureshader->set();
gle::colorf(0, 0, 0, 0.75f);
rect_(x+SHADOW, y+SHADOW, xs, ys);
- hudshader->set();
+ hudshader->set();
}
SETSHADER(hudrgb);
gle::defvertex(2);
if(r.flipx) { xoff *= -1; loopk(4) tc[k].x *= -1; }
if(r.flipy) { yoff *= -1; loopk(4) tc[k].y *= -1; }
}
- loopk(4) { tc[k].x = tc[k].x/xt - xoff/t->xs; tc[k].y = tc[k].y/yt - yoff/t->ys; }
+ loopk(4) { tc[k].x = tc[k].x/xt - xoff/t->xs; tc[k].y = tc[k].y/yt - yoff/t->ys; }
if(slot.loaded) gle::color(vec(color).mul(vslot.colorscale));
else gle::color(color);
glBindTexture(GL_TEXTURE_2D, t->id);
gle::attribf(x+xs, y+ys); gle::attrib(tc[2]);
gle::end();
}
-
+
hudshader->set();
- if(overlaid)
+ if(overlaid)
{
if(!overlaytex) overlaytex = textureload("data/guioverlay.png", 3);
glBindTexture(GL_TEXTURE_2D, overlaytex->id);
}
void line_(int size, float percent = 1.0f)
- {
+ {
if(visible())
{
if(!slidertex) slidertex = textureload("data/guislider.png", 3);
glBindTexture(GL_TEXTURE_2D, slidertex->id);
- if(percent < 0.99f)
+ if(percent < 0.99f)
{
gle::colorf(light.x, light.y, light.z, 0.375f);
- if(ishorizontal())
+ if(ishorizontal())
rect_(curx + FONTH/2 - size/2, cury, size, ysize, 0);
else
rect_(curx, cury + FONTH/2 - size/2, xsize, size, 1);
}
gle::color(light);
- if(ishorizontal())
+ if(ishorizontal())
rect_(curx + FONTH/2 - size/2, cury + ysize*(1-percent), size, ysize*percent, 0);
- else
+ else
rect_(curx, cury + FONTH/2 - size/2, xsize*percent, size, 1);
}
layout(ishorizontal() ? FONTH : 0, ishorizontal() ? 0 : FONTH);
}
- void textbox(const char *text, int width, int height, int color)
+ void textbox(const char *text, int width, int height, int color)
{
width *= FONTW;
height *= FONTH;
if(icon) w += ICON_SIZE;
if(icon && text) w += padding;
if(text) w += text_width(text);
-
+
if(visible())
{
bool hit = ishit(w, FONTH);
- if(hit && clickable) color = 0xFF0000;
- int x = curx;
+ if(hit && clickable) color = 0xFF0000;
+ int x = curx;
if(isvertical() && center) x += (xsize-w)/2;
-
+
if(icon)
{
if(icon[0] != ' ')
{
const char *ext = strrchr(icon, '.');
- defformatstring(tname, "packages/icons/%s%s", icon, ext ? "" : ".jpg");
+ defformatstring(tname, "packages/icons/%s%s", icon, ext ? "" : ".png");
icon_(textureload(tname, 3), false, x, cury, ICON_SIZE, clickable && hit);
}
x += ICON_SIZE;
static const int skinx[], skiny[];
static const struct patch { ushort left, right, top, bottom; uchar flags; } patches[];
- static void drawskin(int x, int y, int gapw, int gaph, int start, int n, int passes = 1, const vec &light = vec(1, 1, 1), float alpha = 0.80f)//int vleft, int vright, int vtop, int vbottom, int start, int n)
+ static void drawskin(int x, int y, int gapw, int gaph, int start, int n, int passes = 1, const vec &light = vec(1, 1, 1), float alpha = 0.80f)//int vleft, int vright, int vtop, int vbottom, int start, int n)
{
if(!skintex) skintex = textureload("data/guiskin.png", 3);
glBindTexture(GL_TEXTURE_2D, skintex->id);
int gapx1 = INT_MAX, gapy1 = INT_MAX, gapx2 = INT_MAX, gapy2 = INT_MAX;
float wscale = 1.0f/(SKIN_W*SKIN_SCALE), hscale = 1.0f/(SKIN_H*SKIN_SCALE);
-
+
loopj(passes)
- {
+ {
bool quads = false;
if(passes>1) glDepthFunc(j ? GL_LEQUAL : GL_GREATER);
gle::color(j ? light : vec(1, 1, 1), passes<=1 || j ? alpha : alpha/2); //ghost when its behind something in depth
top += gaph - (gapy2-gapy1);
bottom += gaph - (gapy2-gapy1);
}
-
+
//multiple tiled quads if necessary rather than a single stretched one
int ystep = bottom-top;
int yo = y+top;
- while(ystep > 0)
+ while(ystep > 0)
{
- if(p.flags&0x10 && yo+ystep-(y+top) > gaph)
+ if(p.flags&0x10 && yo+ystep-(y+top) > gaph)
{
ystep = gaph+y+top-yo;
tbottom = ttop+ystep*hscale;
int xstep = right-left;
int xo = x+left;
float tright2 = tright;
- while(xstep > 0)
+ while(xstep > 0)
{
- if(p.flags&0x01 && xo+xstep-(x+left) > gapw)
+ if(p.flags&0x01 && xo+xstep-(x+left) > gapw)
{
- xstep = gapw+x+left-xo;
+ xstep = gapw+x+left-xo;
tright = tleft+xstep*wscale;
}
if(!quads)
else break; //if it didn't happen on the first pass, it won't happen on the second..
}
if(passes>1) glDepthFunc(GL_ALWAYS);
- }
+ }
vec origin, scale, *savedorigin;
float dist;
}
void start(int starttime, float initscale, int *tab, bool allowinput)
- {
- if(gui2d)
+ {
+ if(gui2d)
{
- initscale *= 0.025f;
+ initscale *= 0.025f;
if(allowinput) hascursor = true;
}
basescale = initscale;
tcurrent = tab;
tcolor = 0xFFFFFF;
pushlist();
- if(layoutpass)
+ if(layoutpass)
{
firstlist = nextlist = curlist;
memset(columns, 0, sizeof(columns));
else
{
if(tcurrent && !*tcurrent) tcurrent = NULL;
- cury = -ysize;
+ cury = -ysize;
curx = -xsize/2;
-
+
if(gui2d)
{
hudmatrix.ortho(0, 1, 1, 0, -1, 1);
- hudmatrix.translate(origin);
+ hudmatrix.translate(origin);
hudmatrix.scale(scale);
light = vec(1, 1, 1);
hudmatrix.rotate_around_z(yaw - 90*RAD);
hudmatrix.rotate_around_x(-90*RAD);
hudmatrix.scale(-scale.x, scale.y, scale.z);
-
+
vec dir;
- lightreaching(origin, light, dir, false, 0, 0.5f);
+ lightreaching(origin, light, dir, false, 0, 0.5f);
float intensity = vec(yaw, 0.0f).dot(dir);
light.mul(1.0f + max(intensity, 0.0f));
}
}
xsize = max(xsize, w);
}
-
+
void adjustcolumns()
{
if(lists.inrange(curlist))
}
if(l.column >= 0)
{
- if(depth&1) adjusthorizontalcolumn(l.column, i);
+ if(depth&1) adjusthorizontalcolumn(l.column, i);
else adjustverticalcolumn(l.column, i);
}
}
void end()
{
if(layoutpass)
- {
+ {
adjustcolumns();
xsize = max(tx, xsize);
ysize = max(ty, ysize);
const int gui::skiny[] = {0, 7, 21, 34, 43, 48, 56, 104, 111, 117, 128},
gui::skinx[] = {0, 11, 23, 37, 105, 119, 137, 151, 215, 229, 246, 256};
//Note: skinx[3]-skinx[2] = skinx[7]-skinx[6]
-// skinx[5]-skinx[4] = skinx[9]-skinx[8]
-const gui::patch gui::patches[] =
+// skinx[5]-skinx[4] = skinx[9]-skinx[8]
+const gui::patch gui::patches[] =
{ //arguably this data can be compressed - it depends on what else needs to be skinned in the future
{1,2,3,6, 0}, // body
{2,9,5,6, 0x01},
{
editor *e = currentfocus();
if(fieldmode == FIELDKEY || fieldmode == FIELDSHOW || !e) return false;
-
+
e->input(str, len);
return true;
}
{
if(windowhit) switch(code)
{
- case -4: // window "management"
+ case -4: // window "management"
if(isdown)
{
- if(windowhit->gui2d)
+ if(windowhit->gui2d)
{
vec origin = *guis2d.last().savedorigin;
int i = windowhit - &guis2d[0];
bool g3d_windowhit(bool on, bool act)
{
extern int cleargui(int n);
- if(act)
+ if(act)
{
if(actionon || windowhit)
{
return (guis2d.length() && hascursor) || (windowhit && !windowhit->gui2d);
}
-void g3d_render()
+void g3d_render()
{
- windowhit = NULL;
+ windowhit = NULL;
if(actionon) mousebuttons |= G3D_PRESSED;
-
- gui::reset();
+
+ gui::reset();
guis2d.shrink(0);
guis3d.shrink(0);
-
+
// call all places in the engine that may want to render a gui from here, they call g3d_addgui()
extern void g3d_texturemenu();
-
+
if(!mainmenu) g3d_texturemenu();
g3d_mainmenu();
if(!mainmenu) game::g3d_gamemenus();
guis2d.sort(g3d_sort);
guis3d.sort(g3d_sort);
-
+
readyeditors();
fieldsactive = false;
up.normalize();
right.cross(up, step);
right.normalize();
- float scroll = -float(lastmillis%lnscrollmillis)/lnscrollmillis,
+ float scroll = -float(lastmillis%lnscrollmillis)/lnscrollmillis,
scrollscale = lnscrollscale*(LIGHTNINGSTEP*tex->ys)/(sz*tex->xs),
blend = pow(clamp(float(lastmillis - lastlnjitter)/lnjittermillis, 0.0f, 1.0f), lnblendpower),
- jitter0 = (1-blend)*lnjitterscale*sz/lnjitterradius, jitter1 = blend*lnjitterscale*sz/lnjitterradius;
+ jitter0 = (1-blend)*lnjitterscale*sz/lnjitterradius, jitter1 = blend*lnjitterscale*sz/lnjitterradius;
gle::begin(GL_TRIANGLE_STRIP);
loopj(numsteps)
{
struct lightningrenderer : listrenderer
{
lightningrenderer()
- : listrenderer("packages/particles/lightning.jpg", 2, PT_LIGHTNING|PT_TRACK|PT_GLARE)
+ : listrenderer("packages/particles/lightning.png", 2, PT_LIGHTNING|PT_TRACK|PT_GLARE)
{}
void startrender()
Shader *particleshader = NULL, *particlenotextureshader = NULL;
VARP(particlesize, 20, 100, 500);
-
+
// Check canemitparticles() to limit the rate that paricles can be emitted for models/sparklies
// Automatically stops particles being emitted when paused or in reflective drawing
VARP(emitmillis, 1, 17, 1000);
cullmax = ivec(int(ceil(bbmax.x)), int(ceil(bbmax.y)), int(ceil(bbmax.z)));
if(dbgpseed) conoutf(CON_DEBUG, "radius: %f, maxfade: %d", radius, maxfade);
}
-
+
void extendbb(const vec &o, float size = 0)
{
bbmin.x = min(bbmin.x, o.x - size);
uchar color2[3];
uchar progress;
};
- };
+ };
};
struct partvert
uint type;
int collide;
string info;
-
+
partrenderer(const char *texname, int texclamp, int type, int collide = 0)
: tex(NULL), texname(texname), texclamp(texclamp), type(type), collide(collide)
{
virtual void init(int n) { }
virtual void reset() = 0;
- virtual void resettracked(physent *owner) { }
- virtual particle *addpart(const vec &o, const vec &d, int fade, int color, float size, int gravity = 0) = 0;
+ virtual void resettracked(physent *owner) { }
+ virtual particle *addpart(const vec &o, const vec &d, int fade, int color, float size, int gravity = 0) = 0;
virtual int adddepthfx(vec &bbmin, vec &bbmax) { return 0; }
virtual void update() { }
virtual void render() = 0;
o = p->o;
d = p->d;
if(type&PT_TRACK && p->owner) game::particletrack(p->owner, o, d);
- if(p->fade <= 5)
+ if(p->fade <= 5)
{
ts = 1;
blend = 255;
vec surface;
float floorz = rayfloor(vec(o.x, o.y, p->val), surface, RAY_CLIPMAT, COLLIDERADIUS);
float collidez = floorz<0 ? o.z-COLLIDERADIUS : p->val - floorz;
- if(o.z >= collidez+COLLIDEERROR)
+ if(o.z >= collidez+COLLIDEERROR)
p->val = collidez+COLLIDEERROR;
- else
+ else
{
adddecal(collide, vec(o.x, o.y, collidez), vec(p->o).sub(o).normalize(), 2*p->size, p->color, type&PT_RND4 ? (p->flags>>5)&3 : 0);
blend = 0;
int len = strlen(info);
info[len-1] = info[len-1] == ',' ? ')' : '\0';
if(texname)
- {
+ {
const char *title = strrchr(texname, '/');
if(title) concformatstring(info, ": %s", title+1);
}
};
struct listparticle : particle
-{
+{
listparticle *next;
};
static listparticle *parempty;
listparticle *list;
- listrenderer(const char *texname, int texclamp, int type, int collide = 0)
+ listrenderer(const char *texname, int texclamp, int type, int collide = 0)
: partrenderer(texname, texclamp, type, collide), list(NULL)
{
}
{
}
- void reset()
+ void reset()
{
if(!list) return;
listparticle *p = list;
parempty = list;
list = NULL;
}
-
- void resettracked(physent *owner)
+
+ void resettracked(physent *owner)
{
if(!(type&PT_TRACK)) return;
for(listparticle **prev = &list, *cur = list; cur; cur = *prev)
{
- if(!owner || cur->owner==owner)
+ if(!owner || cur->owner==owner)
{
*prev = cur->next;
cur->next = parempty;
else prev = &cur->next;
}
}
-
- particle *addpart(const vec &o, const vec &d, int fade, int color, float size, int gravity)
+
+ particle *addpart(const vec &o, const vec &d, int fade, int color, float size, int gravity)
{
if(!parempty)
{
p->flags = 0;
return p;
}
-
- int count()
+
+ int count()
{
int num = 0;
listparticle *lp;
for(lp = list; lp; lp = lp->next) num++;
return num;
}
-
- bool haswork()
+
+ bool haswork()
{
return (list != NULL);
}
-
+
virtual void startrender() = 0;
virtual void endrender() = 0;
virtual void renderpart(listparticle *p, const vec &o, const vec &d, int blend, int ts) = 0;
- void render()
+ void render()
{
startrender();
if(texname)
if(!tex) tex = textureload(texname, texclamp);
glBindTexture(GL_TEXTURE_2D, tex->id);
}
-
+
for(listparticle **prev = &list, *p = list; p; p = *prev)
- {
+ {
vec o, d;
int blend, ts;
calc(p, blend, ts, o, d, canstep);
- if(blend > 0)
+ if(blend > 0)
{
renderpart(p, o, d, blend, ts);
- if(p->fade > 5 || !canstep)
+ if(p->fade > 5 || !canstep)
{
prev = &p->next;
continue;
killpart(p);
parempty = p;
}
-
+
endrender();
}
};
textmatrix = &m;
draw_text(p->text, 0, 0, p->color.r, p->color.g, p->color.b, blend);
textmatrix = NULL;
- }
+ }
};
static textrenderer texts(PT_TEXT|PT_LERP);
vec e = d;
if(grav) e.z -= float(fade)/grav;
e.div(-75.0f).add(o);
- pe.extendbb(e, size);
+ pe.extendbb(e, size);
}
template<int T>
int maxparts, numparts, lastupdate, rndmask;
GLuint vbo;
- varenderer(const char *texname, int type, int collide = 0)
+ varenderer(const char *texname, int type, int collide = 0)
: partrenderer(texname, 3, type, collide),
verts(NULL), parts(NULL), maxparts(0), numparts(0), lastupdate(-1), rndmask(0), vbo(0)
{
{
if(vbo) { glDeleteBuffers_(1, &vbo); vbo = 0; }
}
-
+
void init(int n)
{
DELETEA(parts);
numparts = 0;
lastupdate = -1;
}
-
- void reset()
+
+ void reset()
{
numparts = 0;
lastupdate = -1;
}
-
- void resettracked(physent *owner)
+
+ void resettracked(physent *owner)
{
if(!(type&PT_TRACK)) return;
loopi(numparts)
}
lastupdate = -1;
}
-
- int count()
+
+ int count()
{
return numparts;
}
-
- bool haswork()
+
+ bool haswork()
{
return (numparts > 0);
}
- particle *addpart(const vec &o, const vec &d, int fade, int color, float size, int gravity)
+ particle *addpart(const vec &o, const vec &d, int fade, int color, float size, int gravity)
{
particle *p = parts + (numparts < maxparts ? numparts++ : rnd(maxparts)); //next free slot, or kill a random kitten
p->o = o;
lastupdate = -1;
return p;
}
-
+
void seedemitter(particleemitter &pe, const vec &o, const vec &d, int fade, float size, int gravity)
{
pe.maxfade = max(pe.maxfade, fade);
float tpeak = d.z*gravity;
if(tpeak > 0 && tpeak < fade) pe.extendbb(o.z + 1.5f*d.z*tpeak/5000.0f, size);
}
-
+
void genverts(particle *p, partvert *vs, bool regen)
{
vec o, d;
if(p->flags&0x01) swap(u1, u2);
if(p->flags&0x02) swap(v1, v2);
});
- }
+ }
else if(type&PT_ICON)
{
float tx = 0.25f*(p->flags&3), ty = 0.25f*((p->flags>>2)&3);
partvert *vs = &verts[i*4];
if(p->fade < 0)
{
- do
+ do
{
- --numparts;
+ --numparts;
if(numparts <= i) return;
}
while(parts[numparts].fade < 0);
else genverts(p, vs, (p->flags&0x80)!=0);
}
}
-
+
void update()
{
if(lastmillis == lastupdate && vbo) return;
glBufferSubData_(GL_ARRAY_BUFFER, 0, numparts*4*sizeof(partvert), verts);
gle::clearvbo();
}
-
+
void render()
- {
+ {
if(!tex) tex = textureload(texname, texclamp);
glBindTexture(GL_TEXTURE_2D, tex->id);
vec o, d;
int blend, ts;
calc(&p, blend, ts, o, d, false);
- if(!isfoggedsphere(radius, p.o) && (depthfxscissor!=2 || depthfxtex.addscissorbox(p.o, radius)))
+ if(!isfoggedsphere(radius, p.o) && (depthfxscissor!=2 || depthfxtex.addscissorbox(p.o, radius)))
{
numsoft++;
loopk(3)
}
};
-static partrenderer *parts[] =
+static partrenderer *parts[] =
{
- new quadrenderer("<grey>packages/particles/blood.png", PT_PART|PT_FLIP|PT_MOD|PT_RND4, DECAL_BLOOD), // blood spats (note: rgb is inverted)
+ new quadrenderer("<grey>packages/particles/blood.png", PT_PART|PT_FLIP|PT_MOD|PT_RND4, DECAL_BLOOD), // blood spats (note: rgb is inverted)
new trailrenderer("packages/particles/base.png", PT_TRAIL|PT_LERP), // water, entity
new quadrenderer("<grey>packages/particles/smoke.png", PT_PART|PT_FLIP|PT_LERP), // smoke
new quadrenderer("<grey>packages/particles/steam.png", PT_PART|PT_FLIP), // steam
new quadrenderer("packages/particles/ball1.png", PT_PART|PT_FEW|PT_GLARE), // fireball1
new quadrenderer("packages/particles/ball2.png", PT_PART|PT_FEW|PT_GLARE), // fireball2
new quadrenderer("packages/particles/ball3.png", PT_PART|PT_FEW|PT_GLARE), // fireball3
- new taperenderer("packages/particles/flare.jpg", PT_TAPE|PT_GLARE), // streak
+ new taperenderer("packages/particles/flare.png", PT_TAPE|PT_GLARE), // streak
&lightnings, // lightning
&fireballs, // explosion fireball
&bluefireballs, // bluish explosion fireball
new quadrenderer("packages/particles/spark.png", PT_PART|PT_FLIP|PT_GLARE), // sparks
new quadrenderer("packages/particles/base.png", PT_PART|PT_FLIP|PT_GLARE), // edit mode entities
new quadrenderer("<grey>packages/particles/snow.png", PT_PART|PT_FLIP|PT_RND4, -1), // colliding snow
- new quadrenderer("packages/particles/muzzleflash1.jpg", PT_PART|PT_FEW|PT_FLIP|PT_GLARE|PT_TRACK), // muzzle flash
- new quadrenderer("packages/particles/muzzleflash2.jpg", PT_PART|PT_FEW|PT_FLIP|PT_GLARE|PT_TRACK), // muzzle flash
- new quadrenderer("packages/particles/muzzleflash3.jpg", PT_PART|PT_FEW|PT_FLIP|PT_GLARE|PT_TRACK), // muzzle flash
+ new quadrenderer("packages/particles/muzzleflash1.png", PT_PART|PT_FEW|PT_FLIP|PT_GLARE|PT_TRACK), // muzzle flash
+ new quadrenderer("packages/particles/muzzleflash2.png", PT_PART|PT_FEW|PT_FLIP|PT_GLARE|PT_TRACK), // muzzle flash
+ new quadrenderer("packages/particles/muzzleflash3.png", PT_PART|PT_FEW|PT_FLIP|PT_GLARE|PT_TRACK), // muzzle flash
new quadrenderer("packages/hud/items.png", PT_PART|PT_FEW|PT_ICON), // hud icon
new quadrenderer("<colorify:1/1/1>packages/hud/items.png", PT_PART|PT_FEW|PT_ICON), // grey hud icon
&texts, // text
}
}
}
- }
+ }
if(depthfxscissor<2 && numdepthfxranges>0) depthfxtex.addscissorbox(depthfxmin, depthfxmax);
}
-
+
VARFP(maxparticles, 10, 4000, 40000, initparticles());
VARFP(fewparticles, 10, 100, 40000, initparticles());
-void initparticles()
+void initparticles()
{
if(!particleshader) particleshader = lookupshaderbyname("particle");
if(!particlenotextureshader) particlenotextureshader = lookupshaderbyname("particlenotexture");
}
void clearparticles()
-{
+{
loopi(sizeof(parts)/sizeof(parts[0])) parts[i]->reset();
clearparticleemitters();
-}
+}
void cleanupparticles()
{
if(!dbgparts) return;
int n = sizeof(parts)/sizeof(parts[0]);
pushhudmatrix();
- hudmatrix.ortho(0, FONTH*n*2*screenw/float(screenh), FONTH*n*2, 0, -1, 1); //squeeze into top-left corner
+ hudmatrix.ortho(0, FONTH*n*2*screenw/float(screenh), FONTH*n*2, 0, -1, 1); //squeeze into top-left corner
flushhudmatrix();
hudshader->set();
loopi(n) draw_text(parts[i]->info, FONTH, (i+n/2)*FONTH);
if(dbgparts && mainpass) loopi(sizeof(parts)/sizeof(parts[0])) parts[i]->debuginfo();
if(glaring && !particleglare) return;
-
- loopi(sizeof(parts)/sizeof(parts[0]))
+
+ loopi(sizeof(parts)/sizeof(parts[0]))
{
if(glaring && !(parts[i]->type&PT_GLARE)) continue;
parts[i]->update();
}
-
+
bool rendered = false;
uint lastflags = PT_LERP|PT_SHADER,
flagmask = PT_LERP|PT_MOD|PT_SHADER|PT_NOTEX;
-
+
if(binddepthfxtex()) flagmask |= PT_SOFT;
loopi(sizeof(parts)/sizeof(parts[0]))
partrenderer *p = parts[i];
if(glaring && !(p->type&PT_GLARE)) continue;
if(!p->haswork()) continue;
-
+
if(!rendered)
{
rendered = true;
glDepthMask(GL_FALSE);
glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if(glaring) GLOBALPARAMF(colorscale, particleglare, particleglare, particleglare, 1);
else GLOBALPARAMF(colorscale, 1, 1, 1, 1);
}
-
+
uint flags = p->type & flagmask, changedbits = (flags ^ lastflags);
if(changedbits)
{
else particleshader->set();
}
}
- lastflags = flags;
+ lastflags = flags;
}
p->render();
}
static inline particle *newparticle(const vec &o, const vec &d, int fade, int type, int color, float size, int gravity = 0)
{
static particle dummy;
- if(seedemitter)
+ if(seedemitter)
{
parts[type]->seedemitter(*seedemitter, o, d, fade, size, gravity);
return &dummy;
static void splash(int type, int color, int radius, int num, int fade, const vec &p, float size, int gravity)
{
if(camera1->o.dist(p) > maxparticledistance && !seedemitter) return;
- float collidez = parts[type]->collide ? p.z - raycube(p, vec(0, 0, -1), COLLIDERADIUS, RAY_CLIPMAT) + (parts[type]->collide >= 0 ? COLLIDEERROR : 0) : -1;
+ float collidez = parts[type]->collide ? p.z - raycube(p, vec(0, 0, -1), COLLIDERADIUS, RAY_CLIPMAT) + (parts[type]->collide >= 0 ? COLLIDEERROR : 0) : -1;
int fmin = 1;
int fmax = fade*3;
loopi(num)
}
}
-static void regularsplash(int type, int color, int radius, int num, int fade, const vec &p, float size, int gravity, int delay = 0)
+static void regularsplash(int type, int color, int radius, int num, int fade, const vec &p, float size, int gravity, int delay = 0)
{
if(!canemitparticles() || (delay > 0 && rnd(delay) != 0)) return;
splash(type, color, radius, num, fade, p, size, gravity);
return !renderedgame && !shadowmapping && !minimized;
}
-void regular_particle_splash(int type, int num, int fade, const vec &p, int color, float size, int radius, int gravity, int delay)
+void regular_particle_splash(int type, int num, int fade, const vec &p, int color, float size, int radius, int gravity, int delay)
{
if(!canaddparticles()) return;
regularsplash(type, color, radius, num, fade, p, size, gravity, delay);
}
-void particle_splash(int type, int num, int fade, const vec &p, int color, float size, int radius, int gravity)
+void particle_splash(int type, int num, int fade, const vec &p, int color, float size, int radius, int gravity)
{
if(!canaddparticles()) return;
splash(type, color, radius, num, fade, p, size, gravity);
}
//dir = 0..6 where 0=up
-static inline vec offsetvec(vec o, int dir, int dist)
+static inline vec offsetvec(vec o, int dir, int dist)
{
- vec v = vec(o);
+ vec v = vec(o);
v[(2+dir)%3] += (dir>2)?(-dist):dist;
return v;
}
//converts a 16bit color to 24bit
-static inline int colorfromattr(int attr)
+static inline int colorfromattr(int attr)
{
return (((attr&0xF)<<4) | ((attr&0xF0)<<8) | ((attr&0xF00)<<12)) + 0x0F0F0F;
}
void regularshape(int type, int radius, int color, int dir, int num, int fade, const vec &p, float size, int gravity, int vel = 200)
{
if(!canemitparticles()) return;
-
+
int basetype = parts[type]->type&0xFF;
bool flare = (basetype == PT_TAPE) || (basetype == PT_LIGHTNING),
inv = (dir&0x20)!=0, taper = (dir&0x40)!=0 && !seedemitter;
loopi(num)
{
vec to, from;
- if(dir < 12)
- {
+ if(dir < 12)
+ {
const vec2 &sc = sincos360[rnd(360)];
to[dir%3] = sc.y*radius;
to[(dir+1)%3] = sc.x*radius;
}
}
else if(dir < 15) //plane
- {
+ {
to[dir%3] = float(rnd(radius<<4)-(radius<<3))/8.0;
to[(dir+1)%3] = float(rnd(radius<<4)-(radius<<3))/8.0;
to[(dir+2)%3] = radius;
}
else if(dir < 21) //line
{
- if(dir < 18)
+ if(dir < 18)
{
to[dir%3] = float(rnd(radius<<4)-(radius<<3))/8.0;
to[(dir+1)%3] = 0.0;
- }
- else
+ }
+ else
{
to[dir%3] = 0.0;
to[(dir+1)%3] = float(rnd(radius<<4)-(radius<<3))/8.0;
to[(dir+2)%3] = 0.0;
to.add(p);
from = to;
- to[(dir+2)%3] += radius;
- }
+ to[(dir+2)%3] += radius;
+ }
else if(dir < 24) //sphere
- {
- to = vec(2*M_PI*float(rnd(1000))/1000.0, M_PI*float(rnd(1000)-500)/1000.0).mul(radius);
+ {
+ to = vec(2*M_PI*float(rnd(1000))/1000.0, M_PI*float(rnd(1000)-500)/1000.0).mul(radius);
to.add(p);
from = p;
}
to[(dir+1)%3] = float(rndscale(2*radius)-radius);
to[(dir+2)%3] = 0.0;
to.add(p);
- from = to;
+ from = to;
}
- else from = to = p;
+ else from = to = p;
if(inv) swap(from, to);
if(rnd(0x10000) > dist*dist*0xFFFF) continue;
}
}
-
+
if(flare)
newparticle(from, to, rnd(fade*3)+1, type, color, size, gravity);
- else
- {
+ else
+ {
vec d = vec(to).sub(from).rescale(vel); //velocity
particle *n = newparticle(from, d, rnd(fade*3)+1, type, color, size, gravity);
if(parts[type]->collide)
}
}
-static void regularflame(int type, const vec &p, float radius, float height, int color, int density = 3, float scale = 2.0f, float speed = 200.0f, float fade = 600.0f, int gravity = -15)
+static void regularflame(int type, const vec &p, float radius, float height, int color, int density = 3, float scale = 2.0f, float speed = 200.0f, float fade = 600.0f, int gravity = -15)
{
if(!canemitparticles()) return;
-
+
float size = scale * min(radius, height);
vec v(0, 0, min(1.0f, height)*speed);
loopi(density)
{
- vec s = p;
+ vec s = p;
s.x += rndscale(radius*2.0f)-radius;
s.y += rndscale(radius*2.0f)-radius;
newparticle(s, v, rnd(max(int(fade*height), 1))+1, type, color, size, gravity);
regularflame(type, p, radius, height, color, density, scale, speed, fade, gravity);
}
-static void makeparticles(entity &e)
+static void makeparticles(entity &e)
{
switch(e.attr1)
{
if(e.attr3 > 0) color = colorfromattr(e.attr3);
else
{
- int mat = MAT_WATER + clamp(-e.attr3, 0, 3);
+ int mat = MAT_WATER + clamp(-e.attr3, 0, 3);
const bvec &wfcol = getwaterfallcolor(mat);
color = (int(wfcol[0])<<16) | (int(wfcol[1])<<8) | int(wfcol[2]);
- if(!color)
+ if(!color)
{
const bvec &wcol = getwatercolor(mat);
color = (int(wcol[0])<<16) | (int(wcol[1])<<8) | int(wcol[2]);
newparticle(e.o, vec(0, 0, 1), 1, PART_EXPLOSION, colorfromattr(e.attr3), 4.0f)->val = 1+e.attr2;
break;
case 4: //tape - <dir> <length> <rgb>
- case 7: //lightning
+ case 7: //lightning
case 9: //steam
case 10: //water
case 13: //snow
{
switch(e.attr1)
{
- case 0: case 4: case 7: case 8: case 9: case 10: case 11: case 12: case 13:
+ case 0: case 4: case 7: case 8: case 9: case 10: case 11: case 12: case 13:
nformatstring(buf, len, "%s %d %d %d 0x%.3hX %d", entities::entname(e.type), e.attr1, e.attr2, e.attr3, e.attr4, e.attr5);
return true;
case 3:
return true;
case 5: case 6:
nformatstring(buf, len, "%s %d %d 0x%.3hX 0x%.3hX %d", entities::entname(e.type), e.attr1, e.attr2, e.attr3, e.attr4, e.attr5);
- return true;
+ return true;
}
return false;
}
extentity &e = *pe.ent;
seedemitter = &pe;
for(int millis = 0; millis < seedmillis; millis += min(emitmillis, seedmillis/10))
- makeparticles(e);
+ makeparticles(e);
seedemitter = NULL;
pe.lastemit = -seedmillis;
pe.finalize();
lastemitframe = lastmillis - (lastmillis%emitmillis);
}
else canemit = false;
-
+
flares.makelightflares();
- if(!editmode || showparticles)
+ if(!editmode || showparticles)
{
int emitted = 0, replayed = 0;
addedparticles = 0;
{
particleemitter &pe = emitters[i];
extentity &e = *pe.ent;
- if(e.o.dist(camera1->o) > maxparticledistance) { pe.lastemit = lastmillis; continue; }
+ if(e.o.dist(camera1->o) > maxparticledistance) { pe.lastemit = lastmillis; continue; }
if(cullparticles && pe.maxfade >= 0)
{
if(isfoggedsphere(pe.radius, pe.center)) { pe.lastcull = lastmillis; continue; }
replayed++;
}
emitoffset = 0;
- }
+ }
pe.lastemit = lastmillis;
}
if(dbgpcull && (canemit || replayed) && addedparticles) conoutf(CON_DEBUG, "%d emitters, %d particles", emitted, addedparticles);
}
else
{
- copystring(pakname, "base", MAXSTRLEN);
+ copystring(pakname, "maps", MAXSTRLEN);
copystring(cfgname, name, MAXSTRLEN);
}
- validmapname(mapname, fname, strpbrk(fname, "/\\") ? NULL : "base/");
+ validmapname(mapname, fname, strpbrk(fname, "/\\") ? NULL : "maps/");
}
static void fixent(entity &e, int version)
f->seek(0, SEEK_END);
*crc = f->getcrc();
}
-
+
delete f;
return true;
if(savebak==1) formatstring(bakname, "packages/%s.BAK", mapname);
else formatstring(bakname, "packages/%s_%d.BAK", mapname, totalmillis);
formatstring(cfgname, "packages/%s/%s.cfg", pakname, mcfgname);
- formatstring(picname, "packages/%s.jpg", mapname);
+ formatstring(picname, "packages/%s.png", mapname);
path(ogzname);
path(bakname);
COMMAND(mapcfgname, "");
void backup(char *name, char *backupname)
-{
+{
string backupfile;
copystring(backupfile, findfile(backupname, "wb"));
remove(backupfile);
if(!nolms)
{
if(c[i].merged) oflags |= 0x80;
- if(c[i].ext) loopj(6)
+ if(c[i].ext) loopj(6)
{
const surfaceinfo &surf = c[i].ext->surfaces[j];
if(!surf.used()) continue;
- oflags |= 0x20;
- surfmask |= 1<<j;
- totalverts += surf.totalverts();
+ oflags |= 0x20;
+ surfmask |= 1<<j;
+ totalverts += surf.totalverts();
}
}
f->write(c[i].edges, 12);
}
}
-
+
loopj(6) f->putlil<ushort>(c[i].texture[j]);
if(oflags&0x40) f->putlil<ushort>(c[i].material);
if(oflags&0x80) f->putchar(c[i].merged);
- if(oflags&0x20)
+ if(oflags&0x20)
{
f->putchar(surfmask);
f->putchar(totalverts);
{
surfaceinfo surf = c[i].ext->surfaces[j];
vertinfo *verts = c[i].ext->verts() + surf.verts;
- int layerverts = surf.numverts&MAXFACEVERTS, numverts = surf.totalverts(),
+ int layerverts = surf.numverts&MAXFACEVERTS, numverts = surf.totalverts(),
vertmask = 0, vertorder = 0, uvorder = 0,
dim = dimension(j), vc = C[dim], vr = R[dim];
if(numverts)
{
- if(c[i].merged&(1<<j))
+ if(c[i].merged&(1<<j))
{
vertmask |= 0x04;
if(layerverts == 4)
{
ivec v[4] = { verts[0].getxyz(), verts[1].getxyz(), verts[2].getxyz(), verts[3].getxyz() };
- loopk(4)
+ loopk(4)
{
const ivec &v0 = v[k], &v1 = v[(k+1)&3], &v2 = v[(k+2)&3], &v3 = v[(k+3)&3];
if(v1[vc] == v0[vc] && v1[vr] == v2[vr] && v3[vc] == v2[vc] && v3[vr] == v0[vr])
{
int vis = visibletris(c[i], j, co, size);
if(vis&4 || faceconvexity(c[i], j) < 0) vertmask |= 0x01;
- if(layerverts < 4 && vis&2) vertmask |= 0x02;
+ if(layerverts < 4 && vis&2) vertmask |= 0x02;
}
bool matchnorm = true;
- loopk(numverts)
- {
- const vertinfo &v = verts[k];
- if(v.u || v.v) vertmask |= 0x40;
+ loopk(numverts)
+ {
+ const vertinfo &v = verts[k];
+ if(v.u || v.v) vertmask |= 0x40;
if(v.norm) { vertmask |= 0x80; if(v.norm != verts[0].norm) matchnorm = false; }
}
if(matchnorm) vertmask |= 0x08;
vertmask |= 0x02 | (((k+4-vertorder)&3)<<4);
break;
}
- }
+ }
}
}
surf.verts = vertmask;
}
hasuv = false;
}
- }
+ }
if(hasnorm && vertmask&0x08) { f->putlil<ushort>(verts[0].norm); hasnorm = false; }
if(hasxyz || hasuv || hasnorm) loopk(layerverts)
{
const vertinfo &v = verts[(k+vertorder)%layerverts];
- if(hasxyz)
- {
- ivec xyz = v.getxyz();
- f->putlil<ushort>(xyz[vc]); f->putlil<ushort>(xyz[vr]);
+ if(hasxyz)
+ {
+ ivec xyz = v.getxyz();
+ f->putlil<ushort>(xyz[vc]); f->putlil<ushort>(xyz[vr]);
}
if(hasuv) { f->putlil<ushort>(v.u); f->putlil<ushort>(v.v); }
- if(hasnorm) f->putlil<ushort>(v.norm);
+ if(hasnorm) f->putlil<ushort>(v.norm);
}
if(surf.numverts&LAYER_DUP) loopk(layerverts)
{
if(hassurfs&(1<<i))
{
src = &srcsurfs[i];
- if(src->layer&2)
- {
+ if(src->layer&2)
+ {
blend = &srcsurfs[numsurfs++];
dst.lmid[0] = src->lmid;
dst.lmid[1] = blend->lmid;
dst.numverts |= LAYER_DUP;
}
else if(src->layer == 1) { dst.lmid[1] = src->lmid; dst.numverts |= LAYER_BOTTOM; }
- else { dst.lmid[0] = src->lmid; dst.numverts |= LAYER_TOP; }
+ else { dst.lmid[0] = src->lmid; dst.numverts |= LAYER_TOP; }
}
else dst.numverts |= LAYER_TOP;
bool uselms = hassurfs&(1<<i) && (dst.lmid[0] >= LMID_RESERVED || dst.lmid[1] >= LMID_RESERVED || dst.numverts&~LAYER_TOP),
if(uselms || usemerges || usenorms)
{
ivec v[4], pos[4], e1, e2, e3, n, vo = ivec(co).mask(0xFFF).shl(3);
- genfaceverts(c, i, v);
+ genfaceverts(c, i, v);
n.cross((e1 = v[1]).sub(v[0]), (e2 = v[2]).sub(v[0]));
if(usemerges)
{
int convex = (e3 = v[0]).sub(v[3]).dot(n), vis = 3;
if(!convex)
{
- if(ivec().cross(e3, e2).iszero()) { if(!n.iszero()) vis = 1; }
+ if(ivec().cross(e3, e2).iszero()) { if(!n.iszero()) vis = 1; }
else if(n.iszero()) vis = 2;
}
int order = convex < 0 ? 1 : 0;
bv.v = ushort(floor(clamp((blend->y + (blend->texcoords[k*2+1] / 255.0f) * (blend->h - 1)) * float(USHRT_MAX+1)/LM_PACKH, 0.0f, float(USHRT_MAX))));
bv.norm = usenorms && normals[i].normals[k] != bvec(128, 128, 128) ? encodenormal(normals[i].normals[k].tonormal().normalize()) : 0;
}
- }
+ }
}
setsurfaces(c, dstsurfs, verts, totalverts);
}
{
return ((mat&7)<<MATF_VOLUME_SHIFT) | (((mat>>3)&3)<<MATF_CLIP_SHIFT) | (((mat>>5)&7)<<MATF_FLAG_SHIFT);
}
-
+
void loadc(stream *f, cube &c, const ivec &co, int size, bool &failed)
{
bool haschildren = false;
else if(mapversion <= 31)
{
uchar mask = f->getchar();
- if(mask & 0x80)
+ if(mask & 0x80)
{
int mat = f->getchar();
if(mapversion < 27)
if(i < 6)
{
if(mask & 0x40) { hasnorms |= 1<<i; f->read(&normals[i], sizeof(normalscompat)); }
- if(surfaces[i].layer != 0 || surfaces[i].lmid != LMID_AMBIENT)
+ if(surfaces[i].layer != 0 || surfaces[i].lmid != LMID_AMBIENT)
hassurfs |= 1<<i;
if(surfaces[i].layer&2) numsurfs++;
}
}
}
}
- }
- }
+ }
+ }
if(hassurfs || hasnorms || hasmerges)
convertoldsurfaces(c, co, size, surfaces, hassurfs, normals, hasnorms, merges, hasmerges);
}
else
{
- if(octsav&0x40)
+ if(octsav&0x40)
{
if(mapversion <= 32)
{
memset(c.ext->surfaces, 0, sizeof(c.ext->surfaces));
memset(c.ext->verts(), 0, totalverts*sizeof(vertinfo));
int offset = 0;
- loopi(6) if(surfmask&(1<<i))
+ loopi(6) if(surfmask&(1<<i))
{
surfaceinfo &surf = c.ext->surfaces[i];
f->read(&surf, sizeof(surfaceinfo));
genfaceverts(c, i, v);
bool hasxyz = (vertmask&0x04)!=0, hasuv = (vertmask&0x40)!=0, hasnorm = (vertmask&0x80)!=0;
if(hasxyz)
- {
+ {
ivec e1, e2, e3;
- n.cross((e1 = v[1]).sub(v[0]), (e2 = v[2]).sub(v[0]));
+ n.cross((e1 = v[1]).sub(v[0]), (e2 = v[2]).sub(v[0]));
if(n.iszero()) n.cross(e2, (e3 = v[3]).sub(v[0]));
bias = -n.dot(ivec(v[0]).mul(size).add(vo));
}
if(hasuv && vertmask&0x02)
{
int uvorder = (vertmask&0x30)>>4;
- vertinfo &v0 = verts[uvorder], &v1 = verts[(uvorder+1)&3], &v2 = verts[(uvorder+2)&3], &v3 = verts[(uvorder+3)&3];
+ vertinfo &v0 = verts[uvorder], &v1 = verts[(uvorder+1)&3], &v2 = verts[(uvorder+2)&3], &v3 = verts[(uvorder+3)&3];
v0.u = f->getlil<ushort>(); v0.v = f->getlil<ushort>();
v2.u = f->getlil<ushort>(); v2.v = f->getlil<ushort>();
v1.u = v0.u; v1.v = v2.v;
b3.u = b2.u; b3.v = b0.v;
}
hasuv = false;
- }
+ }
}
if(hasnorm && vertmask&0x08)
{
xyz[dim] = n[dim] ? -(bias + n[vc]*xyz[vc] + n[vr]*xyz[vr])/n[dim] : vo[dim];
v.setxyz(xyz);
}
- if(hasuv) { v.u = f->getlil<ushort>(); v.v = f->getlil<ushort>(); }
+ if(hasuv) { v.u = f->getlil<ushort>(); v.v = f->getlil<ushort>(); }
if(hasnorm) v.norm = f->getlil<ushort>();
}
if(surf.numverts&LAYER_DUP) loopk(layerverts)
v.norm = t.norm;
}
}
- }
+ }
}
c.children = (haschildren ? loadchildren(f, co, size>>1, failed) : NULL);
cube *loadchildren(stream *f, const ivec &co, int size, bool &failed)
{
cube *c = newcubes();
- loopi(8)
+ loopi(8)
{
loadc(f, c[i], ivec(i, co, size), size, failed);
if(failed) break;
f->putlil<float>(vs.alphafront);
f->putlil<float>(vs.alphaback);
}
- if(vs.changed & (1<<VSLOT_COLOR))
+ if(vs.changed & (1<<VSLOT_COLOR))
{
loopk(3) f->putlil<float>(vs.colorscale[k]);
}
do vs = vs->next; while(vs && vs->index >= numvslots);
if(!vs) break;
prev[vs->index] = cur->index;
- }
+ }
}
int lastroot = 0;
loopi(numvslots)
if(lastroot < numvslots) f->putlil<int>(-(numvslots - lastroot));
delete[] prev;
}
-
+
void loadvslot(stream *f, VSlot &vs, int changed)
{
vs.changed = changed;
vs.alphafront = f->getlil<float>();
vs.alphaback = f->getlil<float>();
}
- if(vs.changed & (1<<VSLOT_COLOR))
+ if(vs.changed & (1<<VSLOT_COLOR))
{
loopk(3) vs.colorscale[k] = f->getlil<float>();
}
else
{
prev[vslots.length()] = f->getlil<int>();
- loadvslot(f, *vslots.add(new VSlot(NULL, vslots.length())), changed);
+ loadvslot(f, *vslots.add(new VSlot(NULL, vslots.length())), changed);
numvslots--;
}
}
hdr.blendmap = shouldsaveblendmap();
hdr.numvars = 0;
hdr.numvslots = numvslots;
- enumerate(idents, ident, id,
+ enumerate(idents, ident, id,
{
if((id.type == ID_VAR || id.type == ID_FVAR || id.type == ID_SVAR) && id.flags&IDF_OVERRIDE && !(id.flags&IDF_READONLY) && id.flags&IDF_OVERRIDDEN) hdr.numvars++;
});
lilswap(&hdr.version, 9);
f->write(&hdr, sizeof(hdr));
-
- enumerate(idents, ident, id,
+
+ enumerate(idents, ident, id,
{
if((id.type!=ID_VAR && id.type!=ID_FVAR && id.type!=ID_SVAR) || !(id.flags&IDF_OVERRIDE) || id.flags&IDF_READONLY || !(id.flags&IDF_OVERRIDDEN)) continue;
f->putchar(id.type);
game::writegamedata(extras);
f->putlil<ushort>(extras.length());
f->write(extras.getbuf(), extras.length());
-
+
f->putlil<ushort>(texmru.length());
loopv(texmru) f->putlil<ushort>(texmru[i]);
char *ebuf = new char[entities::extraentinfosize()];
renderprogress(0, "saving octree...");
savec(worldroot, ivec(0, 0, 0), worldsize>>1, f, nolms);
- if(!nolms)
+ if(!nolms)
{
if(lightmaps.length()) renderprogress(0, "saving lightmaps...");
loopv(lightmaps)
{
if(f->read(&chdr.lightprecision, sizeof(chdr) - 7*sizeof(int)) != sizeof(chdr) - 7*sizeof(int)) { conoutf(CON_ERROR, "map %s has malformatted header", ogzname); delete f; return false; }
}
- else
+ else
{
int extra = 0;
- if(hdr.version <= 29) extra++;
+ if(hdr.version <= 29) extra++;
if(f->read(&hdr.blendmap, sizeof(hdr) - (7+extra)*sizeof(int)) != sizeof(hdr) - (7+extra)*sizeof(int)) { conoutf(CON_ERROR, "map %s has malformatted header", ogzname); delete f; return false; }
}
}
setsvar("maptitle", chdr.maptitle);
hdr.blendmap = chdr.blendmap;
- hdr.numvars = 0;
+ hdr.numvars = 0;
hdr.numvslots = 0;
}
- else
+ else
{
lilswap(&hdr.blendmap, 2);
if(hdr.version <= 29) hdr.numvslots = 0;
setvar("mapscale", worldscale, true, false);
renderprogress(0, "loading vars...");
-
+
loopi(hdr.numvars)
{
int type = f->getchar(), ilen = f->getlil<ushort>();
if(dbgvars) conoutf(CON_DEBUG, "read var %s: %d", name, val);
break;
}
-
+
case ID_FVAR:
{
float val = f->getlil<float>();
if(dbgvars) conoutf(CON_DEBUG, "read fvar %s: %f", name, val);
break;
}
-
+
case ID_SVAR:
{
int slen = f->getlil<ushort>();
f->read(extras.pad(extrasize), extrasize);
if(samegame) game::readgamedata(extras);
}
-
+
texmru.shrink(0);
if(hdr.version<14)
{
}
if(ebuf) delete[] ebuf;
- if(hdr.numents > MAXENTS)
+ if(hdr.numents > MAXENTS)
{
conoutf(CON_WARN, "warning: map has %d entities", hdr.numents);
f->seek((hdr.numents-MAXENTS)*(samegame ? sizeof(entity) + einfosize : eif), SEEK_CUR);
execfile("data/default_map_settings.cfg", false);
execfile(cfgname, false);
identflags &= ~IDF_OVERRIDDEN;
-
+
extern void fixlightmapnormals();
if(hdr.version <= 25) fixlightmapnormals();
extern void fixrotatedlightmaps();
if(maptitle[0] && strcmp(maptitle, "Untitled Map by Unknown")) conoutf(CON_ECHO, "%s", maptitle);
startmap(cname ? cname : mname);
-
+
return true;
}
void writeobj(char *name)
{
defformatstring(fname, "%s.obj", name);
- stream *f = openfile(path(fname), "w");
+ stream *f = openfile(path(fname), "w");
if(!f) return;
f->printf("# obj file of Cube 2 level\n\n");
defformatstring(mtlname, "%s.mtl", name);
path(mtlname);
- f->printf("mtllib %s\n\n", mtlname);
+ f->printf("mtllib %s\n\n", mtlname);
vector<vec> verts;
vector<vec2> texcoords;
hashtable<vec, int> shareverts(1<<16);
const vec2 &tc = v.tc;
ivec2 &key = keys.add();
key.x = shareverts.access(pos, verts.length());
- if(key.x == verts.length())
+ if(key.x == verts.length())
{
verts.add(pos);
loopl(3)
if(v.y != floor(v.y)) f->printf("v %.3f ", -v.y); else f->printf("v %d ", int(-v.y));
if(v.z != floor(v.z)) f->printf("%.3f ", v.z); else f->printf("%d ", int(v.z));
if(v.x != floor(v.x)) f->printf("%.3f\n", v.x); else f->printf("%d\n", int(v.x));
- }
+ }
f->printf("\n");
loopv(texcoords)
{
const vec2 &tc = texcoords[i];
- f->printf("vt %.6f %.6f\n", tc.x, 1-tc.y);
+ f->printf("vt %.6f %.6f\n", tc.x, 1-tc.y);
}
f->printf("\n");
f->printf("newmtl slot%d\n", usedmtl[i]);
f->printf("map_Kd %s\n", vslot.slot->sts.empty() ? notexture->name : path(makerelpath("packages", vslot.slot->sts[0].name)));
f->printf("\n");
- }
+ }
delete f;
-}
-
-COMMAND(writeobj, "s");
+}
+
+COMMAND(writeobj, "s");
#endif
string oldname;
copystring(oldname, getclientmap());
defformatstring(mname, "getmap_%d", lastmillis);
- defformatstring(fname, "packages/base/%s.ogz", mname);
+ defformatstring(fname, "packages/maps/%s.ogz", mname);
stream *map = openrawfile(path(fname), "wb");
if(!map) return;
conoutf("received map");
conoutf("sending map...");
defformatstring(mname, "sendmap_%d", lastmillis);
save_world(mname, true);
- defformatstring(fname, "packages/base/%s.ogz", mname);
+ defformatstring(fname, "packages/maps/%s.ogz", mname);
stream *map = openrawfile(path(fname), "rb");
if(map)
{
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"ammo/shells", "ammo/bullets", "ammo/rockets", "ammo/rrounds", "ammo/grenades", "ammo/cartridges",
- "health", "boost", "armor/green", "armor/yellow", "quad", "teleporter",
+ "health", "boost", "tinyhealth", "tinyarmour", "armor/green", "armor/yellow", "quad", "teleporter",
NULL, NULL,
"carrot",
NULL, NULL,
case I_SHELLS: case I_BULLETS: case I_ROCKETS: case I_ROUNDS: case I_GRENADES: case I_CARTRIDGES:
if(m_noammo) continue;
break;
- case I_HEALTH: case I_BOOST: case I_GREENARMOUR: case I_YELLOWARMOUR: case I_QUAD:
+ case I_HEALTH: case I_BOOST: case I_TINYHEALTH: case I_TINYARMOUR: case I_GREENARMOUR: case I_YELLOWARMOUR: case I_QUAD:
if(m_noitems) continue;
break;
}
{
"none?", "light", "mapmodel", "playerstart", "envmap", "particles", "sound", "spotlight",
"shells", "bullets", "rockets", "riflerounds", "grenades", "cartridges",
- "health", "healthboost", "greenarmour", "yellowarmour", "quaddamage",
+ "health", "healthboost", "tinyhealth", "tinyarmour", "greenarmour", "yellowarmour", "quaddamage",
"teleport", "teledest",
"jumppad",
"", "", "", "",
SPOTLIGHT = ET_SPOTLIGHT,
I_SHELLS, I_BULLETS, I_ROCKETS, I_ROUNDS, I_GRENADES, I_CARTRIDGES,
I_HEALTH, I_BOOST,
+ /**/I_TINYHEALTH, I_TINYARMOUR,
I_GREENARMOUR, I_YELLOWARMOUR,
I_QUAD,
TELEPORT, // attr1 = idx, attr2 = model, attr3 = tag
HICON_SPACE = 40
};
-static struct itemstat { int add, max, sound; const char *name; int icon, info; } itemstats[] =
-{
+static struct itemstat {
+ int add, max, sound;
+ const char *name;
+ int icon, info;
+} itemstats[] = {
{10, 30, S_ITEMAMMO, "SG", HICON_SG, GUN_SG},
{20, 60, S_ITEMAMMO, "CG", HICON_CG, GUN_CG},
{5, 15, S_ITEMAMMO, "RL", HICON_RL, GUN_RL},
{30, 120, S_ITEMAMMO, "PI", HICON_PISTOL, GUN_PISTOL},
{25, 100, S_ITEMHEALTH, "H", HICON_HEALTH, -1},
{100, 200, S_ITEMHEALTH, "MH", HICON_HEALTH, 50},
+ {5, 100, S_ITEMHEALTH, "TH", HICON_HEALTH, -1},
+ {5, 50, S_ITEMARMOUR, "TA", HICON_BLUE_ARMOUR, A_BLUE},
{100, 100, S_ITEMARMOUR, "GA", HICON_GREEN_ARMOUR, A_GREEN},
{200, 200, S_ITEMARMOUR, "YA", HICON_YELLOW_ARMOUR, A_YELLOW},
{20000, 30000, S_ITEMPUP, "Q", HICON_QUAD, -1},
#define EXP_SELFPUSH 2.5f
#define EXP_DISTSCALE 1.5f
-static const struct guninfo { int sound, attackdelay, damage, spread, projspeed, kickamount, range, rays, hitpush, exprad, ttl; const char *name, *file; short part; } guns[NUMGUNS] =
-{
- // delay| dmg| spr| spd| kck| rng| ray| pus| exp|
+static const struct guninfo {
+ int sound, attackdelay, damage, spread, projspeed, kickamount, range, rays, hitpush, exprad, ttl;
+ const char *name, *file;
+ short part;
+} guns[NUMGUNS] = {
+ // delay| dmg| spr| spd| kck| rng| ray| pus| exp|
{ S_PUNCH1, 100, 30, 0, 0, 0, 30, 1, 80, 0, 0, "fist", "fist", 0 },
{ S_SG, 1000, 20, 280, 0, 20, 1024, MAXRAYS, 80, 0, 0, "shotgun", "shotg", 0 },
{ S_CG, 100, 20, 70, 0, 10, 1024, 1, 80, 0, 0, "chaingun", "chaing", 0 },
switch(type)
{
case I_BOOST: return maxhealth<is.max || health<maxhealth;
+ case I_TINYHEALTH: return health<maxhealth;
case I_HEALTH: return health<maxhealth;
+ case I_TINYARMOUR:
+ if(armourtype==A_GREEN || armourtype==A_YELLOW || armour>=50)return false;
case I_GREENARMOUR:
// (100h/100g only absorbs 200 damage)
- if(armourtype==A_YELLOW && armour>=100) return false;
+ if(armourtype==A_YELLOW && armour>=100)return false;
case I_YELLOWARMOUR: return !armourtype || armour<is.max;
case I_QUAD: return quadmillis<is.max;
default: return ammo[is.info]<is.max;
itemstat &is = itemstats[type-I_SHELLS];
switch(type)
{
+ case I_TINYHEALTH:
+ health = min(health+is.add, maxhealth);
+ break;
+ case I_TINYARMOUR:
+ armour = min(armour+is.add, is.max);
+ armourtype = A_BLUE;
+ break;
case I_BOOST:
maxhealth = min(maxhealth+is.info, is.max);
case I_HEALTH: // boost also adds to health
case I_GRENADES:
case I_CARTRIDGES: sec = np*4; break;
case I_HEALTH: sec = np*5; break;
+ case I_TINYHEALTH: sec = np*5; break;
+ case I_TINYARMOUR: sec = np*5; break;
case I_GREENARMOUR: sec = 20; break;
case I_YELLOWARMOUR: sec = 30; break;
case I_BOOST: sec = 60; break;
{
uint signature;
ushort version, needversion, flags, compression, modtime, moddate;
- uint crc32, compressedsize, uncompressedsize;
+ uint crc32, compressedsize, uncompressedsize;
ushort namelength, extralength, commentlength, disknumber, internalattribs;
uint externalattribs, offset;
};
zipfile() : name(NULL), header(0), offset(~0U), size(0), compressedsize(0)
{
}
- ~zipfile()
- {
- DELETEA(name);
+ ~zipfile()
+ {
+ DELETEA(name);
}
};
if(next + carry < ZIP_DIRECTORY_SIZE || fseek(f, offset, SEEK_SET) < 0 || fread(buf, 1, next, f) != next) return false;
len = next + carry;
uchar *search = &buf[next-1];
- for(; search >= buf; search--) if(*(uint *)search == signature) break;
+ for(; search >= buf; search--) if(*(uint *)search == signature) break;
if(search >= buf) { src = search; break; }
- }
+ }
if(!src || &buf[len] - src < ZIP_DIRECTORY_SIZE) return false;
pname[namelen] = '\0';
path(pname);
char *name = newstring(pname);
-
+
zipfile &f = files.add();
f.name = name;
f.header = hdr.offset;
const char *foundpackages = strstr(f.name, packagesdir);
if(foundpackages)
{
- if(foundpackages > f.name)
+ if(foundpackages > f.name)
{
stripdir = f.name;
striplen = foundpackages - f.name;
stripdir = f.name;
striplen = ogzdir + 1 - f.name;
}
- if(!mountdir) mountdir = "packages/base/";
+ if(!mountdir) mountdir = "packages/maps/";
break;
}
- }
+ }
}
string mdir = "", fname;
if(mountdir)
if(plen < 4 || !strchr(&pname[plen-4], '.')) concatstring(pname, ".zip");
ziparchive *exists = findzip(pname);
- if(exists)
+ if(exists)
{
conoutf(CON_ERROR, "already added zip %s", pname);
return true;
}
-
+
FILE *f = fopen(findfile(pname, "rb"), "rb");
- if(!f)
+ if(!f)
{
conoutf(CON_ERROR, "could not open file %s", pname);
return false;
fclose(f);
return false;
}
-
+
ziparchive *arch = new ziparchive;
arch->name = newstring(pname);
arch->data = f;
conoutf("added zip %s", pname);
return true;
-}
-
+}
+
bool removezip(const char *name)
{
string pname;
return false;
}
conoutf("removed zip %s", exists->name);
- archives.removeobj(exists);
+ archives.removeobj(exists);
delete exists;
return true;
}
{
switch(whence)
{
- case SEEK_END: pos += info->offset + info->size; break;
+ case SEEK_END: pos += info->offset + info->size; break;
case SEEK_CUR: pos += reading; break;
case SEEK_SET: pos += info->offset; break;
default: return false;
- }
+ }
pos = clamp(pos, offset(info->offset), offset(info->offset + info->size));
arch->owner = NULL;
if(fseek(arch->data, int(pos), SEEK_SET) < 0) return false;
ended = false;
return true;
}
-
+
switch(whence)
{
- case SEEK_END: pos += info->size; break;
+ case SEEK_END: pos += info->size; break;
case SEEK_CUR: pos += zfile.total_out; break;
case SEEK_SET: break;
default: return false;
reading = info->offset + info->compressedsize;
zfile.next_in += zfile.avail_in;
zfile.avail_in = 0;
- zfile.total_in = info->compressedsize;
+ zfile.total_in = info->compressedsize;
zfile.total_out = info->size;
arch->owner = NULL;
ended = false;
if(pos < 0) return false;
if(pos >= (offset)zfile.total_out) pos -= zfile.total_out;
- else
+ else
{
if(zfile.next_in && zfile.total_in <= uint(zfile.next_in - buf))
{
if(fseek(arch->data, reading, SEEK_SET) < 0) { stopreading(); return 0; }
arch->owner = this;
}
-
+
size_t n = fread(buf, 1, min(len, size_t(info->size + info->offset - reading)), arch->data);
reading += n;
if(n < len) ended = true;
{
if(!zfile.avail_in) readbuf(BUFSIZE);
int err = inflate(&zfile, Z_NO_FLUSH);
- if(err != Z_OK)
+ if(err != Z_OK)
{
if(err == Z_STREAM_END) ended = true;
else
#ifndef STANDALONE
if(dbgzip) conoutf(CON_DEBUG, "inflate error: %s", zError(err));
#endif
- stopreading();
+ stopreading();
}
- break;
+ break;
}
}
return len - zfile.avail_out;