Freddie Witherden
71b2a9260e
Save psDroid->experience as a float so we do not loose precision. Tagfile only.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3198 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 15:51:45 +00:00
Freddie Witherden
28a1b3e2b3
Fix a bug in recvDestroyStructure due to use of the un-safe function destroyStruct
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3194 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 15:14:26 +00:00
Freddie Witherden
f2c631b76c
Remove multistruct.c debug print-lines.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3191 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 14:09:33 +00:00
Per Inge Mathisen
fae5745233
Remove unused function pie_DrawImageFileID. Rename pie_SetColourKeyedBlack to
...
pie_SetAlphaTest, and do not enable it while drawing the ordinary terrain.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3189 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 01:05:37 +00:00
Freddie Witherden
27c3a29d73
Update combFire weapon to use the new getDroidEffectiveLevel function.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3178 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 14:25:32 +00:00
Freddie Witherden
624825854c
Add getDroidEffectiveLevel that returns MAX(droidLevel, droidsCmdrLevel).
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3177 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-25 22:06:51 +00:00
Per Inge Mathisen
2390ed5d63
Remove wrongly set (ie was unused) water xyz for tiles, and fix wrong comments.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3176 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-25 20:37:33 +00:00
Giel van Schijndel
7f528c37d0
* Remove empty lines (to reduce diff size)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3174 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-25 13:00:09 +00:00
Giel van Schijndel
ae79afb9a4
* Use sasprintf in combination with sendTextMessage instead of DBCONPRINTF followed by sendTextMessage; which A) wouldn't work on non-debug builds, and B) would send the message twice to the local player on debug builds
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3167 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 20:23:55 +00:00
Giel van Schijndel
cbb1011be9
* Fix a slight error I made in runningMultiplayer() where I swapped true & false
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3166 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 20:12:33 +00:00
Gerard Krol
58b82f44ad
Remove all RPL cruft from the sequence code. The new sequence code can be added to sequence.c easily. Projects will need to be updated.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3162 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:57:29 +00:00
Freddie Witherden
8f5fb1c714
Commit the final part of patch #897 (send/recvDestroyStructure)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3161 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:15:10 +00:00
Giel van Schijndel
776babad75
* Use a function to check for true multiplayer games (i.e. neither single player nor skirmish); rather than using a lot of copy-pasted code
...
* Allow cheating in true multiplayer games, but only when the debug keymap is enabled (which can only be enabled in debug builds)
Patch #899 by Buginator with some modifications by me (mainly adding all runningMultiplayer() calls)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3160 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:10:43 +00:00
Freddie Witherden
7e9b108645
Commit part 4 of patch #897 (send/recv structure demolished messages.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3159 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:10:34 +00:00
Freddie Witherden
ea9d378131
Commit part 3 of patch #897 (and there is still more to come!).
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3158 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:57:58 +00:00
Giel van Schijndel
fd9d44e1d3
* Mark some strings for gettext translation
...
* Change rangeOnScreen to a bool
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3157 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:48:44 +00:00
Freddie Witherden
3bc0d30be1
Commit part two of patch #897 by Buginator along with some small changes by myself.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3156 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:47:44 +00:00
Freddie Witherden
838e9f6009
Commit the first patch of patch #897 by Buginator and myself with some additional changes by myself
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3155 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:41:25 +00:00
Giel van Schijndel
84202107e7
* Remove #include "optimisepath.h" from src/move.c (didn't see this while committing r3153)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3154 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:05:31 +00:00
Giel van Schijndel
bffd531dd7
* Remove unused file src/optimisepath.[ch]
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3153 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:02:13 +00:00
Giel van Schijndel
fbf03af195
* Remove macros:
...
* ROUND: replace by a static inline function (math_round) instead
* FRACTCONST: this macro just cast both of its arguments to float and then divide the first by the second
* MAKEFRACT_D: this macro would cast to FRACT_D (which was typedef'd as float but should have been typedef'd as double); so cast to double instead (where required)
* FRACTmul_D: would cast both of its arguments to FRACT_D and multiply them
* FRACTdiv_D: would cast both of its arguments to FRACT_D and divide the first by the second
* MAKEINT & MAKEINT_D (where #defined the same); this macro would just cast to SDWORD (aka "int" or "signed int")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3152 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 13:57:19 +00:00
Giel van Schijndel
e8be7978e6
* Make some functions const correct
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3151 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 11:59:47 +00:00
Giel van Schijndel
97991eab77
* Make sure that buildings we cheated ourselves (in debug mode with the "CTRL+O" menu) will be sent to the other players in a multiplayer game as well
...
* Also send a console text message to all players when a user does cheat himself a building
Patch #898 by Buginator; comments written by me
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3150 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 11:36:21 +00:00
Dennis Schridde
4dd10fd6bb
clparse.c:262: warning: enumeration value ‘CLI_CONFIGDIR’ not handled in switch
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3143 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 21:13:06 +00:00
Giel van Schijndel
6a5a93076c
* Add a command line option "--configdir" which enables the user to select another configuration directory than the default ~/.warzone2100-2.1
...
* This directory currently __needs__ to exist already!
Patch #896 by Buginator with some changes by me:
* Renamed "userdir" to "configdir"
* Split up PhysicsFS initialisation so that we call PHYSFS_init before gettext initialisation and select the write directory __after__ early command line parsing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3138 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 17:01:42 +00:00
Giel van Schijndel
ee3b875b7d
* Use an ASSERT instead of an assert for (size >= MAX_PATH) so that we can provide the values of both variables to make debugging on this assertion easier
...
* Used this for the change in r3136 though I accidentally didn't commit it there...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3137 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 16:54:14 +00:00
Giel van Schijndel
67d902a841
* Use snprintf "%s%s%s%s" instead of a single strlcpy followed by multiple strlcat calls
...
* Make sure to pass the buffer size as well to getPlatformUserDir (so that we can use strlcpy & strlcat instead of strcpy & strcat respectively)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3135 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 16:04:09 +00:00
Per Inge Mathisen
000dab7d3c
Correctly calculate highest point for defensive structures larger than one tile.
...
This only applies to LASSAT in the current rules.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3134 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 10:27:39 +00:00
Giel van Schijndel
9fe5736f41
* Remove macro FRACTdiv and all places where it was used (all it did was casting both of its parameters to (float) and dividing the first by the second)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3133 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:37:30 +00:00
Giel van Schijndel
ae90bd9c0c
* Remove macro FRACTmul and all places where it was used (all it did was casting both of its parameters to (float) and multiply them)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3132 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:29:25 +00:00
Giel van Schijndel
aeecc95088
* Remove macro MAKEFRACT and all places where it was used (all it did was casting to (float))
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3131 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:13:05 +00:00
Giel van Schijndel
846dfa9efa
* Get rid of cheap modulus calculating macro MODFRACT and use function fmodf instead
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3130 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 21:39:31 +00:00
Giel van Schijndel
b133979966
* Backport changes to src/multigifts.c and dependent changes to other files from netcode branch to trunk
...
* Utilize the net primitives API for sending & receiving of different types of gifts
Patch #888 by EvilGuru
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3123 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 18:51:45 +00:00
Freddie Witherden
2e6bf47a94
Make psDroid->numKills a float and rename it to psDroid->experience. Commits patch #894
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3122 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 17:07:26 +00:00
Giel van Schijndel
50c444f6e6
* Apply a large quantity of style changes from patch #888 by EvilGuru (it's a backport from the netcode branch btw) (to reduce the diff-size of it)
...
* Remove some useless casts
* Rewrite some "else { if (X) { } }" statements to "else if (X) { }"
* Rewrite several "if (X) { if (Y) { } }" statements to "if (X && Y) { }"
* Remove some commented out (and sometimes also duplicated) code
* Add some tiny bits of comments here & there
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3119 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 00:30:27 +00:00
Giel van Schijndel
75753bc3f8
* Replace two uses of strcpy() with the safer strlcpy()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3118 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 00:00:16 +00:00
Per Inge Mathisen
393dc79a05
Fix crash when combat units are assigned to commanders. See bug #10536 .
...
Patch #891 by Thomas Frauendorfer <caotic>.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3113 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 18:28:46 +00:00
Per Inge Mathisen
921520d04b
Remove dead code. Patch #890 by Thomas Frauendorfer <caotic>.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3112 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 18:23:18 +00:00
Per Inge Mathisen
53aa930d6e
Turn IMD min and max dimensions into vectors.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3111 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:34:23 +00:00
Per Inge Mathisen
cd415282be
Cleanup renderStructure()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3110 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:14:18 +00:00
Freddie Witherden
f85cadbdd2
Fix a bug with cursor trapping that would prevent it working when loading a saved game
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3109 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-20 20:15:34 +00:00
Per Inge Mathisen
35277a4b82
Temporary fix for bug introduced with commit 3065 that made direct weapons unable to hit. Patch #886 by Buginator.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3108 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 20:18:37 +00:00
Giel van Schijndel
db3d933791
* Add a new cheat/debug-command "showsamples"
...
* This command will cause the amount of samples in the sound library's queues & lists to be constantly displayed (until turned off) on screen
Patch #887 by Buginator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3107 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 20:17:54 +00:00
Gerard Krol
ddca71af93
Fixes the broken save game loading from r3100.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3106 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 18:36:05 +00:00
Giel van Schijndel
41c602ca60
* Don't prefix the FPS rate displayed with leading zeros (there's no need for it)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3104 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 23:17:33 +00:00
Giel van Schijndel
008266c41f
* Make showFPS a bool instead of an integer (as it can only be enabled or disabled)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3103 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 23:07:41 +00:00
Giel van Schijndel
a419479ed8
* Remove some usage of macros MAKEINT (just a cast-to-SDWORD macro) and PERCENT (a / b * 100)
...
* ASSERT that our denominator isn't zero to prevent a divide by zero error (which I encountered, thus this patch)
* In the main time provide a work around for when the denominator is zero (which due to the above ASSERT will only be useful for release builds, which is intentionally)
* Move variable percent into a more local scope
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3102 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 22:54:10 +00:00
Giel van Schijndel
0fa3850cc3
* Remove commented out code (was only active if HARDWARE_TEST was defined, looks like PSX stuff)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3101 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 22:48:34 +00:00
Gerard Krol
718bff04f9
Removal of duplicate code. No changes should be observed.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3100 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 21:11:04 +00:00
Gerard Krol
1e7bf56eba
Fix the horizontal line in the sky that could be seen when using "mist" by increasing the height of the fogbox.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3091 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 20:42:13 +00:00
Gerard Krol
9e5c22f886
Scrolling tweaks: default acceleration is up from 800 to 1000, and scrolling speed increases when zooming out.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3090 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 20:32:17 +00:00
Gerard Krol
d0063a089e
The camera tweaks caused the starting camera position to be "not so nice". This should be fixed now.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3088 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 19:40:31 +00:00
Giel van Schijndel
fa329f1b21
* When drawing the FPS "timer/display" (or whatever you wish to call it) don't make assumptions about the text's size
...
* Instead use iV_GetTextWidth & iV_GetTextHeight to find out...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3084 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 21:09:34 +00:00
Christian Ohm
77644a9dbd
Adjust FPS counter again, since it was in the same position as the chat line.
...
Now it's about centered below the radar. Thanks to Buginator for noticing.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3083 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 19:12:18 +00:00
Christian Ohm
0c975d9c66
Adjust fps counter position, and save/load showFPS to/from the config file.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3082 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 18:40:25 +00:00
Ari Johnson
ab26b78691
Warzone trunk now builds under Xcode again. This includes an Autorevision
...
target and changing pos.x, pos.y, and pos.z entries in the endianizing
routines to just x, y, and z to match the updated OBJECT_SAVE_V19 format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3079 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 17:58:34 +00:00
Giel van Schijndel
f5df84b931
* Replace some usages of sprintf combined with iV_DrawText by a single call to iV_DrawTextF
...
* Get rid of a string buffer which isn't needed anymore due to the above change..
* Move string buffer buildInfo into a more local scope (the last place where it is used)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3077 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 16:07:46 +00:00
Per Inge Mathisen
2ff8addf56
Fix fog debug messages that said the opposite of what they meant.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3074 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 15:15:01 +00:00
Gerard Krol
4884837ded
Relax camera movement while still preventing clipping through the terrain. Also disable panning to the default angle when releasing the
...
right mouse button.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3067 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 23:33:24 +00:00
Freddie Witherden
c4fe7ad919
Update BASE_OBJECT and friends to use Vector3i.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3065 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 15:39:29 +00:00
Per Inge Mathisen
e0c450b415
Remove excess display related code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3062 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 12:18:56 +00:00
Per Inge Mathisen
5417afae46
Read tile colour information directly from mapTiles, instead of going through tileScreenInfo
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3057 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 11:08:23 +00:00
Per Inge Mathisen
80d6e7df6d
Use setTileColour accessor for tile lighting.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3055 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 16:27:39 +00:00
Per Inge Mathisen
0484f5e383
We no longer need .wlight to separately store water colour.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3054 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 16:21:12 +00:00
Per Inge Mathisen
9c8e54520f
Clean up terrain colour handling a bit.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3046 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 22:00:54 +00:00
Per Inge Mathisen
cf0007f8be
Make sure we do not access tiles outside the map when checking height for
...
identified flying objects. Patch #880 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3045 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 19:13:11 +00:00
Per Inge Mathisen
1a89fbb9bc
Remove legacy PSX way of generating visual fog by manipulating vertex colours. Instead
...
we rely on real OpenGL visual fog. Someone need to look at what scripts need in this
department - the difference between distance and depth fog was almost non-existent
before this change, and is none after, but we have lots of parameters we can easily tune
now from the scripts if we want.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3044 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 18:08:37 +00:00
Giel van Schijndel
5d8d9e193e
* Remove useless rotating angle from drawTiles (it is being set and incremented but never actually used/read)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3042 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-12 22:45:17 +00:00
Gerard Krol
e48ec1019d
Doxygen comments and some minor beautifications.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3039 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-11 19:36:52 +00:00
Giel van Schijndel
c51bd8ae10
* Get rid of a large quantity of unused parameters
...
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
* At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
* Remove unused struct-type EVENT_INIT
* Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 23:15:46 +00:00
Per Inge Mathisen
fc0db340ce
Add info and visibility bits to saved tiles in the tagfile format.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3033 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 20:58:26 +00:00
Gerard Krol
6cb9bdcbef
Write the resolution specified on the command line to the configuration file.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3031 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 20:08:39 +00:00
Freddie Witherden
9710d4e4a7
Update the QualityFactor function in projectile.c to hopefully make it fairer and more stable.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3030 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 19:00:43 +00:00
Giel van Schijndel
cc12f08b1a
* Apply patch #879 by Buginator with some heavy modifications by me
...
* Upon removing BASE_OBJECTs loop through the lists of outstanding AUDIO_SAMPLEs to delete all of those that refer to this BASE_OBJECT
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3023 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 22:36:06 +00:00
Per Inge Mathisen
6c4c61fbb7
PIELIGHT fix for map hightlight. Remove use of colours to communicate a boolean value.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3022 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 21:50:47 +00:00
Per Inge Mathisen
da7b96315c
Final PIELIGHT changes to the widget code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3021 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 21:40:26 +00:00
Per Inge Mathisen
4ee90ba9e3
Adapt radar view to PIELIGHT scheme. The radar colours have been changed a lot, and
...
we probably need to massage these colours a bit before release. Radar tile colours
in all but objects only mode are a complicated blend of tile height and colour. Closes
patch #858 .
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3018 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 17:23:34 +00:00
Per Inge Mathisen
4ddd4c28af
Large PIELIGHT cleanup. Please report bad colours.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3017 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 16:09:23 +00:00
Freddie Witherden
d2c456a45d
Fix a nasty division by zero error introduced in r3015. Also fix balancing in single player as a result of changes in r3015.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3016 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 15:21:07 +00:00
Freddie Witherden
bc6a3e90de
Commit patch #878 by Coincidence with some modifications by me. This makes it so that experience gained is now linked to the 'quality' of the attacker relative to the victim.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3015 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 14:30:25 +00:00
Per Inge Mathisen
f812300a8c
Patch #877 by EvilGuru. The old health bar mode feature is gone, replaced by
...
another toggle on the same key that allows you to see health bars on your
droids and/or structures all the time, if you want. The toggle is no longer saved.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 14:25:54 +00:00
Per Inge Mathisen
7e946c4943
Remove unused function draw3dLine()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3010 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 12:01:45 +00:00
Per Inge Mathisen
28c0cacb62
Update raw build system in regards to removal of arrow.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3009 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 11:59:16 +00:00
Per Inge Mathisen
c2c732510f
Remove unused, non-working arrow code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3008 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 11:58:48 +00:00
Freddie Witherden
2708cc023b
Fix a bug in the video options screen whereby if the current video mode is not available anymore the game would crash.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3007 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 11:44:46 +00:00
Per Inge Mathisen
76840b01d2
Large PIELIGHT cleanup. Also cleans up tile drawing logic somewhat.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3006 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 00:33:03 +00:00
Per Inge Mathisen
b963c15348
Clean up some ugly and unnecessary globals.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3005 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-08 17:50:38 +00:00
Per Inge Mathisen
259902ba34
Pressing the 'z' key (default keymap) will darken the terrain in areas where
...
you have no sensor coverage, and therefore cannot see enemy units moving.
Patch #876 by me and cybersphinx.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3004 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-08 17:32:05 +00:00
Per Inge Mathisen
d37d94aaed
Make tileScreenInfo static, at the cost of some, hopefully temporary, ugliness.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3003 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-08 16:49:49 +00:00
Per Inge Mathisen
59db49c55e
Patch #875 . Prevent the player from clipping through the terrain so often.
...
Restores the sane defaults for max zoom and angle from the original game,
and fixes the way the camera increase in height when passing over terrain.
Thanks to buginator for testing.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2998 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-07 21:49:28 +00:00
Per Inge Mathisen
864e182607
Add fps counter. Type 'showfps' in cheat mode to enable. Patch originally
...
by qamly, ported by buginator, style cleaned up by me. See patch #874 .
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2997 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-07 21:37:08 +00:00
Per Inge Mathisen
6c1f0aa784
Remove unused function. Remove unnecessary references to VISIBLE_X|YTILES.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2996 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-07 21:29:55 +00:00
Per Inge Mathisen
c7aca00f05
More map cleanup
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2989 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-06 22:08:19 +00:00
Per Inge Mathisen
d7f6d50a5c
Also make sure we clear droid actions that require valid targets when these
...
targets are cleared out from the map.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2988 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-06 22:07:11 +00:00
Per Inge Mathisen
747df597fb
Map code cleanup
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2987 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-06 21:25:56 +00:00
Per Inge Mathisen
ed05f84188
Make sure objects that belong to defeated players that are cleared out at
...
the end of a completed mission are not referenced by the player's objects.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2986 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-06 21:20:08 +00:00
Per Inge Mathisen
0b9521927f
Remove unused function
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2985 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-06 19:46:10 +00:00
Per Inge Mathisen
411b172dac
Fix problems updating texture size. Also see bug #10456 .
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2984 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-06 18:26:16 +00:00
Freddie Witherden
299d7bfcfb
Commit patch #871
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2983 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-05 21:56:12 +00:00
Per Inge Mathisen
8d48c5fdd1
Partial conversion from 0.0->1.0 texture coordinate range. For now only terrain
...
textures are converted. Once they are done, the texture matrix hack is restored.
Thanks to devurandom and cybersphinx for help and previous efforts in this area.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2980 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-05 18:54:17 +00:00