diff options
Diffstat (limited to 'backends/platform/ds')
| -rw-r--r-- | backends/platform/ds/arm9/source/osystem_ds.cpp | 16 | ||||
| -rw-r--r-- | backends/platform/ds/arm9/source/osystem_ds.h | 8 | 
2 files changed, 12 insertions, 12 deletions
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index b72d959606..a4b9c842fc 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -280,7 +280,7 @@ void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {  #define MISALIGNED16(ptr) (((u32) (ptr) & 1) != 0) -void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_DS::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) {  	if (!_graphicsEnable) return;  	if (w <= 1) return;  	if (h < 0) return; @@ -509,13 +509,13 @@ void OSystem_DS::clearOverlay() {  //	consolePrintf("clearovl\n");  } -void OSystem_DS::grabOverlay(OverlayColor *buf, int pitch) { +void OSystem_DS::grabOverlay(void *buf, int pitch) {  //	consolePrintf("grabovl\n")  	u16 *start = DS::get16BitBackBuffer();  	for (int y = 0; y < 200; y++) {  		u16 *src = start + (y * 320); -		u16 *dest = ((u16 *) (buf)) + (y * pitch); +		u16 *dest = (u16 *)((u8 *)buf + (y * pitch));  		for (int x = 0; x < 320; x++) {  			*dest++ =  *src++; @@ -524,9 +524,9 @@ void OSystem_DS::grabOverlay(OverlayColor *buf, int pitch) {  } -void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void OSystem_DS::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) {  	u16 *bg = (u16 *) DS::get16BitBackBuffer(); -	const u16 *src = (const u16 *) buf; +	const u8 *source = (const u8 *)buf;  //	if (x + w > 256) w = 256 - x;  	//if (x + h > 256) h = 256 - y; @@ -536,7 +536,7 @@ void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, in  	for (int dy = y; dy < y + h; dy++) { - +		const u16 *src = (const u16 *)source;  		// Slow but save copy:  		for (int dx = x; dx < x + w; dx++) { @@ -546,7 +546,7 @@ void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, in  			//consolePrintf("%d,", *src);  			src++;  		} -		src += (pitch - w); +		source += pitch;  		// Fast but broken copy: (why?)  		/* @@ -580,7 +580,7 @@ bool OSystem_DS::showMouse(bool visible) {  void OSystem_DS::warpMouse(int x, int y) {  } -void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_DS::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {  	if ((w > 0) && (w < 64) && (h > 0) && (h < 64)) {  		memcpy(_cursorImage, buf, w * h);  		_cursorW = w; diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 11b0988666..a6001da764 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -98,15 +98,15 @@ protected:  public:  	void restoreHardwarePalette(); -	virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); +	virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h);  	virtual void updateScreen();  	virtual void setShakePos(int shakeOffset);  	virtual void showOverlay();  	virtual void hideOverlay();  	virtual void clearOverlay(); -	virtual void grabOverlay(OverlayColor *buf, int pitch); -	virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); +	virtual void grabOverlay(void *buf, int pitch); +	virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);  	virtual int16 getOverlayHeight();  	virtual int16 getOverlayWidth();  	virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<1555>(); } @@ -114,7 +114,7 @@ public:  	virtual bool showMouse(bool visible);  	virtual void warpMouse(int x, int y); -	virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format); +	virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format);  	virtual bool pollEvent(Common::Event &event);  	virtual uint32 getMillis();  | 
