mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
EvalLua had no callers anywhere in the tree — it converted a wide string to UTF-8, ran it as a chunk and printf'd the error, which was the hook for a developer console that is not wired up. It was the only user of stdio, MemMan and windows.h in this file. InitializeLua and ShutdownLua are live, called from InitOverhead and ShutdownOverhead. The calls in InitializeGame and ShutdownGame were commented out when they moved there; remove them, and the commented ACCESSOR_TABLE block in InitializeLua that refers to a macro no longer defined anywhere. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
36 lines
764 B
C
36 lines
764 B
C
#ifndef _LUA_INTERPRETER_H_
|
|
#define _LUA_INTERPRETER_H_
|
|
|
|
extern "C" {
|
|
#include "lua.h"
|
|
#include "lauxlib.h"
|
|
#include "lualib.h"
|
|
}
|
|
|
|
#include "types.h"
|
|
|
|
typedef struct {
|
|
STR8 name;
|
|
lua_CFunction get;
|
|
lua_CFunction set;
|
|
lua_CFunction call;
|
|
lua_CFunction staticcall;
|
|
} LuaAttrib;
|
|
|
|
void InitializeLua( );
|
|
void ShutdownLua( );
|
|
|
|
extern luaL_Reg WStringMethods[];
|
|
extern LuaAttrib Environment[];
|
|
extern LuaAttrib Soldier[];
|
|
extern LuaAttrib Sector[];
|
|
|
|
void CreateLuaClass( lua_State *L, STR8 ClassName, LuaAttrib *Attribs );
|
|
void NewLuaObject( lua_State *L, STR8 ClsName, void *Ptr );
|
|
|
|
void LuaStrategicSetup(lua_State *L);
|
|
void LuaTacticalSetup(lua_State *L);
|
|
void LuaEnvironmentSetup(lua_State *L);
|
|
|
|
#endif // _LUA_INTERPRETER_H_
|