removing the cgram print of the main window and old protoypes of background functions in PPU.hpp

This commit is contained in:
Clément Le Bihan
2020-05-25 19:37:04 +02:00
parent 8a40625dea
commit dac3a52eff
2 changed files with 0 additions and 35 deletions
-21
View File
@@ -251,28 +251,7 @@ namespace ComSquare::PPU
void PPU::update(unsigned cycles)
{
(void)cycles;
uint16_t tmp;
uint8_t red;
uint8_t green;
uint8_t blue;
uint32_t pixelTmp = 0x0;
if (!this->_registers._inidisp.fblank) {
for (int y = 0; y <= 255; y += 2) {
tmp = this->cgram->read_internal(y);
tmp += this->cgram->read_internal(y + 1) << 8;
blue = (tmp & 0x7D00U) >> 10U;
green = (tmp & 0x03E0U) >> 5U;
red = (tmp & 0x001FU);
pixelTmp = this->_registers._inidisp.brightness * 255U / 15U;
pixelTmp += (red * 255U / 31U) << 24U;
pixelTmp += (green * 255U / 31U) << 16U;
pixelTmp += (blue * 255U / 31U) << 8U;
for (int x = 0; x < 100; x++)
this->_renderer.putPixel(x, y, pixelTmp);
}
}
this->_backgrounds[0].renderBackground();
for (int i = 0; i < this->_backgrounds[0]._backgroundSize.y; i++) {
for (int j = 0; j < this->_backgrounds[0]._backgroundSize.x; j++) {
-14
View File
@@ -595,20 +595,6 @@ namespace ComSquare::PPU
virtual bool isDebugger();
//! @brief Allow others components to read the CGRAM
uint16_t cgramRead(uint16_t addr);
/* //! @brief Render a background on the screen
void renderBackground(int bgNumber, Vector2<int> characterSize, int bpp, bool priority);
//! @brief Get the correct Vram address for a gien x and y
uint16_t getGraphicVramAddress(int x, int y, int bg, int bpp);
//! @brief Draw a tile on the screen at x y pos
void drawBgTile(uint16_t data, Vector2<int> pos, int bg, int bpp, Vector2<int> characterSize);
//! @brief Get a palette from the number of the palette (0 - 7)
std::vector<uint16_t> getPalette(int nbPalette);
//! @brief Transform SNES color code BGR to uint32_t RGB
uint32_t getRealColor(uint16_t color);
//! @brief Get the color reference of a nb pixel tile
uint8_t getTilePixelReference(uint16_t addr, int bpp, int nb);
//! @brief draw a tilemap 32x32 starting at baseAddress
void drawBasicTileMap(uint16_t baseAddress, int bgNumber, int bpp, Vector2<int> characterSize, Vector2<int> offset); */
//! @brief get the bpp depending of the bgNumber and the Bgmode
int getBPP(int bgNumber);
//! @brief Give the correct character size depending of the bgMode