diff options
author | Max Lingua | 2009-03-04 03:55:00 +0000 |
---|---|---|
committer | Max Lingua | 2009-03-04 03:55:00 +0000 |
commit | 804910c42219ddbbc428f619515952c1474e9096 (patch) | |
tree | 45d7676d7e6033b9ea14c71ff6527fc7e949cf8a /backends/platform/ps2/icon.cpp | |
parent | 3a35b5b5f25a6ff5d20be5374bdb505f51ee3a43 (diff) | |
download | scummvm-rg350-804910c42219ddbbc428f619515952c1474e9096.tar.gz scummvm-rg350-804910c42219ddbbc428f619515952c1474e9096.tar.bz2 scummvm-rg350-804910c42219ddbbc428f619515952c1474e9096.zip |
- 0.13.x friendly ;-)
- new GUI/themes
- no more funky colors!
- load/delete saved games
- cleaned-up Makefile.PS2 :
- dropped multiple extra paths
- dropped deprecated deps (UCL, MPEG2)
- all possible devices are supported to store, play and save games:
- CD
- HD
- USB
- MC
- REMOTE ! (this could actually be anywhere on the internet
as long as you run "ps2client listen" on the machine on
the other side that hosts the games)
- tested from :
- ps2link
- uLE
- toxicOS
- tested with:
- bass
- bs1
- mi1
- comi
- indy4
- ft
- ite
- ihnm
- elvira1
- dig
- kyra
- lure
- simon2
- goblins1
Played all those games in 1 session using RTL. Very smooth,
sub-second RTL experience. No crash!
- new PAL/NTSC detection : we are now reading the flavor from PS2 ROM,
it should work on all PS2 slim too
- new PAL TV centering : no more missing chunk of games on top/bottom
- we can now read the savefiles from Linux/SDL and other backends!
if you add that you can read them from remote together with the
games that you already have there, you can imagine the fun ;-)
- we fully implement RTL with every games/engine
- we nicely reboot / shutdown on quit
- fully support for themes/savegames paths. Run from MC, play the
games on remote and store your data on USB or HD. No limits!
- universal write/read for every media (of course no write on CD/DVD!)
- fully async / DMA read-write access to every media (even MC!)
- optimized cache/read-ahead for every media - now COMI is fast and
enjoyable from remote as it is from CD ;-)
- non polluting MC storage, just 1 folder + 1 icon, so that you can
copy all your settings / saved games to another MC in one go!
svn-id: r39102
Diffstat (limited to 'backends/platform/ps2/icon.cpp')
-rw-r--r-- | backends/platform/ps2/icon.cpp | 60 |
1 files changed, 50 insertions, 10 deletions
diff --git a/backends/platform/ps2/icon.cpp b/backends/platform/ps2/icon.cpp index bc30c5290d..9b88d0bb68 100644 --- a/backends/platform/ps2/icon.cpp +++ b/backends/platform/ps2/icon.cpp @@ -23,36 +23,40 @@ * */ -#include "backends/platform/ps2/savefilemgr.h" -#include "backends/platform/ps2/Gs2dScreen.h" -#include "backends/platform/ps2/GsDefs.h" +#include "Gs2dScreen.h" +#include "GsDefs.h" -const iconIVECTOR Ps2SaveFileManager::_bgcolor[4] = { +#include <libmc.h> +#include "icon.h" + +const char _info[] = "ScummVM\nFolder"; + +const iconIVECTOR _bgcolor[4] = { { 68, 23, 116, 0 }, // top left { 255, 255, 255, 0 }, // top right { 255, 255, 255, 0 }, // bottom left { 68, 23, 116, 0 }, // bottom right }; -const iconFVECTOR Ps2SaveFileManager::_lightdir[3] = { +const iconFVECTOR _lightdir[3] = { { 0.5, 0.5, 0.5, 0.0 }, { 0.0,-0.4,-0.1, 0.0 }, {-0.5,-0.5, 0.5, 0.0 }, }; -const iconFVECTOR Ps2SaveFileManager::_lightcol[3] = { +const iconFVECTOR _lightcol[3] = { { 0.3, 0.3, 0.3, 0.00 }, { 0.4, 0.4, 0.4, 0.00 }, { 0.5, 0.5, 0.5, 0.00 }, }; -const iconFVECTOR Ps2SaveFileManager::_ambient = { 0.50, 0.50, 0.50, 0.00 }; +const iconFVECTOR _ambient = { 0.50, 0.50, 0.50, 0.00 }; -// Source File: stdico2.rle +// Source File: stdico2.rle // Orig. Offset: 0 / 0x00000000 -// Length: 14018 / 0x000036C2 (bytes) +// Length: 14018 / 0x000036C2 (bytes) -const uint8 Ps2SaveFileManager::_rleIcoData[14018] = { +const uint8 _rleIcoData[14018] = { 0xCC, 0x41, 0x00, 0x00, 0xCC, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x24, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x00, 0xF7, 0x00, 0xFE, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0x7F, 0x7F, @@ -932,4 +936,40 @@ const uint8 Ps2SaveFileManager::_rleIcoData[14018] = { 0x00, 0x00 }; +uint16 PS2Icon::decompressData(uint16 **data) { + uint16 inPos = 1; + uint16 *rleData = (uint16*)_rleIcoData; + uint16 resSize = rleData[0]; + uint16 *resData = (uint16*)malloc(resSize * sizeof(uint16)); + uint16 outPos = 0; + + while (outPos < resSize) { + uint16 len = rleData[inPos++]; + while (len--) + resData[outPos++] = 0x7FFF; + len = rleData[inPos++]; + while (len--) + resData[outPos++] = rleData[inPos++]; + } + assert(outPos == resSize); + + *data = resData; + return resSize; +} +void PS2Icon::setup(mcIcon *icon) { + char title[256]; + memset(icon, 0, sizeof(mcIcon)); + memcpy(icon->head, "PS2D", 4); + icon->nlOffset = strlen(_info) + 1; + strcpy(title, _info); + strcpy_sjis((short*)&(icon->title), title); + icon->trans = 0x10; + memcpy(icon->bgCol, _bgcolor, sizeof(_bgcolor)); + memcpy(icon->lightDir, _lightdir, sizeof(_lightdir)); + memcpy(icon->lightCol, _lightcol, sizeof(_lightcol)); + memcpy(icon->lightAmbient, _ambient, sizeof(_ambient)); + strcpy((char*)icon->view, "scummvm.icn"); + strcpy((char*)icon->copy, "scummvm.icn"); + strcpy((char*)icon->del, "scummvm.icn"); +} |