Author: devurandom Date: Fri Jun 16 21:10:23 2006 New Revision: 78 URL: http://svn.gna.org/viewcvs/warzone?rev=78&view=rev Log: Rewritten mod loading
This patch includes: - Strongly modified way of adding mods, maps and addons - Make nearly everything use PhysFS (just netlog and debug stay) - Convert several DBERRORs etc. to debug() The new modloader works like this: For every mod supplied on the commandline ("-mod") (maximum of MAX_MODS=100) keep it in mind (char * global_mods[]). After initializing PhysFS do scanDataDirs(), which tries to register all possible paths, global_mods[] and maps with PhysFS. Dont check wether we succeed, only at the very end check if we got a "gamedesc.lev". When we buildMapList(), mark "gamedesc.lev" as MOD_CAMPAIGN, "addon.lev" and every user supplied map as MOD_MULTIPLAY. When we loadMods() modify the searchPath according to the supplied mods. Note: T1 maps like Sk-Rush come from gamedesc.lev, are marked MOD_CAMPAIGN and thus wont load any multiplay_mods[], even if the user starts a multplayer game. Instead those maps are threated as campaignmode and will only load campaign_mods[]. This patch requires the "mp" patches to be either in ProgramDir/mp, in ProgramDir/data/mp or in ProgramDir/mp.wz This is because one cannot add warzone.wz/mp to the search path if warzone.wz is an archive. Added: trunk/src/modding.h Modified: trunk/data/Makefile.am trunk/lib/framework/frame.h trunk/lib/framework/ignorecase.c trunk/lib/framework/win32fixes.h trunk/lib/ivis_common/fbf.c trunk/lib/ivis_common/piedef.h trunk/lib/ivis_common/piefunc.h trunk/lib/ivis_opengl/piefunc.c trunk/lib/netplay/netcrypt.c trunk/lib/netplay/netplay.c trunk/lib/sequence/rpl_reader.c trunk/lib/sound/cdaudio.c trunk/lib/sound/openal_track.c trunk/lib/sound/playlist.c trunk/src/clparse.c trunk/src/init.c trunk/src/init.h trunk/src/levels.c trunk/src/main.c trunk/src/multiint.c trunk/src/multistat.c trunk/src/seqdisp.c trunk/src/winmain.h _______________________________________________ Warzone-commits mailing list Warzone-commits@gna.org https://mail.gna.org/listinfo/warzone-commits