summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/brushes.cfg (renamed from data/blendbrush.cfg)0
-rwxr-xr-xdata/custom_maps_menu.cfg71
-rw-r--r--data/default_map.cfg27
-rw-r--r--data/default_map_settings.cfg32
-rw-r--r--data/game.cfg (renamed from data/game_fps.cfg)0
5 files changed, 98 insertions, 32 deletions
diff --git a/data/blendbrush.cfg b/data/brushes.cfg
index 506193c..506193c 100644
--- a/data/blendbrush.cfg
+++ b/data/brushes.cfg
diff --git a/data/custom_maps_menu.cfg b/data/custom_maps_menu.cfg
new file mode 100755
index 0000000..cac660a
--- /dev/null
+++ b/data/custom_maps_menu.cfg
@@ -0,0 +1,71 @@
+// Custom map menu, ported from Sauerbraten, 7Year aka Xolatile.
+
+octabase = "^f7"
+octamain = "^f1"
+unmapsx = 4
+unmapsy = 24
+
+custommaps = ""
+
+loopfiles curmap "packages/maps" "ogz" [
+ if (< (indexof $allmaps $curmap) 0) [
+ custommaps = (concat $custommaps $curmap)
+ ]
+]
+
+sy_nume = (listlen $custommaps)
+
+showcustommaps = [sy_remaps; showgui sy_unmaps]
+
+sy_remaps = [
+ custommaps = ""
+ loopfiles curmap "packages/maps" "ogz" [
+ if (< (indexof $allmaps $curmap) 0) [
+ custommaps = (concat $custommaps $curmap)
+ ]
+ ]
+ custommaps = (sortlist $custommaps x y [<=s $x $y])
+ amountxy = (+ (div (listlen $custommaps) $unmapsy) 1)
+ loop syxy $amountxy [
+ (concatword "custommaps" $syxy) = ""
+ ]; syxy = 0
+ loop syxy $amountxy [
+ (concatword "custommaps" $syxy)
+ loop unto $unmapsy [
+ (concatword "custommaps" $syxy) = (concat $(concatword "custommaps" $syxy) (at $custommaps (+ (* $unmapsy $syxy) $unto)))
+ ]
+ ]; syxy = 0; unto = 0
+ sy_nume = (listlen $custommaps)
+]
+
+newgui sy_unmaps [
+ if (mod $amountxy $unmapsx) [
+ sy_unpage = (+ (div $amountxy $unmapsx) 1)
+ ] [
+ sy_unpage = (div $amountxy $unmapsx)
+ ]
+ loop syi $sy_unpage [
+ guilist [
+ loop syj $unmapsx [
+ if (< (+ (* $syi $unmapsx) $syj) $amountxy) [
+ guistrut $unmapsy 1
+ guilist [
+ guistrut 27 1
+ looplist unto $(concatword "custommaps" (+ (* $syi $unmapsx) $syj )) [
+ guibutton (concatword $octabase $unto) (concat map $unto) "cube"
+ ]
+ ]
+ ]
+ ]
+ guibar
+ if (< (+ (* $syi $unmapsx) $syj) $amountxy) [
+ guiimage (concatword "packages/maps/" (strreplace $guirolloveraction "map " "") ".jpg") $guirolloveraction 6 1 "data/cube.png"
+ ]
+ ]
+ if (= (+ $syi 1) $sy_unpage) [
+
+ ] [
+ guitab (concatword $octamain (+ $syi 2))
+ ]
+ ]
+] (concatword $octamain "Custom Maps (" $sy_nume ")")
diff --git a/data/default_map.cfg b/data/default_map.cfg
new file mode 100644
index 0000000..50c7039
--- /dev/null
+++ b/data/default_map.cfg
@@ -0,0 +1,27 @@
+// Default settings for maps, executed each time the map is loaded.
+
+if (strcmp $skybox "") [
+ skybox "skyboxes/black"
+]
+
+materialreset
+
+texture water "materials/water.png"
+texture 1 "materials/waterfall.png"
+texture 1 "materials/water_n.png"
+texture 1 "materials/water_dudv.png"
+texture 1 "materials/waterfall_n.png"
+texture 1 "materials/waterfall_dudv.png"
+
+texture lava "materials/lava.png" 0 0 0 0.5
+texture 1 "materials/lava.png" 0 0 0 0.5
+
+texturereset
+
+ setshader "stdworld"
+ texture 0 "textures/sky.png"
+ texture 0 "textures/default.png"
+
+ exec "packages/textures/ex/package.cfg"
+
+ setshader "stdworld"
diff --git a/data/default_map_settings.cfg b/data/default_map_settings.cfg
deleted file mode 100644
index 589f650..0000000
--- a/data/default_map_settings.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-// default settings for maps
-
-// on every map load, this file will be executed, followed by
-// "package.cfg" in the package dir of the map, and "<mapname>.cfg",
-// which you can use to override the settings in this file.
-
-// the skybox for this map:
-if (strcmp $skybox "") [
- skybox "skyboxes/black"
-]
-
-materialreset
-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.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
- setshader stdworld // use default world shader unless specified otherwise
- texture 0 "textures/sky.png" // dummy sky texture
- texture 0 "textures/default.png" // default geometry texture
-
- exec "packages/textures/ex/package.cfg"
-
- // for cfgs that don't set shaders...
- setshader stdworld
diff --git a/data/game_fps.cfg b/data/game.cfg
index 1720ccc..1720ccc 100644
--- a/data/game_fps.cfg
+++ b/data/game.cfg