[Scummvm-cvs-logs] SF.net SVN: scummvm: [23501] scummvm/trunk/backends/platform/gp32

wonst719 at users.sourceforge.net wonst719 at users.sourceforge.net
Thu Jul 20 22:49:31 CEST 2006


Revision: 23501
          http://svn.sourceforge.net/scummvm/?rev=23501&view=rev
Author:   wonst719
Date:     2006-07-14 09:11:30 -0700 (Fri, 14 Jul 2006)

Log Message:
-----------
* Add grabRawScreen() method.
* Add Launcher icon.
* Fix trunk compile.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/gp32/Makefile
    scummvm/trunk/backends/platform/gp32/gp32_launcher.cpp
    scummvm/trunk/backends/platform/gp32/gp32_main.cpp
    scummvm/trunk/backends/platform/gp32/gp32_osys.cpp
    scummvm/trunk/backends/platform/gp32/gp32_osys.h
    scummvm/trunk/backends/platform/gp32/gp32std.cpp
    scummvm/trunk/backends/platform/gp32/gp32std_file.cpp
    scummvm/trunk/backends/platform/gp32/gp32std_grap.cpp
    scummvm/trunk/backends/platform/gp32/gp32std_input.cpp
    scummvm/trunk/backends/platform/gp32/gp32std_memory.cpp

Added Paths:
-----------
    scummvm/trunk/backends/platform/gp32/scummvm.bmp

Modified: scummvm/trunk/backends/platform/gp32/Makefile
===================================================================
--- scummvm/trunk/backends/platform/gp32/Makefile	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/Makefile	2006-07-14 16:11:30 UTC (rev 23501)
@@ -62,9 +62,9 @@
 				-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 @@
 
 # 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 @@
 #	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 $< $@

Modified: scummvm/trunk/backends/platform/gp32/gp32_launcher.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32_launcher.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32_launcher.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -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};

Modified: scummvm/trunk/backends/platform/gp32/gp32_main.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32_main.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32_main.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -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;
 

Modified: scummvm/trunk/backends/platform/gp32/gp32_osys.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32_osys.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32_osys.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -23,18 +23,18 @@
  *
  */
 
-#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 @@
 }
 
 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::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 @@
 	}
 }
 
+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 @@
 		}
 		buffer += 240 - _screenHeight;
 	}
-	
+
 	// draw overlay
 	if (_overlayVisible) {
 		buffer = &_tmpScreen[240 - _overlayHeight];
@@ -257,17 +267,17 @@
 }
 
 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 @@
 // 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::grabOverlay(OverlayColor *buf, int pitch) {
-	NP("OSys::grabOverlay()");
+	//NP("OSys::grabOverlay()");
 	int h = _overlayHeight;
 	OverlayColor *src = _overlayBuffer;
 
@@ -307,7 +317,7 @@
 }
 
 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 @@
 }
 
 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::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 @@
 }
 
 bool OSystem_GP32::pollEvent(Event &event) {
-	NP("OSys::pollEvent()");
+	//NP("OSys::pollEvent()");
 	GP32BtnEvent ev;
 
 	handleKbdMouse();
@@ -651,7 +661,7 @@
 }
 
 void OSystem_GP32::setTimerCallback(TimerProc callback, int interval) {
-	NP("OSys::setTimerCallback()");
+	//NP("OSys::setTimerCallback()");
 
 	int timerNo = 1;
 
@@ -688,7 +698,7 @@
 }
 
 bool OSystem_GP32::setSoundCallback(SoundProc proc, void *param) {
-	NP("OSys::setSoundCallback()");
+	//NP("OSys::setSoundCallback()");
 
 	GPSOUNDBUF gpSoundBuf;
 
@@ -744,18 +754,18 @@
 }
 
 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);

Modified: scummvm/trunk/backends/platform/gp32/gp32_osys.h
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32_osys.h	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32_osys.h	2006-07-14 16:11:30 UTC (rev 23501)
@@ -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 @@
 	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();
 

Modified: scummvm/trunk/backends/platform/gp32/gp32std.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32std.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32std.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -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];

Modified: scummvm/trunk/backends/platform/gp32/gp32std_file.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32std_file.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32std_file.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -81,7 +81,7 @@
 	}
 
 	if (err) {
-		printf("gp_gopen(): IO error %d", err);
+		printf("gp_fopen(): IO error %d", err);
 		delete file;
 		return NULL;
 	}

Modified: scummvm/trunk/backends/platform/gp32/gp32std_grap.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32std_grap.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32std_grap.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -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];
 

Modified: scummvm/trunk/backends/platform/gp32/gp32std_input.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32std_input.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32std_input.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -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;

Modified: scummvm/trunk/backends/platform/gp32/gp32std_memory.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp32/gp32std_memory.cpp	2006-07-14 16:07:26 UTC (rev 23500)
+++ scummvm/trunk/backends/platform/gp32/gp32std_memory.cpp	2006-07-14 16:11:30 UTC (rev 23501)
@@ -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

Added: scummvm/trunk/backends/platform/gp32/scummvm.bmp
===================================================================
(Binary files differ)


Property changes on: scummvm/trunk/backends/platform/gp32/scummvm.bmp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream






More information about the Scummvm-git-logs mailing list