yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
bitmap.h File Reference
#include <SDL.h>
#include <cstdint>
#include <memory>
#include <span>
#include <string_view>
#include <vector>
#include "app/gfx/snes_palette.h"

Go to the source code of this file.

Classes

class  yaze::gfx::Bitmap
 Represents a bitmap image. More...
 

Namespaces

namespace  yaze
 Main namespace for the application.
 
namespace  yaze::gfx
 Contains classes for handling graphical data.
 

Typedefs

using yaze::gfx::BitmapTable = std::unordered_map<int, gfx::Bitmap>
 

Enumerations

enum  yaze::gfx::BitmapFormat { yaze::gfx::kIndexed = 0 , yaze::gfx::k2bpp = 1 , yaze::gfx::k4bpp = 2 , yaze::gfx::k8bpp = 3 }
 

Functions

std::vector< gfx::Bitmapyaze::gfx::ExtractTile8Bitmaps (const gfx::Bitmap &source_bmp, const gfx::SnesPalette &palette, uint8_t palette_index)
 Extract 8x8 tiles from a source bitmap.
 
Uint32 yaze::gfx::GetSnesPixelFormat (int format)
 Get the SDL pixel format for a given bitmap format.
 
SDL_Surface * yaze::gfx::AllocateSurface (int width, int height, int depth, Uint32 format)
 Allocate an SDL surface with the given dimensions and format.
 
SDL_Texture * yaze::gfx::AllocateTexture (SDL_Renderer *renderer, Uint32 format, int access, int width, int height)
 Allocate an SDL texture with the given dimensions and format.
 

Variables

constexpr Uint32 yaze::gfx::SNES_PIXELFORMAT_INDEXED
 
constexpr Uint32 yaze::gfx::SNES_PIXELFORMAT_2BPP
 
constexpr Uint32 yaze::gfx::SNES_PIXELFORMAT_4BPP
 
constexpr Uint32 yaze::gfx::SNES_PIXELFORMAT_8BPP