refactor autopk3
unlimit list sizes * -pk3, -repack: support multiple bsp files input by command line
This commit is contained in:
@@ -38,6 +38,13 @@ public:
|
||||
StringFixedSize() {
|
||||
clear();
|
||||
}
|
||||
explicit StringFixedSize( const char* string ){
|
||||
operator()( string );
|
||||
}
|
||||
StringFixedSize( const StringFixedSize& ) = default;
|
||||
StringFixedSize( StringFixedSize&& ) noexcept = default;
|
||||
StringFixedSize& operator=( const StringFixedSize& ) = default;
|
||||
StringFixedSize& operator=( StringFixedSize&& ) noexcept = default;
|
||||
std::size_t write( const char* buffer, std::size_t length ) override {
|
||||
if( m_length + length < SIZE ){
|
||||
for( auto i = length; i != 0; --i )
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -580,16 +580,6 @@ bool entity_t::read_keyvalue_( Vector3& vector3_value, std::initializer_list<con
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool entity_t::read_keyvalue_( char (&string_value)[1024], std::initializer_list<const char*>&& keys ) const {
|
||||
for( const char* key : keys ){
|
||||
const char* value = valueForKey( key );
|
||||
if( !strEmpty( value ) ){
|
||||
strcpy( string_value, value );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool entity_t::read_keyvalue_( const char *&string_ptr_value, std::initializer_list<const char*>&& keys ) const {
|
||||
for( const char* key : keys ){
|
||||
const char* value = valueForKey( key );
|
||||
|
||||
@@ -398,7 +398,7 @@ void HelpMinimap()
|
||||
void HelpPk3()
|
||||
{
|
||||
const std::vector<HelpOption> options = {
|
||||
{"-pk3 [options] <filename.bsp>", "Creates a pk3 for the BSP (complete Q3 support). Using file 'gamename.exclude' to exclude vanilla game resources."},
|
||||
{"-pk3 [options] <filename.bsp .. filenameN.bsp>", "Creates a pk3 for the BSP(s) (complete Q3 support). Using file 'gamename.exclude' to exclude vanilla game resources."},
|
||||
{"-complevel <N>", "Set compression level (-1 .. 10); 0 = uncompressed, -1 = 6, 10 = ultra zlib incompatible preset"},
|
||||
{"-dbg", "Print wall of debug text, useful for .exclude file creation"},
|
||||
{"-png", "include png textures, at highest priority; taking tga, jpg by default"},
|
||||
@@ -410,7 +410,7 @@ void HelpPk3()
|
||||
void HelpRepack()
|
||||
{
|
||||
const std::vector<HelpOption> options = {
|
||||
{"-repack [options] <filename.bsp|filenames.txt>", "Creates repack of BSP(s) (complete Q3 support). Rips off only used shaders to new shader file. Using file 'gamename.exclude' to exclude vanilla game resources and 'repack.exclude' to exclude resources of existing repack."},
|
||||
{"-repack [options] <filename.bsp .. filenameN.bsp|filenames.txt>", "Creates repack of BSP(s) (complete Q3 support). Rips off only used shaders to new shader file. Using file 'gamename.exclude' to exclude vanilla game resources and 'repack.exclude' to exclude resources of existing repack."},
|
||||
{"-analyze", "Only print bsp resource references and exit"},
|
||||
{"-complevel <N>", "Set compression level (-1 .. 10); 0 = uncompressed, -1 = 6, 10 = ultra zlib incompatible preset"},
|
||||
{"-dbg", "Print wall of debug text"},
|
||||
|
||||
@@ -948,7 +948,6 @@ private:
|
||||
bool read_keyvalue_( int &int_value, std::initializer_list<const char*>&& keys ) const;
|
||||
bool read_keyvalue_( float &float_value, std::initializer_list<const char*>&& keys ) const;
|
||||
bool read_keyvalue_( Vector3& vector3_value, std::initializer_list<const char*>&& keys ) const;
|
||||
bool read_keyvalue_( char (&string_value)[1024], std::initializer_list<const char*>&& keys ) const;
|
||||
bool read_keyvalue_( const char *&string_ptr_value, std::initializer_list<const char*>&& keys ) const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user