ComSquare
Classes | Namespaces | Functions
PPUUtils.hpp File Reference
#include <stdint-gcc.h>
#include <cstddef>
#include <memory>
#include <array>
#include "Models/Vector2.hpp"
Include dependency graph for PPUUtils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  ComSquare::PPU::Utils::TileData
 Used to parse easily VRAM Tile information. More...
 
struct  ComSquare::PPU::Utils::PpuState
 Struct to save all specific variables needed for the registers (prev values for example) More...
 

Namespaces

 ComSquare
 
 ComSquare::PPU
 
 ComSquare::PPU::Utils
 

Functions

uint8_t ComSquare::PPU::Utils::to8Bit (int color)
 Transform CGRAM color data to 8bits. More...
 
uint32_t ComSquare::PPU::Utils::CGRAMColorToRGBA (uint16_t CGRAMColor)
 Transform SNES color code BGR to uint32_t RGBA. More...
 
template<std::size_t DEST_SIZE_Y, std::size_t DEST_SIZE_X, std::size_t SRC_SIZE_Y, std::size_t SRC_SIZE_X>
void ComSquare::PPU::Utils::merge2DArray (std::array< std::array< uint32_t, DEST_SIZE_X >, DEST_SIZE_Y > &bufferDest, const std::array< std::array< uint32_t, SRC_SIZE_X >, SRC_SIZE_Y > &bufferSrc, const Vector2< int > &offset)
 
template<std::size_t SRC_SIZE_Y, std::size_t SRC_SIZE_X>
void ComSquare::PPU::Utils::VFlipArray (std::array< std::array< uint32_t, SRC_SIZE_X >, SRC_SIZE_Y > &array, const Vector2< int > &size, const Vector2< int > &offset={0, 0})
 
template<std::size_t SRC_SIZE_Y, std::size_t SRC_SIZE_X>
void ComSquare::PPU::Utils::HFlipArray (std::array< std::array< uint32_t, SRC_SIZE_X >, SRC_SIZE_Y > &array, const Vector2< int > &size, const Vector2< int > &offset={0, 0})
 
template<std::size_t DEST_SIZE_X, std::size_t DEST_SIZE_Y, std::size_t SRC_SIZE_X, std::size_t SRC_SIZE_Y>
static void ComSquare::PPU::Utils::addBuffer (std::array< std::array< uint32_t, DEST_SIZE_Y >, DEST_SIZE_X > &bufferDest, const std::array< std::array< uint32_t, SRC_SIZE_Y >, SRC_SIZE_X > &bufferSrc)
 Add a bg buffer to another buffer. More...