MCPcopy Create free account
hub / github.com/DFHack/dfhack / screen_paintTile

Function screen_paintTile

library/LuaApi.cpp:3099–3117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3097}
3098
3099static int screen_paintTile(lua_State *L)
3100{
3101 Pen pen;
3102 Lua::CheckPen(L, &pen, 1);
3103 int x = luaL_checkint(L, 2);
3104 int y = luaL_checkint(L, 3);
3105 if (lua_gettop(L) >= 4 && !lua_isnil(L, 4))
3106 {
3107 if (lua_type(L, 4) == LUA_TSTRING)
3108 pen.ch = lua_tostring(L, 4)[0];
3109 else
3110 pen.ch = luaL_checkint(L, 4);
3111 }
3112 if (lua_gettop(L) >= 5 && !lua_isnil(L, 5))
3113 pen.tile = luaL_checkint(L, 5);
3114 bool map = lua_toboolean(L, 6);
3115 lua_pushboolean(L, Screen::paintTile(pen, x, y, map));
3116 return 1;
3117}
3118
3119static int screen_readTile(lua_State *L)
3120{

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.85
lua_typeFunction · 0.85
lua_tobooleanFunction · 0.85
lua_pushbooleanFunction · 0.85
paintTileFunction · 0.85

Tested by

no test coverage detected