s0600204 Jun 3 2019, 10:19 PM
- Differential Revision
- D1395: Handle UTF-8 multibyte characters in Atlas when loading from JSON
- rP22334: Fixes a typo introduced in rP21612 in shore calculations, found by Angen and…
- Build Status
Buildable 7760 Build 12635: Post-Commit Build Jenkins
Compiling without precompiled headers:
../../../source/tools/atlas/GameInterface/ActorViewer.h:38:39: error: ‘CStr’ does not name a type 38 | void SetActor(const CStrW& id, const CStr& animation, player_id_t playerID);
Forward declaration of CStr8 fixes
MSVC2015: warning C4130: '==': logical operation on address of string constant
@Stan, does the following work for you? (If so, I'll commit the change):
diff --git a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp index 85e2edee8..8126c2710 100644 --- a/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp +++ b/source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp @@ -172,10 +172,10 @@ static AtObj ConvertToLatestFormat(AtObj in) AtObj actor; // Handle the global actor properties - if (in["Object"]["Properties"]["@autoflatten"] == "1") + if (strcmp(in["Object"]["Properties"]["@autoflatten"], "1") == 0) actor.add("autoflatten", ""); - if (in["Object"]["Properties"]["@castshadows"] == "1") + if (strcmp(in["Object"]["Properties"]["@castshadows"], "1") == 0) actor.add("castshadow", ""); // Things to strip leading strings (for converting filenames, since the
Just because that removes the syntax compiler warning doesn't mean that the semantics are right.
AtIter is defined in AtlasObject.h.
[@autoflatten] will // Return an iterator to the children matching 'key'. (That is, children of the AtObj currently pointed to by this iterator)
I suppose this operator is called implicitly by the "1" conversion?
Then I suppose the code is correct, but I suppose those arent the only two lines where one wants to perform this comparison, so perhaps it would be cleaner to make it so that people don't run into this again.
The other code appears a bit more typesafe:
Some .getString might be nice, or even storing string types instead of char pointers.
Either way, I suggest to test the code to be actually functional.
I can't see any occurrence of autoflatten in the code, it seems to have been removed.
castshadows still there.
Clicking the "shadows" button the Atlas editor doesnt do anything for me, with or without strcmp.
(I stop investigation here for now)