|
Stardew Engine
|
#include "Scripting.h"#include "lua.h"#include <lualib.h>#include <lauxlib.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include "AssertLib.h"#include "XMLUIGameLayer.h"#include "RootWidget.h"#include "GameFrameworkEvent.h"#include "GameFramework.h"#include "DataNode.h"#include "main.h"#include "Game2DLayer.h"#include "Log.h"#include "Camera2D.h"
Data Structures | |
| struct | LuaListenerUserData |
Macros | |
| #define | GAME_LUA_MINOR_VERSION 1 |
Functions | |
| void | Sc_RegisterCFunction (const char *name, int(*fn)(lua_State *)) |
| void | Sc_InitScripting () |
| void | Sc_DeInitScripting () |
| bool | Sc_OpenFile (const char *path) |
| int | Sc_CallGlobalFuncReturningTableAndStoreResultInReg (const char *funcName, struct ScriptCallArgument *pArgs, int numArgs) |
| call a global lua function that returns a table, and store the table in the lua registry (lua_LGetRef) | |
| void | Sc_CallFuncInRegTableEntryTable (int regIndex, const char *funcName, struct ScriptCallArgument *pArgs, int numArgs, int numReturnVals) |
| void | Sc_CallFuncInRegTableEntry (int regIndex, struct ScriptCallArgument *pArgs, int numArgs, int numReturnVals, int selfRegIndex) |
| void | Sc_AddLightUserDataValueToTable (int regIndex, const char *userDataKey, void *userDataValue) |
| bool | Sc_FunctionPresentInTable (int regIndex, const char *funcName) |
| void | Sc_DumpStack () |
| int | Sc_Int () |
| float | Sc_Float () |
| size_t | Sc_StackTopStringLen () |
| void | Sc_StackTopStrCopy (char *pOutString) |
| void | Sc_ResetStack () |
| void | Sc_DeleteTableInReg (int index) |
| delete a table stored in the lua registry | |
| bool | Sc_IsTable () |
| int | Sc_Type () |
| void | Sc_Pop () |
| void | Sc_TableGet (const char *key) |
| void | Sc_TableGetIndex (int index) |
| int | Sc_TableLen () |
| bool | Sc_IsNil () |
| bool | Sc_IsString () |
| bool | Sc_IsInteger () |
| bool | Sc_IsBool () |
| bool | Sc_IsNumber () |
| bool | Sc_Bool () |
| bool | Sc_IsFunction () |
| bool | Sc_StringCmp (const char *cmpTo) |
| void | Sc_NewTableOnStack (int arrayElementHint, int nonArrayElementHint) |
| void | Sc_SetIntAtTableIndex (int index, int value) |
| void | Sc_SetTable () |
| (stack on table) push index onto stack push something to set at the index call this to set the value at the index | |
| void | Sc_PushInt (int i) |
| void | Sc_SetIntAtTableKey (const char *key, int val) |
| void | Sc_SetFloatAtTableKey (const char *key, float val) |
| void | Sc_SetPointerAtTableKey (const char *key, void *ptr) |
| int | Sc_RefTable () |
| void | Sc_UnRefTable (int ref) |
| #define GAME_LUA_MINOR_VERSION 1 |
| void Sc_AddLightUserDataValueToTable | ( | int | regIndex, |
| const char * | userDataKey, | ||
| void * | userDataValue | ||
| ) |
| bool Sc_Bool | ( | ) |
| void Sc_CallFuncInRegTableEntry | ( | int | regIndex, |
| struct ScriptCallArgument * | pArgs, | ||
| int | numArgs, | ||
| int | numReturnVals, | ||
| int | selfRegIndex | ||
| ) |
| void Sc_CallFuncInRegTableEntryTable | ( | int | regIndex, |
| const char * | funcName, | ||
| struct ScriptCallArgument * | pArgs, | ||
| int | numArgs, | ||
| int | numReturnVals | ||
| ) |
| int Sc_CallGlobalFuncReturningTableAndStoreResultInReg | ( | const char * | funcName, |
| struct ScriptCallArgument * | pArgs, | ||
| int | numArgs | ||
| ) |
call a global lua function that returns a table, and store the table in the lua registry (lua_LGetRef)
| funcName | |
| pArgs | |
| numArgs |
| void Sc_DeInitScripting | ( | ) |
| void Sc_DeleteTableInReg | ( | int | index | ) |
delete a table stored in the lua registry
| index |
| void Sc_DumpStack | ( | ) |
| float Sc_Float | ( | ) |
| bool Sc_FunctionPresentInTable | ( | int | regIndex, |
| const char * | funcName | ||
| ) |
| void Sc_InitScripting | ( | ) |
| int Sc_Int | ( | ) |
| bool Sc_IsBool | ( | ) |
| bool Sc_IsFunction | ( | ) |
| bool Sc_IsInteger | ( | ) |
| bool Sc_IsNil | ( | ) |
| bool Sc_IsNumber | ( | ) |
| bool Sc_IsString | ( | ) |
| bool Sc_IsTable | ( | ) |
| void Sc_NewTableOnStack | ( | int | arrayElementHint, |
| int | nonArrayElementHint | ||
| ) |
| bool Sc_OpenFile | ( | const char * | path | ) |
| void Sc_Pop | ( | ) |
| void Sc_PushInt | ( | int | i | ) |
| int Sc_RefTable | ( | ) |
| void Sc_RegisterCFunction | ( | const char * | name, |
| int(*)(lua_State *) | fn | ||
| ) |
| void Sc_ResetStack | ( | ) |
| void Sc_SetFloatAtTableKey | ( | const char * | key, |
| float | val | ||
| ) |
| void Sc_SetIntAtTableIndex | ( | int | index, |
| int | value | ||
| ) |
| void Sc_SetIntAtTableKey | ( | const char * | key, |
| int | val | ||
| ) |
| void Sc_SetPointerAtTableKey | ( | const char * | key, |
| void * | ptr | ||
| ) |
| void Sc_SetTable | ( | ) |
(stack on table) push index onto stack push something to set at the index call this to set the value at the index
| void Sc_StackTopStrCopy | ( | char * | pOutString | ) |
| size_t Sc_StackTopStringLen | ( | ) |
| bool Sc_StringCmp | ( | const char * | cmpTo | ) |
| void Sc_TableGet | ( | const char * | key | ) |
| void Sc_TableGetIndex | ( | int | index | ) |
| int Sc_TableLen | ( | ) |
| int Sc_Type | ( | ) |
| void Sc_UnRefTable | ( | int | ref | ) |