From dac3a52eff8f3aeebdbcecb451a712f7e5f7f57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Mon, 25 May 2020 19:37:04 +0200 Subject: [PATCH] removing the cgram print of the main window and old protoypes of background functions in PPU.hpp --- sources/PPU/PPU.cpp | 21 --------------------- sources/PPU/PPU.hpp | 14 -------------- 2 files changed, 35 deletions(-) diff --git a/sources/PPU/PPU.cpp b/sources/PPU/PPU.cpp index f8a3e32..1b7cb0d 100644 --- a/sources/PPU/PPU.cpp +++ b/sources/PPU/PPU.cpp @@ -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++) { diff --git a/sources/PPU/PPU.hpp b/sources/PPU/PPU.hpp index 9e519ad..8ad927b 100644 --- a/sources/PPU/PPU.hpp +++ b/sources/PPU/PPU.hpp @@ -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 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 pos, int bg, int bpp, Vector2 characterSize); - //! @brief Get a palette from the number of the palette (0 - 7) - std::vector 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 characterSize, Vector2 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