- portals.show_2d = INIGetInt(RENDER_2D, FALSE) ? true : false;
- portals.aa_2d = INIGetInt(AA_2D, FALSE) ? true : false;
- portals.width_2d = (float)INIGetInt(WIDTH_2D, 10);
- portals.color_2d = (COLORREF)INIGetInt(COLOR_2D, RGB(0, 0, 255)) & 0xFFFFFF;
-
- if (portals.width_2d > 40.0f)
- portals.width_2d = 40.0f;
- else if (portals.width_2d < 2.0f)
- portals.width_2d = 2.0f;
-
- portals.show_3d = INIGetInt(RENDER_3D, TRUE) ? true : false;
-
- portals.zbuffer = INIGetInt(ZBUFFER, 1);
- portals.fog = INIGetInt(FOG, FALSE) ? true : false;
- portals.polygons = INIGetInt(POLYGON, TRUE);
- portals.lines = INIGetInt(LINE, TRUE);
- portals.aa_3d = INIGetInt(AA_3D, FALSE) ? true : false;
- portals.width_3d = (float)INIGetInt(WIDTH_3D, 4);
- portals.color_3d = (COLORREF)INIGetInt(COLOR_3D, RGB(255, 255, 0)) & 0xFFFFFF;
- portals.color_fog = (COLORREF)INIGetInt(COLOR_FOG, RGB(127, 127, 127)) & 0xFFFFFF;
- portals.trans_3d = (float)INIGetInt(TRANS_3D, 50);
- portals.clip = INIGetInt(CLIP, FALSE) ? true : false;
- portals.clip_range = (float)INIGetInt(CLIP_RANGE, 16);
-
- if (portals.clip_range < 1)
- portals.clip_range = 1;
- else if (portals.clip_range > 128)
- portals.clip_range = 128;
-
- if (portals.zbuffer < 0)
- portals.zbuffer = 0;
- else if (portals.zbuffer > 2)
- portals.zbuffer = 0;
-
- if (portals.width_3d > 40.0f)
- portals.width_3d = 40.0f;
- else if (portals.width_3d < 2.0f)
- portals.width_3d = 2.0f;
-
- if (portals.trans_3d > 100.0f)
- portals.trans_3d = 100.0f;
- else if (portals.trans_3d < 0.0f)
- portals.trans_3d = 0.0f;
-
- SaveConfig();
-
- portals.FixColors();
+ portals.show_2d = INIGetInt( RENDER_2D, FALSE ) ? true : false;
+ portals.aa_2d = INIGetInt( AA_2D, FALSE ) ? true : false;
+ portals.width_2d = (float)INIGetInt( WIDTH_2D, 10 );
+ portals.color_2d = (COLORREF)INIGetInt( COLOR_2D, RGB( 0, 0, 255 ) ) & 0xFFFFFF;
+
+ if ( portals.width_2d > 40.0f ) {
+ portals.width_2d = 40.0f;
+ }
+ else if ( portals.width_2d < 2.0f ) {
+ portals.width_2d = 2.0f;
+ }
+
+ portals.show_3d = INIGetInt( RENDER_3D, TRUE ) ? true : false;
+
+ portals.zbuffer = INIGetInt( ZBUFFER, 1 );
+ portals.fog = INIGetInt( FOG, FALSE ) ? true : false;
+ portals.polygons = INIGetInt( POLYGON, TRUE );
+ portals.lines = INIGetInt( LINE, TRUE );
+ portals.aa_3d = INIGetInt( AA_3D, FALSE ) ? true : false;
+ portals.width_3d = (float)INIGetInt( WIDTH_3D, 4 );
+ portals.color_3d = (COLORREF)INIGetInt( COLOR_3D, RGB( 255, 255, 0 ) ) & 0xFFFFFF;
+ portals.color_fog = (COLORREF)INIGetInt( COLOR_FOG, RGB( 127, 127, 127 ) ) & 0xFFFFFF;
+ portals.trans_3d = (float)INIGetInt( TRANS_3D, 50 );
+ portals.clip = INIGetInt( CLIP, FALSE ) ? true : false;
+ portals.clip_range = (float)INIGetInt( CLIP_RANGE, 16 );
+
+ if ( portals.clip_range < 1 ) {
+ portals.clip_range = 1;
+ }
+ else if ( portals.clip_range > 128 ) {
+ portals.clip_range = 128;
+ }
+
+ if ( portals.zbuffer < 0 ) {
+ portals.zbuffer = 0;
+ }
+ else if ( portals.zbuffer > 2 ) {
+ portals.zbuffer = 0;
+ }
+
+ if ( portals.width_3d > 40.0f ) {
+ portals.width_3d = 40.0f;
+ }
+ else if ( portals.width_3d < 2.0f ) {
+ portals.width_3d = 2.0f;
+ }
+
+ if ( portals.trans_3d > 100.0f ) {
+ portals.trans_3d = 100.0f;
+ }
+ else if ( portals.trans_3d < 0.0f ) {
+ portals.trans_3d = 0.0f;
+ }
+
+ SaveConfig();
+
+ portals.FixColors();