mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 00:41:12 +00:00
PalmOS : ARM optimization
svn-id: r18755
This commit is contained in:
parent
20e088801e
commit
6b63495d5d
@ -29,7 +29,7 @@
|
||||
#include "scumm/usage_bits.h"
|
||||
#include "scumm/wiz_he.h"
|
||||
|
||||
#if defined(__PALM_OS__)
|
||||
#if defined(PALMOS_68K)
|
||||
#include "arm/native.h"
|
||||
#include "arm/macros.h"
|
||||
#endif
|
||||
@ -80,7 +80,7 @@ struct TransitionEffect {
|
||||
byte stripTable[16]; // ditto
|
||||
};
|
||||
|
||||
#ifdef __PALM_OS__
|
||||
#ifdef PALMOS_68K
|
||||
static const TransitionEffect *transitionEffects;
|
||||
#else
|
||||
static const TransitionEffect transitionEffects[6] = {
|
||||
@ -540,7 +540,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
|
||||
byte *dst = _compositeBuf + x + y * _screenWidth;
|
||||
const byte *text = (byte *)_charset->_textSurface.pixels + x + y * _charset->_textSurface.pitch;
|
||||
|
||||
#ifdef __PALM_OS__
|
||||
#ifdef PALMOS_68K
|
||||
ARM_START(DrawStripType)
|
||||
ARM_INIT(SCUMM_DRAWSTRIP)
|
||||
ARM_ADDM(width)
|
||||
@ -550,7 +550,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
|
||||
ARM_ADDM(text)
|
||||
ARM_ADDV(_vm_screenWidth, _screenWidth)
|
||||
ARM_ADDV(vs_pitch, vs->pitch)
|
||||
ARM_ADDV(_charset->_textSurface_pitch, _charset->_textSurface.pitch)
|
||||
ARM_ADDV(_charset_textSurface_pitch, _charset->_textSurface.pitch)
|
||||
ARM_CALL(ARM_ENGINE, PNO_DATA())
|
||||
ARM_CONTINUE()
|
||||
#endif
|
||||
@ -604,6 +604,20 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
|
||||
// Odd lines have colors swapped, so there will be checkered patterns.
|
||||
// But apparently there is a mistake for 10th color.
|
||||
void ScummEngine::ditherCGA(byte *dst, int dstPitch, int x, int y, int width, int height) const {
|
||||
#ifdef PALMOS_68K
|
||||
ARM_START(RenderCGAType)
|
||||
ARM_INIT(SCUMM_RENDERCGA)
|
||||
ARM_ADDM(dst)
|
||||
ARM_ADDM(dstPitch)
|
||||
ARM_ADDM(x)
|
||||
ARM_ADDM(y)
|
||||
ARM_ADDM(width)
|
||||
ARM_ADDM(height)
|
||||
ARM_ADDV(_version, _version)
|
||||
ARM_CALL(ARM_ENGINE, PNO_DATA())
|
||||
ARM_END()
|
||||
#endif
|
||||
|
||||
byte *ptr;
|
||||
int idx1, idx2;
|
||||
static const byte cgaDither[2][2][16] = {
|
||||
@ -638,6 +652,20 @@ void ScummEngine::ditherCGA(byte *dst, int dstPitch, int x, int y, int width, in
|
||||
// cccc1
|
||||
// dddd0
|
||||
void ScummEngine::ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *width, int *height) const {
|
||||
#ifdef PALMOS_68K
|
||||
ARM_START(RenderHercType)
|
||||
ARM_INIT(SCUMM_RENDERHERC)
|
||||
ARM_ADDM(src)
|
||||
ARM_ADDM(hercbuf)
|
||||
ARM_ADDM(srcPitch)
|
||||
ARM_ADDM(x)
|
||||
ARM_ADDM(y)
|
||||
ARM_ADDM(width)
|
||||
ARM_ADDM(height)
|
||||
ARM_CALL(ARM_ENGINE, PNO_DATA())
|
||||
ARM_END()
|
||||
#endif
|
||||
|
||||
byte *srcptr, *dstptr;
|
||||
int xo = *x, yo = *y, widtho = *width, heighto = *height;
|
||||
int idx1, idx2, dsty = 0, y1;
|
||||
@ -1405,7 +1433,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
|
||||
|
||||
bottom = y + height;
|
||||
if (bottom > vs->h) {
|
||||
error("Gdi::drawBitmap, strip drawn to %d below window bottom %d", bottom, vs->h);
|
||||
warning("Gdi::drawBitmap, strip drawn to %d below window bottom %d", bottom, vs->h);
|
||||
}
|
||||
|
||||
_vertStripNextInc = height * vs->pitch - 1;
|
||||
@ -1625,7 +1653,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) {
|
||||
fill(dst, vs->pitch, *bmap_ptr, vs->w, vs->h);
|
||||
break;
|
||||
default:
|
||||
// Alternayive russian freddi3 uses badly formatted bitmaps
|
||||
// Alternative russian freddi3 uses badly formatted bitmaps
|
||||
debug(0, "Gdi::drawBMAPBg: default case %d", code);
|
||||
}
|
||||
|
||||
@ -3005,7 +3033,7 @@ void ScummEngine::transitionEffect(int a) {
|
||||
* dissolveEffect(virtsrc[0].width, 1) produces a line-by-line dissolve
|
||||
*/
|
||||
void ScummEngine::dissolveEffect(int width, int height) {
|
||||
#ifdef __PALM_OS__
|
||||
#ifdef PALMOS_68K
|
||||
// Remove this dissolve effect for now on PalmOS since it is a bit
|
||||
// too slow using 68k emulation
|
||||
if (width == 1 && height == 1) {
|
||||
@ -3226,7 +3254,7 @@ void ScummEngine::unkScreenEffect6() {
|
||||
|
||||
} // End of namespace Scumm
|
||||
|
||||
#ifdef __PALM_OS__
|
||||
#ifdef PALMOS_68K
|
||||
#include "scumm_globals.h"
|
||||
|
||||
_GINIT(Gfx)
|
||||
@ -3238,3 +3266,4 @@ _GRELEASEPTR(GBVARS_TRANSITIONEFFECTS_INDEX, GBVARS_SCUMM)
|
||||
_GEND
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user