Commit Graph

316 Commits (03833edf3fc5c5f726f507d5352635fba9c7e475)

Author SHA1 Message Date
Cyp 8cca01dfe2 Do not treat pointers as 32-bit integers when comparing values in scripts.
When comparing two RESEARCHes, compare RESEARCH::ref, since the pointers may apparently be different.

Fixes ticket:3027.
2012-01-07 18:41:54 +01:00
vexed 193552de92 Update MSVC solution for building both SDL & Qt backends.
Note:
Highly recommend to use STLport, (www.stlport.org).  MS's version is too slow.
Qt finally released libs for 2010, but I have no idea if they compile with openSSL support,
which is REQUIRED at the time I write this, so you need to build Qt with SSL support yourself
if the pre-built don't support it.

Don't forget to setup the environment variable QTDIR correctly when using Qt builds!
Hack note: configuration type of 'utility' was needed to pick which lib to link to--yes, that is lame,
but I see no other fix for now.
Default builds are set for SDL.
2012-01-07 01:33:40 -05:00
Per Inge Mathisen 700bb7a56e Merge branch 'master' into qt-sdl
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
2011-12-17 16:02:26 +01:00
Per Inge Mathisen 529e28530d Add extra debug info to trace savegame corruption bug. 2011-12-12 22:17:42 +01:00
cybersphinx 8d309f5b22 Remove some unneeded code.
Found by clang's analyzer. Closes #2970.
2011-12-11 18:12:21 +01:00
Per Inge Mathisen 69f6dc222c Split out WzConfig class from the rest of the Qt-backend-specific code. 2011-12-11 15:51:31 +01:00
dak180 e5d7318b0c Speed boosts (for the mac build times).
Also PBXBuildRules simplification.
2011-12-04 14:23:43 -05:00
vexed 41515b089b More fixes to the MSVC build system 2011-11-08 21:41:58 -05:00
vexed de28a736ef Updates for the red headed stepsister.
Refs #2936.
2011-11-08 14:01:40 +01:00
cybersphinx 8581c9a29f Use automake's builtin lex/yacc handling.
Original patch by cazfi
(http://forums.wz2100.net/viewtopic.php?p=88749#p88749).

Refs #2936.
2011-11-08 14:01:06 +01:00
Per Inge Mathisen da765d2670 Fix problems with saving and loading wzscript in ini format. 2011-10-23 23:14:17 -04:00
Per Inge Mathisen 3a89d6e2cc This should fix the problems with scripts being broken due to different interpretations
of the bool size. And should make debugging script save issues somewhat easier. The savegame
format itself is not very pretty, but it is not meant to last. This breaks all existing
savegames. Closes ticket:2923.
2011-10-22 20:28:51 -04:00
Per Inge Mathisen ec99463ebf wzscript cleanup 2011-10-22 13:38:04 -04:00
Per Inge Mathisen 0555f02411 wzscript cleanup 2011-10-22 13:25:41 -04:00
cybersphinx 2dbd06e9b1 Get rid of the unmaintained makefile.win32s.
Closes #2900.
2011-09-25 19:58:13 +02:00
vexed f31e223626 Fix all builds, they should now all compile assuming everything is set up correctly.
You have both Debug & Release builds, using MS's STL, and the you have Debug & Release builds using STLport.
The STLport version is prefered.
2011-09-03 00:21:40 -04:00
Buginator be2c105b7a Update build for Release builds & using STLport.
Update release builds to SSE2 + STLport.
2011-06-25 19:48:46 -04:00
Buginator 690b2ccfde Fix MSVC project files that were broken after the miniupnc move. 2011-05-27 20:44:58 -04:00
cybersphinx 4c68d121d6 Don't uselessly include static libraries in other static libraries.
Saves ~40 MB of diskspace when building.
2011-04-25 21:33:53 +02:00
Buginator 1f5d94a564 Fix VS2k10 for Qt.
NOTE: All Qt headers *MUST* be before of the other headers, or else we get tons of conflicts
***
DO NOT CHANGE HEADER ORDER, unless you know what you are doing, it will fubar
other build systems!
****
close ticket:2570
2011-03-24 20:06:59 -04:00
Buginator 12e1d13c6c Part 2:
Fix overzealous BOOL->bool conversion

Structures *must* remain the same size, BOOL was initially cast as a int, and we would read/write values expecting 32bit values, needless to say, this caused issues. The same applies to varaiables that pretend to be a BOOL, and may indeed have been used as a bool, but again, the size is 32bits, not 1 byte.

Revert "fix [s]BOOLs bool by 4B0/\/\1|\|4710|\|" This reverts parts of commit a72c41aeec

fixes ticket:2556
2011-03-19 21:52:25 -04:00
Buginator 405d03224c Fix overzealous BOOL->bool conversion
Structures *must* remain the same size, BOOL was initially cast as a int,
and we would read/write values expecting 32bit values, needless to say,
this caused issues.
The same applies to varaiables that pretend to be a BOOL, and may indeed have
been used as a bool, but again, the size is 32bits, not 1 byte.


Revert "fix [s]BOOL[/s] bool by 4B0/\/\1|\|4710|\|"
This reverts parts of commit a72c41aeec

fixes ticket:2556
2011-03-19 18:40:25 -04:00
Buginator 31502ccdce Let us try this again, leave the never-interactive option for the lexers.
Set never-interactive option in lexers so that Flex doesn't use isatty() function from unistd.
Define YY_NO_UNISTD_H when no unistd.h is detected.
Remove attempt to fix isatty error on Windows introduced in  2f780609.
cherry picked from commit c046bb88e5
2011-03-17 21:35:07 -04:00
Buginator 5cfd2e9dbe Initial VS2k10 changes.
VS2k5 (no longer supported with platform SDK)& VS2k8 are NOT supported anymore.
Redo other aspects as well in preparation of moving libs out of the main codebase.
NOTE: You *must* have msysgit installed, and it should be in your system path,
or you can modify the local property sheet to point to it.
This is needed to generate the autorevision.h file, (that fix is next)
2011-03-17 21:35:00 -04:00
Cyp 8ba7c625f0 Fix "bool|bool" instead of "bool|BOOL" in script lexer.
(Broke in a72c41aeec0136c86007739a97ccc9ed508c0283.)
2011-03-15 15:29:34 +01:00
abomination a72c41aeec fix [s]BOOL[/s] bool by 4B0/\/\1|\|4710|\|
[Edit by Cyp: Removed a "typedef int bool;" when building on non-windows.]
2011-03-13 12:32:24 +01:00
Cyp a7730ccd15 Change "typedef struct {...} Blah;" into "struct Blah {...};".
Removed a few structs due to disuse.
2011-02-25 21:30:13 +01:00
Cyp ae2ce18314 Bump year.
sed -i 's/\(Copyright (C) .*-201\)0\( *Warzone 2100 Project\)/\11\2/' {src,lib/*{,/*}}/*.{c,cpp,h,y,l}
2011-02-25 18:45:27 +01:00
buginator 87c9f38dc3 Revert "Add guard to YY_NO_UNISTD_H definition."
This reverts commit f1ebbe6eba.

Revert "Set never-interactive option in lexers so that Flex doesn't use isatty() function from unistd."

This reverts commit c046bb88e5.

see ticket:2444 for more info.
close ticket:2444
2011-01-30 01:40:53 -05:00
Per Inge Mathisen 64f1b6b895 Fix memory leaks reported by cppcheck 2011-01-18 00:36:49 +01:00
safety0ff c046bb88e5 Set never-interactive option in lexers so that Flex doesn't use isatty() function from unistd.
Define YY_NO_UNISTD_H when no unistd.h is detected.
Remove attempt to fix isatty error on Windows introduced in  2f780609.
2011-01-15 13:39:51 -05:00
Per Inge Mathisen 53aa5e55dc Remove some dead code 2011-01-13 14:53:26 +01:00
Per Inge Mathisen 9e9fc1ba5b Misc fixes for ticket:2435 (cleanup, cosmetic) to reduce diffcount 2011-01-09 14:46:18 +01:00
cybersphinx 96376b088e Fix compilation with g++ 4.6.
Most of this just removes unused variables. Closes #2437.
2011-01-08 18:23:01 +01:00
buginator e8d5913372 Apply patch — kill some more warnings, and fix a few issues that Buginator found. 2010-12-25 00:38:06 +01:00
Cyp 7c9b7acae1 Fix building with gcc 4.5.1.
Added unsigned casts to suppress compiler warnings due to enum abuse.
2010-12-22 00:58:59 +01:00
Cyp 9f160d95c0 Add (unsigned) cast in mixed-enum switch, to prevent compiler errors.
(Not sure which compiler version it was.)
2010-12-22 00:44:52 +01:00
Cyp 23d5dcd5dd Remove extern "C" {} from most places, due to longer being needed. 2010-12-21 17:20:48 +01:00
dak180 dcca83dd2a 68 warnings on the wall, take some down, grind them to dust (with help from per), 40 warnings on the wall. 2010-12-20 17:28:01 -05:00
Cyp c95692c05b Update *.vcproj files from ticket:2421.
And removed extern "C" {} from some headers, apparently Windows can't handle extern "C" consistently.
2010-12-20 04:25:01 +01:00
Cyp 36484909d6 Try to fix Windows exception handler and makefiles. 2010-12-20 01:07:12 +01:00
Cyp 12e8e5bc80 Rename *.lex.c to *.lex.cpp and *.tab.c to *.tab.cpp. 2010-12-16 23:28:56 +01:00
Cyp 0646b37603 Rename *.c to *.cpp. 2010-12-16 23:28:56 +01:00
Cyp a2cd7b0592 Make everything compile successfully with g++, without -fpermissive. 2010-12-16 23:24:40 +01:00
Cyp 2bcb709cf4 Move broken dependency hack out of most Makefile.am's, except the for the root. 2010-12-16 23:14:38 +01:00
cybersphinx 7a672cab30 Fix includes for generated files. 2010-12-11 15:58:39 +01:00
Cyp bf38eb51ea Add branch switching hack to remaining Makefile.am files. 2010-12-06 00:19:30 +01:00
safety0ff 8c9e7d5bd0 Fix an invalid pointer dereferencing issue in the script events system.
Closes #2300.
2010-11-21 15:48:31 -05:00
safety0ff 16681df600 Revert "Fix another memory clobbering issue. (dereferenced pointer)"
This reverts commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0.
2010-11-21 15:48:31 -05:00
buginator f8517a7716 Fix another memory clobbering issue. (dereferenced pointer)
Patch Author: Safety0ff
fixes ticket:2300

Original detective work done by Ai_Tak (ticket:1656)

Signed-off-by: buginator <buginator@gna.org>
(cherry picked from commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0)
2010-11-13 13:40:58 -05:00