From 439dd89a479e2d02fa40a421849c73616f92198e Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Fri, 7 Dec 2007 17:29:24 +0000 Subject: Optimized FS_ListFiles (and broken Windows build). Initial changes to demo browser to support caching. --- source/ui_playermodels.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/ui_playermodels.c') diff --git a/source/ui_playermodels.c b/source/ui_playermodels.c index ac2e589..83f22a7 100644 --- a/source/ui_playermodels.c +++ b/source/ui_playermodels.c @@ -93,7 +93,7 @@ void PlayerModel_Load( void ) { /* ** get a list of directories */ - if( !( list = fs.ListFiles( NULL, "players/*/*", FS_SEARCH_BYFILTER|FS_SEARCH_SAVEPATH, &numFiles ) ) ) { + if( !( list = ( char ** )fs.ListFiles( NULL, "players/*/*", FS_SEARCH_BYFILTER|FS_SEARCH_SAVEPATH, &numFiles ) ) ) { return; } @@ -119,7 +119,7 @@ void PlayerModel_Load( void ) { } } - fs.FreeFileList( list ); + fs.FreeList( ( void ** )list ); if( !ndirs ) { return; @@ -146,7 +146,7 @@ void PlayerModel_Load( void ) { // verify the existence of at least one pcx skin Q_concat( scratch, sizeof( scratch ), "players/", dirnames[i], NULL ); - pcxnames = fs.ListFiles( scratch, ".pcx", 0, &npcxfiles ); + pcxnames = ( char ** )fs.ListFiles( scratch, ".pcx", 0, &npcxfiles ); if( !pcxnames ) { continue; } @@ -161,7 +161,7 @@ void PlayerModel_Load( void ) { } if( !nskins ) { - fs.FreeFileList( pcxnames ); + fs.FreeList( ( void ** )pcxnames ); continue; } @@ -178,11 +178,11 @@ void PlayerModel_Load( void ) { } } - fs.FreeFileList( pcxnames ); + fs.FreeList( ( void ** )pcxnames ); // load vweap models Q_concat( scratch, sizeof( scratch ), "players/", dirnames[i], "/w_*.md2", NULL ); - weaponNames = fs.ListFiles( NULL, scratch, FS_SEARCH_BYFILTER, &numWeapons ); + weaponNames = ( char ** )fs.ListFiles( NULL, scratch, FS_SEARCH_BYFILTER, &numWeapons ); pmi = &uis.pmi[uis.numPlayerModels++]; pmi->numWeapons = 0; @@ -199,7 +199,7 @@ void PlayerModel_Load( void ) { } } - fs.FreeFileList( weaponNames ); + fs.FreeList( ( void ** )weaponNames ); } // at this point we have a valid player model -- cgit v1.2.3