static int libd_drawNum(lua_State *L) { INT32 x, y, flags, num; HUDONLY x = luaL_checkinteger(L, 1); y = luaL_checkinteger(L, 2); num = luaL_checkinteger(L, 3); flags = luaL_optinteger(L, 4, 0); flags &= ~V_PARAMMASK; // Don't let crashes happen. V_DrawTallNum(x, y, flags, num); return 0; }
static int libd_drawNum(lua_State *L) { INT32 x, y, flags, num; if (!hud_running) return luaL_error(L, "HUD rendering code should not be called outside of rendering hooks!"); x = luaL_checkinteger(L, 1); y = luaL_checkinteger(L, 2); num = luaL_checkinteger(L, 3); flags = luaL_optinteger(L, 4, 0); flags &= ~V_PARAMMASK; // Don't let crashes happen. V_DrawTallNum(x, y, flags, num); return 0; }