Commit Graph

5279 Commits (ac9a882f0782001c9f4dd79e5f548c54c8948cd2)

Author SHA1 Message Date
Buginator ac9a882f07 Fixes #257
Can compile OK with MSVC once again.

Frame.h must be included before default system header #includes, so we don't have linker redefinitions & conflicts with the non C99 compliant routines that MSVC uses.
Or in other words, we want our C99 compliant routines to override the default routines that MSVC uses.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6640 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:09:24 +00:00
Guangcong Luo 1f5ab803ed Updated MinGW32 makefiles; fix "multiple half-tracks" bug.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6639 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:49:09 +00:00
Buginator af112296c6 Updated MSVC project & solution file(s).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6638 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:46:13 +00:00
Buginator 55d3044f15 Updated MSVC project & solution file(s).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6637 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:42:09 +00:00
Guangcong Luo 84821b2a2f Commit patch #265 - Give player feedback when getting an oil drum
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6636 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:16:34 +00:00
Giel van Schijndel 0a45316b65 Fix compiling by using C89 style variable declarations
This fixes #256 (r6634 broke MSVC compilation); patch by Buginator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6635 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-12 18:31:59 +00:00
Giel van Schijndel 0711b342ed Major (but partly) cleanup of actionUpdateDroid:
* Move variables into a more local scope
  - I don't think I screwed up start-at-block-declaration rules for MSVC, but given the size of these changes I can't be sure.
 * Remove a large amount of low level bit manipulation and replace it with arrays of boolean values instead
  - Yes bit shift and bitwise and where used; bitwise or was replaced with addition though
 * Don't use *WORD/*BYTE when we don't need the size guarantee (and the size guarantee is in fact an optimisation prone to introduce bugs)
 * "Concatenate" nested if statements into a single condition in a single if-statement
  - Less nested code to convey exactly the same meaning
 * Remove unused variable moveAction
  - It was only ever written to, but never read from

We don't need the size guarantee for WEAPON::nStat, so substitute "unsigned int" for "UDWORD"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6634 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 22:00:47 +00:00
Giel van Schijndel 29bb57948c ''Properly'' document what some of WEAPON's member variables are (instead of stating the obvious):
* Do this for nStat and lastFired (which had "obvious" comments attached to them)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6633 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 22:00:45 +00:00
Giel van Schijndel 9bfd745549 Add a FIXME note to actionUpdateDroid indicating that it's in need of a major refactoring
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6632 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 22:00:40 +00:00
Per Inge Mathisen 50271ebc53 Do not abort() if we attempt to place a module on a non-existing building while loading a savegame.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6631 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 20:24:02 +00:00
Per Inge Mathisen 18abf8124c Add workaround for crash if you try to build a null structure. Bug found by Giel.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6630 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 20:03:00 +00:00
Dennis Schridde e64d525bc9 One more missing include
Noticed on MinGW

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6628 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 14:13:30 +00:00
Dennis Schridde e2745322e3 Fix warnings in NSIS scripts
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6627 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 14:13:08 +00:00
Dennis Schridde da62c350b7 update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6626 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 12:54:32 +00:00
Dennis Schridde 9d0d1c8a6c Fixup POTFILES.in after moving files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6625 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 12:54:24 +00:00
Dennis Schridde 0cd964d6cb Moved some items out of effects.h, safened up map.h macros
fireOnLocation() -> map.c/h
SKY_SHIMMY -> display3ddef.h

map.h: TILE_IS_NOTBLOCKING() (macro) -> TileIsNotBlocking() (function)
 * reason: All others are "TileIs..." functions as well
 * affected: map.c, fpath.c

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6624 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 12:12:03 +00:00
Dennis Schridde 9dae6df94c Safen includes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6623 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 12:12:00 +00:00
Dennis Schridde c4e55e49a3 Include frame.h in stdio_ext.c, so that we get debug.h and its declarations
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6620 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 11:04:08 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde fcca92459c We no longer need to respect 8-char filename limits, be clear in naming instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6616 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:23 +00:00
Dennis Schridde 52b07e9cf0 Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:18 +00:00
Dennis Schridde 0c5d56b35a Move endian_* functions into a dedicated header and do not include it from frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6614 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:14 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Dennis Schridde 8050b17162 Cleanup
Incl: Move MAX_STR_LENGTH out of wzglobal.h, since it is only used in src

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6612 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:03 +00:00
Dennis Schridde 16c9241fa2 Rename Vector*_New() to Vector*_Init(), since that seems less confusing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6611 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:59 +00:00
Dennis Schridde 4778917737 Fixup includes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6610 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:55 +00:00
Dennis Schridde 13f5044e0d Remove redundand macro
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6609 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:50 +00:00
Giel van Schijndel 516067dec0 Alter frandom's API such that it takes no parameters and returns a float ranging from 0.f to 1.f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6608 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 22:51:41 +00:00
Dennis Schridde f1ae7b9620 Some simplifications and cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6607 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:40 +00:00
Dennis Schridde d1780335ee Make more functions static, remove unused functions, unify spelling
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6606 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:34 +00:00
Dennis Schridde b8ba70de36 Try to cleanup some magic numbers, variable scope, etc
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6605 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:30 +00:00
Dennis Schridde b49952ce1e New function: frandom(x,y)
Returns a random floating point number between x and y

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6604 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:25 +00:00
Dennis Schridde 0b09ace43a More compact versions of fminf() / fmaxf()
Includes a comment on what might appear as magic or
incomplete implementation at first sight.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6603 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 04:07:44 +00:00
Dennis Schridde dd314e6cba Revert "TEMP Work In Progress TEMP"
That says it, doesn't it?

This reverts commit 9dd2471f34317d181479a75d3a41e703ca6649ac.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6602 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:54:30 +00:00
Dennis Schridde df6bd00d7e Provide fmaxf() / fminf() for non C99 compilers
Fixes #234.
This is not the patch attached there, since that one was broken.

From the manpage:
DESCRIPTION
       These functions return the larger value of x and y.
RETURN VALUE
       These functions return the maximum of x and y.
       If one argument is a NaN, the other argument is returned.
       If both arguments are NaN, a NaN is returned.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6601 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:08 +00:00
Dennis Schridde 80e64617b2 Use faster float code for hypotf, instead of falling back to doubles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6600 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:05 +00:00
Dennis Schridde 10e935e6ee TEMP Work In Progress TEMP
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6599 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:01 +00:00
Dennis Schridde 882d6e76d9 Fix "infinite" flamer range
This should fix #53.
A projectiles death timer would be reset on penetration,
instead of dying at the same time as the projectile we spawned from

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6598 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:21:51 +00:00
Dennis Schridde 728c68b81e Use format strings where required (script parser)
Should fix #178

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6597 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 02:53:52 +00:00
Per Inge Mathisen c599637530 Fix potential bug that might cause a unit to go outside the map due to division rounding error,
since code was manually dividing by TILE_UNITS instead of bit-shifting with map_coord(). Patch
reviewed by EvilGuru. Crash report by acidjnk.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6595 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-07 19:13:14 +00:00
Per Inge Mathisen 4b8ee8ad09 Improve gridStartIterate assert message
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6594 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-07 19:07:13 +00:00
Per Inge Mathisen 2d24d351e5 qwzm: Make use of QGLViewer. This lets us rotate and translate the model, as well as add various
helpful hints to the scene. Note that you need to install QGLViewer to use qwzm now.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6592 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-07 18:21:06 +00:00
Per Inge Mathisen 90121f4920 pie2wzm: Fix spurious warning about missing connector directive in PIE model.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6590 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-07 12:35:11 +00:00
Per Inge Mathisen d4beacb790 pie2wzm: Make sure we output a line ending after the connector directive for multi-mesh models.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6589 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-07 12:28:37 +00:00
Per Inge Mathisen ea999b01a7 qwzm: Port over level parsing fix from pie2wzm. Fix connector parsing error.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6588 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-04 23:25:30 +00:00
Per Inge Mathisen 9b26e6c1bd qwzm: Add missing file from way back.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6587 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-04 23:13:02 +00:00
Per Inge Mathisen 86d734598f pie2wam: Add verbose mode. Fix parsing error in some multilevel files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6586 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-04 23:12:05 +00:00
Per Inge Mathisen 0bd4f60a78 Set svn eol-style native to scripts files and svg files that are missing it while I'm at it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6585 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-04 23:09:36 +00:00
Per Inge Mathisen bb9bc6e335 Set svn:eol-style native on some TXT files that are missing the property.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6584 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-04 23:04:18 +00:00
Per Inge Mathisen 1154d45ed1 Set svn:eol-style property on some WRF files that are missing it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6583 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-04 23:03:10 +00:00