Commit Graph

2199 Commits (89679c361ac49f958a3951752ff28369646b86ec)

Author SHA1 Message Date
Per Inge Mathisen e73697495e Forward port r8652 and r8626 (savegame fixing and breaking) from 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8696 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:42 +01:00
Christian Ohm cd36584441 Don't access UPnP device info after freeing it.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8676 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:41 +01:00
Per Inge Mathisen 5e16640ba3 Build fixes for netplay.c on OpenBSD, closes ticket:1180
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8675 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:41 +01:00
Giel van Schijndel fbec26f8e1 Improve compile time code checking:
* Use a version of STATIC_ASSERT that can be used as part of expressions
  - Taken from the Linux kernel (<linux/kernel.h>)
 * Add macro WZ_ASSERT_ARRAY which (statically) asserts that the given variable is an array
  - the given array needs to have a compile-time defined size
  - pointers will fail this assertion
 * Verify that the expression given to ARRAY_SIZE is truly an array
  - verify this using WZ_ASSERT_ARRAY_EXPR
 * Catch & fix two coding errors resulting from wrong use of some macros
  - macros: sstrcpy and ARRAY_SIZE

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8654 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:54 +01:00
Christian Ohm d808f72d8e Don't add UPnP redirects in single player skirmish.
Closes #1174.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8647 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Christian Ohm cd3ce412a3 Fix typos, reported by Paul Wise.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8646 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Guangcong Luo 9dc3cac6d6 [Having problems committing, so I'm seeing if I can commit this one file at a time] Continue fixing bug #1170: compile warning.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8643 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Guangcong Luo f6992d5719 sendTextMessage improvements - uses the position numbers again, and sends "(private to Player) message" instead of "0message". Also adds a shortcut for alliance chat: Use ".message" to send "(allies) message" to allies only.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8639 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Buginator b99b245e7f Turns out that we can't use GLee.h for all our openGL header needs, since GLee.h defines Status, and we also use that, so until we fix that either in GLee.h or our codebase, going to revert r8615/r8616
FIXME! (to be done later)

closes ticket:153

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8618 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator c6747b1606 Don't use SDL_opengl.h, instead, use GLee.h to handle all our openGL needs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8617 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator 3665f20498 Use the correct header file when using openGL, instead of the more complex #if/else/endif block.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8616 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Guangcong Luo d91693afb2 Hardware-accelerated cursors work correctly in Mac OS X now.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8610 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:49 +01:00
Guangcong Luo 6519ce48e9 Use GLuint correctly (fixes build errors and warnings caused by other fixes).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8608 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:49 +01:00
Buginator 9445f60753 Actually use GLuint instead of pretending to be GLuint.
patch by stiv.
Closes ticket:1148

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8604 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo aabbca68d8 Move map download progress to players list, so you can still chat while it happens. Also update players list instantly, instead of every 2 seconds (except slider changes, which are updated every 0.5 seconds). Also fix taken position detection (fixes bug #1137).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8602 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo 8edc0bd26a Allow AI difficulty slider to be dragged for longer than 2 seconds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8600 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo c6e474a482 Revert r8584/r8585 since they're causing too many problems in Linux for me to deal with right now. Fixes bugs #1121 and #1123.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8590 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:47 +01:00
Guangcong Luo fa4f0798ba Fix a bug where a long was dereferenced from an int pointer.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8584 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:46 +01:00
Christian Ohm 5a5e5d6510 Threaded UPnP device detection.
Increases the timeout to 2 seconds. Closes #1073.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8564 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator e8d4d378a8 Add UPnP detection results to the Crash dump.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8557 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator 25b9dc9ba6 Add more documentation about the Map issues and note in logs about map transfers (if exists / file size mismatch)
(r8548/r8549)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8555 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator a1ec0bd358 Clarify variables by prefix of _64 for 64bit and _32 for 32bit...
(r8546)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8553 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:44 +01:00
Buginator 8018d99190 Add new message of NET_HOST_DROPPED to deal with when host quits game, we should quit as well (lobby)
Add more debug lines when we drop/leave players
(r8538)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8550 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:44 +01:00
Buginator b307503d56 Slightly rework when we should and shouldn't chop strings based on if the tech level is present or not.
Also add more debug lines to see if this issue crops up again.

Fixes ticket:1104
(r8533)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8534 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator f76f352bd0 Add error checking to socketClose()
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8532 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator 49f164b23f Fix a out-of-order list
(r8516)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8530 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator 0d2a13a119 Fix a strange issue on some laptops, that have mapped their numpad enter key to the normal "return/enter" key.
Either key can now be used to submit the text your typing.

This fixes ticket:1055
NOTE: We *still need* unicode support!
(Multibyte support, and we should NOT use char, we need to switch to wchar_t)

(r8425)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8527 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator cc76454b69 Fix the missing header file for the setPlayerColour() function.
(r8411)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8525 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator a72cb7295a Transmit and set local color array. Fixes picking of team color bug.
Transmit player map position & handle picking of players correctly. fixes ticket:1075

Enable/disable AIs on maps. fixes ticket:1065

(r8410)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8524 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator 06e0716a14 *Change* MaxMsgSize is now 16K
*Change* MAX_BYTESPERSEC is now 14K (was hitting limit in 4p games old limit was 6K)
*Change* relax timings of ping & scoreboard to alleviate the bandwidth strain a bit
(r8381)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8520 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:13 +01:00
Buginator d6e70a3c00 Filter out non-ASCII in our debug line
(r8380)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8519 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:13 +01:00
Buginator d6261ced17 Add new debug flag "input" to be used for input (keyboard/ mouse) issues.
Add allot more debugging for the input routine(s) to help find keymap issues.
*Change* Add a user friendly (numpad) clarification to the keymap editor, and also color it yellow.
*Change* Rename "Multiplayer Options" to "Multiplayer Options / Alliance dialog" to clarify what this is used for.

(r8376)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8518 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:13 +01:00
Per Inge Mathisen 5e7c746001 Remove obsolete references to SDL_net, which is now long gone.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8509 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:12 +01:00
Guangcong Luo 193c8d142b Fix a segfault from a null pointer dereference in netplay.c upnp_init(). (Fixes bug #1099)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8497 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-23 18:13:26 +01:00
Guangcong Luo ae16bb2aa0 Make Warzone compile and run successfully on Mac OS X again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8482 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:06 +01:00
Per Inge Mathisen 014a3b484e Pipe all PIE files through the simplipie tool to remove unused flags, and turn instances of
the no cull flag into duplicated, inverted polygons. Remove support for the no cull flag from
the source. HOPEFULLY this does not introduce any visual defects. I did not see any. If you 
see any, let me know. This is in preparation for improved object rendering.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8471 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:04 +01:00
i-nod c5e16d59ce libminiupnpc has been integrated into MinGW build process.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8470 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:03 +01:00
Christian Ohm a7ae06572d Integrate miniupnpc.
This should bring it up to about the state of the patches and comments in
ticket #1073, without the threaded device detection. Timeout is 500ms, that
should be enough to detect a LAN device, and doesn't delay startup too much.

Port r8447 plus the fixes for it in r8449, r8453, r8455 and r8456 to trunk.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8460 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Christian Ohm 03607b0fb8 Rename miniupnp Makefile to prepare for automake.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8459 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Christian Ohm 1f1a95e85e Include MiniUPnPc.
lib/netplay/miniupnpc now contains a completely unmodified copy of
miniupnpc-1.4.tar.gz from http://miniupnp.free.fr/, integration with Warzone
will follow.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8458 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Per Inge Mathisen c6db8bfcd7 Put all palette info into an external file that can be modified by modders. It is quite sensitive
to changes in the number of lines. The colours are in the (from CSS) familiar R,G,B,A hex format. 
Closes ticket:1062


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8435 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:59 +01:00
Guangcong Luo c41b9da86a More informative version string error messages.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8418 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:58 +01:00
Guangcong Luo 878249ef13 Better-looking HP/reload bars. (Warning to Per: Adds 4 colors to piepalette.c/.h)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8405 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:57 +01:00
Buginator a886be8d02 Suggested fix to turn on GLC_AUTO_FONTS by bcoconni (QuesoGLC author) for this issue: http://sourceforge.net/tracker/?func=detail&aid=2890444&group_id=53918&atid=472059
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8364 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:56 +01:00
Christian Ohm 7242272311 Use WZ_CPPFLAGS in lib/iniparser/Makefile.am.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8358 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:55 +01:00
Buginator 11482e4a96 Fix a typo
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8352 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:54 +01:00
Guangcong Luo a279c154af Fix a typo from r7840 that caused the game to be unable to display all the games on the lobby sometimes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8341 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:54 +01:00
Christian Ohm 65caade5c5 Unified OpenGL error handling
This adds a glErrors function that returns true in case of errors after
outputting them with file and line number from where it was called.
Closes #1011.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8337 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:53 +01:00
i-nod e1bfeffa26 - Merged PrintOpenALVersion with sound_InitLibrary since the current usage isn't completely correct. alGetString should be called after a new context was successfully created.
- Changed sound_InitLibrary so it would present all available devices to the debug and dump logs before trying to activating one of them.
- Added successfully opened device name to the debug and dump logs.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8328 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:53 +01:00
Buginator 0aff0b46cf Add a new debug flag type, LOG_FATAL.
This is used to differentiate LOG_ERROR (which is a *non* fatal error, but a error none the less) and fatal errors which result in program termination with no *visible* output (on windows/macs) on our end because of the crappy GUI functions so we usually dump it to stderr.txt and there is no clue that the program had to exit for whatever reason.

Hopefully, this will be helpful to windows people so they can differentiate between *our* exit/abort routines, and crashes that occur in drivers which look exactly the same since they get dumped back to the desktop with no visible clue why.

LOG_FATAL is *always* on in both debug & release builds.

On LOG_FATAL debug lines, on windows, we now throw up a modal dialog box with the current error message.  At this time, this only happens when we have a error, and we use abort() right after the error, which makes it fatal.

That explains why this touches ~60 files :)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8320 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:51 +01:00