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.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@436 4a71c877-e1ca-e34f-864e-861f7616d084
- Fixed several files for being C89 compatible, so MSVC compiles them. (No variable declarations after function calls allowed.)
- Added function definitions (lib/framework/win32fixes.h) for functions with different names under Win32/Linux. (Aiming at moving all platform specific defines into such headers. Everywhere included frame.h should make this easy.)
- Please take a look at lib/gamelib/audp_parser.y. I had to convert the lowercase token "text" to uppercase "TEXT", so it doesn't collide with msxml.h (mysteriously included by some windows headers).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@433 4a71c877-e1ca-e34f-864e-861f7616d084
Same as in r431, but now for lib/
- converted the sources in lib/ to use full path includes instead of just the filename.
- marked places where lib/ivis_*implementation* (eg opengl) is needed, because of incomplete lib/ivis_common.
Should improve the understanding of interfaces and code organization.
(Also fixed a double slash (//) include in src/multimenu.c)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@432 4a71c877-e1ca-e34f-864e-861f7616d084
- marked places where lib/ivis_*implementation* (eg opengl) is needed, because of incomplete lib/ivis_common.
Should improve the understanding of interfaces and code organization.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@431 4a71c877-e1ca-e34f-864e-861f7616d084
- removed Gentoo fix from autogen.sh as it doesn't seem to be needed anymore
- converted "ugly hack"(tm) to a .Phony target in src/Makefile.am
changed version and revision retrieval of Warzone (displayed in the mainmenu):
- Before:
#define SVN_REVISION "..."
- defined in src/revision.h, included and used in src/frontend.c
- Now:
const char * version(); and const char * revision();
- declared in src/version.h, defined in src/version.c, called in src/frontend.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@430 4a71c877-e1ca-e34f-864e-861f7616d084
256 to 512 as requested by Grim. I hope this is sufficient. Not tested.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@429 4a71c877-e1ca-e34f-864e-861f7616d084
from videos. Will do until we get proper video support.
intelmap.c: Temporarily disable the Flic box, since it just loops on
noVideo.rpl until we have real video
intelmap.c: Hack displayImmediateMessage again to popup new
IntelScreen seqtext display
rpl_reader: Convert to PHYSFS calls
seqdisp.c: Move "novideo.rpl" squashing to sequence_stub.c
seqdisp.c: Fix seq_AddTextForVideo() prototype
scriptfuncs.c: Avoid race when winlose video callback needs to be called during displayImmediateMessage
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@425 4a71c877-e1ca-e34f-864e-861f7616d084
Reverted C1 tileset to the original one. Grim's work will
be available as a mod.
Readded 2 missing textures in the mp directory.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@423 4a71c877-e1ca-e34f-864e-861f7616d084
- Incremented version number for next release.
- Removed creation of autopackage/default.apspec in configure.ac, because it is useless for usuall builds and automatically created by makeinstaller on each run.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@421 4a71c877-e1ca-e34f-864e-861f7616d084
often way too fast for users to read, but it is a step in the right
direction. Patch by Angus Lees.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@420 4a71c877-e1ca-e34f-864e-861f7616d084
full rotation every 2 seconds, independent of frame rate. Patch
by Angus Lees.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@419 4a71c877-e1ca-e34f-864e-861f7616d084
possible to hit a div by zero bug in visibility.c:visibleObject().
Problem occurs when rayCast() calls rayLOSCallback() and the callback exits due to
(distSq >= tarDist) being true, without ever having executed the following block that
updates lastD. lastD remains 0 and the divide at the end of visibleObject throws a
SIGFPE. On any later occasion, the last distance value from the last calculation will be
reused in this case, which is still bogus but isn't fatal.
The fix is easy, just add "lastD = dist;" before the return in the (distSq >= tarDist)
case.
Patch by Angus Lees <gus> in bug #5761.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@418 4a71c877-e1ca-e34f-864e-861f7616d084
- Removed unused/outdated ivis02/Ivis02.dsp/.vcproj and src/mpdpxtra.[ch]
- Replaced src/mplayer.c with a stub, containing only mplayerSubmit()
- Added DEPRECATED warnings
- Added documentation for WZ_DEPRECATED
One commit follows, to finish the move from ivis02/v4101_stub.c to ivis02/v4101.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@415 4a71c877-e1ca-e34f-864e-861f7616d084
Fixed button highlight problem in the map selection GUI (was
a very funny bug :) ).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@410 4a71c877-e1ca-e34f-864e-861f7616d084
- Link libmad statically, as it is not provided in some distros.
- Automatically download physfs if not present.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@409 4a71c877-e1ca-e34f-864e-861f7616d084
- Added a WZ_DEPRECATED macro (lib/framework/macros.h) to mark deprecated functions.
(See http://websvn.kde.org/trunk/KDE/kdelibs/kdemacros.h.in?view=markup -> KDE_DEPRECATED for usage.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@406 4a71c877-e1ca-e34f-864e-861f7616d084
Instead added a README with instructions what to do to build a package.
- Fixed a small typo in package specs.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@405 4a71c877-e1ca-e34f-864e-861f7616d084
Also big amount of whitespace changes, sorry for the inconvenience...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@400 4a71c877-e1ca-e34f-864e-861f7616d084