* Add grabRawScreen() method.

* Add Launcher icon.
* Fix trunk compile.

svn-id: r23501
This commit is contained in:
Won Star 2006-07-14 16:11:30 +00:00
parent 21fe8bad88
commit d3a4d86158
11 changed files with 87 additions and 75 deletions

View file

@ -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 $< $@

View file

@ -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};

View file

@ -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;

View file

@ -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;
@ -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);

View file

@ -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();

View file

@ -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];

View file

@ -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;
}

View file

@ -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];

View file

@ -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;

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB