aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/psp')
-rw-r--r--backends/platform/psp/README.PSP2
-rw-r--r--backends/platform/psp/default_display_client.cpp8
-rw-r--r--backends/platform/psp/default_display_client.h4
-rw-r--r--backends/platform/psp/display_manager.cpp2
-rw-r--r--backends/platform/psp/osys_psp.cpp17
-rw-r--r--backends/platform/psp/osys_psp.h8
6 files changed, 22 insertions, 19 deletions
diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP
index bc0bd35a6e..969459dc5b 100644
--- a/backends/platform/psp/README.PSP
+++ b/backends/platform/psp/README.PSP
@@ -1,4 +1,4 @@
-ScummVM-PSP 1.5.0git README
+ScummVM-PSP 1.6.0git README
==============================================================================
Installation
diff --git a/backends/platform/psp/default_display_client.cpp b/backends/platform/psp/default_display_client.cpp
index 2ee7ff5b74..bc252144fa 100644
--- a/backends/platform/psp/default_display_client.cpp
+++ b/backends/platform/psp/default_display_client.cpp
@@ -123,15 +123,15 @@ void Overlay::setSize(uint32 width, uint32 height) {
_renderer.setDrawWholeBuffer(); // We need to let the renderer know how much to draw
}
-void Overlay::copyToArray(OverlayColor *buf, int pitch) {
+void Overlay::copyToArray(void *buf, int pitch) {
DEBUG_ENTER_FUNC();
- _buffer.copyToArray((byte *)buf, pitch * sizeof(OverlayColor)); // Change to bytes
+ _buffer.copyToArray((byte *)buf, pitch); // Change to bytes
}
-void Overlay::copyFromRect(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
+void Overlay::copyFromRect(const void *buf, int pitch, int x, int y, int w, int h) {
DEBUG_ENTER_FUNC();
- _buffer.copyFromRect((byte *)buf, pitch * sizeof(OverlayColor), x, y, w, h); // Change to bytes
+ _buffer.copyFromRect((byte *)buf, pitch, x, y, w, h); // Change to bytes
// debug
//_buffer.print(0xFF);
setDirty();
diff --git a/backends/platform/psp/default_display_client.h b/backends/platform/psp/default_display_client.h
index 721a7e6fea..95c52e2352 100644
--- a/backends/platform/psp/default_display_client.h
+++ b/backends/platform/psp/default_display_client.h
@@ -69,8 +69,8 @@ public:
bool allocate();
void setBytesPerPixel(uint32 size);
void setSize(uint32 width, uint32 height);
- void copyToArray(OverlayColor *buf, int pitch);
- void copyFromRect(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
+ void copyToArray(void *buf, int pitch);
+ void copyFromRect(const void *buf, int pitch, int x, int y, int w, int h);
};
/**
diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp
index 10a732b1e3..c2ff84c7f5 100644
--- a/backends/platform/psp/display_manager.cpp
+++ b/backends/platform/psp/display_manager.cpp
@@ -302,7 +302,7 @@ void DisplayManager::init() {
// Init overlay since we never change the size
_overlay->deallocate();
- _overlay->setBytesPerPixel(sizeof(OverlayColor));
+ _overlay->setBytesPerPixel(sizeof(uint16));
_overlay->setSize(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
_overlay->allocate();
}
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 5fa5110684..fb8c1c60bf 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -204,11 +204,11 @@ void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) {
_cursor.clearKeyColor(); // Do we need this?
}
-void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
+void OSystem_PSP::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) {
DEBUG_ENTER_FUNC();
_displayManager.waitUntilRenderFinished();
_pendingUpdate = false;
- _screen.copyFromRect(buf, pitch, x, y, w, h);
+ _screen.copyFromRect((const byte *)buf, pitch, x, y, w, h);
}
Graphics::Surface *OSystem_PSP::lockScreen() {
@@ -260,12 +260,12 @@ void OSystem_PSP::clearOverlay() {
_overlay.clearBuffer();
}
-void OSystem_PSP::grabOverlay(OverlayColor *buf, int pitch) {
+void OSystem_PSP::grabOverlay(void *buf, int pitch) {
DEBUG_ENTER_FUNC();
_overlay.copyToArray(buf, pitch);
}
-void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
+void OSystem_PSP::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) {
DEBUG_ENTER_FUNC();
_displayManager.waitUntilRenderFinished();
_pendingUpdate = false;
@@ -303,7 +303,7 @@ void OSystem_PSP::warpMouse(int x, int y) {
_cursor.setXY(x, y);
}
-void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) {
+void OSystem_PSP::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
DEBUG_ENTER_FUNC();
_displayManager.waitUntilRenderFinished();
_pendingUpdate = false;
@@ -314,11 +314,13 @@ void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
}
_cursor.setKeyColor(keycolor);
- _cursor.setCursorTargetScale(cursorTargetScale);
+ // TODO: The old target scale was saved but never used. Should the new
+ // "do not scale" logic be implemented?
+ //_cursor.setCursorTargetScale(cursorTargetScale);
_cursor.setSizeAndScummvmPixelFormat(w, h, format);
_cursor.setHotspot(hotspotX, hotspotY);
_cursor.clearKeyColor();
- _cursor.copyFromArray(buf);
+ _cursor.copyFromArray((const byte *)buf);
}
bool OSystem_PSP::pollEvent(Common::Event &event) {
@@ -444,6 +446,7 @@ void OSystem_PSP::getTimeAndDate(TimeDate &td) const {
td.tm_mday = t.tm_mday;
td.tm_mon = t.tm_mon;
td.tm_year = t.tm_year;
+ td.tm_wday = t.tm_wday;
}
Common::String OSystem_PSP::getDefaultConfigFileName() {
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index e6b445e232..2afdabd0fc 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -99,7 +99,7 @@ public:
void setCursorPalette(const byte *colors, uint start, uint num);
// Screen related
- void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
+ void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);
Graphics::Surface *lockScreen();
void unlockScreen();
void updateScreen();
@@ -109,8 +109,8 @@ public:
void showOverlay();
void hideOverlay();
void clearOverlay();
- void grabOverlay(OverlayColor *buf, int pitch);
- void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
+ void grabOverlay(void *buf, int pitch);
+ void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);
int16 getOverlayHeight();
int16 getOverlayWidth();
Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<4444>(); }
@@ -118,7 +118,7 @@ public:
// Mouse related
bool showMouse(bool visible);
void warpMouse(int x, int y);
- void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format);
+ void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format);
// Events and input
bool pollEvent(Common::Event &event);