diff options
author | Won Star | 2006-07-14 16:11:30 +0000 |
---|---|---|
committer | Won Star | 2006-07-14 16:11:30 +0000 |
commit | d3a4d86158b072eca8eb196d51ccbd1d10f0a99a (patch) | |
tree | 4ef634880966f42719ae5b573c18fb565ce5e376 /backends/platform/gp32 | |
parent | 21fe8bad8807fefb644572284cb6808689b04eea (diff) | |
download | scummvm-rg350-d3a4d86158b072eca8eb196d51ccbd1d10f0a99a.tar.gz scummvm-rg350-d3a4d86158b072eca8eb196d51ccbd1d10f0a99a.tar.bz2 scummvm-rg350-d3a4d86158b072eca8eb196d51ccbd1d10f0a99a.zip |
* Add grabRawScreen() method.
* Add Launcher icon.
* Fix trunk compile.
svn-id: r23501
Diffstat (limited to 'backends/platform/gp32')
-rw-r--r-- | backends/platform/gp32/Makefile | 53 | ||||
-rw-r--r-- | backends/platform/gp32/gp32_launcher.cpp | 12 | ||||
-rw-r--r-- | backends/platform/gp32/gp32_main.cpp | 10 | ||||
-rw-r--r-- | backends/platform/gp32/gp32_osys.cpp | 52 | ||||
-rw-r--r-- | backends/platform/gp32/gp32_osys.h | 11 | ||||
-rw-r--r-- | backends/platform/gp32/gp32std.cpp | 6 | ||||
-rw-r--r-- | backends/platform/gp32/gp32std_file.cpp | 2 | ||||
-rw-r--r-- | backends/platform/gp32/gp32std_grap.cpp | 6 | ||||
-rw-r--r-- | backends/platform/gp32/gp32std_input.cpp | 4 | ||||
-rw-r--r-- | backends/platform/gp32/gp32std_memory.cpp | 6 | ||||
-rw-r--r-- | backends/platform/gp32/scummvm.bmp | bin | 0 -> 2104 bytes |
11 files changed, 87 insertions, 75 deletions
diff --git a/backends/platform/gp32/Makefile b/backends/platform/gp32/Makefile index d61e8cb295..67595961b0 100644 --- a/backends/platform/gp32/Makefile +++ b/backends/platform/gp32/Makefile @@ -62,9 +62,9 @@ LIBS += -L$(GPSDK)/lib \ -lgpmem -lgpos -lgpstdio -lgpstdlib -lgpsound -lgpgraphic -lgpfont \ -lm -lc -lgcc -INCLUDES += -Ibackends/gp32 -Iengines -I$(GPSDK)/include +INCLUDES += -Ibackends/platform/gp32 -Iengines -I$(GPSDK)/include -MODULES += backends/gp32 +MODULES += backends/platform/gp32 # Outputs EXEEXT = .elf @@ -83,18 +83,18 @@ DEFINES += -DDISABLE_FANCY_THEMES # Support libtremor. #DEFINES += -DUSE_VORBIS -DUSE_TREMOR -DGP32_SDK -#INCLUDES += -Ibackends/gp32/gptremor -#LIBS += -Lbackends/gp32/gptremor -lgptremor +#INCLUDES += -Ibackends/platform/gp32/gptremor +#LIBS += -Lbackends/platform/gp32/gptremor -lgptremor # Support libmad. #DEFINES += -DUSE_MAD -#INCLUDES += -Ibackends/gp32/gpmad -#LIBS += -Lbackends/gp32/gpmad -lgpmad +#INCLUDES += -Ibackends/platform/gp32/gpmad +#LIBS += -Lbackends/platform/gp32/gpmad -lgpmad # Support libminilzo. #DEFINES += -DUSE_MINILZO -#INCLUDES += -Ibackends/gp32/minilzo -#LIBS += -Lbackends/gp32/minilzo -lminilzo +#INCLUDES += -Ibackends/platform/gp32/minilzo +#LIBS += -Lbackends/platform/gp32/minilzo -lminilzo # Support for 8:3 save files names (The GP32 uses FAT12/16 (no vFAT) for the file system). DEFINES += -DSHORT_SAVENAMES @@ -112,34 +112,33 @@ DEFINES += -DOUTPUT_UNSIGNED_AUDIO # This builds in the GP32 GDB USB Stub. Don't use it unless you know what your doing. # You also need to remove ANY optemisation from the compiler flags. #DEFINES += -DGP32_GDB -#OBJS += backends/gp32/debug-gdbstub-usb.o +#OBJS += backends/platform/gp32/debug-gdbstub-usb.o # Standard librarys and optimization modules -OBJS += backends/gp32/startup.o \ - backends/gp32/memcpy.o \ - backends/gp32/gp_asmlib.o \ - backends/gp32/gp_clipped.o \ - backends/gp32/fontdata.o +OBJS += backends/platform/gp32/startup.o \ + backends/platform/gp32/memcpy.o \ + backends/platform/gp32/gp_asmlib.o \ + backends/platform/gp32/gp_clipped.o \ + backends/platform/gp32/fontdata.o # Custom GP32 std library -OBJS += backends/gp32/gp32std.o \ - backends/gp32/gp32std_file.o \ - backends/gp32/gp32std_grap.o \ - backends/gp32/gp32std_input.o \ - backends/gp32/gp32std_memory.o \ - backends/gp32/gp32std_sound.o \ - #backends/gp32/dmaaudio_asm.o \ - #backends/gp32/dmaaudio.o \ +OBJS += backends/platform/gp32/gp32std.o \ + backends/platform/gp32/gp32std_file.o \ + backends/platform/gp32/gp32std_grap.o \ + backends/platform/gp32/gp32std_input.o \ + backends/platform/gp32/gp32std_memory.o \ + backends/platform/gp32/gp32std_sound.o \ + #backends/platform/gp32/dmaaudio_asm.o \ + #backends/platform/gp32/dmaaudio.o \ #Main ScummVM for the GP32 Backend -OBJS += backends/gp32/gp32_main.o \ - backends/gp32/gp32_launcher.o \ - backends/gp32/gp32_osys.o \ +OBJS += backends/platform/gp32/gp32_main.o \ + backends/platform/gp32/gp32_launcher.o \ + backends/platform/gp32/gp32_osys.o \ backends/fs/gp32/gp32-fs.o $(FXE): $(BIN) - $(FXETOOL) -f -a "The ScummVM Team" -t "ScummVM for the GP32" $< $@ -# $(FXETOOL) -f -a "The ScummVM Team" -t "ScummVM for the GP32" -b scummvm.bmp $< $@ + $(FXETOOL) -f -a "The ScummVM Team" -t "ScummVM for the GP32" -b backends/platform/gp32/scummvm.bmp $< $@ $(BIN): scummvm$(EXEEXT) $(OBJCOPY) -O binary $< $@ diff --git a/backends/platform/gp32/gp32_launcher.cpp b/backends/platform/gp32/gp32_launcher.cpp index c7061590d2..29af6288f5 100644 --- a/backends/platform/gp32/gp32_launcher.cpp +++ b/backends/platform/gp32/gp32_launcher.cpp @@ -28,13 +28,13 @@ #include "base/engine.h" -#include "backends/gp32/gp32std.h" -#include "backends/gp32/gp32std_grap.h" -#include "backends/gp32/gp32std_input.h" +#include "gp32std.h" +#include "gp32std_grap.h" +#include "gp32std_input.h" +#include "gp32_launcher.h" -#include "backends/gp32/gfx_splash.h" -#include "backends/gp32/gp32_launcher.h" -#include "backends/gp32/globals.h" +#include "gfx_splash.h" +#include "globals.h" uint16 cpuSpeedTable[15] = {40, 66, 100, 120, 133, 144, 156, 160, 166, 172, 176, 180, 188, 192, 200}; uint16 gammaTable[16] = {5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000}; diff --git a/backends/platform/gp32/gp32_main.cpp b/backends/platform/gp32/gp32_main.cpp index 5d0442b8c6..58be117c99 100644 --- a/backends/platform/gp32/gp32_main.cpp +++ b/backends/platform/gp32/gp32_main.cpp @@ -28,12 +28,12 @@ #include "base/main.h" -#include "backends/gp32/gp32std.h" -#include "backends/gp32/gp32std_grap.h" +#include "gp32std.h" +#include "gp32std_grap.h" -#include "backends/gp32/gp32_launcher.h" -#include "backends/gp32/gp32_osys.h" -#include "backends/gp32/globals.h" +#include "gp32_launcher.h" +#include "gp32_osys.h" +#include "globals.h" GlobalVars g_vars; diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp index 68adfb3576..9f3350d752 100644 --- a/backends/platform/gp32/gp32_osys.cpp +++ b/backends/platform/gp32/gp32_osys.cpp @@ -23,17 +23,17 @@ * */ -#include "backends/gp32/gp32_osys.h" - #include "stdafx.h" #include "common/scummsys.h" #include "common/system.h" -#include "backends/gp32/globals.h" - #include "common/rect.h" #include "common/savefile.h" #include "common/config-manager.h" +#include "graphics/surface.h" + +#include "gp32_osys.h" +#include "globals.h" static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { {0, 0, 0} @@ -150,7 +150,7 @@ int16 OSystem_GP32::getWidth() { } void OSystem_GP32::setPalette(const byte *colors, uint start, uint num) { - NP("OSys::setPalette()"); + //NP("OSys::setPalette()"); const byte *b = colors; uint i; uint16 *base = _currentPalette + start; @@ -171,7 +171,7 @@ void OSystem_GP32::grabPalette(byte *colors, uint start, uint num) { } void OSystem_GP32::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { - NP("OSys::copyRectToScreen()"); + //NP("OSys::copyRectToScreen()"); //Clip the coordinates if (x < 0) { w += x; @@ -209,6 +209,16 @@ void OSystem_GP32::copyRectToScreen(const byte *src, int pitch, int x, int y, in } } +bool OSystem_GP32::grabRawScreen(Graphics::Surface *surf) { + assert(surf); + + surf->create(_screenWidth, _screenHeight, 1); + + memcpy(surf->pixels, _gameScreen, _screenWidth * _screenHeight); + + return true; +} + //TODO: Implement Dirty rect? void OSystem_GP32::updateScreen() { uint16 *buffer; @@ -222,7 +232,7 @@ void OSystem_GP32::updateScreen() { } buffer += 240 - _screenHeight; } - + // draw overlay if (_overlayVisible) { buffer = &_tmpScreen[240 - _overlayHeight]; @@ -257,17 +267,17 @@ void OSystem_GP32::updateScreen() { } void OSystem_GP32::setShakePos(int shakeOffset) { - NP("OSys::setShakePos()"); + //NP("OSys::setShakePos()"); } void OSystem_GP32::showOverlay() { - NP("OSys::showOverlay()"); + //NP("OSys::showOverlay()"); _overlayVisible = true; clearOverlay(); } void OSystem_GP32::hideOverlay() { - NP("OSys::hideOverlay()"); + //NP("OSys::hideOverlay()"); _overlayVisible = false; clearOverlay(); _forceFull = true; @@ -276,7 +286,7 @@ void OSystem_GP32::hideOverlay() { // Clear overlay with game screen //TODO: Optimize? void OSystem_GP32::clearOverlay() { - NP("OSys::clearOverlay()"); + //NP("OSys::clearOverlay()"); if (!_overlayVisible) return; @@ -295,7 +305,7 @@ void OSystem_GP32::clearOverlay() { } void OSystem_GP32::grabOverlay(OverlayColor *buf, int pitch) { - NP("OSys::grabOverlay()"); + //NP("OSys::grabOverlay()"); int h = _overlayHeight; OverlayColor *src = _overlayBuffer; @@ -307,7 +317,7 @@ void OSystem_GP32::grabOverlay(OverlayColor *buf, int pitch) { } void OSystem_GP32::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { - NP("OSys::copyRectToOverlay()"); + //NP("OSys::copyRectToOverlay()"); //Clip the coordinates if (x < 0) { @@ -376,7 +386,7 @@ bool OSystem_GP32::showMouse(bool visible) { } void OSystem_GP32::warpMouse(int x, int y) { - NP("OSys::warpMouse()"); + //NP("OSys::warpMouse()"); //assert(x > 0 && x < _screenWidth); //assert(y > 0 && y < _screenHeight); _mouseX = x; @@ -384,7 +394,7 @@ void OSystem_GP32::warpMouse(int x, int y) { } void OSystem_GP32::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int cursorTargetScale) { - NP("OSys::setMouseCursor()"); + //NP("OSys::setMouseCursor()"); _mouseWidth = w; _mouseHeight = h; @@ -484,7 +494,7 @@ void OSystem_GP32::fillMouseEvent(Event &event, int x, int y) { } bool OSystem_GP32::pollEvent(Event &event) { - NP("OSys::pollEvent()"); + //NP("OSys::pollEvent()"); GP32BtnEvent ev; handleKbdMouse(); @@ -651,7 +661,7 @@ static void _timerCallbackVoid() { } void OSystem_GP32::setTimerCallback(TimerProc callback, int interval) { - NP("OSys::setTimerCallback()"); + //NP("OSys::setTimerCallback()"); int timerNo = 1; @@ -688,7 +698,7 @@ void OSystem_GP32::deleteMutex(MutexRef mutex) { } bool OSystem_GP32::setSoundCallback(SoundProc proc, void *param) { - NP("OSys::setSoundCallback()"); + //NP("OSys::setSoundCallback()"); GPSOUNDBUF gpSoundBuf; @@ -744,18 +754,18 @@ bool OSystem_GP32::setSoundCallback(SoundProc proc, void *param) { } void OSystem_GP32::clearSoundCallback() { - NP("OSys::clearSoundCallback()"); + //NP("OSys::clearSoundCallback()"); if (_samplesPerSec != 0) gp_soundBufStop(); } int OSystem_GP32::getOutputSampleRate() const { - NP("OSys::getOutputSampleRate()"); + //NP("OSys::getOutputSampleRate()"); return _samplesPerSec; } void OSystem_GP32::quit() { - NP("OSys::quit()"); + //NP("OSys::quit()"); clearSoundCallback(); setTimerCallback(0, 0); exit(0); diff --git a/backends/platform/gp32/gp32_osys.h b/backends/platform/gp32/gp32_osys.h index 2986263424..22b0a6330d 100644 --- a/backends/platform/gp32/gp32_osys.h +++ b/backends/platform/gp32/gp32_osys.h @@ -34,10 +34,10 @@ #include "base/engine.h" -#include "backends/gp32/gp32std.h" -#include "backends/gp32/gp32std_grap.h" -#include "backends/gp32/gp32std_input.h" -#include "backends/gp32/gp32std_sound.h" +#include "gp32std.h" +#include "gp32std_grap.h" +#include "gp32std_input.h" +#include "gp32std_sound.h" class OSystem_GP32 : public OSystem { public: @@ -110,6 +110,9 @@ public: void clearOverlay(); void grabOverlay(OverlayColor *buf, int pitch); void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + + bool grabRawScreen(Graphics::Surface *surf); + int16 getOverlayHeight(); int16 getOverlayWidth(); diff --git a/backends/platform/gp32/gp32std.cpp b/backends/platform/gp32/gp32std.cpp index d6befb1367..ab6bfd6450 100644 --- a/backends/platform/gp32/gp32std.cpp +++ b/backends/platform/gp32/gp32std.cpp @@ -31,9 +31,9 @@ #include "base/engine.h" -#include "backends/gp32/gp32std.h" -#include "backends/gp32/gp32std_grap.h" -#include "backends/gp32/gp32std_memory.h" +#include "gp32std.h" +#include "gp32std_grap.h" +#include "gp32std_memory.h" #define DEBUG_MAX 5 char debline[DEBUG_MAX][256]; diff --git a/backends/platform/gp32/gp32std_file.cpp b/backends/platform/gp32/gp32std_file.cpp index eb0d71c61d..0f4e16fc24 100644 --- a/backends/platform/gp32/gp32std_file.cpp +++ b/backends/platform/gp32/gp32std_file.cpp @@ -81,7 +81,7 @@ GPFILE *gp_fopen(const char *fileName, const char *openMode) { } if (err) { - printf("gp_gopen(): IO error %d", err); + printf("gp_fopen(): IO error %d", err); delete file; return NULL; } diff --git a/backends/platform/gp32/gp32std_grap.cpp b/backends/platform/gp32/gp32std_grap.cpp index 04ac81a6a2..d65b2f872a 100644 --- a/backends/platform/gp32/gp32std_grap.cpp +++ b/backends/platform/gp32/gp32std_grap.cpp @@ -26,10 +26,10 @@ #include "common/system.h" #include "backends/intern.h" -#include "backends/gp32/gp32std.h" -#include "backends/gp32/gp32std_grap.h" +#include "gp32std.h" +#include "gp32std_grap.h" -#include "backends/gp32/globals.h" +#include "globals.h" GPDRAWSURFACE lcdSurface[2]; diff --git a/backends/platform/gp32/gp32std_input.cpp b/backends/platform/gp32/gp32std_input.cpp index 99c1329eae..3d808e987e 100644 --- a/backends/platform/gp32/gp32std_input.cpp +++ b/backends/platform/gp32/gp32std_input.cpp @@ -26,8 +26,8 @@ #include "stdafx.h" #include "common/scummsys.h" -#include "backends/gp32/gp32std.h" -#include "backends/gp32/gp32std_input.h" +#include "gp32std.h" +#include "gp32std_input.h" static uint32 buttonState = 0; static uint16 buttonPressState = 0; diff --git a/backends/platform/gp32/gp32std_memory.cpp b/backends/platform/gp32/gp32std_memory.cpp index 422c46b00d..10a831d1f0 100644 --- a/backends/platform/gp32/gp32std_memory.cpp +++ b/backends/platform/gp32/gp32std_memory.cpp @@ -31,9 +31,9 @@ #include "base/engine.h" -#include "backends/gp32/gp32std.h" -#include "backends/gp32/gp32std_grap.h" -#include "backends/gp32/gp32std_memory.h" +#include "gp32std.h" +#include "gp32std_grap.h" +#include "gp32std_memory.h" ///////////////////// //Memory management diff --git a/backends/platform/gp32/scummvm.bmp b/backends/platform/gp32/scummvm.bmp Binary files differnew file mode 100644 index 0000000000..4f9dce2eb7 --- /dev/null +++ b/backends/platform/gp32/scummvm.bmp |