Commit Graph

1788 Commits (3adaa181b297596d6e93a705ca3361bff1578974)

Author SHA1 Message Date
Per Inge Mathisen 3adaa181b2 Add new function isDead(BASE_OBJECT*) which checks if an object is dead or in
a transport list, and use it where applicable. This fixes bug #9720, an asserts
when selecting a droid inside a transport because we think it is dead.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2367 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-11 09:31:16 +00:00
Giel van Schijndel 5285f0a096 * Cleanup CLimitsDialog's code to make it easier to port it to wxWidgets
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2366 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-09 14:18:57 +00:00
Giel van Schijndel 5814fc39c7 * Attempt to preserve history a bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2364 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 20:43:33 +00:00
Giel van Schijndel ba7d1d5078 * move class CUndoRedo from bteditdoc.cpp to new file undoredo.cpp
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2363 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 20:39:07 +00:00
Giel van Schijndel 243bc7ddb8 * Remove unused files model.cpp/h and seedfill.cpp
* remove #include "snapprefs.h" directive
 * remove non-existent file d3dwrap.h from project file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 20:10:38 +00:00
Giel van Schijndel 0397a75255 * Remove unused window CSnapPrefs or IDD_OBJECTPREFS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2361 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 19:45:37 +00:00
Giel van Schijndel 9d148e7f8b * Remove unused window CInfoDialog or IDD_DEBUGINFO
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2360 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 19:37:17 +00:00
Giel van Schijndel b95b607976 * Revert unintentional changes to Code::Blocks projectfile
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2359 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 18:52:49 +00:00
Giel van Schijndel 74e64738fa * Add network primitives by Freddie Witherden <EvilGuru>
* Modify them slighly to use get/set functions for the package direction (instead of a global accessable to all files which forward declare it)
 * Add a NETfloat to the set of primitives
 * Modify NETstring to use strnlen1 instead of strnlen which is a GNU extension to the C library (strnlen1 has been copied from gettext 0.16.1 which is GPLv2+)
NB: rerun your buildsystems
NB2: Xcode requires an update

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2358 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 18:50:28 +00:00
Roman C 4213087057 Make commanders a more valuable target, since commanders are more useful now.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2357 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 11:49:13 +00:00
Giel van Schijndel 0d901ea836 * Merge fixes for bug #9694 and bug #9704 which where fixed in r2349 and r2355 respectively from the 2.0 branch into trunk
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2356 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 11:23:21 +00:00
Per Inge Mathisen 7e3837a2b5 Improve Norwegian translation somewhat
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2353 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-07 18:18:10 +00:00
Per Inge Mathisen 004786ea50 Improve dependency and error checking in autotool build scripts for translations.
Requested by krushia.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2352 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-07 18:13:26 +00:00
Roman C 8425ac9af5 Updated ChangeLog.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2351 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-07 15:13:47 +00:00
Roman C 3704de1f71 Balance:
-increased reload time of EMP Cannon from 5 to 8 seconds
-EMP Cannon will now disable units in its splash radius of 2x2 tiles, with probability of 50%

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2350 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-07 15:10:43 +00:00
Giel van Schijndel 80e93f2ca4 remove src/csnap.c from POTFILES.in
Thanks to Ken Rushia <krushia> for spotting this; This closes patch #792

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2348 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-07 09:07:46 +00:00
Giel van Schijndel 609d953a63 * Remove forward declarations for undefined functions iV_CreateFont, pie_StartTextExtents and pie_FillTextExtents
* Remove unused functions pie_SetFormattedTextFlags and pie_GetFormattedTextFlags
 * Move constants PIE_TEXT_WHITE_COLOUR, PIE_TEXT_LIGHTBLUE_COLOUR and PIE_TEXT_DARKBLUE_COLOUR from header file to implementation file
 * Remove global var FFlags which only ever had one value (FTEXT_SKIP_TRAILING_SPACES)
 * Remove global var ExtentsMode which only ever had one value (EXTENTS_USEMAXWIDTH) and remove all if-statements which never matched (remove the conditional part from the parts that always matched)
 * Remove #ifdef _TESTBED code since _TESTBED is never defined (not in commented out code either)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2346 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-06 11:22:31 +00:00
Giel van Schijndel 76057072e0 * remove function stringLen and replace all instances where it was used with strlen (can't see why anyone would want a custom string length function there in the first place)
* make strresStoreString const correct ("char*" -> "const char*")

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2345 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-05 12:06:56 +00:00
Giel van Schijndel fc8ab2c14e * Remove CursorSnap code; it was this code that was responsible for "snapping" the mouse cursor when switching menus
* This removes csnap.[ch] (removed from automake/autoconf, Code::Blocks, MSVC)
Patch #789 by Ken Rushia (with some minor additions & changes by me)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2344 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-05 11:42:59 +00:00
Per Inge Mathisen 0c942e2413 Do not show debug info for selected objects in debug builds unless debug mode
enabled in the game. Add extra info to selected items. Modify what info strings
are to be translated - in general, do not mark debug strings for translation.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2343 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 23:20:19 +00:00
Per Inge Mathisen e8bbf9113c Weed out some done or no longer relevant items from the TODO list.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2342 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 18:30:39 +00:00
Per Inge Mathisen 618e1b82ed Cleanup. Remove yet another ton of unused code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2341 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 18:12:13 +00:00
Per Inge Mathisen 4fe1646f26 Fix bad macro names.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2340 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 18:01:52 +00:00
Per Inge Mathisen 33e7c70cc4 Cleanup. Remove another ton of unused code. Fix error message which is not an error.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2339 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 17:39:04 +00:00
Per Inge Mathisen 0266477bd9 Add new debug category: gui
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2338 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 16:24:17 +00:00
Roman C a3712c2361 Hit/miss code:
- make attacker experience boost and target experience penalty modifiers even by making them percentage of the same base accuracy value, without modifiers applied
- cap accuracy to 0-100%

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2337 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 15:32:41 +00:00
Per Inge Mathisen 8a7d09141c Hopefully fix a valgrind warning
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2336 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 15:22:45 +00:00
Roman C 496d2b1851 Rewrote hit/miss chance calculation to use a single variable for all modifiers:
- removed duplicate code
- added some defines instead of 'magic' numbers

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2335 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 14:51:54 +00:00
Giel van Schijndel 3db779cf10 * Don't use snprintf to merge several strings which are defined on compile time already; instead use the preprocessor's capability to merge sequential strings into one
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2334 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 13:33:03 +00:00
Giel van Schijndel 33354163a9 * rename pie_DrawText and pie_DrawFromattedText to iV_DrawText and iV_DrawFormattedText respectively for consistency's sake (iV_DrawText already existed as a #define "alias")
* replace all usages of iV_DrawText270(...) with iV_DrawTextRotated(..., 270.f) and get rid of MACRO iV_DrawText270


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2333 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 13:14:34 +00:00
Roman C 5c5e82301a Fixed some template names again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2332 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 12:40:18 +00:00
Giel van Schijndel 0f75801eac * fix error in raw makefiles; we want the data/locale directory in the warzone.wz file; not mp.wz
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2331 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 12:04:24 +00:00
Giel van Schijndel 4966b22bf5 * remove functions pie_DrawImage270, pie_DrawText270 and pie_TextRender270; which where a whole chain of functions that where just duplicates of the same functions without 270 in their name
* add function iV_DrawTextRotated which uses glTranslatef and glRotatef to change (i.e. rotate) the result of iV_DrawText which it also calls; the translation matrix is later reset using glLoadIdentity() (no pushing&popping of the matrix)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2330 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 11:57:16 +00:00
Giel van Schijndel bf5eaace0a * Fix a compiler warning caused by non-matching const-ness of a (non-pointer) parameter in function iV_GetCharWidth's declaration and implementation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2329 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 11:37:06 +00:00
Per Inge Mathisen eccb5d5c72 Change default screen shake setting to off.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2328 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 08:53:54 +00:00
Per Inge Mathisen 65afd36ade Fix stack corruption on MSVC, which does not support the %hhx sscanf conversion.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2327 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 08:52:25 +00:00
Per Inge Mathisen e5d3863ba6 New cheat code: "research all". This gives you all techs researched. Unlike "give all", the
techs are not just available for research, they are researched and their effects apply in full.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2326 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 22:42:31 +00:00
Per Inge Mathisen 8879d5151e Fix bug #9644, slow response from building queues. Patch by Watermelon:
Makes doubleclick state a condition for mousePressed, so that widget 
can recognize the 'down' state in a double click state correctly.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2325 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 22:41:18 +00:00
Per Inge Mathisen 73e6fec796 Actually load the radar colours. Based on patch by Watermelon. Also check
that we have sufficient data in buffer to read next colour first.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2324 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 22:34:33 +00:00
Per Inge Mathisen bc3f5a9073 Fix bug that made enemy units invisible, introduced in r2320.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2323 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 22:26:08 +00:00
Per Inge Mathisen 5df7ebd284 Cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2322 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 21:34:40 +00:00
Per Inge Mathisen 9fa3c86776 Add a slight droid experience bonus to evade enemy fire.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2321 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 20:55:55 +00:00
Per Inge Mathisen 3834067f15 Cleanup of visibility code. Added new debug category: "sensor".
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2320 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 20:23:09 +00:00
Giel van Schijndel 3e14c0fb3d * Fix a bug which could cause a buffer overflow in kf_SendTextMessage() if one would type too long chat-messages
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2319 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 16:32:00 +00:00
Giel van Schijndel b96bfb801f * Remove unnecessary sub-scope
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2318 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 15:39:02 +00:00
Giel van Schijndel 566ed75daf * Add -std=gnu99 to the compiler options
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2317 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 14:51:39 +00:00
Per Inge Mathisen e6629b123c Add transparency to water tiles. This closes bug report #9657.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2316 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 14:46:35 +00:00
Giel van Schijndel 9ad346be5c * move some variables into a more local scope (bool GotSpace, NewLine)
* add some comments
 * actually parse newline characters (ASCII_NEWLINE to be precise which is defined as '@' right now, we might want to change this)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2315 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 20:50:27 +00:00
Giel van Schijndel 9814c2eec7 * remove unused flag FTEXTF_SKIP_LEADING_SPACES and all code related to it
* remove "BOOL AddLeadingSpaces" and all code relying on it to be true, since it never would be true
 * turn a while-loop into a for-loop (reduces duplicated code slightly, and increases its readability)
 * merge two nested if's: if (a) { if (b); } => if (a && b)
NOTE: there should be no behavioural changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2314 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 20:17:23 +00:00
Giel van Schijndel 0733a68c76 * Fix an infinite loop in the text drawing code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2313 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 19:21:04 +00:00