LuPPC/src/c/modules.c

28 lines
754 B
C
Raw Normal View History

2016-01-05 04:20:40 +11:00
#include "luares.h"
2016-01-19 11:25:14 +11:00
#include "res.h"
2016-01-05 04:20:40 +11:00
#include "lupi.h"
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <stdlib.h>
void setup_modules(lua_State *L) {
lua_createtable (L, 0, 1);
2016-01-07 02:58:05 +11:00
pushstuple(L, "boot", lua_boot);
pushstuple(L, "color", lua_util_color);
2016-01-07 02:58:05 +11:00
pushstuple(L, "component", lua_component);
pushstuple(L, "computer", lua_computer);
2016-01-07 07:32:53 +11:00
pushstuple(L, "eeprom", lua_eeprom);
2016-01-10 05:39:48 +11:00
pushstuple(L, "filesystem", lua_filesystem);
pushstuple(L, "internet", lua_internet);
2016-01-07 02:58:05 +11:00
pushstuple(L, "sandbox", lua_sandbox);
pushstuple(L, "textgpu", lua_textgpu);
pushstuple(L, "random", lua_util_random);
2016-02-09 00:01:10 +11:00
pushstuple(L, "buffer", lua_util_buffer);
2016-01-19 11:25:14 +11:00
pushstuple(L, "eepromDefault", res_eepromDefault);
2016-01-05 04:20:40 +11:00
lua_setglobal(L, "moduleCode");
2016-01-20 05:46:40 +11:00
}