include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(--std=c++${CMAKE_CXX_STANDARD} STD_CXX)
if (STD_CXX)
- list(APPEND CMAKE_CXX_FLAGS --std=c++${CMAKE_CXX_STANDARD})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++${CMAKE_CXX_STANDARD}")
else ()
message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better")
endif ()
# Usage:
# sh download-gamepack.sh
-# LICENSEFILTER=GPL BATCH=1 sh download-gamepack.sh
+# LICENSEFILTER=GPL,BSD BATCH=1 sh download-gamepack.sh
: ${GIT:=git}
: ${SVN:=svn}
case " $LICENSEFILTER " in
" ")
;;
- *" $license "*)
- ;;
*)
- $ECHO "Pack $pack rejected because its license is not in LICENSEFILTER."
- return
+ if ! echo "$LICENSEFILTER" | tr ',' '\n' | grep -F -q -x "$license"
+ then
+ $ECHO "Pack $pack rejected because its license is not in LICENSEFILTER."
+ return
+ fi
;;
esac
case "$BATCH" in
}
mkdir -p games
-pack DarkPlacesPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/DarkPlacesPack/branches/1.5/
-pack NexuizPack GPL gitdir git://git.icculus.org/divverent/nexuiz.git misc/netradiant-NexuizPack master
-pack OpenArenaPack unknown zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/OpenArenaPack.zip
-pack OsirionPack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/OsirionPack.zip
-pack Q3Pack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/Q3Pack/trunk/ -r29
-pack Quake2Pack proprietary zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/Quake2Pack.zip
-pack QuakePack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/Quake1Pack.zip
-pack QuetooPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/QuetooPack/branches/1.5/
-pack TremulousPack proprietary zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/TremulousPack.zip
-pack UFOAIPack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/UFOAIPack/branches/1.5/
-#pack WarsowPack GPL svn https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
-#pack WarsowPack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/WarsowPack.zip
-pack WarsowPack GPL git https://github.com/Warsow/NetRadiantPack.git
-pack XonoticPack GPL git https://gitlab.com/xonotic/netradiant-xonoticpack.git
+pack DarkPlacesPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/DarkPlacesPack/branches/1.5/
+pack NexuizPack GPL gitdir git://git.icculus.org/divverent/nexuiz.git misc/netradiant-NexuizPack master
+pack OpenArenaPack unknown zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/OpenArenaPack.zip
+pack OsirionPack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/OsirionPack.zip
+pack Q3Pack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/Q3Pack/trunk/ -r29
+pack Quake2Pack proprietary zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/Quake2Pack.zip
+pack QuakePack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/Quake1Pack.zip
+pack QuetooPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/QuetooPack/branches/1.5/
+pack TremulousPack proprietary zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/TremulousPack.zip
+pack UFOAIPack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/UFOAIPack/branches/1.5/
+#pack WarsowPack GPL svn https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
+#pack WarsowPack GPL zip1 http://ingar.satgnu.net/files/netradiant/gamepacks/WarsowPack.zip
+pack WarsowPack GPL git https://github.com/Warsow/NetRadiantPack.git
+pack XonoticPack GPL git https://gitlab.com/xonotic/netradiant-xonoticpack.git
+pack UnvanquishedPack BSD svn https://github.com/Unvanquished/unvanquished-mapeditor-support.git/trunk/build/netradiant
const char* ( *getSettingsPath )( );
const char* ( *getMapsPath )( );
+ const char* ( *getGameFile )( );
const char* ( *getGameName )( );
const char* ( *getGameMode )( );
const char* ( *getGameDescriptionKeyValue )(const char* key);
const char* ( *getRequiredGameDescriptionKeyValue )(const char* key);
- void ( *attachGameToolsPathObserver )( ModuleObserver& observer );
- void ( *detachGameToolsPathObserver )( ModuleObserver& observer );
- void ( *attachEnginePathObserver )( ModuleObserver& observer );
- void ( *detachEnginePathObserver )( ModuleObserver& observer );
- void ( *attachGameNameObserver )( ModuleObserver& observer );
- void ( *detachGameNameObserver )( ModuleObserver& observer );
- void ( *attachGameModeObserver )( ModuleObserver& observer );
- void ( *detachGameModeObserver )( ModuleObserver& observer );
-
SignalHandlerId ( *XYWindowDestroyed_connect )( const SignalHandler& handler );
void ( *XYWindowDestroyed_disconnect )( SignalHandlerId id );
MouseEventHandlerId ( *XYWindowMouseDown_connect )( const MouseEventHandler& handler );
case "$DOWNLOAD_GAMEPACKS" in
yes)
- LICENSEFILTER=GPL BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
+ LICENSEFILTER=GPL,BSD BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
;;
all)
BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
/// \brief Text-output-formatting.
#include "itextstream.h"
+#include "string/string.h"
#include <cctype>
#include <cstddef>
#include <stdio.h>
#include <string.h>
#include <algorithm>
+#include <string>
#include "generic/arrayrange.h"
}
};
+
+/// \brief A wrapper for a TextInputStream used for reading one text line at a time.
+template<typename TextInputStreamType, int SIZE = 1024>
+class TextLinesInputStream
+{
+TextInputStreamType& m_inputStream;
+char m_buffer[SIZE + 1];
+char* m_cur;
+char* m_end;
+
+int fillBuffer(){
+ m_end = m_buffer + m_inputStream.read( m_buffer, SIZE );
+ m_cur = m_buffer;
+ m_buffer[SIZE] = '\0';
+ *m_end = '\0';
+ return m_end - m_cur;
+}
+public:
+
+TextLinesInputStream( TextInputStreamType& inputStream ) : m_inputStream( inputStream ), m_cur( m_buffer ), m_end( m_buffer ){
+ m_buffer[0] = '\0';
+}
+
+CopiedString readLine(){
+ std::string s;
+ char* m_fin;
+
+ while ( (m_fin = strchr( m_cur, '\n' )) == 0 )
+ {
+ s.append( m_cur, m_end - m_cur );
+ if ( fillBuffer() <= 0 ) break;
+ }
+ if ( m_fin != 0 ) {
+ s.append( m_cur, m_fin - m_cur + 1 );
+ m_cur = m_fin + 1;
+ }
+
+ return CopiedString( s.c_str() );
+}
+};
+
+
/// \brief A wrapper for a TextOutputStream, optimised for writing a few characters at a time.
template<typename TextOutputStreamType, int SIZE = 1024>
class BufferedTextOutputStream : public TextOutputStream
return string_new( length, allocator );
}
+/// \brief Allocates a new buffer large enough to hold two concatenated strings and fills it with strings.
+inline char* string_new_concat( const char* a, const char* b ){
+ char* str = string_new( string_length( a ) + string_length( b ) );
+ strcpy( str, a );
+ strcat( str, b );
+ return str;
+}
+
/// \brief Deallocates the \p buffer large enough to hold \p length characters.
inline void string_release( char* string, std::size_t length ){
DefaultAllocator<char> allocator;
ArchivePK4Module g_ArchivePK4Module;
+class ArchiveDPKAPI
+{
+_QERArchiveTable m_archivedpk;
+public:
+typedef _QERArchiveTable Type;
+STRING_CONSTANT( Name, "dpk" );
+
+ArchiveDPKAPI(){
+ m_archivedpk.m_pfnOpenArchive = &OpenArchive;
+}
+_QERArchiveTable* getTable(){
+ return &m_archivedpk;
+}
+};
+
+typedef SingletonModule<ArchiveDPKAPI> ArchiveDPKModule;
+
+ArchiveDPKModule g_ArchiveDPKModule;
+
+
extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer& server ){
initialiseModule( server );
g_ArchiveZipModule.selfRegister();
g_ArchivePK4Module.selfRegister();
+ g_ArchiveDPKModule.selfRegister();
}
};
#include <list>
+#include <map>
typedef std::list<archive_entry_t> archives_t;
}
}
-
-
const _QERArchiveTable* GetArchiveTable( ArchiveModules& archiveModules, const char* ext ){
StringOutputStream tmp( 16 );
tmp << LowerCase( ext );
return archiveModules.findModule( tmp.c_str() );
}
-static void InitPakFile( ArchiveModules& archiveModules, const char *filename ){
+
+static Archive* InitPakFile( ArchiveModules& archiveModules, const char *filename ){
const _QERArchiveTable* table = GetArchiveTable( archiveModules, path_get_extension( filename ) );
if ( table != 0 ) {
entry.is_pakfile = true;
g_archives.push_back( entry );
globalOutputStream() << " pak file: " << filename << "\n";
+
+ return entry.archive;
}
+
+ return 0;
}
inline void pathlist_prepend_unique( GSList*& pathlist, char* path ){
typedef std::set<CopiedString, PakLess> Archives;
+Archive* AddPk3Dir( const char* fullpath ){
+ if ( g_numDirs == VFS_MAXDIRS ) return 0;
+
+ strncpy( g_strDirs[g_numDirs], fullpath, PATH_MAX );
+ g_strDirs[g_numDirs][PATH_MAX] = '\0';
+ g_numDirs++;
+
+ {
+ archive_entry_t entry;
+ entry.name = fullpath;
+ entry.archive = OpenArchive( fullpath );
+ entry.is_pakfile = false;
+ g_archives.push_back( entry );
+
+ return entry.archive;
+ }
+}
+
+// for Daemon DPK vfs
+
+Archive* AddDpkDir( const char* fullpath ){
+ return AddPk3Dir( fullpath );
+}
+
+struct pakfile_path_t
+{
+ CopiedString fullpath; // full pak dir or pk3dir name
+ bool is_pakfile; // defines is it .pk3dir or .pk3 file
+};
+
+typedef std::pair<CopiedString, pakfile_path_t> PakfilePathsKV;
+typedef std::map<CopiedString, pakfile_path_t> PakfilePaths; // key must have no extension, only name
+
+static PakfilePaths g_pakfile_paths;
+
+void AddDpkPak( const char* name, const char* fullpath, bool is_pakfile ){
+ pakfile_path_t pakfile_path;
+ pakfile_path.fullpath = fullpath;
+ pakfile_path.is_pakfile = is_pakfile;
+ g_pakfile_paths.insert( PakfilePathsKV( name, pakfile_path ) );
+}
+
+// Comparaison function for version numbers
+// Implementation is based on dpkg's version comparison code (verrevcmp() and order())
+// http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=blob;f=lib/dpkg/version.c;hb=74946af470550a3295e00cf57eca1747215b9311
+static int char_weight(char c){
+ if (std::isdigit(c))
+ return 0;
+ else if (std::isalpha(c))
+ return c;
+ else if (c == '~')
+ return -1;
+ else if (c)
+ return c + 256;
+ else
+ return 0;
+}
+
+static int VersionCmp(const char* a, const char* b){
+ while (*a || *b) {
+ int firstDiff = 0;
+
+ while ((*a && !std::isdigit(*a)) || (*b && !std::isdigit(*b))) {
+ int ac = char_weight(*a);
+ int bc = char_weight(*b);
+
+ if (ac != bc)
+ return ac - bc;
+
+ a++;
+ b++;
+ }
+
+ while (*a == '0')
+ a++;
+ while (*b == '0')
+ b++;
+
+ while (std::isdigit(*a) && std::isdigit(*b)) {
+ if (firstDiff == 0)
+ firstDiff = *a - *b;
+ a++;
+ b++;
+ }
+
+ if (std::isdigit(*a))
+ return 1;
+ if (std::isdigit(*b))
+ return -1;
+ if (firstDiff)
+ return firstDiff;
+ }
+
+ return false;
+}
+
+// takes name without ext, returns without ext
+static const char* GetLatestDpkPakVersion( const char* name ){
+ const char* maxversion = 0;
+ const char* result = 0;
+ const char* pakname;
+ const char* pakversion;
+ int namelen = string_length( name );
+
+ for ( PakfilePaths::iterator i = g_pakfile_paths.begin(); i != g_pakfile_paths.end(); ++i )
+ {
+ pakname = i->first.c_str();
+ if ( strncmp( pakname, name, namelen ) != 0 || pakname[namelen] != '_' ) continue;
+ pakversion = pakname + (namelen + 1);
+ if ( maxversion == 0 || VersionCmp( pakversion, maxversion ) > 0 ){
+ maxversion = pakversion;
+ result = pakname;
+ }
+ }
+ return result;
+}
+
+// release string after using
+static char* GetCurrentMapDpkPakName(){
+ char* mapdir;
+ char* mapname;
+ int mapnamelen;
+ char* result = 0;
+
+ mapname = string_clone( GlobalRadiant().getMapName() );
+ mapnamelen = string_length( mapname );
+
+ mapdir = strrchr( mapname, '/' );
+ if ( mapdir ) {
+ mapdir -= 12;
+ if ( strncmp( mapdir, ".dpkdir/maps/", 13 ) == 0 ) {
+ *mapdir = '\0';
+ mapdir = strrchr( mapname, '/' );
+ if ( mapdir ) mapdir++;
+ else mapdir = mapname;
+ result = string_clone( mapdir );
+ }
+ }
+
+ string_release( mapname, mapnamelen );
+ return result;
+
+}
+
+// prevent loading duplicates or circular references
+static Archives g_loaded_dpk_paks;
+
+// actual pak adding on initialise, deferred from InitDirectory
+// Daemon DPK filesystem doesn't need load all paks it finds
+static void LoadDpkPakWithDeps( const char* pakname ){
+ const char* und = strrchr( pakname, '_' );
+ if ( !und ) pakname = GetLatestDpkPakVersion( pakname );
+ if ( !pakname || g_loaded_dpk_paks.find( pakname ) != g_loaded_dpk_paks.end() ) return;
+
+ PakfilePaths::iterator i = g_pakfile_paths.find( pakname );
+ if ( i == g_pakfile_paths.end() ) return;
+
+ Archive* arc;
+ if ( i->second.is_pakfile ){
+ arc = InitPakFile( FileSystemQ3API_getArchiveModules(), i->second.fullpath.c_str() );
+ } else {
+ arc = AddDpkDir( i->second.fullpath.c_str() );
+ }
+ g_loaded_dpk_paks.insert( pakname );
+
+ ArchiveTextFile* depsFile = arc->openTextFile( "DEPS" );
+ if ( !depsFile ) return;
+
+ {
+ TextLinesInputStream<TextInputStream> istream = depsFile->getInputStream();
+
+ CopiedString line;
+ const char* c;
+ const char* p_name;
+ const char* p_name_end;
+ const char* p_version;
+ const char* p_version_end;
+ while ( line = istream.readLine(), string_length( line.c_str() ) ) {
+ c = line.c_str();
+ while ( std::isspace( *c ) && *c != '\0' ) ++c;
+ p_name = c;
+ while ( !std::isspace( *c ) && *c != '\0' ) ++c;
+ p_name_end = c;
+ while ( std::isspace( *c ) && *c != '\0' ) ++c;
+ p_version = c;
+ while ( !std::isspace( *c ) && *c != '\0' ) ++c;
+ p_version_end = c;
+
+ if ( p_name_end - p_name == 0 ) continue;
+ if ( p_version_end - p_version == 0 ) {
+ const char* p_pakname;
+ CopiedString name_final = CopiedString( StringRange( p_name, p_name_end ) );
+ p_pakname = GetLatestDpkPakVersion( name_final.c_str() );
+ if ( p_pakname != NULL ) {
+ LoadDpkPakWithDeps( p_pakname );
+ }
+ } else {
+ int len = ( p_name_end - p_name ) + ( p_version_end - p_version ) + 1;
+ char* p_pakname = string_new( len );
+ strncpy( p_pakname, p_name, p_name_end - p_name );
+ p_pakname[ p_name_end - p_name ] = '\0';
+ strcat( p_pakname, "_" );
+ strncat( p_pakname, p_version, p_version_end - p_version );
+ LoadDpkPakWithDeps( p_pakname );
+ string_release( p_pakname, len );
+ }
+ }
+ }
+
+ depsFile->release();
+}
+
+// end for Daemon DPK vfs
+
// =============================================================================
// Global functions
}
if ( g_bUsePak ) {
+
GDir* dir = g_dir_open( path, 0, 0 );
if ( dir != 0 ) {
globalOutputStream() << "vfs directory: " << path << "\n";
+ Archives archives;
+ Archives archivesOverride;
const char* ignore_prefix = "";
const char* override_prefix = "";
+ bool is_pk3_vfs, is_pk4_vfs, is_dpk_vfs;
- {
+ is_pk3_vfs = GetArchiveTable( archiveModules, "pk3" );
+ is_pk4_vfs = GetArchiveTable( archiveModules, "pk4" );
+ is_dpk_vfs = GetArchiveTable( archiveModules, "dpk" );
+
+ if ( !is_dpk_vfs ) {
// See if we are in "sp" or "mp" mapping mode
const char* gamemode = gamemode_get();
}
}
- Archives archives;
- Archives archivesOverride;
for (;; )
{
const char* name = g_dir_read_name( dir );
}
const char *ext = strrchr( name, '.' );
-
- if ( ext && !string_compare_nocase_upper( ext, ".pk3dir" ) ) {
- if ( g_numDirs == VFS_MAXDIRS ) {
- continue;
+ char tmppath[PATH_MAX];
+
+ if ( is_dpk_vfs ) {
+ if ( !!ext && !string_compare_nocase_upper( ext, ".dpkdir" ) ) {
+ snprintf( tmppath, PATH_MAX, "%s%s/", path, name );
+ tmppath[PATH_MAX] = '\0';
+ FixDOSName( tmppath );
+ AddSlash( tmppath );
+ AddDpkPak( CopiedString( StringRange( name, ext ) ).c_str(), tmppath, false );
}
- snprintf( g_strDirs[g_numDirs], PATH_MAX, "%s%s/", path, name );
- g_strDirs[g_numDirs][PATH_MAX] = '\0';
- FixDOSName( g_strDirs[g_numDirs] );
- AddSlash( g_strDirs[g_numDirs] );
- g_numDirs++;
-
- {
- archive_entry_t entry;
- entry.name = g_strDirs[g_numDirs - 1];
- entry.archive = OpenArchive( g_strDirs[g_numDirs - 1] );
- entry.is_pakfile = false;
- g_archives.push_back( entry );
+ }
+
+ if ( is_pk3_vfs || is_pk4_vfs ) {
+ if ( !!ext && ( !string_compare_nocase_upper( ext, ".pk3dir" )
+ || !string_compare_nocase_upper( ext, ".pk4dir" ) ) ) {
+ snprintf( tmppath, PATH_MAX, "%s%s/", path, name );
+ tmppath[PATH_MAX] = '\0';
+ FixDOSName( tmppath );
+ AddSlash( tmppath );
+ AddPk3Dir( tmppath );
}
}
- if ( ( ext == 0 ) || *( ++ext ) == '\0' || GetArchiveTable( archiveModules, ext ) == 0 ) {
+ // GetArchiveTable() needs "pk3" if ext is ".pk3"
+ if ( ( ext == 0 ) || *( ext + 1 ) == '\0' || GetArchiveTable( archiveModules, ext + 1 ) == 0 ) {
continue;
}
continue;
}
if ( !string_empty( override_prefix ) && strncmp( name, override_prefix, strlen( override_prefix ) ) == 0 ) {
- archivesOverride.insert( name );
+ if ( !string_compare_nocase_upper( ext, ".dpk" ) ) {
+ if ( is_dpk_vfs ) {
+ archives.insert( name );
+ }
+ }
+ else {
+ archivesOverride.insert( name );
+ }
continue;
}
g_dir_close( dir );
// add the entries to the vfs
- for ( Archives::iterator i = archivesOverride.begin(); i != archivesOverride.end(); ++i )
- {
- char filename[PATH_MAX];
- strcpy( filename, path );
- strcat( filename, ( *i ).c_str() );
- InitPakFile( archiveModules, filename );
+ char* fullpath;
+ if ( is_dpk_vfs ) {
+ for ( Archives::iterator i = archives.begin(); i != archives.end(); ++i ) {
+ const char* name = i->c_str();
+ const char* ext = strrchr( name, '.' );
+ if ( !string_compare_nocase_upper( ext, "dpk" ) ) {
+ CopiedString name_final = CopiedString( StringRange( name, ext ) );
+ fullpath = string_new_concat( path, name );
+ AddDpkPak( name_final.c_str(), fullpath, true );
+ string_release( fullpath, string_length( fullpath ) );
+ }
+ }
}
- for ( Archives::iterator i = archives.begin(); i != archives.end(); ++i )
- {
- char filename[PATH_MAX];
- strcpy( filename, path );
- strcat( filename, ( *i ).c_str() );
- InitPakFile( archiveModules, filename );
+ if ( is_pk3_vfs || is_pk4_vfs ) {
+ for ( Archives::iterator i = archivesOverride.begin(); i != archivesOverride.end(); ++i )
+ {
+ const char* name = i->c_str();
+ const char* ext = strrchr( name, '.' );
+ if ( !string_compare_nocase_upper( ext, "pk3" )
+ || !string_compare_nocase_upper( ext, "pk4" ) ) {
+ fullpath = string_new_concat( path, i->c_str() );
+ InitPakFile( archiveModules, fullpath );
+ string_release( fullpath, string_length( fullpath ) );
+ }
+ }
+ for ( Archives::iterator i = archives.begin(); i != archives.end(); ++i )
+ {
+ const char* name = i->c_str();
+ const char* ext = strrchr( name, '.' );
+ if ( !string_compare_nocase_upper( ext, "pk3" )
+ || !string_compare_nocase_upper( ext, "pk4" ) ) {
+ fullpath = string_new_concat( path, i->c_str() );
+ InitPakFile( archiveModules, fullpath );
+ string_release( fullpath, string_length( fullpath ) );
+ }
+ }
}
}
else
g_numDirs = 0;
g_numForbiddenDirs = 0;
+
+ g_pakfile_paths.clear();
+ g_loaded_dpk_paks.clear();
}
#define VFS_SEARCH_PAK 0x1
InitDirectory( path, FileSystemQ3API_getArchiveModules() );
}
void initialise(){
+ ArchiveModules& archiveModules = FileSystemQ3API_getArchiveModules();
+ bool is_dpk_vfs = GetArchiveTable( archiveModules, "dpk" );
+
+ if ( is_dpk_vfs ) {
+ const char* pakname;
+ g_loaded_dpk_paks.clear();
+
+ pakname = GetLatestDpkPakVersion( "tex-common" );
+ if (pakname != NULL) {
+ LoadDpkPakWithDeps( pakname );
+ }
+
+ // prevent VFS double start, for MapName="" and MapName="unnamed.map"
+ if ( string_length( GlobalRadiant().getMapName() ) ){
+ // load map's paks from DEPS
+ char* mappakname = GetCurrentMapDpkPakName();
+ if ( mappakname != NULL ) {
+ LoadDpkPakWithDeps( mappakname );
+ string_release( mappakname, string_length( mappakname ) );
+ }
+ }
+
+ g_pakfile_paths.clear();
+ g_loaded_dpk_paks.clear();
+ }
+
globalOutputStream() << "filesystem initialised\n";
g_observers.realise();
}
}
};
+
Quake3FileSystem g_Quake3FileSystem;
-void FileSystem_Init(){
+VirtualFileSystem& GetFileSystem(){
+ return g_Quake3FileSystem;
}
-void FileSystem_Shutdown(){
+void FileSystem_Init(){
}
-VirtualFileSystem& GetFileSystem(){
- return g_Quake3FileSystem;
+void FileSystem_Shutdown(){
}
m_eclassmanager.realise = &EntityClass_realise;
m_eclassmanager.unrealise = &EntityClass_unrealise;
- GlobalRadiant().attachGameToolsPathObserver( g_EntityClassQuake3 );
- GlobalRadiant().attachGameModeObserver( g_EntityClassQuake3 );
- GlobalRadiant().attachGameNameObserver( g_EntityClassQuake3 );
+ Radiant_attachGameToolsPathObserver( g_EntityClassQuake3 );
+ Radiant_attachGameModeObserver( g_EntityClassQuake3 );
+ Radiant_attachGameNameObserver( g_EntityClassQuake3 );
}
~EclassManagerAPI(){
- GlobalRadiant().detachGameNameObserver( g_EntityClassQuake3 );
- GlobalRadiant().detachGameModeObserver( g_EntityClassQuake3 );
- GlobalRadiant().detachGameToolsPathObserver( g_EntityClassQuake3 );
+ Radiant_detachGameNameObserver( g_EntityClassQuake3 );
+ Radiant_detachGameModeObserver( g_EntityClassQuake3 );
+ Radiant_detachGameToolsPathObserver( g_EntityClassQuake3 );
EntityClassQuake3_destroy();
}
#include "ifilesystem.h"
#include "iscriplib.h"
#include "qerplugin.h"
+#include "mainframe.h"
#include "string/string.h"
#include "eclasslib.h"
m_eclassmanager.realise = &EntityClassFGD_realise;
m_eclassmanager.unrealise = &EntityClassFGD_unrealise;
- GlobalRadiant().attachGameToolsPathObserver( g_EntityClassFGD );
- GlobalRadiant().attachGameNameObserver( g_EntityClassFGD );
+ Radiant_attachGameToolsPathObserver( g_EntityClassFGD );
+ Radiant_attachGameNameObserver( g_EntityClassFGD );
}
~EntityClassFGDAPI(){
- GlobalRadiant().detachGameNameObserver( g_EntityClassFGD );
- GlobalRadiant().detachGameToolsPathObserver( g_EntityClassFGD );
+ Radiant_detachGameNameObserver( g_EntityClassFGD );
+ Radiant_detachGameToolsPathObserver( g_EntityClassFGD );
EntityClassFGD_destroy();
}
// VFS
+
+bool g_vfsInitialized = false;
+
+void VFS_Init(){
+ if ( g_vfsInitialized ) return;
+ QE_InitVFS();
+ GlobalFileSystem().initialise();
+ g_vfsInitialized = true;
+}
+void VFS_Shutdown(){
+ if ( !g_vfsInitialized ) return;
+ GlobalFileSystem().shutdown();
+ g_vfsInitialized = false;
+}
+void VFS_Restart(){
+ VFS_Shutdown();
+ VFS_Init();
+}
+
class VFSModuleObserver : public ModuleObserver
{
-std::size_t m_unrealised;
public:
-VFSModuleObserver() : m_unrealised( 1 ){
-}
void realise(){
- if ( --m_unrealised == 0 ) {
- QE_InitVFS();
- GlobalFileSystem().initialise();
- }
+ VFS_Init();
}
void unrealise(){
- if ( ++m_unrealised == 1 ) {
- GlobalFileSystem().shutdown();
- }
+ VFS_Shutdown();
}
};
}
}
+
#include "os/dir.h"
class CLoadModule
void Radiant_attachGameModeObserver( ModuleObserver& observer );
void Radiant_detachGameModeObserver( ModuleObserver& observer );
-
-
+void VFS_Restart();
void VFS_Construct();
void VFS_Destroy();
#include "irender.h"
#include "ientity.h"
#include "editable.h"
+#include "iarchive.h"
#include "ifilesystem.h"
#include "namespace.h"
#include "moduleobserver.h"
+#include "moduleobservers.h"
#include <set>
void AddRegionBrushes( void );
void RemoveRegionBrushes( void );
+/* Map open/close observers */
+
+ModuleObservers g_mapPathObservers;
+
+class MapFileObserver : public ModuleObserver
+{
+void realise() {
+ // Restart VFS to apply new pak filtering based on mapname
+ // needed for daemon dpk vfs
+ VFS_Restart();
+}
+void unrealise() { }
+};
+
+MapFileObserver g_mapFileObserver;
+
+void BindMapFileObservers(){
+ g_mapPathObservers.attach( g_mapFileObserver );
+}
+
+void UnBindMapFileObservers(){
+ g_mapPathObservers.detach( g_mapFileObserver );
+}
+
/*
================
g_currentMap = 0;
Brush_unlatchPreferences();
+ g_mapPathObservers.unrealise();
}
class EntityFindByClassname : public scene::Graph::Walker
}
Brush_toggleFormat( i );
g_map.m_name = filename;
+ g_mapPathObservers.realise();
Map_UpdateTitle( g_map );
g_map.m_resource = GlobalReferenceCache().capture( g_map.m_name.c_str() );
if ( format ) {
g_map.m_resource->detach( g_map );
GlobalReferenceCache().release( g_map.m_name.c_str() );
+ g_mapPathObservers.unrealise();
g_map.m_resource = resource;
g_map.m_name = absolute;
+ g_mapPathObservers.realise();
Map_UpdateTitle( g_map );
g_map.m_resource->attach( g_map );
//globalOutputStream() << "Map_New\n";
g_map.m_name = "unnamed.map";
+ g_mapPathObservers.realise();
Map_UpdateTitle( g_map );
{
const char* getMapsPath();
+void BindMapFileObservers();
+void UnBindMapFileObservers();
+
#endif
return TextureBrowser_GetSelectedShader( GlobalTextureBrowser() );
}
+const char* getGameFile(){
+ return g_GamesDialog.m_sGameFile.c_str();
+}
+
class RadiantCoreAPI
{
_QERFuncTable_1 m_radiantcore;
m_radiantcore.getSettingsPath = &SettingsPath_get;
m_radiantcore.getMapsPath = &getMapsPath;
+ m_radiantcore.getGameFile = &getGameFile;
m_radiantcore.getGameName = &gamename_get;
m_radiantcore.getGameMode = &gamemode_get;
m_radiantcore.getGameDescriptionKeyValue = &GameDescription_getKeyValue;
m_radiantcore.getRequiredGameDescriptionKeyValue = &GameDescription_getRequiredKeyValue;
- m_radiantcore.attachGameToolsPathObserver = Radiant_attachGameToolsPathObserver;
- m_radiantcore.detachGameToolsPathObserver = Radiant_detachGameToolsPathObserver;
- m_radiantcore.attachEnginePathObserver = Radiant_attachEnginePathObserver;
- m_radiantcore.detachEnginePathObserver = Radiant_detachEnginePathObserver;
- m_radiantcore.attachGameNameObserver = Radiant_attachGameNameObserver;
- m_radiantcore.detachGameNameObserver = Radiant_detachGameNameObserver;
- m_radiantcore.attachGameModeObserver = Radiant_attachGameModeObserver;
- m_radiantcore.detachGameModeObserver = Radiant_detachGameModeObserver;
-
m_radiantcore.XYWindowDestroyed_connect = XYWindowDestroyed_connect;
m_radiantcore.XYWindowDestroyed_disconnect = XYWindowDestroyed_disconnect;
m_radiantcore.XYWindowMouseDown_connect = XYWindowMouseDown_connect;
MapRoot_construct();
EnginePath_verify();
+ BindMapFileObservers();
EnginePath_Realise();
}
~Radiant(){
EnginePath_Unrealise();
+ UnBindMapFileObservers();
MapRoot_destroy();
NullModel_destroy();
g_activeShadersChangedCallbacks.connectLast( handler );
}
+void TextureBrowser_constructTreeStore();
+
class ShadersObserver : public ModuleObserver
{
Signal0 m_realiseCallbacks;
public:
void realise(){
m_realiseCallbacks();
+ TextureBrowser_constructTreeStore();
}
void unrealise(){
}
-*3DSMAX_ASCIIEXPORT 200\r
-*COMMENT "Generated by Q3Map2 (ydnar) -convert -format ase"\r
-*SCENE {\r
- *SCENE_FILENAME "wedge_45.bsp"\r
- *SCENE_FIRSTFRAME 0\r
- *SCENE_LASTFRAME 100\r
- *SCENE_FRAMESPEED 30\r
- *SCENE_TICKSPERFRAME 160\r
- *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000\r
- *SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000\r
-}\r
-*MATERIAL_LIST {\r
- *MATERIAL_COUNT 2\r
- *MATERIAL 0 {\r
- *MATERIAL_NAME "textures/radiant_regression_tests/tile_model"\r
- *MATERIAL_CLASS "Standard"\r
- *MATERIAL_DIFFUSE 1.000000 1.000000 0.833333\r
- *MATERIAL_SHADING Phong\r
- *MAP_DIFFUSE {\r
- *MAP_NAME "textures/radiant_regression_tests/tile_model"\r
- *MAP_CLASS "Bitmap"\r
- *MAP_SUBNO 1\r
- *MAP_AMOUNT 1.0\r
- *MAP_TYPE Screen\r
- *BITMAP "..\textures\radiant_regression_tests\tile_model.tga"\r
- *BITMAP_FILTER Pyramidal\r
- }\r
- }\r
- *MATERIAL 1 {\r
- *MATERIAL_NAME "noshader"\r
- *MATERIAL_CLASS "Standard"\r
- *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000\r
- *MATERIAL_SHADING Phong\r
- *MAP_DIFFUSE {\r
- *MAP_NAME "noshader"\r
- *MAP_CLASS "Bitmap"\r
- *MAP_SUBNO 1\r
- *MAP_AMOUNT 1.0\r
- *MAP_TYPE Screen\r
- *BITMAP "..\noshader.tga"\r
- *BITMAP_FILTER Pyramidal\r
- }\r
- }\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf0"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf0"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 128.000000 0.000000 0.000000\r
- *MESH_VERTEX 1 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 2 128.000000 128.000000 0.000000\r
- *MESH_VERTEX 3 64.000000 128.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.707107 0.000000 0.707107\r
- *MESH_FACENORMAL 1 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 0 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 1 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 2 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 3 0.707107 0.000000 0.707107\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 1.000000 -1.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 1.000000 3.000000 1.000000\r
- *MESH_TVERT 3 -1.000000 3.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf1"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf1"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 128.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 128.000000 0.000000\r
- *MESH_VERTEX 2 64.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 128.000000 128.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.707107 0.000000 0.707107\r
- *MESH_FACENORMAL 1 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 1.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 2.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 2 0.000000 2.000000 1.000000\r
- *MESH_TVERT 3 2.000000 0.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf2"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf2"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 64.000000\r
- *MESH_VERTEX 2 64.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 128.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.707107 0.000000 0.707107\r
- *MESH_FACENORMAL 1 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 0 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 0.000000 1.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 1.000000 -1.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 1.000000 3.000000 1.000000\r
- *MESH_TVERT 3 -1.000000 3.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf3"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf3"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 0.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 0.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 128.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.707107 0.000000 0.707107\r
- *MESH_FACENORMAL 1 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 0 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 -1.000000 0.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 2.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 2 2.000000 2.000000 1.000000\r
- *MESH_TVERT 3 2.000000 0.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf4"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf4"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 128.000000 0.000000 0.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 0.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.707107 0.000000 0.707107\r
- *MESH_FACENORMAL 1 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 0 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 -1.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 2.000000 0.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 2 0.000000 2.000000 1.000000\r
- *MESH_TVERT 3 -2.000000 2.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf5"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf5"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 128.000000 0.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 128.000000 128.000000 0.000000\r
- *MESH_VERTEX 3 128.000000 0.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.707107 0.000000 0.707107\r
- *MESH_FACENORMAL 1 0.707107 0.000000 0.707107\r
- *MESH_VERTEXNORMAL 0 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 0.000000 -1.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 3.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 2.000000 3.000000 1.000000\r
- *MESH_TVERT 3 2.000000 -1.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
+*3DSMAX_ASCIIEXPORT 200
+*COMMENT "Generated by Q3Map2 (ydnar) -convert -format ase"
+*SCENE {
+ *SCENE_FILENAME "wedge_45.bsp"
+ *SCENE_FIRSTFRAME 0
+ *SCENE_LASTFRAME 100
+ *SCENE_FRAMESPEED 30
+ *SCENE_TICKSPERFRAME 160
+ *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
+ *SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000
+}
+*MATERIAL_LIST {
+ *MATERIAL_COUNT 2
+ *MATERIAL 0 {
+ *MATERIAL_NAME "textures/radiant_regression_tests/tile_model"
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_DIFFUSE 1.000000 1.000000 0.833333
+ *MATERIAL_SHADING Phong
+ *MAP_DIFFUSE {
+ *MAP_NAME "textures/radiant_regression_tests/tile_model"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0
+ *MAP_TYPE Screen
+ *BITMAP "..\textures\radiant_regression_tests\tile_model.tga"
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+ *MATERIAL 1 {
+ *MATERIAL_NAME "noshader"
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
+ *MATERIAL_SHADING Phong
+ *MAP_DIFFUSE {
+ *MAP_NAME "noshader"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0
+ *MAP_TYPE Screen
+ *BITMAP "..\noshader.tga"
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf0"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf0"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 128.000000 0.000000 0.000000
+ *MESH_VERTEX 1 64.000000 0.000000 64.000000
+ *MESH_VERTEX 2 128.000000 128.000000 0.000000
+ *MESH_VERTEX 3 64.000000 128.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.707107 0.000000 0.707107
+ *MESH_FACENORMAL 1 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 0 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 1 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 2 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 3 0.707107 0.000000 0.707107
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 1.000000 -1.000000 1.000000
+ *MESH_TVERT 1 -1.000000 -1.000000 1.000000
+ *MESH_TVERT 2 1.000000 3.000000 1.000000
+ *MESH_TVERT 3 -1.000000 3.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf1"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf1"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 128.000000 64.000000
+ *MESH_VERTEX 1 0.000000 128.000000 0.000000
+ *MESH_VERTEX 2 64.000000 128.000000 64.000000
+ *MESH_VERTEX 3 128.000000 128.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.707107 0.000000 0.707107
+ *MESH_FACENORMAL 1 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 1 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000000 1.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 2.000000 1.000000
+ *MESH_TVERT 1 -2.000000 0.000000 1.000000
+ *MESH_TVERT 2 0.000000 2.000000 1.000000
+ *MESH_TVERT 3 2.000000 0.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf2"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf2"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 64.000000 0.000000 64.000000
+ *MESH_VERTEX 1 0.000000 0.000000 64.000000
+ *MESH_VERTEX 2 64.000000 128.000000 64.000000
+ *MESH_VERTEX 3 0.000000 128.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.707107 0.000000 0.707107
+ *MESH_FACENORMAL 1 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 0 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 1 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 2 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 3 0.000000 0.000000 1.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 1.000000 -1.000000 1.000000
+ *MESH_TVERT 1 -1.000000 -1.000000 1.000000
+ *MESH_TVERT 2 1.000000 3.000000 1.000000
+ *MESH_TVERT 3 -1.000000 3.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf3"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf3"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 0.000000 64.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 0.000000 128.000000 64.000000
+ *MESH_VERTEX 3 0.000000 128.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.707107 0.000000 0.707107
+ *MESH_FACENORMAL 1 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 0 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 1 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 2 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 3 -1.000000 0.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 2.000000 1.000000
+ *MESH_TVERT 1 -2.000000 0.000000 1.000000
+ *MESH_TVERT 2 2.000000 2.000000 1.000000
+ *MESH_TVERT 3 2.000000 0.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf4"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf4"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 128.000000 0.000000 0.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 64.000000 0.000000 64.000000
+ *MESH_VERTEX 3 0.000000 0.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.707107 0.000000 0.707107
+ *MESH_FACENORMAL 1 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 0 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 1 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 2 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000000 -1.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 2.000000 0.000000 1.000000
+ *MESH_TVERT 1 -2.000000 0.000000 1.000000
+ *MESH_TVERT 2 0.000000 2.000000 1.000000
+ *MESH_TVERT 3 -2.000000 2.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf5"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf5"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 128.000000 0.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 128.000000 128.000000 0.000000
+ *MESH_VERTEX 3 128.000000 0.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.707107 0.000000 0.707107
+ *MESH_FACENORMAL 1 0.707107 0.000000 0.707107
+ *MESH_VERTEXNORMAL 0 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 2 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 3 0.000000 0.000000 -1.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 3.000000 1.000000
+ *MESH_TVERT 1 -2.000000 -1.000000 1.000000
+ *MESH_TVERT 2 2.000000 3.000000 1.000000
+ *MESH_TVERT 3 2.000000 -1.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
-*3DSMAX_ASCIIEXPORT 200\r
-*COMMENT "Generated by Q3Map2 (ydnar) -convert -format ase"\r
-*SCENE {\r
- *SCENE_FILENAME "wedge_shallow.bsp"\r
- *SCENE_FIRSTFRAME 0\r
- *SCENE_LASTFRAME 100\r
- *SCENE_FRAMESPEED 30\r
- *SCENE_TICKSPERFRAME 160\r
- *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000\r
- *SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000\r
-}\r
-*MATERIAL_LIST {\r
- *MATERIAL_COUNT 2\r
- *MATERIAL 0 {\r
- *MATERIAL_NAME "textures/radiant_regression_tests/tile_model"\r
- *MATERIAL_CLASS "Standard"\r
- *MATERIAL_DIFFUSE 1.000000 1.000000 0.833333\r
- *MATERIAL_SHADING Phong\r
- *MAP_DIFFUSE {\r
- *MAP_NAME "textures/radiant_regression_tests/tile_model"\r
- *MAP_CLASS "Bitmap"\r
- *MAP_SUBNO 1\r
- *MAP_AMOUNT 1.0\r
- *MAP_TYPE Screen\r
- *BITMAP "..\textures\radiant_regression_tests\tile_model.tga"\r
- *BITMAP_FILTER Pyramidal\r
- }\r
- }\r
- *MATERIAL 1 {\r
- *MATERIAL_NAME "noshader"\r
- *MATERIAL_CLASS "Standard"\r
- *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000\r
- *MATERIAL_SHADING Phong\r
- *MAP_DIFFUSE {\r
- *MAP_NAME "noshader"\r
- *MAP_CLASS "Bitmap"\r
- *MAP_SUBNO 1\r
- *MAP_AMOUNT 1.0\r
- *MAP_TYPE Screen\r
- *BITMAP "..\noshader.tga"\r
- *BITMAP_FILTER Pyramidal\r
- }\r
- }\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf0"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf0"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 160.000000 0.000000 0.000000\r
- *MESH_VERTEX 1 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 2 160.000000 128.000000 0.000000\r
- *MESH_VERTEX 3 64.000000 128.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.554700 0.000000 0.832050\r
- *MESH_FACENORMAL 1 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 0 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 1 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 2 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 3 0.554700 0.000000 0.832050\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 2.000000 -1.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 2.000000 3.000000 1.000000\r
- *MESH_TVERT 3 -1.000000 3.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf1"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf1"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 128.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 128.000000 0.000000\r
- *MESH_VERTEX 2 64.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 160.000000 128.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.554700 0.000000 0.832050\r
- *MESH_FACENORMAL 1 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 1.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 2.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 2 0.000000 2.000000 1.000000\r
- *MESH_TVERT 3 3.000000 0.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf2"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf2"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 64.000000\r
- *MESH_VERTEX 2 64.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 128.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.554700 0.000000 0.832050\r
- *MESH_FACENORMAL 1 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 0 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 0.000000 1.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 1.000000 -1.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 1.000000 3.000000 1.000000\r
- *MESH_TVERT 3 -1.000000 3.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf3"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf3"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 0.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 0.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 128.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.554700 0.000000 0.832050\r
- *MESH_FACENORMAL 1 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 0 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 -1.000000 0.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 2.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 2 2.000000 2.000000 1.000000\r
- *MESH_TVERT 3 2.000000 0.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf4"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf4"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 160.000000 0.000000 0.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 0.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.554700 0.000000 0.832050\r
- *MESH_FACENORMAL 1 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 0 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 -1.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 3.000000 0.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 2 0.000000 2.000000 1.000000\r
- *MESH_TVERT 3 -2.000000 2.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf5"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf5"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 128.000000 0.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 160.000000 128.000000 0.000000\r
- *MESH_VERTEX 3 160.000000 0.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.554700 0.000000 0.832050\r
- *MESH_FACENORMAL 1 0.554700 0.000000 0.832050\r
- *MESH_VERTEXNORMAL 0 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 0.000000 -1.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 3.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 3.000000 3.000000 1.000000\r
- *MESH_TVERT 3 3.000000 -1.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
+*3DSMAX_ASCIIEXPORT 200
+*COMMENT "Generated by Q3Map2 (ydnar) -convert -format ase"
+*SCENE {
+ *SCENE_FILENAME "wedge_shallow.bsp"
+ *SCENE_FIRSTFRAME 0
+ *SCENE_LASTFRAME 100
+ *SCENE_FRAMESPEED 30
+ *SCENE_TICKSPERFRAME 160
+ *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
+ *SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000
+}
+*MATERIAL_LIST {
+ *MATERIAL_COUNT 2
+ *MATERIAL 0 {
+ *MATERIAL_NAME "textures/radiant_regression_tests/tile_model"
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_DIFFUSE 1.000000 1.000000 0.833333
+ *MATERIAL_SHADING Phong
+ *MAP_DIFFUSE {
+ *MAP_NAME "textures/radiant_regression_tests/tile_model"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0
+ *MAP_TYPE Screen
+ *BITMAP "..\textures\radiant_regression_tests\tile_model.tga"
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+ *MATERIAL 1 {
+ *MATERIAL_NAME "noshader"
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
+ *MATERIAL_SHADING Phong
+ *MAP_DIFFUSE {
+ *MAP_NAME "noshader"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0
+ *MAP_TYPE Screen
+ *BITMAP "..\noshader.tga"
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf0"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf0"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 160.000000 0.000000 0.000000
+ *MESH_VERTEX 1 64.000000 0.000000 64.000000
+ *MESH_VERTEX 2 160.000000 128.000000 0.000000
+ *MESH_VERTEX 3 64.000000 128.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.554700 0.000000 0.832050
+ *MESH_FACENORMAL 1 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 0 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 1 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 2 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 3 0.554700 0.000000 0.832050
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 2.000000 -1.000000 1.000000
+ *MESH_TVERT 1 -1.000000 -1.000000 1.000000
+ *MESH_TVERT 2 2.000000 3.000000 1.000000
+ *MESH_TVERT 3 -1.000000 3.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf1"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf1"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 128.000000 64.000000
+ *MESH_VERTEX 1 0.000000 128.000000 0.000000
+ *MESH_VERTEX 2 64.000000 128.000000 64.000000
+ *MESH_VERTEX 3 160.000000 128.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.554700 0.000000 0.832050
+ *MESH_FACENORMAL 1 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 1 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000000 1.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 2.000000 1.000000
+ *MESH_TVERT 1 -2.000000 0.000000 1.000000
+ *MESH_TVERT 2 0.000000 2.000000 1.000000
+ *MESH_TVERT 3 3.000000 0.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf2"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf2"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 64.000000 0.000000 64.000000
+ *MESH_VERTEX 1 0.000000 0.000000 64.000000
+ *MESH_VERTEX 2 64.000000 128.000000 64.000000
+ *MESH_VERTEX 3 0.000000 128.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.554700 0.000000 0.832050
+ *MESH_FACENORMAL 1 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 0 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 1 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 2 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 3 0.000000 0.000000 1.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 1.000000 -1.000000 1.000000
+ *MESH_TVERT 1 -1.000000 -1.000000 1.000000
+ *MESH_TVERT 2 1.000000 3.000000 1.000000
+ *MESH_TVERT 3 -1.000000 3.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf3"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf3"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 0.000000 64.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 0.000000 128.000000 64.000000
+ *MESH_VERTEX 3 0.000000 128.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.554700 0.000000 0.832050
+ *MESH_FACENORMAL 1 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 0 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 1 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 2 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 3 -1.000000 0.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 2.000000 1.000000
+ *MESH_TVERT 1 -2.000000 0.000000 1.000000
+ *MESH_TVERT 2 2.000000 2.000000 1.000000
+ *MESH_TVERT 3 2.000000 0.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf4"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf4"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 160.000000 0.000000 0.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 64.000000 0.000000 64.000000
+ *MESH_VERTEX 3 0.000000 0.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.554700 0.000000 0.832050
+ *MESH_FACENORMAL 1 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 0 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 1 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 2 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000000 -1.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 3.000000 0.000000 1.000000
+ *MESH_TVERT 1 -2.000000 0.000000 1.000000
+ *MESH_TVERT 2 0.000000 2.000000 1.000000
+ *MESH_TVERT 3 -2.000000 2.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf5"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf5"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 128.000000 0.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 160.000000 128.000000 0.000000
+ *MESH_VERTEX 3 160.000000 0.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.554700 0.000000 0.832050
+ *MESH_FACENORMAL 1 0.554700 0.000000 0.832050
+ *MESH_VERTEXNORMAL 0 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 2 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 3 0.000000 0.000000 -1.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 3.000000 1.000000
+ *MESH_TVERT 1 -2.000000 -1.000000 1.000000
+ *MESH_TVERT 2 3.000000 3.000000 1.000000
+ *MESH_TVERT 3 3.000000 -1.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
-*3DSMAX_ASCIIEXPORT 200\r
-*COMMENT "Generated by Q3Map2 (ydnar) -convert -format ase"\r
-*SCENE {\r
- *SCENE_FILENAME "wedge_steep.bsp"\r
- *SCENE_FIRSTFRAME 0\r
- *SCENE_LASTFRAME 100\r
- *SCENE_FRAMESPEED 30\r
- *SCENE_TICKSPERFRAME 160\r
- *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000\r
- *SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000\r
-}\r
-*MATERIAL_LIST {\r
- *MATERIAL_COUNT 2\r
- *MATERIAL 0 {\r
- *MATERIAL_NAME "textures/radiant_regression_tests/tile_model"\r
- *MATERIAL_CLASS "Standard"\r
- *MATERIAL_DIFFUSE 1.000000 1.000000 0.833333\r
- *MATERIAL_SHADING Phong\r
- *MAP_DIFFUSE {\r
- *MAP_NAME "textures/radiant_regression_tests/tile_model"\r
- *MAP_CLASS "Bitmap"\r
- *MAP_SUBNO 1\r
- *MAP_AMOUNT 1.0\r
- *MAP_TYPE Screen\r
- *BITMAP "..\textures\radiant_regression_tests\tile_model.tga"\r
- *BITMAP_FILTER Pyramidal\r
- }\r
- }\r
- *MATERIAL 1 {\r
- *MATERIAL_NAME "noshader"\r
- *MATERIAL_CLASS "Standard"\r
- *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000\r
- *MATERIAL_SHADING Phong\r
- *MAP_DIFFUSE {\r
- *MAP_NAME "noshader"\r
- *MAP_CLASS "Bitmap"\r
- *MAP_SUBNO 1\r
- *MAP_AMOUNT 1.0\r
- *MAP_TYPE Screen\r
- *BITMAP "..\noshader.tga"\r
- *BITMAP_FILTER Pyramidal\r
- }\r
- }\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf0"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf0"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 112.000000 0.000000 0.000000\r
- *MESH_VERTEX 1 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 2 112.000000 128.000000 0.000000\r
- *MESH_VERTEX 3 64.000000 128.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.800000 0.000000 0.600000\r
- *MESH_FACENORMAL 1 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 0 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 1 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 2 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 3 0.800000 0.000000 0.600000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 2.000000 1.000000\r
- *MESH_TVERT 2 2.000000 0.000000 1.000000\r
- *MESH_TVERT 3 2.000000 2.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf1"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf1"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 128.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 128.000000 0.000000\r
- *MESH_VERTEX 2 64.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 112.000000 128.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.800000 0.000000 0.600000\r
- *MESH_FACENORMAL 1 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 1.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -1.000000 2.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 0.000000 1.000000\r
- *MESH_TVERT 2 1.000000 2.000000 1.000000\r
- *MESH_TVERT 3 2.500000 0.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf2"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf2"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 64.000000\r
- *MESH_VERTEX 2 64.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 128.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.800000 0.000000 0.600000\r
- *MESH_FACENORMAL 1 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 0 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 0.000000 1.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 0.000000 1.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 1.000000 -1.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 1.000000 3.000000 1.000000\r
- *MESH_TVERT 3 -1.000000 3.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf3"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf3"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 0.000000 64.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 0.000000 128.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 128.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.800000 0.000000 0.600000\r
- *MESH_FACENORMAL 1 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 0 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 -1.000000 0.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 -1.000000 0.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -2.000000 2.000000 1.000000\r
- *MESH_TVERT 1 -2.000000 0.000000 1.000000\r
- *MESH_TVERT 2 2.000000 2.000000 1.000000\r
- *MESH_TVERT 3 2.000000 0.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf4"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf4"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 112.000000 0.000000 0.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 64.000000 0.000000 64.000000\r
- *MESH_VERTEX 3 0.000000 0.000000 64.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.800000 0.000000 0.600000\r
- *MESH_FACENORMAL 1 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 0 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 -1.000000 0.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 -1.000000 0.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 2.500000 0.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 0.000000 1.000000\r
- *MESH_TVERT 2 1.000000 2.000000 1.000000\r
- *MESH_TVERT 3 -1.000000 2.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
-*GEOMOBJECT {\r
- *NODE_NAME "mat0model0surf5"\r
- *NODE_TM {\r
- *NODE_NAME "mat0model0surf5"\r
- *INHERIT_POS 0 0 0\r
- *INHERIT_ROT 0 0 0\r
- *INHERIT_SCL 0 0 0\r
- *TM_ROW0 1.0 0 0\r
- *TM_ROW1 0 1.0 0\r
- *TM_ROW2 0 0 1.0\r
- *TM_ROW3 0 0 0\r
- *TM_POS 0.000000 0.000000 0.000000\r
- }\r
- *MESH {\r
- *TIMEVALUE 0\r
- *MESH_NUMVERTEX 4\r
- *MESH_NUMFACES 2\r
- *COMMENT "SURFACETYPE MST_PLANAR"\r
- *MESH_VERTEX_LIST {\r
- *MESH_VERTEX 0 0.000000 128.000000 0.000000\r
- *MESH_VERTEX 1 0.000000 0.000000 0.000000\r
- *MESH_VERTEX 2 112.000000 128.000000 0.000000\r
- *MESH_VERTEX 3 112.000000 0.000000 0.000000\r
- }\r
- *MESH_NORMALS {\r
- *MESH_FACENORMAL 0 0.800000 0.000000 0.600000\r
- *MESH_FACENORMAL 1 0.800000 0.000000 0.600000\r
- *MESH_VERTEXNORMAL 0 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 2 0.000000 0.000000 -1.000000\r
- *MESH_VERTEXNORMAL 3 0.000000 0.000000 -1.000000\r
- }\r
- *MESH_FACE_LIST {\r
- *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0\r
- }\r
- *MESH_NUMTVERTEX 4\r
- *MESH_TVERTLIST {\r
- *MESH_TVERT 0 -1.000000 3.000000 1.000000\r
- *MESH_TVERT 1 -1.000000 -1.000000 1.000000\r
- *MESH_TVERT 2 2.500000 3.000000 1.000000\r
- *MESH_TVERT 3 2.500000 -1.000000 1.000000\r
- }\r
- *MESH_NUMTVFACES 2\r
- *MESH_TFACELIST {\r
- *MESH_TFACE 0 0 2 1\r
- *MESH_TFACE 1 2 3 1\r
- }\r
- }\r
- *PROP_MOTIONBLUR 0\r
- *PROP_CASTSHADOW 1\r
- *PROP_RECVSHADOW 1\r
- *MATERIAL_REF 0\r
-}\r
+*3DSMAX_ASCIIEXPORT 200
+*COMMENT "Generated by Q3Map2 (ydnar) -convert -format ase"
+*SCENE {
+ *SCENE_FILENAME "wedge_steep.bsp"
+ *SCENE_FIRSTFRAME 0
+ *SCENE_LASTFRAME 100
+ *SCENE_FRAMESPEED 30
+ *SCENE_TICKSPERFRAME 160
+ *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
+ *SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000
+}
+*MATERIAL_LIST {
+ *MATERIAL_COUNT 2
+ *MATERIAL 0 {
+ *MATERIAL_NAME "textures/radiant_regression_tests/tile_model"
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_DIFFUSE 1.000000 1.000000 0.833333
+ *MATERIAL_SHADING Phong
+ *MAP_DIFFUSE {
+ *MAP_NAME "textures/radiant_regression_tests/tile_model"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0
+ *MAP_TYPE Screen
+ *BITMAP "..\textures\radiant_regression_tests\tile_model.tga"
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+ *MATERIAL 1 {
+ *MATERIAL_NAME "noshader"
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
+ *MATERIAL_SHADING Phong
+ *MAP_DIFFUSE {
+ *MAP_NAME "noshader"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0
+ *MAP_TYPE Screen
+ *BITMAP "..\noshader.tga"
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf0"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf0"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 112.000000 0.000000 0.000000
+ *MESH_VERTEX 1 64.000000 0.000000 64.000000
+ *MESH_VERTEX 2 112.000000 128.000000 0.000000
+ *MESH_VERTEX 3 64.000000 128.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.800000 0.000000 0.600000
+ *MESH_FACENORMAL 1 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 0 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 1 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 2 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 3 0.800000 0.000000 0.600000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 0.000000 1.000000
+ *MESH_TVERT 1 -2.000000 2.000000 1.000000
+ *MESH_TVERT 2 2.000000 0.000000 1.000000
+ *MESH_TVERT 3 2.000000 2.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf1"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf1"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 128.000000 64.000000
+ *MESH_VERTEX 1 0.000000 128.000000 0.000000
+ *MESH_VERTEX 2 64.000000 128.000000 64.000000
+ *MESH_VERTEX 3 112.000000 128.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.800000 0.000000 0.600000
+ *MESH_FACENORMAL 1 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 1 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000000 1.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -1.000000 2.000000 1.000000
+ *MESH_TVERT 1 -1.000000 0.000000 1.000000
+ *MESH_TVERT 2 1.000000 2.000000 1.000000
+ *MESH_TVERT 3 2.500000 0.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf2"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf2"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 64.000000 0.000000 64.000000
+ *MESH_VERTEX 1 0.000000 0.000000 64.000000
+ *MESH_VERTEX 2 64.000000 128.000000 64.000000
+ *MESH_VERTEX 3 0.000000 128.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.800000 0.000000 0.600000
+ *MESH_FACENORMAL 1 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 0 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 1 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 2 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 3 0.000000 0.000000 1.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 1.000000 -1.000000 1.000000
+ *MESH_TVERT 1 -1.000000 -1.000000 1.000000
+ *MESH_TVERT 2 1.000000 3.000000 1.000000
+ *MESH_TVERT 3 -1.000000 3.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf3"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf3"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 0.000000 64.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 0.000000 128.000000 64.000000
+ *MESH_VERTEX 3 0.000000 128.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.800000 0.000000 0.600000
+ *MESH_FACENORMAL 1 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 0 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 1 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 2 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 3 -1.000000 0.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -2.000000 2.000000 1.000000
+ *MESH_TVERT 1 -2.000000 0.000000 1.000000
+ *MESH_TVERT 2 2.000000 2.000000 1.000000
+ *MESH_TVERT 3 2.000000 0.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf4"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf4"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 112.000000 0.000000 0.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 64.000000 0.000000 64.000000
+ *MESH_VERTEX 3 0.000000 0.000000 64.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.800000 0.000000 0.600000
+ *MESH_FACENORMAL 1 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 0 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 1 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 2 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000000 -1.000000 0.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 2.500000 0.000000 1.000000
+ *MESH_TVERT 1 -1.000000 0.000000 1.000000
+ *MESH_TVERT 2 1.000000 2.000000 1.000000
+ *MESH_TVERT 3 -1.000000 2.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
+*GEOMOBJECT {
+ *NODE_NAME "mat0model0surf5"
+ *NODE_TM {
+ *NODE_NAME "mat0model0surf5"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0 0 0
+ *TM_ROW1 0 1.0 0
+ *TM_ROW2 0 0 1.0
+ *TM_ROW3 0 0 0
+ *TM_POS 0.000000 0.000000 0.000000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 4
+ *MESH_NUMFACES 2
+ *COMMENT "SURFACETYPE MST_PLANAR"
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 0.000000 128.000000 0.000000
+ *MESH_VERTEX 1 0.000000 0.000000 0.000000
+ *MESH_VERTEX 2 112.000000 128.000000 0.000000
+ *MESH_VERTEX 3 112.000000 0.000000 0.000000
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 0.800000 0.000000 0.600000
+ *MESH_FACENORMAL 1 0.800000 0.000000 0.600000
+ *MESH_VERTEXNORMAL 0 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 2 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 3 0.000000 0.000000 -1.000000
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0 A: 0 B: 2 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ *MESH_FACE 1 A: 2 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
+ }
+ *MESH_NUMTVERTEX 4
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 -1.000000 3.000000 1.000000
+ *MESH_TVERT 1 -1.000000 -1.000000 1.000000
+ *MESH_TVERT 2 2.500000 3.000000 1.000000
+ *MESH_TVERT 3 2.500000 -1.000000 1.000000
+ }
+ *MESH_NUMTVFACES 2
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 2 1
+ *MESH_TFACE 1 2 3 1
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
volume = BrushVolume( b );
if ( volume < microvolume ) {
- Sys_Printf( "WARNING: entity %i, brush %i: microbrush\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: entity %i, brush %i: microbrush\n",
b->original->entitynum, b->original->brushnum );
}
}
#if 0
if ( v1 == edge->v[0] && v2 == edge->v[1] ) {
- Sys_Printf( "WARNING: multiple forward edge\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: multiple forward edge\n" );
return i;
}
#endif
if ( target[0] ) { // point towards target
e2 = FindTargetEntity( target );
if ( !e2 ) {
- Sys_Printf( "WARNING: light at (%i %i %i) has missing target\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: light at (%i %i %i) has missing target\n",
(int)dl->origin[0], (int)dl->origin[1], (int)dl->origin[2] );
}
else
Sys_Printf( "Game: %s\n", game );
if ( !do_info && !do_bsp && !do_vis && !do_rad ) {
- Sys_Printf( "ERROR: -bsp, -vis, -light, nor -info specified.\nWhat to you want me to do?\n\n" );
+ Sys_FPrintf( SYS_ERR, "ERROR: -bsp, -vis, -light, nor -info specified.\nWhat to you want me to do?\n\n" );
}
else
{
CalcNodeBounds( node );
if ( node->mins[0] >= node->maxs[0] ) {
- Sys_Printf( "WARNING: node without a volume\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: node without a volume\n" );
}
for ( i = 0 ; i < 3 ; i++ )
{
if ( node->mins[i] < -8000 || node->maxs[i] > 8000 ) {
- Sys_Printf( "WARNING: node with unbounded volume\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: node with unbounded volume\n" );
break;
}
}
// note the current area as bounding the portal
if ( e->portalareas[1] ) {
- Sys_Printf( "WARNING: areaportal entity %i touches > 2 areas\n", b->original->entitynum );
+ Sys_FPrintf( SYS_WRN, "WARNING: areaportal entity %i touches > 2 areas\n", b->original->entitynum );
return;
}
if ( e->portalareas[0] ) {
e = &entities[b->original->entitynum];
node->area = e->portalareas[0];
if ( !e->portalareas[1] ) {
- Sys_Printf( "WARNING: areaportal entity %i doesn't touch two areas\n", b->original->entitynum );
+ Sys_FPrintf( SYS_WRN, "WARNING: areaportal entity %i doesn't touch two areas\n", b->original->entitynum );
return;
}
}
numvis = LeafVectorFromPortalVector( portalvector, uncompressed );
if ( uncompressed[leafnum >> 3] & ( 1 << ( leafnum & 7 ) ) ) {
- Sys_Printf( "WARNING: Leaf portals saw into leaf\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Leaf portals saw into leaf\n" );
}
uncompressed[leafnum >> 3] |= ( 1 << ( leafnum & 7 ) );
{
numFramesInAnimation = pObject->anim.numFrames;
if ( maxFrames != -1 ) {
- Sys_Printf( "WARNING: ASE_GetSurfaceAnimation maxFrames > numFramesInAnimation\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: ASE_GetSurfaceAnimation maxFrames > numFramesInAnimation\n" );
}
}
}
static void ASE_KeyMAP_DIFFUSE( const char *token ){
- char fullpath[1024], bitmap[1024], modeldir[1024];
+ char bitmap[1024];
char filename[1024];
- int i = 0, count;
+ int i = 0;
strcpy( filename, gl_filename );
else
{
sprintf( ase.materials[ase.numMaterials].name, "(not converted: '%s')", bitmap );
- Sys_Printf( "WARNING: illegal material name '%s'\n", bitmap );
+ Sys_FPrintf( SYS_WRN, "WARNING: illegal material name '%s'\n", bitmap );
}
}
else
}
if ( script->buffer == NULL ) {
- Sys_Printf( "WARNING: Attempt to free already freed script buffer\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Attempt to free already freed script buffer\n" );
}
else{
free( script->buffer );
*/
-/* for more info about .ZIP format, see
- ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip
- PkWare has also a specification at :
- ftp://ftp.pkware.com/probdesc.zip */
-
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.1.3, July 9th, 1998
-
- Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- jloup@gzip.org madler@alumni.caltech.edu
-
-
- The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-
-#ifndef _ZCONF_H
-#define _ZCONF_H
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# ifdef MAXSEG_64K
-# define MAX_MEM_LEVEL 8
-# else
-# define MAX_MEM_LEVEL 9
-# endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
- (1 << (windowBits+2)) + (1 << (memLevel+9))
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
- /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#define OF(args) args
-#endif
-
-typedef unsigned char Byte; /* 8 bits */
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-typedef Byte *voidp;
-
-#ifndef SEEK_SET
-# define SEEK_SET 0 /* Seek from beginning of file. */
-# define SEEK_CUR 1 /* Seek from current position. */
-# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
-#endif
-
-#endif /* _ZCONF_H */
-
-#define ZLIB_VERSION "1.1.3"
-
-/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms will be added later and will have the same
- stream interface.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
- (providing more output space) before each call.
-
- The library also supports reading and writing files in gzip (.gz) format
- with an interface similar to that of stdio.
-
- The library does not install any signal handler. The decoder checks
- the consistency of the compressed data, so the library should never
- crash even in case of corrupted input.
-*/
-
-/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
- opaque value.
-
- zalloc must return Z_NULL if there is not enough memory for the object.
- If zlib is used in a multi-threaded application, zalloc and zfree must be
- thread safe.
-
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
-*/
-
- /* constants */
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH 2
-#define Z_FULL_FLUSH 3
-#define Z_FINISH 4
-/* Allowed flush values; see deflate() below for details */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_NEED_DICT 2
-#define Z_ERRNO (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION 0
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_DEFAULT_STRATEGY 0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY 0
-#define Z_ASCII 1
-#define Z_UNKNOWN 2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED 8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
- /* basic functions */
-
-const char * zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-int deflateInit OF((z_streamp strm, int level));
-
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to Z_NULL, deflateInit updates them to
- use default allocation functions.
-
- The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
-
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
- Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
-*/
-
-
-int deflate OF((z_streamp strm, int flush));
-/*
- deflate compresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce some
- output latency (reading input without producing any output) except when
- forced to flush.
-
- The detailed semantics are as follows. deflate performs one or both of the
- following actions:
-
- - Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in and avail_in are updated and
- processing will resume at this point for the next call of deflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
- Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
-
- If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
- flushed to the output buffer and the output is aligned on a byte boundary, so
- that the decompressor can get all input data available so far. (In particular
- avail_in is zero after the call if enough output space has been provided
- before the call.) Flushing may degrade compression for some compression
- algorithms and so it should be used only when necessary.
-
- If flush is set to Z_FULL_FLUSH, all output is flushed as with
- Z_SYNC_FLUSH, and the compression state is reset so that decompression can
- restart from this point if previous compressed data has been damaged or if
- random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
- the compression.
-
- If deflate returns with avail_out == 0, this function must be called again
- with the same value of the flush parameter and more output space (updated
- avail_out), until the flush is complete (deflate returns with non-zero
- avail_out).
-
- If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
- called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
-
- Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least
- 0.1% larger than avail_in plus 12 bytes. If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
-
- deflate() sets strm->adler to the adler32 checksum of all input read
- so (that is, total_in bytes).
-
- deflate() may update data_type if it can make a good guess about
- the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
-
- deflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if all input has been
- consumed and all output has been produced (only when flush is set to
- Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
- (for example avail_in or avail_out was zero).
-*/
-
-
-int deflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
- stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
- deallocated).
-*/
-
-
-/*
-int inflateInit OF((z_streamp strm));
-
- Initializes the internal stream state for decompression. The fields
- next_in, avail_in, zalloc, zfree and opaque must be initialized before by
- the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
- value depends on the compression method), inflateInit determines the
- compression method from the zlib header and allocates all data structures
- accordingly; otherwise the allocation will be deferred to the first call of
- inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
- use default allocation functions.
-
- inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
- version assumed by the caller. msg is set to null if there is no error
- message. inflateInit does not perform any decompression apart from reading
- the zlib header if present: this will be done by inflate(). (So next_in and
- avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-int inflate OF((z_streamp strm, int flush));
-/*
- inflate decompresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may some
- introduce some output latency (reading input without producing any output)
- except when forced to flush.
-
- The detailed semantics are as follows. inflate performs one or both of the
- following actions:
-
- - Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much
- output as possible to the output buffer. The flushing behavior of inflate is
- not specified for values of the flush parameter other than Z_SYNC_FLUSH
- and Z_FINISH, but the current implementation actually flushes as much output
- as possible anyway.
-
- inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster routine
- may be used for the single inflate() call.
-
- If a preset dictionary is needed at this point (see inflateSetDictionary
- below), inflate sets strm-adler to the adler32 checksum of the
- dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise
- it sets strm->adler to the adler32 checksum of all output produced
- so (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or
- an error code as described below. At the end of the stream, inflate()
- checks that its computed adler32 checksum is equal to that saved by the
- compressor and returns Z_STREAM_END only if the checksum is correct.
-
- inflate() returns Z_OK if some progress has been made (more input processed
- or more output produced), Z_STREAM_END if the end of the compressed data has
- been reached and all uncompressed output has been produced, Z_NEED_DICT if a
- preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
- corrupted (input stream not conforming to the zlib format or incorrect
- adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent
- (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if no progress is possible or if there was not
- enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR
- case, the application may then call inflateSync to look for a good
- compression block.
-*/
-
-
-int inflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
-*/
-
- /* Advanced functions */
-
-/*
- The following functions are needed only in some special applications.
-*/
-
-/*
-int deflateInit2 OF((z_streamp strm,
- int level,
- int method,
- int windowBits,
- int memLevel,
- int strategy));
-
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The method parameter is the compression method. It must be Z_DEFLATED in
- this version of the library.
-
- The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library. Larger values of this parameter result in better
- compression at the expense of memory usage. The default value is 15 if
- deflateInit is used instead.
-
- The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
-
- The strategy parameter is used to tune the compression algorithm. Use the
- value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
- filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
- string match). Filtered data consists mostly of small values with a
- somewhat random distribution. In this case, the compression algorithm is
- tuned to compress them better. The effect of Z_FILTERED is to force more
- Huffman coding and less string matching; it is somewhat intermediate
- between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
- the compression ratio but not the correctness of the compressed output even
- if it is not set appropriately.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
- method). msg is set to null if there is no error message. deflateInit2 does
- not perform any compression: this will be done by deflate().
-*/
-
-int deflateSetDictionary OF((z_streamp strm,
- const Byte *dictionary,
- uInt dictLength));
-/*
- Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any
- call of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
-
- The dictionary should consist of strings (byte sequences) that are likely
- to be encountered later in the data to be compressed, with the most commonly
- used strings preferably put towards the end of the dictionary. Using a
- dictionary is most useful when the data to be compressed is short and can be
- predicted with good accuracy; the data can then be compressed better than
- with the default empty dictionary.
-
- Depending on the size of the compression data structures selected by
- deflateInit or deflateInit2, a part of the dictionary may in effect be
- discarded, for example if the dictionary is larger than the window size in
- deflate or deflate2. Thus the strings most likely to be useful should be
- put at the end of the dictionary, not at the front.
-
- Upon return of this function, strm->adler is set to the Adler32 value
- of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The Adler32 value
- applies to the whole dictionary even if only a subset of the dictionary is
- actually used by the compressor.)
-
- deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
- perform any compression: this will be done by deflate().
-*/
-
-int deflateCopy OF((z_streamp dest,
- z_streamp source));
-/*
- Sets the destination stream as a complete copy of the source stream.
-
- This function can be useful when several compression strategies will be
- tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
- by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
-
- deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-int deflateReset OF((z_streamp strm));
-/*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
-
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-int deflateParams OF((z_streamp strm,
- int level,
- int strategy));
-/*
- Dynamically update the compression level and compression strategy. The
- interpretation of level and strategy is as in deflateInit2. This can be
- used to switch between compression and straight copy of the input data, or
- to switch to a different kind of input data requiring a different
- strategy. If the compression level is changed, the input available so far
- is compressed with the old level (and may be flushed); the new level will
- take effect only at the next call of deflate().
-
- Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
- deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
-*/
-
-/*
-int inflateInit2 OF((z_streamp strm,
- int windowBits));
-
- This is another version of inflateInit with an extra parameter. The
- fields next_in, avail_in, zalloc, zfree and opaque must be initialized
- before by the caller.
-
- The windowBits parameter is the base two logarithm of the maximum window
- size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library. The default value is 15 if inflateInit is used
- instead. If a compressed stream with a larger window size is given as
- input, inflate() will return with the error code Z_DATA_ERROR instead of
- trying to allocate a larger window.
-
- inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative
- memLevel). msg is set to null if there is no error message. inflateInit2
- does not perform any decompression apart from reading the zlib header if
- present: this will be done by inflate(). (So next_in and avail_in may be
- modified, but next_out and avail_out are unchanged.)
-*/
-
-int inflateSetDictionary OF((z_streamp strm,
- const Byte *dictionary,
- uInt dictLength));
-/*
- Initializes the decompression dictionary from the given uncompressed byte
- sequence. This function must be called immediately after a call of inflate
- if this call returned Z_NEED_DICT. The dictionary chosen by the compressor
- can be determined from the Adler32 value returned by this call of
- inflate. The compressor and decompressor must use exactly the same
- dictionary (see deflateSetDictionary).
-
- inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect Adler32 value). inflateSetDictionary does not
- perform any decompression: this will be done by subsequent calls of
- inflate().
-*/
-
-int inflateSync OF((z_streamp strm));
-/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
- available input is skipped. No output is provided.
-
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
-*/
-
-int inflateReset OF((z_streamp strm));
-/*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
-
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-
- /* utility functions */
-
-/*
- The following utility functions are implemented on top of the
- basic stream-oriented functions. To simplify the interface, some
- default options are assumed (compression level and memory usage,
- standard memory allocation functions). The source code of these
- utility functions can easily be modified if you need special options.
-*/
-
-int compress OF((Byte *dest, uLong *destLen,
- const Byte *source, uLong sourceLen));
-/*
- Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least 0.1% larger than
- sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
- compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
- compress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer.
-*/
-
-int compress2 OF((Byte *dest, uLong *destLen,
- const Byte *source, uLong sourceLen,
- int level));
-/*
- Compresses the source buffer into the destination buffer. The level
- parameter has the same meaning as in deflateInit. sourceLen is the byte
- length of the source buffer. Upon entry, destLen is the total size of the
- destination buffer, which must be at least 0.1% larger than sourceLen plus
- 12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
- compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_BUF_ERROR if there was not enough room in the output buffer,
- Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-int uncompress OF((Byte *dest, uLong *destLen,
- const Byte *source, uLong sourceLen));
-/*
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
-
- uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-
-
-typedef voidp gzFile;
-
-gzFile gzopen OF((const char *path, const char *mode));
-/*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
- ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
- Huffman only compression as in "wb1h". (See the description
- of deflateInit2 for more information about the strategy parameter.)
-
- gzopen can be used to read a file which is not in gzip format; in this
- case gzread will directly read from the file without decompression.
-
- gzopen returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR). */
-
-gzFile gzdopen OF((int fd, const char *mode));
-/*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
- fileno (in the file has been previously opened with fopen).
- The mode parameter is as in gzopen.
- The next call of gzclose on the returned gzFile will also close the
- file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
- descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
- gzdopen returns NULL if there was insufficient memory to allocate
- the (de)compression state.
-*/
-
-int gzsetparams OF((gzFile file, int level, int strategy));
-/*
- Dynamically update the compression level or strategy. See the description
- of deflateInit2 for the meaning of these parameters.
- gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
- opened for writing.
-*/
-
-int gzread OF((gzFile file, voidp buf, unsigned len));
-/*
- Reads the given number of uncompressed bytes from the compressed file.
- If the input file was not in gzip format, gzread copies the given number
- of bytes into the buffer.
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
-
-int gzwrite OF((gzFile file,
- const voidp buf, unsigned len));
-/*
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of uncompressed bytes actually written
- (0 in case of error).
-*/
-
-int gzprintf OF((gzFile file, const char *format, ...));
-/*
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written (0 in case of error).
-*/
-
-int gzputs OF((gzFile file, const char *s));
-/*
- Writes the given null-terminated string to the compressed file, excluding
- the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-char * gzgets OF((gzFile file, char *buf, int len));
-/*
- Reads bytes from the compressed file until len-1 characters are read, or
- a newline character is read and transferred to buf, or an end-of-file
- condition is encountered. The string is then terminated with a null
- character.
- gzgets returns buf, or Z_NULL in case of error.
-*/
-
-int gzputc OF((gzFile file, int c));
-/*
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
-*/
-
-int gzgetc OF((gzFile file));
-/*
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
-*/
-
-int gzflush OF((gzFile file, int flush));
-/*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
- error number (see function gzerror below). gzflush returns Z_OK if
- the flush parameter is Z_FINISH and all output could be flushed.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
-*/
-
-long gzseek OF((gzFile file,
- long offset, int whence));
-/*
- Sets the starting position for the next gzread or gzwrite on the
- given compressed file. The offset represents a number of bytes in the
- uncompressed data stream. The whence parameter is defined as in lseek(2);
- the value SEEK_END is not supported.
- If the file is opened for reading, this function is emulated but can be
- extremely slow. If the file is opened for writing, only forward seeks are
- supported; gzseek then compresses a sequence of zeroes up to the new
- starting position.
-
- gzseek returns the resulting offset location as measured in bytes from
- the beginning of the uncompressed stream, or -1 in case of error, in
- particular if the file is opened for writing and the new starting position
- would be before the current position.
-*/
-
-int gzrewind OF((gzFile file));
-/*
- Rewinds the given file. This function is supported only for reading.
-
- gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-long gztell OF((gzFile file));
-/*
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
- uncompressed data stream.
-
- gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-int gzeof OF((gzFile file));
-/*
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
-*/
-
-int gzclose OF((gzFile file));
-/*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
-*/
-
-const char * gzerror OF((gzFile file, int *errnum));
-/*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-
- /* checksum functions */
-
-/*
- These functions are not related to compression but are exported
- anyway because they might be useful in applications using the
- compression library.
-*/
-
-uLong adler32 OF((uLong adler, const Byte *buf, uInt len));
-
-/*
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
-
- uLong adler = adler32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- adler = adler32(adler, buffer, length);
- }
- if (adler != original_adler) error();
-*/
-
-uLong crc32 OF((uLong crc, const Byte *buf, uInt len));
-/*
- Update a running crc with the bytes buf[0..len-1] and return the updated
- crc. If buf is NULL, this function returns the required initial value
- for the crc. Pre- and post-conditioning (one's complement) is performed
- within this function so it shouldn't be done by the application.
- Usage example:
-
- uLong crc = crc32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- crc = crc32(crc, buffer, length);
- }
- if (crc != original_crc) error();
-*/
// private stuff to not include cmdlib.h
/*
- /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-int deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
-int inflateInit_ OF((z_streamp strm,
- const char *version, int stream_size));
-int deflateInit2_ OF((z_streamp strm, int level, int method,
- int windowBits, int memLevel,
- int strategy, const char *version,
- int stream_size));
-int inflateInit2_ OF((z_streamp strm, int windowBits,
- const char *version, int stream_size));
-#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-
-
-const char * zError OF((int err));
-int inflateSyncPoint OF((z_streamp z));
-const uLong * get_crc_table OF((void));
-
-typedef unsigned char uch;
-typedef unsigned short ush;
-typedef unsigned long ulg;
-
-extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
- /* common constants */
-
-#ifndef DEF_WBITS
-# define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-# define DEF_MEM_LEVEL 8
-#else
-# define DEF_MEM_LEVEL MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES 2
-/* The three kinds of block type */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
- /* target dependencies */
-
- /* Common defaults */
-
-#ifndef OS_CODE
-# define OS_CODE 0x03 /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-# define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
- /* functions */
-
-#ifdef HAVE_STRERROR
- extern char *strerror OF((int));
-# define zstrerror(errnum) strerror(errnum)
-#else
-# define zstrerror(errnum) ""
-#endif
-
#define zmemcpy memcpy
#define zmemcmp memcmp
#define zmemzero(dest, len) memset(dest, 0, len)
typedef uLong (*check_func) OF((uLong check, const Byte *buf, uInt len));
-voidp zcalloc OF((voidp opaque, unsigned items, unsigned size));
-void zcfree OF((voidp opaque, voidp ptr));
+static voidp zcalloc OF((voidp opaque, unsigned items, unsigned size));
+static void zcfree OF((voidp opaque, voidp ptr));
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidp)(addr))
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+// use real zlib
+#ifndef DEF_WBITS
+# define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+#include <zlib.h>
#if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) && \
!defined(CASESENSITIVITYDEFAULT_NO)
#define SIZECENTRALDIRITEM (0x2e)
#define SIZEZIPLOCALHEADER (0x1e)
-
-
/* ===========================================================================
Read a byte from a gz_stream; update next_in and avail_in. Return EOF
for end of file.
};
#endif
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-#ifndef __APPLE__
-const uLong * get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty) make_crc_table();
-#endif
- return (const uLong *)crc_table;
-}
-#endif
/* ========================================================================= */
#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
#define DO4(buf) DO2(buf); DO2(buf);
#define DO8(buf) DO4(buf); DO4(buf);
-/* ========================================================================= */
-#ifndef __APPLE__
-uLong crc32(uLong crc, const Byte *buf, uInt len)
-{
- if (buf == Z_NULL) return 0L;
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty)
- make_crc_table();
-#endif
- crc = crc ^ 0xffffffffL;
- while (len >= 8)
- {
- DO8(buf);
- len -= 8;
- }
- if (len) do {
- DO1(buf);
- } while (--len);
- return crc ^ 0xffffffffL;
-}
-#endif
-
/* infblock.h -- header to use infblock.c
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
the two sets of lengths.
*/
+/* And'ing with mask[n] masks the lower n bits */
+uInt inflate_mask[17] = {
+ 0x0000,
+ 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
+ 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
+};
-#ifndef __APPLE__
-void inflate_blocks_reset(inflate_blocks_statef *s, z_streamp z, uLong *c)
-{
- if (c != Z_NULL)
- *c = s->check;
- if (s->mode == BTREE || s->mode == DTREE)
- ZFREE(z, s->sub.trees.blens);
- if (s->mode == CODES)
- inflate_codes_free(s->sub.decode.codes, z);
- s->mode = TYPE;
- s->bitk = 0;
- s->bitb = 0;
- s->read = s->write = s->window;
- if (s->checkfn != Z_NULL)
- z->adler = s->check = (*s->checkfn)(0L, (const Byte *)Z_NULL, 0);
- Tracev(("inflate: blocks reset\n"));
-}
-#endif
-
-#ifndef __APPLE__
-inflate_blocks_statef *inflate_blocks_new(z_streamp z, check_func c, uInt w)
-{
- inflate_blocks_statef *s;
-
- if ((s = (inflate_blocks_statef *)ZALLOC
- (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)
- return s;
- if ((s->hufts =
- (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL)
- {
- ZFREE(z, s);
- return Z_NULL;
- }
- if ((s->window = (Byte *)ZALLOC(z, 1, w)) == Z_NULL)
- {
- ZFREE(z, s->hufts);
- ZFREE(z, s);
- return Z_NULL;
- }
- s->end = s->window + w;
- s->checkfn = c;
- s->mode = TYPE;
- Tracev(("inflate: blocks allocated\n"));
- inflate_blocks_reset(s, z, Z_NULL);
- return s;
-}
-#endif
-
-#ifndef __APPLE__
-int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
-{
- uInt t; /* temporary storage */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Byte *p; /* input data pointer */
- uInt n; /* bytes available there */
- Byte *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
-
- /* copy input/output information to locals (UPDATE macro restores) */
- LOAD
-
- /* process input based on current state */
- while (1) switch (s->mode)
- {
- case TYPE:
- NEEDBITS(3)
- t = (uInt)b & 7;
- s->last = t & 1;
- switch (t >> 1)
- {
- case 0: /* stored */
- Tracev(("inflate: stored block%s\n",
- s->last ? " (last)" : ""));
- DUMPBITS(3)
- t = k & 7; /* go to byte boundary */
- DUMPBITS(t)
- s->mode = LENS; /* get length of stored block */
- break;
- case 1: /* fixed */
- Tracev(("inflate: fixed codes block%s\n",
- s->last ? " (last)" : ""));
- {
- uInt bl, bd;
- inflate_huft *tl, *td;
-
- inflate_trees_fixed(&bl, &bd, &tl, &td, z);
- s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
- if (s->sub.decode.codes == Z_NULL)
- {
- r = Z_MEM_ERROR;
- LEAVE
- }
- }
- DUMPBITS(3)
- s->mode = CODES;
- break;
- case 2: /* dynamic */
- Tracev(("inflate: dynamic codes block%s\n",
- s->last ? " (last)" : ""));
- DUMPBITS(3)
- s->mode = TABLE;
- break;
- case 3: /* illegal */
- DUMPBITS(3)
- s->mode = BAD;
- z->msg = (char*)"invalid block type";
- r = Z_DATA_ERROR;
- LEAVE
- }
- break;
- case LENS:
- NEEDBITS(32)
- if ((((~b) >> 16) & 0xffff) != (b & 0xffff))
- {
- s->mode = BAD;
- z->msg = (char*)"invalid stored block lengths";
- r = Z_DATA_ERROR;
- LEAVE
- }
- s->sub.left = (uInt)b & 0xffff;
- b = k = 0; /* dump bits */
- Tracev(("inflate: stored length %u\n", s->sub.left));
- s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE);
- break;
- case STORED:
- if (n == 0)
- LEAVE
- NEEDOUT
- t = s->sub.left;
- if (t > n) t = n;
- if (t > m) t = m;
- zmemcpy(q, p, t);
- p += t; n -= t;
- q += t; m -= t;
- if ((s->sub.left -= t) != 0)
- break;
- Tracev(("inflate: stored end, %lu total out\n",
- z->total_out + (q >= s->read ? q - s->read :
- (s->end - s->read) + (q - s->window))));
- s->mode = s->last ? DRY : TYPE;
- break;
- case TABLE:
- NEEDBITS(14)
- s->sub.trees.table = t = (uInt)b & 0x3fff;
-#ifndef PKZIP_BUG_WORKAROUND
- if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
- {
- s->mode = BAD;
- z->msg = (char*)"too many length or distance symbols";
- r = Z_DATA_ERROR;
- LEAVE
- }
-#endif
- t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
- if ((s->sub.trees.blens = (uInt*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
- {
- r = Z_MEM_ERROR;
- LEAVE
- }
- DUMPBITS(14)
- s->sub.trees.index = 0;
- Tracev(("inflate: table sizes ok\n"));
- s->mode = BTREE;
- case BTREE:
- while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
- {
- NEEDBITS(3)
- s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
- DUMPBITS(3)
- }
- while (s->sub.trees.index < 19)
- s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
- s->sub.trees.bb = 7;
- t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
- &s->sub.trees.tb, s->hufts, z);
- if (t != Z_OK)
- {
- ZFREE(z, s->sub.trees.blens);
- r = t;
- if (r == Z_DATA_ERROR)
- s->mode = BAD;
- LEAVE
- }
- s->sub.trees.index = 0;
- Tracev(("inflate: bits tree ok\n"));
- s->mode = DTREE;
- case DTREE:
- while (t = s->sub.trees.table,
- s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
- {
- inflate_huft *h;
- uInt i, j, c;
-
- t = s->sub.trees.bb;
- NEEDBITS(t)
- h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
- t = h->bits;
- c = h->base;
- if (c < 16)
- {
- DUMPBITS(t)
- s->sub.trees.blens[s->sub.trees.index++] = c;
- }
- else /* c == 16..18 */
- {
- i = c == 18 ? 7 : c - 14;
- j = c == 18 ? 11 : 3;
- NEEDBITS(t + i)
- DUMPBITS(t)
- j += (uInt)b & inflate_mask[i];
- DUMPBITS(i)
- i = s->sub.trees.index;
- t = s->sub.trees.table;
- if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
- (c == 16 && i < 1))
- {
- ZFREE(z, s->sub.trees.blens);
- s->mode = BAD;
- z->msg = (char*)"invalid bit length repeat";
- r = Z_DATA_ERROR;
- LEAVE
- }
- c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
- do {
- s->sub.trees.blens[i++] = c;
- } while (--j);
- s->sub.trees.index = i;
- }
- }
- s->sub.trees.tb = Z_NULL;
- {
- uInt bl, bd;
- inflate_huft *tl, *td;
- inflate_codes_statef *c;
-
- bl = 9; /* must be <= 9 for lookahead assumptions */
- bd = 6; /* must be <= 9 for lookahead assumptions */
- t = s->sub.trees.table;
- t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
- s->sub.trees.blens, &bl, &bd, &tl, &td,
- s->hufts, z);
- ZFREE(z, s->sub.trees.blens);
- if (t != Z_OK)
- {
- if (t == (uInt)Z_DATA_ERROR)
- s->mode = BAD;
- r = t;
- LEAVE
- }
- Tracev(("inflate: trees ok\n"));
- if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
- {
- r = Z_MEM_ERROR;
- LEAVE
- }
- s->sub.decode.codes = c;
- }
- s->mode = CODES;
- case CODES:
- UPDATE
- if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
- return inflate_flush(s, z, r);
- r = Z_OK;
- inflate_codes_free(s->sub.decode.codes, z);
- LOAD
- Tracev(("inflate: codes end, %lu total out\n",
- z->total_out + (q >= s->read ? q - s->read :
- (s->end - s->read) + (q - s->window))));
- if (!s->last)
- {
- s->mode = TYPE;
- break;
- }
- s->mode = DRY;
- case DRY:
- FLUSH
- if (s->read != s->write)
- LEAVE
- s->mode = DONE;
- case DONE:
- r = Z_STREAM_END;
- LEAVE
- case BAD:
- r = Z_DATA_ERROR;
- LEAVE
- default:
- r = Z_STREAM_ERROR;
- LEAVE
- }
-}
-#endif
-
-#ifndef __APPLE__
-int inflate_blocks_free(inflate_blocks_statef *s, z_streamp z)
-{
- inflate_blocks_reset(s, z, Z_NULL);
- ZFREE(z, s->window);
- ZFREE(z, s->hufts);
- ZFREE(z, s);
- Tracev(("inflate: blocks freed\n"));
- return Z_OK;
-}
-#endif
-
-#ifndef __APPLE__
-void inflate_set_dictionary(inflate_blocks_statef *s, const Byte *d, uInt n)
-{
- zmemcpy(s->window, d, n);
- s->read = s->write = s->window + n;
-}
-#endif
-
-/* Returns true if inflate is currently at the end of a block generated
- * by Z_SYNC_FLUSH or Z_FULL_FLUSH.
- * IN assertion: s != Z_NULL
- */
-#ifndef __APPLE__
-int inflate_blocks_sync_point(inflate_blocks_statef *s)
-{
- return s->mode == LENS;
-}
-#endif
-
-/* And'ing with mask[n] masks the lower n bits */
-uInt inflate_mask[17] = {
- 0x0000,
- 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
-};
-
-/* copy as much as possible from the sliding window to the output area */
-#ifndef __APPLE__
-int inflate_flush(inflate_blocks_statef *s, z_streamp z, int r)
-{
- uInt n;
- Byte *p;
- Byte *q;
-
- /* static copies of source and destination pointers */
- p = z->next_out;
- q = s->read;
-
- /* compute number of bytes to copy as as end of window */
- n = (uInt)((q <= s->write ? s->write : s->end) - q);
- if (n > z->avail_out) n = z->avail_out;
- if (n && r == Z_BUF_ERROR) r = Z_OK;
-
- /* update counters */
- z->avail_out -= n;
- z->total_out += n;
-
- /* update check information */
- if (s->checkfn != Z_NULL)
- z->adler = s->check = (*s->checkfn)(s->check, q, n);
-
- /* copy as as end of window */
- zmemcpy(p, q, n);
- p += n;
- q += n;
-
- /* see if more to copy at beginning of window */
- if (q == s->end)
- {
- /* wrap pointers */
- q = s->window;
- if (s->write == s->end)
- s->write = s->window;
-
- /* compute bytes to copy */
- n = (uInt)(s->write - q);
- if (n > z->avail_out) n = z->avail_out;
- if (n && r == Z_BUF_ERROR) r = Z_OK;
-
- /* update counters */
- z->avail_out -= n;
- z->total_out += n;
-
- /* update check information */
- if (s->checkfn != Z_NULL)
- z->adler = s->check = (*s->checkfn)(s->check, q, n);
-
- /* copy */
- zmemcpy(p, q, n);
- p += n;
- q += n;
- }
-
- /* update pointers */
- z->next_out = p;
- s->read = q;
-
- /* done */
- return r;
-}
-#endif
-
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#ifndef __APPLE__
-const char inflate_copyright[] =
- " inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
-#endif
-
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
/* simplify the use of the inflate_huft type with some defines */
#define exop word.what.Exop
}
-#ifndef __APPLE__
-int inflate_trees_bits(uInt *c, uInt *bb, inflate_huft * *tb, inflate_huft *hp, z_streamp z)
-//uInt *c; /* 19 code lengths */
-//uInt *bb; /* bits tree desired/actual depth */
-//inflate_huft * *tb; /* bits tree result */
-//inflate_huft *hp; /* space for trees */
-//z_streamp z; /* for messages */
-{
- int r;
- uInt hn = 0; /* hufts used in space */
- uInt *v; /* work area for huft_build */
-
- if ((v = (uInt*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL)
- return Z_MEM_ERROR;
- r = huft_build(c, 19, 19, (uInt*)Z_NULL, (uInt*)Z_NULL,
- tb, bb, hp, &hn, v);
- if (r == Z_DATA_ERROR)
- z->msg = (char*)"oversubscribed dynamic bit lengths tree";
- else if (r == Z_BUF_ERROR || *bb == 0)
- {
- z->msg = (char*)"incomplete dynamic bit lengths tree";
- r = Z_DATA_ERROR;
- }
- ZFREE(z, v);
- return r;
-}
-#endif
-
-#ifndef __APPLE__
-int inflate_trees_dynamic(uInt nl, uInt nd, uInt *c, uInt *bl, uInt *bd, inflate_huft * *tl, inflate_huft * *td, inflate_huft *hp, z_streamp z)
-//uInt nl; /* number of literal/length codes */
-//uInt nd; /* number of distance codes */
-//uInt *c; /* that many (total) code lengths */
-//uInt *bl; /* literal desired/actual bit depth */
-//uInt *bd; /* distance desired/actual bit depth */
-//inflate_huft * *tl; /* literal/length tree result */
-//inflate_huft * *td; /* distance tree result */
-//inflate_huft *hp; /* space for trees */
-//z_streamp z; /* for messages */
-{
- int r;
- uInt hn = 0; /* hufts used in space */
- uInt *v; /* work area for huft_build */
-
- /* allocate work area */
- if ((v = (uInt*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL)
- return Z_MEM_ERROR;
-
- /* build literal/length tree */
- r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v);
- if (r != Z_OK || *bl == 0)
- {
- if (r == Z_DATA_ERROR)
- z->msg = (char*)"oversubscribed literal/length tree";
- else if (r != Z_MEM_ERROR)
- {
- z->msg = (char*)"incomplete literal/length tree";
- r = Z_DATA_ERROR;
- }
- ZFREE(z, v);
- return r;
- }
-
- /* build distance tree */
- r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v);
- if (r != Z_OK || (*bd == 0 && nl > 257))
- {
- if (r == Z_DATA_ERROR)
- z->msg = (char*)"oversubscribed distance tree";
- else if (r == Z_BUF_ERROR) {
-#ifdef PKZIP_BUG_WORKAROUND
- r = Z_OK;
- }
-#else
- z->msg = (char*)"incomplete distance tree";
- r = Z_DATA_ERROR;
- }
- else if (r != Z_MEM_ERROR)
- {
- z->msg = (char*)"empty distance tree with lengths";
- r = Z_DATA_ERROR;
- }
- ZFREE(z, v);
- return r;
-#endif
- }
-
- /* done */
- ZFREE(z, v);
- return Z_OK;
-}
-#endif
-
/* inffixed.h -- table for decoding fixed codes
* Generated automatically by the maketree.c program
*/
{{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577}
};
-#ifndef __APPLE__
-int inflate_trees_fixed(uInt *bl, uInt *bd, inflate_huft * *tl, inflate_huft * *td, z_streamp z)
-//uInt *bl; /* literal desired/actual bit depth */
-//uInt *bd; /* distance desired/actual bit depth */
-//inflate_huft * *tl; /* literal/length tree result */
-//inflate_huft * *td; /* distance tree result */
-//z_streamp z; /* for memory allocation */
-{
- *bl = fixed_bl;
- *bd = fixed_bd;
- *tl = fixed_tl;
- *td = fixed_td;
- return Z_OK;
-}
-#endif
-
-/* simplify the use of the inflate_huft type with some defines */
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* macros for bit input with no checking and for returning unused bytes */
-#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-#define UNGRAB {c=z->avail_in-n;c=(k>>3)<c?k>>3:c;n+=c;p-=c;k-=c<<3;}
-
-/* Called with number of bytes left to write in window at least 258
- (the maximum string length) and number of input bytes available
- at least ten. The ten bytes are six bytes for the longest length/
- distance pair plus four bytes for overloading the bit buffer. */
-
-#ifndef __APPLE__
-int inflate_fast(uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td, inflate_blocks_statef *s, z_streamp z)
-{
- inflate_huft *t; /* temporary pointer */
- uInt e; /* extra bits or operation */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Byte *p; /* input data pointer */
- uInt n; /* bytes available there */
- Byte *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
- uInt ml; /* mask for literal/length tree */
- uInt md; /* mask for distance tree */
- uInt c; /* bytes to copy */
- uInt d; /* distance back to copy from */
- Byte *r; /* copy source pointer */
-
- /* load input, output, bit values */
- LOAD
-
- /* initialize masks */
- ml = inflate_mask[bl];
- md = inflate_mask[bd];
-
- /* do until not enough input or output space for fast loop */
- do { /* assume called with m >= 258 && n >= 10 */
- /* get literal/length code */
- GRABBITS(20) /* max bits for literal/length code */
- if ((e = (t = tl + ((uInt)b & ml))->exop) == 0)
- {
- DUMPBITS(t->bits)
- Tracevv((t->base >= 0x20 && t->base < 0x7f ?
- "inflate: * literal '%c'\n" :
- "inflate: * literal 0x%02x\n", t->base));
- *q++ = (Byte)t->base;
- m--;
- continue;
- }
- do {
- DUMPBITS(t->bits)
- if (e & 16)
- {
- /* get extra bits for length */
- e &= 15;
- c = t->base + ((uInt)b & inflate_mask[e]);
- DUMPBITS(e)
- Tracevv(("inflate: * length %u\n", c));
-
- /* decode distance base of block to copy */
- GRABBITS(15); /* max bits for distance code */
- e = (t = td + ((uInt)b & md))->exop;
- do {
- DUMPBITS(t->bits)
- if (e & 16)
- {
- /* get extra bits to add to distance base */
- e &= 15;
- GRABBITS(e) /* get extra bits (up to 13) */
- d = t->base + ((uInt)b & inflate_mask[e]);
- DUMPBITS(e)
- Tracevv(("inflate: * distance %u\n", d));
-
- /* do the copy */
- m -= c;
- if ((uInt)(q - s->window) >= d) /* offset before dest */
- { /* just copy */
- r = q - d;
- *q++ = *r++; c--; /* minimum count is three, */
- *q++ = *r++; c--; /* so unroll loop a little */
- }
- else /* else offset after destination */
- {
- e = d - (uInt)(q - s->window); /* bytes from offset to end */
- r = s->end - e; /* pointer to offset */
- if (c > e) /* if source crosses, */
- {
- c -= e; /* copy to end of window */
- do {
- *q++ = *r++;
- } while (--e);
- r = s->window; /* copy rest from start of window */
- }
- }
- do { /* copy all or what's left */
- *q++ = *r++;
- } while (--c);
- break;
- }
- else if ((e & 64) == 0)
- {
- t += t->base;
- e = (t += ((uInt)b & inflate_mask[e]))->exop;
- }
- else
- {
- z->msg = (char*)"invalid distance code";
- UNGRAB
- UPDATE
- return Z_DATA_ERROR;
- }
- } while (1);
- break;
- }
- if ((e & 64) == 0)
- {
- t += t->base;
- if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0)
- {
- DUMPBITS(t->bits)
- Tracevv((t->base >= 0x20 && t->base < 0x7f ?
- "inflate: * literal '%c'\n" :
- "inflate: * literal 0x%02x\n", t->base));
- *q++ = (Byte)t->base;
- m--;
- break;
- }
- }
- else if (e & 32)
- {
- Tracevv(("inflate: * end of block\n"));
- UNGRAB
- UPDATE
- return Z_STREAM_END;
- }
- else
- {
- z->msg = (char*)"invalid literal/length code";
- UNGRAB
- UPDATE
- return Z_DATA_ERROR;
- }
- } while (1);
- } while (m >= 258 && n >= 10);
-
- /* not enough input or output--restore pointers and return */
- UNGRAB
- UPDATE
- return Z_OK;
-}
-#endif
-
/* infcodes.c -- process literals and length/distance pairs
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
};
-#ifndef __APPLE__
-inflate_codes_statef *inflate_codes_new(uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td, z_streamp z)
-{
- inflate_codes_statef *c;
-
- if ((c = (inflate_codes_statef *)
- ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL)
- {
- c->mode = START;
- c->lbits = (Byte)bl;
- c->dbits = (Byte)bd;
- c->ltree = tl;
- c->dtree = td;
- Tracev(("inflate: codes new\n"));
- }
- return c;
-}
-#endif
-
-#ifndef __APPLE__
-int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
-{
- uInt j; /* temporary storage */
- inflate_huft *t; /* temporary pointer */
- uInt e; /* extra bits or operation */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Byte *p; /* input data pointer */
- uInt n; /* bytes available there */
- Byte *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
- Byte *f; /* pointer to copy strings from */
- inflate_codes_statef *c = s->sub.decode.codes; /* codes state */
-
- /* copy input/output information to locals (UPDATE macro restores) */
- LOAD
-
- /* process input and output based on current state */
- while (1) switch (c->mode)
- { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
- case START: /* x: set up for LEN */
-#ifndef SLOW
- if (m >= 258 && n >= 10)
- {
- UPDATE
- r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z);
- LOAD
- if (r != Z_OK)
- {
- c->mode = r == Z_STREAM_END ? WASH : BADCODE;
- break;
- }
- }
-#endif /* !SLOW */
- c->sub.code.need = c->lbits;
- c->sub.code.tree = c->ltree;
- c->mode = LEN;
- case LEN: /* i: get length/literal/eob next */
- j = c->sub.code.need;
- NEEDBITS(j)
- t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
- DUMPBITS(t->bits)
- e = (uInt)(t->exop);
- if (e == 0) /* literal */
- {
- c->sub.lit = t->base;
- Tracevv((t->base >= 0x20 && t->base < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", t->base));
- c->mode = LIT;
- break;
- }
- if (e & 16) /* length */
- {
- c->sub.copy.get = e & 15;
- c->len = t->base;
- c->mode = LENEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = t + t->base;
- break;
- }
- if (e & 32) /* end of block */
- {
- Tracevv(("inflate: end of block\n"));
- c->mode = WASH;
- break;
- }
- c->mode = BADCODE; /* invalid code */
- z->msg = (char*)"invalid literal/length code";
- r = Z_DATA_ERROR;
- LEAVE
- case LENEXT: /* i: getting length extra (have base) */
- j = c->sub.copy.get;
- NEEDBITS(j)
- c->len += (uInt)b & inflate_mask[j];
- DUMPBITS(j)
- c->sub.code.need = c->dbits;
- c->sub.code.tree = c->dtree;
- Tracevv(("inflate: length %u\n", c->len));
- c->mode = DIST;
- case DIST: /* i: get distance next */
- j = c->sub.code.need;
- NEEDBITS(j)
- t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
- DUMPBITS(t->bits)
- e = (uInt)(t->exop);
- if (e & 16) /* distance */
- {
- c->sub.copy.get = e & 15;
- c->sub.copy.dist = t->base;
- c->mode = DISTEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = t + t->base;
- break;
- }
- c->mode = BADCODE; /* invalid code */
- z->msg = (char*)"invalid distance code";
- r = Z_DATA_ERROR;
- LEAVE
- case DISTEXT: /* i: getting distance extra */
- j = c->sub.copy.get;
- NEEDBITS(j)
- c->sub.copy.dist += (uInt)b & inflate_mask[j];
- DUMPBITS(j)
- Tracevv(("inflate: distance %u\n", c->sub.copy.dist));
- c->mode = COPY;
- case COPY: /* o: copying bytes in window, waiting for space */
-#ifndef __TURBOC__ /* Turbo C bug for following expression */
- f = (uInt)(q - s->window) < c->sub.copy.dist ?
- s->end - (c->sub.copy.dist - (q - s->window)) :
- q - c->sub.copy.dist;
-#else
- f = q - c->sub.copy.dist;
- if ((uInt)(q - s->window) < c->sub.copy.dist)
- f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));
-#endif
- while (c->len)
- {
- NEEDOUT
- OUTBYTE(*f++)
- if (f == s->end)
- f = s->window;
- c->len--;
- }
- c->mode = START;
- break;
- case LIT: /* o: got literal, waiting for output space */
- NEEDOUT
- OUTBYTE(c->sub.lit)
- c->mode = START;
- break;
- case WASH: /* o: got eob, possibly more output */
- if (k > 7) /* return unused byte, if any */
- {
- Assert(k < 16, "inflate_codes grabbed too many bytes")
- k -= 8;
- n++;
- p--; /* can always return one */
- }
- FLUSH
- if (s->read != s->write)
- LEAVE
- c->mode = END;
- case END:
- r = Z_STREAM_END;
- LEAVE
- case BADCODE: /* x: got error */
- r = Z_DATA_ERROR;
- LEAVE
- default:
- r = Z_STREAM_ERROR;
- LEAVE
- }
-#ifdef NEED_DUMMY_RETURN
- return Z_STREAM_ERROR; /* Some dumb compilers complain without this */
-#endif
-}
-#endif
-
-#ifndef __APPLE__
-void inflate_codes_free(inflate_codes_statef *c, z_streamp z)
-{
- ZFREE(z, c);
- Tracev(("inflate: codes free\n"));
-}
-#endif
-
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#define BASE 65521L /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#undef DO1
-#undef DO2
-#undef DO4
-#undef DO8
-
-#define DO1(buf,i) {s1 += buf[i]; s2 += s1;}
-#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf) DO8(buf,0); DO8(buf,8);
-
-/* ========================================================================= */
-#ifndef __APPLE__
-uLong adler32(uLong adler, const Byte *buf, uInt len)
-{
- unsigned long s1 = adler & 0xffff;
- unsigned long s2 = (adler >> 16) & 0xffff;
- int k;
-
- if (buf == Z_NULL) return 1L;
-
- while (len > 0) {
- k = len < NMAX ? len : NMAX;
- len -= k;
- while (k >= 16) {
- DO16(buf);
- buf += 16;
- k -= 16;
- }
- if (k != 0) do {
- s1 += *buf++;
- s2 += s1;
- } while (--k);
- s1 %= BASE;
- s2 %= BASE;
- }
- return (s2 << 16) | s1;
-}
-#endif
-
-
/* infblock.h -- header to use infblock.c
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*blocks; /* current inflate_blocks state */
};
-
-
-#ifndef __APPLE__
-int inflateReset(z_streamp z)
-{
- if (z == Z_NULL || z->state == Z_NULL)
- return Z_STREAM_ERROR;
- z->total_in = z->total_out = 0;
- z->msg = Z_NULL;
- z->state->mode = z->state->nowrap ? imBLOCKS : imMETHOD;
- inflate_blocks_reset(z->state->blocks, z, Z_NULL);
- Tracev(("inflate: reset\n"));
- return Z_OK;
-}
-#endif
-
-#ifndef __APPLE__
-int inflateEnd(z_streamp z)
-{
- if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
- return Z_STREAM_ERROR;
- if (z->state->blocks != Z_NULL)
- inflate_blocks_free(z->state->blocks, z);
- ZFREE(z, z->state);
- z->state = Z_NULL;
- Tracev(("inflate: end\n"));
- return Z_OK;
-}
-#endif
-
-#ifndef __APPLE__
-int inflateInit2_(z_streamp z, int w, const char *version, int stream_size)
-{
- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
- stream_size != sizeof(z_stream))
- return Z_VERSION_ERROR;
-
- /* initialize state */
- if (z == Z_NULL)
- return Z_STREAM_ERROR;
- z->msg = Z_NULL;
- if (z->zalloc == Z_NULL)
- {
- z->zalloc = (void *(*)(void *, unsigned, unsigned))zcalloc;
- z->opaque = (voidp)0;
- }
- if (z->zfree == Z_NULL) z->zfree = (void (*)(void *, void *))zcfree;
- if ((z->state = (struct internal_state *)
- ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)
- return Z_MEM_ERROR;
- z->state->blocks = Z_NULL;
-
- /* handle undocumented nowrap option (no zlib header or check) */
- z->state->nowrap = 0;
- if (w < 0)
- {
- w = - w;
- z->state->nowrap = 1;
- }
-
- /* set window size */
- if (w < 8 || w > 15)
- {
- inflateEnd(z);
- return Z_STREAM_ERROR;
- }
- z->state->wbits = (uInt)w;
-
- /* create inflate_blocks state */
- if ((z->state->blocks =
- inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w))
- == Z_NULL)
- {
- inflateEnd(z);
- return Z_MEM_ERROR;
- }
- Tracev(("inflate: allocated\n"));
-
- /* reset state */
- inflateReset(z);
- return Z_OK;
-}
-#endif
-
-#ifndef __APPLE__
-int inflateInit_(z_streamp z, const char *version, int stream_size)
-{
- return inflateInit2_(z, DEF_WBITS, version, stream_size);
-}
-#endif
-
-#define iNEEDBYTE {if(z->avail_in==0)return r;r=f;}
-#define iNEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
-
-#ifndef __APPLE__
-int inflate(z_streamp z, int f)
-{
- int r;
- uInt b;
-
- if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL)
- return Z_STREAM_ERROR;
- f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;
- r = Z_BUF_ERROR;
- while (1) switch (z->state->mode)
- {
- case imMETHOD:
- iNEEDBYTE
- if (((z->state->sub.method = iNEXTBYTE) & 0xf) != Z_DEFLATED)
- {
- z->state->mode = imBAD;
- z->msg = (char*)"unknown compression method";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- if ((z->state->sub.method >> 4) + 8 > z->state->wbits)
- {
- z->state->mode = imBAD;
- z->msg = (char*)"invalid window size";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- z->state->mode = imFLAG;
- case imFLAG:
- iNEEDBYTE
- b = iNEXTBYTE;
- if (((z->state->sub.method << 8) + b) % 31)
- {
- z->state->mode = imBAD;
- z->msg = (char*)"incorrect header check";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- Tracev(("inflate: zlib header ok\n"));
- if (!(b & PRESET_DICT))
- {
- z->state->mode = imBLOCKS;
- break;
- }
- z->state->mode = imDICT4;
- case imDICT4:
- iNEEDBYTE
- z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
- z->state->mode = imDICT3;
- case imDICT3:
- iNEEDBYTE
- z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
- z->state->mode = imDICT2;
- case imDICT2:
- iNEEDBYTE
- z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
- z->state->mode = imDICT1;
- case imDICT1:
- iNEEDBYTE
- z->state->sub.check.need += (uLong)iNEXTBYTE;
- z->adler = z->state->sub.check.need;
- z->state->mode = imDICT0;
- return Z_NEED_DICT;
- case imDICT0:
- z->state->mode = imBAD;
- z->msg = (char*)"need dictionary";
- z->state->sub.marker = 0; /* can try inflateSync */
- return Z_STREAM_ERROR;
- case imBLOCKS:
- r = inflate_blocks(z->state->blocks, z, r);
- if (r == Z_DATA_ERROR)
- {
- z->state->mode = imBAD;
- z->state->sub.marker = 0; /* can try inflateSync */
- break;
- }
- if (r == Z_OK)
- r = f;
- if (r != Z_STREAM_END)
- return r;
- r = f;
- inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);
- if (z->state->nowrap)
- {
- z->state->mode = imDONE;
- break;
- }
- z->state->mode = imCHECK4;
- case imCHECK4:
- iNEEDBYTE
- z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
- z->state->mode = imCHECK3;
- case imCHECK3:
- iNEEDBYTE
- z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
- z->state->mode = imCHECK2;
- case imCHECK2:
- iNEEDBYTE
- z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
- z->state->mode = imCHECK1;
- case imCHECK1:
- iNEEDBYTE
- z->state->sub.check.need += (uLong)iNEXTBYTE;
-
- if (z->state->sub.check.was != z->state->sub.check.need)
- {
- z->state->mode = imBAD;
- z->msg = (char*)"incorrect data check";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- Tracev(("inflate: zlib check ok\n"));
- z->state->mode = imDONE;
- case imDONE:
- return Z_STREAM_END;
- case imBAD:
- return Z_DATA_ERROR;
- default:
- return Z_STREAM_ERROR;
- }
-#ifdef NEED_DUMMY_RETURN
- return Z_STREAM_ERROR; /* Some dumb compilers complain without this */
-#endif
-}
-#endif
-
-#ifndef __APPLE__
-int inflateSetDictionary(z_streamp z, const Byte *dictionary, uInt dictLength)
-{
- uInt length = dictLength;
-
- if (z == Z_NULL || z->state == Z_NULL || z->state->mode != imDICT0)
- return Z_STREAM_ERROR;
-
- if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR;
- z->adler = 1L;
-
- if (length >= ((uInt)1<<z->state->wbits))
- {
- length = (1<<z->state->wbits)-1;
- dictionary += dictLength - length;
- }
- inflate_set_dictionary(z->state->blocks, dictionary, length);
- z->state->mode = imBLOCKS;
- return Z_OK;
-}
-#endif
-
-#ifndef __APPLE__
-int inflateSync(z_streamp z)
-{
- uInt n; /* number of bytes to look at */
- Byte *p; /* pointer to bytes */
- uInt m; /* number of marker bytes found in a row */
- uLong r, w; /* temporaries to save total_in and total_out */
-
- /* set up */
- if (z == Z_NULL || z->state == Z_NULL)
- return Z_STREAM_ERROR;
- if (z->state->mode != imBAD)
- {
- z->state->mode = imBAD;
- z->state->sub.marker = 0;
- }
- if ((n = z->avail_in) == 0)
- return Z_BUF_ERROR;
- p = z->next_in;
- m = z->state->sub.marker;
-
- /* search */
- while (n && m < 4)
- {
- static const Byte mark[4] = {0, 0, 0xff, 0xff};
- if (*p == mark[m])
- m++;
- else if (*p)
- m = 0;
- else
- m = 4 - m;
- p++, n--;
- }
-
- /* restore */
- z->total_in += p - z->next_in;
- z->next_in = p;
- z->avail_in = n;
- z->state->sub.marker = m;
-
- /* return no joy or set up to restart on a new block */
- if (m != 4)
- return Z_DATA_ERROR;
- r = z->total_in; w = z->total_out;
- inflateReset(z);
- z->total_in = r; z->total_out = w;
- z->state->mode = imBLOCKS;
- return Z_OK;
-}
-#endif
-
-/* Returns true if inflate is currently at the end of a block generated
- * by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
- * implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH
- * but removes the length bytes of the resulting empty stored block. When
- * decompressing, PPP checks that at the end of input packet, inflate is
- * waiting for these length bytes.
- */
-#ifndef __APPLE__
-int inflateSyncPoint(z_streamp z)
-{
- if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL)
- return Z_STREAM_ERROR;
- return inflate_blocks_sync_point(z->state->blocks);
-}
-#endif
-
-#ifndef __APPLE__
-voidp zcalloc (voidp opaque, unsigned items, unsigned size)
-{
- if (opaque) items += size - size; /* make compiler happy */
- return (voidp)safe_malloc(items*size);
-}
-
-void zcfree (voidp opaque, voidp ptr)
-{
- free(ptr);
- if (opaque) return; /* make compiler happy */
-}
-#endif
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <zlib.h>
#if defined( STRICTUNZIP ) || defined( STRICTZIPUNZIP )
/* like the STRICT of WIN32, we define a pointer that cannot be converted
struct internal_state;
-typedef struct z_stream_s {
- unsigned char *next_in; /* next input unsigned char */
- unsigned int avail_in; /* number of unsigned chars available at next_in */
- unsigned long total_in; /* total nb of input unsigned chars read so */
-
- unsigned char *next_out; /* next output unsigned char should be put there */
- unsigned int avail_out; /* remaining free space at next_out */
- unsigned long total_out; /* total nb of unsigned chars output so */
-
- char *msg; /* last error message, NULL if no error */
- struct internal_state *state; /* not visible by applications */
-
- alloc_func zalloc; /* used to allocate the internal state */
- free_func zfree; /* used to free the internal state */
- unsigned char* opaque; /* private data object passed to zalloc and zfree */
-
- int data_type; /* best guess about the data type: ascii or binary */
- unsigned long adler; /* adler32 value of the uncompressed data */
- unsigned long reserved; /* reserved for future use */
-} z_stream;
-
-typedef z_stream *z_streamp;
-
-
/* file_in_zip_read_info_s contain internal information about a file in zipfile,
when reading and decompress it */
typedef struct
{
char *ext = strrchr( dirlist, '.' );
- if ( ext && !Q_stricmp( ext, ".pk3dir" ) ) {
+ if ( ext && ( !Q_stricmp( ext, ".pk3dir" ) || !Q_stricmp( ext, ".dpkdir" ) ) ) {
if ( g_numDirs == VFS_MAXDIRS ) {
continue;
}
++g_numDirs;
}
- if ( ( ext == NULL ) || ( Q_stricmp( ext, ".pk3" ) != 0 ) ) {
+ if ( ( ext == NULL ) || ( Q_stricmp( ext, ".pk3" ) != 0 || !Q_stricmp( ext, ".dpk" ) != 0 ) ) {
continue;
}
}
{
/* round to integer */
ai = Q_rint( a[ i ] );
- bi = Q_rint( a[ i ] );
+ bi = Q_rint( b[ i ] );
/* prefer exact integer */
if ( ai == a[ i ] ) {
}
/* use nearest */
- else if ( fabs( ai - a[ i ] ) < fabs( bi < b[ i ] ) ) {
+ else if ( fabs( ai - a[ i ] ) < fabs( bi - b[ i ] ) ) {
out[ i ] = a[ i ];
}
else{
/* get the model num */
value3 = ValueForKey( &entities[ j ], "model" );
if ( value3[ 0 ] == '\0' ) {
- Sys_Printf( "WARNING: Cloned entity %s referenced entity without model\n", value2 );
+ Sys_FPrintf( SYS_WRN, "WARNING: Cloned entity %s referenced entity without model\n", value2 );
continue;
}
models = atoi( &value2[ 1 ] );
else if ( !strcmp( argv[ i ], "-bsp" ) ) {
Sys_Printf( "-bsp argument unnecessary\n" );
}
- else
- {
- Sys_Printf( "WARNING: Unknown option \"%s\"\n", argv[ i ] );
+ else{
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown option \"%s\"\n", argv[ i ] );
}
}
bspDrawSurfaces = safe_malloc_info( sizeof( bspDrawSurface_t ) * numBSPDrawSurfacesBuffer, "IncDrawSurfaces" );
- memset( bspDrawSurfaces, 0, MAX_MAP_DRAW_SURFS * sizeof( bspDrawVert_t ) );
+ memset( bspDrawSurfaces, 0, MAX_MAP_DRAW_SURFS * sizeof( bspDrawSurface_t ) );
}
void SetDrawSurfaces( int n ){
bspDrawSurfaces = safe_malloc_info( sizeof( bspDrawSurface_t ) * numBSPDrawSurfacesBuffer, "IncDrawSurfaces" );
- memset( bspDrawSurfaces, 0, n * sizeof( bspDrawVert_t ) );
+ memset( bspDrawSurfaces, 0, n * sizeof( bspDrawSurface_t ) );
}
void BSPFilesCleanup(){
/* check for odd size */
if ( header->lumps[ lump ].length % size ) {
if ( force ) {
- Sys_Printf( "WARNING: GetLumpElements: odd lump size (%d) in lump %d\n", header->lumps[ lump ].length, lump );
+ Sys_FPrintf( SYS_WRN, "WARNING: GetLumpElements: odd lump size (%d) in lump %d\n", header->lumps[ lump ].length, lump );
return 0;
}
else{
}
if ( length % size ) {
if ( force ) {
- Sys_Printf( "WARNING: CopyLump: odd lump size (%d) in lump %d\n", length, lump );
+ Sys_FPrintf( SYS_WRN, "WARNING: CopyLump: odd lump size (%d) in lump %d\n", length, lump );
return 0;
}
else{
gets a 3-element vector value for an entity key
*/
-void GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec ){
+qboolean GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec ){
const char *k;
double v1, v2, v3;
vec[ 0 ] = v1;
vec[ 1 ] = v2;
vec[ 2 ] = v3;
+
+ /* true if the key is found, false otherwise */
+ return strlen( k );
}
fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->lightmapNum[0] + deluxemap );
}
else{
- Sys_Printf( "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] + deluxemap );
+ Sys_FPrintf( SYS_WRN, "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] + deluxemap );
}
}
else{
/* get shader */
si = ShaderInfoForShader( shader->shader );
if ( si == NULL ) {
- Sys_Printf( "WARNING: NULL shader in BSP\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: NULL shader in BSP\n" );
return;
}
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" );
objLastShaderNum = ds->lightmapNum[0] + deluxemap;
}
if ( ds->lightmapNum[0] + (int)deluxemap < firstLightmap ) {
- Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
+ Sys_FPrintf( SYS_WRN, "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
firstLightmap = ds->lightmapNum[0] + deluxemap;
}
if ( ds->lightmapNum[0] > lastLightmap ) {
- Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
+ Sys_FPrintf( SYS_WRN, "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
lastLightmap = ds->lightmapNum[0] + deluxemap;
}
}
/* get shader */
si = ShaderInfoForShader( shader->shader );
if ( si == NULL ) {
- Sys_Printf( "WARNING: NULL shader in BSP\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: NULL shader in BSP\n" );
return;
}
/* limit check */
if ( numProjectors >= MAX_PROJECTORS ) {
- Sys_Printf( "WARNING: MAX_PROJECTORS (%d) exceeded, no more decal projectors available.\n", MAX_PROJECTORS );
+ Sys_FPrintf( SYS_WRN, "WARNING: MAX_PROJECTORS (%d) exceeded, no more decal projectors available.\n", MAX_PROJECTORS );
return -2;
}
/* any patches? */
if ( e->patches == NULL ) {
- Sys_Printf( "WARNING: Decal entity without any patch meshes, ignoring.\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Decal entity without any patch meshes, ignoring.\n" );
e->epairs = NULL; /* fixme: leak! */
continue;
}
/* no target? */
if ( e2 == NULL ) {
- Sys_Printf( "WARNING: Decal entity without a valid target, ignoring.\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Decal entity without a valid target, ignoring.\n" );
continue;
}
/* sanity check */
if ( bspEntData == NULL || bspEntDataSize == 0 ) {
- Sys_Printf( "WARNING: No BSP entity data. aborting...\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: No BSP entity data. aborting...\n" );
return;
}
8, /* default patchMeta subdivisions tolerance */
qfalse, /* patch casting enabled */
qfalse, /* compile deluxemaps */
- 1, /* deluxemaps default mode */
+ 0, /* deluxemaps default mode */
512, /* minimap size */
1.0f, /* minimap sharpener */
0.0f, /* minimap border */
qtrue, /* minimap keep aspect */
- MINIMAP_MODE_BLACK, /* minimap mode */
+ MINIMAP_MODE_WHITE, /* minimap mode */
"../minimaps/%s.tga", /* minimap name format */
"IBSP", /* bsp file prefix */
46, /* bsp file version */
/* get dds info */
if ( DDSGetInfo( (ddsBuffer_t*) buffer, &w, &h, &pf ) ) {
- Sys_Printf( "WARNING: Invalid DDS texture\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Invalid DDS texture\n" );
return;
}
/* only certain types of dds textures are supported */
if ( pf != DDS_PF_ARGB8888 && pf != DDS_PF_DXT1 && pf != DDS_PF_DXT3 && pf != DDS_PF_DXT5 ) {
- Sys_Printf( "WARNING: Only DDS texture formats ARGB8888, DXT1, DXT3, and DXT5 are supported (%d)\n", pf );
+ Sys_FPrintf( SYS_WRN, "WARNING: Only DDS texture formats ARGB8888, DXT1, DXT3, and DXT5 are supported (%d)\n", pf );
return;
}
/* determine if this is a png file */
if ( png_sig_cmp( buffer, 0, 8 ) != 0 ) {
- Sys_Printf( "WARNING: Invalid PNG file\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Invalid PNG file\n" );
return;
}
/* create png structs */
png = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
if ( png == NULL ) {
- Sys_Printf( "WARNING: Unable to create PNG read struct\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unable to create PNG read struct\n" );
return;
}
info = png_create_info_struct( png );
if ( info == NULL ) {
- Sys_Printf( "WARNING: Unable to create PNG info struct\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unable to create PNG info struct\n" );
png_destroy_read_struct( &png, NULL, NULL );
return;
}
end = png_create_info_struct( png );
if ( end == NULL ) {
- Sys_Printf( "WARNING: Unable to create PNG end info struct\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unable to create PNG end info struct\n" );
png_destroy_read_struct( &png, &info, NULL );
return;
}
/* set error longjmp */
if ( setjmp( png_jmpbuf(png) ) ) {
- Sys_Printf( "WARNING: An error occurred reading PNG image\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: An error occurred reading PNG image\n" );
png_destroy_read_struct( &png, &info, &end );
return;
}
if ( size > 0 ) {
if ( LoadJPGBuff( buffer, size, &image->pixels, &image->width, &image->height ) == -1 && image->pixels != NULL ) {
// On error, LoadJPGBuff might store a pointer to the error message in image->pixels
- Sys_Printf( "WARNING: LoadJPGBuff %s %s\n", name, (unsigned char*) image->pixels );
+ Sys_FPrintf( SYS_WRN, "WARNING: LoadJPGBuff: %s\n", (unsigned char*) image->pixels );
}
alphaHack = qtrue;
}
if ( LoadJPGBuff( buffer, size, &pixels, &width, &height ) == -1 ) {
if (pixels) {
// On error, LoadJPGBuff might store a pointer to the error message in pixels
- Sys_Printf( "WARNING: LoadJPGBuff %s %s\n", name, (unsigned char*) pixels );
+ Sys_FPrintf( SYS_WRN, "WARNING: LoadJPGBuff %s %s\n", name, (unsigned char*) pixels );
}
} else {
if ( width == image->width && height == image->height ) {
/* get target */
e2 = FindTargetEntity( target );
if ( e2 == NULL ) {
- Sys_Printf( "WARNING: light at (%i %i %i) has missing target\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: light at (%i %i %i) has missing target\n",
(int) light->origin[ 0 ], (int) light->origin[ 1 ], (int) light->origin[ 2 ] );
light->photons *= pointScale;
}
SetupEnvelopes( qfalse, fastbounce );
if ( numLights == 0 ) {
Sys_Printf( "No diffuse light to calculate, ending radiosity.\n" );
- break;
+ return;
}
/* add to lightgrid */
bounce--;
b++;
}
+ /* ydnar: store off lightmaps */
+ StoreSurfaceLightmaps( fastAllocate );
}
/* must be a power of 2 and greater than 2 */
if ( ( ( lmCustomSize - 1 ) & lmCustomSize ) || lmCustomSize < 2 ) {
- Sys_Printf( "WARNING: Lightmap size must be a power of 2, greater or equal to 2 pixels.\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Lightmap size must be a power of 2, greater or equal to 2 pixels.\n" );
lmCustomSize = game->lightmapSize;
}
i++;
/* unhandled args */
else
{
- Sys_Printf( "WARNING: Unknown argument \"%s\"\n", argv[ i ] );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown argument \"%s\"\n", argv[ i ] );
}
}
/* light the world */
LightWorld( BSPFilePath, fastAllocate );
- /* ydnar: store off lightmaps */
- StoreSurfaceLightmaps( fastAllocate );
-
/* write out the bsp */
UnparseEntities();
Sys_Printf( "Writing %s\n", BSPFilePath );
origin2 = SUPER_ORIGIN( x, y );
//% normal2 = SUPER_NORMAL( x, y );
}
- else
- {
- Error( "Spurious lightmap S vector\n" );
+ else{
+ Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap S vector\n" );
}
VectorSubtract( origin2, origin, originVecs[ 0 ] );
//% normal2 = SUPER_NORMAL( x, y );
}
else{
- Sys_Printf( "WARNING: Spurious lightmap T vector\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap T vector\n" );
}
VectorSubtract( origin2, origin, originVecs[ 1 ] );
/* max of MAX_LIGHTMAPS (4) styles allowed to hit a surface/lightmap */
if ( lightmapNum >= MAX_LIGHTMAPS ) {
- Sys_Printf( "WARNING: Hit per-surface style limit (%d)\n", MAX_LIGHTMAPS );
+ Sys_FPrintf( SYS_WRN, "WARNING: Hit per-surface style limit (%d)\n", MAX_LIGHTMAPS );
continue;
}
}
/* set luxel filter radius */
- luxelFilterRadius = superSample * filterRadius / lm->sampleSize;
+ luxelFilterRadius = lm->sampleSize != 0 ? superSample * filterRadius / lm->sampleSize : 0;
if ( luxelFilterRadius == 0 && ( filterRadius > 0.0f || filter ) ) {
luxelFilterRadius = 1;
}
for ( i = 0; i < 3; i++ )
{
if ( mins[ i ] > light->origin[ i ] || maxs[ i ] < light->origin[ i ] ) {
- //% Sys_Printf( "WARNING: Light PVS bounds (%.0f, %.0f, %.0f) -> (%.0f, %.0f, %.0f)\ndo not encompass light %d (%f, %f, %f)\n",
+ //% Sys_FPrintf( SYS_WRN, "WARNING: Light PVS bounds (%.0f, %.0f, %.0f) -> (%.0f, %.0f, %.0f)\ndo not encompass light %d (%f, %f, %f)\n",
//% mins[ 0 ], mins[ 1 ], mins[ 2 ],
//% maxs[ 0 ], maxs[ 1 ], maxs[ 2 ],
//% numLights, light->origin[ 0 ], light->origin[ 1 ], light->origin[ 2 ] );
/* sanity check */
if ( bspLightBytes == NULL ) {
- Sys_Printf( "WARNING: No BSP lightmap data\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: No BSP lightmap data\n" );
return;
}
buffer = NULL;
len = vfsLoadFile( filename, (void*) &buffer, -1 );
if ( len < 0 ) {
- Sys_Printf( "WARNING: Unable to load image %s\n", filename );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unable to load image %s\n", filename );
continue;
}
/* sanity check it */
if ( pixels == NULL ) {
- Sys_Printf( "WARNING: Unable to load image %s\n", filename );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unable to load image %s\n", filename );
continue;
}
if ( width != game->lightmapSize || height != game->lightmapSize ) {
- Sys_Printf( "WARNING: Image %s is not the right size (%d, %d) != (%d, %d)\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: Image %s is not the right size (%d, %d) != (%d, %d)\n",
filename, width, height, game->lightmapSize, game->lightmapSize );
}
length = 0;
for ( x = 0; x < ( mesh->width - 1 ); x++ )
length += widthTable[ x ];
- lm->w = ceil( length / lm->sampleSize ) + 1;
+ lm->w = lm->sampleSize != 0 ? ceil( length / lm->sampleSize ) + 1 : 0;
if ( lm->w < ds->patchWidth ) {
lm->w = ds->patchWidth;
}
length = 0;
for ( y = 0; y < ( mesh->height - 1 ); y++ )
length += heightTable[ y ];
- lm->h = ceil( length / lm->sampleSize ) + 1;
+ lm->h = lm->sampleSize != 0 ? ceil( length / lm->sampleSize ) + 1 : 0;
if ( lm->h < ds->patchHeight ) {
lm->h = ds->patchHeight;
}
/* check for bogus axis */
if ( faxis[ axisNum ] == 0.0f ) {
- Sys_Printf( "WARNING: ProjectSurfaceLightmap: Chose a 0 valued axis\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: ProjectSurfaceLightmap: Chose a 0 valued axis\n" );
lm->w = lm->h = 0;
return qfalse;
}
superSample = 1;
}
else if ( superSample > 8 ) {
- Sys_Printf( "WARNING: Insane supersampling amount (%d) detected.\n", superSample );
+ Sys_FPrintf( SYS_WRN, "WARNING: Insane supersampling amount (%d) detected.\n", superSample );
superSample = 8;
}
/* vlight */
else if ( !strcmp( argv[ 1 ], "-vlight" ) ) {
- Sys_Printf( "WARNING: VLight is no longer supported, defaulting to -light -fast instead\n\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: VLight is no longer supported, defaulting to -light -fast instead\n\n" );
argv[ 1 ] = "-fast"; /* eek a hack */
r = LightMain( argc, argv );
}
value = ValueForKey( e, "layers" );
}
if ( value[ 0 ] == '\0' ) {
- Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" has missing \"_layers\" or \"layers\" key\n", indexMapFilename );
+ Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" has missing \"_layers\" or \"layers\" key\n", indexMapFilename );
Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" );
return;
}
numLayers = atoi( value );
if ( numLayers < 1 ) {
- Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" has < 1 layer (%d)\n", indexMapFilename, numLayers );
+ Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" has < 1 layer (%d)\n", indexMapFilename, numLayers );
Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" );
return;
}
value = ValueForKey( e, "shader" );
}
if ( value[ 0 ] == '\0' ) {
- Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" has missing \"_shader\" or \"shader\" key\n", indexMapFilename );
+ Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" has missing \"_shader\" or \"shader\" key\n", indexMapFilename );
Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" );
return;
}
/* the index map must be at least 2x2 pixels */
if ( w < 2 || h < 2 ) {
- Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" is smaller than 2x2 pixels\n", indexMapFilename );
+ Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" is smaller than 2x2 pixels\n", indexMapFilename );
Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" );
free( pixels );
return;
/* conformance check */
if ( strcmp( token, "{" ) ) {
- Sys_Printf( "WARNING: ParseEntity: { not found, found %s on line %d - last entity was at: <%4.2f, %4.2f, %4.2f>...\n"
+ Sys_FPrintf( SYS_WRN, "WARNING: ParseEntity: { not found, found %s on line %d - last entity was at: <%4.2f, %4.2f, %4.2f>...\n"
"Continuing to process map, but resulting BSP may be invalid.\n",
token, scriptline, entities[ numEntities ].origin[ 0 ], entities[ numEntities ].origin[ 1 ], entities[ numEntities ].origin[ 2 ] );
return qfalse;
{
/* get initial token */
if ( !GetToken( qtrue ) ) {
- Sys_Printf( "WARNING: ParseEntity: EOF without closing brace\n"
+ Sys_FPrintf( SYS_WRN, "WARNING: ParseEntity: EOF without closing brace\n"
"Continuing to process map, but resulting BSP may be invalid.\n" );
return qfalse;
}
}
else if ( !strcmp( token, "terrainDef" ) ) {
//% ParseTerrain();
- Sys_Printf( "WARNING: Terrain entity parsing not supported in this build.\n" ); /* ydnar */
+ Sys_FPrintf( SYS_WRN, "WARNING: Terrain entity parsing not supported in this build.\n" ); /* ydnar */
}
else if ( !strcmp( token, "brushDef" ) ) {
if ( g_bBrushPrimit == BPRIMIT_OLDBRUSHES ) {
/* get brush counts */
numMapBrushes = CountBrushList( entities[ 0 ].brushes );
if ( (float) c_detail / (float) numMapBrushes < 0.10f && numMapBrushes > 500 ) {
- Sys_Printf( "WARNING: Over 90 percent structural map detected. Compile time may be adversely affected.\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Over 90 percent structural map detected. Compile time may be adversely affected.\n" );
}
/* emit some statistics */
break;
case PICO_WARNING:
- Sys_Printf( "WARNING: %s\n", str );
+ Sys_FPrintf( SYS_WRN, "WARNING: %s\n", str );
break;
case PICO_ERROR:
- Sys_Printf( "ERROR: %s\n", str );
+ Sys_FPrintf( SYS_ERR, "ERROR: %s\n", str );
break;
case PICO_FATAL:
/* get model name */
model = ValueForKey( e2, "model" );
if ( model[ 0 ] == '\0' ) {
- Sys_Printf( "WARNING: misc_model at %i %i %i without a model key\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: misc_model at %i %i %i without a model key\n",
(int) origin[ 0 ], (int) origin[ 1 ], (int) origin[ 2 ] );
continue;
}
/* split the string */
split = strchr( remap->from, ';' );
if ( split == NULL ) {
- Sys_Printf( "WARNING: Shader _remap key found in misc_model without a ; character\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Shader _remap key found in misc_model without a ; character\n" );
free( remap );
remap = remap2;
continue;
CalcNodeBounds( node );
if ( node->mins[0] >= node->maxs[0] ) {
- Sys_Printf( "WARNING: node without a volume\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: node without a volume\n" );
Sys_Printf( "node has %d tiny portals\n", node->tinyportals );
Sys_Printf( "node reference point %1.2f %1.2f %1.2f\n", node->referencepoint[0],
node->referencepoint[1],
int FloodEntities( tree_t *tree ){
int i, s;
vec3_t origin, offset, scale, angles;
- qboolean r, inside, skybox;
+ qboolean r, inside, skybox, found;
node_t *headnode;
entity_t *e, *tripped;
const char *value;
e = &entities[ i ];
/* get origin */
- GetVectorForKey( e, "origin", origin );
+ found = GetVectorForKey( e, "origin", origin );
/* as a special case, allow origin-less entities */
- if ( VectorCompare( origin, vec3_origin ) ) {
+ if ( !found ) {
continue;
}
// note the current area as bounding the portal
if ( b->portalareas[ 1 ] != -1 ) {
- Sys_Printf( "WARNING: areaportal brush %i touches > 2 areas\n", b->brushNum );
+ Sys_FPrintf( SYS_WRN, "WARNING: areaportal brush %i touches > 2 areas\n", b->brushNum );
return;
}
if ( b->portalareas[ 0 ] != -1 ) {
if ( node->cluster != -1 ) {
if ( node->area == -1 ) {
- Sys_Printf( "WARNING: cluster %d has area set to -1\n", node->cluster );
+ Sys_FPrintf( SYS_WRN, "WARNING: cluster %d has area set to -1\n", node->cluster );
}
}
if ( node->areaportal ) {
// check if the areaportal touches two areas
if ( b->portalareas[0] == -1 || b->portalareas[1] == -1 ) {
- Sys_Printf( "WARNING: areaportal brush %i doesn't touch two areas\n", b->brushNum );
+ Sys_FPrintf( SYS_WRN, "WARNING: areaportal brush %i doesn't touch two areas\n", b->brushNum );
}
}
}
const char *ValueForKey( const entity_t *ent, const char *key );
int IntForKey( const entity_t *ent, const char *key );
vec_t FloatForKey( const entity_t *ent, const char *key );
-void GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec );
+qboolean GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec );
entity_t *FindTargetEntity( const char *target );
void GetEntityShadowFlags( const entity_t *ent, const entity_t *ent2, int *castShadows, int *recvShadows );
void InjectCommandLine( char **argv, int beginArgs, int endArgs );
/* open shader file */
file = fopen( mapShaderFile, "w" );
if ( file == NULL ) {
- Sys_Printf( "WARNING: Unable to open map shader file %s for writing\n", mapShaderFile );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unable to open map shader file %s for writing\n", mapShaderFile );
return;
}
if ( si->shaderImage == NULL ) {
si->shaderImage = ImageLoad( DEFAULT_IMAGE );
if ( warnImage && strcmp( si->shader, "noshader" ) ) {
- Sys_Printf( "WARNING: Couldn't find image for shader %s\n", si->shader );
+ Sys_FPrintf( SYS_WRN, "WARNING: Couldn't find image for shader %s\n", si->shader );
}
}
/* dummy check */
if ( shaderName == NULL || shaderName[ 0 ] == '\0' ) {
- Sys_Printf( "WARNING: Null or empty shader name\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Null or empty shader name\n" );
shaderName = "missing";
}
/* increase deprecation depth */
deprecationDepth++;
if ( deprecationDepth == MAX_SHADER_DEPRECATION_DEPTH ) {
- Sys_Printf( "WARNING: Max deprecation depth of %i is reached on shader '%s'\n", MAX_SHADER_DEPRECATION_DEPTH, shader );
+ Sys_FPrintf( SYS_WRN, "WARNING: Max deprecation depth of %i is reached on shader '%s'\n", MAX_SHADER_DEPRECATION_DEPTH, shader );
}
/* search again from beginning */
i = -1;
else if ( !Q_stricmp( token, "surfaceparm" ) ) {
GetTokenAppend( shaderText, qfalse );
if ( ApplySurfaceParm( token, &si->contentFlags, &si->surfaceFlags, &si->compileFlags ) == qfalse ) {
- Sys_Printf( "WARNING: Unknown surfaceparm: \"%s\"\n", token );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown surfaceparm: \"%s\"\n", token );
}
}
}
else
{
- Sys_Printf( "WARNING: Unknown value for lightmap axis: %s\n", token );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown value for lightmap axis: %s\n", token );
VectorClear( si->lightmapAxis );
}
}
/* must be a power of 2 */
if ( ( ( si->lmCustomWidth - 1 ) & si->lmCustomWidth ) ||
( ( si->lmCustomHeight - 1 ) & si->lmCustomHeight ) ) {
- Sys_Printf( "WARNING: Non power-of-two lightmap size specified (%d, %d)\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: Non power-of-two lightmap size specified (%d, %d)\n",
si->lmCustomWidth, si->lmCustomHeight );
si->lmCustomWidth = lmCustomSize;
si->lmCustomHeight = lmCustomSize;
}
else
{
- Sys_Printf( "WARNING: Unknown q3map_tcGen method: %s\n", token );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown q3map_tcGen method: %s\n", token );
VectorClear( si->vecs[ 0 ] );
VectorClear( si->vecs[ 1 ] );
}
/* unknown */
else{
- Sys_Printf( "WARNING: Unknown colorMod method: %s\n", token );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown colorMod method: %s\n", token );
}
}
TCModRotate( si->mod, a );
}
else{
- Sys_Printf( "WARNING: Unknown q3map_tcMod method: %s\n", token );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown q3map_tcMod method: %s\n", token );
}
}
GetTokenAppend( shaderText, qfalse );
sprintf( temp, "*mat_%s", token );
if ( ApplySurfaceParm( temp, &si->contentFlags, &si->surfaceFlags, &si->compileFlags ) == qfalse ) {
- Sys_Printf( "WARNING: Unknown material \"%s\"\n", token );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown material \"%s\"\n", token );
}
}
{
Sys_FPrintf( SYS_VRB, "Attempting to match %s with a known surfaceparm\n", token );
if ( ApplySurfaceParm( &token[ 6 ], &si->contentFlags, &si->surfaceFlags, &si->compileFlags ) == qfalse ) {
- Sys_Printf( "WARNING: Unknown q3map_* directive \"%s\"\n", token );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown q3map_* directive \"%s\"\n", token );
}
}
#endif
/* any content? */
if ( !parsedContent ) {
- Sys_Printf( "WARNING: Couldn't find valid custom contentsflag section\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Couldn't find valid custom contentsflag section\n" );
return;
}
/* any content? */
if ( !parsedContent ) {
- Sys_Printf( "WARNING: Couldn't find valid custom surfaceflag section\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: Couldn't find valid custom surfaceflag section\n" );
}
}
if ( fabs( dist ) > PLANAR_EPSILON ) {
//% if( ds->planeNum >= 0 )
//% {
- //% Sys_Printf( "WARNING: Planar surface marked unplanar (%f > %f)\n", fabs( dist ), PLANAR_EPSILON );
+ //% Sys_FPrintf( SYS_WRN, "WARNING: Planar surface marked unplanar (%f > %f)\n", fabs( dist ), PLANAR_EPSILON );
//% ds->verts[ i ].color[ 0 ][ 0 ] = ds->verts[ i ].color[ 0 ][ 2 ] = 0;
//% }
ds->planar = qfalse;
ds->planeNum = -1;
VectorClear( ds->lightmapVecs[ 2 ] );
//% if( ds->type == SURF_META || ds->type == SURF_FACE )
- //% Sys_Printf( "WARNING: Non-planar face (%d): %s\n", ds->planeNum, ds->shaderInfo->shader );
+ //% Sys_FPrintf( SYS_WRN, "WARNING: Non-planar face (%d): %s\n", ds->planeNum, ds->shaderInfo->shader );
}
/* -----------------------------------------------------------------
/* spew forth errors */
if ( VectorLength( plane ) < 0.001f ) {
- Sys_Printf( "BOGUS " );
+ Sys_Printf( "DrawSurfaceForMesh: bogus plane\n" );
}
/* test each vert */
si->mins[ 2 ] != 0.0f || si->maxs[ 2 ] != 0.0f ) ) {
static qboolean warned = qfalse;
if ( !warned ) {
- Sys_Printf( "WARNING: this map uses the deformVertexes move hack\n" );
+ Sys_FPrintf( SYS_WRN, "WARNING: this map uses the deformVertexes move hack\n" );
warned = qtrue;
}
/* validate the index */
if ( ds->type != SURFACE_PATCH ) {
if ( bspDrawIndexes[ numBSPDrawIndexes ] < 0 || bspDrawIndexes[ numBSPDrawIndexes ] >= ds->numVerts ) {
- Sys_Printf( "WARNING: %d %s has invalid index %d (%d)\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: %d %s has invalid index %d (%d)\n",
numBSPDrawSurfaces,
ds->shaderInfo->shader,
bspDrawIndexes[ numBSPDrawIndexes ],
bspDrawSurface_t *out;
out = &bspDrawSurfaces[ numBSPDrawSurfaces - 1 ];
if ( out->numVerts == 3 && out->numIndexes > 3 ) {
- Sys_Printf( "\nWARNING: Potentially bad %s surface (%d: %d, %d)\n %s\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: Potentially bad %s surface (%d: %d, %d)\n %s\n",
surfaceTypes[ ds->type ],
numBSPDrawSurfaces - 1, out->numVerts, out->numIndexes, si->shader );
}
Sys_Printf( "Loading %s\n", surfaceFilePath );
size = LoadFile( surfaceFilePath, (void**) &buffer );
if ( size <= 0 ) {
- Sys_Printf( "WARNING: Unable to find surface file %s, using defaults.\n", surfaceFilePath );
+ Sys_FPrintf( SYS_WRN, "WARNING: Unable to find surface file %s, using defaults.\n", surfaceFilePath );
return;
}
( bi == ds->indexes[ i ] && ci == ds->indexes[ i + 2 ] && ai == ds->indexes[ i + 1 ] ) ||
( ci == ds->indexes[ i ] && ai == ds->indexes[ i + 2 ] && bi == ds->indexes[ i + 1 ] ) ) {
/* warn about it */
- Sys_Printf( "WARNING: Flipped triangle: (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f)\n",
+ Sys_FPrintf( SYS_WRN, "WARNING: Flipped triangle: (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f)\n",
ds->verts[ ai ].xyz[ 0 ], ds->verts[ ai ].xyz[ 1 ], ds->verts[ ai ].xyz[ 2 ],
ds->verts[ bi ].xyz[ 0 ], ds->verts[ bi ].xyz[ 1 ], ds->verts[ bi ].xyz[ 2 ],
ds->verts[ ci ].xyz[ 0 ], ds->verts[ ci ].xyz[ 1 ], ds->verts[ ci ].xyz[ 2 ] );
ClearBounds( ds->mins, ds->maxs );
/* clear verts/indexes */
- memset( verts, 0, sizeof( verts ) );
- memset( indexes, 0, sizeof( indexes ) );
+ memset( verts, 0, sizeof( *verts ) * maxSurfaceVerts );
+ memset( indexes, 0, sizeof( *indexes ) * maxSurfaceIndexes );
/* add the first triangle */
if ( AddMetaTriangleToSurface( ds, seed, qfalse ) ) {
numvis++; // count the leaf itself
- //Sys_FPrintf (SYS_VRB,"cluster %4i : %4i visible\n", leafnum, numvis);
+ //Sys_FPrintf( SYS_VRB,"cluster %4i : %4i visible\n", leafnum, numvis );
++clustersizehistogram[numvis];
memcpy( bspVisBytes + VIS_HEADER_SIZE + leafnum * leafbytes, uncompressed, leafbytes );
Sys_Printf( "Use %s as portal file\n", portalFilePath );
}
- else
- {
- Sys_Printf( "WARNING: Unknown option \"%s\"\n", argv[ i ] );
+ else{
+ Sys_FPrintf( SYS_WRN, "WARNING: Unknown option \"%s\"\n", argv[ i ] );
}
}
{
/* something is corrupting brushes */
if ( (size_t) b < 256 ) {
- Sys_Printf( "WARNING: Node brush list corrupted (0x%08X)\n", b );
+ Sys_FPrintf( SYS_WRN, "WARNING: Node brush list corrupted (0x%08X)\n", b );
break;
}
//% if( b->guard != 0xDEADBEEF )