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 :)

svn-id: r43614
This commit is contained in:
Robin Watts
2009-08-21 22:29:28 +00:00
parent edc8ffdaba
commit 894635e91d
5 changed files with 44 additions and 11 deletions
+2 -2
View File
@@ -1084,7 +1084,7 @@ void OSystem_WINCE3::update_game_settings() {
_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 @@ void OSystem_WINCE3::initSize(uint w, uint h) {
_videoMode.overlayWidth = w;
_videoMode.overlayHeight = h;
OSystem_SDL::initSize(w, h);
OSystem_SDL::initSize(w, h, format);
if (_scalersChanged) {
unloadGFXMode();
+1 -1
View File
@@ -66,7 +66,7 @@ public:
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)
+4 -4
View File
@@ -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 ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid
}
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 @@ static void fill(byte *dst, int dstPitch, uint16 color, int w, int h, uint8 bitD
#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
+36 -3
View File
@@ -126,9 +126,13 @@ asmCopy8Col:
@ r1 = dstPitch
@ r2 = src
@ r3 = height
STMFD r13!,{r14}
SUB r1,r1,#4
@ <> = 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 @@ roll2:
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}
+1 -1
View File
@@ -645,7 +645,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
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;