📄 lua_patt.c
字号:
/****************************************************************************
** **
** LuAllegro library - Lua port of Allegro **
** Copyright (C) 2005 Peter Jamroz **
** e-mail: peterjam at poczta dot onet dot pl **
** **
** Permission to use, copy, modify, publish this software **
** is hereby granted to any person obtaining a copy of this software, **
** FREE OF CHARGE, **
** under the following conditions: **
** **
** 1: The above copyright notice and this permission notice shall be **
** included in all copies or substantial portions of the Software. **
** **
** 2: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, **
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF **
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.**
** IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY **
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, **
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE **
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **
** **
****************************************************************************/
#include <allegro.h>
#include "lua_aleg.h"
#include "lua_patt.h"
//------------------------------------------------------------------------------------------
//----- pocz箃ek dzia硊 "Transparency and patterned drawing" ------------------------------
//------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
//void drawing_mode(int mode, BITMAP *pattern, int x_anchor, int y_anchor);
static int l_drawing_mode (lua_State *L)
{
int mode=lua_tonumber(L,1);
// BITMAP* pattern is ignored now.
drawing_mode(mode,NULL,0,0);
return 0; /* number of results */
}
//---------------------------------------------------------------------------------------------
static const struct luaL_reg allegro_patt_lib [] = {
{"drawing_mode", l_drawing_mode},
{NULL, NULL} /* sentinel */
};
//-----------------------------------------------------------------------------------------------
int luaopen_allegro_patt (lua_State *L)
{
luaL_openlib(L, "allegro", allegro_patt_lib, 0);
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -