mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 21:46:09 +00:00
Changes default random map sizes.
Tweaks random map resources. Adds support for circular maps to rmgen library. Various fixes in map generator. On Miletus map, change player 2 civ, as Romans are not fully implemented (fixes #758) This was SVN commit r9104.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "ScriptInterface.h"
|
||||
|
||||
#include "graphics/Color.h"
|
||||
#include "graphics/Entity.h"
|
||||
#include "graphics/MapIO.h"
|
||||
#include "ps/utf16string.h"
|
||||
@@ -164,23 +163,6 @@ template<> bool ScriptInterface::FromJSVal<Entity>(JSContext* cx, jsval v, Entit
|
||||
return true;
|
||||
}
|
||||
|
||||
template<> bool ScriptInterface::FromJSVal<RGBColor>(JSContext* cx, jsval v, RGBColor& out)
|
||||
{
|
||||
JSObject* obj;
|
||||
if (!JS_ValueToObject(cx, v, &obj) || obj == NULL)
|
||||
FAIL("Argument must be an object");
|
||||
|
||||
jsval r, g, b;
|
||||
if (!JS_GetProperty(cx, obj, "r", &r) || !FromJSVal(cx, r, out.X))
|
||||
FAIL("Failed to read RGBColor.r property");
|
||||
if (!JS_GetProperty(cx, obj, "g", &g) || !FromJSVal(cx, g, out.Y))
|
||||
FAIL("Failed to read RGBColor.g property");
|
||||
if (!JS_GetProperty(cx, obj, "b", &b) || !FromJSVal(cx, b, out.Z))
|
||||
FAIL("Failed to read RGBColor.b property");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<> bool ScriptInterface::FromJSVal<CMapIO::STileDesc>(JSContext* cx, jsval v, CMapIO::STileDesc& out)
|
||||
{
|
||||
JSObject* obj;
|
||||
|
||||
Reference in New Issue
Block a user