Commit Graph

1300 Commits (a381013dc6784c416f963f830a6f24137a63423b)

Author SHA1 Message Date
Per Inge Mathisen a79e474d98 Fix compile warning. Remove unused bit field defines.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1750 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 15:47:56 +00:00
Dennis Schridde 58e8bda3a9 _ISOC99_SOURCE is a libc macro, we now use WZ_C99 instead (which gets defined via __STDC_VERSION__)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1749 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:55:24 +00:00
Roman C e3c15e4a23 Aivolution AI update:
- implemented "autogame on" and "autogame off" commands in debug mode
- cleaned up whitespaces

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1748 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:27:11 +00:00
Roman C b4fc0b8a41 - implemented debugModeEnabled() scripting function to find out if game debug mode is on
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1747 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:21:39 +00:00
Roman C 508bc685c4 - fixed "mapTile: y coordinate bigger than map height" bug
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1746 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:17:53 +00:00
Dennis Schridde d34ab46555 Update to previous commit: Also ignore the activeevent in multiplayer games.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1745 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:10:32 +00:00
Dennis Schridde fde0d68082 - (__STDC_VERSION__ >= 199901L) -> defined(_ISOC99_SOURCE)
- Tune lighting and enable by default (This doesn't seem to affect the terrain)
- Declaration updates (Trolltech says that attributes need to go after the "static inline", the GCC manual is a bit unspecific about this)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1744 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:09:10 +00:00
Giel van Schijndel 7241d5f1e8 * soundDataBuffer.bufferSize now indicates the size of soundDataBuffer.data (as it should)
* previously this indicated the size of soundDataBuffer + soundDataBuffer.data instead (which was wrong)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1743 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 11:36:16 +00:00
Roman C 3708cb6bc5 - fixed getPlayerColourName() which was returning wrong color names
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1742 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 11:33:39 +00:00
Giel van Schijndel 73cf341da5 * Add failsafe to OggVorbis PhysicsFS seek callback to deal with invalid "whence" values
* Use tabulated code indentation for oggvorbis.[ch]
 * Move curPos and fileSize into a more localized scope

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1741 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 10:32:15 +00:00
Giel van Schijndel 721a32314f * Use PHYSFS_close on every point of exit in iV_LoadImageFile
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1740 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 10:05:16 +00:00
Giel van Schijndel 7ed46ee763 * Update ignore lists (for bison/flex generated files)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1739 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 09:59:51 +00:00
Giel van Schijndel 2d85204f13 Cleanup:
* remove commented out functions (which where only used by commented out code if they where used at all, removed that code as well)
 * movement stuff:
  - moveShuffleInit (// Initialize a droid for a shuffle move)
  - moveCalcVector (// Calculate the normalised vector between a droid and a point)
 * waypoint stuff:
  - orderAddWayPoint (// Append a new waypoint to a droid's list)
  - orderSelectedWaypoint (// Add a new waypoint to selected droid set)
  - SendSingleDroidWaypoint (// Occasionally need to send non selected waypoints ??)
  - recvDroidWayPoint (// recv)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1738 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 09:50:45 +00:00
Per Inge Mathisen 34b1ca108f Cleanup. Fix indentation. Use enum on structure types to help prevent bugs like
the satlink bug from creeping back in.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1736 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 21:44:52 +00:00
Per Inge Mathisen 1cc2b86251 Hopefully fix ancient satlink crash bug.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1735 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 21:41:04 +00:00
Per Inge Mathisen 6a8abcb158 Simplify some dreadful code by adding the TILE_HAS_WALL(pTile) macro,
and reintroducing the pTile->psObject reference that was optimized
away to save memory on the PSX.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1734 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 20:38:23 +00:00
Roman C c2640060d6 - added Aivolution AI to the repository
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1733 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 18:26:35 +00:00
Roman C 089fe0b7f1 - fixed a bug with difficulty sliders re-enabling AIs after AIs were disabled by host
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1732 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 17:47:08 +00:00
Roman C 3dc727f709 - fix slider assert in multiplayer
- replace slider numbers spread out in the code with define

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1731 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 14:58:31 +00:00
Per Inge Mathisen eb9ef856de Cleanup to find the build structure assert easier.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1730 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 14:24:40 +00:00
Giel van Schijndel 85dc22e592 make -C po update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1729 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 12:44:38 +00:00
Per Inge Mathisen d7a003cac1 Fix signedness warning
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1728 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 12:03:36 +00:00
Giel van Schijndel fb8094aae2 * Use uint8_t instead of char since we depend on the precise size of this structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1727 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 23:48:20 +00:00
Per Inge Mathisen c32d3b11b4 Cleanup to aid tracking down assert in form.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1726 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 22:15:10 +00:00
Roman C a07a76db54 - split a huge assignment for easier debugging
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1725 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 19:40:34 +00:00
Giel van Schijndel f9783ff29f * Remove unused member Version from IMAGEHEADER
* Use PHYSFS_close after we've read from the image file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1724 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 19:28:54 +00:00
Giel van Schijndel 575a78836a remove unused member PalID from IMAGEDEF
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1723 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 18:51:52 +00:00
Giel van Schijndel b5154ae4a3 * Remove redundant and unused string from IMG-header (PalFile)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1722 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 18:24:37 +00:00
Giel van Schijndel 9e520c844b Cleanup:
* Simply return the value we need (instead of using a pointer)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1721 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 16:41:21 +00:00
Giel van Schijndel 384187eaa0 Cleanup:
* Don't use MAKEFRACT for comparisons with floats
 * Remove some commented out code which accomplished the same as the uncommented code directly after it

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1720 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 16:10:08 +00:00
Giel van Schijndel cdea281ca6 * now load resources of type "IMG" directly from their file rather than an intermediate memory buffer
* make definitions of IMAGEHEADER and IMAGEDEF safe for loading on systems with different sizes for datatypes
 * Allocate IMAGEDEF in a function of its own: iV_AllocImageFile (uses only one malloc call so we don't need to go and toy with lots free() calls on failure)
 * Use PHYSFS_read* functions for endian correctness (rather than the endian_*word stuff)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1719 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 15:50:56 +00:00
Roman C 884f22a4af - replaced "=<" and "=>" with ">=" and "<=" respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1718 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 14:43:12 +00:00
Roman C a343ea0eb8 - modified the syntax of the last commit, no semantic modifications
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1717 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 14:38:20 +00:00
Roman C b2bcb79c99 - prevent wz from pausing in multiplayer when focus is lost
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1716 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 14:29:16 +00:00
Giel van Schijndel 02c6705f61 Move the condition we are asserting into the ASSERT-statement itself
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1715 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 14:05:00 +00:00
Roman C d948715572 - a fix (hopefully) for one of the mp asserts
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1714 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 13:02:17 +00:00
Per Inge Mathisen 10542cf278 Repair the experimental moving shadows code. It remains disabled, however.
To enable, uncomment the call to findSunVector() in src/display3d.c and
uncomment the lighting = TRUE in lib/ivis_opengl/piedraw.c


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1713 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 21:51:57 +00:00
Per Inge Mathisen 4cf37f5ddc Remove unused parameter, define, and set more visually pleasing
ambient lighting for the disabled OpenGL lighting mode.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1712 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 20:49:35 +00:00
Per Inge Mathisen cbb0795bd3 Remove misc dead code and make some functions static
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1711 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 20:15:42 +00:00
Per Inge Mathisen 2ec98482ba Remove workaround for Direct3D bug
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1710 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 19:29:36 +00:00
Dennis Schridde 8efecd07b2 const and indent
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1709 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 19:14:23 +00:00
Dennis Schridde b29fad2da0 Load the object matrices by loading them and not by loading the identity and multiplying.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1708 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 18:51:47 +00:00
Dennis Schridde 3c2afc391e Move the calculation of the relative light position for shadows out of the ShadowDrawLoop, into Draw3DShape, so we don't need to calculate it twice for the front- and the backface.
Patch inspired by Watermelon.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1707 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 18:25:15 +00:00
Dennis Schridde 2313b8d53e The Vector3 functions where not really const, since they operated on pointers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1706 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 17:00:55 +00:00
Dennis Schridde 4d96fb962d This should fix crashing projectiles as reported in http://wz2100.net/forum/index.php?topic=666.0
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1705 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 13:59:31 +00:00
Dennis Schridde f29d7647f6 It's probably safer with these types... (Because of the previous commits)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1704 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 18:03:48 +00:00
Dennis Schridde 9d4a007121 More inlining and const
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1703 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 17:58:23 +00:00
Dennis Schridde 52486bee8b const const const
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1702 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 17:21:13 +00:00
Giel van Schijndel fe78e7670a Backport r1699 from branches/2.0 to trunk:
* Set fullscreen to be the default if no setting is found in the config file (to avoid confusion for novice/new users)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1700 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 15:02:15 +00:00
Giel van Schijndel de4b91e2c3 * Use a forward declaration of `struct OggVorbisDecoderState` instead of a dual typedef (one typedef as void for external functions, one as the struct for the implementation file), only to allow us to take pointers to it
* Drop now unnecessary extern "C" declaration, since C++'s function overloading shouldn't cause problems now
 * Add "struct" keyword in front of all declarations of `struct OggVorbisDecoderState` or pointers to it

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1698 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 14:56:18 +00:00