aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorLittleboy2011-05-02 17:18:22 -0400
committerLittleboy2011-05-02 17:21:10 -0400
commit0e45aa8655dc3122e8d88dbcb67ab2013a292989 (patch)
treef523e5c1870497528d85385ce5ef24259937813c /backends/platform
parent580986aa42889c9a775b3ebe5709292d779f41cf (diff)
parent1aff380a15f12e53bd380fc2a189882e2d6172c0 (diff)
downloadscummvm-rg350-0e45aa8655dc3122e8d88dbcb67ab2013a292989.tar.gz
scummvm-rg350-0e45aa8655dc3122e8d88dbcb67ab2013a292989.tar.bz2
scummvm-rg350-0e45aa8655dc3122e8d88dbcb67ab2013a292989.zip
Merge remote-tracking branch 'upstream/master' into nsis
Conflicts: devtools/create_project/scripts/postbuild.cmd devtools/create_project/visualstudio.cpp ports.mk
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/android/android.cpp1
-rw-r--r--backends/platform/android/android.h1
-rw-r--r--backends/platform/android/asset-archive.cpp1
-rw-r--r--backends/platform/android/gfx.cpp4
-rw-r--r--backends/platform/android/jni.cpp2
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/ScummVM.java2
-rw-r--r--backends/platform/android/texture.cpp16
-rw-r--r--backends/platform/dc/dc.h1
-rw-r--r--backends/platform/dc/display.cpp2
-rw-r--r--backends/platform/dc/dreamcast.mk4
-rw-r--r--backends/platform/dc/plugins.cpp16
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp6
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h1
-rw-r--r--backends/platform/gph/gph-backend.cpp1
-rw-r--r--backends/platform/iphone/osys_main.h1
-rw-r--r--backends/platform/iphone/osys_video.cpp2
-rw-r--r--backends/platform/n64/osys_n64.h1
-rw-r--r--backends/platform/n64/osys_n64_base.cpp2
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp4
-rw-r--r--backends/platform/ps2/Gs2dScreen.h2
-rw-r--r--backends/platform/ps2/ps2input.h4
-rw-r--r--backends/platform/ps2/systemps2.cpp2
-rw-r--r--backends/platform/ps2/systemps2.h5
-rw-r--r--backends/platform/psp/README.PSP2
-rw-r--r--backends/platform/psp/cursor.cpp16
-rw-r--r--backends/platform/psp/default_display_client.cpp2
-rw-r--r--backends/platform/psp/mp3.cpp1
-rw-r--r--backends/platform/psp/mp3.h2
-rw-r--r--backends/platform/psp/osys_psp.h1
-rw-r--r--backends/platform/sdl/posix/posix.cpp3
-rw-r--r--backends/platform/sdl/sdl.cpp4
-rw-r--r--backends/platform/sdl/win32/win32.cpp2
-rw-r--r--backends/platform/webos/webos.mk107
-rw-r--r--backends/platform/wii/osystem.cpp1
-rw-r--r--backends/platform/wii/osystem.h1
-rw-r--r--backends/platform/wii/osystem_gfx.cpp4
-rw-r--r--backends/platform/wince/wince-sdl.cpp1
37 files changed, 148 insertions, 80 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index bbfdb06b8d..c7f62f523b 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -32,6 +32,7 @@
#include <unistd.h>
#include "common/util.h"
+#include "common/textconsole.h"
#include "common/rect.h"
#include "common/queue.h"
#include "common/mutex.h"
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 6eebdb97d9..109d252a99 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -31,6 +31,7 @@
#include "common/fs.h"
#include "common/archive.h"
#include "audio/mixer_intern.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "backends/base-backend.h"
#include "backends/plugins/posix/posix-provider.h"
diff --git a/backends/platform/android/asset-archive.cpp b/backends/platform/android/asset-archive.cpp
index 8e95029894..7c21b35281 100644
--- a/backends/platform/android/asset-archive.cpp
+++ b/backends/platform/android/asset-archive.cpp
@@ -35,6 +35,7 @@
#include "common/util.h"
#include "common/archive.h"
#include "common/debug.h"
+#include "common/textconsole.h"
#include "backends/platform/android/jni.h"
#include "backends/platform/android/asset-archive.h"
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 86232030ff..fae428d29f 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -628,13 +628,13 @@ void OSystem_Android::grabOverlay(OverlayColor *buf, int pitch) {
GLTHREADCHECK;
const Graphics::Surface *surface = _overlay_texture->surface_const();
- assert(surface->bytesPerPixel == sizeof(buf[0]));
+ assert(surface->format.bytesPerPixel == sizeof(buf[0]));
const byte *src = (const byte *)surface->pixels;
uint h = surface->h;
do {
- memcpy(buf, src, surface->w * surface->bytesPerPixel);
+ memcpy(buf, src, surface->w * surface->format.bytesPerPixel);
src += surface->pitch;
// This 'pitch' is pixels not bytes
buf += pitch;
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index 08a1491998..f23d71b2a4 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -28,6 +28,8 @@
#include "base/main.h"
#include "base/version.h"
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#include "engines/engine.h"
#include "backends/platform/android/android.h"
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
index 8bf40ac553..c4de6d62f8 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
@@ -35,7 +35,7 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
private String[] _args;
- final private native void create(AssetManager _asset_manager,
+ final private native void create(AssetManager asset_manager,
EGL10 egl, EGLDisplay egl_display,
AudioTrack audio_track,
int sample_rate, int buffer_size);
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index a6b28ca485..2d73783309 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -147,7 +147,7 @@ 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)
return;
@@ -241,14 +241,14 @@ void GLESTexture::allocBuffer(GLuint w, GLuint h) {
delete[] _buf;
delete[] _pixels;
- _pixels = new byte[w * h * _surface.bytesPerPixel];
+ _pixels = new byte[w * h * _surface.format.bytesPerPixel];
assert(_pixels);
_surface.pixels = _pixels;
fillBuffer(0);
- _buf = new byte[w * h * _surface.bytesPerPixel];
+ _buf = new byte[w * h * _surface.format.bytesPerPixel];
assert(_buf);
}
@@ -257,10 +257,10 @@ void GLESTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h,
setDirtyRect(Common::Rect(x, y, x + w, y + h));
const byte *src = (const byte *)buf;
- byte *dst = _pixels + y * _surface.pitch + x * _surface.bytesPerPixel;
+ byte *dst = _pixels + y * _surface.pitch + x * _surface.format.bytesPerPixel;
do {
- memcpy(dst, src, w * _surface.bytesPerPixel);
+ memcpy(dst, src, w * _surface.format.bytesPerPixel);
dst += _surface.pitch;
src += pitch_buf;
} while (--h);
@@ -301,10 +301,10 @@ void GLESTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
_tex = _buf;
byte *src = _pixels + _dirty_rect.top * _surface.pitch +
- _dirty_rect.left * _surface.bytesPerPixel;
+ _dirty_rect.left * _surface.format.bytesPerPixel;
byte *dst = _buf;
- uint16 l = dwidth * _surface.bytesPerPixel;
+ uint16 l = dwidth * _surface.format.bytesPerPixel;
for (uint16 i = 0; i < dheight; ++i) {
memcpy(dst, src, l);
@@ -373,7 +373,7 @@ void GLESFakePaletteTexture::allocBuffer(GLuint w, GLuint h) {
GLESBaseTexture::allocBuffer(w, h);
- _surface.bytesPerPixel = 1;
+ _surface.format = Graphics::PixelFormat::createFormatCLUT8();
_surface.pitch = w;
if (_surface.w == oldw && _surface.h == oldh) {
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index f0c8c1f96c..060eff2b48 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -26,6 +26,7 @@
#include "backends/base-backend.h"
#include <graphics/surface.h>
#include <graphics/colormasks.h>
+#include <graphics/palette.h>
#include <ronin/soundcommon.h>
#include "backends/timer/default/default-timer.h"
#include "backends/audiocd/default/default-audiocd.h"
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/dc/dreamcast.mk b/backends/platform/dc/dreamcast.mk
index 8651a2936c..666e03eece 100644
--- a/backends/platform/dc/dreamcast.mk
+++ b/backends/platform/dc/dreamcast.mk
@@ -35,3 +35,7 @@ ip.txt : $(srcdir)/backends/platform/dc/ip.txt.in
ver="V$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)"; fi; \
sed -e 's/[@]VERSION[@]/'"$$ver"/ -e 's/[@]DATE[@]/$(shell date '+%Y%m%d')/' < $< > $@
+
+dcdist : dist
+ mkdir -p dcdist/scummvm
+ cp scummvm.elf SCUMMVM.BIN IP.BIN *.PLG dcdist/scummvm/
diff --git a/backends/platform/dc/plugins.cpp b/backends/platform/dc/plugins.cpp
index be329ab314..44b8960513 100644
--- a/backends/platform/dc/plugins.cpp
+++ b/backends/platform/dc/plugins.cpp
@@ -39,6 +39,7 @@ static void drawPluginProgress(const Common::String &filename)
{
ta_sync();
void *mark = ta_txmark();
+ const char *fn = filename.c_str();
Label lab1, lab2, lab3;
char buf[32];
unsigned memleft = 0x8cf00000-((unsigned)sbrk(0));
@@ -46,20 +47,21 @@ static void drawPluginProgress(const Common::String &filename)
int fcol = (memleft < (1<<20)? 0xffff0000:
(memleft < (4<<20)? 0xffffff00: 0xff00ff00));
snprintf(buf, sizeof(buf), "%dK free memory", memleft>>10);
+ if (fn[0] == '/') fn++;
lab1.create_texture("Loading plugins, please wait...");
- lab2.create_texture(filename.c_str());
+ lab2.create_texture(fn);
lab3.create_texture(buf);
ta_begin_frame();
- draw_solid_quad(80.0, 320.0, 560.0, 350.0,
+ draw_solid_quad(80.0, 270.0, 560.0, 300.0,
0xff808080, 0xff808080, 0xff808080, 0xff808080);
- draw_solid_quad(85.0, 325.0, 555.0, 345.0,
+ draw_solid_quad(85.0, 275.0, 555.0, 295.0,
0xff202020, 0xff202020, 0xff202020, 0xff202020);
- draw_solid_quad(85.0, 325.0, 85.0+470.0*ffree, 345.0,
+ draw_solid_quad(85.0, 275.0, 85.0+470.0*ffree, 295.0,
fcol, fcol, fcol, fcol);
ta_commit_end();
- lab1.draw(100.0, 200.0, 0xffffffff);
- lab2.draw(100.0, 240.0, 0xffffffff);
- lab3.draw(100.0, 280.0, 0xffffffff);
+ lab1.draw(100.0, 150.0, 0xffffffff);
+ lab2.draw(100.0, 190.0, 0xffaaffaa);
+ lab3.draw(100.0, 230.0, 0xffffffff);
ta_commit_frame();
ta_sync();
ta_txrelease(mark);
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 576b70dd2a..49818a0034 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -243,7 +243,7 @@ void OSystem_DS::setCursorPalette(const byte *colors, uint start, uint num) {
}
bool OSystem_DS::grabRawScreen(Graphics::Surface *surf) {
- surf->create(DS::getGameWidth(), DS::getGameHeight(), 1);
+ surf->create(DS::getGameWidth(), DS::getGameHeight(), Graphics::PixelFormat::createFormatCLUT8());
// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
@@ -756,7 +756,7 @@ 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 {
@@ -781,7 +781,7 @@ 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/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index 5e179d1337..b745b4dc6e 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -36,6 +36,7 @@
#include "audio/mixer_intern.h"
#include "graphics/surface.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
class OSystem_DS : public BaseBackend, public PaletteManager {
protected:
diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp
index fddcd03d85..375ee37378 100644
--- a/backends/platform/gph/gph-backend.cpp
+++ b/backends/platform/gph/gph-backend.cpp
@@ -40,6 +40,7 @@
#include "common/debug.h"
#include "common/events.h"
#include "common/file.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/mixer_intern.h"
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 25c3c40cf9..79f596632f 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -30,6 +30,7 @@
#include "audio/mixer_intern.h"
#include "backends/fs/posix/posix-fs-factory.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include <AudioToolbox/AudioQueue.h>
diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp
index c5e7ab8413..a10efeff40 100644
--- a/backends/platform/iphone/osys_video.cpp
+++ b/backends/platform/iphone/osys_video.cpp
@@ -334,7 +334,7 @@ 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.h b/backends/platform/n64/osys_n64.h
index 2daa41a9f6..7a84de0449 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -37,6 +37,7 @@
#include "graphics/surface.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include "graphics/pixelformat.h"
#include "audio/mixer_intern.h"
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 54eab0fd52..232037899b 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -610,7 +610,7 @@ 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 a460b919fd..e43ea0f376 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -398,7 +398,7 @@ 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;
}
@@ -441,7 +441,7 @@ void Gs2dScreen::grabPalette(uint8 *pal, uint8 start, uint16 num) {
void Gs2dScreen::grabScreen(Graphics::Surface *surf) {
assert(surf);
WaitSema(g_DmacSema);
- surf->create(_width, _height, 1);
+ surf->create(_width, _height, Graphics::PixelFormat::createFormatCLUT8());
memcpy(surf->pixels, _screenBuf, _width * _height);
SignalSema(g_DmacSema);
}
diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h
index 358e717cbe..6e842b3f55 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -46,7 +46,7 @@ enum GsInterlace {
namespace Graphics {
- struct Surface;
+struct Surface;
}
class Gs2dScreen {
diff --git a/backends/platform/ps2/ps2input.h b/backends/platform/ps2/ps2input.h
index 266f408809..eca5950113 100644
--- a/backends/platform/ps2/ps2input.h
+++ b/backends/platform/ps2/ps2input.h
@@ -32,6 +32,10 @@
class OSystem_PS2;
class Ps2Pad;
+namespace Common {
+struct Event;
+}
+
class Ps2Input {
public:
Ps2Input(OSystem_PS2 *system, bool mouseLoaded, bool kbdLoaded);
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 77de74eb5b..e95a026d01 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -727,7 +727,7 @@ void OSystem_PS2::msgPrintf(int millis, const char *format, ...) {
int maxWidth = 0;
Graphics::Surface surf;
- surf.create(300, 200, 1);
+ surf.create(300, 200, Graphics::PixelFormat::createFormatCLUT8());
char *lnSta = resStr;
while (*lnSta && (posY < 180)) {
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index 37575f399f..54e6f05798 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -28,6 +28,7 @@
#include "common/system.h"
#include "backends/base-backend.h"
+#include "graphics/palette.h"
class DefaultTimerManager;
class DefaultSaveFileManager;
@@ -47,11 +48,11 @@ struct Ps2Mutex {
};
namespace Common {
- class TimerManager;
+class TimerManager;
};
namespace Audio {
- class MixerImpl;
+class MixerImpl;
};
class OSystem_PS2 : public BaseBackend, public PaletteManager {
diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP
index b520022033..dcfa30898c 100644
--- a/backends/platform/psp/README.PSP
+++ b/backends/platform/psp/README.PSP
@@ -1,4 +1,4 @@
-ScummVM-PSP 1.3.0git README
+ScummVM-PSP 1.4.0git README
==============================================================================
Installation
diff --git a/backends/platform/psp/cursor.cpp b/backends/platform/psp/cursor.cpp
index cf879e095a..420b0398c3 100644
--- a/backends/platform/psp/cursor.cpp
+++ b/backends/platform/psp/cursor.cpp
@@ -327,8 +327,20 @@ inline void Cursor::setRendererModePalettized(bool palettized) {
_renderer.setAlphaReverse(false);
_renderer.setColorTest(false);
} else { // 16 bits, no palette
+ // Color test is an easy way for the hardware to make our keycolor
+ // transparent.
+ _renderer.setColorTest(true);
+
+ // Alpha blending is not strictly required, but makes the cursor look
+ // much better
_renderer.setAlphaBlending(true);
- _renderer.setAlphaReverse(true); // We can't change all alpha values, so just reverse
- _renderer.setColorTest(true); // Color test to make our key color transparent
+
+ // Pixel formats without alpha (5650) are considered to have their alpha set.
+ // Since pixel formats with alpha don't have their alpha bits set, we reverse
+ // the alpha format for them so that 0 alpha is 1.
+ if (_buffer.getPixelFormat() != PSPPixelFormat::Type_5650)
+ _renderer.setAlphaReverse(true);
+ else
+ _renderer.setAlphaReverse(false);
}
}
diff --git a/backends/platform/psp/default_display_client.cpp b/backends/platform/psp/default_display_client.cpp
index bb42406c3e..34b1a70711 100644
--- a/backends/platform/psp/default_display_client.cpp
+++ b/backends/platform/psp/default_display_client.cpp
@@ -199,7 +199,7 @@ 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
return &_frameBuffer;
diff --git a/backends/platform/psp/mp3.cpp b/backends/platform/psp/mp3.cpp
index 54476dabfd..0faeacb2f2 100644
--- a/backends/platform/psp/mp3.cpp
+++ b/backends/platform/psp/mp3.cpp
@@ -29,6 +29,7 @@
#include "common/util.h"
#include "common/singleton.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
diff --git a/backends/platform/psp/mp3.h b/backends/platform/psp/mp3.h
index 1d2fe5ec2f..95491d5788 100644
--- a/backends/platform/psp/mp3.h
+++ b/backends/platform/psp/mp3.h
@@ -30,7 +30,7 @@
#include "common/scummsys.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Audio {
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index 051449d4a0..1e4aea70d3 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -29,6 +29,7 @@
#include "common/scummsys.h"
#include "graphics/surface.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include "audio/mixer_intern.h"
#include "backends/base-backend.h"
#include "backends/fs/psp/psp-fs-factory.h"
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index 71a88265a0..889bc5cd5e 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+
#include "common/scummsys.h"
#ifdef UNIX
@@ -34,6 +36,7 @@
#include <errno.h>
#include <sys/stat.h>
+
OSystem_POSIX::OSystem_POSIX(Common::String baseConfigName)
:
_baseConfigName(baseConfigName) {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 2c0c45907f..bc27f8e954 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -23,6 +23,9 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -32,6 +35,7 @@
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
#include "common/EventRecorder.h"
+#include "common/textconsole.h"
#include "backends/saves/default/default-saves.h"
#include "backends/audiocd/sdl/sdl-audiocd.h"
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index 9459263ae2..fffc3a2a75 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -27,6 +27,8 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#ifdef WIN32
diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
index 22df5622ee..2b145b00c9 100644
--- a/backends/platform/webos/webos.mk
+++ b/backends/platform/webos/webos.mk
@@ -1,15 +1,27 @@
# WebOS specific build targets
# ============================================================================
#
-# Run "make webosrelease" to create a release package to be uploaded to the
-# Palm app catalog.
+# Build instructions:
#
-# Run "make webosbeta" to create a beta package to be uploaded to the Palm
-# Beta app catalog.
+# 1. Install the WebOS SDK and PDK and setup the environment variables
+# WEBOS_SDK and WEBOS_PDK accordingly.
#
-# Before calling these targets the ScummVM source must be configured for a
-# WebOS build. See
-# http://wiki.scummvm.org/index.php/Compiling_ScummVM/WebOS for details.
+# 2. Cross-compile zlib, flac, mad and tremor and install it into the PDK.
+#
+# 3. Prepare the ScummVM source for a webOS build:
+# $ ./configure --host=webos --enable-plugins --default-dynamic \
+# --enable-release
+#
+# 4. Create the package:
+# $ make package
+#
+# The package is now in the "portdist" folder.
+#
+# See http://wiki.scummvm.org/index.php/Compiling_ScummVM/WebOS for
+# more detailed build instructions.
+#
+#
+# Palm App catalog instructions:
#
# VER_PACKAGE must be set to a number which is higher than the currently
# used package version in the app catalog. So when creating an updated
@@ -25,46 +37,55 @@
# to use a user-specific app name when submitting the created package to the
# Palm app catalog. Use "ScummVM (<username>)" instead of "ScummVM" and
# "ScummVM Beta (<username>)" instead of "ScummVM Beta".
+#
+# The app id is automatically parsed from the installation prefix. So add a
+# configure parameter like this to prepare a build of a package for the Palm
+# App Catalog:
+#
+# --prefix=/media/cryptofs/apps/usr/palm/applications/com.github.kayahr.scummvm
+#
+# To build a package for the Palm Beta App Catalog add "-beta" to the prefix:
+#
+# --prefix=/media/cryptofs/apps/usr/palm/applications/com.github.kayahr.scummvm-beta
+# ============================================================================
+
+# Increment this number when the packaging of the app has been changed while
+# ScummVM itself has the same version as before. The number can be reset to
+# 1 when the ScummVM version is increased.
+VER_PACKAGE = 5
PATH_DIST = $(srcdir)/dists/webos
PATH_MOJO = $(PATH_DIST)/mojo
-BASE_APP_ID = org.scummvm
-APP_ID = $(BASE_APP_ID).scummvm
-BETA_APP_ID = $(APP_ID)-beta
+APP_ID = $(shell basename $(prefix))
APP_VERSION = $(shell printf "%d.%d.%02d%02d" $(VER_MAJOR) $(VER_MINOR) $(VER_PATCH) $(VER_PACKAGE))
-STAGING_DIR=STAGING/$(APP_ID)
-
-webosprepare: all
- $(QUIET)if [ "$(VER_PACKAGE)" = "" ]; \
- then \
- echo "ERROR: VER_PACKAGE is not set"; \
- echo "Example: export VER_PACKAGE=1"; \
- exit 1; \
- fi
- $(QUIET)$(RM_REC) $(STAGING_DIR)
- $(QUIET)$(MKDIR) $(STAGING_DIR)
- $(QUIET)$(MKDIR) $(STAGING_DIR)/bin
- $(QUIET)$(MKDIR) $(STAGING_DIR)/lib
- $(QUIET)$(MKDIR) $(STAGING_DIR)/share/scummvm
- $(QUIET)$(CP) $(PATH_MOJO)/* $(STAGING_DIR)
- $(QUIET)$(CP) gui/themes/translations.dat $(STAGING_DIR)/share/scummvm
- $(QUIET)$(CP) gui/themes/scummmodern.zip $(STAGING_DIR)/share/scummvm
- $(QUIET)$(CP) scummvm $(STAGING_DIR)/bin
- $(QUIET)$(STRIP) $(STAGING_DIR)/bin/scummvm
- $(QUIET)sed -i s/'APP_VERSION'/'$(APP_VERSION)'/ $(STAGING_DIR)/appinfo.json
+DESTDIR ?= portdist
-webosrelease: webosprepare
- $(QUIET)$(RM) $(APP_ID)_*.ipk
- $(QUIET)sed -i s/'APP_ID'/'$(APP_ID)'/ $(STAGING_DIR)/appinfo.json
- $(QUIET)sed -i s/'APP_TITLE'/'ScummVM'/ $(STAGING_DIR)/appinfo.json
- $(QUIET)$(WEBOS_SDK)/bin/palm-package --use-v1-format $(STAGING_DIR)
- $(QUIET)$(RM_REC) STAGING
+install: all
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(prefix)"
+ $(QUIET)$(INSTALL) -m 0644 -t "$(DESTDIR)$(prefix)/" "$(PATH_MOJO)/"*
+ $(QUIET)$(INSTALL) -m 0755 "$(PATH_MOJO)/start" "$(DESTDIR)$(prefix)/"
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(bindir)"
+ $(QUIET)$(INSTALL) -c -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
+ $(QUIET)$(STRIP) "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(docdir)"
+ $(QUIET)$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(docdir)"
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(datadir)"
+ $(QUIET)$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) "$(DESTDIR)$(datadir)/"
+ifdef DYNAMIC_MODULES
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(libdir)/"
+ $(QUIET)$(INSTALL) -c -m 644 $(PLUGINS) "$(DESTDIR)$(libdir)/"
+ $(QUIET)$(STRIP) "$(DESTDIR)$(libdir)/"*
+endif
+ $(QUIET)sed -i s/'APP_VERSION'/'$(APP_VERSION)'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ $(QUIET)sed -i s/'APP_ID'/'$(APP_ID)'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ifneq (,$(findstring -beta,$(APP_ID)))
+ $(QUIET)sed -i s/'APP_TITLE'/'ScummVM Beta'/ "$(DESTDIR)$(prefix)/appinfo.json"
+else
+ $(QUIET)sed -i s/'APP_TITLE'/'ScummVM'/ "$(DESTDIR)$(prefix)/appinfo.json"
+endif
-webosbeta: webosprepare
- $(QUIET)$(RM) $(BETA_APP_ID)_*.ipk
- $(QUIET)sed -i s/'APP_ID'/'$(BETA_APP_ID)'/ $(STAGING_DIR)/appinfo.json
- $(QUIET)sed -i s/'APP_TITLE'/'ScummVM Beta'/ $(STAGING_DIR)/appinfo.json
- $(QUIET)$(WEBOS_SDK)/bin/palm-package --use-v1-format $(STAGING_DIR)
- $(QUIET)$(RM_REC) STAGING
+uninstall:
+ $(QUIET)$(RM_REC) "$(DESTDIR)$(prefix)"
-.PHONY: webosrelease webosbeta
+package: install
+ $(QUIET)$(WEBOS_SDK)/bin/palm-package --use-v1-format "$(DESTDIR)$(prefix)" -o "$(DESTDIR)"
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp
index 2aefe48f0c..54da27126c 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -26,6 +26,7 @@
#include <ogc/lwp_watchdog.h>
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "backends/fs/wii/wii-fs-factory.h"
#include "osystem.h"
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 3c992b8bdc..d1ea8e07ae 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -36,6 +36,7 @@
#include "backends/saves/default/default-saves.h"
#include "backends/timer/default/default-timer.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "audio/mixer_intern.h"
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index cb9a8c72e9..c2be608999 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -537,10 +537,10 @@ 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
return &_surface;
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index b829686cb0..b54aebe6bd 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -33,6 +33,7 @@
#include "common/debug.h"
#include "common/events.h"
#include "common/util.h"
+#include "common/textconsole.h"
#include "common/timer.h"
#include "common/translation.h"