Closed illwieckz closed 2 years ago
In GtkRadiant include/qertypes.h
:
#define MAX_PATCH_WIDTH 16
#define MAX_PATCH_HEIGHT 16
In NetRadiant radiant/patchmodule.cpp
:
if ( type == ePatchTypeDoom3 ) {
MAX_PATCH_WIDTH = MAX_PATCH_HEIGHT = 99;
}
else
{
MAX_PATCH_WIDTH = MAX_PATCH_HEIGHT = 31; // matching q3map2
}
In NetRadiant contrib/bobtoolz/DPatch.h
:
const int MAX_PATCH_WIDTH = 32;
const int MAX_PATCH_HEIGHT = 32;
The value is probably MAX_PATCH_SIZE
on q3map2's side:
In GtkRadiant tools/quake3/q3map2/patch.c
:
#define MAX_PATCH_SIZE 32
In GtkRadiant tools/urt/tools/quake3/q3map2/q3map2.h
:
#define MAX_PATCH_SIZE 32
In NetRadiant tools/quake3/q3map2/q3map2.h
:
#define MAX_PATCH_SIZE 32
Those are the way they are checked for:
In GtkRadiant plugins/map/parse.cpp
:
if ( pPatch->height > MAX_PATCH_HEIGHT ) {
Syn_Printf( "ERROR: patch has too many plane points, patch height > MAX_PATCH_HEIGHT (%i > %i)\n", pPatch->height, MAX_PATCH_HEIGHT );
pPatch->height = MAX_PATCH_HEIGHT;
In NetRadiant radiant/patch.cpp
:
ASSERT_MESSAGE( h <= MAX_PATCH_HEIGHT, "patch too tall" );
if ( h > MAX_PATCH_HEIGHT ) {
h = MAX_PATCH_HEIGHT;
}
In both GtkRadiant and NetRadiant tools/quake3/q3map2/patch.c
:
if ( m.width < 0 || m.width > MAX_PATCH_SIZE || m.height < 0 || m.height > MAX_PATCH_SIZE ) {
Error( "ParsePatch: bad size" );
So I assume we can raise the limit to 32
in both GtkRadiant (instead of 16
) and NetRadiant (instead of 31
).
I think patch size must be odd number
I remembered the Unvanquished parpax map wasn't openable with GtkRadiant, though NetRadiant opens it properly.
The map has been heavily modified since I noticed this, but the the today's error message is (if I'm right I had another one before):
The map is there: https://github.com/UnvanquishedAssets/map-parpax_src.dpkdir/blob/master/maps/parpax.map
The patch starts this way:
The
( 9 19 0 0 0 )
snippet is on line101222
.