mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-19 08:12:14 +00:00
( ), ( void ) -> ()
This commit is contained in:
parent
35d809a145
commit
fd6c589da0
46 changed files with 426 additions and 426 deletions
|
@ -119,7 +119,7 @@ void idCameraView::Restore( idRestoreGame* savefile )
|
|||
idCameraView::Event_SetAttachments
|
||||
================
|
||||
*/
|
||||
void idCameraView::Event_SetAttachments( )
|
||||
void idCameraView::Event_SetAttachments()
|
||||
{
|
||||
SetAttachment( &attachedTo, "attachedTo" );
|
||||
SetAttachment( &attachedView, "attachedView" );
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
void Save( idSaveGame* savefile ) const; // archives object for save game file
|
||||
void Restore( idRestoreGame* savefile ); // unarchives object from save game file
|
||||
|
||||
void Spawn( );
|
||||
void Spawn();
|
||||
virtual void GetViewParms( renderView_t* view );
|
||||
virtual void Stop();
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ END_CLASS
|
|||
idTarget_EndLevel::Spawn
|
||||
================
|
||||
*/
|
||||
void idTarget_EndLevel::Spawn( void )
|
||||
void idTarget_EndLevel::Spawn()
|
||||
{
|
||||
idStr guiName;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class idTarget_EndLevel : public idEntity
|
|||
public:
|
||||
CLASS_PROTOTYPE( idTarget_EndLevel );
|
||||
|
||||
void Spawn( void );
|
||||
void Spawn();
|
||||
~idTarget_EndLevel();
|
||||
|
||||
void Draw();
|
||||
|
|
|
@ -2206,7 +2206,7 @@ void idEntity::Bind( idEntity* master, bool orientated )
|
|||
|
||||
FinishBind();
|
||||
|
||||
PostBind( );
|
||||
PostBind();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5906,7 +5906,7 @@ void idEntity::ReadGUIFromSnapshot( const idBitMsg& msg )
|
|||
{
|
||||
int state;
|
||||
idUserInterface* gui;
|
||||
state = msg.ReadByte( );
|
||||
state = msg.ReadByte();
|
||||
gui = renderEntity.gui[ 0 ];
|
||||
if( gui && state != mpGUIState )
|
||||
{
|
||||
|
|
|
@ -573,7 +573,7 @@ private:
|
|||
// events
|
||||
public:
|
||||
// jmarshall
|
||||
idVec3 GetOrigin( void );
|
||||
idVec3 GetOrigin();
|
||||
float DistanceTo( idEntity* ent );
|
||||
float DistanceTo( const idVec3& pos ) const;
|
||||
idStr GetNextKey( const char* prefix, const char* lastMatch );
|
||||
|
|
|
@ -486,7 +486,7 @@ void idGameLocal::SaveGame( idFile* f, idFile* strings )
|
|||
|
||||
idSaveGame savegame( f, strings, BUILD_NUMBER );
|
||||
|
||||
if( g_flushSave.GetBool( ) == true )
|
||||
if( g_flushSave.GetBool() == true )
|
||||
{
|
||||
// force flushing with each write... for tracking down
|
||||
// save game bugs.
|
||||
|
@ -1112,7 +1112,7 @@ void idGameLocal::LoadMap( const char* mapName, int randseed )
|
|||
idGameLocal::LocalMapRestart
|
||||
===================
|
||||
*/
|
||||
void idGameLocal::LocalMapRestart( )
|
||||
void idGameLocal::LocalMapRestart()
|
||||
{
|
||||
int i, latchSpawnCount;
|
||||
|
||||
|
@ -1218,7 +1218,7 @@ void idGameLocal::MapRestart_f( const idCmdArgs& args )
|
|||
return;
|
||||
}
|
||||
|
||||
gameLocal.MapRestart( );
|
||||
gameLocal.MapRestart();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2599,7 +2599,7 @@ idCVar g_recordTrace( "g_recordTrace", "0", CVAR_BOOL, "" );
|
|||
idGameLocal::RunSharedThink
|
||||
================
|
||||
*/
|
||||
void idGameLocal::RunSharedThink( void )
|
||||
void idGameLocal::RunSharedThink()
|
||||
{
|
||||
idEntity* ent;
|
||||
for( ent = activeEntities.Next(); ent != NULL; ent = ent->activeNode.Next() )
|
||||
|
@ -5014,7 +5014,7 @@ idCamera* idGameLocal::GetCamera() const
|
|||
idGameLocal::SkipCinematic
|
||||
=============
|
||||
*/
|
||||
bool idGameLocal::SkipCinematic( void )
|
||||
bool idGameLocal::SkipCinematic()
|
||||
{
|
||||
if( camera )
|
||||
{
|
||||
|
|
|
@ -489,7 +489,7 @@ public:
|
|||
|
||||
void SetCamera( idCamera* cam );
|
||||
idCamera* GetCamera() const;
|
||||
bool SkipCinematic( void );
|
||||
bool SkipCinematic();
|
||||
void CalcFov( float base_fov, float& fov_x, float& fov_y ) const;
|
||||
|
||||
void AddEntityToHash( const char* name, idEntity* ent );
|
||||
|
|
|
@ -1097,8 +1097,8 @@ void idGameLocal::ClientProcessReliableMessage( int type, const idBitMsg& msg )
|
|||
{
|
||||
idMultiplayerGame::msg_evt_t msg_evt = ( idMultiplayerGame::msg_evt_t )msg.ReadByte();
|
||||
int parm1, parm2;
|
||||
parm1 = msg.ReadByte( );
|
||||
parm2 = msg.ReadByte( );
|
||||
parm1 = msg.ReadByte();
|
||||
parm2 = msg.ReadByte();
|
||||
mpGame.PrintMessageEvent( msg_evt, parm1, parm2 );
|
||||
break;
|
||||
}
|
||||
|
@ -1132,7 +1132,7 @@ void idGameLocal::ClientProcessReliableMessage( int type, const idBitMsg& msg )
|
|||
}
|
||||
case GAME_RELIABLE_MESSAGE_TOURNEYLINE:
|
||||
{
|
||||
int line = msg.ReadByte( );
|
||||
int line = msg.ReadByte();
|
||||
idPlayer* p = static_cast< idPlayer* >( entities[ GetLocalClientNum() ] );
|
||||
if( !p )
|
||||
{
|
||||
|
|
|
@ -1303,7 +1303,7 @@ void idExplodingBarrel::Killed( idEntity* inflictor, idEntity* attacker, int dam
|
|||
gameLocal.RadiusDamage( GetPhysics()->GetOrigin(), this, attacker, this, this, splash );
|
||||
}
|
||||
|
||||
ExplodingEffects( );
|
||||
ExplodingEffects();
|
||||
|
||||
//FIXME: need to precache all the debris stuff here and in the projectiles
|
||||
const idKeyValue* kv = spawnArgs.MatchPrefix( "def_debris" );
|
||||
|
@ -1520,7 +1520,7 @@ bool idExplodingBarrel::ClientReceiveEvent( int event, int time, const idBitMsg&
|
|||
{
|
||||
if( gameLocal.realClientTime - msg.ReadLong() < spawnArgs.GetInt( "explode_lapse", "1000" ) )
|
||||
{
|
||||
ExplodingEffects( );
|
||||
ExplodingEffects();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1537,7 +1537,7 @@ idMultiplayerGame::FillTourneySlots
|
|||
NOTE: called each frame during warmup to keep the tourney slots filled
|
||||
================
|
||||
*/
|
||||
void idMultiplayerGame::FillTourneySlots( )
|
||||
void idMultiplayerGame::FillTourneySlots()
|
||||
{
|
||||
int i, j, rankmax, rankmaxindex;
|
||||
idEntity* ent;
|
||||
|
@ -1655,7 +1655,7 @@ void idMultiplayerGame::UpdateTourneyLine()
|
|||
idMultiplayerGame::CycleTourneyPlayers
|
||||
================
|
||||
*/
|
||||
void idMultiplayerGame::CycleTourneyPlayers( )
|
||||
void idMultiplayerGame::CycleTourneyPlayers()
|
||||
{
|
||||
int i;
|
||||
idEntity* ent;
|
||||
|
@ -1672,7 +1672,7 @@ void idMultiplayerGame::CycleTourneyPlayers( )
|
|||
currentTourneyPlayer[ 0 ] = lastWinner;
|
||||
}
|
||||
}
|
||||
FillTourneySlots( );
|
||||
FillTourneySlots();
|
||||
// force selected players in/out of the game and update the ranks
|
||||
for( i = 0 ; i < gameLocal.numClients ; i++ )
|
||||
{
|
||||
|
@ -2830,7 +2830,7 @@ void idMultiplayerGame::CheckRespawns( idPlayer* spectator )
|
|||
else if( gameState == WARMUP )
|
||||
{
|
||||
// make sure empty tourney slots get filled first
|
||||
FillTourneySlots( );
|
||||
FillTourneySlots();
|
||||
if( i == currentTourneyPlayer[ 0 ] || i == currentTourneyPlayer[ 1 ] )
|
||||
{
|
||||
p->ServerSpectate( false );
|
||||
|
@ -3631,8 +3631,8 @@ void idMultiplayerGame::ClientReadStartState( const idBitMsg& msg )
|
|||
{
|
||||
// read the state in preparation for reading snapshot updates
|
||||
gameState = ( idMultiplayerGame::gameState_t )msg.ReadByte();
|
||||
matchStartedTime = msg.ReadLong( );
|
||||
startFragLimit = msg.ReadShort( );
|
||||
matchStartedTime = msg.ReadLong();
|
||||
startFragLimit = msg.ReadShort();
|
||||
|
||||
int client;
|
||||
while( ( client = msg.ReadByte() ) != MAX_CLIENTS )
|
||||
|
|
|
@ -583,7 +583,7 @@ public:
|
|||
|
||||
int NumFilenames()
|
||||
{
|
||||
return fileList.Num( );
|
||||
return fileList.Num();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -938,7 +938,7 @@ Scroll
|
|||
deals with scrolling text because we don't have key repeat
|
||||
==============
|
||||
*/
|
||||
void idConsoleLocal::Scroll( )
|
||||
void idConsoleLocal::Scroll()
|
||||
{
|
||||
if( lastKeyEvent == -1 || ( lastKeyEvent + 200 ) > eventLoop->Milliseconds() )
|
||||
{
|
||||
|
|
|
@ -3537,7 +3537,7 @@ idFile* idFileSystemLocal::OpenFileReadFlags( const char* relativePath, int sear
|
|||
}
|
||||
}
|
||||
|
||||
if( fs_debug.GetInteger( ) )
|
||||
if( fs_debug.GetInteger() )
|
||||
{
|
||||
common->Printf( "Can't find %s\n", relativePath );
|
||||
}
|
||||
|
@ -3820,8 +3820,8 @@ void idFileSystemLocal::FindDLL( const char* name, char _dllPath[ MAX_OSPATH ] )
|
|||
sys->DLL_GetFileName( name, dllName, MAX_OSPATH );
|
||||
|
||||
// from executable directory first - this is handy for developement
|
||||
idStr dllPath = Sys_EXEPath( );
|
||||
dllPath.StripFilename( );
|
||||
idStr dllPath = Sys_EXEPath();
|
||||
dllPath.StripFilename();
|
||||
dllPath.AppendPath( dllName );
|
||||
idFile* dllFile = OpenExplicitFileRead( dllPath );
|
||||
|
||||
|
|
|
@ -153,11 +153,11 @@ public:
|
|||
return buffer;
|
||||
}
|
||||
|
||||
size_t Size( ) const
|
||||
size_t Size() const
|
||||
{
|
||||
return num * sizeof( T );
|
||||
}
|
||||
unsigned int Num( ) const
|
||||
unsigned int Num() const
|
||||
{
|
||||
return num;
|
||||
}
|
||||
|
|
|
@ -1850,7 +1850,7 @@ const char* idLexer::ParseBracedSectionExact( idStr& out, int tabs )
|
|||
|
||||
if( !idLexer::ExpectTokenString( "{" ) )
|
||||
{
|
||||
return out.c_str( );
|
||||
return out.c_str();
|
||||
}
|
||||
|
||||
out = "{";
|
||||
|
|
|
@ -1573,7 +1573,7 @@ bool idMapFile::Parse( const char* filename, bool ignoreRegion, bool osPath )
|
|||
}
|
||||
|
||||
bool isGTLF = false;
|
||||
if( !src.IsLoaded( ) )
|
||||
if( !src.IsLoaded() )
|
||||
{
|
||||
// HVG: try loading a .gltf/glb second
|
||||
fullName.SetFileExtension( "glb" );
|
||||
|
|
|
@ -203,7 +203,7 @@ public:
|
|||
struct Iterator
|
||||
{
|
||||
_type_* p;
|
||||
_type_& operator*( )
|
||||
_type_& operator*()
|
||||
{
|
||||
return *p;
|
||||
}
|
||||
|
@ -211,19 +211,19 @@ public:
|
|||
{
|
||||
return p != rhs.p;
|
||||
}
|
||||
void operator ++( )
|
||||
void operator ++()
|
||||
{
|
||||
++p;
|
||||
}
|
||||
};
|
||||
|
||||
auto begin( ) const // const version
|
||||
auto begin() const // const version
|
||||
{
|
||||
return Iterator{list};
|
||||
};
|
||||
auto end( ) const // const version
|
||||
auto end() const // const version
|
||||
{
|
||||
return Iterator{list + Num( )};
|
||||
return Iterator{list + Num()};
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
gltfExtra_##className( idStr Name ) : name( Name ){ item = nullptr; } \
|
||||
virtual void parse( idToken &token ){parse(token,nullptr);} \
|
||||
virtual void parse( idToken &token , idLexer * parser ); \
|
||||
virtual idStr &Name( ) { return name; } \
|
||||
virtual idStr &Name() { return name; } \
|
||||
private: \
|
||||
idStr name;}
|
||||
#pragma endregion
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,7 +11,7 @@ struct parsable
|
|||
public:
|
||||
virtual void parse( idToken& token ) = 0;
|
||||
virtual void parse( idToken& token , idLexer* parser ) {};
|
||||
virtual idStr& Name( ) = 0;
|
||||
virtual idStr& Name() = 0;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
@ -40,7 +40,7 @@ public:
|
|||
{
|
||||
*item = token;
|
||||
};
|
||||
virtual idStr& Name( )
|
||||
virtual idStr& Name()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
parser->UnreadToken( &token );
|
||||
parser->ParseBracedSection( object );
|
||||
}
|
||||
virtual idStr& Name( )
|
||||
virtual idStr& Name()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
item = nullptr;
|
||||
}
|
||||
virtual void parse( idToken& token ) ;
|
||||
virtual idStr& Name( )
|
||||
virtual idStr& Name()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
*item = token;
|
||||
Convert();
|
||||
};
|
||||
virtual idStr& Name( )
|
||||
virtual idStr& Name()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
}
|
||||
// read data from uri file, and push it at end of current data buffer for this GLTF File
|
||||
// bufferView will be set accordingly to the generated buffer.
|
||||
bool Convert( );
|
||||
bool Convert();
|
||||
private:
|
||||
idStr name;
|
||||
int* bufferView;
|
||||
|
@ -132,7 +132,7 @@ class gltfItem_##className : public parsable, public parseType<ptype> \
|
|||
{public: \
|
||||
gltfItem_##className( idStr Name ) : name( Name ){ item = nullptr; } \
|
||||
virtual void parse( idToken &token ); \
|
||||
virtual idStr &Name( ) { return name; } \
|
||||
virtual idStr &Name() { return name; } \
|
||||
void Set( ptype *type, idLexer *lexer ) { parseType::Set( type ); parser = lexer; } \
|
||||
private: \
|
||||
idStr name; \
|
||||
|
@ -178,13 +178,13 @@ class gltfItem_##className : public parsable, public parseType<type> \
|
|||
{public: \
|
||||
gltfItem_##className( idStr Name ) : name( Name ){ item = nullptr; } \
|
||||
virtual void parse( idToken &token ) { function } \
|
||||
virtual idStr &Name( ) { return name; } \
|
||||
virtual idStr &Name() { return name; } \
|
||||
private: \
|
||||
idStr name;}
|
||||
#pragma endregion
|
||||
|
||||
gltfItemClass( integer, int, *item = token.GetIntValue( ); );
|
||||
gltfItemClass( number, float, *item = token.GetFloatValue( ); );
|
||||
gltfItemClass( integer, int, *item = token.GetIntValue(); );
|
||||
gltfItemClass( number, float, *item = token.GetFloatValue(); );
|
||||
gltfItemClass( boolean, bool, if( token.Icmp( "true" ) == 0 ) *item = true; else
|
||||
{
|
||||
if( token.Icmp( "false" ) == 0 )
|
||||
|
@ -201,18 +201,18 @@ gltfItemClass( boolean, bool, if( token.Icmp( "true" ) == 0 ) *item = true; else
|
|||
class gltfItemArray
|
||||
{
|
||||
public:
|
||||
~gltfItemArray( )
|
||||
~gltfItemArray()
|
||||
{
|
||||
items.DeleteContents( true );
|
||||
}
|
||||
gltfItemArray( ) { };
|
||||
gltfItemArray() { };
|
||||
int Num()
|
||||
{
|
||||
return items.Num();
|
||||
}
|
||||
void AddItemDef( parsable* item )
|
||||
{
|
||||
items.Alloc( ) = item;
|
||||
items.Alloc() = item;
|
||||
}
|
||||
int Fill( idLexer* lexer , idDict* strPairs );
|
||||
int Parse( idLexer* lexer , bool forwardLexer = false );
|
||||
|
@ -235,7 +235,7 @@ class gltfPropertyArray;
|
|||
class gltfPropertyItem
|
||||
{
|
||||
public:
|
||||
gltfPropertyItem( ) : array( nullptr ) { }
|
||||
gltfPropertyItem() : array( nullptr ) { }
|
||||
gltfPropertyArray* array;
|
||||
idToken item;
|
||||
};
|
||||
|
@ -244,12 +244,12 @@ class gltfPropertyArray
|
|||
{
|
||||
public:
|
||||
gltfPropertyArray( idLexer* Parser, bool AoS = true );
|
||||
~gltfPropertyArray( );
|
||||
~gltfPropertyArray();
|
||||
struct Iterator
|
||||
{
|
||||
gltfPropertyArray* array;
|
||||
gltfPropertyItem* p;
|
||||
gltfPropertyItem& operator*( )
|
||||
gltfPropertyItem& operator*()
|
||||
{
|
||||
return *p;
|
||||
}
|
||||
|
@ -257,10 +257,10 @@ public:
|
|||
{
|
||||
return p != rhs.p;
|
||||
}
|
||||
void operator ++( );
|
||||
void operator ++();
|
||||
};
|
||||
gltfPropertyArray::Iterator begin( );
|
||||
gltfPropertyArray::Iterator end( );
|
||||
gltfPropertyArray::Iterator begin();
|
||||
gltfPropertyArray::Iterator end();
|
||||
private:
|
||||
bool iterating;
|
||||
bool dirty;
|
||||
|
@ -286,7 +286,7 @@ public:
|
|||
idStr currentFile;
|
||||
private:
|
||||
void SetNodeParent( gltfNode* node, gltfNode* parent = nullptr );
|
||||
//void CreateBgfxData( );
|
||||
//void CreateBgfxData();
|
||||
|
||||
void Parse_ASSET( idToken& token );
|
||||
void Parse_CAMERAS( idToken& token );
|
||||
|
|
|
@ -59,7 +59,7 @@ struct gltf_accessor_component_type_map
|
|||
class gltfExtra
|
||||
{
|
||||
public:
|
||||
gltfExtra( ) { }
|
||||
gltfExtra() { }
|
||||
//entire extra json scope
|
||||
idStr json;
|
||||
//str:str pairs of each item
|
||||
|
@ -72,7 +72,7 @@ class gltfExt_KHR_lights_punctual;
|
|||
class gltfExtensions
|
||||
{
|
||||
public:
|
||||
gltfExtensions( ) { }
|
||||
gltfExtensions() { }
|
||||
idList<gltfExt_KHR_lights_punctual*> KHR_lights_punctual;
|
||||
};
|
||||
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
class gltfNode_Extensions
|
||||
{
|
||||
public:
|
||||
gltfNode_Extensions( ) :
|
||||
gltfNode_Extensions() :
|
||||
KHR_lights_punctual( nullptr ) { }
|
||||
gltfNode_KHR_lights_punctual* KHR_lights_punctual;
|
||||
};
|
||||
|
@ -94,7 +94,7 @@ class gltfExt_KHR_materials_pbrSpecularGlossiness;
|
|||
class gltfMaterial_Extensions
|
||||
{
|
||||
public:
|
||||
gltfMaterial_Extensions( ) :
|
||||
gltfMaterial_Extensions() :
|
||||
KHR_materials_pbrSpecularGlossiness( nullptr ) { }
|
||||
gltfExt_KHR_materials_pbrSpecularGlossiness* KHR_materials_pbrSpecularGlossiness;
|
||||
};
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
class gltfNode
|
||||
{
|
||||
public:
|
||||
gltfNode( ) : camera( -1 ), skin( -1 ), matrix( mat4_zero ),
|
||||
gltfNode() : camera( -1 ), skin( -1 ), matrix( mat4_zero ),
|
||||
mesh( -1 ), rotation( 0.f, 0.f, 0.f, 1.f ), scale( 1.f, 1.f, 1.f ),
|
||||
translation( vec3_zero ), parent( nullptr ), dirty( true ) { }
|
||||
int camera;
|
||||
|
@ -133,7 +133,7 @@ struct gltfCameraNodePtrs
|
|||
class gltfScene
|
||||
{
|
||||
public:
|
||||
gltfScene( ) { }
|
||||
gltfScene() { }
|
||||
idList<int> nodes;
|
||||
idStr name;
|
||||
idStr extensions;
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
Count
|
||||
};
|
||||
|
||||
gltfMesh_Primitive_Attribute( ) : accessorIndex( -1 ), elementSize( 0 ), type( gltfMesh_Primitive_Attribute::Type::Count ) { }
|
||||
gltfMesh_Primitive_Attribute() : accessorIndex( -1 ), elementSize( 0 ), type( gltfMesh_Primitive_Attribute::Type::Count ) { }
|
||||
idStr attributeSemantic;
|
||||
int accessorIndex;
|
||||
uint elementSize;
|
||||
|
@ -183,7 +183,7 @@ struct gltf_mesh_attribute_map
|
|||
class gltfMesh_Primitive
|
||||
{
|
||||
public:
|
||||
gltfMesh_Primitive( ) : indices( -1 ), material( -1 ), mode( -1 ) { }
|
||||
gltfMesh_Primitive() : indices( -1 ), material( -1 ), mode( -1 ) { }
|
||||
idList<gltfMesh_Primitive_Attribute*> attributes;
|
||||
int indices;
|
||||
int material;
|
||||
|
@ -196,7 +196,7 @@ public:
|
|||
class gltfMesh
|
||||
{
|
||||
public:
|
||||
gltfMesh( ) { };
|
||||
gltfMesh() { };
|
||||
|
||||
idList<gltfMesh_Primitive*> primitives; // gltfMesh_Primitive[1,*]
|
||||
idList<double> weights; // number[1,*]
|
||||
|
@ -208,7 +208,7 @@ public:
|
|||
class gltfCamera_Orthographic
|
||||
{
|
||||
public:
|
||||
gltfCamera_Orthographic( ) : xmag( 0.0f ), ymag( 0.0f ), zfar( 0.0f ), znear( 0.0f ) { };
|
||||
gltfCamera_Orthographic() : xmag( 0.0f ), ymag( 0.0f ), zfar( 0.0f ), znear( 0.0f ) { };
|
||||
float xmag;
|
||||
float ymag;
|
||||
float zfar;
|
||||
|
@ -220,7 +220,7 @@ public:
|
|||
class gltfCamera_Perspective
|
||||
{
|
||||
public:
|
||||
gltfCamera_Perspective( ) : aspectRatio( 0.0f ), yfov( 0.0f ), zfar( 0.0f ), znear( 0.0f ) { };
|
||||
gltfCamera_Perspective() : aspectRatio( 0.0f ), yfov( 0.0f ), zfar( 0.0f ), znear( 0.0f ) { };
|
||||
float aspectRatio;
|
||||
float yfov;
|
||||
float zfar;
|
||||
|
@ -232,7 +232,7 @@ public:
|
|||
class gltfCamera
|
||||
{
|
||||
public:
|
||||
gltfCamera( ) { };
|
||||
gltfCamera() { };
|
||||
gltfCamera_Orthographic orthographic;
|
||||
gltfCamera_Perspective perspective;
|
||||
idStr type;
|
||||
|
@ -244,7 +244,7 @@ public:
|
|||
class gltfAnimation_Channel_Target
|
||||
{
|
||||
public:
|
||||
gltfAnimation_Channel_Target( ) : node( -1 ), TRS( gltfTRS::count ) { };
|
||||
gltfAnimation_Channel_Target() : node( -1 ), TRS( gltfTRS::count ) { };
|
||||
int node;
|
||||
idStr path;
|
||||
idStr extensions;
|
||||
|
@ -287,7 +287,7 @@ public:
|
|||
class gltfAnimation_Channel
|
||||
{
|
||||
public:
|
||||
gltfAnimation_Channel( ) : sampler( -1 ) { };
|
||||
gltfAnimation_Channel() : sampler( -1 ) { };
|
||||
int sampler;
|
||||
gltfAnimation_Channel_Target target;
|
||||
idStr extensions;
|
||||
|
@ -297,7 +297,7 @@ public:
|
|||
class gltfAnimation_Sampler
|
||||
{
|
||||
public:
|
||||
gltfAnimation_Sampler( ) : input( -1 ), interpolation( "LINEAR" ), output( -1 ), intType( gltfInterpType::count ) { };
|
||||
gltfAnimation_Sampler() : input( -1 ), interpolation( "LINEAR" ), output( -1 ), intType( gltfInterpType::count ) { };
|
||||
int input;
|
||||
idStr interpolation;
|
||||
int output;
|
||||
|
@ -336,7 +336,7 @@ public:
|
|||
class gltfAnimation
|
||||
{
|
||||
public:
|
||||
gltfAnimation( ) : maxTime( 0.0f ), numFrames( 0 ) { };
|
||||
gltfAnimation() : maxTime( 0.0f ), numFrames( 0 ) { };
|
||||
idList<gltfAnimation_Channel*> channels;
|
||||
idList<gltfAnimation_Sampler*> samplers;
|
||||
idStr name;
|
||||
|
@ -368,7 +368,7 @@ public:
|
|||
{
|
||||
return false;
|
||||
}
|
||||
const idVec3& TotalMovementDelta( void ) const
|
||||
const idVec3& TotalMovementDelta() const
|
||||
{
|
||||
static idVec3 temp;
|
||||
return temp;
|
||||
|
@ -382,7 +382,7 @@ public:
|
|||
class gltfAccessor_Sparse_Values
|
||||
{
|
||||
public:
|
||||
gltfAccessor_Sparse_Values( ) : bufferView( -1 ), byteOffset( -1 ) { };
|
||||
gltfAccessor_Sparse_Values() : bufferView( -1 ), byteOffset( -1 ) { };
|
||||
int bufferView;
|
||||
int byteOffset;
|
||||
idStr extensions;
|
||||
|
@ -392,7 +392,7 @@ public:
|
|||
class gltfAccessor_Sparse_Indices
|
||||
{
|
||||
public:
|
||||
gltfAccessor_Sparse_Indices( ) : bufferView( -1 ), byteOffset( -1 ), componentType( -1 ) { };
|
||||
gltfAccessor_Sparse_Indices() : bufferView( -1 ), byteOffset( -1 ), componentType( -1 ) { };
|
||||
int bufferView;
|
||||
int byteOffset;
|
||||
int componentType;
|
||||
|
@ -403,7 +403,7 @@ public:
|
|||
class gltfAccessor_Sparse
|
||||
{
|
||||
public:
|
||||
gltfAccessor_Sparse( ) : count( -1 ) { };
|
||||
gltfAccessor_Sparse() : count( -1 ) { };
|
||||
int count;
|
||||
gltfAccessor_Sparse_Indices indices;
|
||||
gltfAccessor_Sparse_Values values;
|
||||
|
@ -414,7 +414,7 @@ public:
|
|||
class gltfAccessor
|
||||
{
|
||||
public:
|
||||
gltfAccessor( ) : bufferView( -1 ), byteOffset( 0 ), componentType( -1 ), normalized( false ), count( -1 ) ,
|
||||
gltfAccessor() : bufferView( -1 ), byteOffset( 0 ), componentType( -1 ), normalized( false ), count( -1 ) ,
|
||||
floatView( nullptr ), vecView( nullptr ), quatView( nullptr ), matView( nullptr ) { }
|
||||
int bufferView;
|
||||
int byteOffset;
|
||||
|
@ -440,7 +440,7 @@ public:
|
|||
class gltfBufferView
|
||||
{
|
||||
public:
|
||||
gltfBufferView( ) : buffer( -1 ), byteLength( -1 ), byteStride( 0 ), byteOffset( 0 ), target( -1 ) { };
|
||||
gltfBufferView() : buffer( -1 ), byteLength( -1 ), byteStride( 0 ), byteOffset( 0 ), target( -1 ) { };
|
||||
int buffer;
|
||||
int byteLength;
|
||||
int byteStride;
|
||||
|
@ -456,7 +456,7 @@ public:
|
|||
class gltfBuffer
|
||||
{
|
||||
public:
|
||||
gltfBuffer( ) : byteLength( -1 ), parent( nullptr ) { };
|
||||
gltfBuffer() : byteLength( -1 ), parent( nullptr ) { };
|
||||
idStr uri;
|
||||
int byteLength;
|
||||
idStr name;
|
||||
|
@ -469,7 +469,7 @@ public:
|
|||
class gltfSampler
|
||||
{
|
||||
public:
|
||||
gltfSampler( ) : magFilter( 0 ), minFilter( 0 ), wrapS( 10497 ), wrapT( 10497 ) { };
|
||||
gltfSampler() : magFilter( 0 ), minFilter( 0 ), wrapS( 10497 ), wrapT( 10497 ) { };
|
||||
int magFilter;
|
||||
int minFilter;
|
||||
int wrapS;
|
||||
|
@ -484,7 +484,7 @@ public:
|
|||
class gltfImage
|
||||
{
|
||||
public:
|
||||
gltfImage( ) : bufferView( -1 ) { }
|
||||
gltfImage() : bufferView( -1 ) { }
|
||||
idStr uri;
|
||||
idStr mimeType;
|
||||
int bufferView;
|
||||
|
@ -496,7 +496,7 @@ public:
|
|||
class gltfSkin
|
||||
{
|
||||
public:
|
||||
gltfSkin( ) : inverseBindMatrices( -1 ), skeleton( -1 ), name( "unnamedSkin" ) { };
|
||||
gltfSkin() : inverseBindMatrices( -1 ), skeleton( -1 ), name( "unnamedSkin" ) { };
|
||||
int inverseBindMatrices;
|
||||
int skeleton;
|
||||
idList<int> joints; // integer[1,*]
|
||||
|
@ -509,7 +509,7 @@ class gltfExt_KHR_texture_transform;
|
|||
class gltfTexture_Info_Extensions
|
||||
{
|
||||
public:
|
||||
gltfTexture_Info_Extensions( ) :
|
||||
gltfTexture_Info_Extensions() :
|
||||
KHR_texture_transform( nullptr ) { }
|
||||
gltfExt_KHR_texture_transform* KHR_texture_transform;
|
||||
};
|
||||
|
@ -517,7 +517,7 @@ public:
|
|||
class gltfOcclusionTexture_Info
|
||||
{
|
||||
public:
|
||||
gltfOcclusionTexture_Info( ) : index( -1 ), texCoord( 0 ), strength( 1.0f ) { }
|
||||
gltfOcclusionTexture_Info() : index( -1 ), texCoord( 0 ), strength( 1.0f ) { }
|
||||
int index;
|
||||
int texCoord;
|
||||
float strength;
|
||||
|
@ -528,7 +528,7 @@ public:
|
|||
class gltfNormalTexture_Info
|
||||
{
|
||||
public:
|
||||
gltfNormalTexture_Info( ) : index( -1 ), texCoord( 0 ), scale( 1.0f ) { }
|
||||
gltfNormalTexture_Info() : index( -1 ), texCoord( 0 ), scale( 1.0f ) { }
|
||||
int index;
|
||||
int texCoord;
|
||||
float scale;
|
||||
|
@ -539,7 +539,7 @@ public:
|
|||
class gltfTexture_Info
|
||||
{
|
||||
public:
|
||||
gltfTexture_Info( ) : index( -1 ), texCoord( 0 ) { }
|
||||
gltfTexture_Info() : index( -1 ), texCoord( 0 ) { }
|
||||
int index;
|
||||
int texCoord;
|
||||
gltfTexture_Info_Extensions extensions;
|
||||
|
@ -550,7 +550,7 @@ public:
|
|||
class gltfTexture
|
||||
{
|
||||
public:
|
||||
gltfTexture( ) : sampler( -1 ), source( -1 ) { }
|
||||
gltfTexture() : sampler( -1 ), source( -1 ) { }
|
||||
int sampler;
|
||||
int source;
|
||||
idStr name;
|
||||
|
@ -561,7 +561,7 @@ public:
|
|||
class gltfMaterial_pbrMetallicRoughness
|
||||
{
|
||||
public:
|
||||
gltfMaterial_pbrMetallicRoughness( ) : baseColorFactor( vec4_one ), metallicFactor( 1.0f ), roughnessFactor( 1.0f ) { }
|
||||
gltfMaterial_pbrMetallicRoughness() : baseColorFactor( vec4_one ), metallicFactor( 1.0f ), roughnessFactor( 1.0f ) { }
|
||||
idVec4 baseColorFactor;
|
||||
gltfTexture_Info baseColorTexture;
|
||||
float metallicFactor;
|
||||
|
@ -582,7 +582,7 @@ public:
|
|||
count
|
||||
};
|
||||
|
||||
gltfMaterial( ) : emissiveFactor( vec3_zero ), alphaMode( "OPAQUE" ), alphaCutoff( 0.5f ), doubleSided( false ) { }
|
||||
gltfMaterial() : emissiveFactor( vec3_zero ), alphaMode( "OPAQUE" ), alphaCutoff( 0.5f ), doubleSided( false ) { }
|
||||
gltfMaterial_pbrMetallicRoughness pbrMetallicRoughness;
|
||||
gltfNormalTexture_Info normalTexture;
|
||||
gltfOcclusionTexture_Info occlusionTexture;
|
||||
|
@ -618,7 +618,7 @@ public:
|
|||
class gltfAsset
|
||||
{
|
||||
public:
|
||||
gltfAsset( ) { }
|
||||
gltfAsset() { }
|
||||
idStr copyright;
|
||||
idStr generator;
|
||||
idStr version;
|
||||
|
@ -632,7 +632,7 @@ public:
|
|||
class gltfExtensionsUsed
|
||||
{
|
||||
public:
|
||||
gltfExtensionsUsed( ) { }
|
||||
gltfExtensionsUsed() { }
|
||||
idStr extension;
|
||||
};
|
||||
|
||||
|
@ -641,7 +641,7 @@ public:
|
|||
class gltfExt_KHR_materials_pbrSpecularGlossiness
|
||||
{
|
||||
public:
|
||||
gltfExt_KHR_materials_pbrSpecularGlossiness( ) { }
|
||||
gltfExt_KHR_materials_pbrSpecularGlossiness() { }
|
||||
idVec4 diffuseFactor;
|
||||
gltfTexture_Info diffuseTexture;
|
||||
idVec3 specularFactor;
|
||||
|
@ -656,7 +656,7 @@ public:
|
|||
class gltfExt_KHR_lights_punctual_spot
|
||||
{
|
||||
public:
|
||||
gltfExt_KHR_lights_punctual_spot( ) : innerConeAngle( 0.0f ), outerConeAngle( idMath::ONEFOURTH_PI ) { }
|
||||
gltfExt_KHR_lights_punctual_spot() : innerConeAngle( 0.0f ), outerConeAngle( idMath::ONEFOURTH_PI ) { }
|
||||
float innerConeAngle;
|
||||
float outerConeAngle;
|
||||
idStr extensions;
|
||||
|
@ -669,7 +669,7 @@ typedef gltfExt_KHR_lights_punctual_spot spot;
|
|||
class gltfExt_KHR_lights_punctual
|
||||
{
|
||||
public:
|
||||
gltfExt_KHR_lights_punctual( ) : color( vec3_one ), intensity( 1.0f ), range( -1.0f ), intType( -1 ) { }
|
||||
gltfExt_KHR_lights_punctual() : color( vec3_one ), intensity( 1.0f ), range( -1.0f ), intType( -1 ) { }
|
||||
idVec3 color;
|
||||
float intensity;
|
||||
spot spot;
|
||||
|
@ -704,7 +704,7 @@ public:
|
|||
class gltfExt_KHR_texture_transform
|
||||
{
|
||||
public:
|
||||
gltfExt_KHR_texture_transform( ) : offset( vec2_zero ), rotation( 0.0f ), scale( vec2_one ), texCoord( -1 ), index( 0 ), resolved( false ) { }
|
||||
gltfExt_KHR_texture_transform() : offset( vec2_zero ), rotation( 0.0f ), scale( vec2_one ), texCoord( -1 ), index( 0 ), resolved( false ) { }
|
||||
idVec2 offset;
|
||||
float rotation;
|
||||
idVec2 scale;
|
||||
|
@ -720,7 +720,7 @@ public:
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
//// For these to function you need to add an private idList<gltf{name}*> {target}
|
||||
#define GLTFCACHEITEM(name,target) \
|
||||
gltf##name * name ( ) { target.AssureSizeAlloc( target.Num()+1,idListNewElement<gltf##name>); return target[target.Num()-1];} \
|
||||
gltf##name * name () { target.AssureSizeAlloc( target.Num()+1,idListNewElement<gltf##name>); return target[target.Num()-1];} \
|
||||
const inline idList<gltf##name*> & ##name##List() { return target; }
|
||||
|
||||
|
||||
|
@ -732,8 +732,8 @@ const inline idList<gltf##name*> & ##name##List() { return target; }
|
|||
class gltfData
|
||||
{
|
||||
public:
|
||||
gltfData( ) : fileNameHash( 0 ), json( nullptr ), data( nullptr ), totalChunks( -1 ) { };
|
||||
~gltfData( );
|
||||
gltfData() : fileNameHash( 0 ), json( nullptr ), data( nullptr ), totalChunks( -1 ) { };
|
||||
~gltfData();
|
||||
byte* AddData( int size, int* bufferID = nullptr );
|
||||
byte* GetJsonData( int& size )
|
||||
{
|
||||
|
@ -747,13 +747,13 @@ public:
|
|||
void FileName( const idStr& file )
|
||||
{
|
||||
fileName = file;
|
||||
fileNameHash = fileDataHash.GenerateKey( file.c_str( ) );
|
||||
fileNameHash = fileDataHash.GenerateKey( file.c_str() );
|
||||
}
|
||||
int FileNameHash( )
|
||||
int FileNameHash()
|
||||
{
|
||||
return fileNameHash;
|
||||
}
|
||||
idStr& FileName( )
|
||||
idStr& FileName()
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
|
@ -763,21 +763,21 @@ public:
|
|||
//add data from filename
|
||||
static gltfData* Data( idStr& fileName )
|
||||
{
|
||||
dataList.AssureSizeAlloc( dataList.Num( ) + 1, idListNewElement<gltfData> );
|
||||
dataList[dataList.Num( ) - 1]->FileName( fileName );
|
||||
fileDataHash.Add( fileDataHash.GenerateKey( fileName ), dataList.Num( ) - 1 );
|
||||
return dataList[dataList.Num( ) - 1];
|
||||
dataList.AssureSizeAlloc( dataList.Num() + 1, idListNewElement<gltfData> );
|
||||
dataList[dataList.Num() - 1]->FileName( fileName );
|
||||
fileDataHash.Add( fileDataHash.GenerateKey( fileName ), dataList.Num() - 1 );
|
||||
return dataList[dataList.Num() - 1];
|
||||
}
|
||||
//find data;
|
||||
static gltfData* Data( const char* filename )
|
||||
{
|
||||
return dataList[fileDataHash.First( fileDataHash.GenerateKey( filename ) )];
|
||||
}
|
||||
static const idList<gltfData*>& DataList( )
|
||||
static const idList<gltfData*>& DataList()
|
||||
{
|
||||
return dataList;
|
||||
}
|
||||
static void ClearData( )
|
||||
static void ClearData()
|
||||
{
|
||||
idLib::Warning( "TODO! DATA NOT FREED" );
|
||||
}
|
||||
|
@ -802,7 +802,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
for( int i = 0; i < nodes.Num( ); i++ )
|
||||
for( int i = 0; i < nodes.Num(); i++ )
|
||||
{
|
||||
if( nodes[i]->camera != -1 && nodes[i]->camera == camId )
|
||||
{
|
||||
|
@ -896,7 +896,7 @@ public:
|
|||
idList<gltfNode*> hierachy( 2 );
|
||||
gltfNode* parent = nullptr;
|
||||
|
||||
for( int i = 0; i < nodes.Num( ); i++ )
|
||||
for( int i = 0; i < nodes.Num(); i++ )
|
||||
{
|
||||
if( nodes[i]->camera != -1 && nodes[i]->camera == camId )
|
||||
{
|
||||
|
@ -910,7 +910,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
for( int i = hierachy.Num( ) - 1; i >= 0; i-- )
|
||||
for( int i = hierachy.Num() - 1; i >= 0; i-- )
|
||||
{
|
||||
ResolveNodeMatrix( hierachy[i] );
|
||||
result *= hierachy[i]->matrix;
|
||||
|
@ -927,7 +927,7 @@ public:
|
|||
gltfNode* parent = nullptr;
|
||||
hierachy.SetGranularity( 2 );
|
||||
|
||||
for( int i = 0; i < nodes.Num( ); i++ )
|
||||
for( int i = 0; i < nodes.Num(); i++ )
|
||||
{
|
||||
if( nodes[i]->extensions.KHR_lights_punctual && nodes[i]->extensions.KHR_lights_punctual->light == lightId )
|
||||
{
|
||||
|
@ -941,7 +941,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
for( int i = hierachy.Num( ) - 1; i >= 0; i-- )
|
||||
for( int i = hierachy.Num() - 1; i >= 0; i-- )
|
||||
{
|
||||
result *= hierachy[i]->matrix;
|
||||
}
|
||||
|
@ -966,7 +966,7 @@ public:
|
|||
0, 0, 0, 1
|
||||
);
|
||||
|
||||
node->matrix = idMat4( mat3_identity, node->translation ) * node->rotation.ToMat4( ).Transpose( ) * scaleMat;
|
||||
node->matrix = idMat4( mat3_identity, node->translation ) * node->rotation.ToMat4().Transpose() * scaleMat;
|
||||
|
||||
node->dirty = false;
|
||||
}
|
||||
|
@ -986,7 +986,7 @@ public:
|
|||
}
|
||||
parent = parent->parent;
|
||||
}
|
||||
for( int i = hierachy.Num( ) - 1; i >= 0; i-- )
|
||||
for( int i = hierachy.Num() - 1; i >= 0; i-- )
|
||||
{
|
||||
*mat *= hierachy[i]->matrix;
|
||||
}
|
||||
|
@ -1001,7 +1001,7 @@ public:
|
|||
idList<float>& GetAccessorView( gltfAccessor* accessor );
|
||||
idList<idMat4>& GetAccessorViewMat( gltfAccessor* accessor );
|
||||
|
||||
int& DefaultScene( )
|
||||
int& DefaultScene()
|
||||
{
|
||||
return scene;
|
||||
}
|
||||
|
|
|
@ -961,7 +961,7 @@ public:
|
|||
float* ToFloatPtr();
|
||||
const char* ToString( int precision = 2 ) const;
|
||||
// jmarshall
|
||||
idMat3 ToMat3( void ) const;
|
||||
idMat3 ToMat3() const;
|
||||
// jmarshall end
|
||||
private:
|
||||
idVec4 mat[ 4 ];
|
||||
|
@ -972,7 +972,7 @@ extern idMat4 mat4_identity;
|
|||
#define mat4_default mat4_identity
|
||||
|
||||
// jmarshall
|
||||
ID_INLINE idMat3 idMat4::ToMat3( void ) const
|
||||
ID_INLINE idMat3 idMat4::ToMat3() const
|
||||
{
|
||||
idMat3 m;
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ bool AssertFailed( const char* file, int line, const char* expression );
|
|||
|
||||
//====================== assert in release mode =======================
|
||||
|
||||
#define idassert( x ) { (( void )0); }
|
||||
#define idassert( x ) { (()0); }
|
||||
|
||||
#undef assert
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ public:
|
|||
return ( contentVector.size() > 0 ) ;
|
||||
}
|
||||
|
||||
const typename Content<_T>::Vector& GetContents( ) const
|
||||
const typename Content<_T>::Vector& GetContents() const
|
||||
{
|
||||
|
||||
return contentVector;
|
||||
|
|
|
@ -1245,7 +1245,7 @@ bool ImGui::RadioButton( const char* label, bool active )
|
|||
|
||||
if( g.LogEnabled )
|
||||
{
|
||||
LogRenderedText( &total_bb.Min, active ? "(x)" : "( )" );
|
||||
LogRenderedText( &total_bb.Min, active ? "(x)" : "()" );
|
||||
}
|
||||
if( label_size.x > 0.0f )
|
||||
{
|
||||
|
|
|
@ -326,7 +326,7 @@ idCinematic* idCinematic::Alloc()
|
|||
idCinematic::~idCinematic
|
||||
==============
|
||||
*/
|
||||
idCinematic::~idCinematic( )
|
||||
idCinematic::~idCinematic()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
@ -2809,7 +2809,7 @@ fill_input_buffer( j_decompress_ptr cinfo )
|
|||
*/
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
METHODDEF( void )
|
||||
METHODDEF()
|
||||
#else
|
||||
METHODDEF void
|
||||
#endif
|
||||
|
@ -2837,7 +2837,7 @@ init_source( j_decompress_ptr cinfo )
|
|||
*/
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
METHODDEF( void )
|
||||
METHODDEF()
|
||||
#else
|
||||
METHODDEF void
|
||||
#endif
|
||||
|
@ -2877,7 +2877,7 @@ skip_input_data( j_decompress_ptr cinfo, long num_bytes )
|
|||
*/
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
METHODDEF( void )
|
||||
METHODDEF()
|
||||
#else
|
||||
METHODDEF void
|
||||
#endif
|
||||
|
@ -2888,7 +2888,7 @@ term_source( j_decompress_ptr cinfo )
|
|||
}
|
||||
|
||||
#ifdef USE_NEWER_JPEG
|
||||
GLOBAL( void )
|
||||
GLOBAL()
|
||||
#else
|
||||
GLOBAL void
|
||||
#endif
|
||||
|
|
|
@ -19,8 +19,8 @@ bool idRenderModelStatic::ConvertGltfMeshToModelsurfaces( const gltfMesh* mesh )
|
|||
MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* prim, gltfData* _data , idMat4 trans )
|
||||
{
|
||||
MapPolygonMesh* mesh = new MapPolygonMesh();
|
||||
gltfAccessor* accessor = _data->AccessorList( )[prim->indices];
|
||||
gltfBufferView* bv = _data->BufferViewList( )[accessor->bufferView];
|
||||
gltfAccessor* accessor = _data->AccessorList()[prim->indices];
|
||||
gltfBufferView* bv = _data->BufferViewList()[accessor->bufferView];
|
||||
gltfData* data = bv->parent;
|
||||
|
||||
gltfMaterial* mat = NULL;
|
||||
|
@ -29,7 +29,7 @@ MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* p
|
|||
mat = _data->MaterialList()[prim->material];
|
||||
}
|
||||
|
||||
gltfBuffer* buff = data->BufferList( )[bv->buffer];
|
||||
gltfBuffer* buff = data->BufferList()[bv->buffer];
|
||||
uint idxDataSize = sizeof( uint ) * accessor->count;
|
||||
uint* indices = ( uint* ) Mem_ClearedAlloc( idxDataSize , TAG_IDLIB_GLTF );
|
||||
|
||||
|
@ -68,10 +68,10 @@ MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* p
|
|||
|
||||
for( auto& attrib : prim->attributes )
|
||||
{
|
||||
gltfAccessor* attrAcc = data->AccessorList( )[attrib->accessorIndex];
|
||||
gltfBufferView* attrBv = data->BufferViewList( )[attrAcc->bufferView];
|
||||
gltfAccessor* attrAcc = data->AccessorList()[attrib->accessorIndex];
|
||||
gltfBufferView* attrBv = data->BufferViewList()[attrAcc->bufferView];
|
||||
gltfData* attrData = attrBv->parent;
|
||||
gltfBuffer* attrbuff = attrData->BufferList( )[attrBv->buffer];
|
||||
gltfBuffer* attrbuff = attrData->BufferList()[attrBv->buffer];
|
||||
|
||||
idFile_Memory bin = idFile_Memory( "gltfChunkVertices",
|
||||
( const char* )( ( attrData->GetData( attrBv->buffer ) + attrBv->byteOffset + attrAcc->byteOffset ) ), attrBv->byteLength );
|
||||
|
@ -233,7 +233,7 @@ MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* p
|
|||
|
||||
void ProcessSceneNode( idMapEntity* newEntity, gltfNode* node, idMat4& trans, gltfData* data , bool staticMesh = false )
|
||||
{
|
||||
auto& nodeList = data->NodeList( );
|
||||
auto& nodeList = data->NodeList();
|
||||
|
||||
gltfData::ResolveNodeMatrix( node );
|
||||
idMat4 curTrans = trans * node->matrix;
|
||||
|
@ -254,13 +254,13 @@ void ProcessSceneNode( idMapEntity* newEntity, gltfNode* node, idMat4& trans, gl
|
|||
|
||||
if( isFuncStaticMesh && node->mesh != -1 )
|
||||
{
|
||||
for( auto prim : data->MeshList( )[node->mesh]->primitives )
|
||||
for( auto prim : data->MeshList()[node->mesh]->primitives )
|
||||
{
|
||||
newEntity->AddPrimitive( MapPolygonMesh::ConvertFromMeshGltf( prim, data , curTrans ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( node->name.Length( ) )
|
||||
if( node->name.Length() )
|
||||
{
|
||||
newEntity->epairs.Set( "name", node->name );
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ bool gltfManager::ExtractMeshIdentifier( idStr& filename, int& meshId, idStr& me
|
|||
return false;
|
||||
}
|
||||
idParser parser( LEXFL_ALLOWPATHNAMES | LEXFL_NOSTRINGESCAPECHARS );
|
||||
parser.LoadMemory( meshStr.c_str( ), meshStr.Size( ), "model:GltfmeshID" );
|
||||
parser.LoadMemory( meshStr.c_str(), meshStr.Size(), "model:GltfmeshID" );
|
||||
|
||||
idToken token;
|
||||
if( parser.ExpectAnyToken( &token ) )
|
||||
|
@ -381,7 +381,7 @@ bool gltfManager::ExtractMeshIdentifier( idStr& filename, int& meshId, idStr& me
|
|||
void idRenderModelGLTF::ProcessNode( gltfNode* modelNode, idMat4 trans, gltfData* data )
|
||||
{
|
||||
auto& meshList = data->MeshList();
|
||||
auto& nodeList = data->NodeList( );
|
||||
auto& nodeList = data->NodeList();
|
||||
|
||||
gltfData::ResolveNodeMatrix( modelNode );
|
||||
idMat4 curTrans = trans * modelNode->matrix;
|
||||
|
@ -397,9 +397,9 @@ void idRenderModelGLTF::ProcessNode( gltfNode* modelNode, idMat4 trans, gltfData
|
|||
gltfMaterial* mat = NULL;
|
||||
if( prim->material != -1 )
|
||||
{
|
||||
mat = data->MaterialList( )[prim->material];
|
||||
mat = data->MaterialList()[prim->material];
|
||||
}
|
||||
if( mat != NULL && !gltf_ForceBspMeshTexture.GetBool( ) )
|
||||
if( mat != NULL && !gltf_ForceBspMeshTexture.GetBool() )
|
||||
{
|
||||
surf.shader = declManager->FindMaterial( mat->name );
|
||||
}
|
||||
|
@ -407,20 +407,20 @@ void idRenderModelGLTF::ProcessNode( gltfNode* modelNode, idMat4 trans, gltfData
|
|||
{
|
||||
surf.shader = declManager->FindMaterial( "textures/base_wall/snpanel2rust" );
|
||||
}
|
||||
surf.id = this->NumSurfaces( );
|
||||
surf.id = this->NumSurfaces();
|
||||
|
||||
srfTriangles_t* tri = R_AllocStaticTriSurf( );
|
||||
tri->numIndexes = newMesh->GetNumPolygons( ) * 3;
|
||||
tri->numVerts = newMesh->GetNumVertices( );
|
||||
srfTriangles_t* tri = R_AllocStaticTriSurf();
|
||||
tri->numIndexes = newMesh->GetNumPolygons() * 3;
|
||||
tri->numVerts = newMesh->GetNumVertices();
|
||||
|
||||
R_AllocStaticTriSurfIndexes( tri, tri->numIndexes );
|
||||
R_AllocStaticTriSurfVerts( tri, tri->numVerts );
|
||||
|
||||
int indx = 0;
|
||||
for( int i = 0; i < newMesh->GetNumPolygons( ); i++ )
|
||||
for( int i = 0; i < newMesh->GetNumPolygons(); i++ )
|
||||
{
|
||||
auto& face = newMesh->GetFace( i );
|
||||
auto& faceIdxs = face.GetIndexes( );
|
||||
auto& faceIdxs = face.GetIndexes();
|
||||
tri->indexes[indx] = faceIdxs[0];
|
||||
tri->indexes[indx + 1] = faceIdxs[1];
|
||||
tri->indexes[indx + 2] = faceIdxs[2];
|
||||
|
@ -429,7 +429,7 @@ void idRenderModelGLTF::ProcessNode( gltfNode* modelNode, idMat4 trans, gltfData
|
|||
|
||||
for( int i = 0; i < tri->numVerts; ++i )
|
||||
{
|
||||
tri->verts[i] = newMesh->GetDrawVerts( )[i];
|
||||
tri->verts[i] = newMesh->GetDrawVerts()[i];
|
||||
tri->bounds.AddPoint( tri->verts[i].xyz );
|
||||
}
|
||||
|
||||
|
@ -455,7 +455,7 @@ void idRenderModelGLTF::InitFromFile( const char* fileName )
|
|||
idStr gltfFileName = idStr( fileName );
|
||||
gltfManager::ExtractMeshIdentifier( gltfFileName, meshID, meshName );
|
||||
|
||||
if( gltfParser->currentFile.Length( ) )
|
||||
if( gltfParser->currentFile.Length() )
|
||||
{
|
||||
if( gltfParser->currentAsset && gltfParser->currentFile != gltfFileName )
|
||||
{
|
||||
|
@ -467,7 +467,7 @@ void idRenderModelGLTF::InitFromFile( const char* fileName )
|
|||
timeStamp = fileSystem->GetTimestamp( gltfFileName );
|
||||
gltfData* data = gltfParser->currentAsset;
|
||||
|
||||
bounds.Clear( );
|
||||
bounds.Clear();
|
||||
|
||||
gltfNode* modelNode = data->GetNode( "models", meshName );
|
||||
\
|
||||
|
@ -496,17 +496,17 @@ void idRenderModelGLTF::WriteBinaryModel( idFile* file, ID_TIME_T* _timeStamp /*
|
|||
common->Warning( "idRenderModelGLTF::WriteBinaryModel is not implemented." );
|
||||
}
|
||||
|
||||
void idRenderModelGLTF::PurgeModel( )
|
||||
void idRenderModelGLTF::PurgeModel()
|
||||
{
|
||||
common->Warning( "idRenderModelGLTF::PurgeModel is not implemented." );
|
||||
}
|
||||
|
||||
void idRenderModelGLTF::LoadModel( )
|
||||
void idRenderModelGLTF::LoadModel()
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
}
|
||||
|
||||
void idRenderModelGLTF::TouchData( )
|
||||
void idRenderModelGLTF::TouchData()
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
}
|
||||
|
@ -518,23 +518,23 @@ void idRenderModelGLTF::CreateBuffers()
|
|||
}
|
||||
*/
|
||||
|
||||
void idRenderModelGLTF::Print( ) const
|
||||
void idRenderModelGLTF::Print() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
}
|
||||
|
||||
void idRenderModelGLTF::List( ) const
|
||||
void idRenderModelGLTF::List() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
}
|
||||
|
||||
int idRenderModelGLTF::Memory( ) const
|
||||
int idRenderModelGLTF::Memory() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
return -1;
|
||||
}
|
||||
|
||||
dynamicModel_t idRenderModelGLTF::IsDynamicModel( ) const
|
||||
dynamicModel_t idRenderModelGLTF::IsDynamicModel() const
|
||||
{
|
||||
return DM_STATIC;
|
||||
}
|
||||
|
@ -545,13 +545,13 @@ idRenderModel* idRenderModelGLTF::InstantiateDynamicModel( const struct renderEn
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
int idRenderModelGLTF::NumJoints( ) const
|
||||
int idRenderModelGLTF::NumJoints() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
return 0;
|
||||
}
|
||||
|
||||
const idMD5Joint* idRenderModelGLTF::GetJoints( ) const
|
||||
const idMD5Joint* idRenderModelGLTF::GetJoints() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
return nullptr;
|
||||
|
@ -569,7 +569,7 @@ const char* idRenderModelGLTF::GetJointName( jointHandle_t handle ) const
|
|||
return "";
|
||||
}
|
||||
|
||||
const idJointQuat* idRenderModelGLTF::GetDefaultPose( ) const
|
||||
const idJointQuat* idRenderModelGLTF::GetDefaultPose() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
return nullptr;
|
||||
|
|
|
@ -23,22 +23,22 @@ public:
|
|||
virtual void InitFromFile( const char* fileName );
|
||||
virtual bool LoadBinaryModel( idFile* file, const ID_TIME_T sourceTimeStamp );
|
||||
virtual void WriteBinaryModel( idFile* file, ID_TIME_T* _timeStamp = NULL ) const;
|
||||
virtual dynamicModel_t IsDynamicModel( ) const;
|
||||
virtual dynamicModel_t IsDynamicModel() const;
|
||||
virtual idBounds Bounds( const struct renderEntity_s* ent ) const;
|
||||
virtual void Print( ) const;
|
||||
virtual void List( ) const;
|
||||
virtual void TouchData( );
|
||||
virtual void PurgeModel( );
|
||||
virtual void LoadModel( );
|
||||
virtual int Memory( ) const;
|
||||
virtual void Print() const;
|
||||
virtual void List() const;
|
||||
virtual void TouchData();
|
||||
virtual void PurgeModel();
|
||||
virtual void LoadModel();
|
||||
virtual int Memory() const;
|
||||
virtual idRenderModel* InstantiateDynamicModel( const struct renderEntity_s* ent, const viewDef_t* view, idRenderModel* cachedModel );
|
||||
virtual int NumJoints( ) const;
|
||||
virtual const idMD5Joint* GetJoints( ) const;
|
||||
virtual int NumJoints() const;
|
||||
virtual const idMD5Joint* GetJoints() const;
|
||||
virtual jointHandle_t GetJointHandle( const char* name ) const;
|
||||
virtual const char* GetJointName( jointHandle_t handle ) const;
|
||||
virtual const idJointQuat* GetDefaultPose( ) const;
|
||||
virtual const idJointQuat* GetDefaultPose() const;
|
||||
virtual int NearestJoint( int surfaceNum, int a, int b, int c ) const;
|
||||
virtual bool SupportsBinaryModel( ) override
|
||||
virtual bool SupportsBinaryModel() override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -259,23 +259,23 @@ public:
|
|||
|
||||
void BindProgram( int progIndex );
|
||||
|
||||
void BindShader_GUI( )
|
||||
void BindShader_GUI()
|
||||
{
|
||||
BindShader_Builtin( BUILTIN_GUI );
|
||||
}
|
||||
|
||||
void BindShader_Color( )
|
||||
void BindShader_Color()
|
||||
{
|
||||
BindShader_Builtin( BUILTIN_COLOR );
|
||||
}
|
||||
|
||||
// RB begin
|
||||
void BindShader_ColorSkinned( )
|
||||
void BindShader_ColorSkinned()
|
||||
{
|
||||
BindShader_Builtin( BUILTIN_COLOR_SKINNED );
|
||||
}
|
||||
|
||||
void BindShader_VertexColor( )
|
||||
void BindShader_VertexColor()
|
||||
{
|
||||
BindShader_Builtin( BUILTIN_VERTEX_COLOR );
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ public:
|
|||
}
|
||||
// RB end
|
||||
|
||||
void BindShader_Texture( )
|
||||
void BindShader_Texture()
|
||||
{
|
||||
BindShader_Builtin( BUILTIN_TEXTURED );
|
||||
}
|
||||
|
|
|
@ -58,9 +58,9 @@ public:
|
|||
//Unused methods are stubs
|
||||
void OnBufferStart( void* pBufferContext ) { }
|
||||
void OnLoopEnd( void* pBufferContext ) { }
|
||||
void OnStreamEnd( ) { }
|
||||
void OnStreamEnd() { }
|
||||
void OnVoiceError( void* pBufferContext, HRESULT Error ) { }
|
||||
void OnVoiceProcessingPassEnd( ) { }
|
||||
void OnVoiceProcessingPassEnd() { }
|
||||
void OnVoiceProcessingPassStart( UINT32 BytesRequired ) { }
|
||||
};
|
||||
|
||||
|
|
|
@ -518,7 +518,7 @@ bool idSWFTextInstance::UpdateSubtitle( int time )
|
|||
}
|
||||
}
|
||||
|
||||
if( subNextStartIndex + 1 >= text.Length( ) )
|
||||
if( subNextStartIndex + 1 >= text.Length() )
|
||||
{
|
||||
subForceKillQueued = true;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ public:
|
|||
}
|
||||
void SubtitleCleanup();
|
||||
float GetTextLength();
|
||||
int GetInputStartChar( )
|
||||
int GetInputStartChar()
|
||||
{
|
||||
return inputTextStartChar;
|
||||
}
|
||||
|
|
|
@ -519,7 +519,7 @@ int main( int argc, const char** argv )
|
|||
Sys_Printf( "memory consistency checking enabled\n" );
|
||||
#endif
|
||||
|
||||
Posix_EarlyInit( );
|
||||
Posix_EarlyInit();
|
||||
|
||||
if( argc > 1 )
|
||||
{
|
||||
|
@ -530,7 +530,7 @@ int main( int argc, const char** argv )
|
|||
common->Init( 0, NULL, NULL );
|
||||
}
|
||||
|
||||
Posix_LateInit( );
|
||||
Posix_LateInit();
|
||||
|
||||
|
||||
while( 1 )
|
||||
|
|
|
@ -455,7 +455,7 @@ int main( int argc, const char** argv )
|
|||
cmdargv = argv;
|
||||
// DG end
|
||||
|
||||
Posix_EarlyInit( );
|
||||
Posix_EarlyInit();
|
||||
|
||||
if( argc > 1 )
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ int main( int argc, const char** argv )
|
|||
common->Init( 0, NULL, NULL );
|
||||
}
|
||||
|
||||
Posix_LateInit( );
|
||||
Posix_LateInit();
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
|
|
|
@ -286,9 +286,9 @@ double MeasureClockTicks()
|
|||
{
|
||||
double t0, t1;
|
||||
|
||||
t0 = Sys_GetClockTicks( );
|
||||
t0 = Sys_GetClockTicks();
|
||||
Sys_Sleep( 1000 );
|
||||
t1 = Sys_GetClockTicks( );
|
||||
t1 = Sys_GetClockTicks();
|
||||
return t1 - t0;
|
||||
}
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ void Posix_LateInit()
|
|||
//common->Printf( "%d MB Video Memory\n", Sys_GetVideoRam() );
|
||||
//#endif
|
||||
|
||||
//Posix_StartAsyncThread( );
|
||||
//Posix_StartAsyncThread();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -37,13 +37,13 @@ void Posix_QueEvent( sysEventType_t type, int value, int value2, int ptrLength,
|
|||
const char* Posix_Cwd();
|
||||
|
||||
// called first thing. does InitSigs and various things
|
||||
void Posix_EarlyInit( );
|
||||
void Posix_EarlyInit();
|
||||
// called after common has been initialized
|
||||
void Posix_LateInit( );
|
||||
void Posix_LateInit();
|
||||
|
||||
void Posix_InitPThreads( );
|
||||
void Posix_InitSigs( );
|
||||
void Posix_ClearSigs( );
|
||||
void Posix_InitPThreads();
|
||||
void Posix_InitSigs();
|
||||
void Posix_ClearSigs();
|
||||
|
||||
void Posix_Exit( int ret );
|
||||
void Posix_SetExit( int ret ); // override the exit code
|
||||
|
|
|
@ -71,7 +71,7 @@ static char fatalError[ 1024 ];
|
|||
Posix_ClearSigs
|
||||
================
|
||||
*/
|
||||
void Posix_ClearSigs( )
|
||||
void Posix_ClearSigs()
|
||||
{
|
||||
struct sigaction action;
|
||||
int i;
|
||||
|
@ -129,7 +129,7 @@ static void sig_handler( int signum, siginfo_t* info, void* context )
|
|||
Posix_InitSigs
|
||||
================
|
||||
*/
|
||||
void Posix_InitSigs( )
|
||||
void Posix_InitSigs()
|
||||
{
|
||||
struct sigaction action;
|
||||
int i;
|
||||
|
|
|
@ -1778,7 +1778,7 @@ idSessionLocal::EndMatch
|
|||
this is for when the game is over before we go back to lobby. Need this incase the host leaves during this time
|
||||
========================
|
||||
*/
|
||||
void idSessionLocal::MatchFinished( )
|
||||
void idSessionLocal::MatchFinished()
|
||||
{
|
||||
if( verify( GetActingGameStateLobby().IsHost() ) )
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ void IN_DeactivateKeyboard()
|
|||
{
|
||||
return;
|
||||
}
|
||||
win32.g_pKeyboard->Unacquire( );
|
||||
win32.g_pKeyboard->Unacquire();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -102,7 +102,7 @@ typedef enum D3_PROCESS_DPI_AWARENESS
|
|||
void Sys_SetDPIAwareness()
|
||||
{
|
||||
// For Vista, Win7 and Win8
|
||||
BOOL( WINAPI * SetProcessDPIAware )( void ) = NULL;
|
||||
BOOL( WINAPI * SetProcessDPIAware )() = NULL;
|
||||
|
||||
/* Win8.1 and later */
|
||||
HRESULT( WINAPI * SetProcessDpiAwareness )( D3_PROCESS_DPI_AWARENESS dpiAwareness ) = NULL;
|
||||
|
@ -111,7 +111,7 @@ void Sys_SetDPIAwareness()
|
|||
HINSTANCE userDLL = LoadLibrary( "USER32.DLL" );
|
||||
if( userDLL )
|
||||
{
|
||||
SetProcessDPIAware = ( BOOL( WINAPI* )( void ) ) GetProcAddress( userDLL, "SetProcessDPIAware" );
|
||||
SetProcessDPIAware = ( BOOL( WINAPI* )() ) GetProcAddress( userDLL, "SetProcessDPIAware" );
|
||||
}
|
||||
|
||||
HINSTANCE shcoreDLL = LoadLibrary( "SHCORE.DLL" );
|
||||
|
@ -713,7 +713,7 @@ Sys_GogBasePath
|
|||
*/
|
||||
static char gogPathBuffer[MAX_OSPATH] = { 0 };
|
||||
|
||||
static const char* Sys_GogBasePath( void )
|
||||
static const char* Sys_GogBasePath()
|
||||
{
|
||||
#ifdef GOGPATH_ID
|
||||
HKEY gogRegKey;
|
||||
|
|
|
@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
idChoiceWindow::InitVars
|
||||
============
|
||||
*/
|
||||
void idChoiceWindow::InitVars( )
|
||||
void idChoiceWindow::InitVars()
|
||||
{
|
||||
if( cvarStr.Length() )
|
||||
{
|
||||
|
|
|
@ -186,7 +186,7 @@ void idEditWindow::Draw( int time, float x, float y )
|
|||
|
||||
if( wrap && scroller->GetHigh() > 0.0f )
|
||||
{
|
||||
float lineHeight = GetMaxCharHeight( ) + 5;
|
||||
float lineHeight = GetMaxCharHeight() + 5;
|
||||
rect.y -= scroller->GetValue() * lineHeight;
|
||||
rect.w -= sizeBias;
|
||||
rect.h = ( breaks.Num() + 1 ) * lineHeight;
|
||||
|
@ -629,7 +629,7 @@ void idEditWindow::EnsureCursorVisible()
|
|||
}
|
||||
}
|
||||
}
|
||||
int maxWidth = GetMaxCharWidth( );
|
||||
int maxWidth = GetMaxCharWidth();
|
||||
int left = cursorX - maxWidth;
|
||||
int right = ( cursorX - textRect.w ) + maxWidth;
|
||||
|
||||
|
@ -718,7 +718,7 @@ void idEditWindow::Activate( bool activate, idStr& act )
|
|||
idEditWindow::InitCvar
|
||||
============
|
||||
*/
|
||||
void idEditWindow::InitCvar( )
|
||||
void idEditWindow::InitCvar()
|
||||
{
|
||||
if( cvarStr[0] == '\0' )
|
||||
{
|
||||
|
|
|
@ -663,16 +663,16 @@ void idGuiScript::FixupParms( idWindow* win )
|
|||
rect = *( dynamic_cast<idWinRectangle*>( dest ) );
|
||||
ownerparent->ClientToScreen( &rect );
|
||||
destparent->ScreenToClient( &rect );
|
||||
*v4 = rect.ToVec4( );
|
||||
*v4 = rect.ToVec4();
|
||||
}
|
||||
else
|
||||
{
|
||||
v4->Set( dest->c_str( ) );
|
||||
v4->Set( dest->c_str() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
v4->Set( dest->c_str( ) );
|
||||
v4->Set( dest->c_str() );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -424,7 +424,7 @@ void idSliderWindow::Activate( bool activate, idStr& act )
|
|||
idSliderWindow::InitCvar
|
||||
============
|
||||
*/
|
||||
void idSliderWindow::InitCvar( )
|
||||
void idSliderWindow::InitCvar()
|
||||
{
|
||||
if( cvarStr[0] == '\0' )
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ void idWindow::CleanUp()
|
|||
}
|
||||
|
||||
// ensure the register list gets cleaned up
|
||||
regList.Reset( );
|
||||
regList.Reset();
|
||||
|
||||
// Cleanup the named events
|
||||
namedEvents.DeleteContents( true );
|
||||
|
@ -529,7 +529,7 @@ void idWindow::Activate( bool activate, idStr& act )
|
|||
int n = ( activate ) ? ON_ACTIVATE : ON_DEACTIVATE;
|
||||
|
||||
// make sure win vars are updated before activation
|
||||
UpdateWinVars( );
|
||||
UpdateWinVars();
|
||||
|
||||
RunScript( n );
|
||||
int c = children.Num();
|
||||
|
@ -693,7 +693,7 @@ void idWindow::RunNamedEvent( const char* eventName )
|
|||
int c;
|
||||
|
||||
// Find and run the event
|
||||
c = namedEvents.Num( );
|
||||
c = namedEvents.Num();
|
||||
for( i = 0; i < c; i ++ )
|
||||
{
|
||||
if( namedEvents[i]->mName.Icmp( eventName ) )
|
||||
|
@ -2580,7 +2580,7 @@ bool idWindow::Parse( idTokenParser* src, bool rebuild )
|
|||
while( token != "}" )
|
||||
{
|
||||
// track what was parsed so we can maintain it for the guieditor
|
||||
src->SetMarker( );
|
||||
src->SetMarker();
|
||||
|
||||
if( token == "windowDef" || token == "animationDef" )
|
||||
{
|
||||
|
@ -2760,7 +2760,7 @@ bool idWindow::Parse( idTokenParser* src, bool rebuild )
|
|||
|
||||
rvNamedEvent* ev = new( TAG_OLD_UI ) rvNamedEvent( token );
|
||||
|
||||
src->SetMarker( );
|
||||
src->SetMarker();
|
||||
|
||||
if( !ParseScript( src, *ev->mEvent ) )
|
||||
{
|
||||
|
@ -2782,7 +2782,7 @@ bool idWindow::Parse( idTokenParser* src, bool rebuild )
|
|||
ev->time = atoi( token.c_str() );
|
||||
|
||||
// reset the mark since we dont want it to include the time
|
||||
src->SetMarker( );
|
||||
src->SetMarker();
|
||||
|
||||
if( !ParseScript( src, *ev->event, &ev->time ) )
|
||||
{
|
||||
|
@ -2805,7 +2805,7 @@ bool idWindow::Parse( idTokenParser* src, bool rebuild )
|
|||
|
||||
// add the float to the editors wrapper dict
|
||||
// Set the marker after the float name
|
||||
src->SetMarker( );
|
||||
src->SetMarker();
|
||||
|
||||
// Read in the float
|
||||
regList.AddReg( work, idRegister::FLOAT, src, this, varf );
|
||||
|
@ -2820,7 +2820,7 @@ bool idWindow::Parse( idTokenParser* src, bool rebuild )
|
|||
|
||||
// set the marker so we can determine what was parsed
|
||||
// set the marker after the vec4 name
|
||||
src->SetMarker( );
|
||||
src->SetMarker();
|
||||
|
||||
// FIXME: how about we add the var to the desktop instead of this window so it won't get deleted
|
||||
// when this window is destoyed which even happens during parsing with simple windows ?
|
||||
|
@ -2839,7 +2839,7 @@ bool idWindow::Parse( idTokenParser* src, bool rebuild )
|
|||
|
||||
// add the float to the editors wrapper dict
|
||||
// set the marker to after the float name
|
||||
src->SetMarker( );
|
||||
src->SetMarker();
|
||||
|
||||
// Parse the float
|
||||
regList.AddReg( work, idRegister::FLOAT, src, this, varf );
|
||||
|
@ -4651,7 +4651,7 @@ Returns the number of children
|
|||
*/
|
||||
int idWindow::GetChildCount()
|
||||
{
|
||||
return drawWindows.Num( );
|
||||
return drawWindows.Num();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4835,12 +4835,12 @@ bool idWindow::UpdateFromDictionary( idDict& dict )
|
|||
const idKeyValue* kv;
|
||||
int i;
|
||||
|
||||
SetDefaults( );
|
||||
SetDefaults();
|
||||
|
||||
// Clear all registers since they will get recreated
|
||||
regList.Reset( );
|
||||
expressionRegisters.Clear( );
|
||||
ops.Clear( );
|
||||
regList.Reset();
|
||||
expressionRegisters.Clear();
|
||||
ops.Clear();
|
||||
|
||||
for( i = 0; i < dict.GetNumKeyVals(); i ++ )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue