aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-17 21:27:34 +0200
committerJohannes Schickel2011-04-17 21:27:34 +0200
commitda734a4af024a72ee155bc25d6e45f994de6b060 (patch)
treec2ca3d8215cc8b38834e1a42e9f788d4fabce32b /backends/platform
parent877004dbdd967d2f57d494b1aaa1cb55aae0fd52 (diff)
downloadscummvm-rg350-da734a4af024a72ee155bc25d6e45f994de6b060.tar.gz
scummvm-rg350-da734a4af024a72ee155bc25d6e45f994de6b060.tar.bz2
scummvm-rg350-da734a4af024a72ee155bc25d6e45f994de6b060.zip
ALL/GRAPHICS: Remove Surface::bytesPerPixel.
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/android/texture.cpp2
-rw-r--r--backends/platform/dc/display.cpp2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp2
-rw-r--r--backends/platform/iphone/osys_video.cpp1
-rw-r--r--backends/platform/n64/osys_n64_base.cpp1
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp1
-rw-r--r--backends/platform/psp/default_display_client.cpp1
-rw-r--r--backends/platform/wii/osystem_gfx.cpp2
8 files changed, 1 insertions, 11 deletions
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