Added simple readme, fixed sdl_threads and moved to tinythreads (mutex for lua engine). Other small fixes
Signed-off-by: Warmist <Warmist@gmail.com>develop
parent
2a95a4edf2
commit
d262986740
@ -0,0 +1,13 @@
|
|||||||
|
#ifndef LUA_OFFSETS_H
|
||||||
|
#define LUA_OFFSETS_H
|
||||||
|
#include "luamain.h"
|
||||||
|
|
||||||
|
namespace lua
|
||||||
|
{
|
||||||
|
|
||||||
|
void RegisterEngine(lua::state &st);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,19 @@
|
|||||||
|
Dfusion command runs file <df dir>\dfusion\init.lua
|
||||||
|
Other than std lua commands supported:
|
||||||
|
* Console.
|
||||||
|
print(string)
|
||||||
|
printerr(string)
|
||||||
|
clear()
|
||||||
|
gotoxy(x,y)
|
||||||
|
color(int) //TODO add id's, use numbers upto 16 for now
|
||||||
|
reset_color()
|
||||||
|
cursor(true/false)
|
||||||
|
msleep(int)
|
||||||
|
get_columns()
|
||||||
|
get_rows()
|
||||||
|
lineedit(string) //text input through console
|
||||||
|
history_add(string) // adds string to console history
|
||||||
|
|
||||||
|
Functions searched:
|
||||||
|
OnTick()
|
||||||
|
If defined is called each DFHack tick.
|
@ -0,0 +1,18 @@
|
|||||||
|
#include "lua_Offsets.h"
|
||||||
|
//TODO make a seperate module with peeks/pokes and page permisions (linux/windows spec)
|
||||||
|
unsigned char peekb(size_t offset)
|
||||||
|
{
|
||||||
|
return *((unsigned char*)(offset));
|
||||||
|
}
|
||||||
|
unsigned short peekw(size_t offset)
|
||||||
|
{
|
||||||
|
return *((unsigned short*)(offset));
|
||||||
|
}
|
||||||
|
unsigned peekd(size_t offset)
|
||||||
|
{
|
||||||
|
return *((unsigned*)(offset));
|
||||||
|
}
|
||||||
|
void lua::RegisterEngine(lua::state &st)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue