Exemple #1
0
	int SetPixel(lua_State *L)
	{
		int x = (int)lua_tointeger( L, -3 );
		int y = (int)lua_tointeger( L, -2 );
		bool bit = (int)lua_tointeger( L, -1 ) != 0;
		image.setPixel( x, y, bit );
		return 0;
	}
Exemple #2
0
// args: bitmap pointer, mode, unknown, unknown, unknown
int __stdcall GppDraw( unsigned char* pImg, int mode, int unknown1, int unknown2, int unknown3 )
{
	switch( mode )
	{
	case 0:
		image.setPixel( 1, 1, !image.getPixel( 1, 1 ) );
		image.copyTo( pImg, 0 );
		break;
	case 1:
		image.setPixel( 2, 2, !image.getPixel( 2, 2 ) );
		image.copyTo( pImg, 1 );
		break;
	case 2:
		image.setPixel( 3, 3, !image.getPixel( 3, 3 ) );
		image.copyTo( pImg, 2 );
		break;
	}

	return 0;
}