oldselstyle - Enable/disable 1.0.4 rendering of the grid/current selection. (quads rather than tris)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6406 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-05-04 19:16:11 +00:00
parent 365d161187
commit 9d8afdcad5
4 changed files with 16 additions and 6 deletions
+3 -1
View File
@@ -938,7 +938,9 @@ docexample [old_editbinds = 0] [disables the old editing binds];
docexample [old_editbinds = 1] [enables the old editing binds];
docremark [If disabled, an updated editing binds system is used, see the comments in "/config/resetbinds.cfg" for more info.];
docident [slowmove] [Enables or disables the old editfly velocity.];
docargument [N] [enable or disable] [min 0/max 1/default 0] [0];
docargument [N] [0 off, 1 on] [min 0/max 1/default 0] [0];
docident [oldselstyle] [Enables or disables using triangles to render the editing grid/current selection instead of squares.];
docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0];
docsection [Menus]
docident [chmenumdl] [Changes the menu model of a specified menu.];
docargument [N] [the name of the menu] [] [0];
+1
View File
@@ -403,6 +403,7 @@ menuitemslider "Console size: " 0 20 "$consize" 1 "" [ consize $arg1 ]
menuitemslider "Font type: " 0 2 "$__fontsetting" 1 [ "Default" "v104" "Mono" ] [ if (= $arg1 1) [ setfont v104; __fontsetting = 1 ] [ if (= $arg1 2) [ setfont mono; __fontsetting = 2 ] [ setfont default; __fontsetting = 0 ] ] ]
menuitemslider "Mini-map background style: " 0 2 "$showmapbackdrop" 1 [ "Fully Transparent" "Black" "White/Transparent" ] [ showmapbackdrop $arg1 ]
menuitemslider "Fly style: " 0 1 "$flystyle" 1 [ "fly fast, toggle slow" "fly slow, toggle fast" ] [ flystyle = $arg1; slowmove $arg1 ]
menuitemslider "Grid/Selection style: " 0 1 "$oldselstyle" 1 [ "triangles" "squares (default)" ] [ oldselstyle $arg1 ]
menuitemcheckbox "Enable per-official map dynamic gamma: " "$dyngamma" [ dyngamma = $arg1 ]
menuitemtextinput "Set default gamma for this map: " "(at $ofc_gamma_list (findlist $defaultmaps (curmap 1)))" [ setgamma $arg1 ]
+7 -2
View File
@@ -3705,9 +3705,14 @@ Output:
<variable name="slowmove">
<description>Enables or disables the old editfly velocity.</description>
<value token="N" description="enable or disable" minValue="0" maxValue="1" defaultValue="0"/>
<value token="N" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="0"/>
</variable>
<variable name="oldselstyle">
<description>Enables or disables using triangles to render the editing grid/current selection instead of squares.</description>
<value token="N" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="1"/>
</variable>
</identifiers>
</section>
<!-- Editing Section Ends -->
+5 -3
View File
@@ -209,13 +209,15 @@ void linestyle(float width, int r, int g, int b)
glColor3ub(r,g,b);
}
VARP(oldselstyle, 0, 1, 1); // Make the old (1004) grid/selection style default (render as quads rather than tris)
void box(block &b, float z1, float z2, float z3, float z4)
{
glBegin(GL_TRIANGLE_STRIP);
glBegin((oldselstyle ? GL_QUADS : GL_TRIANGLE_STRIP));
glVertex3f((float)b.x, (float)b.y, z1);
glVertex3f((float)b.x+b.xs, (float)b.y, z2);
glVertex3f((float)b.x, (float)b.y+b.ys, z4);
glVertex3f((float)b.x+b.xs, (float)b.y+b.ys, z3);
glVertex3f((float)(oldselstyle ? b.x+b.xs : b.x), (float)b.y+b.ys, (oldselstyle ? z3 : z4));
glVertex3f((float)(oldselstyle ? b.x : b.x+b.xs), (float)b.y+b.ys, (oldselstyle ? z4 : z3));
glEnd();
xtraverts += 4;
}