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

@ -1746,7 +1746,8 @@ static ConsoleDocFragment _ActionMapbind2(
ConsoleMethod( ActionMap, bind, bool, 5, 10, "actionMap.bind( device, action, [modifier spec, mod...], command )"
"@hide")
{
return object->processBind( argc - 2, argv + 2, NULL );
StringStackWrapper args(argc - 2, argv + 2);
return object->processBind( args.count(), args, NULL );
}
static ConsoleDocFragment _ActionMapbindObj1(
@ -1801,7 +1802,9 @@ ConsoleMethod( ActionMap, bindObj, bool, 6, 11, "(device, action, [modifier spec
return false;
}
return object->processBind( argc - 3, argv + 2, simObject );
StringStackWrapper args(argc - 3, argv + 2);
return object->processBind( args.count(), args, simObject );
}
//------------------------------------------------------------------------------

View file

@ -433,6 +433,9 @@ NetConnection::NetConnection()
// Disable starting a new journal recording or playback from here on
Journal::Disable();
// jamesu - netAddress is not set
dMemset(&mNetAddress, '\0', sizeof(NetAddress));
}
NetConnection::~NetConnection()