- implemented debugModeEnabled() scripting function to find out if game debug mode is on

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1747 4a71c877-e1ca-e34f-864e-861f7616d084
master
Roman C 2007-05-29 14:21:39 +00:00
parent 508bc685c4
commit b4fc0b8a41
3 changed files with 20 additions and 0 deletions

View File

@ -11151,3 +11151,19 @@ BOOL scrPrintCallStack(void)
return TRUE;
}
/*
* Returns true if game debug mode is on
*/
BOOL scrDebugModeEnabled(void)
{
scrFunctionResult.v.bval = getDebugMappingStatus();
if (!stackPushResult(VAL_BOOL, &scrFunctionResult))
{
debug(LOG_ERROR, "scrDebugModeEnabled(): failed to push result");
return FALSE;
}
return TRUE;
}

View File

@ -634,6 +634,7 @@ extern BOOL scrChatCmdIsPlayerAddressed(void);
extern BOOL scrSetTileHeight(void);
extern BOOL scrGetTileStructure(void);
extern BOOL scrPrintCallStack(void);
extern BOOL scrDebugModeEnabled(void);
extern BOOL beingResearchedByAlly(SDWORD resIndex, SDWORD player);

View File

@ -1375,6 +1375,9 @@ FUNC_SYMBOL asFuncTable[] =
0, { VAL_VOID },
0, 0, NULL, 0, 0, NULL, NULL },
{ "debugModeEnabled", scrDebugModeEnabled, VAL_BOOL,
0, { VAL_VOID },
0, 0, NULL, 0, 0, NULL, NULL },
/* END new functions */