[Scummvm-cvs-logs] SF.net SVN: scummvm:[43614] scummvm/trunk
robinwatts at users.sourceforge.net
robinwatts at users.sourceforge.net
Sat Aug 22 00:29:28 CEST 2009
Revision: 43614
http://scummvm.svn.sourceforge.net/scummvm/?rev=43614&view=rev
Author: robinwatts
Date: 2009-08-21 22:29:28 +0000 (Fri, 21 Aug 2009)
Log Message:
-----------
Attempt to fix builds that use the ARM screen column clear code; add new
bitdepth argument that was missing in ARM builds previously.
Also fix a few warnings.
Also fix the WinCE build which fails in the SDL init call with a missing
bitdepth field.
Untested at this point (build certainly gets further than before). Committing
this seems reasonable, as it can't make it any worse :)
Modified Paths:
--------------
scummvm/trunk/backends/platform/wince/wince-sdl.cpp
scummvm/trunk/backends/platform/wince/wince-sdl.h
scummvm/trunk/engines/scumm/gfx.cpp
scummvm/trunk/engines/scumm/gfxARM.s
scummvm/trunk/engines/scumm/he/sound_he.cpp
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2009-08-21 22:25:55 UTC (rev 43613)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2009-08-21 22:29:28 UTC (rev 43614)
@@ -1084,7 +1084,7 @@
_noDoubleTapRMB = ConfMan.getBool("no_doubletap_rightclick");
}
-void OSystem_WINCE3::initSize(uint w, uint h) {
+void OSystem_WINCE3::initSize(uint w, uint h, const Graphics::PixelFormat *format) {
if (_hasSmartphoneResolution && h == 240)
h = 200; // mainly for the launcher
@@ -1120,7 +1120,7 @@
_videoMode.overlayWidth = w;
_videoMode.overlayHeight = h;
- OSystem_SDL::initSize(w, h);
+ OSystem_SDL::initSize(w, h, format);
if (_scalersChanged) {
unloadGFXMode();
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.h
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.h 2009-08-21 22:25:55 UTC (rev 43613)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.h 2009-08-21 22:29:28 UTC (rev 43614)
@@ -66,7 +66,7 @@
void internUpdateScreen();
void setGraphicsModeIntern();
- void initSize(uint w, uint h);
+ void initSize(uint w, uint h, const Graphics::PixelFormat *format);
void initBackend();
// Overloaded from SDL backend (toolbar handling)
Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp 2009-08-21 22:25:55 UTC (rev 43613)
+++ scummvm/trunk/engines/scumm/gfx.cpp 2009-08-21 22:29:28 UTC (rev 43614)
@@ -38,7 +38,7 @@
#ifdef USE_ARM_GFX_ASM
extern "C" void asmDrawStripToScreen(int height, int width, void const* text, void const* src, byte* dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch);
-extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height);
+extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height, uint8_t bitDepth);
#endif /* USE_ARM_GFX_ASM */
namespace Scumm {
@@ -784,8 +784,8 @@
}
void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h) {
- uint16 *dstL1 = (uint16 *)dst;
- uint16 *dstL2 = (uint16 *)(dst + dstPitch);
+ uint16 *dstL1 = (uint16 *)(void *)dst;
+ uint16 *dstL2 = (uint16 *)(void *)(dst + dstPitch);
const int dstAdd = dstPitch - w;
const int srcAdd = srcPitch - w;
@@ -1114,7 +1114,7 @@
#ifdef USE_ARM_GFX_ASM
-#define copy8Col(A,B,C,D) asmCopy8Col(A,B,C,D)
+#define copy8Col(A,B,C,D,E) asmCopy8Col(A,B,C,D,E)
#else
Modified: scummvm/trunk/engines/scumm/gfxARM.s
===================================================================
--- scummvm/trunk/engines/scumm/gfxARM.s 2009-08-21 22:25:55 UTC (rev 43613)
+++ scummvm/trunk/engines/scumm/gfxARM.s 2009-08-21 22:29:28 UTC (rev 43614)
@@ -126,9 +126,13 @@
@ r1 = dstPitch
@ r2 = src
@ r3 = height
- STMFD r13!,{r14}
+ @ <> = bitdepth
+ LDR r12,[r13]
+ STR r14,[r13,#-4]!
+ CMP r12,#8
+ BNE copy8Col16
+
SUB r1,r1,#4
-
TST r3,#1
ADDNE r3,r3,#1
BNE roll2
@@ -145,4 +149,33 @@
STR r14,[r0],r1
BNE yLoop2
- LDMFD r13!,{PC}
+ LDR PC,[r13],#4
+
+copy8Col16:
+ STMFD r13!,{r4-r5}
+ SUB r1,r1,#12
+ TST r3,#1
+ ADDNE r3,r3,#1
+ BNE roll3
+yLoop3:
+ LDR r4, [r2],#4
+ LDR r5, [r2],#4
+ LDR r12,[r2],#4
+ LDR r14,[r2],r1
+ STR r4, [r0],#4
+ STR r5, [r0],#4
+ STR r12,[r0],#4
+ STR r14,[r0],r1
+roll3:
+ LDR r4, [r2],#4
+ LDR r5, [r2],#4
+ LDR r12,[r2],#4
+ LDR r14,[r2],r1
+ SUBS r3,r3,#2
+ STR r4, [r0],#4
+ STR r5, [r0],#4
+ STR r12,[r0],#4
+ STR r14,[r0],r1
+ BNE yLoop3
+
+ LDMFD r13!,{r4,r5,PC}
Modified: scummvm/trunk/engines/scumm/he/sound_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/sound_he.cpp 2009-08-21 22:25:55 UTC (rev 43613)
+++ scummvm/trunk/engines/scumm/he/sound_he.cpp 2009-08-21 22:29:28 UTC (rev 43614)
@@ -645,7 +645,7 @@
Audio::AudioStream *voxStream = Audio::makeADPCMStream(&stream, false, size, Audio::kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign);
sound = (char *)malloc(size * 4);
- size = voxStream->readBuffer((int16*)sound, size * 2);
+ size = voxStream->readBuffer((int16*)(void *)sound, size * 2);
size *= 2; // 16bits.
delete voxStream;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list