diff options
author | Johannes Schickel | 2011-04-17 21:27:34 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-04-17 21:27:34 +0200 |
commit | da734a4af024a72ee155bc25d6e45f994de6b060 (patch) | |
tree | c2ca3d8215cc8b38834e1a42e9f788d4fabce32b /backends | |
parent | 877004dbdd967d2f57d494b1aaa1cb55aae0fd52 (diff) | |
download | scummvm-rg350-da734a4af024a72ee155bc25d6e45f994de6b060.tar.gz scummvm-rg350-da734a4af024a72ee155bc25d6e45f994de6b060.tar.bz2 scummvm-rg350-da734a4af024a72ee155bc25d6e45f994de6b060.zip |
ALL/GRAPHICS: Remove Surface::bytesPerPixel.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.cpp | 3 | ||||
-rw-r--r-- | backends/platform/android/texture.cpp | 2 | ||||
-rw-r--r-- | backends/platform/dc/display.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/osystem_ds.cpp | 2 | ||||
-rw-r--r-- | backends/platform/iphone/osys_video.cpp | 1 | ||||
-rw-r--r-- | backends/platform/n64/osys_n64_base.cpp | 1 | ||||
-rw-r--r-- | backends/platform/ps2/Gs2dScreen.cpp | 1 | ||||
-rw-r--r-- | backends/platform/psp/default_display_client.cpp | 1 | ||||
-rw-r--r-- | backends/platform/wii/osystem_gfx.cpp | 2 |
9 files changed, 1 insertions, 14 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 5279af9896..6b20c2f9c2 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -1287,10 +1287,8 @@ Graphics::Surface *SdlGraphicsManager::lockScreen() { _framebuffer.h = _screen->h; _framebuffer.pitch = _screen->pitch; #ifdef USE_RGB_COLOR - _framebuffer.bytesPerPixel = _screenFormat.bytesPerPixel; _framebuffer.format = _screenFormat; #else - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); #endif @@ -2056,7 +2054,6 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) { dst.w = _osdSurface->w; dst.h = _osdSurface->h; dst.pitch = _osdSurface->pitch; - dst.bytesPerPixel = _osdSurface->format->BytesPerPixel; dst.format = Graphics::PixelFormat(_osdSurface->format->BytesPerPixel, 8 - _osdSurface->format->Rloss, 8 - _osdSurface->format->Gloss, 8 - _osdSurface->format->Bloss, 8 - _osdSurface->format->Aloss, diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp index 5931902906..2d73783309 100644 --- a/backends/platform/android/texture.cpp +++ b/backends/platform/android/texture.cpp @@ -147,7 +147,6 @@ void GLESBaseTexture::setLinearFilter(bool value) { void GLESBaseTexture::allocBuffer(GLuint w, GLuint h) { _surface.w = w; _surface.h = h; - _surface.bytesPerPixel = _pixelFormat.bytesPerPixel; _surface.format = _pixelFormat; if (w == _texture_width && h == _texture_height) @@ -374,7 +373,6 @@ void GLESFakePaletteTexture::allocBuffer(GLuint w, GLuint h) { GLESBaseTexture::allocBuffer(w, h); - _surface.bytesPerPixel = 1; _surface.format = Graphics::PixelFormat::createFormatCLUT8(); _surface.pitch = w; diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index b297022775..78fa2182dc 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -720,7 +720,7 @@ Graphics::Surface *OSystem_Dreamcast::lockScreen() _framebuffer.w = _screen_w; _framebuffer.h = _screen_h; _framebuffer.pitch = SCREEN_W*2; - _framebuffer.bytesPerPixel = (_screenFormat == 0? 1 : 2); + _framebuffer.format = screenFormats[_screenFormat]; return &_framebuffer; } diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index b22bc437b0..49818a0034 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -756,7 +756,6 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() { _framebuffer.w = DS::getGameWidth(); _framebuffer.h = DS::getGameHeight(); _framebuffer.pitch = DS::getGameWidth(); - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); } else { @@ -782,7 +781,6 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() { _framebuffer.w = width; _framebuffer.h = height; _framebuffer.pitch = width; - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); } diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp index 6f5b0e1e19..a10efeff40 100644 --- a/backends/platform/iphone/osys_video.cpp +++ b/backends/platform/iphone/osys_video.cpp @@ -334,7 +334,6 @@ Graphics::Surface *OSystem_IPHONE::lockScreen() { _framebuffer.w = _screenWidth; _framebuffer.h = _screenHeight; _framebuffer.pitch = _screenWidth; - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); return &_framebuffer; diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index 5a6a7ef9c0..232037899b 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -610,7 +610,6 @@ Graphics::Surface *OSystem_N64::lockScreen() { _framebuffer.w = _gameWidth; _framebuffer.h = _gameHeight; _framebuffer.pitch = _screenWidth; - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); return &_framebuffer; diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp index 22dae94527..e43ea0f376 100644 --- a/backends/platform/ps2/Gs2dScreen.cpp +++ b/backends/platform/ps2/Gs2dScreen.cpp @@ -398,7 +398,6 @@ Graphics::Surface *Gs2dScreen::lockScreen() { _framebuffer.w = _width; _framebuffer.h = _height; _framebuffer.pitch = _width; // -not- _pitch; ! It's EE mem, not Tex - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); return &_framebuffer; diff --git a/backends/platform/psp/default_display_client.cpp b/backends/platform/psp/default_display_client.cpp index cab9c15926..34b1a70711 100644 --- a/backends/platform/psp/default_display_client.cpp +++ b/backends/platform/psp/default_display_client.cpp @@ -199,7 +199,6 @@ Graphics::Surface *Screen::lockAndGetForEditing() { _frameBuffer.w = _buffer.getSourceWidth(); _frameBuffer.h = _buffer.getSourceHeight(); _frameBuffer.pitch = _buffer.getBytesPerPixel() * _buffer.getWidth(); - _frameBuffer.bytesPerPixel = _buffer.getBytesPerPixel(); _frameBuffer.format = _pixelFormat; // We'll set to dirty once we unlock the screen diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 05952591a6..c2be608999 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -537,11 +537,9 @@ Graphics::Surface *OSystem_Wii::lockScreen() { _surface.h = _gameHeight; #ifdef USE_RGB_COLOR _surface.pitch = _gameWidth * _pfGame.bytesPerPixel; - _surface.bytesPerPixel = _pfGame.bytesPerPixel; _surface.format = _pfGame; #else _surface.pitch = _gameWidth; - _surface.bytesPerPixel = 1; _surface.format = Graphics::PixelFormat::createFormatCLUT8(); #endif |