src/menucode.cpp
// luaMenuBltImage *******
// a function used for blting from a Lua script to the screen

luaMenuBltImage
a function used for blting from a Lua script to the screen
luaMenuBltImage a function used for blting from a Lua script to the screen
int luaMenuBltImage(lua_State* lstate)
{
	ddSurfaceClass* surface;
	int paramNum=lua_gettop(lstate);
	int xD, yD, xS, yS, wS, hS;
	bool transparent;
	char* srfName;
	switch(paramNum) {
	case 4:
		srfName=(char*)(lua_tostring(lstate, 1));
		xD=int(lua_tonumber(lstate, 2));
		yD=int(lua_tonumber(lstate, 3));
		transparent=lua_toboolean(lstate, 4)==1?true:false;
		surface=getSurfaceByResourceName(srfName);
		screenBuffer->bltFrom(
			*surface, xD, yD, true, transparent);
		break;
	case 8:
		srfName=(char*)(lua_tostring(lstate, 1));
		xD=int(lua_tonumber(lstate, 2));
		yD=int(lua_tonumber(lstate, 3));
		xS=int(lua_tonumber(lstate, 4));
		yS=int(lua_tonumber(lstate, 5));
		wS=int(lua_tonumber(lstate, 6));
		hS=int(lua_tonumber(lstate, 7));
		transparent=lua_toboolean(lstate, 8)==1?true:false;
		surface=getSurfaceByResourceName(srfName);
		screenBuffer->bltFrom(
			*surface, xD, yD, xS, yS, wS, hS, true, transparent);
		break;
	}
	return 0;
}
int luaMenuBltImage ( lua_State * lstate ) { ddSurfaceClass * surface ; int paramNum = lua_gettop ( lstate ) ; int xD , yD , xS , yS , wS , hS ; bool transparent ; char * srfName ; switch ( paramNum ) { case 4 : srfName = ( char * ) ( lua_tostring ( lstate , 1 ) ) ; xD = int ( lua_tonumber ( lstate , 2 ) ) ; yD = int ( lua_tonumber ( lstate , 3 ) ) ; transparent = lua_toboolean ( lstate , 4 ) == 1 ? true : false ; surface = getSurfaceByResourceName ( srfName ) ; screenBuffer -> bltFrom ( * surface , xD , yD , true , transparent ) ; break ; case 8 : srfName = ( char * ) ( lua_tostring ( lstate , 1 ) ) ; xD = int ( lua_tonumber ( lstate , 2 ) ) ; yD = int ( lua_tonumber ( lstate , 3 ) ) ; xS = int ( lua_tonumber ( lstate , 4 ) ) ; yS = int ( lua_tonumber ( lstate , 5 ) ) ; wS = int ( lua_tonumber ( lstate , 6 ) ) ; hS = int ( lua_tonumber ( lstate , 7 ) ) ; transparent = lua_toboolean ( lstate , 8 ) == 1 ? true : false ; surface = getSurfaceByResourceName ( srfName ) ; screenBuffer -> bltFrom ( * surface , xD , yD , xS , yS , wS , hS , true , transparent ) ; break ; } return 0 ; }
luaMenuBltImage 
a function used for blting from a Lua script to the screen
luaMenuBltImage a function used for blting from a Lua script to the screen
// check which version of the function is being called
 // short version
 // params, in the same order they should be
 // passed to the program
 // look for the surface...
 // go draw it...
 // long version
 // params, in the same order they should be
 // passed to the program
 // look for the surface...
 // go draw it...
 // there are no return values
