Beginnings of the "pass everything using a native type wrapper" console code.

- ConsoleValue class is now the base value class.
- ConsoleValueRef is now used to supply function parameters. Values are disposable.
- Script functions return values instead of just strings where possible.
- Variables can be disposable strings
- Bytecode changed

Fix the issues with console method parameters and fields which prevented missions from loading.
This commit is contained in:
James Urquhart 2012-09-23 09:59:48 +01:00
parent 394d87cd54
commit 38c8e52c1d
68 changed files with 1511 additions and 529 deletions

View file

@ -138,20 +138,20 @@ ConsoleDocFragment _spawnObject1(
ConsoleFunction(spawnObject, S32, 3, 6, "spawnObject(class [, dataBlock, name, properties, script])"
"@hide")
{
String spawnClass(argv[1]);
String spawnClass((String)argv[1]);
String spawnDataBlock;
String spawnName;
String spawnProperties;
String spawnScript;
if (argc >= 3)
spawnDataBlock = argv[2];
spawnDataBlock = (String)argv[2];
if (argc >= 4)
spawnName = argv[3];
spawnName = (String)argv[3];
if (argc >= 5)
spawnProperties = argv[4];
spawnProperties = (String)argv[4];
if (argc >= 6)
spawnScript = argv[5];
spawnScript = (String)argv[5];
SimObject* spawnObject = Sim::spawnObject(spawnClass, spawnDataBlock, spawnName, spawnProperties, spawnScript);