Commit Graph

8310 Commits (7574f25f5b08b39b590013c2eb3287e7d054e876)

Author SHA1 Message Date
Cyp 7574f25f5b Remove MersenneTwister C wrapper. 2010-12-20 21:41:52 +01:00
Cyp 4b9ed8b975 Remove unused and untested PointTree C interface. 2010-12-20 21:41:52 +01:00
Cyp c29aa29ec4 Clean up (BASE_OBJECT **) casts, which the compiler is allowed to do funny optimisations with. 2010-12-20 21:41:52 +01:00
Cyp 68b50aecda Remove bool, true, false defines, add NETauto() and move PACKAGED_CHECK somewhere more appropriate. 2010-12-20 21:41:51 +01:00
dak180 b1d681736d Contrary to the information I had fstack-protector seems to need 10.6 min to build. 2010-12-20 11:35:05 -05:00
Cyp 146599b05c Remove use of %zd and %zu, since Windows felt like using %Id and %Iu instead.
Fixes ticket:2422.
2010-12-20 05:33:08 +01:00
Cyp d9ce212728 Try to fix isatty linkage errors on Windows.
Hope this works, somehow.
2010-12-20 05:08:58 +01:00
Cyp c95692c05b Update *.vcproj files from ticket:2421.
And removed extern "C" {} from some headers, apparently Windows can't handle extern "C" consistently.
2010-12-20 04:25:01 +01:00
Cyp d61507800b Fix health bars being shown where a droid used to be, when always displaying bars.
Fixes ticket:912.

Changelog: Fix health bars displayed over empty terrain, when set to always display energy bars.
2010-12-20 04:07:04 +01:00
cybersphinx a538e16288 Update POTFILES.in. 2010-12-20 03:49:42 +01:00
dak180 78bbd0c643 Upgrade png to 1.4.5. 2010-12-19 20:57:28 -05:00
Cyp 0c40449e37 Make Windows' ResetRPTDirectory function compile.
(According to ticket:2421.)
2010-12-20 02:51:28 +01:00
Cyp 180d0bb62a Try to fix one more Windows-specific build error. 2010-12-20 02:12:09 +01:00
Cyp 57d9a7dd6f Add global using std::abs, in order to try to find and fix Windows-specific build errors.
Why can't certain compilers be standards-compliant?

(Why do people take the absolute value of something unsigned, anyway, even though it should be permitted.)
2010-12-20 01:46:19 +01:00
Cyp 36484909d6 Try to fix Windows exception handler and makefiles. 2010-12-20 01:07:12 +01:00
Cyp ea4e99a92d Everything is now C++. See http://developer.wz2100.net/wiki/CodingStyle
Merge remote branch 'origin/cpp'
2010-12-19 22:22:08 +01:00
Cyp e0ee1eec3c Use std::complex<double>, which is much more readable than the alternative. 2010-12-19 21:59:19 +01:00
Per Inge Mathisen 66bb4c00f5 Add some documentation of the new object ID generation. 2010-12-19 21:55:22 +01:00
Cyp 0d2e373456 Merge branch 'master' into cpp
Conflicts:
	lib/widget/bar.cpp
	lib/widget/editbox.cpp
2010-12-19 16:24:38 +01:00
Cyp bd2f6fb7ce Use constructors/destructors for WIDGETs, unduplicating a tonne of probable copy/paste abuse in the process. 2010-12-19 16:16:17 +01:00
Cyp 7a49623b7f Use new/delete for allocating/deallocating WIDGETs. 2010-12-19 00:35:15 +01:00
Cyp 9f43c1f681 Make WIDGET and W_INIT inheritance explicit. 2010-12-18 23:13:27 +01:00
Cyp 01f5d86886 Fix trivial compile error in debug mode. 2010-12-18 22:57:57 +01:00
Cyp 0fe13d055a Print distances and speeds in terms of tiles, not in 1/128ths of tiles.
Changelog: Print distances and speeds in terms of tiles.
2010-12-18 20:01:09 +01:00
Cyp 9e892e6f7e Unify the 34-line intDisplayStatsBar() and 55-line intDisplayDesignPowerBar() functions into a 45-line intDisplayBar() function. 2010-12-18 18:57:05 +01:00
Per Inge Mathisen 3982ba62a4 Fix bad indentation and remove dead code in order.c 2010-12-18 13:48:01 +01:00
Cyp c465f161bf Fix keyboard input being swallowed due to missing events such as SDL_KEYUP.
This is due to a seemingly undocumented bug and/or feature in SDL, where SDL_EventState and SDL_SetEventFilter mysteriously discard all pending events.

The following SDL code in SDL_EventState and SDL_SetEventFilter discards all pending events, with a comment saying it does so:
    while ( SDL_PollEvent(&bitbucket) > 0 )
        ;
There appears to be no documentation of this fact anywhere outside the comment in the SDL code.

I am not aware of any logical reason why enabling events with SDL_EventState should cause less events to be received than otherwise.
2010-12-18 03:07:52 +01:00
Cyp e98e5a41bb Make Esc be equivalent to clicking the return button in the pre-game "multiop" menu.
Weird stuff could happen, such as the client thinking it's a host when it isn't.

Changelog: Fix clients getting confused when trying to leave a game before it starts by pressing the Escape key.
2010-12-18 00:24:34 +01:00
Cyp 3e301fbe37 Fix desynch when units are repaired, and the repair facility flag is not in the default position.
Was droids moving without sending a net message to the flags, even though the flags aren't currently synchronised.
2010-12-17 23:47:23 +01:00
Cyp d9813b37e5 Fix crash when dumping too much syncDebug. 2010-12-17 21:46:35 +01:00
Per Inge Mathisen 40ef0f5788 Fix warning about unused statements in switch statement. Remove unused define. 2010-12-17 20:38:04 +01:00
Per Inge Mathisen fd56775ad0 Remove never used INCLUDE_PRODSLIDER code from HCI. 2010-12-17 20:11:01 +01:00
Per Inge Mathisen 0b9d017e35 Nuke some dead code. Tired of seeing it while grepping. 2010-12-17 20:06:53 +01:00
dak180 c4ec4ffd2b 144 warnings on the wall, take some down, grind them to dust, 98 warnings on the wall. 2010-12-16 22:05:06 -05:00
dak180 0364933736 Make the xcode project work again. 2010-12-16 21:06:33 -05:00
Cyp 80ddafd0ff Use destructors instead of releaseDroid/releaseStructure/releaseFeature.
Simplifies some stuff a bit.
2010-12-17 02:08:18 +01:00
Cyp cd47a94318 Use new/delete when allocating droids/structures/features.
This allows the use of constructors/destructors.
2010-12-17 02:07:30 +01:00
Cyp 2d00cb93bd Make object inheritance hierachy explicit instead of a mixture of defines and duplication.
Explicit casts from compatible objects to BASE_OBJECT * and SIMPLE_OBJECT * are now redundant.
2010-12-16 23:33:19 +01:00
Cyp 3f6ecec025 Replace sqrt(x) with sqrt((double)x) to make broken compilers happy. 2010-12-16 23:28:57 +01:00
Cyp 49a85a0307 Simplify bucket3d.cpp. 2010-12-16 23:28:57 +01:00
Cyp a22d920952 Make PROJECTILE actually inherit from SIMPLE_OBJECT. 2010-12-16 23:28:56 +01:00
Cyp 12e8e5bc80 Rename *.lex.c to *.lex.cpp and *.tab.c to *.tab.cpp. 2010-12-16 23:28:56 +01:00
Cyp 0646b37603 Rename *.c to *.cpp. 2010-12-16 23:28:56 +01:00
Cyp a2cd7b0592 Make everything compile successfully with g++, without -fpermissive. 2010-12-16 23:24:40 +01:00
Cyp 2bcb709cf4 Move broken dependency hack out of most Makefile.am's, except the for the root. 2010-12-16 23:14:38 +01:00
Cyp 10c8ebdd51 Fix strict-aliasing error when compiling. 2010-12-16 23:14:38 +01:00
dak180 ab1e0c269e Add actiondef.h to the xcode project. 2010-12-16 16:32:50 -05:00
Cyp 0fe191778b Actually check the mouse position when clicking, instead of just assuming people clicked wherever the mouse moves to later.
In theory, this should make the UI usable, even on machines that don't consistently get 10000 FPS.

Because WZ widgets are weird, just make the widgets pretend that the mouse stopped moving after clicking or releasing in a given frame.

If you click twice in the same frame, the second widget will still greedily steal the mouse click from the first widget.

Changelog: Try to improve UI responsiveness under low framerates.
2010-12-16 22:20:09 +01:00
Cyp 477cc3385e Fix weird delivery point placement for cyborg factories and repair facilities.
Changelog: Fixed delivery point placement for cyborg factories and repair facilities.
2010-12-16 22:20:09 +01:00
Per Inge Mathisen 17b834b2cf Merge store enums as enums changes from cyp/cpp to master. 2010-12-16 20:02:26 +01:00