Skip to content

Commit

Permalink
Update readme for version 0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoAnsems committed Mar 25, 2020
1 parent 4759d90 commit 9d25591
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Main features:
* Supports all four Catacomb 3D games as included in the Catacombs Pack from GOG.com.
* Supports The Catacomb Abyss version 1.13 (shareware).

Current limitations as of version 0.4.2:
Current limitations as of version 0.4.3:
* No support for game controllers.
* No backwards compatibility with saved games from the original DOS game.
* No "demo" functionality (preview slideshow of Catacomb Armageddon and Apocalypse in shareware version).
Expand Down Expand Up @@ -58,6 +58,16 @@ Special thanks goes to:
* Roland Ansems for playtesting every level and reporting various bugs.
* NY00123 for developing the Reflection Keen source port. The part of Reflection Keen that handles music and sound effects is reused in CatacombGL.

# History
* Version 0.4.3 (2020-03-25) New in this release:
* Improved the performance of the OpenGL renderer.
* Added an "Extended" mode for the "Show frame rate" setting. When set, additional information such as the name of the graphics card is displayed.
* Added a "Loading Control Panel" animation to Catacomb 3D. Suggested by Dinoaur.
* Fix: support for OpenGL 2.x hardware. Suggested by InDOOMnesia.
* Fix: melee enemies in Catacomb 3D will no longer attempt to attack from too far away. Reported by Dinoaur.
* Fix: added the fizzle fade effect when opening the title screen in Catacomb 3D. Reported by Dinoaur.
* Fix: prevent the wizard's hand from bopping while shooting magick missiles repeatedly. Reported by Dinoaur.

# History
* Version 0.4.2 (2020-02-20) New in this release:
* Added the "fizzle fade" effect when entering a level or travelling through a magic gate. Based on code from Wolf4SDL.
Expand Down
2 changes: 2 additions & 0 deletions src/Engine/EngineCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ EngineCore::EngineCore(IGame& game, const ISystem& system, PlayerInput& keyboard
EngineCore::~EngineCore()
{
UnloadLevel();

delete m_menu;
}

const std::string EngineCore::GetVersionInfo()
Expand Down
14 changes: 8 additions & 6 deletions src/Win32/RendererOpenGLWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,20 +1005,22 @@ void RendererOpenGLWin32::UnprepareVisibilityMap()

Picture* RendererOpenGLWin32::GetScreenCapture(const unsigned int textureId)
{
uint8_t* rawPixelData = new uint8_t[(unsigned int)m_windowWidth * (unsigned int)m_windowHeight * 3u];
glReadPixels(0, 0, m_windowWidth, m_windowHeight, GL_RGB, GL_UNSIGNED_BYTE, rawPixelData);
// Pixels are read as GL_RGBA. Although the alpha channel is stricly speaking not necessary,
// some graphics adapters do not handle glReadPixels with GL_RGB correctly.
uint8_t* rawPixelData = new uint8_t[(unsigned int)m_windowWidth * (unsigned int)m_windowHeight * 4u];
glReadPixels(0, 0, m_windowWidth, m_windowHeight, GL_RGBA, GL_UNSIGNED_BYTE, rawPixelData);

const uint16_t textureWidth = Picture::GetNearestPowerOfTwo(m_windowWidth);
const uint16_t textureHeight = Picture::GetNearestPowerOfTwo(m_windowHeight);

uint8_t* texturePixelData = new uint8_t[(unsigned int)textureWidth * (unsigned int)textureHeight * 3u];
uint8_t* texturePixelData = new uint8_t[(unsigned int)textureWidth * (unsigned int)textureHeight * 4u];

// Flip pixels upside down
for (uint16_t y = 0; y < m_windowHeight; y++)
{
for (uint16_t x = 0; x < m_windowWidth * 3; x++)
for (uint16_t x = 0; x < m_windowWidth * 4; x++)
{
texturePixelData[(y * textureWidth * 3) + x] = rawPixelData[((m_windowHeight - 1 - y) * m_windowWidth * 3) + x];
texturePixelData[(y * textureWidth * 4) + x] = rawPixelData[((m_windowHeight - 1 - y) * m_windowWidth * 4) + x];
}
}

Expand All @@ -1036,7 +1038,7 @@ Picture* RendererOpenGLWin32::GetScreenCapture(const unsigned int textureId)

glBindTexture(GL_TEXTURE_2D, newTextureId);

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, textureWidth, textureHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, texturePixelData);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, textureWidth, textureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, texturePixelData);

delete[] texturePixelData;

Expand Down

0 comments on commit 9d25591

Please sign in to comment.