Commit Graph

1506 Commits (2063d578c3c1c3e28c50497fd3297dc9f1103215)

Author SHA1 Message Date
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
Giel van Schijndel 12078733b8 * Fix usage of `new` which is both a) a keyword in C++, and b) an undescriptive variable name
* Make sure function overloading by a C++ compiler doesn't cause linker errors by declaring affected functions extern "C"

Patch by Christian Ohm (in message <20070523201048.GF3778@localdomain>);
 * applied changes to lib/ivis_common/imdload.c
 * brought linker errors to light caused by function overloading

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1695 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 20:57:11 +00:00
Dennis Schridde 4c2128a0e6 NO_SOUND was undefined...
Might want to consider backporting this fix to 2.0 as I think there were some people complaining about "missing files".


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1694 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 20:55:09 +00:00
Giel van Schijndel 856de7948e * Ignore scripts trying to use sound-stuff when sound is disabled
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1693 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 20:33:59 +00:00
Giel van Schijndel 856830a0e4 Cleanup:
* Remove some forward declarations of deprecated, unused and undefined functions
 * Remove some unused functions which only said: "return TRUE;"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1692 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 19:36:21 +00:00
Ari Johnson 7e3016e63f Updated Xcode project for recently deleted file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1691 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 19:15:06 +00:00
Giel van Schijndel b22dbc7fe5 * Remove netusers_stub.c. Its only contained function was NETuseNetwork, which granted direct write access to global var NetPlay.bComms. This was camouflaged as a nice function call, so instead we now use it directly as it is: accessing/modifying a global variable.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1690 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 18:48:36 +00:00
Per Inge Mathisen ae736962de Code cleanup. There should be no behaviour changes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1689 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 18:43:22 +00:00
Giel van Schijndel b3a43af4d3 * Add code to support the C99 bool type (fallback for non-C99 compatible compilers provided!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1688 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 17:03:22 +00:00
Giel van Schijndel f315843682 * Also add debug symbols to non-debug builds so that our .gdmp files won't be entirely useless (people who don't want these symbols can always strip their binary)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1687 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 16:11:34 +00:00
Per Inge Mathisen 241e1b02c3 Effects code cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1686 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-22 21:14:55 +00:00
Per Inge Mathisen 669135f472 Remove lots of duplicated code in effects.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1685 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-22 20:55:30 +00:00
Per Inge Mathisen c0abb47655 New map macro map_round() rounds map coordinates down to tile boundaries.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1684 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-22 20:36:07 +00:00
Dennis Schridde c0e9fa3211 Make MSVC happier
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1683 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 20:17:38 +00:00
Dennis Schridde 057f140b6c Make MSVC happy
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1682 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 20:12:39 +00:00
Dennis Schridde 1014259054 This should enable floating point precision in IMD (.pie) files.
It should even render them as floats. I wasn't able to see a difference after modifying some PIE files, though.
This patch is heavily inspired by Watermelon's work. (Namely piefloat.patch)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1681 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 19:56:07 +00:00
Dennis Schridde 7544470e35 Cleanup. Note the FIXME!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1680 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 19:42:05 +00:00
Dennis Schridde 49f8259226 More cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1679 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:57:11 +00:00
Dennis Schridde 504126bda9 Forgotten cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1678 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:33:07 +00:00
Dennis Schridde b8f038d37a Cleanup IMD loader.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1677 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:25:46 +00:00
Dennis Schridde 5653727379 DOn't unnecessarily recurse into .svn folders.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1676 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 16:51:14 +00:00
Dennis Schridde d4c81521b8 Updated to doxygen 1.5.2
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1675 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 16:33:44 +00:00
Dennis Schridde 041e086d53 - -Sint32 pie_RotateProject(SDWORD x, SDWORD y, SDWORD z, SDWORD* xs, SDWORD* ys)
+Sint32 pie_RotateProject(Vector3i *v3d, Vector2i *v2d)
  This removes the necessity of the wrapper pie_RotProj.
- Also changed a few "Vector3i null" to "zero" for less confusion.
- And removed an unused variable that hid behind an assignment.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1674 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 14:06:31 +00:00
Giel van Schijndel a62d8fce62 * Move iteration interface out of class GameLobby into a new member class: GameLobby::iterator_interface
Previous implementation could hit a deadlock since every single const_iterator class attempted to acquire a scoped_readonlylock on the lobby's mutex. Since the ReadWriteMutex doesn't grant readonlylocks anymore when a writer is pending for a lock this could deadlock if you ever would need two iterators at the same time. Therefore we now only acquire one readonly lock through the iterator_interface class.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1673 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 11:27:58 +00:00
Giel van Schijndel 6e5038d237 use (u)intX_t types for structs send accross the network (for the size guarantees)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1672 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 22:55:12 +00:00
Giel van Schijndel 0a25bfacb7 * Use C99 types for the *WORD typedefs instead of SDL's own types
NOTE: MSVC users don't get scared since SDL defines the C99 types for MSVC

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1671 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 21:48:07 +00:00
Per Inge Mathisen c511ab63b6 Fix crash introduced in commit r1661 in function pie_RotateTranslate3iv,
where the y and z parameters were not switched, as they should be.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1670 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 21:41:48 +00:00
Giel van Schijndel f4abaf4efc A run of `astyle --suffix=none --brackets=break --indent-switches --pad=oper --unpad=paren --min-conditional-indent=0 --mode=c --indent-classes --indent-namespaces` on the lobbyserver's codebase with "Artistic Style <http://astyle.sourceforge.net/>".
It seems that "Artistic Style":
 * somehow treats "lock" as a keyword, since it puts spaces behind every instance of "lock", this is not nice.
 * doesn't recognize std::cout and std::cerr iostreams so doesn't properly line out multiline statements with stream operators
 * doesn't indent subclasses correctly (it treats them as if they're one of the keywords "public", "protected", or "private")
 * lines out multiline if-statements on their logical operators rather than their values, example:
> if (bla == bleh
>     && mooh == meeh)
instead of:
> if (bla == bleh
>  && mooh == meeh)

I've corrected all of the above manually before committing.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1669 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 18:19:06 +00:00
Giel van Schijndel 38b4c74abc * remove debug macro TEST_EW (EW as in something dirty perhaps?)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1668 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 16:37:11 +00:00
Dennis Schridde 01fea434fb Turn some sqrt() into sqrtf() where double precision is not needed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1667 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 14:47:32 +00:00
Dennis Schridde df6397293d git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1666 4a71c877-e1ca-e34f-864e-861f7616d084 2007-05-20 14:37:27 +00:00
Dennis Schridde 23e39b56dc Add a STATIC_ASSERT which also works in global scope.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1665 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 14:24:54 +00:00
Per Inge Mathisen b620f3f25f Remove all mention of non-existent type iVector
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1664 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 14:18:14 +00:00
Stefan Huehner d30dcb1520 2 small fixes in function declarations : () -> (void)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1663 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 13:51:53 +00:00
Dennis Schridde 6a29f00101 Remove unused comments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1662 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 13:29:05 +00:00
Dennis Schridde 009b61447c - Remove unused code
- Remove duplicated code/macros
- VECTOR3D->Vector3i
- Create float variants of normal functions to simplify Watermelon's float-PIE patch


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1661 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 11:05:28 +00:00
Dennis Schridde 6226dfe37c Splint found mistakes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1660 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-19 23:01:56 +00:00
Dennis Schridde d1ce4ba663 geometry.c : Simplification
main.c : mainLoop() should now behave exactly like before the cleanup


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1659 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-19 21:55:27 +00:00
Dennis Schridde d1d55cc977 FRACT->float,[if]SQRT->sqrtf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1658 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-19 21:32:19 +00:00
Dennis Schridde 7812d1635a main.c : Unused variables
gamelib/ : FRACT->float and simplifications
frame.c : Indent


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1657 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-19 19:49:54 +00:00
Dennis Schridde 892287d4f4 GCC 4.2 compile fix (NULL is a pointer and thus shall not be "cast from pointer to integer of different size")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1656 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-19 14:47:17 +00:00
Per Inge Mathisen fc3d29124d Weed out some deadwood from the multiplayer code, and fix a warning.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1653 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-17 14:00:15 +00:00
Giel van Schijndel 0e3ea50f08 * Set bugtraq properties on all directories in trunk which didn't have it yet
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1652 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-16 10:45:41 +00:00
Giel van Schijndel 685af73e85 * Use htonl and ntohl for conversion to and from network-byte order
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1651 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:36:55 +00:00
Giel van Schijndel 2a396b563a * Split out lobby code
* GameLobby::gameLock now has a separate file
  * GameLobby::const_iterator now also has a separate file
 * move class RAIICounter to files of its own for ease of reusability
 * remove dummy game (from lobbyprotocol::requestHandler in requesthandler.cpp)
 * Remove commented out code (main.cpp)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1650 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:31:33 +00:00