Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/scripting/MessageTypeConversions.cpp
Show First 20 Lines • Show All 263 Lines • ▼ Show 20 Lines | CMessage* CMessageTerritoryPositionChanged::FromJSVal(const ScriptInterface& scriptInterface, JS::HandleValue val) | ||||
return new CMessageTerritoryPositionChanged(entity, newTerritory); | return new CMessageTerritoryPositionChanged(entity, newTerritory); | ||||
} | } | ||||
//////////////////////////////// | //////////////////////////////// | ||||
JS::Value CMessageMotionChanged::ToJSVal(const ScriptInterface& scriptInterface) const | JS::Value CMessageMotionChanged::ToJSVal(const ScriptInterface& scriptInterface) const | ||||
{ | { | ||||
TOJSVAL_SETUP(); | TOJSVAL_SETUP(); | ||||
SET_MSG_PROPERTY(starting); | |||||
SET_MSG_PROPERTY(error); | SET_MSG_PROPERTY(error); | ||||
return JS::ObjectValue(*obj); | return JS::ObjectValue(*obj); | ||||
} | } | ||||
CMessage* CMessageMotionChanged::FromJSVal(const ScriptInterface& scriptInterface, JS::HandleValue val) | CMessage* CMessageMotionChanged::FromJSVal(const ScriptInterface& scriptInterface, JS::HandleValue val) | ||||
{ | { | ||||
FROMJSVAL_SETUP(); | FROMJSVAL_SETUP(); | ||||
GET_MSG_PROPERTY(bool, starting); | |||||
GET_MSG_PROPERTY(bool, error); | GET_MSG_PROPERTY(bool, error); | ||||
return new CMessageMotionChanged(starting, error); | return new CMessageMotionChanged(error); | ||||
} | } | ||||
//////////////////////////////// | //////////////////////////////// | ||||
JS::Value CMessageTerrainChanged::ToJSVal(const ScriptInterface& scriptInterface) const | JS::Value CMessageTerrainChanged::ToJSVal(const ScriptInterface& scriptInterface) const | ||||
{ | { | ||||
TOJSVAL_SETUP(); | TOJSVAL_SETUP(); | ||||
SET_MSG_PROPERTY(i0); | SET_MSG_PROPERTY(i0); | ||||
▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator