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

@ -465,7 +465,7 @@ ConsoleFunction( addMaterialMapping, void, 3, 3, "(string texName, string matNam
"block or interior surface using the associated texture.\n\n"
"@ingroup Materials")
{
MATMGR->mapMaterial(argv[1],argv[2]);
MATMGR->mapMaterial((const char*)argv[1],(const char*)argv[2]);
}
ConsoleFunction( getMaterialMapping, const char*, 2, 2, "(string texName)\n"
@ -474,7 +474,7 @@ ConsoleFunction( getMaterialMapping, const char*, 2, 2, "(string texName)\n"
"@param texName Name of the texture\n\n"
"@ingroup Materials")
{
return MATMGR->getMapEntry(argv[1]).c_str();
return MATMGR->getMapEntry((const char*)argv[1]).c_str();
}
ConsoleFunction( dumpMaterialInstances, void, 1, 1,