Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpFootprint.cpp
Show All 13 Lines | |||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#include "precompiled.h" | #include "precompiled.h" | ||||
#include "ICmpFootprint.h" | #include "ICmpFootprint.h" | ||||
#include "scriptinterface/FunctionWrapper.h" | |||||
#include "scriptinterface/ScriptInterface.h" | |||||
#include "simulation2/system/InterfaceScripted.h" | #include "simulation2/system/InterfaceScripted.h" | ||||
#include "simulation2/system/SimContext.h" | #include "simulation2/system/SimContext.h" | ||||
#include "maths/FixedVector3D.h" | #include "maths/FixedVector3D.h" | ||||
JS::Value ICmpFootprint::GetShape_wrapper() const | JS::Value ICmpFootprint::GetShape_wrapper() const | ||||
{ | { | ||||
EShape shape; | EShape shape; | ||||
Show All 34 Lines | else | ||||
JS_SetProperty(cx, obj, "depth", pdepth); | JS_SetProperty(cx, obj, "depth", pdepth); | ||||
JS_SetProperty(cx, obj, "height", pheight); | JS_SetProperty(cx, obj, "height", pheight); | ||||
} | } | ||||
return JS::ObjectValue(*obj); | return JS::ObjectValue(*obj); | ||||
} | } | ||||
BEGIN_INTERFACE_WRAPPER(Footprint) | BEGIN_INTERFACE_WRAPPER(Footprint) | ||||
DEFINE_INTERFACE_METHOD_CONST_1("PickSpawnPoint", CFixedVector3D, ICmpFootprint, PickSpawnPoint, entity_id_t) | DEFINE_INTERFACE_METHOD("PickSpawnPoint", ICmpFootprint, PickSpawnPoint) | ||||
DEFINE_INTERFACE_METHOD_CONST_1("PickSpawnPointBothPass", CFixedVector3D, ICmpFootprint, PickSpawnPointBothPass, entity_id_t) | DEFINE_INTERFACE_METHOD("PickSpawnPointBothPass", ICmpFootprint, PickSpawnPointBothPass) | ||||
DEFINE_INTERFACE_METHOD_CONST_0("GetShape", JS::Value, ICmpFootprint, GetShape_wrapper) | DEFINE_INTERFACE_METHOD("GetShape", ICmpFootprint, GetShape_wrapper) | ||||
END_INTERFACE_WRAPPER(Footprint) | END_INTERFACE_WRAPPER(Footprint) |
Wildfire Games · Phabricator