Commit Graph

59 Commits (b8f038d37a3d63812c3c1f5f3620679aee2f3234)

Author SHA1 Message Date
Giel van Schijndel 6e5038d237 use (u)intX_t types for structs send accross the network (for the size guarantees)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1672 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 22:55:12 +00:00
Stefan Huehner d30dcb1520 2 small fixes in function declarations : () -> (void)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1663 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 13:51:53 +00:00
Per Inge Mathisen fc3d29124d Weed out some deadwood from the multiplayer code, and fix a warning.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1653 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-17 14:00:15 +00:00
Giel van Schijndel 48f37b22d9 * Fix wrong interpretation of number of games (only the first byte of the 32bit long unsigned integer was used)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1630 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 18:52:29 +00:00
Giel van Schijndel 0a590a79af * Use network byte-order (big-endian) for size of game list as response to "list" command
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1629 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 18:19:22 +00:00
Giel van Schijndel 7b025ea3e1 * Make our lobby protocol code endian safe (response of a "list" command now always is preceded by a 32bit long, unsigned, little endian integer)
* Remove parameter `BOOL async` of NETfindGame since it wasn't used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1628 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 17:31:12 +00:00
Giel van Schijndel 70c07901ae * Remove unused spectator functions: NETspectate and NETisSpectator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1626 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:36:46 +00:00
Giel van Schijndel a2d13bc53c * remove lib/netplay/netaudio_stub.c (only had empty functions)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1625 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:33:44 +00:00
Giel van Schijndel 1689bd9dc9 * Remove unused function NEThashFile
(This function was only used to generate a hash from the compiled Warzone executable, this hash was then used as a security value across the network. This method won't work when using different compilers, OSes, etc.)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1624 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 10:57:08 +00:00
Dennis Schridde 49b314f6a2 - Fix masterserver disconnect (patch by Gerard)
- Show hostname:port on connection errors
- Make gameserver and masterserver port configurable (as well as the masterserver name)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1512 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 13:46:28 +00:00
Ari Johnson c79ff3b3c4 Fix to #include order in r1496
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1497 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-18 14:46:38 +00:00
Dennis Schridde f6da22d739 _MACOSX_ -> WZ_OS_MAC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1496 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-18 12:40:50 +00:00
Ari Johnson 91535c6596 Converted MacOS port to use Xcode to produce a universal binary. Warzone
will henceforth require MacOS 10.4 "Tiger" to run.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1492 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-18 03:10:53 +00:00
Stefan Huehner aa1cb2ec14 Remove references to already removed header files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1431 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 18:29:58 +00:00
Gerard Krol 6671fa934e 1. Removed the terrible memory leaks from the resource system. 2. Fixed the memory leaks for the terrain tiles. 3. Fixed a lot of uninitialised
variables. 4. Commented out some unused sound code.
I just love Valgrind :)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1390 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-07 13:23:14 +00:00
Dennis Schridde 3b09a756df - Remove unneeded gettext files and instead create them via autopoint
- Remove unneeded checks from autogen.sh (all of them are also checked in configure.ac)
- Move AM_CPPFLAGS=-$(top_srcdir), which was included in nearly every Makefile, to configure.ac
- Remove -g from CFLAGS for usual builds. This should be set by the buildscripts instead
- Remove CFLAGS_OVERRIDE, which was rendered obsolete by the above change


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1332 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-02 17:21:05 +00:00
Stefan Huehner 59843ec8a2 Code-cleanup:
- make a lot of functions static
- remove unused extern declarations
- fix one function declarations () -> (void)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1254 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 20:23:35 +00:00
Dennis Schridde 2a74242eb3 - Replaced various vectors with Vector3i and Vector3f (idea by Watermelon)
- Vector3i from lib/ivis also used in lib/audio, maybe want to move it to some more generic place?
- Replace iPoint with Vector2i
- Remove additional integer type declarations from pietypes.h
- Rename all iSprite to iTexture
- Various warning fixes: Unsigned/signed comparisons, uninitialized variables, declared but not defined symbols
- Replace DEBUG_BLOCK with DEBUG_MALLOC (it was virtually the same)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1245 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 16:20:16 +00:00
Gerard Krol 4465a061c1 Fix warnings, and revert r1241 for effects.c (validatePie really needs a prototype at the top)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1242 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 23:17:09 +00:00
Dennis Schridde 8a70df4064 Use some more advanced Automake techniques like noinst_HEADERS. Changes partly autogenerated by KDevelop, so this should be compatible with Automake 1.6.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1118 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-16 14:36:03 +00:00
Giel van Schijndel 7250eff5b6 * Remove yet another set of unused (or empty) functions
* Remove an unused, local, function-variable
 * Remove some file-global, static variables

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1051 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-29 23:17:46 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Giel van Schijndel e2de942f02 * fixed some compiler warnings
- except for script and sound all libs can now be compiled using -Werror (means they generate no warnings) and without -fpermissive except for the files generated by flex
  - netplay/netplay.c: changed variable size from unsigned to signed according to SDL spec ( http://www.libsdl.org/cgi/docwiki.cgi/SDLNet_5fTCP_5fSend )

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@958 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 20:24:26 +00:00
Giel van Schijndel 3d23a48076 * expand the use of compiler-guards (C preprocessor macros) so that not only the forward declarations and referring macros are guarded, but the referred functions as well
* remove some unused things: variables, macros (MEMORYREPORT, MEMORYTREAP)
 * fix some signing errors:
  * change assignments of/comparisons with -1 to unsigned variables ((-1) directly, not through a preprocessor directive) to ~0 (left OpenAL-code alone)
  * remove some casts to (SDWORD) in comparisons which actually cause signed/unsigned errors rather than fix them
  * redefine some vars as unsigned

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@955 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 17:03:32 +00:00
Dennis Schridde 87da22bce1 - Fix maybe bugs introduced in last commits
- Fix a lot of char* related warnings (fixing of scripttabs.c needs to be finished like I started it)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@867 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 13:45:04 +00:00
Dennis Schridde f25a9aa3ac Not yet changed parts from patches of Christian Ohm:
003 - Remove all references to hWnd
004 - Remove DirectDraw flag
005 - Remove DDrawDriverName and D3DDriverName
006 - Remove all references to hInstance
007 - Remove some unused Windows types
008 - Remove VidMem parameter
009 - Remove bitdepth variables


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@862 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 11:39:54 +00:00
Dennis Schridde fafa69842f x86_64 fixes by Pseudonym404. (Incl. some minor other changes, eg in src/game.c)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@854 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-25 01:26:05 +00:00
Dennis Schridde fb74a1f8dc Patch by Thomas Rast: Include string.h against warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@821 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 14:40:07 +00:00
Dennis Schridde 770af57c20 Remove more extra types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@812 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 23:16:51 +00:00
Dennis Schridde 67056c8d24 - Droped a lot of (nearly) unused types from lib/framework/types.h
- Remove lots of unused functions (Windows/DDraw related)
- Now store the used bitdepth in the config and thus make it configurable without having to modify the sourcecode


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@808 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 01:11:26 +00:00
Dennis Schridde d3cd44148d Patch by Gerard Krol: Replace STRING with char (STRING was confusingly defined to char)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@804 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-03 21:35:50 +00:00
Roman C aa25866177 -Fixed AIs getting renamed when changing player number in MP games.
-Prevented NETbcast() from flooding the log in games with no network communication.
-orderDroidObj() scripting function will no longer cause ASSERT when DORDER_DROIDPERAIR is passed as parameter.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@773 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-02 17:58:10 +00:00
Stefan Huehner 30f6dc392e mark some Strings an read-only by adding const.
On the way replace STRING with char



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@756 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-24 19:11:34 +00:00
Dennis Schridde 3261a09baf BIG cleanup of headers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@749 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 17:24:55 +00:00
Dennis Schridde 75af155bbf Patches by Stefan Huehner: "code cleanup: void 5, static 4" and a slightly modified "doxy 1"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@717 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-16 17:41:40 +00:00
Dennis Schridde 7e8990c661 Patch by Stefan Huehner: "code cleanup: static"
Patch marks several function & datastructures without prototypes, which aren't used outside their declaring sourcefiles as static.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@708 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 21:14:47 +00:00
Dennis Schridde 728b9a9913 - Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner
- Replace every occurence of VOID with void (and LPVOID with void*)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 09:09:05 +00:00
Dennis Schridde e52dba36cc Corrected false error messages, old printfs
netplay.c got a bunch of new LOG_NET debug()s whose effects on performance have not been tested


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@619 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 15:27:20 +00:00
Dennis Schridde ed62f97175 debug.c: Add callback to output to a win32 debugger. (Registered in main.c)
frame.h: Sync MAX_PATH with windef.h and require IE5 for SHGetFolderPath
types.h: Use stdint.h on MinGW and use __int* types on MSVC
lib/netplay/: Remove empty files
main.c: Use "Documents and Settings\Username\My Documents\Warzone 2.0" (in local lang) as writedir on Windows

Fix double definitions in last commit.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@612 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 12:19:17 +00:00
Dennis Schridde 62ae49b0ce Replaced all occurences of DBMB, DBPRINTF and DBERROR with their former define.
( DBPRINTF(("Message")); becomes debug( LOG_NEVER, "Message" ); )



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@608 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-22 14:28:49 +00:00
Per Inge Mathisen 2149739999 Almost all strings and buffers are now of type char. This fixes
more than half the warnings on gcc4, and makes sure we do not
get signedness problems between platforms where char is defined
with different signedness. Also set line-ending properites for
some bison/flex files that did not have it set.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@563 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 16:52:37 +00:00
Per Inge Mathisen ecb223924a Remove DirectX types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@553 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 16:05:52 +00:00
Per Inge Mathisen a3df2ad6c8 Another force fix. Remove more references to DirectX.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@552 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 13:53:26 +00:00
Per Inge Mathisen 8327ec1092 Fix bug#6531, crash on saving/loading forces. Also add better logging, and
fix some similar but unrelated bugs where the PHYSFS_close() return value is
misinterpreted. Can still not select forces from the multiplayer dialog,
but I also have no idea how this is supposed to work.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@542 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-06 10:23:39 +00:00
Dennis Schridde 3116f462fc New Makefile.raw system, works with MinGW/Windows environment and Linux also.
Uses a config.mk.tmpl file to set system dependend stuff, no bash required.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@490 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 21:48:55 +00:00
Dennis Schridde 07dcf43518 Fix deprecated function declaration
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@489 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 21:46:23 +00:00
Per Inge Mathisen b8e4ca782f Remove security hole-in-a-function NetGetSt(), which was thankfully not used
anywhere in the code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@487 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 20:01:01 +00:00
Per Inge Mathisen 6166aa48d3 Increase size of filename buffer in network code to avoid possibility of an
overflow.  Thanks to Luigi Auriemma <aluigi@autistici.org> for finding 
and reporting the problem.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@486 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 19:38:55 +00:00
Dennis Schridde c9407f3059 Log netplay.log to the writedir instead of working dir.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@443 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-21 17:15:18 +00:00
Dennis Schridde 194026f379 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.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@436 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-16 19:10:23 +00:00