1
0
forked from mirrors/0ad

Split off Object-related functions from ScriptInterface

Follows 34b1920e7b.

This splits off the object-related functions, such as
[Set/Get/Has]Property, CreateObject, CreateArray, FreezeObject.

It also puts the definitions in the header itself, which might end up
with faster code here & there, though perhaps slower compilation time
(somewhat doubtful since we already included most things anyways).

Differential Revision: https://code.wildfiregames.com/D3956
This was SVN commit r25430.
This commit is contained in:
wraitii
2021-05-13 17:23:52 +00:00
parent cb263b9f26
commit 0f60bf3a97
49 changed files with 661 additions and 766 deletions
@@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2021 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -80,7 +80,7 @@ JS::Value GetCameraPivot(const ScriptRequest& rq)
pivot = g_Game->GetView()->GetCameraPivot();
JS::RootedValue pivotValue(rq.cx);
ScriptInterface::CreateObject(rq, &pivotValue, "x", pivot.X, "z", pivot.Z);
Script::CreateObject(rq, &pivotValue, "x", pivot.X, "z", pivot.Z);
return pivotValue;
}