]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'iqmmodel' into 'master'
authorMario <zacjardine@y7mail.com>
Sun, 29 Apr 2018 11:37:17 +0000 (11:37 +0000)
committerMario <zacjardine@y7mail.com>
Sun, 29 Apr 2018 11:37:17 +0000 (11:37 +0000)
plugins/iqmmodel: apply textures on surfaces

Closes #116

See merge request xonotic/netradiant!84

tools/quake3/q3map2/game_etut.h
tools/quake3/q3map2/game_quakelive.h
tools/quake3/q3map2/game_unvanquished.h
tools/quake3/q3map2/game_wolf.h
tools/quake3/q3map2/game_wolfet.h
tools/quake3/q3map2/help.c
tools/quake3/q3map2/vis.c

index 0841283da3179b83a7d76bfdcd387435a29b58e1..f4303f2e63153470c2f3431d8d14567239c923f2 100644 (file)
        "flareshader",      /* default flare shader */
        qfalse,             /* wolf lighting model? */
        128,                /* lightmap width/height */
-       1.0f,               /* lightmap gamma */
+       2.2f,               /* lightmap gamma */
        qtrue,              /* lightmap sRGB */
        qfalse,             /* texture sRGB (yes, this is incorrect, but we better match ET:UT) */
        qfalse,             /* color sRGB */
index a130ead1312941f2efbe31ec5923983c34d99f1d..3f7a29daa659119121701e1b59164a702223e7b5 100644 (file)
    ------------------------------------------------------------------------------- */
 
 
+   /* -------------------------------------------------------------------------------
+
+   Additional surface flags for Quake Live
+
+   ------------------------------------------------------------------------------- */
+
+#define Q_SURF_SNOWSTEPS       0x80000         // snow footsteps
+#define Q_SURF_WOODSTEPS       0x100000        // wood footsteps
+#define Q_SURF_DMGTHROUGH      0x200000        // Missile dmg through surface(?)
+                                                                               // (This is not in use atm, will
+                                                                               //  probably be re-purposed some day.)
+
 
 /* -------------------------------------------------------------------------------
 
@@ -52,9 +64,9 @@
 
 {
        "quakelive",        /* -game x */
-       "baseq3",           /* default base game data dir (FIXME what does quake live really use?) */
-       ".q3a",             /* unix home sub-dir (FIXME what does quake live really use?) */
-       "quake",            /* magic path word (FIXME where does quake live install to?) */
+       "baseq3",           /* default base game data dir */
+       ".quakelive/quakelive/home",             /* unix home sub-dir */
+       "quake",            /* magic path word */
        "scripts",          /* shader directory */
        64,                 /* max lightmapped surface verts */
        999,                /* max surface verts */
                { "ladder",         0,                          0,                          Q_SURF_LADDER,              0,                          0,                          0 },
                { "nodamage",       0,                          0,                          Q_SURF_NODAMAGE,            0,                          0,                          0 },
                { "metalsteps",     0,                          0,                          Q_SURF_METALSTEPS,          0,                          0,                          0 },
+               { "snowsteps",      0,                          0,                          Q_SURF_SNOWSTEPS,           0,                          0,                          0 },
+               { "woodsteps",      0,                          0,                          Q_SURF_WOODSTEPS,           0,                          0,                          0 },
+               { "dmgthrough",     0,                          0,                          Q_SURF_DMGTHROUGH,          0,                          0,                          0 },
                { "flesh",          0,                          0,                          Q_SURF_FLESH,               0,                          0,                          0 },
                { "nosteps",        0,                          0,                          Q_SURF_NOSTEPS,             0,                          0,                          0 },
                { "nodlight",       0,                          0,                          Q_SURF_NODLIGHT,            0,                          0,                          0 },
index a9e7d699dede92303ada7095f24070e4d3e49846..75d6804e52f3b056ddac01ae0209b5cc10d1a717 100644 (file)
@@ -27,6 +27,7 @@ several games based on the Quake III Arena engine, in the form of "Q3Map2."
 ------------------------------------------------------------------------------- */
 
 /* Derived from Tremulous support by LinuxManMikeC */
+/* Updated to Unvanquished support by Neumond */
 
 
 /* marker */
index b4a3f7d6555e9e7fd494434132e587588f0c575d..fcfd17ec964f65a877d118b9b496d3fd3f995a62 100644 (file)
                { "clusterportal",  W_CONT_CLUSTERPORTAL,       W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
                { "donotenter",     W_CONT_DONOTENTER,          W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
                { "nonotenterlarge",W_CONT_DONOTENTER_LARGE,    W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
+               { "donotenterlarge",W_CONT_DONOTENTER_LARGE,    W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
 
                { "fog",            W_CONT_FOG,                 W_CONT_SOLID,               0,                          0,                          C_FOG,                      C_SOLID },
                { "sky",            0,                          0,                          W_SURF_SKY,                 0,                          C_SKY,                      0 },
index 1401323adb15595dc1295af1fadd787d44cf0034..c783b9a0805a89a4b3d7799171668c8ab2f57f1c 100644 (file)
                { "clusterportal",  W_CONT_CLUSTERPORTAL,       W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
                { "donotenter",     W_CONT_DONOTENTER,          W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
                { "nonotenterlarge",W_CONT_DONOTENTER_LARGE,    W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
+               { "donotenterlarge",W_CONT_DONOTENTER_LARGE,    W_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
 
                { "fog",            W_CONT_FOG,                 W_CONT_SOLID,               0,                          0,                          C_FOG,                      C_SOLID },
                { "sky",            0,                          0,                          W_SURF_SKY,                 0,                          C_SKY,                      0 },
index 519a46e1e57739b5c5046b26b4e3c41aba5680d5..17b21173bb4e4f7fe5f7bf15a62eb972344c21f2 100644 (file)
@@ -101,7 +101,7 @@ void HelpBsp()
                {"-flat", "Enable flat shading (good for combining with -celshader)"},
                {"-fulldetail", "Treat detail brushes as structural ones"},
                {"-leaktest", "Abort if a leak was found"},
-               {"-linefile <filename.lin>", "Line file to write"},
+               {"-linfile <filename.lin>", "Line file to write"},
                {"-meta", "Combine adjacent triangles of the same texture to surfaces (ALWAYS USE THIS)"},
                {"-minsamplesize <N>", "Sets minimum lightmap resolution in luxels/qu"},
                {"-mi <N>", "Sets the maximum number of indexes per surface"},
@@ -137,6 +137,7 @@ void HelpVis()
        struct HelpOption vis[] = {
                {"-vis <filename.map>", "Switch that enters this stage"},
                {"-fast", "Very fast and crude vis calculation"},
+               {"-hint", "Merge all but hint portals"},
                {"-mergeportals", "The less crude half of `-merge`, makes vis sometimes much faster but doesn't hurt fps usually"},
                {"-merge", "Faster but still okay vis calculation"},
                {"-nopassage", "Just use PortalFlow vis (usually less fps)"},
@@ -206,6 +207,8 @@ void HelpLight()
                {"-gridscale <F>", "Scaling factor for the light grid only"},
                {"-keeplights", "Keep light entities in the BSP file after compile"},
                {"-lightmapdir <directory>", "Directory to store external lightmaps (default: same as map name without extension)"},
+               {"-lightmapsearchblocksize <N>", "Restrict lightmap search to block size <N>"},
+               {"-lightmapsearchpower <N>", "Optimize for lightmap merge power <N>"},
                {"-lightmapsize <N>", "Size of lightmaps to generate (must be a power of two)"},
                {"-lightsubdiv <N>", "Size of light emitting shader subdivision"},
                {"-lomem", "Low memory but slower lighting mode"},
index f5f3c348b40f0ab407500fe3fef60c983b6c1262..b6340473daea2945925fbb5cfb25a417239e0a6a 100644 (file)
@@ -1168,7 +1168,7 @@ int VisMain( int argc, char **argv ){
        }
 
        if ( i != argc - 1 ) {
-               Error( "usage: vis [-threads #] [-level 0-4] [-fast] [-v] BSPFilePath" );
+               Error( "usage: vis [-threads #] [-fast] [-v] BSPFilePath" );
        }
 
 
@@ -1184,9 +1184,9 @@ int VisMain( int argc, char **argv ){
                sprintf( portalFilePath, "%s%s", inbase, ExpandArg( argv[ i ] ) );
                StripExtension( portalFilePath );
                strcat( portalFilePath, ".prt" );
-               Sys_Printf( "Loading %s\n", portalFilePath );
-               LoadPortals( portalFilePath );
        }
+       Sys_Printf( "Loading %s\n", portalFilePath );
+       LoadPortals( portalFilePath );
 
        /* ydnar: exit if no portals, hence no vis */
        if ( numportals == 0 ) {