Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
299 stars 52 forks source link

Valve 220 Map Format J.A.C.K. Uses #195

Closed Baker7 closed 1 week ago

Baker7 commented 1 week ago

The J.A.C.K. map editor does Q3 map format nicely, but it outputs .map in the Valve 220 .MAP format.

This causes real issues like with skyboxes.

Here are the changes in map.cpp that Xaerox did in the q3map2.exe to support Valve 220 .map format:

            GetToken( qfalse );
            scale[ 1 ] = atof( token );

            /* XaeroX - start */
            if ( g_nMapFileVersion >= 220 ) {
                int axis, comp;
                if ( !scale[0] ) scale[0] = 1.0f;
                if ( !scale[1] ) scale[1] = 1.0f;
                for ( axis = 0; axis < 2; ++axis )
                    for ( comp = 0; comp < 3; ++comp )
                        side->vecs[axis][comp] /= scale[axis];
            }
            /* XaeroX - end */
        }

        /* set default flags and values */
        sprintf( shader, "textures/%s", name );

I have attached the map.cpp that has all 6 of the changes that Xaerox did to implement Valve 220 .MAP format.

map.zip

I have read your q3map2 has a metric ton of new features. I had tried it in the past, but if I used a skybox in J.A.C.K. a .bsp would crash due to the 220 map format issue.

(On another note, I rolled my own q3map2 from an older source base -- https://www.moddb.com/mods/zircon-engine/news/upgraded-q3-map-compiler-and-q3-map-topics-for-quake-maps -- I made it use every shader in the scripts folder so that manually updating shaderlist.txt is not required. I have to look through the Garux changelog, might even be an existing feature via a command line?)

Garux commented 1 week ago

220 mapformat is supported here, provide testcase, which causes issues please.

Baker7 commented 1 week ago

I'll do a test with the latest release and provide results and see what happens.

Baker7 commented 1 week ago

I did a full compile of a few different maps within the J.A.C.K. editor and everything compiled fine.

When I did the test where I had skyboxes issues, this was 4+ months ago -- I must assume that I had something incorrect in the setup.

Cannot reproduce the issue. Apologies.