- Timestamp:
- 06/19/11 21:51:53 (14 years ago)
- Location:
- ps/trunk/source/tools/atlas
- Files:
-
- 3 edited
-
AtlasObject/AtlasObject.h (modified) (1 diff)
-
AtlasObject/AtlasObjectImpl.cpp (modified) (1 diff)
-
AtlasUI/ScenarioEditor/Sections/Player/Player.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/tools/atlas/AtlasObject/AtlasObject.h
r9617 r9639 137 137 operator const wchar_t* () const; 138 138 139 // Return the floating point value of this object 140 double getDouble() const; 141 139 142 // Check whether the object contains anything (even if those things are empty) 140 143 bool defined() const { return (bool)p; } -
ps/trunk/source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp
r9617 r9639 129 129 } 130 130 131 double AtObj::getDouble() const 132 { 133 double val = 0; 134 if (p) 135 { 136 std::wstringstream s; 137 s << p->value; 138 s >> val; 139 } 140 return val; 141 } 142 131 143 void AtObj::add(const char* key, AtObj& data) 132 144 { -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.cpp
r9623 r9639 626 626 sCameraInfo info; 627 627 AtObj camPos = *player["StartingCamera"]["Position"]; 628 info.pX = wxAtof(*camPos["x"]);629 info.pY = wxAtof(*camPos["y"]);630 info.pZ = wxAtof(*camPos["z"]);628 info.pX = (float)(*camPos["x"]).getDouble(); 629 info.pY = (float)(*camPos["y"]).getDouble(); 630 info.pZ = (float)(*camPos["z"]).getDouble(); 631 631 AtObj camRot = *player["StartingCamera"]["Rotation"]; 632 info.rX = wxAtof(*camRot["x"]);633 info.rY = wxAtof(*camRot["y"]);634 info.rZ = wxAtof(*camRot["z"]);632 info.rX = (float)(*camRot["x"]).getDouble(); 633 info.rY = (float)(*camRot["y"]).getDouble(); 634 info.rZ = (float)(*camRot["z"]).getDouble(); 635 635 636 636 controls.page->SetCamera(info, true);
Note:
See TracChangeset
for help on using the changeset viewer.
