Commit Graph

7130 Commits (478424e0b696cb217bda09d53b25b5077059dd55)

Author SHA1 Message Date
Cyp 478424e0b6 Swap psTarget->pos and psViewer->pos back, so visibility and targetting rays are cast in the correct direction.
Visibility and targetting are no longer very weird.
2010-03-05 23:56:15 +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
dak180 00f5e91fb8 Use a more reliable download address for libpng.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10152 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 08:55:42 +01:00
René Jürgens 5485af3b5c texture-wrf update for trunk
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10151 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 08:55:42 +01:00
René Jürgens 77bc330ebd NTW:
foundations and scavenger humans are back.
new scavenger research building + a new power module.
little ai changes
cyborg mechanic and engineer fixed

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10144 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 08:55:42 +01:00
Christian Ohm 42ed0032a4 Include/declaration cleanup for src/intorder.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10140 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:37:10 +01:00
Christian Ohm e929c592d2 Include/declaration cleanup for src/intimage.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10136 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Christian Ohm b6fcdb52f6 Include/declaration cleanup for src/e3demo.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10135 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Christian Ohm 96e8d702b3 Include/declaration cleanup for src/group.c/h.
Also remove "extern" from function declaration from already done headers, since
that's default anyway. Unused (non-trivial) functions get a comment "NOTE:
Unused! <declaration>" that gets listed in trac's code tags section, to make it
easy to find them.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10134 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Per Inge Mathisen 89b6f661c7 Adjust gateways to fit within the building limits on the map. This prevents unbuildable gateways on certain maps.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10133 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Per Inge Mathisen 474e16313e Fix assert failure when placing an artifact on factory destruction. The problem was that
I forgot to convert the tile origin coordinates to world coordinates in a recent patch.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10132 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +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
dak180 e06967f936 Activating -Werror since it will no longer cause insanity in Zarels
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10129 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Cyp 8129d4cec8 Fix crash on rendering rearm pads, squelch mac warning in wavecast.cpp and visibility.c.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10128 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Per Inge Mathisen b9d798c572 Changes path-finding from map/tile coordinates (no intra-tile precision) to world coordinates
(7bit precision). It removes some conversions, and allows for future improvements. Closes ticket:1654


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10127 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +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 a5a3cc9bdf Include/declaration cleanup for src/data.c, difficulty.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10120 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Christian Ohm 3458dae176 Include/declaration cleanup for src/configuration.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10119 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 1b1a402b3d Fix uninitialized variable warning.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10115 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 4ef4290db2 Update translations.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10100 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:40 +01:00
Christian Ohm dd5413fc5c Include/declaration cleanup for src/cluster.c/h.
Removes unused clustDisplay function.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10099 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +01:00
Christian Ohm fb6baebd2c Include/declaration cleanup for src/clparse.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10098 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +01:00
Christian Ohm ffe163985b Include cleanup for src/cheat.c.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10097 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +01:00
Christian Ohm dc118320e2 Include/declaration cleanup for src/challenge.c.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10096 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +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 6a18ae5140 Include/declaration cleanup for src/atmos.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10094 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
Per Inge Mathisen 444dd27af9 Do not crash on debugging logging after a build action failure.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10091 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Per Inge Mathisen 91ddee6a02 Add more objTrace calls for move code debugging.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10089 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +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
Per Inge Mathisen 6e16f84a1b Fix droid frustration so that droids do not start the game frustrated. Make sure that scavs
never fire at features, since their own bases are built out of features instead of buildings
they own. Also improve scav script a bit to ensure they do not run out of things to do.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10084 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
Per Inge Mathisen 8a9c994305 Make moveGetDirection() actually return a direction, and reduce some code lines.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10082 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Per Inge Mathisen 545b49260d Make sure that for campaign, we always set the is human flag correctly on savegame load. This closes ticket:1628
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10080 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Christian Ohm 7cee2b251a Clean up loadingScreenCallback.
Now settings can be changed easily, and the bar adjusts to the screen
resolution. Closes #1645.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10079 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
Per Inge Mathisen c472531b60 Rename patch to be nice to scripts.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10074 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Cyp 0137eeaf5f Remove some anti-underflow hacks, now that coordinates are signed.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10073 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Cyp 0454489926 Fix some unit conversion bugs, and do unit conversion cleanup.
Fixes saving angles outside [0°; 360°].
Fixes droids failing to fire, unless the target angle was exactly divisible by 1°.
Fixes archangels missing some targets slightly, at long distances, if they managed to fire.
Possibly fixes something to do with shuffling, since moveDirDiff used to return the absolute difference, despite how it was used when shuffling.
Simpler code, 101 lines shorter.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10072 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Per Inge Mathisen 210f9cc3a3 Add temporary hack to prevent division on zero errors in interpolation code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10071 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
dak180 412cfdb983 Do not bother people building warzone on their own if we cannot easily get them gettext binaries.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10070 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