Ralph Sennhauser
0c0552a428
Replace M_PI with C++ numbers
...
C++20 added π (pi) to the standard, replace the C macro globally.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-06-04 20:29:48 +02:00
Ralph Sennhauser
cc7a165365
Fix includes in source/simulation2
...
Make include-what-you-use happy with some files in source/simulatation2
and fix what needs to be fixed.
source/simulation2/system/ComponentTest.h uses cxxtest, so add cxxtest
to the deps for simulation2 target.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-08 07:10:11 +02:00
Ralph Sennhauser
86255ed66f
Fix includes in source/simulation2
...
Make include-what-you-use happy with some files in source/simulation2
and fix what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-08-03 17:16:27 +02:00
Ralph Sennhauser
5e4b49f65f
Fix some includes in source/renderer
...
Make include-what-you-use happy with some files in source/renderer and
fix what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-07 17:45:54 +02:00
phosit
891908b801
Remove UNUSED
...
The `UNUSED` macro is used to mark a variable as unused but with a name.
Those usages are replaced with comments so that `UNUSED` can be removed.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused
2025-06-26 17:25:05 +02:00
phosit
d9795d29fe
Remove the name of some unused arguments
...
Remove some usage of the `UNUSED` macro. Remove only those cases where
the names can be deduced from their type.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused
2025-06-18 12:49:59 +02:00
Stan
fd78034885
Mod Interface: Enable setting territory visibility
...
based on a patch by: aeonios
`off` means that the territory visibility cannot be changed
`hidden` means that it's hidden by default but can be enabled
`visible` means it's visible by default
2024-12-30 22:23:05 +01:00
phosit
256152df6d
Add CXeromycesEngine
...
This way the destructor can be used for clean up and `Singleton` can be
used.
2024-11-17 18:03:49 +01:00
phosit
a4610e4ca9
Turn the FLOODFILL macro in to a function
...
Also move the "origin-handling" in to the loop.
Comments by: @sera, @vladislavbelov, @Stan
Differential Revision: https://code.wildfiregames.com/D5189
This was SVN commit r28087.
2024-05-12 06:13:47 +00:00
vladislavbelov
ffc4a56b9f
Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
...
Fixes #6846
Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
wraitii
0fec859267
Fix serialization test following 7350b9042e - Fix CalculateTerritories after deserialization
...
This fixes an issue revealed by 7350b9042e that affected deserialized
games.
Adding tests further highlighted a bug in the calculations, which is
fixed.
Reviewed By: phosit
Fixes #6883
Differential Revision: https://code.wildfiregames.com/D5181
This was SVN commit r27928.
2023-11-11 10:34:24 +00:00
bb
157c6af18e
Make the space in 0 A.D. non-breaking throughout the codebase.
...
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful
Will add linter rule in seperate commit
Happy recompiling everyone!
Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
vladislavbelov
41f2ab87ed
Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d.
...
Also fixes GLES.
Differential Revision: https://code.wildfiregames.com/D4528
This was SVN commit r26605.
2022-03-07 23:04:11 +00:00
vladislavbelov
3eee3a444d
Adds final keyword to simulation component classes.
...
Differential Revision: https://code.wildfiregames.com/D4520
This was SVN commit r26537.
2022-03-03 22:42:26 +00:00
vladislavbelov
4de89c3db1
Moves texture management to CDeviceCommandContext, adds quality options.
...
Comments By: nwtour, Stan
Tested By: nwtour, Stan
Differential Revision: https://code.wildfiregames.com/D4488
This was SVN commit r26365.
2022-02-13 19:30:28 +00:00
wraitii
bb49fbe793
Further reduce usage of TERRAIN_TILE_SIZE in non-terrain components
...
TERRAIN_TILE_SIZE is now only used in relevant places in the simulation.
This also makes it mostly possible to use CFixed in constexpr contexts.
Refs #5566
Differential Revision: https://code.wildfiregames.com/D3078
This was SVN commit r25360.
2021-05-02 17:40:00 +00:00
vladislavbelov
e90aaf6348
Adds line drawing to DebugRenderer.
...
This was SVN commit r25314.
2021-04-25 20:48:44 +00:00
Stan
4942cabab5
Fix most Clang 10 Warnings
...
Refs: #5550 , #5294
Remove dead code from f71be3c764
Fix buggy code from ff50b0b74c
Comments by: @wraitii, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3177
This was SVN commit r24487.
2020-12-31 14:25:37 +00:00
Stan
9ae084519f
Fix most of the new vs2017 induced warnings.
...
Refs: https://code.wildfiregames.com/D3096
https://code.wildfiregames.com/D3103 #5862
Reviewed by: @wraitii
Comments by: @Angen
Differential Revision: https://code.wildfiregames.com/D3126
This was SVN commit r24268.
2020-11-26 22:28:50 +00:00
vladislavbelov
8c77c4b2b6
Refactors coordinates of SOverlayTexturedLine, replaces array of floats by array of CVector2D.
...
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3072
This was SVN commit r24144.
2020-11-08 14:47:25 +00:00
Angen
0b8aa7eb5a
Fix GetTerritoryPercentage when changing number of players
...
Check for player being out of bounds after m_TerritoryCellCounts may be
recomputed.
Differential Revision: https://code.wildfiregames.com/D2046
Reviewed by: @Stan
This was SVN commit r23510.
2020-02-23 18:24:31 +00:00
vladislavbelov
df329d1b81
Optimise out of frustum rendering of texture overlays.
...
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1847
This was SVN commit r23229.
2019-12-10 23:13:37 +00:00
vladislavbelov
7985ea4b8e
Removes usages of duplication of Clamp function in simulation and atlas. Refs D1763.
...
This was SVN commit r22927.
2019-09-18 15:02:36 +00:00
temple
7819ea434e
Diplomacy Colors
...
Add a button to toggle between normal and "diplomacy" colors.
Reviewed by: elexis
Comments by: leper, ffffffff, Stan
Fixes : #4747
This was SVN commit r21107.
2018-02-03 14:17:31 +00:00
mimo
b5e3b83c9e
Add a TerritoryDecayManager component to update territoryMap with the blinking state when territories are recomputed. That's needed by the AI which was up to now not aware of blinking cells.
...
Differential Revision: https://code.wildfiregames.com/D910
This was SVN commit r20268.
2017-10-07 08:42:39 +00:00
elexis
343ec21e75
Update the color of the selection ring, rallypoints and territory outline when the playercolor is changed in atlas.
...
Merge duplicate Selectable component playercolor code.
Differential Revision: https://code.wildfiregames.com/D687
Fixes #4643
Refs D623
Patch in cooperation with: Stan
This was SVN commit r19965.
2017-08-09 11:19:14 +00:00
leper
b9441a6a8d
Ensure m_Territory in cmpTerriotryManager.IsTerritoryBlinking. Fixes #4466 .
...
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D261
This was SVN commit r19343.
2017-03-25 01:43:14 +00:00
leper
be1a205f91
Add support for const methods in components and make those that can be const const.
...
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D75
This was SVN commit r19156.
2017-01-20 02:25:19 +00:00
elexis
417c84870c
Actually remove trailing tabs from source/.
...
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
elexis
6149dd3841
Actually remove trailing whitespace for non-header files as well.
...
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
wraitii
7c21a0cf8e
Header cleanup: profile.h is no longer unnecessarily included in scriptinterface.h but rather in the required .cpp files
...
This was SVN commit r18417.
2016-06-21 10:33:11 +00:00
sanderd17
ef3794f90a
Fix serialisationtest by serializing the territory trigger event, and sending the message only once.
...
This was SVN commit r18102.
2016-04-27 18:37:27 +00:00
sanderd17
f8e986d057
Fix territory not being updated when diplomacy changes. Fixes #3891
...
This was SVN commit r18012.
2016-04-09 19:57:34 +00:00
Yves
89aef0b6eb
Cinematic camera core functionality. Patch by Vladislav Belov.
...
Based on existing code that was still around from an old(not working)
implementation.
Supports basic control from trigger scirpts (queue, start and stop
camera paths) and works in multiplayer.
This was SVN commit r17594.
2016-01-03 12:41:04 +00:00
mimo
82c215de49
prevent thousands of calls per turn of calculeTerritories which would exit immediately
...
This was SVN commit r17560.
2015-12-28 16:23:06 +00:00
wraitii
913545aa41
Mark several CFixedVector2D as const and passed by reference in Geometry and a few other places. Mark some functions (that probably already were) inline.
...
Also make sure we don't include Geometry.h where it's not necessary.
This was SVN commit r17238.
2015-11-11 20:50:02 +00:00
JoshuaJB
e527a5c321
Fix #3525 and #3399 by recalculating territories on request to GetTerritoryPercentage. Patch by elexis
...
This was SVN commit r17171.
2015-11-02 07:32:43 +00:00
sanderd17
f5348c6dd6
Introduce less rounding errors in the falloff to allow a more precise territory calculation. Fixes #3334 . Based on code by elexis.
...
This was SVN commit r17122.
2015-10-11 09:01:50 +00:00
Itms
d60940ac59
Code improvements and style fixes.
...
This was SVN commit r17095.
2015-10-03 08:27:19 +00:00
leper
fc051d94cc
Add check for non-passable (likely water-only) maps to territory percentage calculation.
...
Patch by s0600204. Fixes #3407 .
This was SVN commit r17002.
2015-09-11 02:16:21 +00:00
leper
5a685b84ca
Recompute the cost grid in the TerritoryManager when needed. Patch by s0600204. Fixes #3399 , #3400 .
...
This was SVN commit r16990.
2015-09-06 22:35:38 +00:00
Itms
d129ae3cd8
Fix a special situation where map control percentage wasn't computed properly.
...
Also improve the code and fix a typo.
Based on patch by s0600204, fixes #3378 .
This was SVN commit r16941.
2015-08-27 16:26:32 +00:00
Itms
a63b7a0126
Add ability to query the map control percentage, and use this value in the summary screen. Patch by s0600204, fixes #3321
...
This was SVN commit r16933.
2015-08-23 17:44:37 +00:00
Itms
1709353e2c
Changes the general behavior of non-pathfinding passability classes, in order to make the handling of foundation obstructions less difficult. This will allow the AI to be fixed, as reported in #3295 .
...
Also some cleanup and comments updates.
Refs #3295 .
This was SVN commit r16784.
2015-06-17 20:19:53 +00:00
Itms
6581796103
New long-range pathfinder.
...
Based on Philip's work located at
http://git.wildfiregames.com/gitweb/?p=0ad.git;a=shortlog;h=refs/heads/projects/philip/pathfinder
Includes code by wraitii, sanderd17 and kanetaka.
An updated version of docs/pathfinder.pdf describing the changes in
detail will be committed ASAP.
Running update-workspaces is needed after this change.
Fixes #1756 .
Fixes #930 , #1259 , #2908 , #2960 , #3097
Refs #1200 , #1914 , #1942 , #2568 , #2132 , #2563
This was SVN commit r16751.
2015-06-12 18:58:24 +00:00
leper
a18fbd12ec
XML validation. Based on patch by historic_bruno. Refs #245 .
...
This was SVN commit r16733.
2015-06-07 21:56:52 +00:00
sanderd17
b738772d65
Fix typo
...
This was SVN commit r16696.
2015-05-29 19:51:48 +00:00
sanderd17
e68ef21334
Don't decay when connected to connected allied territory, and also allow the decay script to determine which parts of the territory should blink
...
This was SVN commit r16692.
2015-05-29 07:02:16 +00:00
leper
4ccc9130ba
Add missing include.
...
This was SVN commit r16683.
2015-05-26 15:40:04 +00:00
sanderd17
0054486dba
Implement methods to find the neighbour of a certain territory, and use it for territory decay. Fixes #3204
...
This was SVN commit r16676.
2015-05-25 14:17:45 +00:00