Commit Graph

3246 Commits (d0fc1e580d7fc57a5c10efabc764085835f45e51)

Author SHA1 Message Date
Cyp 23f318fe39 Merge branch 'master' into qt
Conflicts:
	lib/exceptionhandler/exceptionhandler.vcproj
	lib/framework/frame.h
	lib/framework/framework.vcproj
	lib/framework/input.h
	lib/gamelib/gamelib.vcproj
	lib/iniparser/iniparser.vcproj
	lib/ivis_opengl/ivis_opengl.vcproj
	lib/netplay/netplay.vcproj
	lib/script/script.vcproj
	lib/sequence/sequence.vcproj
	lib/sound/sound.vcproj
	lib/widget/widget.vcproj
	macosx/Warzone.xcodeproj/project.pbxproj (resolved in favour of qt)
	src/Makefile.am
	win32/Warzone2100.vcproj
2011-03-22 00:01:28 +01:00
Cyp fe4d13f335 Add Meta as alternative to Alt when giving scout orders. 2011-03-21 23:56:08 +01:00
Cyp e5a4039e8f Fix Shift+Tab and ` keys.
Fixes ticket:2561.
2011-03-21 23:13:41 +01: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
Cyp ccab8415fa Add team-coloured blitting functions. 2011-03-18 19:18:48 +01: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 ab118527f0 add guards 2011-03-17 21:35:06 -04:00
Buginator 466374d15d Populate some defines for MSVC (which we do nothing with anyway) 2011-03-17 21:35:03 -04:00
Buginator 0d4378c96f Add MSVC version guard, since this function is now included. 2011-03-17 21:35:02 -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
Per Inge Mathisen 59309f5e59 Set a more sane FPS default limit of 60, rather than 30. 2011-03-15 21:17:21 +01:00
Per Inge Mathisen 8c69f5dc19 Clean up jump propulsion code. Fix warning in audio test code. Ref warnings from ticket:2531 2011-03-15 18:50:03 +01:00
Cyp 8ba7c625f0 Fix "bool|bool" instead of "bool|BOOL" in script lexer.
(Broke in a72c41aeec0136c86007739a97ccc9ed508c0283.)
2011-03-15 15:29:34 +01:00
Cyp e689ad51d5 Merge remote branch 'origin/master' into qt
Conflicts:
	configure.ac
	lib/exceptionhandler/exceptionhandler.h
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/input.cpp
	lib/framework/input.h
	lib/ivis_opengl/pieclip.h
	lib/ivis_opengl/screen.cpp
	macosx/Warzone.xcodeproj/project.pbxproj (used qt version)
	src/console.cpp
	src/console.h
	src/frontend.cpp
	win32/libs/Makefile
and src/Makefile.am (resolved by Safety0ff)
2011-03-13 22:31:19 +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 ad1fcb0c99 Remove some surviving “extern "C"”. 2011-03-13 10:30:13 +01:00
safety0ff 5ac26462f1 Fix use of uninitialized variable in exception handler. 2011-03-12 12:23:56 -05:00
safety0ff ad4a33a789 Fix capitalization of winsock2.h, not sure if this include is still needed (not present in master). 2011-03-12 10:19:04 -05:00
Per Inge Mathisen c7d206b6e9 Now run save/load of script state 2011-03-12 14:47:45 +01:00
safety0ff 635643e101 Add openal cflags to sequence lib build, fixes linking with static openal-soft. 2011-03-02 22:36:11 -05:00
safety0ff f1495ac6ef Convert command line options to utf-8 and use unicode directory routines (Windows).
Closes #1066.
2011-03-01 20:48:33 -05:00
Cyp 676f453332 Do memset of NetPlay.games array, not MAX_PLAYERS elements of NetPlay.games.
MAX_PLAYERS was less than MaxGames, so it wouldn't memset too much, at least.
2011-02-28 20:06:30 +01:00
Cyp 239eebec00 Remove GAME_SECONDARY in favour of GAME_DROIDINFO, which is sent more efficiently for multiple droids.
Instead of one message per droid, it sends one message for all droids, with the list of droids encoded as droid ID deltas.
2011-02-27 20:20:43 +01:00
Cyp cc150fc2f7 Exit if shaders are not supported, and revert "Hack in the team colour when shaders aren't supported."
This reverts commit e0617af5e6.

If you are building from source, and you cannot upgrade your graphics drivers, you can revert this revert, and the game may be playable for now.
2011-02-25 23:01:03 +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 dc4cf90ce5 Merge branch 'master' into qt
Conflicts:
	lib/framework/input.cpp
	lib/ivis_opengl/screen.cpp
	lib/ivis_opengl/screen.h
	lib/widget/scrap.cpp
	lib/widget/scrap.h
	macosx/Warzone.xcodeproj/project.pbxproj
	src/multiint.cpp
2011-02-25 18:59:41 +01:00
Cyp 4a1b5fb543 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:50:54 +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
Cyp e0617af5e6 Hack in the team colour when shaders aren't supported.
Ugly, but better than nothing.
2011-02-20 22:10:12 +01:00
Per Inge Mathisen 48ff5e55d2 Fix 2 cpp check warnings reported by pabs3. 2011-02-18 15:54:39 +01:00
Cyp 733ab6e911 Fix compilation with C++0x compilers.
Can't use nullptr, until switching to C++0x.
2011-02-15 14:28:08 +01:00
Cyp 577cbbf874 Fix weird logfile date due to Jan..Dec = 0..11 in struct tm. 2011-02-14 22:08:11 +01:00
Per Inge Mathisen 5ea9d75ab2 qt branch: Soften font colours a bit to make them look more like master. 2011-02-06 22:41:27 +01:00
cybersphinx dc2385368c Merge branch 'master' into qt
Conflicts:
	lib/framework/frame.cpp
	lib/framework/frame.h
2011-02-05 18:44:00 +01:00
cybersphinx a236387ad1 Add missing include. 2011-02-05 18:35:56 +01:00
cybersphinx 1db938cd0b Set a window icon.
lib/framework/wz2100icon.h created from the 32x32 icon from
icons/warzone2100.ico by the Gimp's C code export.

Closes #2465.
2011-02-05 18:23:00 +01:00
cybersphinx 7b0316696e Add cast to fix compilation with -Werror. 2011-02-05 18:00:39 +01:00
Giel van Schijndel e7d17ecda0 exceptionhandler: print *exact* faulting instruction
Use the signal handler's `sigcontext` to find the exact stack frame and
instruction address where the fatal signal ocurred, then disassemble
those exact locations (rather than hoping the 4th frame is the offending
one).

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2011-02-05 16:47:34 +01:00
Per Inge Mathisen 27741a2200 Merge branch 'master' into qt
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
	tests/astartest.c
2011-01-30 23:45:39 +01:00
Per Inge Mathisen 9344462e92 Add abstract file system interface for Qt access to physfs data resource. Thanks to EvilGuru for the idea and review. 2011-01-30 23:39:22 +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 e86b70ade1 qt branch: Add application icon. Closes ticket:2465 2011-01-29 20:22:43 +01:00
Rene Jochum abcd0a4109 Stop connecting to the lobbyserver when it doesn't accept the game 2011-01-27 12:19:35 +01:00
Rene Jochum 3137d042ea Fix NETregisterServer connecting multiple times also fixes the requirement to reconnect to the lobby for updates 2011-01-25 04:14:08 +01:00
Per Inge Mathisen cead34eea3 Hack around some accumulated brokenness to make --selftest work again 2011-01-24 20:07:30 +01:00
safety0ff f1ebbe6eba Add guard to YY_NO_UNISTD_H definition.
Closes #2444.
2011-01-24 13:09:16 -05:00
Cyp d39112244b Merge remote branch 'origin/master' into qt
Conflicts:
	lib/framework/frame.h
	src/main.cpp
2011-01-22 23:05:36 +01:00
Cyp 3d5f96f199 Fix memory leak when saving config.
Fixes ticket:2455.
2011-01-20 21:26:00 +01:00
Cyp c5a6f8b280 Fix valgrind warning due to use of inif->size instead of inif->n in loop.
Fixed by removing the inif->size and inif->n variables and using a std::vector instead.
2011-01-19 15:01:45 +01:00
Cyp 82fbf17cff Make team and colour of AIs visible to non-hosts.
Also, remove tooltip saying non-hosts can change AI difficulty levels.
2011-01-18 14:34:23 +01:00
cybersphinx 038a3d5147 Remove remnants of the old iniparser. 2011-01-18 01:19:32 +01:00
Per Inge Mathisen 64f1b6b895 Fix memory leaks reported by cppcheck 2011-01-18 00:36:49 +01:00
Cyp 4fb9e61548 Remove unused TEXT_DISPLAY, improve format string consistency and remove weird casts. 2011-01-18 00:20:04 +01:00
Cyp f99d9b20cc Make config file loading/saving less weird.
Changelog: Usernames such as "Meów" will no longer be truncated at the first unicode character to "Me" when restarting Warzone 2100.
2011-01-18 00:20:04 +01:00
Cyp 8b49291b5d Simplify NETbin interface.
Redundantly, the data length was redundantly sent twice, which was redundant.
2011-01-18 00:20:04 +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 268574f8c0 Make sure host gets to join his own game. 2011-01-15 15:34:56 +01:00
Per Inge Mathisen 971e5de351 Add open/close buttons to pregame dialog. Basic support in netcode added. Closes ticket:2435 2011-01-15 13:29:23 +01:00
Cyp 6bd1ac3e08 Remove leftover lib/ivis_common/pietypes.h, noticed by dak180. 2011-01-14 21:16:19 +01:00
Cyp 28f9830a63 Merge remote branch 'origin/master' into qt
Conflicts:
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/input.h
	lib/ivis_common/Makefile.am
	lib/ivis_common/piestate.cpp
	lib/ivis_common/pietypes.h
	lib/ivis_opengl/imd.h
	lib/ivis_opengl/piestate.cpp
	lib/ivis_opengl/piestate.h
	lib/ivis_opengl/pietypes.h
	lib/sound/audio.h
	lib/sound/sound.vcproj
	lib/sound/track.h
	lib/widget/editbox.cpp
	lib/widget/scrap.h
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-All.xcconfig
	src/Makefile.am
2011-01-14 19:26:55 +01:00
Cyp e46b08f8e1 Fix not sending player info for players 8+. 2011-01-13 16:40:34 +01:00
Cyp 8248789dfd Minor changes due to review by Per.
And also readded some changes that got lost from nexus.slo somehow.
2011-01-13 15:58:47 +01:00
Cyp f00b6149d9 Bump MAX_PLAYERS to allow 10 normal players + 1 scavenger player. 2011-01-13 15:58:46 +01:00
Cyp a3e5ea7276 Reduce dependence on MAX_PLAYERS == 8. 2011-01-13 15:58:46 +01:00
Per Inge Mathisen 53aa5e55dc Remove some dead code 2011-01-13 14:53:26 +01:00
Per Inge Mathisen 02ca800a92 Insane AI now always starts with defenses. Lets see if people like this. 2011-01-09 18:22:21 +01:00
Per Inge Mathisen f263cf5103 Add GUI dialog for choosing which AI you want to play against. Move semperfi and dydo into main. Change difficulty
slider into four separate steps (Easy, Medium, Hard, Insane). Thanks to Cyp for review. For more info, see ticket:2435
2011-01-09 16:35:49 +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
Cyp b72911f82f Remove NetPlay.maxPlayers, since it was just a sometimes-correct copy of game.maxPlayers. 2011-01-08 15:49:30 +01:00
Cyp 4af4b82004 Use Vector2i in MOVE_CONTROL. 2011-01-08 01:30:57 +01:00
Per Inge Mathisen 7f5da6ad47 Use more of MAX_PLAYERS in the code rather than plain numbers. Define MAX_PLAYERS for scripts. From patch by Cyp. 2011-01-05 23:09:38 +01:00
Cyp 4a34b821ad Fix parts of UI that break if increasing MAX_FACTORY. 2011-01-04 22:32:52 +01:00
Per Inge Mathisen c4d4dcd73a The colour chooser is now a proper button. The double-click kick is now gone (use the button). Kick button moved to team chooser.
The kick button is removed for single player and AIs and non-hosts (made no sense). The position chooser now allows you to click
on any other player to switch places. Removed broken ping symbol. Removed broken ranking symbol. Make sure we flush the connection
with the kick message before we cut it. Fix reception of kick message so that we do not crash when we do receive them. ticket:2435
2011-01-04 18:51:15 +01:00
Cyp 734d52984d Set bsocket = NULL when host drops, hopefully reduce the chance of crashing. 2011-01-01 23:24:25 +01:00
Cyp 738a1fc38c Strip "Class::" from "Class::myFunction" when compiling with MSVC, in syncDebug().
Other compilers don't add the "Class::".
2011-01-01 21:28:13 +01:00
buginator c10886b7b1 Change (HANDLE)(HANDLE)hProcess to (HANDLE)hProcess 2011-01-01 14:17:16 -05:00
buginator 4ececd8e49 Fix a plethora of issues for MSVC builds
Rename MERGECOPY to MERGECOPYSYNC to prevent clobbering of a windows function named that.
2011-01-01 13:46:12 -05:00
buginator 1169f20b91 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100: (41 commits)
  Remove some unused legacy code from the old terrain renderer and TERRAIN_VERTEX.
  Die, ivis_common, die\!
  Remove some unnecessary oil resource hacks, including flattening to terrain. Please do not put oil resources on sloped ground. It looks stupid even when flattened.
  Fix misspelling of 'guard tower' in PIE file name to match similar rename in wzgm.
  Remove the unused specular parameter to pie_Draw3DShape. It was always WZCOL_BLACK.
  Remove pietoaster
  Define the default fog colour in the palette file instead of hard-coded.
  Remove the "AI experience" code, which has not been used by the last four AI scripters. Existing savegames may be broken by this.
  Inline pie_SetTranslucencyMode() and remove the entirely superfluous TRANSLUCENCY_MODE abstraction.
  Merge the ivis_common and ivis_opengl directories, only five years and two months after I originally split them apart.
  simplipie: Add warning when not all polygons in a mesh do not use the same number of frames for texture animation.
  Merge the two variants of piestate.cpp; it too confusing to keep two files with the same name doing almost the same thing.
  Slight optimization: Now we draw the entire model within the same glBegin .. glEnd pair.
  Remove support for non-triangle polygons in model files.
  simplipie: Fix error when fixing face culling and tessellation at the same time.
  Tessellate features, effects and other models.
  Tessellate components.
  Tessellate all structure models.
  simplipie: Fix missing space in frame animation directive print out.
  simplipie: Add support for triangle tessellation
  ...
2011-01-01 12:29:17 -05:00
Per Inge Mathisen 53242e1571 Remove some unused legacy code from the old terrain renderer and TERRAIN_VERTEX. 2011-01-01 16:29:49 +01:00
cybersphinx d2499aa9cc Die, ivis_common, die\! 2011-01-01 14:51:53 +01:00
Per Inge Mathisen 7bd5723715 Remove the unused specular parameter to pie_Draw3DShape. It was always WZCOL_BLACK. 2011-01-01 12:58:14 +01:00
Per Inge Mathisen 724cd69882 Define the default fog colour in the palette file instead of hard-coded. 2010-12-31 23:42:21 +01:00
Per Inge Mathisen e27ac240be Inline pie_SetTranslucencyMode() and remove the entirely superfluous TRANSLUCENCY_MODE abstraction. 2010-12-31 23:02:20 +01:00
Per Inge Mathisen 67e9635f9f Merge the ivis_common and ivis_opengl directories, only five years and two months after I originally split them apart. 2010-12-31 22:37:14 +01:00
Per Inge Mathisen 1c0af54edf Merge the two variants of piestate.cpp; it too confusing to keep two files with the same name doing almost the same thing. 2010-12-31 22:18:45 +01:00
Per Inge Mathisen 2e6332ca8c Slight optimization: Now we draw the entire model within the same glBegin .. glEnd pair. 2010-12-31 18:59:41 +01:00
Per Inge Mathisen 88fe0bcb2e Remove support for non-triangle polygons in model files. 2010-12-31 18:22:22 +01:00
Freddie Witherden 7b7b2b8e0e Fix a section-titling bug in the inifile code. 2010-12-30 21:17:18 +00:00
Freddie Witherden 5362cf2217 Fix compilation under GCC 4.5.
Previously, _WZ_ASSERT_ARRAY_EXPR_FUNCTION would return NULL
((void *) 0) for a function with a declared return type of char.
2010-12-30 20:45:35 +00:00
Cyp 5c4b81fa63 Make C++ WZ_ASSERT_STATIC_STRING a compile-time check without using typeid, make C++ WZ_ASSERT_ARRAY_EXPR work. 2010-12-30 00:58:55 +01:00
Freddie Witherden fca489ce42 Iniparser rewrite as per ticket #2012.
This code completely replaces the old iniparser with a new,
cleaner API.  All existing uses of the old code have been ported.

The Xcode and MSVC projects will require updating.
2010-12-29 21:17:12 +00:00
Per Inge Mathisen 7d1e719e13 Remove hard-coded limit for number of polygons in models. This limit is now only relevant for delivery point, oil resource and wall models. 2010-12-29 12:46:10 +01:00
Per Inge Mathisen 086a0fd4bc Add new PIE flag 0x00001000 that specifies that the PIE model should not be stretched to fit to terrain. 2010-12-29 10:57:38 +01:00
Per Inge Mathisen 4eed3bef79 Remove the now obsolete distinction between configurable FPS rates for MP and campaign. Up the maximum FPS to 500 from 200.
To change the max fps rate now change only the "framerate" line. Patch reviewed by Cyp.
2010-12-29 00:24:45 +01:00
Per Inge Mathisen aafe14fbc2 Add separate shader for models rendered for buttons to remove lighting effects from those.
Add support for per-pixel lighting. Patch reviewed by SafetyOff.
2010-12-28 23:35:57 +01:00
Per Inge Mathisen af59954767 Do not spend value resources shading the backsides of polygons or setting irrelevant GL states. 2010-12-27 16:53:13 +01:00
Per Inge Mathisen f5ea79ed3c Enable OpenGL lighting controlled through the vertex shader. Added two new script functions setSunPosition an setSunIntensity.
Added a new PIE file directive MATERIALS that sets material properties for a mesh level. Original patch reviewed by SafetyOff.
2010-12-26 22:12:53 +01:00
buginator e2c7c49a21 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Apply patch — kill some more warnings, and fix a few issues that Buginator found.
2010-12-24 20:02:10 -05: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
buginator c43e15a14b Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Kill idiotic "'BOOL' : forcing value to bool 'true' or 'false' (performance warning)." warning.
2010-12-23 15:53:36 -05:00
Cyp 6a6b23e13b Kill idiotic "'BOOL' : forcing value to bool 'true' or 'false' (performance warning)." warning.
The compiler probably wasted more cpu cycles printing the warning than the conversion ever would.

Refs ticket:2431.
2010-12-23 21:38:18 +01:00
buginator e1eb1a1889 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Fixes ticket:2430 without breaking the cross compile.
2010-12-23 13:38:53 -05:00
Cyp 16a1582aa5 Fixes ticket:2430 without breaking the cross compile.
Error   27      error C2664: 'BOOL (HANDLE,DWORD,PVOID,DWORD,PDWORD)' :
cannot convert parameter 1 from 'DWORD' to 'HANDLE'

Since it cannot convert (HANDLE)hProcess to a HANDLE, the obvious solution is to add a cast: (HANDLE)(HANDLE)hProcess.

Error   26      error C2664: 'BOOL (HANDLE,DWORD,PVOID,DWORD,PDWORD)' :
cannot convert parameter 2 from 'void *' to 'DWORD'
../../../../lib/exceptionhandler/exchndl.cpp: In function ‘BOOL IntelStackWalk(DWORD, void*, void*, _tagSTACKFRAME*, CONTEXT*, BOOL (*)(void*, const void*, void*, DWORD, DWORD*), void* (*)(void*, DWORD), DWORD (*)(void*, DWORD), DWORD (*)(void*, void*,
_tagADDRESS*))’:
../../../../lib/exceptionhandler/exchndl.cpp:599: error: invalid conversion from ‘long unsigned int’ to ‘const void*’

Since it needs a void *, no, I mean a DWORD, no, I mean a void *, the obvious solution is to add a cast: ...id *)(DWORD)(void *)(DWORD)(void *)StackFrame->AddrFrame.Offset
2010-12-23 13:06:13 +01:00
buginator 012029622d Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Try to fix the cross compile.
  Fix releaseBranch script to handle netplay.cpp instead of netplay.c.
  Simplify targetting projectiles.
  Fix WZ_DECL_CONST -> WZ_DECL_PURE on src/vector.h.
  Clean up some weird invalid PROJECTILE * -> BASE_OBJECT * casts.
  Make structures rectangular instead of circular for the purposes of projectile collision detection.
  Remove SPACETIME C wrapper around Spacetime.
  Remove redundant memset()s in loadGame.
  Use default constructors instead of memset for W_INIT (widget init) derivatives.
  Fix game saving/loading.
  Reset constructor upgrade between games.
  Remove ORDER_LIST_MAX and the corresponding 10 order limit to droid order queues.
  Use --debug=memory to see sizeof(...) for the various object types.
2010-12-22 22:47:40 -05:00
Cyp 76690bbc4b Try to fix the cross compile. 2010-12-23 03:14:32 +01:00
Cyp c7e9e05d30 Fix WZ_DECL_CONST -> WZ_DECL_PURE on src/vector.h.
Think not allowed to use WZ_DECL_CONST on functions that take references to parameters. The compiler should be able to optimise inline functions properly even without any WZ_DECL_BLAH, anyway.
2010-12-23 01:42:18 +01:00
Cyp c875c639b7 Clean up some weird invalid PROJECTILE * -> BASE_OBJECT * casts.
And make some functions take SIMPLE_OBJECT * instead of void *.
2010-12-23 01:42:18 +01:00
Cyp 76430c583f Use default constructors instead of memset for W_INIT (widget init) derivatives.
Accidentally fixed 5 memsets of W_FORMINIT, which were incorrectly using sizeof(W_BUTINIT). (The sizeof() was smaller than the object, so it didn't overflow, at least.)

And removed an ugly memset of a DROID.
2010-12-22 17:26:39 +01:00
buginator 29e7585d9f Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Fix building with gcc 4.5.1.
  Add (unsigned) cast in mixed-enum switch, to prevent compiler errors.
2010-12-21 19:25:14 -05: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
buginator 7fbf88885e Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Simplify normalsOnTile in src/lighting.cpp.
  Make Vectors fun to use. Instead of Vector2f_Sub(Vector2f_Mul(myVector, myScalar), myOtherVector), write myVector*myScalar + MyOtherVector.
  Fix GLee.cpp → GLee.c in Linux and Windows build scripts.
  Normalise the warnings for the mac builds.
2010-12-21 18:43:21 -05:00
Cyp 309398dd1d Make Vectors fun to use. Instead of Vector2f_Sub(Vector2f_Mul(myVector, myScalar), myOtherVector), write myVector*myScalar + MyOtherVector.
Reviewed by Safety0ff.
2010-12-21 22:35:37 +01:00
Cyp 0a064c2470 Fix GLee.cpp → GLee.c in Linux and Windows build scripts.
And LPTCSTR → LPCTSTR in some Windows file, apparently LPTCSTR wasn't similar enough for it to compile, closes ticket:2428.
2010-12-21 22:13:25 +01:00
dak180 760d19f776 Change Glee back to c; eliminates warnings in the mac build. 2010-12-21 15:18:18 -05:00
buginator 238cbaad90 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Change Glee back to c; eliminates warnings in the mac build.
  Make OBJECT_POSITION inheritance explicit.
  Remove extern "C" {} from most places, due to longer being needed.
  Try to fix cross-compile errors.
  Fix strict-aliasing warnings reported by dak180.
  Don't fail to build when building from tarballs.
2010-12-21 12:58:40 -05:00
dak180 22285a7528 Change Glee back to c; eliminates warnings in the mac build. 2010-12-21 12:30:41 -05:00
Cyp 23d5dcd5dd Remove extern "C" {} from most places, due to longer being needed. 2010-12-21 17:20:48 +01:00
Per Inge Mathisen 94a4e92b7e qt branch: Inline the now superfluous wzGetClipboard() cpp-wrapper. 2010-12-21 16:57:38 +01:00
Cyp bdc7f9d72a Try to fix cross-compile errors. 2010-12-21 16:34:04 +01:00
Cyp 49c0f1cd8b Fix strict-aliasing warnings reported by dak180. 2010-12-21 16:33:45 +01:00
buginator a59e7c946c Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Fix usage of QString::remove which something completely different when given one parameter.
  Allow clicking on blueprints with extra trucks.
2010-12-21 01:59:50 -05:00
Cyp 8b4318dd23 Fix usage of QString::remove which something completely different when given one parameter. 2010-12-21 04:04:15 +01:00
Cyp 91ee0f7655 Merge branch 'master' into qt
Conflicts:
	lib/framework/frame.h
	lib/framework/types.h
	lib/widget/editbox.cpp
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-Debug.xcconfig
2010-12-21 03:59:22 +01:00
buginator 5f7ea7ef69 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Remove the NETMESSAGE wrapper around NetMessage.
  Fix walls being built with incorrect orientation when camera is rotated.
  Simplify lib/widget/editbox.cpp, using QString.
2010-12-20 19:16:34 -05:00
Cyp b8ae806f29 Remove the NETMESSAGE wrapper around NetMessage.
It wasn't compiling on Windows anymore, anyway — fixes ticket:2426...
2010-12-21 01:10:57 +01:00
Cyp 4963dfd1bb Simplify lib/widget/editbox.cpp, using QString.
This shortens editbox.cpp by 23.5%, and allows setting the cursor position by clicking in the edit box.
2010-12-21 01:10:57 +01:00
buginator 1b28712974 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  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:35:49 -05: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
buginator d6a38ab0e1 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Remove MersenneTwister C wrapper.
  Remove unused and untested PointTree C interface.
  Clean up (BASE_OBJECT **) casts, which the compiler is allowed to do funny optimisations with.
  Remove bool, true, false defines, add NETauto() and move PACKAGED_CHECK somewhere more appropriate.
  Contrary to the information I had fstack-protector seems to need 10.6 min to build.
2010-12-20 16:04:02 -05:00
Cyp 68b50aecda Remove bool, true, false defines, add NETauto() and move PACKAGED_CHECK somewhere more appropriate. 2010-12-20 21:41:51 +01:00
buginator 540e26941b Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Remove use of %zd and %zu, since Windows felt like using %Id and %Iu instead.
  Try to fix isatty linkage errors on Windows.
2010-12-19 23:48:01 -05:00
Cyp 146599b05c Remove use of %zd and %zu, since Windows felt like using %Id and %Iu instead.
Fixes ticket:2422.
2010-12-20 05:33:08 +01:00
Cyp d9ce212728 Try to fix isatty linkage errors on Windows.
Hope this works, somehow.
2010-12-20 05:08:58 +01:00
Cyp 2f780609a2 Try to fix isatty linkage errors on Windows.
Hope this works, somehow.
2010-12-19 22:50:45 -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 0c40449e37 Make Windows' ResetRPTDirectory function compile.
(According to ticket:2421.)
2010-12-20 02:51:28 +01:00
Cyp 180d0bb62a Try to fix one more Windows-specific build error. 2010-12-20 02:12:09 +01:00
Cyp 57d9a7dd6f Add global using std::abs, in order to try to find and fix Windows-specific build errors.
Why can't certain compilers be standards-compliant?

(Why do people take the absolute value of something unsigned, anyway, even though it should be permitted.)
2010-12-20 01:46:19 +01:00
Cyp 36484909d6 Try to fix Windows exception handler and makefiles. 2010-12-20 01:07:12 +01:00
Cyp e0ee1eec3c Use std::complex<double>, which is much more readable than the alternative. 2010-12-19 21:59:19 +01:00
Cyp bd6b96315b Merge branch 'cpp' into qtcpp
Conflicts:
	lib/framework/Makefile.am
	lib/framework/frame.cpp
	lib/framework/framework.vcproj
	lib/framework/input.cpp
	lib/ivis_opengl/piestate.cpp
	lib/ivis_opengl/screen.cpp
	lib/ivis_opengl/textdraw.cpp
	lib/widget/Makefile.am
	lib/widget/editbox.cpp
	lib/widget/scrap.cpp
	lib/widget/widget.vcproj
	macosx/Warzone.xcodeproj/project.pbxproj
	src/Makefile.am
	src/main.cpp
	src/makefile.win32
2010-12-19 16:51:27 +01:00
Cyp 0d2e373456 Merge branch 'master' into cpp
Conflicts:
	lib/widget/bar.cpp
	lib/widget/editbox.cpp
2010-12-19 16:24:38 +01:00
Cyp bd2f6fb7ce Use constructors/destructors for WIDGETs, unduplicating a tonne of probable copy/paste abuse in the process. 2010-12-19 16:16:17 +01:00
Cyp 7a49623b7f Use new/delete for allocating/deallocating WIDGETs. 2010-12-19 00:35:15 +01:00
Cyp 9f43c1f681 Make WIDGET and W_INIT inheritance explicit. 2010-12-18 23:13:27 +01:00
Cyp 0fe13d055a Print distances and speeds in terms of tiles, not in 1/128ths of tiles.
Changelog: Print distances and speeds in terms of tiles.
2010-12-18 20:01:09 +01:00
Cyp c465f161bf Fix keyboard input being swallowed due to missing events such as SDL_KEYUP.
This is due to a seemingly undocumented bug and/or feature in SDL, where SDL_EventState and SDL_SetEventFilter mysteriously discard all pending events.

The following SDL code in SDL_EventState and SDL_SetEventFilter discards all pending events, with a comment saying it does so:
    while ( SDL_PollEvent(&bitbucket) > 0 )
        ;
There appears to be no documentation of this fact anywhere outside the comment in the SDL code.

I am not aware of any logical reason why enabling events with SDL_EventState should cause less events to be received than otherwise.
2010-12-18 03:07:52 +01:00
Cyp d9813b37e5 Fix crash when dumping too much syncDebug. 2010-12-17 21:46:35 +01:00
dak180 c4ec4ffd2b 144 warnings on the wall, take some down, grind them to dust, 98 warnings on the wall. 2010-12-16 22:05:06 -05:00
dak180 0364933736 Make the xcode project work again. 2010-12-16 21:06:33 -05:00
Cyp 80cc971b61 Merge remote branch 'origin/master' into qt
Fixed gameTime → realTime in lib/framework/wzapp.cpp, since the menus were messed up due to interpreting everything as a double-click.

Conflicts:
	lib/framework/debug.c
	lib/framework/input.c (became wzapp.cpp)
	lib/ivis_opengl/screen.c
	lib/ivis_opengl/screen.h
	lib/ivis_opengl/textdraw.c
	macosx/Warzone.xcodeproj/project.pbxproj (used qt version)
	src/display.c
	src/main.cpp
	src/terrain.c
2010-12-17 00:36:10 +01:00
Cyp 3f6ecec025 Replace sqrt(x) with sqrt((double)x) to make broken compilers happy. 2010-12-16 23:28:57 +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
Cyp 0fe191778b Actually check the mouse position when clicking, instead of just assuming people clicked wherever the mouse moves to later.
In theory, this should make the UI usable, even on machines that don't consistently get 10000 FPS.

Because WZ widgets are weird, just make the widgets pretend that the mouse stopped moving after clicking or releasing in a given frame.

If you click twice in the same frame, the second widget will still greedily steal the mouse click from the first widget.

Changelog: Try to improve UI responsiveness under low framerates.
2010-12-16 22:20:09 +01:00
dak180 1e6bce9594 Merge remote branch 'refs/remotes/nanotech/master' 2010-12-11 11:52:33 -05:00
cybersphinx dd4391990d Get rid of a few unnecessary Makefile.ams. 2010-12-11 16:41:57 +01:00
cybersphinx 7a672cab30 Fix includes for generated files. 2010-12-11 15:58:39 +01:00
NanoTech 3ccc629eab Replace legacy Carbon dialogs with Cocoa NSAlerts.
Also don't link the main binary with Carbon at all anymore.
2010-12-10 23:39:22 -06:00
buginator b1495d43b6 Trap the ASCII_NEWLINE to only work in non MP games, to prevent abuse. 2010-12-09 00:52:44 -05:00
Cyp f5893a7fe5 Don't include backtraces in syncDebug CRCs.
This should allow using syncDebugBacktrace() without causing a desynch if some clients don't support them or print them differently.
2010-12-08 18:00:08 +01:00
buginator c687c16ee9 Tell people they will see glitches, instead of thinking that they have selective
color blindness for units / structures and don't have a openGL 2.0 card.
2010-12-07 20:17:50 -05:00
buginator ac6b928ad7 Fix map preview screen redrawing, broken in f2ae61805c
Add entries to palette.txt for the new colors used in map preview.
Draw location of oil features.

Changelog: Enhance map preview to show oil locations.
2010-12-06 21:14:06 -05:00
buginator 00c92cbdd7 Fix bug introduced in 09ea0be7c30236809536db332be78b2967d3114d Changelog: Fix kicking of non-hosts who didn't have default color values.
Only change colors if you are the host on the setup screen.
Fixes ticket:2329
(cherry picked from commit fd2843e6431e43cc72b635c422fd18bb19d42c47)

Conflicts:

	lib/netplay/netplay.c
2010-12-06 21:13:54 -05:00
buginator 0049223ccb Use the host's SP color as the default color when hosting games. (cherry picked from commit 09ea0be7c30236809536db332be78b2967d3114d)
Conflicts:

	lib/netplay/netplay.c
2010-12-06 21:13:52 -05:00
buginator bbcad634bc Fix error messages / formatting. (cherry picked from commit 461b8c820cffe97077568f2c25fa480ffec131e4) 2010-12-06 21:13:44 -05:00
buginator 50aafb279e Don't try to render a string that is NULL. Unknown why this happens, need someone that has access to non-English systems to debug this matter more.
refs ticket:2209
refs tickts:2245
(cherry picked from commit b6952c184456b999fb4dfd51ced072ca1b206740)

Conflicts:

	lib/ivis_opengl/textdraw.c
2010-12-06 21:13:42 -05:00
buginator 707eed834b On LOG_ERROR, notify people in-game via the console and a sound effect that there was a error.
It will only do this once every ~30 secs since the last LOG_ERROR was generated to prevent spamming.

This is to help windows and mac users know that there was a error condition, and they need to check their logs.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11702 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 9e4688803ac044a3f9b20bbd4f8b4cc0c7cbc01e)

Conflicts:

	src/display3d.c
2010-12-06 21:13:32 -05:00
Cyp bf38eb51ea Add branch switching hack to remaining Makefile.am files. 2010-12-06 00:19:30 +01:00
Per Inge Mathisen 4f85821bab Cache texture coordinate calculation on game start instead of doing them each frame. Do defensive structure stretching in the vertex shader. See ticket:2310 2010-12-05 16:17:26 +01:00
Per Inge Mathisen 7de25a9d5b Lay the groundwork for a more modern component drawing system. Removes support for OpenGL 1.x. See ticket:2310 2010-12-04 15:57:26 +01:00
Per Inge Mathisen 28624d0c46 qt branch: If OpenGL initialization fails, explain to the user why the program does not start. See ticket:2336 2010-12-04 15:11:56 +01:00
Cyp 5fc3f6b5d7 Fix some GUI dependence on gameTime, and make camera hovering and scrolling be more numerically stable.
The exact solution to the camera height  d²/dt² height = -ACCEL_CONSTANT * (height - desiredHeight) - VELOCITY_CONSTANT * d/dt height  ended up a bit complex.
2010-12-01 13:43:06 +01:00
cybersphinx d6e2ad0c56 Put ifdefs around Linux-specific header/function.
Closes #2366.
(cherry picked from commit 2d4d2d807d98fd9cd3b49891faf0b34976330915)
2010-11-30 01:56:05 +01:00
Cyp 2ad6ff0855 Fix desynch when player leaves, due to clearing buildings at different gameTimes. 2010-11-29 12:48:51 +01:00
Cyp a8f6faaed0 Fix spurious desynch at gameTime 102, due to not clearing desynch logs between games.
Also, no need to duplicate function name strings, which are link-time constants.
2010-11-29 01:45:19 +01:00
cybersphinx b7cb308f30 Allow process to be traced for the crash handler.
Some distributions disallow this (newer Ubuntu for example), so the gdb call
didn't output anything useful. Based on a patch by Safety0ff.
(cherry picked from commit 023ea5b2cea6f57b6690ac7d25fd472aefc911eb)
2010-11-24 16:49:50 +01:00
Buginator 83f1a892e1 Only clear player name when needed.
(When player drops / leaves, you will still see their name instead of the default color name).

Also fix a log line.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11495 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 847edec81737e6c6a42e4c91aede5c99b9a755ce)
2010-11-22 16:06:29 +01:00
safety0ff ae6b76dda5 Fix for ivis state desync, fixes menu colour bug noticed by vexed. 2010-11-22 01:02:11 -05:00
safety0ff 7e872312b8 Fix opengl state clobbering, optimize terrain rendering a little. 2010-11-22 00:05:42 -05: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
Cyp 60d7cb6127 Merge remote branch 'origin/master' into qt
Conflicts:
	.hgignore (manual merge)
	lib/framework/wzapp_c.h (used qt)
	macosx/Warzone.xcodeproj/project.pbxproj (used qt)
	po/*.po (used master)
2010-11-21 21:46:08 +01:00
Cyp ea1e76a09d Handle floating point connector coordinates as well as integer (ignores the floating point part).
Correctly handles "42 127 -3", "42.999 127. -3.1415926535897932384626" and "42... 127.0.0.1 -3.0..0...0" as (42, 127, -3).
Doesn't handle the floating point and integer mixture "42 127.0 -3".
2010-11-21 11:38:36 +01:00
Cyp bdca765f06 Change connector locations and pie_TRANSLATE from floats to ints.
Probably fixes desynchs involving different projectile sources.

Hope no floats are left to affect the game state...
2010-11-20 20:44:40 +01:00
Cyp a0ea827340 Fix VTOLs teleporting to a planet 2.5 million tiles up, due to missing cast before division in last commit. 2010-11-19 12:42:19 +01:00
Cyp 53da8ac0d0 Fix desynch due to deltaGameTime not being deterministic during message processing.
Fixed by setting deltaGameTime = 0 in src/loop.c, after each game-state update.
Also, cleaned up lib/gamelib/gtime slightly.

To reproduce locally, start 2 clients, set one to 20x speed, the other to normal speed, and create droids on uneven terrain using the debug menu.
2010-11-18 10:56:41 +01:00
Cyp 3359fac395 Fix broken moveCalcBlockingSlide comparisons, and make DEG(42) evaluate to 7645 without use of floating point.
After making DEG avoid using float (unless given a float argument), had to fix moveCalcBlockingSlide to avoid out-of-range-comparison error-warnings.

The moveCalcBlockingSlide's int16_t instead of uint16_t was introduced in 6c811c1ecb.

Also, remove lots of unused stuff.
2010-11-16 18:33:20 +01:00
Cyp a0c1c9de0d Change droid experience from float to uint32_t.
Less floats generally reduces the risk of desynchs, don't know if the droid experience caused desynchs, but it might have been possible. Added experience to syncDebugDroid.

Also, fixed QualityFactor and droidResistance integer truncation and made single-player skirmish damage not affected by difficulty level either.
2010-11-16 14:18:01 +01:00
Cyp 48c4958062 Convert iIMDShape.min/max from Vector3f to Vector3i, since they are used in the game state.
Don't know if that could cause any desynchs, but better not to risk it.
2010-11-16 12:01:43 +01:00
Cyp 7df59bafdb Fix desynch when constructing and demolishing the same structure at the same time. 2010-11-15 14:31:28 +01:00
Cyp 40602d428e Verify in syncDebug that generated paths are identical. 2010-11-15 13:11:19 +01:00
buginator df83ed0caa Bump netcode's NETCODE_VERSION_MINOR to sync with new testing build. 2010-11-14 22:38:20 -05:00
buginator 341d4d3bf8 Use 'Warzone 2100 master' as the default directory, and the default crash handler (on windows) directory.
fixes ticket:2317
2010-11-14 22:30:45 -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
Per Inge Mathisen 9b3cf3a382 Allow you to load textures on demand, both ordinary textures and tcmask textures.There is really no reason now to list tcmask textures in the wrf files at all. You can still put a texture in the wrf to override the usual texture loaded with a model (necessary for campaign and terrain dependent base plates). Closes ticket:2304 2010-11-12 21:31:56 +01:00
Per Inge Mathisen bf4ffed04c Allow texture animation and tcmask to be used together. 2010-11-10 20:10:40 +01:00
Cyp be5285f916 Fix duplicate structure IDs by removing GAME_BUILD message type.
The only remaining purpose of GAME_BUILD was to hackishly change structure IDs around, which is not useful since structure IDs are already synchronised.

Changelog: Fix inability to select or target some structures due to duplicate structure IDs.
2010-11-07 14:16:56 +01:00
buginator 5a35eb9f89 CHANGELOG: Correctly handle unicode strings for edit boxes.
fixes ticket:2209
(cherry picked from commit 3012fde61ef92151e0ec5125551a7b3481f05fb8)

Conflicts:

	lib/widget/editbox.c
2010-11-06 15:59:57 -04:00
Per Inge Mathisen 1617b4c3d7 Add new keyword WZ_DECL_ALWAYS_INLINE to label functions that we always want to inline, even when compiling in debug mode.
Also manually inline map tile lookups in the danger map code for maximum performance (avoiding some checks).
2010-11-02 21:12:58 +01:00
Per Inge Mathisen 153c5c5613 Try to fix signed/unsigned comparison bugs in newly converted c++ code. 2010-11-02 21:06:23 +01:00
cybersphinx 99486cb694 Add Turkish translation by Ayhan Görgülü.
Closes #2261.
2010-11-02 15:34:00 +01:00
Buginator 0702fa9eb5 Show map / game name / hosted by in the tooltip for the lobby
closes ticket:2121

This does *NOT* break GAMESTRUCT compatibility.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11546 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 1119dada6868433f6840dd1fe174a7aa3858b081)
2010-11-02 15:30:36 +01:00
Cyp 33c25602f7 Bump netcode version. 2010-10-30 22:59:27 +02:00
Cyp d41a6078d4 Bump netcode version for testing build. 2010-10-30 22:57:54 +02:00
cybersphinx 4f411fd096 Add stdlib.h to fix compilation. 2010-11-02 01:18:45 +01:00
Cyp 95b4cff1b8 Merge remote branches 'origin/qt-trunk' and 'origin/master' into qt
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
2010-10-31 22:27:42 +01:00
safety0ff bffee9d99b Add workaround for corrupted Qt text. 2010-10-30 16:49:27 -04:00
Cyp 6e1771e319 Merge remote branch 'origin/master' into qt
Conflicts:
	lib/ivis_common/piemode.h
	lib/ivis_common/rendmode.h
	lib/ivis_common/textdraw.h
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Project-All.xcconfig
2010-10-30 20:04:42 +02:00
Per Inge Mathisen aa1531707a Remove unused text drawing code to reduce legacy porting woes. 2010-10-30 19:18:50 +02:00
Per Inge Mathisen aaedaabf60 Speed up text rendering for console messages by rendering to pixmaps instead of re-rendering the strings themselves for every display frame.
This increases actual display frames per second here by 100% when showing a full console.
2010-10-30 17:06:36 +02:00
Per Inge Mathisen 828c0f72ae Revert 9e29aa5210 which reverted the removal of QuesoGLC, to start
working on fixing the font rendering with Qt.
2010-10-30 13:20:16 +02:00
Cyp ad4a38a1be Bump netcode version.
Also, remove unused NETCODE_HASH.
2010-10-26 10:11:04 +02:00
Cyp 25671b1083 Revert "Replace immediate-mode rendering with VA-based rendering" for now, since it makes rendering trucks very slow.
This reverts commit f363a02af7.

Please revert this revert when this is fixed.
2010-10-26 08:36:22 +02:00
Per Inge Mathisen b7c9a369d6 Add new backdrop from forum member jorzi. 2010-10-24 19:55:57 +02:00
Cyp 5c431a36d1 Convert muzzle location from floats to integers. 2010-10-23 18:02:56 +02:00
Cyp e8ebb11d4a Remove NETnull() function, which was potentially confusing.
NETnull() was equivalent to uint32_t zero = 0; NETuint32_t(&zero);, which no longer adds/removes 4 bytes of padding as advertised.
2010-10-23 18:02:56 +02:00
Cyp fcdba754c4 Introduce ModeQueue and ModeImmediate as an alternative to playing with bMultiMessages.
Makes campaign queue some messages, and fixes cancelling production queues in campaign.
2010-10-22 18:13:04 +02:00
buginator d0217d5d4e Commit patch from ticket:2110 "Mousewheel menu patch"
Author: noccy
Thanks for the patch!

Format and additional changes by me.

Close ticket:2110
(cherry picked from commit e979b6ad620f27e746f119fefd1f613bbb61b8a4)

Conflicts:

	src/keybind.c
	src/keybind.h
2010-10-21 00:55:55 -04:00
Buginator 58c0ceec95 Fix edit boxes so they correctly calculate the string's pixel borders.
Motivation of this patch was because of some whiny guy on IRC. ;)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11668 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 81f07188a3693007621496ac9fa0c0e2e8b24b87)
2010-10-18 22:23:59 -04:00
Buginator 0be5f2b6e9 Add code to look for "novideo.ogg" refs ticket:2052
but don't upload the novideo.ogg yet, since we don't have a clear winner.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11566 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 7f6ea5d1a332b7bc535a4a83768b0b90d543df1c)
2010-10-18 22:23:55 -04:00
Buginator f4c3d7ec8e Change ASCII_NEWLINE from '@' to '`'
This enables people to use "@" in chat.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11545 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 10217901eb10fc652c3c8eeb2eba2f519b1f5b0f)
2010-10-18 21:47:48 -04:00
Buginator ccd5555275 Remove a (MSVC only) debug() line that spammed way too much.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11321 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit a2a11fccd74485f76dbb098c0bb73de6cc0bd708)
2010-10-18 21:37:48 -04:00
buginator e09e8ac4fe If resource was not loaded, then don't continue on, error out.
(cherry picked from commit aa8bf289b8f4fad5d6122a43432521dbf2e2cc92)
2010-10-17 19:32:53 -04:00
buginator a11d60774e Fix MSVC builds 2010-10-17 18:46:06 -04:00
Cyp 49e9780f41 Fix spurious out-of-synch messages when pausing in single-player mode.
This was caused by forgetting to set the delta tick time to 0 when paused. Don't know whether fixing this fixes anything else.
2010-10-16 17:55:01 +02:00
Giel van Schijndel b5fb5bacf8 remove write-only variables buffer and size from iSurface
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 22:09:31 +02:00
Giel van Schijndel 0d2dbdbaef Replace rendSurface related bitshifts with divisions
These cases of bitshifting are premature optimisations ''only'',
especially since they obscure what's really going on (finding the center
of a range).

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:22 +02:00
Giel van Schijndel 6e509622c2 move global rendSurface to piemode.c
rendSurface isn't used by rendmode.c, so define it in piemode.c where it
is both used and its contents are defined.

Additionally remove unnecessary #includes from rendmode.h and include
the correct headers at places where rendmode.h was included.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:04 +02:00
Giel van Schijndel 5ab267ab71 Remove pointer global psRendSurface
Global pointer psRendSurface only ever contains &rendSurface (another
global), provided that it isn't undefined (isn't statically NULL
initialised).  So replace the use of this pointer with using
rendSurface.

Additionally remove function iV_RenderAssign, which only wraps the
psRendSurface assignment along with a debug() call, and inline it at its
only call-site.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel 681988a5d4 Remove unused constant PIE_NO_CULL
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel 5a51986e65 Get rid of double pie_/iV_ names for the same functions
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel e278f01bcd remove write-only variable iSurface.flags
Remove the write only member variable `flags` from struct iSurface.

Additionally remove the macros REND_SURFACE_(UNDEFINED|SCREEN|USR) which
were only used to assign to the `flags` variable.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:29:59 +02:00
Giel van Schijndel 5923c45593 piematrix: improve mathematical description of pie_RotateTranslate3f
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-10 14:53:58 +02:00
Giel van Schijndel d6c7690f02 trig: don't #include "math_ext.h" as trig.h doens't use it
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:33:45 +02:00
Giel van Schijndel a8fdd2c068 trig: declare all trigonometric functions as pure
Mark the prototypes of all (fixed point) trigonometric functions as
pure.  This declares that these functions don't have any side-effects.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:30:53 +02:00
Giel van Schijndel 83aacc042b Get rid of unused constant TRIG_DEGREES
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 16:54:09 +02:00
Cyp 0794c5a674 Merge remote branch 'origin/master' into qt-trunk
Conflicts:
	.hgignore
	configure.ac
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/endian_hack.h
	lib/framework/frame.c
	lib/framework/input.c
	lib/framework/input.h
	lib/framework/opengl.h
	lib/framework/wzapp_c.h
	lib/gamelib/gtime.c
	lib/gamelib/gtime.h
	lib/ivis_common/Makefile.am
	lib/ivis_common/ivispatch.h
	lib/ivis_common/png_util.h
	lib/ivis_opengl/screen.c
	lib/ivis_opengl/screen.h
	lib/netplay/netlog.c
	lib/netplay/netlog.h
	lib/netplay/netplay.c
	lib/netplay/netplay.vcproj
	lib/netplay/netsocket.cpp
	lib/netplay/nettypes.c
	lib/sequence/sequence.c
	lib/sound/oggvorbis.c
	lib/widget/scrap.c
	macosx/Resources/wzlocal/lt.lproj/InfoPlist.strings
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Bison-Debug.xcconfig
	macosx/configs/Bison-Release.xcconfig
	macosx/configs/FetchPrebuilt.sh
	macosx/configs/FetchSource.sh
	macosx/configs/Project-All.xcconfig
	macosx/configs/SDLmain-All.xcconfig
	macosx/configs/SDLmain-Debug.xcconfig
	macosx/configs/SDLmain-Release.xcconfig
	macosx/configs/Warzone-All.xcconfig
	macosx/configs/Warzone-Debug.xcconfig
	po/cs.po
	po/da.po
	po/de.po
	po/en_GB.po
	po/es.po
	po/et_EE.po
	po/fi.po
	po/fr.po
	po/fy.po
	po/ga.po
	po/hr.po
	po/it.po
	po/ko.po
	po/la.po
	po/lt.po
	po/nb.po
	po/nl.po
	po/pl.po
	po/pt.po
	po/pt_BR.po
	po/ro.po
	po/ru.po
	po/sk.po
	po/sl.po
	po/uk_UA.po
	po/zh_CN.po
	po/zh_TW.po
	src/astar.c
	src/data.c
	src/fpath.c
	src/frontend.c
	src/hci.c
	src/main.cpp
	src/move.c
	src/move.h
	src/multibot.c
	src/multiint.c
	src/multijoin.c
	src/multiplay.c
	src/multisync.c
	src/terrain.c
2010-10-09 14:44:15 +02:00
Cyp 03cc107b84 Add build script fixer for when renaming files from .c → .cpp, and add branch-switching hack to lib/ivis_opengl. 2010-10-08 13:16:07 +02:00
Cyp 125e7ba9ab Convert pie_MatRot[XYZ] to use uint16_t instead of float. 2010-10-08 11:28:31 +02:00
Cyp 5fa9edc4ad Replace iv_Matrix with pie_Mat, eliminating the need for ivispatch.h. 2010-10-08 11:19:57 +02:00
Giel van Schijndel fd740148c3 piematrix: remove unused function pie_RotateTranslate3iv
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-07 16:10:34 +02:00
Giel van Schijndel 704b32b9ba piematrix: fix rotation math
In 697a97ff18, my interpretation of the
performed matrix math was wrong as a result of (wrongly) reading [xyz]^2
as [xyz]*2.  This commit fixes that error.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-06 17:03:32 +02:00
Giel van Schijndel ab9711d877 piematrix: get rid of FP12 bitshifting
Use multiplication and division instead of bitshifting as its
conceptually easier to understand (mathematically).

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:52:54 +02:00
Giel van Schijndel 660f202a9c Fix wrong ordering of matrix cells
Wrong ordering reported by cybershpinx

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:32:42 +02:00
Giel van Schijndel 697a97ff18 piematrix: document the used math
Add descriptions of the used matrix math and the internal representation
of matrices.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 22:41:51 +02:00
Giel van Schijndel c95f0f8be3 Replace [xy]pshift with the single constant it ever contains
The variables [xy]pshift only ever contain the constant value `10`, so
instead of bothering to keep the variables around use the
STRETCHED_Z_SHIFT constant.  This constant serves the same purpose as
[xy]pshift (only for the Z coordinate) and is defined to `10` as well.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 20:14:55 +02:00
Giel van Schijndel 9870192aa1 Merge r11685 from trunk into the Qt branch: Add lib/framework/opengl.h to noinst_HEADERS
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11687 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:35:11 +02:00
Giel van Schijndel d01a61bdc1 Remove empty function `trigShutDown`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11709 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 3390509fe7 piematrix: use floats instead of fixed point DEG degree values for rotations
Allow passing of degrees as floats to the pie_MatRot[XYZ] functions.

This commit further helps in getting rid of fixed point math.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11708 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel a6cb949c97 piematrix: prepare for removal of fixed point math
* Change some of the PIE matrix functions to accept floating point
   values in the API.
 * Rename the badly named constant `_MATRIX_ID` to `Identitymatrix`

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11707 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel dc8623a6ec DrawText: Don't be overly pedantic in restoring the previous matrix-mode
Don't retrieve the current matrix mode prior to changing it, and restore
this mode after drawing text.  Instead rely on the assumption that the
current matrix mode is GL_MODELVIEW, which currently is a valid
assumption.

Reason for this change is that OpenGL retrieving the current matrix mode
isn't possible in OpenGL implementations without fixed pipeline, which
lack a matrix mode, e.g. OpenGL ES 2.0 and OpenGL 3.0.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11699 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 0aa5d2cef8 Don't #include GLee.h where it isn't required
At places where we only need the ''regular'' OpenGL API, not any
extensions, don't #include GLee.h, #include lib/framework/opengl.h
instead.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11691 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel 27fb938877 opengl.h: get rid of the X11 macro `Status`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11690 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Per Inge Mathisen 780f186dec Fix compile warning that complained about variable being potentially clobbered by longjmp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11689 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel f363a02af7 Replace immediate-mode rendering with VA-based rendering
Almost completely (one corner case requires reading GL specs) replace
immediate-mode rendering with VA-based rendering by means of
glDrawArrays.

This, when completed, makes porting to OpenGL ES 2.0 and OpenGL 3.0
without backwards compatibility easier.

This closes #2172

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11686 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel d0e24c96cf Add lib/framework/opengl.h to noinst_HEADERS
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11685 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel a83560844c Merge r11677:11678 from trunk into the Qt branch: add a platform-abstraction header: `opengl.h`
Add a header to allow platform-indepent inclusion of the OpenGL API,
removing our dependency on SDL_opengl.h and consolidating
platform-specific code in that single header.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11679 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 14:01:10 +02:00
Giel van Schijndel 09f6b46276 prevent redefinition of __glext_h__
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11678 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 14:00:58 +02:00
Giel van Schijndel 82ed96fd3b Add a platform-abstraction header: `opengl.h`
Add a header to allow platform-indepent inclusion of the OpenGL API,
removing our dependency on SDL_opengl.h and consolidating
platform-specific code in that single header.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11677 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 12:15:18 +02:00
Giel van Schijndel 8e000fa325 Replace #ifdef(APPLE) #include <$path/gl.h> sections with <SDL_opengl.h> which handles this already
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11671 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-16 11:05:20 +02:00
Giel van Schijndel b14221a289 Don't #include <GL/glu.h> where it's contents aren't used
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11669 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-15 10:12:20 +02:00
Christian Ohm 7ab97781ae Print the needed port when lobby communication fails.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11639 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-13 10:49:13 +02:00
Christian Ohm fadd32b1e6 Fix debug output on the console.
Check if there's a \n at the end, if not, append one. Before, it checked for a
\n anywhere in the string, and if there was, wouldn't append one.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11638 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-13 10:49:12 +02:00
Cyp 559ded3ec0 Fix switching players in single-player mode in debug menu. 2010-09-01 21:34:21 +02:00
Safety0ff d2cec06720 Fix CFURLRef leaks on Mac.
Closes #2009.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11511 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-23 16:35:30 +02:00
Cyp e7c277c3d7 Fix VTOLs flying into hyperspace due to unsigned vertical velocity calculations.
Also, fix all signed-unsigned warnings in src/move.c.
2010-08-15 21:02:32 +02:00
Cyp 6f60e686ae Remove NETuint32_tSmall, make all uint32_t's small, except for one uint32_tLarge.
(The large is a CRC, and CRCs are usually large numbers.)
2010-08-15 21:02:32 +02:00
Safety0ff 8f55883a61 Remove SDL_swap* usage.
Closes #1937.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11482 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-15 20:46:41 +02:00
Cyp 15d7243c5f Make the warn_unused_result warning squelch compile on distros where the fwrite is already in an if (fwrite()) {}. 2010-08-15 13:15:04 +02:00
Cyp 438a4d5aff Enable warnings, make warnings consistent, fix some warnings, use -Wno-error=squeak to allow squeaky warnings to compile without squelching them. 2010-08-15 12:30:46 +02:00
Per Inge Mathisen 3f296e5cf7 qt branch: Remove some dead code
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11467 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-15 00:11:14 +02:00
Buginator 26fa2b06f9 Change back to "trunk" form newnet. (less confusion)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11470 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-15 00:10:52 +02:00
Cyp 0c2015425c Merge remote branch 'origin/newnet'
Conflicts:
	lib/gamelib/gtime.c
	lib/gamelib/gtime.h
	lib/netplay/netplay.c

Closes ticket:1573. Closes ticket:805. Probably fixes 100 more issues.
2010-08-14 22:34:30 +02:00
Per Inge Mathisen 57299dc208 Remove all float usage from logical fps calculations. Patch reviewed by Cyp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11462 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-14 22:08:32 +02:00
Cyp d13fbd9dbc Squelch warnings. (Need a way of doing optimised builds, but still with -Werror...) 2010-08-14 14:16:08 +02:00
Per Inge Mathisen a34997239a Fixes for game elements improperly being dependent on logical fps. Camera animation.
Water animation. Weather animations. Replaced all usages of the generic timeAdjustedIncrement
with proper gameTimeAdjustedIncrement or graphicsTimeAdjustedIncrement as appropriate.
See ticket:2083 for more info. Patch reviewed by Cyp.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11457 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-14 14:10:34 +02:00
Cyp 7d5f1271a9 Merge remote branch 'origin/master' into newnet
Conflicts:
	.gitignore
	lib/iniparser/Makefile.am
	macosx/Resources/wzlocal/pt_BR.lproj/InfoPlist.strings
2010-08-14 11:26:09 +02:00
Cyp fcd0b6fe46 Print "Oldname → Newname" instead of "Oldname: -> Newname". 2010-08-14 09:58:36 +02:00
Cyp 18307a7fc1 Eschew ventriloquism assiduously. 2010-08-14 09:57:45 +02:00
Christian Ohm 5c05971428 Add Slovak translation by Koapa.
Closes #2036.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11415 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-11 00:04:44 +02:00
Christian Ohm fe59e98943 Add Slovak translation by Koapa.
Closes #2036.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11418 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-11 00:04:10 +02:00
Christian Ohm 8dc23cf870 Don't crash in socketAccept when given a NULL socket.
Closes #2033.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11404 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:15:37 +02:00
Christian Ohm e3a123560c Add Korean translation by urgood2.
Closes #2035, #2055.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11394 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:15:37 +02:00
Christian Ohm fab89b8ab4 Don't crash in socketAccept when given a NULL socket.
Closes #2033.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11405 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:14:50 +02:00
Christian Ohm 4eb49a39d1 Add Korean translation by urgood2.
Closes #2035, #2055.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11395 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:14:49 +02:00
Giel van Schijndel 94320034ae Assume that SDL headers are directly in the #include path, instead of assuming the SDL directory is in the #include path.
Closes #1941.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11385 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-05 20:05:02 +02:00
Safety0ff 1fa5ab201d Apply patch from #1944 (vorbis error strings).
Closes #1944.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11384 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-05 20:05:02 +02:00
Safety0ff dec83d8065 Apply patch #1982.
Removes Vector3i_normalise and return int32_t instead of float for Vector3i_Length.
Closes #1982.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11383 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-05 17:48:53 +02:00
Cyp dd47d1f8c2 newnet: Insist harder on detecting and displaying desynchs. 2010-08-02 14:22:10 +02:00
Cyp d5b3621844 Merge branch 'master' into newnet
Conflicts:
	lib/netplay/netplay.c
	src/multiint.c
2010-08-01 21:10:34 +02:00
Cyp 7c8df3a2e8 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/framework/wzapp_c.h
	src/power.c
	src/power.h
2010-08-01 20:41:45 +02:00
Cyp 82ad8abd8f When a player drops from the joining menu, clients should remove the dropped player, and not decide whether to randomly quit based on whatever was on the stack, either. (Forward-port from 2.3.) 2010-08-01 19:41:07 +02:00
Cyp da7ff2f37f Don't allow inconsistent player positions or colours, even momentarily. (Forward-port from 2.3.)
On swapping places or colours, sends a NET_PLAYER_INFO containing both players, instead of two separate NET_PLAYER_INFOs.
2010-08-01 19:40:12 +02:00
Cyp 466943b783 Don't use floating point calculations in power code. 2010-08-01 18:38:11 +02:00
Cyp 7874dc608c Clean up thread-related #defines. (Backport from newnet.) 2010-08-01 15:23:06 +02:00
Cyp 2e01e81da6 newnet: Show relevant players next to connection status icons. 2010-08-01 13:06:50 +02:00
Cyp b59b089ca5 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/nettypes.c
	src/multibot.c
2010-07-30 22:51:33 +02:00
Cyp ea690beab7 newnet: Fix maximum latency calculation, don't return 1 second unconditionally. 2010-07-29 23:30:16 +02:00
Buginator 803b52125e fix / add headers. merge sync: r11298
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11300 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:59:26 +02:00
Guangcong Luo da445cd536 Make some text alignment fixes that got left out of r11230.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11301 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Buginator edb644a03b Fix (and add missing) headers to files.
2009  Warzone Resurrection Project -> 2010  Warzone 2100 Project

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11298 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Cyp 1db4f15973 Change do-while to while, since it doesn't make sense to try to read a game structure when there are none in the lobby. 2010-07-22 19:19:53 +02:00
Cyp 1b811abcea Before receiving game list from server, clear old games from list, and don't receive more than there are room for in the array. 2010-07-22 14:45:49 +02:00
Christian Ohm 6cd64549c8 Make sure we use at least 640x480.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11245 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-22 09:35:26 +02:00
Christian Ohm bf3006d31c Make sure we use at least 640x480.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11248 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-22 09:34:22 +02:00
Cyp 1a39299572 Merge remote branch 'origin/master' into newnet
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
2010-07-20 23:07:26 +02:00
Cyp e246e6006e newnet: Save a few more bytes. 2010-07-20 15:40:07 +02:00
Cyp f5fe36414a newnet: Save a few bytes. 2010-07-19 18:42:19 +02:00
Guangcong Luo 2dcb53d326 Fix bug #1994 and apply patch #1998 - Change Mac OS X to use DejaVu Sans like in Windows/Linux, which fixes problems with text alignment. refs #1994, closes #1998
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11230 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-19 10:58:59 +02:00
Cyp 6a36cdd6ec newnet: Use MAX instead of MIN when computing required latency, since the host will vote half of everyone else.
Not sure what to do in the case that a computer is too slow.
2010-07-17 23:42:39 +02:00
Cyp 212115faed newnet: Delay writing NET_SHARE_GAME_QUEUE until flush. 2010-07-17 11:49:55 +02:00
Cyp ee1ae86ea7 newnet: Use Z_PARTIAL_FLUSH instead of Z_SYNC_FLUSH to save a few bytes.
They do the same thing, except that Z_SYNC_FLUSH adds a bit of useless padding.
2010-07-17 02:01:08 +02:00
Cyp b704a741bf newnet: Don't poll sockets, if there is already data ready in the socket decompression state.
Should avoid freezing with everyone waiting for players.
2010-07-17 01:00:55 +02:00
Cyp c1ca4d2d34 newnet: Don't send lots of small packets, fix "connection error"s when listing games.
Since there is no advantage in sending data more than once per game tick, queue up data until the game time ticks. This may result in sligtly better compression in some cases, due to not flushing non-stop.
Don't close a socket while data is queued to be sent, since this sometimes breaks listing games (where the list is queued, and the socket is closed).
2010-07-16 21:46:00 +02:00
Cyp 8e93542537 newnet: Don't assume disconnect when no data results from decompressing, unless really disconnected. 2010-07-16 18:02:37 +02:00
Cyp 23cbd537f7 Merge remote branch 'origin/master' into newnet
Conflicts:
	configure.ac
2010-07-16 18:01:22 +02:00
Guangcong Luo 09d73b0ba5 Apply patch #2003 - Add option for rotating with middle mouse button (LMB+RMB also works). refs #2003
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11212 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-16 03:54:27 +02:00
Guangcong Luo f367bc1d4f Make text line up better - most text now fits in the text box containing it.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11204 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-14 19:58:33 +02:00
Cyp cd274fcc3e newnet: Add mysterious (char *) cast to fix windows build. 2010-07-14 00:36:59 +02:00
Cyp 695a2b35ae Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/netplay.c
2010-07-13 20:50:37 +02:00
Cyp 9b04e261c6 newnet: Use zlib compression on sockets. Should save a few bytes. 2010-07-13 16:15:53 +02:00
Buginator 6239cbaf46 Bump revision number for netcode, since the addition of r11182 (the map) it would fubar if all clients are not the same, and host was using said map.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11185 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-13 11:30:56 +02:00
Buginator 096c257052 Commit these project settings defines to disable extra checking which causes a huge performance hit. (VS2k8 was already committed in r9639, this was forgotten.)
_HAS_ITERATOR_DEBUGGING=0
http://msdn.microsoft.com/en-us/library/aa985939(VS.80).aspx
_SECURE_SCL=0
http://msdn.microsoft.com/en-us/library/aa985896(VS.80).aspx
For more info on checked iterators see:
http://msdn.microsoft.com/en-us/library/aa985965(v=VS.80).aspx
and
http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11184 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-13 11:30:56 +02:00
Cyp b9a051150b newnet: Clean up thread-related #defines. 2010-07-12 17:57:35 +02:00
Cyp 4d522c1d06 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/gamelib/gtime.h
2010-07-12 08:06:39 +02:00
Christian Ohm 79b033eab1 Don't translate language names.
Closes #1779. Patch slightly modified to use language names from the
translations where available, and moved the defines into the .c file, since
they're only used there.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11154 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:51 +02:00
Buginator ad55de1e7e Prevent overlapping sounds when looking at intel information.
fixes ticket:60

2.3: r11147
trunk: r11148

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11149 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:51 +02:00
Christian Ohm 6514240f25 Don't translate language names.
Closes #1779. Patch slightly modified to use language names from the
translations where available, and moved the defines into the .c file, since
they're only used there.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11155 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:36 +02:00
Buginator 208ba52334 Add C++ header guards
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11153 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:35 +02:00
Buginator 0dca1b06a1 Prevent overlapping sounds when looking at intel information.
fixes ticket:60

2.3:r11147

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11148 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:35 +02:00
dak180 677554af85 Get rid of VORBIS_NEEDS_HACK on the theory that less hacks are better.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11143 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:25 +02:00
Buginator c135a3fd1a Backport r11070
Fix Windows cross-builds.

That also hasn't SIGTRAP, so use WZ_OS_WIN instead of _MSC_VER to decide if we
use raise(SIGTRAP) or assert().

*NOTE* this does not mean CC builds work!  This is just keeping files in sync, for when the CC does work.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11140 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:24 +02:00
Buginator 75b4c5b5f9 Save settings when exiting Qt.
Closes #1964.

(based on r11126)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11139 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:24 +02:00
Buginator 25d54cfdeb Add a new macro, wz_assert() to fix the ASSERT_FAILURE() macro to work again on MSVC compilers.
refs ticket:1940


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11138 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:24 +02:00
Buginator 25b5c08b5d Re-enable client packet logging
Backport r11108


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11122 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 23:57:44 +02:00
Christian Ohm 4c3a638d21 Save screenshots as JPG and PNG.
lib/ivis_common/jpeg_encoder.c/h is the JPEG encoder from
http://blog.frankvh.com/2009/06/09/blackfin-fast-jpeg-encoding/ (GPL v2+),
cleaned up to be C only. Refs #23.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11083 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Christian Ohm 0c80505d54 Make the fixed radar unblurred at full zoom steps.
Also increase radar zoom range to 0.5-4x. Refs #1923.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11082 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Christian Ohm 7cfcfc2f82 Remove unused hton16.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11080 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Christian Ohm 3d256c8b39 Add include for htons.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11079 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Buginator 90bfae6480 Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes ticket:1936
2.3: r11065

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11067 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Safety0ff 307ab84638 qt-trunk: Handle null return value from sound_CreateOggVorbisDecoder.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11056 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Safety0ff 82db22f458 qt-trunk: Set tcp_socket to NULL after free'ing it. Fixes #1869.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11053 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Christian Ohm 4b7d25145c In our assert macros, raise(SIGTRAP) instead of assert().
Also ignore SIGTRAP, so no crashdump will be generated for it. Makes it
possible to continue after an assert while debugging. Closes #1940.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11045 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Christian Ohm 8e3ff07969 Initialize video and radar textures to black.
Prevents random crap from being blended into the borders and shown for the
first video frame.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10985 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm 78071fa294 Use whole screen for backdrops.
Cut off some parts instead of showing black borders.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10939 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm b1ac31d5fd Always use linear filtering for backdrops.
Makes them filtered again after showing the map preview.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10938 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm 87ac6bba6b Show backdrops with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10937 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm e8deaceca6 Show videos with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10936 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm 0b1cf62050 Put date/time in screenshot file names.
The new format is "wz2100-YYYYMMDD_HHMMSS-mapname[-x]", where the "-x" part is
only added when the file already exists (should only happen when people time
travel or hammer F10). Refs #1890.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10903 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:50 +02:00
Christian Ohm 732c0b70a1 Shut up compiler warnings.
No idea how those variables could ever be used uninitialized, but gcc complains
about it.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10896 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:50 +02:00
Christian Ohm b8e6d46263 Improved map preview.
Removes the need for FBOs, shows the map undistorted, unblurred and as large as
possible. Refs #1873.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10895 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:50 +02:00
Per Inge Mathisen 2823c0f5f9 qt branch: Revert r10874 fixes ticket:1876
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10875 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Per Inge Mathisen 3a43d6f378 qt branch: Automatically pick up moc'ed files declared in MOCHEADER for compilation.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10874 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Per Inge Mathisen c1bcad22dc qt branch: Remove ugly hacks needed for Qt text drawing that made qt branch slower than trunk.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10869 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Per Inge Mathisen 9e29aa5210 qt branch: Bring back quesoglc for text drawing for now. We can then spend some more time
perfecting the Qt-based text drawing without the stress of not being able to merge this branch.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10868 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator 3fb8c3605b Fix variable conflicts with MSVC include files.
Make *sure* Qt includes are before wz includes.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10855 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator 840c77d13c Fix headers conflicts (for windows + MSVC)
Move gettimeofday() from frame.c to timer.c (for windows)

Make sure we include the platform specific include before the others. (so we can correctly use WZ_OS_XXX and so on...)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10854 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator 079b8766a6 Add missing cursors (to prevent crashes), and rearrange them to match what is in intfac.img for easier referencing.
FIX ME:  Some cursors are using the wrong names / not defined ?

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10852 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator a272af39bf Fix mac keymap display.
Mac's normally use symbols, and not text, for modifier keys, and Qt doesn't have "text" names for the symbols.
 

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10848 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator c238cb89ea remove the temp mac hack r10815
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10846 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:48 +02:00
Buginator 0064e7151b Get rid of scrap.c/h, no longer needed.
Noticed by dak180


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10834 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Per Inge Mathisen 0d46316a63 qt branch: Add rudimentary Qt crash handler dialog for non-mac, non-windows builds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10832 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Per Inge Mathisen dddb958e3f qt branch: Fix fatal dialog multiplication due to multiple invokations of paintGL while dialog is open.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10831 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Per Inge Mathisen 1a5df98e9f Fix clobbered merging in wzapp_c.h, and add Qt function to throw up a fatal warning dialog.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10830 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Buginator 0b2b4f70af Add svn properties for line style.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10829 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Buginator e84631aa80 Add another missed file.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10826 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:46 +02:00
Buginator 9094f32914 Update a missing file
Try to fix configure.ac

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10825 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:46 +02:00
Buginator 0cf96267e6 MSVC fixes.
*NOTE* You *must* get the Qt: Framework, or Qt SDK, and set it up correctly!


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10824 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:46 +02:00
Buginator b003b2d669 Apply r10807
"qt branch: Merge in r10381 from trunk to improve state machinery handling in terrain drawing code."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10823 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator 1316841b9f Apply r10806
"qt branch: Fix conflicts between Qt text drawing and our internal state machinery. Menus should work now."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10820 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator 732e212cfb Apply r10805
"qt branch: Remove superfluous pie_SetTranslucencyMode()"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10819 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator 7f5030dcc3 Apply r10804
"qt branch: Move pie_SetRendMode() around. Make pie_SetTranslucencyMode() static."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10818 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator d9b06f4546 Apply r10801
"qt branch: Fix handling of custom textures for backdrops without our internal state machine getting all confused."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10816 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Buginator 10c42fbef0 For macs, make it so ctrl = ctrl and not ctrl = cmd to match other platforms, and to keep keymap sane.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10815 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Buginator 60da45798d Fix wzapp.cpp correctly (svn did a double merge on a new file)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10814 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Buginator e65f2688e7 Stage two merge.
Add new files for Qt.
Remove old files
Update build system (linux).
Remove SDL.
Remove QuesoGLC.
Remove Fontconfig & other all dependencies it had.  

CC & mingw (windows) & MSVC build systems are *NOT* updated / working yet.

**NOTE** MSVC people check types.h, "bool" != "BOOL" ! "bool" is a byte, "BOOL" is a int.

r8503 - r10787 (from  Qt branch)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10813 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Buginator a78f262ffa Stage one merge.
Adding __cplusplus header guards that were missing



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10811 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:43 +02:00
Cyp ef3c1b6d1d Use sqrtl instead of sqrt, on 32-bit platforms, to work around weird compilers.
On some compilers, sqrt() seems to have somehow been taking 64-bit doubles and returning 80-bit doubles, breaking expected rounding behaviour.
2010-07-10 19:25:15 +02:00
Cyp c28316c5c7 newnet: Don't bother sending synch messages unless actually out of synch.
If it ain't broke, don't use up bandwidth trying to fix it.
2010-07-10 18:08:06 +02:00
Cyp f0beca71cc Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/netlog.c
	lib/netplay/netlog.h
	lib/netplay/netplay.c
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-All.xcconfig
	macosx/configs/Warzone-Debug.xcconfig
	src/multijoin.c
2010-07-10 17:02:39 +02:00
Cyp a8558300c2 newnet: Remove GAME_GROUPORDER, use GAME_DROIDINFO instead.
Since GAME_DROIDINFO groups orders now, anyway. Removes ~200 lines code duplication.
2010-07-10 16:56:09 +02:00
Cyp d3782834c7 newnet: Move logic in NETuint32_tSmall to the right place.
And add NETint32_tSmall, in case needed.
2010-07-10 16:56:09 +02:00
Buginator 1941064f77 Re-enable client packet logging
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11108 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 10:38:38 +02:00
dak180 a658e90d16 Get rid of VORBIS_NEEDS_HACK on the theory that less hacks are better.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11102 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-06 07:17:42 +02:00
Cyp e41848767d newnet: Check return value of asprintf. 2010-07-05 23:14:41 +02:00
Cyp f7e1a91761 newnet: Group droid orders, efficiently encode small numbers. 2010-07-05 13:17:36 +02:00
Cyp 3505c31c0e newnet: Rename multibot.c -> multibot.cpp. 2010-07-02 09:30:59 +02:00
Christian Ohm 03a75906cd Save screenshots as JPG and PNG.
lib/ivis_common/jpeg_encoder.c/h is the JPEG encoder from
http://blog.frankvh.com/2009/06/09/blackfin-fast-jpeg-encoding/ (GPL v2+),
cleaned up to be C only. Refs #23.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11086 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-02 08:31:36 +02:00
Christian Ohm fe7b1960a2 Make the fixed radar unblurred at full zoom steps.
Also increase radar zoom range to 0.5-4x. Refs #1923.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11085 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-02 08:31:36 +02:00
Freddie Witherden 8634850fba Remove the duplicated doc-blocks from the dictionary type source.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11078 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-29 07:37:57 +02:00
Christian Ohm a48d3d2198 Fix Windows cross-builds.
That also hasn't SIGTRAP, so use WZ_OS_WIN instead of _MSC_VER to decide if we
use raise(SIGTRAP) or assert().

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11070 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-29 07:37:57 +02:00
Buginator b4ae06db77 Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes ticket:1936
2.3: r11065

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11066 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-28 08:20:53 +02:00
Per Inge Mathisen d72187515d Fix two reversed htons/ntohs, from ticket:1937 by Safety0ff
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11064 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-28 08:20:52 +02:00
Freddie Witherden 84f0b430f4 Enhance the iniparser code adding support for setting integers.
This closes ticket #1948.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11060 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 21:29:20 +02:00