示例#1
0
void TilemapLayer::DrawTile(Bitmap& screen, int x, int y, int row, int col, bool autotile) {
	if (!autotile && screen.GetTileOpacity(row, col) == Bitmap::Transparent)
		return;
	Rect rect(col * TILE_SIZE, row * TILE_SIZE, TILE_SIZE, TILE_SIZE);

	BitmapRef dst = DisplayUi->GetDisplaySurface();
	dst->Blit(x, y, screen, rect, 255);
}
示例#2
0
void TilemapLayer::DrawTile(Bitmap& screen, int x, int y, int row, int col, bool autotile) {
	Bitmap::TileOpacity op = screen.GetTileOpacity(row, col);

	if (!fast_blit && op == Bitmap::Transparent)
		return;
	Rect rect(col * TILE_SIZE, row * TILE_SIZE, TILE_SIZE, TILE_SIZE);

	BitmapRef dst = DisplayUi->GetDisplaySurface();

	if (fast_blit || op == Bitmap::Opaque) {
		dst->BlitFast(x, y, screen, rect, 255);
	} else {
		dst->Blit(x, y, screen, rect, 255);
	}
}