Commit Graph

14824 Commits

Author SHA1 Message Date
74c420f658 GUI code cleanup. Fixes #3354.
Lots of code style fixes:
 * type [*&]varname -> type[*&] varname
 * else
   if (...)
   ->
   else if (...)
 * Spaces around some ops.
 * i++ -> ++i.
 * switch-case style fixes.
 * Indentation fixes.
 * Removing some commented out code.
 * include header sorting
 * Changed multiple pointer var declarations to be one per line.
 * Removed strange spaces in some places.
 * Changed some include header guards to be consistent with the rest of
the codebase.
 * Use UNUSED() instead of UNUSED2().

Some small code fixes:
 * Using .find() instead of .count() == 0.
 * !.empty() instead of .size() == 0.
 * Range-based for loops.
 * Making some member functions const by small changes.
   * Adds GetScrollBarPos(idx) const for this.
 * Using early returns/continues in some places.
 * Uses size_t for some loops in CList and COList.
 * Removes unused heading element (not attribute) from COList.
 * Use ENSURE in one case where some custom code did something similar.
 * Made some parameters const ptrs/refs.
 * Change removal loop in GUItext.cpp to erase-unique.
 * Made some static things const.
 * Allow iterating over children of IGUIObject with range-based for
loops by
   exposing begin() and end() (rename from ChildrenIt{Begin,End}()) and
use it.

Comments:
 * Comment COList.
 * Update a few comments.
 * Remove useless or duplicated comments.

This was SVN commit r16931.
2015-08-21 17:08:41 +00:00
d821601978 Revert changes when clicking "Cancel" in the options page.
Patch by Stefan, fixes #3324

This was SVN commit r16930.
2015-08-21 07:54:21 +00:00
c7edc09f51 Revert 7cc2d65ec7.
The problem caused by nested Maps is actually #3374.
Cloning the data object saved by the !AuraManager fixes #3188.
Also, using Map fixes a serialization problem, refs #3375.

On top of those changes, some reordering of add/multiply to avoid any
ordering mistake.

Fixes #3164, Refs #3374

This was SVN commit r16929.
2015-08-21 07:29:08 +00:00
a63e9c521d Optionally limit the framerate in menus to 50 FPS, to save power. Patch by elexis, fixes #2882
This was SVN commit r16927.
2015-08-20 13:22:44 +00:00
ba82743777 Some range-based for loops.
This was SVN commit r16926.
2015-08-20 12:58:41 +00:00
b2e8a241d2 Properly check loaded scripts in the second simulation instance of a serialization test. Fixes #3238
This was SVN commit r16925.
2015-08-20 12:52:29 +00:00
1ab3a4a02d Fix 6506bc20cb, refs #3238
This was SVN commit r16924.
2015-08-20 12:49:43 +00:00
558d43bac5 Replace some functor structs with lambdas, closures or range-based fors.
This was SVN commit r16923.
2015-08-19 03:33:04 +00:00
36c6b50944 Revert emplace for associative containers. Fixes #3366.
GCC < 4.8.0 does not support emplace for those.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436.

This was SVN commit r16922.
2015-08-19 03:32:47 +00:00
674f49f1a8 Remove generated test files during clean-workspaces.sh. Patch by otero. Fixes #3275.
Also remove two generated and disabled test files.

This was SVN commit r16921.
2015-08-19 01:30:09 +00:00
bd8f9b7824 Fix enemy corpses visible in the fog of war. Fixes #3179.
This was SVN commit r16919.
2015-08-16 09:29:34 +00:00
1c9ea56800 Fix the CheckLineMovement algorithm. Added some comments and a test to avoid problems.
This addresses some "stuck units" cases.

This was SVN commit r16918.
2015-08-13 16:21:39 +00:00
01de76f4be Code improvements for the hierarchical pathfinder: cache hits and variable initialization.
This was SVN commit r16917.
2015-08-11 15:21:11 +00:00
28ef270571 Enhance the MakeGoalReachable algorithm to handle better non-point goals.
Fixes #3363, #3297.

This was SVN commit r16915.
2015-08-11 09:47:08 +00:00
f7a7b687fc Don't send TerrainChanged messages when painting the terrain, as terrain texture doesn't influence passability.
This was SVN commit r16914.
2015-08-10 11:55:43 +00:00
e263c8f1de Remove EnableSSE2 for Windows builds. Fixes #3361.
Since we do not require SSE2 on *nix requiring it on Windows makes no
sense,
it also breaks the game for some users.

This was SVN commit r16912.
2015-08-03 19:57:42 +00:00
c333ae3fc2 Escape [ char in a gui caption.
This was SVN commit r16911.
2015-08-02 23:10:08 +00:00
3c8fe51712 complete b3f7b8633a for (un)packing
This was SVN commit r16910.
2015-08-02 17:24:04 +00:00
ec96c737ee Actually use vpObj instead of obj, and use it in all cases. Refs #3354.
This was SVN commit r16909.
2015-08-02 14:40:51 +00:00
b3f7b8633a fix incoherent UnitAI state when changing ownership of a cheering or garrisoned unit
This was SVN commit r16908.
2015-08-02 09:39:08 +00:00
591771a0be make siege tower able to capture, fixes #3356
This was SVN commit r16907.
2015-08-02 09:32:47 +00:00
94302a4149 Move engine version to common file. Patch by elexis. Fixes #3359.
This was SVN commit r16906.
2015-08-01 23:03:13 +00:00
701f1dbb51 Fix sudden main-menu background jumps. Patch by s0600204. Fixes #3312.
This was SVN commit r16905.
2015-08-01 23:02:57 +00:00
2a6eac3bd4 Petra: fix order of event processing in defenseManager
This was SVN commit r16904.
2015-07-31 16:55:38 +00:00
217a500d60 Add missing license headers. Fixes #3357.
This was SVN commit r16903.
2015-07-31 11:28:14 +00:00
1a8096a920 Reliably send the ReplayFinished message at the very end of visual replays. Patch by elexis.
This was SVN commit r16902.
2015-07-30 21:55:34 +00:00
a4e606c575 TerrainTextureManager cleanup.
This was SVN commit r16901.
2015-07-30 21:51:01 +00:00
c5aad60776 Actually stop iterating if retval != INFO::OK. Also fix comments.
This was SVN commit r16900.
2015-07-30 21:50:58 +00:00
15a4c813d6 Add support for AArch64 (ARM64). Patch by tbm. Fixes #3345.
This was SVN commit r16899.
2015-07-30 19:52:55 +00:00
0868d03e74 Fix previous commit.
This was SVN commit r16898.
2015-07-30 17:27:27 +00:00
2238a18aee Close and free replay streams. Based on patch by elexis.
This was SVN commit r16897.
2015-07-30 16:43:22 +00:00
4f91b16d0f Allow pausing during visual replays. Patch by elexis. Refs #3341.
This was SVN commit r16896.
2015-07-30 15:55:19 +00:00
47336b770f Add clipping to OList cells. Patch by elexis. Fixes #3353.
This was SVN commit r16895.
2015-07-30 01:33:48 +00:00
8bfe16cac8 Use in-place construction.
This was SVN commit r16894.
2015-07-29 23:44:17 +00:00
c5eb9b7bb7 Range-based for for VfsPath loops.
This was SVN commit r16893.
2015-07-29 23:44:12 +00:00
540cf75794 L10n code cleanup.
This was SVN commit r16892.
2015-07-29 23:44:05 +00:00
356b08ec5d update heroes and their auras for capture, fixes #3331
This was SVN commit r16891.
2015-07-29 17:54:08 +00:00
f2f3076bd7 minor cleanup
This was SVN commit r16890.
2015-07-29 17:50:04 +00:00
7b81f9a866 add garrison flag for wooden tower, patch from stanislas69, fixes #3059
This was SVN commit r16889.
2015-07-29 17:15:40 +00:00
a07add11c6 Some range-based for loops and some style cleanup.
This was SVN commit r16888.
2015-07-29 01:07:23 +00:00
b4d517c261 Fix infinite loop in key code to key name mapping.
Also make some data const and construct data in-place.

This was SVN commit r16887.
2015-07-29 01:07:18 +00:00
2cae918059 Same as previous commit, but nicer. Refs #3329
This was SVN commit r16886.
2015-07-27 20:39:46 +00:00
c81f243b58 Use the mirage data to determine the best attack in case of capture attack. Fixes #3329
This was SVN commit r16885.
2015-07-27 19:54:40 +00:00
851e863892 Remove animation name compatibility mapping.
10 years should have given everyone enough time to move to the new
naming scheme.

This was SVN commit r16884.
2015-07-27 01:08:29 +00:00
be36bec6df Replace a translation string by an equivalent that is already used thrice.
This was SVN commit r16883.
2015-07-27 01:08:27 +00:00
da48c8c26f Some const refs and one const function.
This was SVN commit r16882.
2015-07-27 01:08:25 +00:00
bd53e9d736 Remove unused ah_translate code.
This was SVN commit r16881.
2015-07-27 01:08:15 +00:00
2a655d1363 cleanup of 4054e5cb04
This was SVN commit r16880.
2015-07-26 14:54:52 +00:00
27de859f9b Petra: minor tweaks in farming
This was SVN commit r16879.
2015-07-26 14:49:01 +00:00
4054e5cb04 make a wooden tower template for each civ, refs #3059
This was SVN commit r16878.
2015-07-26 14:43:21 +00:00