int i;
SetDrawSurfacesBuffer();
- mapDrawSurfs = safe_malloc( sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
- memset( mapDrawSurfs, 0, sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
+ mapDrawSurfs = safe_malloc0( sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
numMapDrawSurfs = 0;
BeginBSPFile();
force_map = qfalse;
/* arg checking */
- if ( argc < 1 ) {
+ if ( argc < 2 ) {
Sys_Printf( "Usage: q3map -convert [-format <ase|obj|map_bp|map>] [-shadersasbitmap|-lightmapsastexcoord|-deluxemapsastexcoord] [-readbsp|-readmap [-meta|-patchmeta]] [-v] <mapname>\n" );
return 0;
}
convertGame = GetGame( argv[ i ] );
map_allowed = qfalse;
if ( convertGame == NULL ) {
- Sys_Printf( "Unknown conversion format \"%s\". Defaulting to ASE.\n", argv[ i ] );
+ Sys_FPrintf( SYS_WRN, "Unknown conversion format \"%s\". Defaulting to ASE.\n", argv[ i ] );
}
}
}
if ( force_map || ( !force_bsp && !Q_stricmp( ext, "map" ) && map_allowed ) ) {
if ( !map_allowed ) {
- Sys_Printf( "WARNING: the requested conversion should not be done from .map files. Compile a .bsp first.\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: the requested conversion should not be done from .map files. Compile a .bsp first.\n" );
}
StripExtension( source );
DefaultExtension( source, ".map" );