aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/wince/wince-sdl.cpp4
-rw-r--r--backends/platform/wince/wince-sdl.h2
-rw-r--r--engines/scumm/gfx.cpp8
-rw-r--r--engines/scumm/gfxARM.s39
-rw-r--r--engines/scumm/he/sound_he.cpp2
5 files changed, 44 insertions, 11 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 65082014da..ab7860dd85 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -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();
diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h
index deafde6d80..7b4d0f2b25 100644
--- a/backends/platform/wince/wince-sdl.h
+++ b/backends/platform/wince/wince-sdl.h
@@ -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)
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 1802d0d39c..c6e2cd3312 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -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
diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s
index f3a1f20303..adcd4bfac5 100644
--- a/engines/scumm/gfxARM.s
+++ b/engines/scumm/gfxARM.s
@@ -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}
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 01f29d5db9..feaf273b4e 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -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;