Commit Graph

2530 Commits (1ff5fc34c64edc42be41ac510f59965a7f7a6693)

Author SHA1 Message Date
Christian Ohm aebccdcf90 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/trunk@10931 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-08 12:41:34 +02:00
Christian Ohm 6c8d3e15ba Show videos with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10926 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-06 09:57:27 +02:00
Christian Ohm 9688b906a7 Show backdrops with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10925 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-06 09:57:26 +02:00
Christian Ohm ae66be67c2 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/trunk@10900 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-03 22:41:44 +02:00
Christian Ohm a5bb0f1eb0 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/trunk@10894 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-03 22:41:44 +02:00
Christian Ohm f2ae61805c 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/trunk@10888 4a71c877-e1ca-e34f-864e-861f7616d084
2010-05-31 21:27:35 +02:00
Guangcong Luo edea97a633 Make double-click interval game-speed independent (patch idea by Safety0ff)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10735 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-28 07:52:20 +02:00
Christian Ohm ccd4264005 Enhanced GLee detection.
Since the pkg-config script Debian ships is a custom addition, test for GLee
manually as well.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10731 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-28 07:52:19 +02:00
Guangcong Luo 4282d92b3c Add "SCOUT" and "DISEMBARK" cursors.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10726 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-28 07:52:17 +02:00
Per Inge Mathisen e7c22ecc5c Put miniupnpc and iniparser license files into dist tarball
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10713 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-25 21:24:57 +02:00
Christian Ohm 5f43907ac7 Only use our integrated GLee header when needed.
Fixes building with the integrated GLee removed.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10701 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-24 19:29:21 +02:00
Christian Ohm 13c78bf714 If setting the chosen fullscreen video mode fails, retry in windowed mode.
This should help in cases where the set video mode isn't supported in
fullscreen. Includes a bit of stylistic cleanup in screenInitialize, and
demotes the bpp warning to info instead of error.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10634 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-19 12:52:42 +02:00
Buginator 96bb80b314 Prevent the host from kicking themselves.
Prevent someone trying to kick the host, and kick them instead.

Thanks to effigy for the info
2.3: r10629 /r10630

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10633 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-19 12:52:41 +02:00
Buginator b33a761f9a Only concatenate the mod list to the version string when the client receives the version string from the host.
2.3:r10952

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10593 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-16 14:21:39 +02:00
Buginator 1d47645d07 Don't broadcast to other players about a new player in NET_CreatePlayer(), we will only do NETBroadcastPlayerInfo() when a player has passed all the verification steps.
This fixes ticket:1611

Correctly handle rejection of the verification process as well.

2.3:r10572

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10583 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:07 +02:00
Buginator 71a9f27b40 Clear the IP Ban list when you start to host the game, instead of when you shut down warzone.
Reset numBans back to 0 on list creation.

2.3:r10543

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10582 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 321bcc3505 Add some more netplay logging calls
2.3:r10542

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10581 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator dd0ed35548 Add more logging data to our netplay logs.
2.3:r10484

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10579 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 5109e7a86f If ban list isn't created yet, then return false.
2.3:r10481


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10578 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 3cac32c84d Reset file handle to NULL after close.
Fixes ticket:1745

2.3:r10480

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10577 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 05655b6ea5 Add ability to ban IPs when the host kicks a player.
The ban list is *not* permanent, it will reset when host makes a new game.

Information about bans are in your netlog, for future references.

2.3:r10465, r10475, r10477

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10575 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:05 +02:00
Buginator 4ba8e9c34a Rework netlog to give more useful info
Add more counters to keep track of joins / drops / etc.

2.3:r10464

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10574 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:05 +02:00
Christian Ohm 0c808ac2e0 Include/declaration cleanup for src/aiexperience.c/h.
Refs #1647.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10567 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-14 14:53:44 +02:00
Christian Ohm 122bd513dd Fix compilation with configure --disable-sound.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10562 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-13 09:34:37 +02:00
Buginator 1c4c1cc5bd Fix exception handler to obey UAC on windows machines.
It will write the crash report file to CSIDL_PERSONAL (c:\Users\user name\Documents\logs\warzone2100.rpt)

*All* platforms will now always have --debug-file enable as a default. This will write the logs to <configdir>/logs/WZlog*.txt

When a user overrides the configdir, then we will try to use that directory instead of the default as well.

refs ticket:1759

2.3: r10532


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10538 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:41 +02:00
i-nod d3f1d77aed Correctly propagate TCMask settings through PIE levels, so it will works for animated objects too.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10530 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:33 +02:00
Christian Ohm bc82f671f2 Change fixed pipeline messages from warning to info.
No need to scare users more than necessary with warnings when things will work
anyway.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10507 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:32 +02:00
Guangcong Luo aecdd1805a Change most references to "mods" to singular "mod", so people don't think using multiple mods is a good idea.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10498 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:31 +02:00
dak180 ae26739a9a Some more formatting fixes for the debug dialog and make sure that .strings files get their encoding set properly.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10473 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Per Inge Mathisen 338bc9e322 Move all hard-coded colours (except map preview ones) into the palette file. Pass a PIELIGHT to widgSetColour() instead of RGB.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10466 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator f3aea9cc1e Check if NPOT and texture_cube_map support is available.
Patch by Flank4

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10462 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator 901930360b Update Mac dialog text (yet) again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10461 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator 26ff5bd4d7 Update Mac dialog text again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10460 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator bcb9620a4d Fix formatting.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10459 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator 974d26025a Use system dialogs for MAC people, thanks to stwf for the original patch!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10458 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Per Inge Mathisen 806268790f Move default form colours into external palette file.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10457 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:29 +02:00
i-nod 64d6949d96 - Remove GL_ARB_shader_objects check as we are using OGL 2.0 shaders.
- Test GLEE boolean instead of static definition in VBO check to get correct results.
- Allow 1.4 + VBO extension combination on Windows. Should help some 1.4 hardware.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10394 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-21 19:47:13 +01:00
i-nod e07812d52a Move debug mapping line a bit down, so it can be displayed simultaneously with level name.
Display FPS counter for debug mode, instead of usual averaged FP5S.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10388 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-21 19:47:11 +01:00
Safety0ff ad27f1b309 Fixed terrain drawing code that was making the iVis state invalid.
- Added multiplicative blending mode.
- Reverted r9629.
Reviewed by i-NoD.
Closes #1692.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10381 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-21 09:30:51 +01:00
i-nod c8e35d7a29 Fix MSVC and MinGW builds. Closes #1694.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10370 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-20 14:04:57 +01:00
Buginator 799e10f17a Dump out levelname as part of the screen shot name now.
2.3: r10365

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10368 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-20 12:49:48 +01:00
i-nod 0b39df6e6f - Use additive blending instead of alpha blending for construction/deconstruction lines (regression from 2.3).
- Use Vector3f instead of superfluous CLIP_VERTEX in pie_TransColouredTriangle().

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10358 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-20 12:49:47 +01:00
Cyp 8573291c68 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/Makefile.am
	lib/netplay/netplay.c
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-All.xcconfig
	src/multistat.h
	src/multisync.c
2010-03-17 14:26:32 +01:00
Cyp 50b41a9a64 Squelch control reaches end of non-void function warning. 2010-03-16 23:01:57 +01:00
Cyp acaa934203 Write from a separate thread, to avoid deadlocks were all players are stuck in writeAll. 2010-03-16 21:56:29 +01:00
Cyp 447e5b048a Rename hton functions to make mac happy. (Re: last refactor commit.) 2010-03-16 18:52:23 +01:00
Cyp 9de2f5c0c7 Refactor part of lib/netplay/netplay.c into lib/netplay/netsocket.cpp. 2010-03-16 16:59:49 +01:00
i-nod c1beb1f42b Remove 256 scale value from texture matrix. Closes #1678.
PIE3 format will expect 0.0-1.0 floating points in texture coordinates values.
PIE2 and IMG(GUI textures) formats still using 8-bit integers in texture coordinates values.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10297 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-16 15:47:55 +01:00
Cyp 8c7a25e666 newnet: Don't syncDebug floats directly.
Needed due to different sprintf implentations.
2010-03-14 21:12:25 +01:00
Buginator 66edd6bdb3 Update MSVC project files to compile newnet
Added /arch:sse2


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/newnet@10283 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 21:11:15 +01:00
Cyp a0bcd2a865 Merge remote branch 'origin/master' into newnet
Conflicts:
	src/keybind.c
2010-03-14 18:46:40 +01:00
Cyp 239e4e450d newnet: Display icon on desynch or on waiting for players.
Saves having to look at console output to check that the game is in synch.
2010-03-14 13:27:05 +01:00
Buginator 19696a3f16 Cleanup main so we only have 1 atexit() call for our system shutdown routine, instead of hiding multiple shutdown routines using atexit() for each.
Currently, we have 1 atexit for our main shutdown routine, and 1 atexit call for the exception handler.



Fix mem leak for mod list.

Also dump allocator stats for MSVC people

2.3: r10251

refs ticket:1673


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10262 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:16 +01:00
Buginator 584c4f1aee Add new routines for MSVC that allows us to toggle the allocation tracking.
Currently, it is only used in debug builds for strdup().
For release builds, we use _strdup().

This was necessary to prevent reporting of tons of 'memory leaks' caused by strdup(). Mostly caused by all the parsers lack of cleaning up after themselves.

Sample of what it does is shown.  When we don't toggle the allocator, then it is added to the Normal Blocks.  If we do toggle the allocator, then it is added to the CRT Blocks.
0 bytes in 0 Free Blocks means no memory leaks (for this quick loading of a SP mission--we still have LOTS of other leaks!)
I believe you can figure out what the rest of the stats mean.


0 bytes in 0 Free Blocks.
913860 bytes in 1826 Normal Blocks.
18745 bytes in 139 CRT Blocks.
0 bytes in 0 Ignore Blocks.
0 bytes in 0 Client Blocks.
Largest number used: 13564181 bytes.
Total allocations: 283917669 bytes.

2.3: r10250

refs ticket:1673


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10261 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:16 +01:00
Buginator 90326fcbf0 Fix mem leaks concerning screenshots
2.3: r10249

refs ticket:1673

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10255 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:15 +01:00
Buginator a5f56f6791 Add missing #include(s)
*Note*, all our .c / .cpp files really should have these two includes in it.
#include "lib/framework/wzglobal.h"
#include "lib/framework/frame.h"

First one is for platform specific settings, and the second one is for platform specific functions that we use to override.

2.3: r10236


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10254 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:15 +01:00
Cyp 8653631374 src: Undo a warning squelch, seems to be able to cause build errors for some, somehow. 2010-03-13 23:14:47 +01:00
Cyp 329721b1a2 newnet: Fix crash on desynch, when synchronising structures that haven't been built yet. Move desynch logs to logs/. 2010-03-12 11:31:44 +01:00
Cyp 657fc9079c Merge remote branch 'origin/master' into newnet 2010-03-11 17:37:36 +01:00
Cyp 7d23dc8d67 newnet: Adjust latency automatically, instead of hardcoded to 400ms. 2010-03-11 17:26:13 +01:00
Cyp d9a5af62ad Fix building on mac (should really work this time). Maybe fix building on windows, maybe not, no idea if it was the same issue. 2010-03-11 09:42:38 +01:00
Cyp 21fb1a18ed Fix mac warnings, hopefully (effectively reverting my previous changes to tex.h)... 2010-03-10 23:09:27 +01:00
Cyp 6360e80f25 Try to fix new build warnings and a build error on mac. 2010-03-10 22:55:24 +01:00
Cyp 85315eb568 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/framework/trig.c
	lib/netplay/netplay.c
	src/pointtree.h
2010-03-10 22:16:40 +01:00
Cyp 92199e2a06 Only let host set player position/colour, send new players info about unallocated slots too.
Only letting host set player position/colour probably fixes a race condition occuring if a player changes name while the host moves the player.
Sending new players info about allocated slots fixes some weird cases with inconsistent positions (and missing slots), for example, if moving a player and starting a game, leaving the game (without closing the program), and starting a new game.
2010-03-10 21:08:15 +01:00
Cyp 05575109b5 Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
i-nod 966cd1676b Fix warnings on MacOS builds that were caused by [10210].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10211 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-10 08:23:52 +01:00
i-nod dda0f9f77b Enable or disable fog in TCMask shader depending on in-game state. Part of #851. Reviewed by Per.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10210 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-10 08:23:46 +01:00
i-nod 627a6d1860 iViS engine tweaks. Closes #1667.
- Replace glBlend calls with iVis blending wrapper.
- Remove pie_NO_BILINEAR flag and replace it with pie_FORCE_FOG flag.
- Enable fogging for structure baseplate with pie_FORCE_FOG.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10209 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-09 22:05:42 +01:00
Cyp 48533d7037 Merge remote branch 'origin/master' into newnet 2010-03-07 11:00:10 +01:00
Cyp ccb47562d5 newnet: Dump first 5 synch errors to files instead of dumping 1000s of lines per second to console. 2010-03-07 10:56:24 +01:00
i-nod 1756afb3a1 Fix another 2 warnings on MacOS builds that were caused by [10179].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10184 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:18 +01:00
i-nod 5c64a642a4 Fix warnings on MacOS builds that were caused by [10179].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10183 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:18 +01:00
i-nod 4ad78bf9b2 TCMask feature: shaders infrastructure and TCMask shader, FF fallback is supported for TCMask. Part of #851.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10179 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:17 +01:00
i-nod 87f8777a63 TCMask support infrastructure: mask loading and colour retrieval routines. Part of #851.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10178 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:17 +01:00
Cyp 7f9f138fa4 Merge branch 'master' into newnet 2010-03-06 23:02:54 +01:00
Cyp afaaf0b6e4 Random minor cleanup. 2010-03-06 23:02:36 +01:00
i-nod 382bfad14b Define PRIu32 conversion macros for MSVC.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10173 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-06 22:59:05 +01:00
Cyp 6e3706aade newnet: Move crcSum function to lib/framework, and use CRCs where appropriate.
Autogenerate trig tables again, but verify the table CRCs.
2010-03-05 20:02:16 +01:00
Cyp 153712cb5e newnet: Clean up warnings, warning free build with -O2. Enable the same warnings for C and C++, where applicable. 2010-03-05 20:01:51 +01:00
Cyp 79f5ef2f7a Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/netplay.c
	lib/netplay/netplay.h
	lib/netplay/nettypes.c
	lib/netplay/nettypes.h
	src/multibot.c
	src/multistruct.c
	src/multisync.c
	src/order.c
	src/orderdef.h
	src/wavecast.cpp
2010-03-05 16:09:21 +01:00
Cyp 7a1d9ead68 Replace trig usage with iSin/iCos, etc... Replace dirtyHypot with clean iHypot. Replace MIN(MAX()) with clip().
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10155 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 14:43:37 +01:00
Cyp b81d6685ce Replace all use of trigSin/trigCos/trigIntSqrt and SIN/COS with the corresponding new i* functions. Remove the old ones.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10154 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 14:43:36 +01:00
Cyp ac48bb876c Replace int16_t casts with an angleDelta function, removing the corresponding 'Cast wrapping intended.' comments.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10153 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 10:08:10 +01:00
Cyp 9ad1bba74f Try again at squelching the mac warnings.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10131 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Cyp 9f1035b605 A tiny bit more cleanup, try to squelch mac warnings in multigifts.c.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10130 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Per Inge Mathisen ce9b2a62ff Change fpathCheck() to use world coordinates to save some conversions. Add new macro worldTile() to complement mapTile() to save some typing.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10125 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Cyp 48421325ec More cleanup of units and code. Squelch a couple of mac warnings.
16 files changed, 184 insertions(+), 467 deletions(-)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10124 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Christian Ohm 3cea69221b Fix warning on Macs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10117 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Christian Ohm 0ec360cff8 Fix an uninitialized variable warning on Macs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10113 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Christian Ohm 8fb31151f0 Include/declaration cleanup for src/aud.c, lib/sound/aud.h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10095 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +01:00
Christian Ohm d5e35cd779 Include/declaration cleanup for src/wrappers.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10093 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +01:00
Cyp 5a13a31726 Simplify indirect targetting calculations. Improve the sqrt functions.
Mini-rocket arrays should no longer randomly fire high up into the air when the target is at a lower altitude, instead, the velocity should be reduced. (Looking at the code, it seems it was supposed to be a feature, not a bug.)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10088 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Cyp 61efba03b3 Use bigger buffers in registry_load, to avoid stack overflow if a key is longer than 31 bytes.
Probably closes ticket:https://bugs.launchpad.net/ubuntu/+source/warzone2100/+bug/520432

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10086 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Cyp 6c811c1ecb More unit changes and cleanup, remove now unused arccos and already unused arcsin tables.
No bugs intentionally fixed.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10083 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Christian Ohm 867ff725d2 Add pal_RGBA and pal_Grey functions.
pal_RGBA returns a PIELIGHT from four r, g, b, a values, pal_Grey is an alias
for pal_SetBrightness. Closes #1644.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10078 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Christian Ohm ce844cf2d1 Don't compare an uint8_t to -1.
In NETallowJoining, there was a whole block of unreachable code because of
this. Warning reported by dak180, patch reviewed by Per.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10077 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Cyp 4dc1b2a681 Fix the game getting completely messed up if anyone changes position or colour, and then someone leaves.
The problem was due to player positions and colours of a slot getting reset when someone leaves, resulting in multiple slots in the same position or with the same colour.
Also, clean up some weird declarations in the wrong place and stuff.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10068 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Per Inge Mathisen 924b6c5169 Changing object rotations to use 16 bit unsigned values instead of the current
mix of signed and floating point types. This allows us to use under and over
flow as features instead of failures. There are many conversions using DEG() and
UNDEG() in the code now - these should be read as TODO items for further work.
There is a high chance of bugs being introduced. Patch reviewed by Cyp_.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10067 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Cyp 80d7cdb475 Add some better trig lookup table functions, and make updateDroidOrientation use them.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10061 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:36 +01:00