Commit Graph

780 Commits (1ed72f87abf0793051dea02837c10db91b64add7)

Author SHA1 Message Date
Christian Ohm d6416c34eb Return 0 in the various _lex_destroy int functions.
Original patch by Seismo (WarningC4716(_2).patch).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9884 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 00:50:15 +01:00
Giel van Schijndel 60c55e4009 #undefine NOMINMAX before #defining it
Prevents warnings about #redefining previously #defined macros

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9869 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-19 18:00:09 +01:00
dak180 a3f8200327 Step 1 of X in getting translations working on the mac.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9835 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-16 23:50:09 +01:00
Giel van Schijndel 946c9965f2 Replace ''all'' usage of BOOL in lib/framework with bool instead
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9812 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:08 +01:00
Giel van Schijndel b3ea108cce Replace some BOOL usage with bool
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9811 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:07 +01:00
Giel van Schijndel 40208015e4 string_ext.h doesn't actually use frame.h, so don't #include it
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9774 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:35 +01:00
Cyp 4651724689 Move #includes out of extern "C" blocks, make STATIC_ASSERT work in C++.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9737 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
i-nod cec20aae6a - NSIS changes from 2.3 (#1111).
- Additional fixes to [9642]: remove old-1.10-balance.wz instead of origianl.wz.
- MinGW build system updates.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9727 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
Cyp 238d42c0f8 logical: Use separate pseudorandom number generator for game decisions, which should at some point be made to be synchronised between clients.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9670 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:09 +01:00
Buginator 7266552505 Fix for 64bit compilers.
Reported by atis_home  (thanks!)

closes ticket:1523

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9594 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:58 +01:00
Buginator 3a5f7d556b Use #define NOMINMAX to disable the min / max macros in windows.h
instead of r9562
The other option was to use (std::max) as in, you have ( ) around min/max



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9589 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Cyp 8f034fe834 Workaround for Microsoft bugs such as #defining random words such as min and max.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9562 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:55 +01:00
Per Inge Mathisen 8f51743062 Keep bitfields of vision knowledge for faster comparisons. This speeds up map vision updates by almost 15%. (Reviewed by Cyp_.)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9559 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:54 +01:00
Christian Ohm 36acdc554b Add Croatian translation by 13KukYNexus666.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9474 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:43 +01:00
Guangcong Luo 3579209ab4 Fix bug #1466 - release builds shouldn't assert - fixes a ton of "crashes" in Mac OS X and Linux.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9451 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:39 +01:00
Christian Ohm 3ab1a0104d Update Spanish locale names.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9370 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:25 +01:00
Cyp 6ddb1eadb2 cpp: Add extern "C" {} in headers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9336 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:21 +01:00
Christian Ohm 2b2a187172 Update Windows language table according to MSDN.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9326 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:20 +01:00
Guangcong Luo 3ac9f53bf8 Add support for Cmd/Meta keyboard shortcuts. Make keyboard shortcuts look nicer: "lctrl - f11" to "Ctrl + F11" (Warzone keyboard shortcuts accept both LCtrl and RCtrl)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9306 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:15 +01:00
Per Inge Mathisen 9c6b55f2d6 Remove unused definitions.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9187 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:26:59 +01:00
Per Inge Mathisen 93f1d85e2d Add new debug log category for saving whatever was sent to console.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9102 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Guangcong Luo 357de2a6cb Apply patch #1330 provided by Cyp - Add unicode support to text boxes and game-chat
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9101 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Christian Ohm cd577664ca Add Ukrainian translation.
Closes #947.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9039 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:22 +01:00
Buginator 1fc98725c8 frontport r7797
"In inputLooseFocus(), we clear the keyboard/mouse to the init state (KEY_UP).

fixes ticket:515 "

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8750 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:48 +01:00
Buginator 38528c7524 fix typo (r8709)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8738 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:46 +01:00
Guangcong Luo ad7e87792d Use 32x32 cursors if unknown cursor type given.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8723 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Christian Ohm 55f12a5d52 Hurd build fixes.
Closes #969.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8706 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
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
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
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
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 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
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
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
Buginator a86cbc2e3c As was discussed on the ML, removing SQL from trunk.
Please test!!
OS X & mingw builds may be broken!


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8312 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:50 +01:00
Christian Ohm df7f2223d6 Compare locale names before claiming they differ
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8302 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:48 +01:00
Buginator 6df5783314 Bad editor, bad! (it inserted wrong codes)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8215 4a71c877-e1ca-e34f-864e-861f7616d084
2009-10-06 22:10:00 +02:00
Buginator 9c23caf1b8 SUBLANG_ESTONIAN should have been SUBLANG_DEFAULT.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8214 4a71c877-e1ca-e34f-864e-861f7616d084
2009-10-06 22:10:00 +02:00
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
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
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 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 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
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
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