Start of lua api docs

... in asciidoc format. Use "asciidoctor -b html5 lua.adoc"
to generate the HTML version.
This commit is contained in:
Pasi Kallinen
2020-03-02 17:38:31 +02:00
parent c9b21e36a7
commit 00be8be45a
2 changed files with 680 additions and 3 deletions

View File

@@ -256,8 +256,8 @@ lua_State *L;
nhl_add_table_entry_int(L, "ttyp", ttmp->ttyp);
nhl_add_table_entry_str(L, "ttyp_name",
get_trapname_bytype(ttmp->ttyp));
nhl_add_table_entry_int(L, "tseen", ttmp->tseen);
nhl_add_table_entry_int(L, "madeby_u", ttmp->madeby_u);
nhl_add_table_entry_bool(L, "tseen", ttmp->tseen);
nhl_add_table_entry_bool(L, "madeby_u", ttmp->madeby_u);
switch (ttmp->ttyp) {
case SQKY_BOARD:
nhl_add_table_entry_int(L, "tnote", ttmp->tnote);
@@ -334,7 +334,7 @@ lua_State *L;
nhl_add_table_entry_bool(L, "edge", levl[x][y].edge);
nhl_add_table_entry_bool(L, "candig", levl[x][y].candig);
nhl_add_table_entry_int(L, "has_trap", t_at(x,y) ? 1 : 0);
nhl_add_table_entry_bool(L, "has_trap", t_at(x,y) ? 1 : 0);
/* TODO: FIXME: levl[x][y].flags */