Page MenuHomeWildfire Games

Splits Terrain changes from D825 and adds tests for offsets
ClosedPublic

Authored by vladislavbelov on May 6 2020, 1:30 AM.

Details

Reviewers
Clockwork-Muse
Stan
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23639: Adds offsets to the terrain resize function and adds comments how the resizing…
Trac Tickets
#1105
Summary

D825 is the pretty big patch to commit it at once. So I moved terrain changes to the separate diff, added tests, comments and a bit refactored it.

Original code by Clockwork-Muse.

Test Plan
  1. Apply the patch and compile the game
  2. Run tests and make sure that terrain ones passed
  3. Run editor and make map resizes (use different source and destination sizes)
  4. Paint something by terrain brush and make sure that the picture is the same (if you resize to a bigger size then edges should be stretched)

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vladislavbelov created this revision.May 6 2020, 1:30 AM
vladislavbelov edited the summary of this revision. (Show Details)
vladislavbelov added a reviewer: Clockwork-Muse.
vladislavbelov updated the Trac tickets for this revision.
vladislavbelov added a subscriber: Clockwork-Muse.
Vulcan added a comment.May 6 2020, 1:33 AM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/662/display/redirect

Vulcan added a comment.May 6 2020, 1:51 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/graphics/Terrain.h
|  51| class·CTerrain
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCTerrain{' is invalid C code. Use --std or --language to configure the language.

source/graphics/tests/test_Terrain.h
|  30| class·TestTerrain·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestTerrain:' is invalid C code. Use --std or --language to configure the language.

source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp
| 211| »   CMapWriter·writer;
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2077/display/redirect

Stan requested changes to this revision.May 6 2020, 4:23 PM
Stan added a subscriber: Stan.

This patch breaks the placement of entities when resizing.

It still works for terrain though.

This revision now requires changes to proceed.May 6 2020, 4:23 PM

Fixes offsets.

Vulcan added a comment.May 6 2020, 5:37 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/663/display/redirect

Vulcan added a comment.May 6 2020, 5:58 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/graphics/Terrain.h
|  51| class·CTerrain
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCTerrain{' is invalid C code. Use --std or --language to configure the language.

source/graphics/tests/test_Terrain.h
|  30| class·TestTerrain·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestTerrain:' is invalid C code. Use --std or --language to configure the language.

source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp
| 211| MESSAGEHANDLER(SaveMap)
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2078/display/redirect

Vulcan added a comment.May 7 2020, 5:27 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/665/display/redirect

Vulcan added a comment.May 7 2020, 5:50 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/graphics/tests/test_Terrain.h
|  30| class·TestTerrain·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestTerrain:' is invalid C code. Use --std or --language to configure the language.

source/graphics/Terrain.h
|  51| class·CTerrain
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCTerrain{' is invalid C code. Use --std or --language to configure the language.

source/tools/atlas/GameInterface/Handlers/MapHandlers.cpp
| 211| MESSAGEHANDLER(SaveMap)
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2080/display/redirect

Stan accepted this revision.May 7 2020, 5:56 PM
Stan edited the summary of this revision. (Show Details)

Working as current version

This revision is now accepted and ready to land.May 7 2020, 5:57 PM
This revision was landed with ongoing or failed builds.May 7 2020, 11:46 PM
This revision was automatically updated to reflect the committed changes.