diff options
author | Johannes Schickel | 2009-02-15 21:20:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-02-15 21:20:21 +0000 |
commit | 5417f6bacb73d5996b26229513c2ce01db27bf6a (patch) | |
tree | ec7298416ce8f3ca657b1637352763178752852c /backends | |
parent | e29d90be3e2213313c2884d80656198d8fed65ef (diff) | |
download | scummvm-rg350-5417f6bacb73d5996b26229513c2ce01db27bf6a.tar.gz scummvm-rg350-5417f6bacb73d5996b26229513c2ce01db27bf6a.tar.bz2 scummvm-rg350-5417f6bacb73d5996b26229513c2ce01db27bf6a.zip |
- Replace OSystem::clearScreen with OSystem::fillScreen as discussed on -devel.
- Update BaseBackend and DC port to properly implement OSystem::fillScreen (now only PalmOS has to be updated).
- Update all client code which relied on OSystem::clearScreen so far.
svn-id: r38304
Diffstat (limited to 'backends')
-rw-r--r-- | backends/base-backend.cpp | 4 | ||||
-rw-r--r-- | backends/base-backend.h | 2 | ||||
-rw-r--r-- | backends/platform/dc/dc.h | 4 | ||||
-rw-r--r-- | backends/platform/dc/display.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/backends/base-backend.cpp b/backends/base-backend.cpp index 4c4b78b6cb..92194c6d32 100644 --- a/backends/base-backend.cpp +++ b/backends/base-backend.cpp @@ -45,10 +45,10 @@ Common::EventManager *BaseBackend::getEventManager() { return s_eventManager; } -void BaseBackend::clearScreen() { +void BaseBackend::fillScreen(uint32 col) { Graphics::Surface *screen = lockScreen(); if (screen && screen->pixels) - memset(screen->pixels, 0, screen->h * screen->pitch); + memset(screen->pixels, col, screen->h * screen->pitch); unlockScreen(); } diff --git a/backends/base-backend.h b/backends/base-backend.h index 6cf04e8c6e..697577cd33 100644 --- a/backends/base-backend.h +++ b/backends/base-backend.h @@ -33,7 +33,7 @@ class BaseBackend : public OSystem, EventProvider { public: virtual Common::EventManager *getEventManager(); virtual void displayMessageOnOSD(const char *msg); - virtual void clearScreen(); + virtual void fillScreen(uint32 col); virtual Common::SeekableReadStream *createConfigReadStream(); virtual Common::WriteStream *createConfigWriteStream(); diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index eabc013cdd..0b9b9112af 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -88,8 +88,8 @@ class OSystem_Dreamcast : public BaseBackend, public FilesystemFactory { virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); - // Clear the screen to black. - void clearScreen(); + // Fill the screen with a given color + void fillScreen(uint32 col); // Update the dirty areas of the screen void updateScreen(); diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index c6c8594aee..aa51123682 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -626,9 +626,9 @@ void OSystem_Dreamcast::unlockScreen() _screen_dirty = true; } -void OSystem_Dreamcast::clearScreen() +void OSystem_Dreamcast::fillScreen(uint32 col) { - memset(screen, 0, SCREEN_W*SCREEN_H); + memset(screen, col, SCREEN_W*SCREEN_H); _screen_dirty = true; } |