| 3097 | } |
| 3098 | |
| 3099 | static 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 | |
| 3119 | static int screen_readTile(lua_State *L) |
| 3120 | { |
nothing calls this directly
no test coverage detected