push a table on lua stack containing room data */
| 3056 | |
| 3057 | /* push a table on lua stack containing room data */ |
| 3058 | staticfn void |
| 3059 | l_push_mkroom_table(lua_State *L, struct mkroom *tmpr) |
| 3060 | { |
| 3061 | lua_newtable(L); |
| 3062 | nhl_add_table_entry_int(L, "width", 1 + (tmpr->hx - tmpr->lx)); |
| 3063 | nhl_add_table_entry_int(L, "height", 1 + (tmpr->hy - tmpr->ly)); |
| 3064 | nhl_add_table_entry_region(L, "region", tmpr->lx, tmpr->ly, |
| 3065 | tmpr->hx, tmpr->hy); |
| 3066 | nhl_add_table_entry_bool(L, "lit", (boolean) tmpr->rlit); |
| 3067 | nhl_add_table_entry_bool(L, "irregular", tmpr->irregular); |
| 3068 | nhl_add_table_entry_bool(L, "needjoining", tmpr->needjoining); |
| 3069 | nhl_add_table_entry_str(L, "type", get_mkroom_name(tmpr->rtype)); |
| 3070 | } |
| 3071 | |
| 3072 | DISABLE_WARNING_UNREACHABLE_CODE |
| 3073 |
no test coverage detected