GRIM: remove _screenSize usage

This commit is contained in:
Pawel Kolodziejski 2014-07-14 08:03:10 +02:00
parent 017a67b8bc
commit 39e9dcb8aa
5 changed files with 5 additions and 7 deletions

View File

@ -46,7 +46,7 @@ namespace Grim {
GfxBase::GfxBase() :
_renderBitmaps(true), _renderZBitmaps(true), _shadowModeActive(false),
_currentPos(0, 0, 0), _currentQuat(0, 0, 0, 1), _dimLevel(0.0f),
_screenWidth(0), _screenHeight(0), _screenSize(0), _isFullscreen(false),
_screenWidth(0), _screenHeight(0), _isFullscreen(false),
_scaleW(1.0f), _scaleH(1.0f), _currentShadowArray(nullptr),
_shadowColorR(255), _shadowColorG(255), _shadowColorB(255) {

View File

@ -286,7 +286,7 @@ protected:
static const int _gameHeight = 480;
static const int _gameWidth = 640;
float _scaleW, _scaleH;
int _screenWidth, _screenHeight, _screenSize;
int _screenWidth, _screenHeight;
bool _isFullscreen;
Shadow *_currentShadowArray;
unsigned char _shadowColorR;

View File

@ -145,9 +145,9 @@ byte *GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) {
// Load emergency built-in font
loadEmergFont();
_screenSize = _screenWidth * _screenHeight * 4;
_storedDisplay = new byte[_screenSize];
memset(_storedDisplay, 0, _screenSize);
int screenSize = _screenWidth * _screenHeight * 4;
_storedDisplay = new byte[screenSize];
memset(_storedDisplay, 0, screenSize);
_smushNumTex = 0;
_currentShadowArray = nullptr;

View File

@ -400,7 +400,6 @@ byte *GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) {
// Load emergency built-in font
loadEmergFont();
_screenSize = _screenWidth * _screenHeight * 4;
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if (g_grim->getGameType() == GType_MONKEY4) {
// GL_LEQUAL as glDepthFunc ensures that subsequent drawing attempts for

View File

@ -173,7 +173,6 @@ byte *GfxTinyGL::setupScreen(int screenW, int screenH, bool fullscreen) {
_zb = new TinyGL::FrameBuffer(screenW, screenH, buf);
TinyGL::glInit(_zb, 256);
_screenSize = _gameWidth * _gameHeight * _pixelFormat.bytesPerPixel;
_storedDisplay.create(_pixelFormat, _gameWidth * _gameHeight, DisposeAfterUse::YES);
_storedDisplay.clear(_gameWidth * _gameHeight);