Merge branch 'master' into console-func-refactor

Conflicts:
	Engine/source/app/net/net.cpp
	Engine/source/console/astNodes.cpp
	Engine/source/console/compiledEval.cpp
	Engine/source/console/console.h
	Engine/source/console/consoleInternal.h
	Engine/source/console/engineAPI.h
This commit is contained in:
Daniel Buckmaster 2014-10-14 14:40:17 +11:00
commit b507dc9555
6487 changed files with 315149 additions and 609761 deletions

View file

@ -43,7 +43,7 @@ extern "C" {
return so->getClassName();
}
void *SimObject_GetFieldList(SimObject *so, int &outNumFields)
void *SimObject_GetFieldList(SimObject *so, S32 &outNumFields)
{
const AbstractClassRep::FieldList &fl = so->getFieldList();
outNumFields = fl.size();

View file

@ -29,7 +29,7 @@
// External scripting cinterface, suitable for import into any scripting system which support "C" interfaces (C#, Python, Lua, Java, etc)
#ifdef TORQUE_OS_WIN32
#ifdef TORQUE_OS_WIN
#include "windowManager/win32/win32Window.h"
#include "windowManager/win32/winDispatch.h"
#endif
@ -164,7 +164,7 @@ extern "C" {
return false;
}
void script_simobject_setfield_int(U32 objectId, const char* fieldName, int v)
void script_simobject_setfield_int(U32 objectId, const char* fieldName, S32 v)
{
SimObject *object = Sim::findObject( objectId );
if( object )
@ -223,7 +223,7 @@ extern "C" {
{
// maxArgs improper on a number of console function/methods
if (argc < entry->mMinArgs)// || argc > entry->mMaxArgs)
return "";
return false;
SimObject* o = NULL;
@ -231,7 +231,7 @@ extern "C" {
{
o = Sim::findObject(dAtoi(argv[1]));
if (!o)
return "";
return false;
}
StringStackConsoleWrapper args(argc, argv);
@ -296,12 +296,12 @@ extern "C" {
entry->cb.mVoidCallbackFunc(o, args.count(), args);
}
int script_simobject_get_id(SimObject* so)
S32 script_simobject_get_id(SimObject* so)
{
return so->getId();
}
int script_simobject_find(const char* classname, const char* name)
S32 script_simobject_find(const char* classname, const char* name)
{
SimObject *object;
if( Sim::findObject( name, object ) )
@ -388,9 +388,9 @@ extern "C" {
}
#ifdef TORQUE_OS_WIN32
#ifdef TORQUE_OS_WIN
void script_input_event(int type, int value1, int value2)
void script_input_event(S32 type, S32 value1, S32 value2)
{
if (PlatformWindowManager::get() && PlatformWindowManager::get()->getFirstWindow())
{

View file

@ -29,7 +29,7 @@
#include "windowManager/platformWindow.h"
#include "windowManager/platformWindowMgr.h"
#ifdef TORQUE_OS_WIN32
#ifdef TORQUE_OS_WIN
#include "windowManager/win32/win32Window.h"
#include "windowManager/win32/winDispatch.h"
extern void createFontInit(void);
@ -37,7 +37,7 @@ extern void createFontShutdown(void);
#endif
#if defined( TORQUE_MINIDUMP ) && defined( TORQUE_RELEASE )
extern INT CreateMiniDump(LPEXCEPTION_POINTERS ExceptionInfo);
extern S32 CreateMiniDump(LPEXCEPTION_POINTERS ExceptionInfo);
#endif
static HashTable<StringTableEntry,StringTableEntry> gSecureScript;
@ -47,7 +47,7 @@ static HashTable<StringTableEntry,StringTableEntry> gSecureScript;
// ObjC hooks for shared library support
// See: macMain.mm
void torque_mac_engineinit(int argc, const char **argv);
void torque_mac_engineinit(S32 argc, const char **argv);
void torque_mac_enginetick();
void torque_mac_engineshutdown();
@ -64,7 +64,7 @@ extern "C" {
}
// initialize Torque 3D including argument handling
int torque_engineinit(S32 argc, const char **argv)
S32 torque_engineinit(S32 argc, const char **argv)
{
#if defined( TORQUE_MINIDUMP ) && defined( TORQUE_RELEASE )
@ -105,7 +105,7 @@ extern "C" {
}
// tick Torque 3D's main loop
int torque_enginetick()
S32 torque_enginetick()
{
#if defined( TORQUE_MINIDUMP ) && defined( TORQUE_RELEASE )
@ -139,7 +139,7 @@ extern "C" {
}
// shutdown the engine
int torque_engineshutdown()
S32 torque_engineshutdown()
{
#if defined( TORQUE_MINIDUMP ) && defined( TORQUE_RELEASE )
@ -181,7 +181,7 @@ extern "C" {
}
int torque_getconsolebool(const char* name)
S32 torque_getconsolebool(const char* name)
{
return Con::getBoolVariable(name);
}
@ -307,7 +307,7 @@ extern "C" {
Namespace::Entry* entry = GetEntry(nameSpace, name);
if (!entry)
return "";
return false;
StringStackConsoleWrapper args(argc, argv);
return entry->cb.mBoolCallbackFunc(NULL, args.count(), args);
@ -421,7 +421,7 @@ extern "C" {
PlatformWindowManager::get()->getFirstWindow()->setSize(Point2I(width,height));
}
#ifdef TORQUE_OS_WIN32
#ifdef TORQUE_OS_WIN
// retrieve the hwnd of our render window
void* torque_gethwnd()
{
@ -474,9 +474,10 @@ ConsoleFunction(testJavaScriptBridge, const char *, 4, 4, "testBridge(arg1, arg2
if (dStrcmp(jret,"42"))
failed = 3;
char *ret = Con::getReturnBuffer(256);
static const U32 bufSize = 256;
char *ret = Con::getReturnBuffer(bufSize);
dSprintf(ret, 256, "%i", failed);
dSprintf(ret, bufSize, "%i", failed);
return ret;
}