Commit Graph

2332 Commits (1ed72f87abf0793051dea02837c10db91b64add7)

Author SHA1 Message Date
Christian Ohm 9edf766645 Estonian uses et_EE for locale, not ee.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8152 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:08 +02:00
Christian Ohm 6010fd1da8 Add Estonian translation by Erlando.
From http://forums.wz2100.net/viewtopic.php?f=6&t=3772

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8150 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:07 +02:00
Christian Ohm 429fb34bfb Check for alloca.h in configure instead of hardcoding it.
Patch from #817.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8132 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:07 +02:00
Christian Ohm 69fcd0195e GLee: Move function pointer typedef into GLX_ARB_get_proc_address ifndef.
This prevents a redefinition when the system headers already define it. Fixes

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8115 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:03 +02:00
Buginator 2c03546f87 partial revert of r5763
Clean up and fix 3D sound.
We now have true 3D sound that works correctly.

See ticket:920 for more information about the revert.

fixes ticket:220


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8098 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:01 +02:00
Buginator cd24361f83 revert r3270
Bring back all the missing screams that were mistakenly removed, and also bring back the yell for help, since that will be used soon.  (all removed in r3270)
Also reverts r8025 / r8030 (see ticket:830 for more info) since I didn't know the sounds were removed.


fixes ticket:830

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8097 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:01 +02:00
Per Inge Mathisen f9c98cfbc0 Add new scripting function droidCanReach(droid, x, y) that checks whether the given droid
can ever reach the given destination with its propulsion method. See ticket:838


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8072 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:20:55 +02:00
i-nod f9cb87f05a Changed widget definition to a hex style.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8070 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:20:54 +02:00
Buginator 4e41d11dba Fix minGW compiles on windows.
Patch by i-NoD.

Thanks for the patch!

Closes ticket:835


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8044 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:14 +02:00
Buginator 61763ee07d When a "looped" sample has finished playing, we reset iAudioID, so the game adds the sample again into the queue. This is the way most other "looped" samples are currently handled by the game. (oil/power/factory steam, and so on)
see:770
fixes:770


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8031 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:12 +02:00
Buginator 5eff6347d8 Fix cross-compiled builds again, by removing (commenting out) a invalid language option for cross compiled builds, LANG_LATIN.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8029 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:12 +02:00
Per Inge Mathisen 63589d31bf The following patch simplifies the screenInitialise function,
by removing some superfluous flags. This closes ticket:102
by EvilGuru, committing only the substantial parts to avoid
merge collisions with other trees.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8023 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:11 +02:00
Christian Ohm 5accd8f706 Commit the cleaned up version of Buginator's sound patch. Closes #770.
This fixes the removal of unused sources, which didn't work correctly before.
The number of sources is still not limited, but the number of sounds used
concurrently is much lower now.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8010 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:09 +02:00
Christian Ohm 715c6c6b69 Increase video buffer size from 4K to 256K.
This fixes playback of videos with a bitrate larger than ~2000kbps.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7979 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:05 +02:00
Per Inge Mathisen 87a6804af5 Purely cosmetic style cleanup of iniparser code. (There is active upstream to sync up against.)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7975 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:05 +02:00
Christian Ohm 9417ec60e1 Use _NSIG in the exceptionhandler if available. Fixes #818.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7971 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:04 +02:00
Christian Ohm 142f9bda38 Disable locales without translation.
Now only those languages in the "map" structs are used, and a new translation
has to be added to those structs to be available. Also remove the ASSERT when a
language is not in the struct and just return the language code instead.
Fixes #813.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7970 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:04 +02:00
Christian Ohm 3c875545d7 Fix crashdump creation.
Was broken in r7850 (#716). I reverted r7850 and then fixed the
-Wdeclaration-after-statement warnings instead of poking around trying to find
the problem.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7968 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:04 +02:00
Christian Ohm eb7f679ce3 Fix getLanguage to return the full "xx_YY" name, but still cut "xx_XX" to "xx".
Previously it would also cut "xx_YY" to "xx", so sublanguage selection didn't
work. Also fix the spelling of "Portuguese". Fixes #812.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7961 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:02 +02:00
Per Inge Mathisen dc6e361d9e Fix iniparser compilation on MSVC again. Patch by i-NoD in ticket:778
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7952 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:01 +02:00
Christian Ohm f7b14177e6 Change an ASSERT to ASSERT_OR_RETURN in sound_StopSample.
This fixes the segfault in the second crashdump in #703.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7945 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:00 +02:00
Per Inge Mathisen ba36ac6cfd Simplify build dependencies for iniparser to work around a problem in MSVC compilation reported by i-NoD.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7939 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:59 +02:00
Per Inge Mathisen 48ab59bb62 Oops. Forgot one file belonging to ticket:779
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7938 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:59 +02:00
Per Inge Mathisen 7f24bd6dfb iniparser: More const correctness. Make it output INI files using physfs.
scores.c: Make a function static.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7936 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:58 +02:00
Per Inge Mathisen c8e73a71a6 iniparser project for MSVC, patch by i-NoD, closes ticket:779
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7935 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:58 +02:00
Per Inge Mathisen e6dd86f63d Const correctness fixes for iniparser. This fixes warnings with recent versions of gcc
when iniparser_getstring() is used with a constant string as a fallback.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7917 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:55 +02:00
Per Inge Mathisen b549837969 Remove unused include
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7914 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:55 +02:00
Per Inge Mathisen 684444a031 Make iniparser work on physfs files instead of ordinary file paths.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7906 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:53 +02:00
Buginator 2f92b730ad Fix a typo in sound_SetObjectPosition() to use (...x,y,z) instead of (...x,x,x)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7903 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:53 +02:00
Per Inge Mathisen f55c3ad471 Add INI file parser (iniParser -- version 3.0b (beta) by N.Devillard)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7902 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:53 +02:00
Giel van Schijndel 7952b39be8 netplay address printing:
* Don't cast if we can safely alter the format specifiers
 * Fix a spelling error: 'address famliy' -> 'address family'

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7897 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:52 +02:00
Christian Ohm 732a030544 Undef _XOPEN_SOURCE before including config.h in wzglobal.h.
Override the system headers, since autoconf defines this when needed.
Fixes #544.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7874 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:36 +02:00
Christian Ohm 383d8612be Add missing languages for getLanguageName, and if a language is missing, show
it in the assert. Fixes #673.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7869 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:34 +02:00
Christian Ohm cb1497c259 Fix a few spelling errors reported by Paul Wise.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7859 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:33 +02:00
Guangcong Luo 6e52b9a01d Fix bug reported by Beau - NetPlay.playercount could be decremented in situations where it should not, and underflow.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7855 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:32 +02:00
Christian Ohm bd85f32ba5 Prevent possible out-of-bounds access when out of sockets in NETallowJoining.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7854 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:32 +02:00
Christian Ohm d70c4a8de2 Initialize some possibly uninitalized variables to make optimized debug builds
easier.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7853 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:32 +02:00
Guangcong Luo 89bdf5d8cc Apply patch #716 - make exceptionhandler.c C90-compliant - patch by stiv.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7850 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:31 +02:00
Guangcong Luo 924ef17242 Fix bug #713: Can't compile.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7848 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:31 +02:00
Guangcong Luo 76ee950a03 Fix bug #711 - didn't compile
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7843 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:30 +02:00
Guangcong Luo d5dfdc17e0 Fix bug #691: Cannot display more than one game from lobby. Also fix a lobby display issue that I thought I already fixed.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7840 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:30 +02:00
Per Inge Mathisen 75026a21ee Fix bad use of variable inside a debug message. Noticed by cybersphinx.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7838 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:30 +02:00
Per Inge Mathisen 11335e28a9 Add assert-or-return workarounds for some crashes reported by zydonk on the forums.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7835 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:30 +02:00
Per Inge Mathisen b86f0f85cc Improve documentation of PLAYER.allocated field. Improve asserts for indexing into some player methods.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7826 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:27 +02:00
Per Inge Mathisen edcc7f79a8 Fix erronous description of ASSERT_OR_RETURN.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7821 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:27 +02:00
Per Inge Mathisen 4966ae5c6a Fix compile failure on MSVC. Patch by stiv, reported by i-NoD. Closes ticket:662.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7818 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:27 +02:00
Per Inge Mathisen 4d33f6a51d Add new function to output grayscale PNG images. Needed for ticket:652 net map/savegame format.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7817 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:26 +02:00
Freddie Witherden 54f3d2e9b8 Get Mesa offf of my lawn. Update the Xcode project.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7789 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:24 +02:00
Buginator 69dfc7fc36 Change some LOG_ERROR(s) to info (LOG_INFO), since they are not really errors. As you may recall, info() displays in both debug & release builds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7744 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:35 +02:00
Buginator c349a34865 Add a timestamp to addDumpInfo().
Remove the separator bars in the report file

We now log, map name (for SP/MP), the language that is read from the config file, and if they are using a cheat.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7743 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:35 +02:00
Buginator 27bdf48197 slight cleanup of r7738
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7739 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:35 +02:00
Buginator 1ccb1487de Create a new function, addDumpInfo(), to be used to add custom information to the crash dump report file.
Currently, we query openAL & openGL vendor/version info.
This should give us more descriptive crash reports on the user's hardware.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7738 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:34 +02:00
Buginator 11ab9125ad Add new macro, info(), it is shorthand for debug(LOG_INFO,...). This is used to *always* display informational messages on both debug & release builds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7734 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:34 +02:00
Buginator 79a8dbf4f4 Add #define NET_TIMEOUT_DELAY 2500 to allow for easier changing of the constant.
No real code changes.

closes ticket:613

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7719 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:32 +02:00
Per Inge Mathisen d93e1751c0 Add new utility function PHYSFS_printf() to easily write text files with PhysicsFS.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7704 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:28 +02:00
Christian Ohm 1dd96730f4 Fix the "Mesa" string that was wrong for testing.
Actually fixes #608.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7695 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:26 +02:00
Christian Ohm b9b1a4bac7 Move the "Mesa hack" from GLee.c into screen.c:screenInitialise()
There we can check the GL_RENDERER string for more fine control. Currently it
is enabled when the string starts with "Mesa", so it doesn't affect any other
drivers. It might need more checks if new Mesa versions break this.
Fixes #608.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7694 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:26 +02:00
Buginator 51a28557b9 Make sure pointer is valid before attempting to remove it from the list.
Remove more useless abort()s.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7688 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:24 +02:00
Buginator 5a8cab42d9 Bump up timeout period to 2500ms from 1000ms for dial-up modem users.
Fixes ticket:543

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7687 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:24 +02:00
Buginator 70ebec41b0 Fix compile issue
Thanks to stiv for the report.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7679 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:18 +02:00
Buginator cdbe56c1c5 Merge netplay (anti-dpid) branch to trunk.
netplay branch ceases to exists anymore.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7678 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:17 +02:00
Per Inge Mathisen 8c16a47ef0 Fix broken sources after 'make clean' in tarball generated by 'make dist'. Reported by 'JimPansen' in the forums.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7671 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:11 +02:00
Buginator cbe998956a Slight cleanup of glOrtho parameters that should be double floats.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7660 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-05 16:21:06 +02:00
Buginator bff6a7c84e Change texLoad to a bool function, to correctly handle tertiles that are of the wrong depth.
This is in response to refs ticket:578 where the wrong tertile depth is used on some tiles, causing GL drivers to crash.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7658 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-05 16:21:06 +02:00
Guangcong Luo d6e036a25d Fix compile error.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7651 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-05 16:21:05 +02:00
Buginator 2fd30d2818 The hack from r7341 seems to break Mac OS X compiles.
Added #if guards around the hack.

Thanks to Vermithrax for the heads up.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7593 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-30 19:24:49 +02:00
Giel van Schijndel 452c507de1 Networking:
* Only clean up the IPv4 socket if we are able to enable IPv4 mapping of IPv6 addresses ''and'' are able to create an IPv6 socket
 * Add some more debug messages to be able to see what sockets could be created
 * Close sockets when they've become useless/invalid

This should fix #534 for real (unlike r7541, which fixed it and then reintroduced another bug causing the same symptom).


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7543 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:31 +02:00
Giel van Schijndel c2f8273762 Make setting up of the IPv4 and IPv6 sockets indepent:
* Allow failure for setting up of one of the sockets
  - More accurately: require only one socket to succeed
 * Try to use the IPv4 to IPv6 mapping feature if the host OS provides it
  - This allows us to use only a single socket on those systems for both listening to IPv4 and IPv6

This should fix #534.



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7541 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:30 +02:00
Giel van Schijndel 7e6afc09cb #include all required headers (<netinet/in.h> for sockaddr_in and sockaddr_in6)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7540 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:30 +02:00
Giel van Schijndel 1b11d622f1 Exceptionhandler: Remove signal descriptions for signals that are either non fatal or simply not handled by our signal handler
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7539 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:29 +02:00
Giel van Schijndel 7bb1474692 FreeBSD #defines alloca() in <stdlib.h>, not <alloc.h> (that's a Linux/glibc thing), so make the #included file platform dependent
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7538 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:29 +02:00
Giel van Schijndel 9182f1161b Make the fact that we're stripping NUL chars more explicit (see r7437)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7496 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:23 +02:00
Buginator bebb4e773a set the volume of the FMV based on the user's preferences
fixes ticket:526

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7490 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:23 +02:00
Buginator 8a87d1985e Fix strlcpy() & strlcat() to use ASSERT_OR_RETURN
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7478 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:21 +02:00
Buginator 9a3f1046be Fix windows crash dump report, by returning back a c_str() instead of a string.
Fixes ticket:519

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7476 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:21 +02:00
Per Inge Mathisen fb980b636c Ease up on the volume of repeat testing done on the audio code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7407 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:32 +02:00
Giel van Schijndel 52c8ba24e4 Revert accidentilly committed revisions r7394, r7395 and r7396 (part of a private branch)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7398 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:31 +02:00
Giel van Schijndel af40e39f77 Move construction/allocation code for JSON structures to json_value.[ch]
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7396 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:30 +02:00
Giel van Schijndel ef5a01eeb9 Add a JSON tokenizer (lexer), parser and serializer
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7395 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:30 +02:00
Giel van Schijndel aaa1efe4bb Add a function for UTF-8 encoding
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7394 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:30 +02:00
Buginator 1855990fa8 Change non-fatal debug messages in the sound code from LOG_ERROR to LOG_WARNING instead.
fixes ticket:427

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7382 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-10 19:18:13 +02:00
Buginator b60b1ad10b Fix prototype to match function's definition.
(was missing a const)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7381 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-10 19:18:13 +02:00
Giel van Schijndel 3e5254af26 Only (attempt to) disable IPV6_V6ONLY on systems where it's #defined
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7378 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-10 19:18:11 +02:00
Giel van Schijndel 3dfb215c8b Add IPv6 support to the lobby protocol
* Add a new field: secondaryHosts, an array of two fallback hosts
  - Canibalize the entire "misc" field and part of the "extra" field for this
  - When connecting, first try the primary "host" field, then fall back to the hosts in secondaryHosts (in order)
 * Add a new field: gameId, used on the lobby server to link multiple lobby connections to a single game entry
  - First (attempt to) connect to the lobby with all available address families (currently IPv4 and IPv6)
  - Then ask for a gameId from the lobby server using the first established lobby connection
  - Set the gameId field in the GAMESTRUCT to the one retrieved
  - Transmit the GAMESTRUCT using a "addg" command to the lobby over each lobby connection
  - The lobby then compares all incoming ID numbers with ID numbers already present
  - If there's a match it will use the GAMESTRUCT already present and only add a new hostname to the list

This is the last change, part of, and closes #452

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7364 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-09 23:29:55 +02:00
Giel van Schijndel 3b80e3a63c Add client side IPv6 support
* Properly format IPv6 addresses (so that parsing later on will work again)
 * Resolve names to all address families, not just IPv4

Addresses #452

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7363 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-09 23:29:54 +02:00
Giel van Schijndel 4a90601536 Add partial server side IPv6 support
Implement a "dual stack", i.e. listen on both IPv4 and IPv6 addresses.
This change doesn't affect the socket API itself.

Addresses #452

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7362 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-09 23:29:54 +02:00
Giel van Schijndel 6739e6aa20 When drawing formatted text treat *real* newline characters ('\n') as newlines as well
- Not just the special formatting character '@'

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7346 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:42 +02:00
Giel van Schijndel 6fdc07b3f9 For the purpose of error messages set the error to ECONNRESET when we got disconnected while doing a readAll()
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7345 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:42 +02:00
Buginator 3042114be5 Work around for drivers that report VBO, but don't have full openGL 1.5 implementation.
This is the case for the current radeon open source drivers, and possibly others.

Patch by: suokko (Pauli Nieminen)
see: http://developer.wz2100.net/ticket/216
reference ticket:216



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7341 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:41 +02:00
Buginator b9aea91c74 Move 'server_not_there' to a more correct location.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7333 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:40 +02:00
Buginator e26ca45678 When we get a error in readLobbyResponse(), we need to put a stop to hitting the server, since this will cause massive slowdowns.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7330 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:40 +02:00
Giel van Schijndel d02f591709 Lobby protocol; change the way the "addg" command works:
* Make the "addg" command return a status code (ranging 200-299 on success) and message (MOTD on succes)
 * Don't use the "motd" command anymore to check the lobby status, instead use the returned status code for that purpose.
 * Allow MOTD strings of arbitrary length (by sending along the length)

This modification ensures that ''proper'' connectivity checking is being performed on the game server (and reported to the user accurately).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7323 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:40 +02:00
Per Inge Mathisen 870c18b66d Make sure game time variables are properly initialized first time we refer to them. Detected by valgrind.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7318 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:39 +02:00
Buginator 967b1bcb74 Reset version string back to "trunk", accidentally changed in r7079.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7315 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:39 +02:00
Giel van Schijndel 38cfef4e6d Make sure to #undef the errno Exxxx symbols on Windows to prevent collision with the predefined ones by MinGW
Also lets :sort the Exxxx #define list

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7308 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:38 +02:00
Buginator 7e1a1d714c Slight fixes for the BSD socket overhaul to make it compile OK on MSVC again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7307 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:38 +02:00
Giel van Schijndel 9fa9402919 Work around MSVC's weak & stinky preprocessor:
* Duplicate the entire ASSERT() call instead of conditionally expanding its parameter
  - Depending on whether we are or are not compiling on Windows

Thanks go to Buginator for reporting this.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7306 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:38 +02:00
Giel van Schijndel fcf40c7eb2 For incoming connections print the address from which the connection originates.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7303 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:38 +02:00
Giel van Schijndel a3cbe4c0c3 Use a single function for address to text translation (instead of duplicating code)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7302 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:37 +02:00
Giel van Schijndel dc70524cd2 Take advantage of SocketAccept's non-blocking nature
Just go ahead and try to accept incoming connections without waiting for
a notification that connections are pending.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7301 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:37 +02:00
Giel van Schijndel 63b6d37a94 Make SocketAccept non-blocking
This way it is no longer required to first explicitly check whether
connections are pending (through checkSockets, which select(2)s) and
only then accept(2) it. Now you can attempt to accept the connection,
and if one is available it'll get returned, NULL otherwise.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7300 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:37 +02:00
Giel van Schijndel 36f536fcdb Check for EAGAIN as well to confirm connect(2) has started
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7299 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:37 +02:00
Giel van Schijndel 73a29daefd * Use camelCase instead of CamelCase and under_squores (as requested by Per, see #435)
* Rename read_all to readNoInt because that function is a read(2) variant that doesn't get interrupted by signals (EINTR)
 * Add Doxygen comments to readNoInt and writeAll

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7298 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:37 +02:00
Giel van Schijndel a8f8357904 Mark the server socket as not-ready when we've just accept(2)ed on it
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7296 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:36 +02:00
Giel van Schijndel 99c1ed95e8 Always use SocketClose to clean up sockets
Additionally make SocketClose work properly on Windows as well.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7295 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:36 +02:00
Giel van Schijndel 0bc6be39b1 Fix logic in handling return value of addSocket
When a socket set is full (in addSocket) print a debug message

This is the last change, part of, and closes #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7294 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:36 +02:00
Giel van Schijndel ba9d49acd5 Get rid of duplicated code
Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7293 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:36 +02:00
Giel van Schijndel ab6b694420 Bugfix: set SOCKET_ERROR to -1 to *correctly* check for errors
Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7292 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:36 +02:00
Giel van Schijndel a9070e60a9 For non-blocking sockets lets not block on read_all()
Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7291 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:36 +02:00
Giel van Schijndel 37d3b9535f Replace -1 for socket API errors with SOCKET_ERROR
Additionaly, on Unix systems define constants SOCKET_ERROR and INVALID_SOCKET to -1

Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7290 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:36 +02:00
Giel van Schijndel f412eb5a6f Port NetPlay's BSD socket usage to Windows
* Use the "SOCKET" typedef to represent socket descriptors (instead of "int")
 * Add wrapper functions for getting & setting the last socket error ("errno" on Unix)
 * Add a wrapper function for strerror, strsockerror, that works on Windows
 * Use recv(2) and send(2) instead of read(2) and write(2) respectively
 * Use INVALID_SOCKET and SOCKET_ERROR instead of -1 to find errors
 * Move setting of sockets to blocking/non-blocking to a separate function
 * Add Windows-specific wrapper functions for getaddrinfo() and freeaddrinfo()
  - Currently work only from 2000 *or* XP upwards, documentation is fuzzy.

Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7289 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:35 +02:00
Giel van Schijndel ae878a7880 Change write_all such that it will always return "size" or -1 (error)
* Check for write_all() == -1 (error) instead of "< 0" and "!= size" to
   see whether sending has failed.
 * Don't just mark sockets as "invalid" on error (by setting them to
   NULL), close them as well.
 * Give decent error messages on write failure (most likely a disconnect)

Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7288 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:35 +02:00
Giel van Schijndel 61e0a18a6a Pass the Socket* structure to read_all and write_all instead of a plain file descriptor
This way it becomes possible to modify a socket's state when
reading/writing.

Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7287 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:35 +02:00
Giel van Schijndel 939f4902ad Replace SDL-net by using BSD sockets instead
NOTE: Still needs some checking and work for Windoze compatibility.

Addresses #435

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7286 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:35 +02:00
Giel van Schijndel 8e57c65386 Use "struct timeval" from winsock2.h instead of our own
On Windows <sys/time.h> doesn't exist (MinGW being an exception) and
"struct timeval" is thus defined in winsock2.h.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7285 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:35 +02:00
Giel van Schijndel 7297008ed5 Fix spelling error: rename "ERROR_WRONGVESION" to "ERROR_WRONGVERSION"
Thanks to Kreuvf for noting the mistake.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7275 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:33 +02:00
Giel van Schijndel 47bbacc7bb Bugfix: NUL terminate the MOTD string buffer
If registering with the lobby server failed once, we don't want part of
the failure message to be kept at the end of the MOTD string.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7270 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:33 +02:00
Freddie Witherden d0fec57acf Minor indentation/spelling fixes in patternManager.[ch].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7263 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:32 +02:00
Per Inge Mathisen 7bea80efd3 Please use setDroidActionTarget() whenever you change psActionTarget. This helps set dangling pointer debugging information.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7262 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:32 +02:00
Giel van Schijndel e4f82dc1e5 Disconnect immediately when we've handled the client's request (or concluded it to be invalid)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7256 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Giel van Schijndel dd66b9fe33 Fix a bug where we would check the wrong socket for readiness
- Would occur when processing a "list" command on the game server

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7255 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Giel van Schijndel 4a3b92bd4b Document the purpose of the different sets of sockets
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7254 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Per Inge Mathisen 73ea6f197e Remove unused functions from text drawing code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7253 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Per Inge Mathisen b8d3c62005 Remove last of the useless statics from text drawing code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7252 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Per Inge Mathisen e5006affb7 Remove useless and unused statics from text drawing code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7251 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Buginator 1f9e48ba86 Fixes compile issue that was broken in r7237.
In this case, 'Remove unnecessary SDL includes.' Removed the #include for C99 types that we use on non C99 compilers.

In case your wondering, using SDL_stdinc.h, since SDL_types.h is Deprecated.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7250 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Giel van Schijndel f6b3c04c8c Backport r7244 into trunk from the 2.2 branch
Move GAMESTRUCT_VERSION to the top of GAMESTRUCT, thus allowing versioning to work properly at all times

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7246 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Per Inge Mathisen a9b8a20aa5 Make focusState a static to main.c, instead of a global from frame.c
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7240 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Giel van Schijndel e16e034ec7 Use 40 bytes for the "host" (IP address) in GAMESTRUCT, this allows for using IPv6 without breaking protocol combatility again
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7239 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Per Inge Mathisen 29a2b2fe35 Change SDL types to stdint.h defined types. Do not depend on SDL.h included system headers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7238 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Per Inge Mathisen 8a0a0af7c0 Remove unnecessary SDL includes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7237 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:29 +02:00
Giel van Schijndel 7db243a59e Lets correctly indicate in our error message which TCP ports should be open (instead of hardcoding the message and getting it wrong)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7222 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 20:52:19 +02:00
Buginator 2dc8626d75 whoops! :o I applied the wrong patch.
Reverting.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7204 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 21:30:41 +02:00
Buginator 8a11947b31 Let's only send the map to the person that needs the map.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7178 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 12:46:39 +02:00
Buginator 7ef71df9cb Fixes ticket:419
Add check to make sure logfile is available.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7169 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 12:46:38 +02:00
Buginator b095418a42 Fixes ticket: 369
Don't always assume that the (lobby) server will not be available, and give up on all future attempts.
We now reset the flag on NETclose().



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7159 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:08 +02:00
Per Inge Mathisen 0c694a22b0 Introduce ASSERT_OR_RETURN, a macro to assert on an expression, and assert() and then return if it fails,
but only assert() in debug builds.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7136 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-23 01:36:45 +02:00
Buginator f17402ef40 excise the codebase from some C99 format specifiers.
(%zu -> %lu)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7120 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02:00
Giel van Schijndel acd07fc7b4 * Add functions for retrieving the masterserver's hostname and port and game hosting port
* Use these functions to save configuration values (instead of duplicating them)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7091 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-20 15:31:23 +02:00
Buginator e9446f60b4 Backport r7084 to trunk also.
"remove dead code left in accidentally
Move a enum to netplay.h, and fix #include files so netplay.h comes before multiint.h"




git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7085 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-19 23:45:25 +02:00
Buginator c2e5d2462f Adds password support to warzone.
Adds feedback from the lobby server.

Notes: You have to enter a password *first*, and then either host the game, or join a game.

Thanks to elio for the new icons!


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7079 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-19 23:45:25 +02:00
Giel van Schijndel bf4e0e3745 Major cleanup of configfile.[ch]:
* Remove unnecessary "// =====..." and "//~~~~..." comment bars
 * Use "bool" instead of "BOOL"
 * Use ARRAY_SIZE(registry) instead of REGISTRY_HASH_SIZE to get the amount of hash entries

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7068 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-19 23:45:24 +02:00
Giel van Schijndel b92b348c3a In lexer_input.h #include <stdio.h> for FILE*
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7067 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-18 22:39:52 +02:00
Giel van Schijndel 1852caeff9 Get the size of a variable using "sizeof", not using the array size that was used for that variable (as the connection between the two is only obvious in the variable's declaration)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7066 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-18 22:39:51 +02:00
Giel van Schijndel e0f65b827c Add support for Full Screen Anti-Aliasing (FSAA):
* Enable, at the user's request, FSAA.
  - The user can specify the amount of samples (should be a power of 2) with the "FSAA" config option.
  - The user can disable FSAA by setting the "FSAA" option to "0" (zero)

This closes #387.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7065 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-18 17:08:19 +02:00
Giel van Schijndel b5fa41ceff Make it possible for the lexers to use data from an STDIO FILE* stream
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7052 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-18 15:37:53 +02:00
Giel van Schijndel 2da9dad740 Link betawidget with Pango
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7033 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-16 19:40:47 +02:00
Freddie Witherden f4e366cf33 Fix some indentation issues in button.[ch].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7025 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-15 20:36:59 +02:00
Per Inge Mathisen 742fecefc8 Make Warzone use regular textures to display the videos. Removes requirement for texture
rectangle extension. It uses one texture with a fixed size for videos (the old code allocated 
a new texture once per frame). The texture size is set at 512x512, which is enough
for the current 320x240 videos. In addition the message about the radar not working is 
removed and some extra checks added. Patch by Christian Ohm.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7021 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-15 20:36:58 +02:00
Buginator 79d8c664e8 Fix the player count to reflect the actual number of players that is shown on the game list, which got screwed up when people were kicked, or left the lobby.
merge r7013

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7016 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:07 +02:00
Buginator 7a6fa22b1e Version checking code.
If client connects to host, and they don't respond (within 7secs) to the version packet, then it will auto-kick them.
If client sends wrong version in the version packet, then it will auto-kick them.

Also adds kick message support, for the different types of kicks that we do.

merged from r6992
NOTE: trunk won't connect with 2.2.  This is *on purpose*, just testing version checking code for now.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7014 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:06 +02:00
Per Inge Mathisen b56294cb1c Make sure file handle to netlog file is set and reset to NULL when netlog is not active.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7006 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:06 +02:00
Per Inge Mathisen 46c70aa134 Don't crash if we fail to open the netlog file. Reported by Zarel.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7002 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:06 +02:00
Guangcong Luo 8dab7fb36c Fix incorrect connection error display introduced in r6998
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6999 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:05 +02:00
Guangcong Luo fac8b8ffb9 Commit patch #366: Show "Connection error" in case of connection error
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6998 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:05 +02:00
Elio Gubser c18559d219 release patterns when quit
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6979 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-08 14:04:26 +02:00
Gerard Krol 5a2ff6f410 Allow structure baseplates to have transparency. 2009-04-07 12:18:14 +02:00
Giel van Schijndel 6bdbda9343 Allow code passing and retrieving of enums as vararg parameters in C++ as well.
In C++ enums are treated differently from integers in some cases, causing GCC to emit some rather nasty abort()-like code (x86/x64 instruction "ud2a") when used as the type for va_arg().

This was the compiler message generated:
{{{
stack.c:339: warning: ‘INTERP_TYPE’ is promoted to ‘int’ when passed through ‘...’
stack.c:339: note: (so you should pass ‘int’ not ‘INTERP_TYPE’ to ‘va_arg’)
stack.c:339: note: if this code is reached, the program will abort
}}}

NOTE: Compiling as C++ now works (as does the produced code), using: {{{./configure CC=g++ CFLAGS=-fpermissive --enable-debug=relaxed}}}

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6957 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:10 +02:00
Elio Gubser 9353874ef9 adds the base button class and imageButton class
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6956 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:09 +02:00
Freddie Witherden 4ab0f78bf4 Fix some indentation problems in hBox.[ch].
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6954 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:09 +02:00
Elio Gubser defbe884a7 fixed small bug in size fit algorithm
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6953 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:09 +02:00
Elio Gubser 959838440d fix for the same reason as r6951
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6952 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:09 +02:00
Elio Gubser e1478d46e8 don't use the helper macros before we set classInfo, as this would result in undefinied behaviour.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6951 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:08 +02:00
Elio Gubser adfc6f2aa8 added some asserts and improved commentaries
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6950 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:08 +02:00
Elio Gubser acf512b28a fixed incorrect if-condition
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6949 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:08 +02:00
Freddie Witherden 2a9d01789a Ensure to flush/mark dirty the Cairo image surface when we draw/read from it outside of Cairo.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6948 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:08 +02:00
Elio Gubser df6647b9f5 adds the patternManager for betawidget. take a look at sdl-testapp.lua for usage example
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6946 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-03 18:53:12 +02:00
Freddie Witherden 6b641069df Support resizing of widgets with OpenGL content.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6945 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-03 18:53:12 +02:00
Freddie Witherden cab53fcbfb Add OpenGL support to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6944 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-03 18:53:12 +02:00
Giel van Schijndel 2bca3018f4 Make sure that WZ_ASSERT_STATIC_STRING works properly in C++ as well
In fact, WZ_ASSERT_STATIC_STRING should now work on ''all'' valid C++ compilers.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6930 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-03 18:53:11 +02:00
Git SVN Gateway bc074e1ed2 Merge commit 'per/master'
* commit 'per/master':
  Fix ticket #293: Crashes in netlog code.
2009-03-30 16:13:17 +02:00
Freddie Witherden 18870edfd6 Revert r6921. The newline character on OS X is \n, only OS 9 used \r, which we do not target.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6922 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Giel van Schijndel 12eccf9d4c An end of line character is "\r" on the Mac
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6921 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Giel van Schijndel f179b6f092 Allow compiling and linking with lib/framework/stdio_ext.h and src/version.h from C++ code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6920 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Per Inge Mathisen 82a97e938e Various fixes to be able to compile (but not yet link) Warzone with g++
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6912 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:58 +02:00
Per Inge Mathisen 7dfe082475 Fix ticket #293: Crashes in netlog code. 2009-03-21 08:19:49 +01:00
Buginator e1e42928ee Players no longer drop from game after too much data has been sent to them. (Usually happens in longer games, when there is more data that needs to be sent)
Closes ticket:315
Fixes ticket:218

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6881 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-20 20:40:49 +01:00
Per Inge Mathisen 95ff68f350 Improve error message on failed PIE texture flag load
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6879 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-20 20:40:48 +01:00
Per Inge Mathisen f15c0292e8 Fix some issues with 'make dist'.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6853 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-15 23:30:57 +00:00
Dennis Schridde 1199b1e03b Possibly uninitialised variable says GCC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6847 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-14 19:49:43 +00:00
Gerard Krol dc834b2a3a Place buildings using blueprints (green) instead of highlighting the ground.
The blueprint is a green transparent version of the building you want to build. It is bright green when the build location is valid and red when it is not. After the building is placed a darker version of the green building will remain until a droid starts construction.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6840 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 22:55:41 +00:00
Elio Gubser 9b76a1480e fixed some nasty bugs in the svgManager
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6839 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 22:50:30 +00:00
Gerard Krol 5f288925db Do not use texture compression for interface textures. This makes the interface look better and fixes bug #74.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6834 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 13:03:48 +00:00
Gerard Krol 71bc279c9e Fix some spelling errors in debug messages and comments. Patch by Paul Wise <pabs3>.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6832 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 11:51:40 +00:00
Per Inge Mathisen 9271cf015e Oops. Fix blooper while editing framework build system.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6794 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-07 18:19:59 +00:00
Per Inge Mathisen 5da9b30f7d Fix missing files in makefiles so that 'make dist' can be run again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6792 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-07 18:09:58 +00:00
Dennis Schridde ffcf206972 MSVC supports noreturn as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6780 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:52:22 +00:00
Dennis Schridde 58897d42be Report OpenGL 3.0 support during initialisation as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6779 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:40:27 +00:00
Dennis Schridde 6c1bafbf77 Use macro to check for MSVC .NET
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6778 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:40:19 +00:00
Dennis Schridde c0acc342bb Add more documentation to WZ_DECL_*, use __ attribute names as recommended by GNU for headers, reorder defintions logically
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6777 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:40:08 +00:00
Dennis Schridde 4c3053b3e1 "restrict" is a C99 feature, thus use the appropriate checks
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6776 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:39:59 +00:00
Dennis Schridde 8aacce716c Provide noreturn declaration macro (useful for exit-on-failure functions)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6775 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:39:19 +00:00
Per Inge Mathisen 28c7cb4abb Add new backdrop by B. V. Edwards <cathuria>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6768 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-02 22:57:26 +00:00
Freddie Witherden 34323e368a Fix compilation of SQLite under OS X. Stats are still broken.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6758 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-01 13:06:59 +00:00
Dennis Schridde d8680df439 Bump internal copy of SQLite to 3.6.11
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6756 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-01 10:05:59 +00:00
Buginator fc8bbc5bd9 Feature fixes & enhancements.
*Adds LOG_FEATURE (--debug feature) so we can keep track of features.

*Disallow VTOLs from being able to poach features.

*Changes feature spawning from instant to a variable time period.

*When feature can't be placed, break out of routine instead of sending invalid data.

*Actually remove features, and notify others that the feature was removed. (AKA, actually sync between machines.)

ASSERT() when numNaybors is invalid.
Fix a spamming debug line mistakenly changed in r6677


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6737 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 03:36:26 +00:00
Buginator df0ada9a50 Fixes crash when certain scripts fail to compile, it don't allocate storage, so we shouldn't (try to) reference / free() it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6736 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 02:17:20 +00:00
Buginator f0d0bd7ebe Fixes a dangling pointer issue with a global.
In certain circumstances, if you try to abort out of a MP game (maybe SP as well), it would crash after deleting the widget, since it was still referencing the pointer in the global.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6732 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 01:40:19 +00:00
Gerard Krol 10ce0cc72b Scale down textures used for 3D when they exceed the size specified with the textureSize option. Also add two assert statements to check for the correct handling of the parameters for glDrawRangeElements.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6720 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 18:56:41 +00:00
Buginator 9d868d4c0c Adds LOG_LIFE to track when units are created.
(We already had LOG_DEATH)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6694 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 17:59:57 +00:00
Gerard Krol 5601741b95 Brace for impact, this is the new terrain renderer!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6682 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 23:35:21 +00:00
Buginator e920507134 Change debug() output from gametime to real time.
In MP games, since gametime can vary so much between machines, needed a more reliable time source to sync up messages between them.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6679 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 22:24:02 +00:00
Buginator 9e0767ecfd * Fixes memory leak.
* Fixes eventFireCallbackTrigger which was called multiple times.

* LOG_NET is to *only* be used for network traffic, not for sync issues.

* Adds visual display about when player leaves/drops.

* Adds / cleans up debug messages concerning connection issues.

* Adds new message type NET_PLAYER_DROPPED, (as opposed to NET_PLAYER_LEAVING). One is when we lose a connection, the other is when a player quits 'normally'.


Will be adding icons from Ticket #247 done by Zarel soon.

NOTE: please use --debug net if you have connection issues!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6677 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 22:09:58 +00:00
Freddie Witherden 1d9dd3ea82 Fix a minor indentation issue in clipboard.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6663 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 20:43:42 +00:00
Per Inge Mathisen 3e96bd6b1d Clean up mapLoad(), using physfs to read directly from file instead of casting structs to a memory buffer. Closes ticket:274.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6662 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 20:35:43 +00:00
Per Inge Mathisen f002d651e7 Fix bug #273 - server crashes if more than 6 players join a game. Reviewed by devurandom.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6659 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 20:01:10 +00:00
Buginator 60dbe83260 Updates .diff file on what we changed from the 'clean' 5.4 to the version that we use.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6653 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 22:17:05 +00:00
Buginator e2cfc4cc32 This fixes version 5.4 of GLee so that it compiles cleanly on gcc again.
We need to change the Glee.diff file as well.

Closes ticket #262

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6642 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:17:47 +00:00
Buginator 2b350ea649 Updates GLee to 5.4
**NOTE**: this will break gcc compiles.  The fix is in the next commit, so we can get a clean diff from the "clean" 5.4 to the modified version that we require.

Change log:

    * OpenGL 3.0 support, and 41 new extensions.
    * 5.4 : fixes for GL_NV_gpu_program4, GL_EXT_shader_program4.
    * 5.4 : Added 5 new extensions :
          o GL_EXT_texture_swizzle
          o GL_NV_explicit_multisample
          o GL_NV_transform_feedback2
          o WGL_NV_gpu_affinity
          o GLX_ARB_create_context
    * 5.4 : Various dead/dummy extensions have been removed, including :
          o GL_NV_geometry_program4 (merged with GL_NV_gpu_program4)
          o GL_NV_vertex_program4 (merged with GL_NV_gpu_program4)
          o GL_NV_fragment_program4 (merged with GL_NV_gpu_program4)
          o WGL_NV_video_out (renamed to WGL_NV_video_output)
    * 5.33 : fixes some GCC warnings
    * 5.33 : fixes some conflicts with glext.h on OS X
    * 5.33 : fixes an issue where 2 extensions could go missing on some platforms
    * 5.32 : fixes a potential access violation in __GLeeGetExtensions - thanks to Jacques Beaurain for spotting this bug.
    * 5.31 : fixes a GLX compile error
    * 5.30 : Better Linux/Mac OS support


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6641 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:14:38 +00:00
Buginator ac9a882f07 Fixes #257
Can compile OK with MSVC once again.

Frame.h must be included before default system header #includes, so we don't have linker redefinitions & conflicts with the non C99 compliant routines that MSVC uses.
Or in other words, we want our C99 compliant routines to override the default routines that MSVC uses.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6640 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:09:24 +00:00
Guangcong Luo 1f5ab803ed Updated MinGW32 makefiles; fix "multiple half-tracks" bug.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6639 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:49:09 +00:00
Buginator af112296c6 Updated MSVC project & solution file(s).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6638 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:46:13 +00:00
Buginator 55d3044f15 Updated MSVC project & solution file(s).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6637 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:42:09 +00:00
Dennis Schridde 9dae6df94c Safen includes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6623 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 12:12:00 +00:00
Dennis Schridde c4e55e49a3 Include frame.h in stdio_ext.c, so that we get debug.h and its declarations
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6620 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 11:04:08 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde fcca92459c We no longer need to respect 8-char filename limits, be clear in naming instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6616 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:23 +00:00
Dennis Schridde 52b07e9cf0 Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:18 +00:00
Dennis Schridde 0c5d56b35a Move endian_* functions into a dedicated header and do not include it from frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6614 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:14 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Dennis Schridde 8050b17162 Cleanup
Incl: Move MAX_STR_LENGTH out of wzglobal.h, since it is only used in src

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6612 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:03 +00:00
Dennis Schridde 16c9241fa2 Rename Vector*_New() to Vector*_Init(), since that seems less confusing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6611 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:59 +00:00
Giel van Schijndel 516067dec0 Alter frandom's API such that it takes no parameters and returns a float ranging from 0.f to 1.f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6608 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 22:51:41 +00:00
Dennis Schridde b49952ce1e New function: frandom(x,y)
Returns a random floating point number between x and y

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6604 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:25 +00:00
Dennis Schridde 0b09ace43a More compact versions of fminf() / fmaxf()
Includes a comment on what might appear as magic or
incomplete implementation at first sight.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6603 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 04:07:44 +00:00
Dennis Schridde df6bd00d7e Provide fmaxf() / fminf() for non C99 compilers
Fixes #234.
This is not the patch attached there, since that one was broken.

From the manpage:
DESCRIPTION
       These functions return the larger value of x and y.
RETURN VALUE
       These functions return the maximum of x and y.
       If one argument is a NaN, the other argument is returned.
       If both arguments are NaN, a NaN is returned.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6601 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:08 +00:00
Dennis Schridde 80e64617b2 Use faster float code for hypotf, instead of falling back to doubles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6600 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:05 +00:00
Dennis Schridde 728c68b81e Use format strings where required (script parser)
Should fix #178

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6597 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 02:53:52 +00:00
Per Inge Mathisen 4cae3b8f1b Improve handling of an error in NETsendfile reported in issue #215. Add TODO about
rewriting this whole function and reference to ticket.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6580 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-03 17:02:17 +00:00
Giel van Schijndel 94cf481e0f Override operator<< for std::ostream (left operand) and PHYSFS_Version (right operand) instead of using a plain function to perform the version formatting
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6578 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-01 12:13:00 +00:00
Giel van Schijndel db0e543f40 * Fix warnings about "possibly dangerous code" added in r6570:
- Don't ignore write(2)'s return value, instead handle it properly to deal with the cases where write(2) gets interrupted (by a signal) or returns prematurely because of non-blocking I/O
  - Properly handle popen(3) returning NULL
 * Don't assume the data written to stdout by "which" will just fit in our buffer

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6577 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-01 11:54:25 +00:00
Dennis Schridde ed2a2011f6 Improve preprocessor checks for type definitions
* Check for C99 instead of !MSVC where we deal with C99 stuff
 * C++98 defines bool as well
 * Move BOOL after the bool checks, so we could define it to bool more easily

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6572 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:47 +00:00
Dennis Schridde e88fb88376 Detect C++98 and do not mix feature detection code with platform hacks (!!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6571 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:43 +00:00
Dennis Schridde d585762747 Add a few warnings about possibly dangerous code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6570 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:39 +00:00
Dennis Schridde 98842001af Use bool instead of BOOL where the latter is not required
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6569 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:35 +00:00
Dennis Schridde f9ef8289a4 Bump SQLite3 to 3.6.10
An change was introduced on sqlite3_vfs which causes an incompatible
 pointer error when mixed with older sqlite versions. Thus bump the
 required version to 3.6.10 as well.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6564 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-30 18:28:21 +00:00
Giel van Schijndel cb22e77099 * Check whether the system itself already provides strlcpy and/or strlcat
- If it does, check whether it's behaviour is consistent with our implementation
   - If behaviour is consistent: use the system's implementation
   - If not, rename our implementation (to prevent symbol clashes) and use our own


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6556 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-24 18:15:19 +00:00
Giel van Schijndel ca71081504 Add parentheses to resolve operator precedence problems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6552 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-11 23:35:28 +00:00
Giel van Schijndel ae18d97e54 Don't depend on OpenAL and Vorbis when compiling with --disable-sound
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6542 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-11 14:34:38 +00:00
Freddie Witherden fdf3e351c5 Add the button class; support for greyscaling disabled buttons pending.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6541 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-08 22:01:31 +00:00
Giel van Schijndel dae099706c Set the m4 macro directory in betawidget's configure script
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6540 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-07 20:05:45 +00:00
Freddie Witherden 97c0d84346 Update the svgManager, adding support for fetching the size at which an image will be rendered and cleaning up the interface for specifying the dimensions at which an image should be rendered.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6539 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-06 15:20:22 +00:00
Giel van Schijndel f224f9f2df Fix configure.ac for betawidget
* It seems that autoconf (2.63 or 2.62) changed the names that are acceptable as custom variable name, and no longer accepts LT_\w+ as variable names.

This addresses #201 and hopefully fixes it.

@EvilGuru, if this fixes it, please close the ticket.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6538 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-05 22:52:15 +00:00
Per Inge Mathisen 0881493713 New cheat "noassert" and new command line option "--noassert" turns off the abort functionality in ASSERT() calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6527 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-02 11:16:40 +00:00
Dennis Schridde 7432a0e433 More Vector conversion functions and also one to debug printf.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6520 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:27 +00:00
Dennis Schridde efb3a5c4ac More vector conversion constructors: 3uw -> 3f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6504 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 01:46:24 +00:00
Dennis Schridde ab0d671fa6 Add Vector3i_To3uw() and Vector3i_InCircle()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6502 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 00:46:35 +00:00
Elio Gubser 5514e846ee adds a feature that fits in the image in the desired width and height without loosing its proportion
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6463 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-13 15:54:21 +00:00
Per Inge Mathisen 178cb7efa9 Improve logging messages from GLC interface layer.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6455 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-12 16:35:05 +00:00
Freddie Witherden 63b23fe53a Prevent the addition of children to spacers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6441 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-07 13:37:10 +00:00