diff options
author | Chris Apers | 2005-12-03 19:18:03 +0000 |
---|---|---|
committer | Chris Apers | 2005-12-03 19:18:03 +0000 |
commit | 4e05925676036dd06a962cfa214d1d6da8e1e209 (patch) | |
tree | 89e77daaabd869af919eaa9e5601c7b1b5674eff /backends/PalmOS | |
parent | 64bfec97d947f36495241cd4b41763bbde638f85 (diff) | |
download | scummvm-rg350-4e05925676036dd06a962cfa214d1d6da8e1e209.tar.gz scummvm-rg350-4e05925676036dd06a962cfa214d1d6da8e1e209.tar.bz2 scummvm-rg350-4e05925676036dd06a962cfa214d1d6da8e1e209.zip |
Not needed anymore
svn-id: r19736
Diffstat (limited to 'backends/PalmOS')
21 files changed, 0 insertions, 993 deletions
diff --git a/backends/PalmOS/Src/arm/PNOMain.cpp b/backends/PalmOS/Src/arm/PNOMain.cpp deleted file mode 100644 index 0104f87b5a..0000000000 --- a/backends/PalmOS/Src/arm/PNOMain.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "PACEInterfaceLib.h" -#include "native.h" - -// Linker still looks for ARMlet_Main as entry point, but the -// "ARMlet" name is now officially discouraged. Compare an -// contrast to "PilotMain" for 68K applications. -#define PNO_Main ARMlet_Main - -// ------------------------ - -extern "C" -unsigned long PNO_Main( - const void *emulStateP, - void *userData68KP, - Call68KFuncType *call68KFuncP); - -unsigned long PNO_Main(const void *emulStateP, void *userData68KP, Call68KFuncType *call68KFuncP) { - PnoProc *func[] = { -#if defined(COMPILE_COMMON) - OSystem_CopyRectToScreen, - OSystem_updateScreen_widePortrait, - OSystem_updateScreen_wideLandscape, -// MemoryStream_ReadBuffer - -#elif defined(COMPILE_QUEEN) - Display_blit - -#elif defined(COMPILE_SCUMM) - Gdi_drawStripToScreen, - CostumeRenderer_proc3 - -#elif defined(COMPILE_SWORD1) - Screen_draw, - Screen_drawSprite, - Screen_fastShrink, - Screen_renderParallax, - Screen_decompressTony, - Screen_decompressRLE7, - Screen_decompressRLE0 - -#endif - }; - - // needed before making any OS calls using the - // PACEInterface library - InitPACEInterface(emulStateP, call68KFuncP); - - unsigned long retVal = 0; - PnoType *pno = (PnoType *)ByteSwap32(userData68KP); - UInt32 funcID = ReadUnaligned32(&pno->funcID); - void *dataP = (void *)ReadUnaligned32(&pno->dataP); -/* -char buf[100]; -StrIToA(buf,funcID); -WinDrawChars(buf,StrLen(buf),30,0); -*/ - retVal = func[funcID](dataP); - - return (retVal); -} diff --git a/backends/PalmOS/Src/arm/blit.cpp b/backends/PalmOS/Src/arm/blit.cpp deleted file mode 100644 index a03035209b..0000000000 --- a/backends/PalmOS/Src/arm/blit.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE BlitType -#include "macros.h" - -#define memcpy MemMove - -UInt32 Display_blit(void *userData68KP) { -// import variables - SETPTR (uint8 *, dstBuf ) - SETPTR (const uint8 *, srcBuf ) - SET16 (uint16, dstPitch ) - SET16 (uint16, srcPitch ) - SET16 (uint16, w ) - SET16 (uint16, h ) - SET8 (bool, xflip ) - SET8 (bool, masked ) -// end of import - - if (!masked) { // Unmasked always unflipped - while (h--) { - memcpy(dstBuf, srcBuf, w); - srcBuf += srcPitch; - dstBuf += dstPitch; - } - } else if (!xflip) { // Masked bitmap unflipped - while (h--) { - for(int i = 0; i < w; ++i) { - uint8 b = *(srcBuf + i); - if(b != 0) { - *(dstBuf + i) = b; - } - } - srcBuf += srcPitch; - dstBuf += dstPitch; - } - } else { // Masked bitmap flipped - while (h--) { - for(int i = 0; i < w; ++i) { - uint8 b = *(srcBuf + i); - if(b != 0) { - *(dstBuf - i) = b; - } - } - srcBuf += srcPitch; - dstBuf += dstPitch; - } - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/copyrectangle.cpp b/backends/PalmOS/Src/arm/copyrectangle.cpp deleted file mode 100644 index 0cdb93158d..0000000000 --- a/backends/PalmOS/Src/arm/copyrectangle.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE CopyRectangleType -#include "macros.h" - -UInt32 OSystem_CopyRectToScreen(void *userData68KP) { -// import variables - SETPTR (UInt8 *, dst ) - SETPTR (UInt8 *, buf ) - SET32 (UInt32, pitch ) - SET32 (UInt32, _offScreenPitch ) - SET32 (UInt32, w ) - SET32 (UInt32, h ) -// end of import - - if (w == pitch && w == _offScreenPitch) { - MemMove(dst, buf, w*h); - } else { - do { - MemMove(dst, buf, w); - dst += _offScreenPitch; - buf += pitch; - } while (--h); - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/decompressrle0.cpp b/backends/PalmOS/Src/arm/decompressrle0.cpp deleted file mode 100755 index 2ad28385e6..0000000000 --- a/backends/PalmOS/Src/arm/decompressrle0.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE CompressType -#include "macros.h" - -UInt32 Screen_decompressRLE0(void *userData68KP) { -// import variables - SETPTR (uint8 * ,src ); - SET32 (uint32 ,compSize); - SETPTR (uint8 * ,dest ); -// end of import - - uint8 *srcBufEnd = src + compSize; - while (src < srcBufEnd) { - uint8 color = *src++; - if (color) { - *dest++ = color; - } else { - uint8 skip = *src++; - MemSet(dest, skip, 0); - dest += skip; - } - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/decompressrle7.cpp b/backends/PalmOS/Src/arm/decompressrle7.cpp deleted file mode 100755 index 6674b50861..0000000000 --- a/backends/PalmOS/Src/arm/decompressrle7.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE CompressType -#include "macros.h" - -UInt32 Screen_decompressRLE7(void *userData68KP) { -// import variables - SETPTR (UInt8 * ,src ); - SET32 (UInt32, compSize); - SETPTR (UInt8 * ,dest ); -// end of import - - uint8 *compBufEnd = src + compSize; - while (src < compBufEnd) { - uint8 code = *src++; - if ((code > 127) || (code == 0)) - *dest++ = code; - else { - code++; - MemSet(dest, code, *src++); - dest += code; - } - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/decompresstony.cpp b/backends/PalmOS/Src/arm/decompresstony.cpp deleted file mode 100755 index 7b602816ac..0000000000 --- a/backends/PalmOS/Src/arm/decompresstony.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE CompressType -#include "macros.h" - -UInt32 Screen_decompressTony(void *userData68KP) { -// import variables - SETPTR (UInt8 * ,src ); - SET32 (UInt32, compSize); - SETPTR (UInt8 * ,dest ); -// end of import - - uint8 *endOfData = src + compSize; - while (src < endOfData) { - uint8 numFlat = *src++; - if (numFlat) { - MemSet(dest, numFlat, *src); - src++; - dest += numFlat; - } - if (src < endOfData) { - uint8 numNoFlat = *src++; - MemMove(dest, src, numNoFlat); - src += numNoFlat; - dest += numNoFlat; - } - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/drawsprite.cpp b/backends/PalmOS/Src/arm/drawsprite.cpp deleted file mode 100755 index f662f2176a..0000000000 --- a/backends/PalmOS/Src/arm/drawsprite.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE DrawSpriteType -#include "macros.h" - -UInt32 Screen_drawSprite(void *userData68KP) { -// import variables - SETPTR (UInt8 * ,sprData ); - SET16 (UInt16, sprHeight ); - SET16 (UInt16, sprWidth ); - SET16 (UInt16, sprPitch ); - SETPTR (UInt8 * ,dest ); - SET16 (UInt16, _scrnSizeX ); -// end of import - - for (uint16 cnty = 0; cnty < sprHeight; cnty++) { - for (uint16 cntx = 0; cntx < sprWidth; cntx++) - if (sprData[cntx]) - dest[cntx] = sprData[cntx]; - sprData += sprPitch; - dest += _scrnSizeX; - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/drawstrip.cpp b/backends/PalmOS/Src/arm/drawstrip.cpp deleted file mode 100644 index 18e9138e15..0000000000 --- a/backends/PalmOS/Src/arm/drawstrip.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE DrawStripType -#include "macros.h" - -#define CHARSET_MASK_TRANSPARENCY 253 - -UInt32 Gdi_drawStripToScreen(void *userData68KP) { -// import variables - SET32 (int ,width ) - SET32 (int ,height ) - SETPTR (const byte * ,src ) - SETPTR (byte * ,dst ) - SETPTR (const byte * ,text ) - SET32 (int ,_vm_screenWidth ) - SET16 (uint16 ,vs_pitch ) - SET16 (uint16 ,_textSurface_pitch ) -// end of import - - // Compose the text over the game graphics - for (int h = 0; h < height; ++h) { - for (int w = 0; w < width; ++w) { - if (text[w] == CHARSET_MASK_TRANSPARENCY) - dst[w] = src[w]; - else - dst[w] = text[w]; - } - src += vs_pitch; - dst += _vm_screenWidth; - text += _textSurface_pitch; - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/fastshrink.cpp b/backends/PalmOS/Src/arm/fastshrink.cpp deleted file mode 100755 index be5e385516..0000000000 --- a/backends/PalmOS/Src/arm/fastshrink.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE FastShrinkType -#include "macros.h" - -UInt32 Screen_fastShrink(void *userData68KP) { -// import variables - SETPTR (UInt8 * ,src ); - SET32 (UInt32, width ); - SET32 (UInt32, height ); - SET32 (uint32, scale ); - SETPTR (UInt8 * ,dest ); -// end of import - - uint32 resHeight = (height * scale) >> 8; - uint32 resWidth = (width * scale) >> 8; - uint32 step = 0x10000 / scale; - uint8 columnTab[160]; - uint32 res = step >> 1; - for (uint16 cnt = 0; cnt < resWidth; cnt++) { - columnTab[cnt] = (uint8)(res >> 8); - res += step; - } - - uint32 newRow = step >> 1; - uint32 oldRow = 0; - - uint8 *destPos = dest; - uint16 lnCnt; - for (lnCnt = 0; lnCnt < resHeight; lnCnt++) { - while (oldRow < (newRow >> 8)) { - oldRow++; - src += width; - } - for (uint16 colCnt = 0; colCnt < resWidth; colCnt++) { - *destPos++ = src[columnTab[colCnt]]; - } - newRow += step; - } - // scaled, now stipple shadows if there are any - for (lnCnt = 0; lnCnt < resHeight; lnCnt++) { - uint16 xCnt = lnCnt & 1; - destPos = dest + lnCnt * resWidth + (lnCnt & 1); - while (xCnt < resWidth) { - if (*destPos == 200) - *destPos = 0; - destPos += 2; - xCnt += 2; - } - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/macros.h b/backends/PalmOS/Src/arm/macros.h deleted file mode 100644 index df996b7376..0000000000 --- a/backends/PalmOS/Src/arm/macros.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef __MACROS_H__ -#define __MACROS_H__ - -#ifndef DISABLE_ARM - // macros for ARM calls - #define ARM_START(TYPE) \ - if (OPTIONS_TST(kOptDeviceARM)) { \ - TYPE dataARM; - - #define ARM_CHECK_EXEC(test) if (test) { - #define ARM_CHECK_END() } - - #define ARM_ADDP(member) dataARM.member = &member; - #define ARM_ADDM(member) dataARM.member = member; - #define ARM_ADDV(member, var) dataARM.member = var; - #define ARM_INIT(id) PnoType pno = { id, &dataARM }; - - #define ARM_GETM(member) member = dataARM.member; - #define ARM_GETV(member, var) var = dataARM.member; - - #define PNO_DATA() &pno - #define ARM_CONTINUE() } else - #define ARM_END() return; \ - } - #define ARM_END_RET(type) return (type)dataARM.armRetVal; \ - } - - #define ARM_CALL(rsc, data) ARM(rsc).alignedHeader->userDataP = (UInt32)data; \ - PceNativeCall(ARM(rsc).pnoDesc.entry, ARM(rsc).alignedHeader); - - #define ARM_CALL_RET(rsc, data) ARM(rsc).alignedHeader->userDataP = (UInt32)data; \ - dataARM.armRetVal = PceNativeCall(ARM(rsc).pnoDesc.entry, ARM(rsc).alignedHeader); - - #define ARM_CALL_VALUE(rsc, data, var) ARM(rsc).alignedHeader->userDataP = (UInt32)data; \ - var = PceNativeCall(ARM(rsc).pnoDesc.entry, ARM(rsc).alignedHeader); - -#else - // no ARM = empty definition - #define ARM_START(TYPE) - - #define ARM_CHECK_EXEC(test) - #define ARM_CHECK_END() - - #define ARM_ADDP(member) - #define ARM_ADDM(member) - #define ARM_ADDV(member, var) - #define ARM_INIT(id) - - #define ARM_DATA() - #define ARM_CONTINUE() - #define ARM_END() - #define ARM_END_RET(type) - - #define ARM_CALL(rsc, data) - #define ARM_CALL_RET(rsc, data, var) - #define ARM_CALL_VALUE(rsc, data, var) - -#endif - // New data access - #define GET_DATA(TYPE) TYPE *dataARM = (TYPE *)userData68KP; - #define GET_PTR(TYPE, var) TYPE *var = (TYPE *)ReadUnaligned32(&dataARM->var); - #define GET_32(TYPE, var) TYPE var = ReadUnaligned32(&dataARM->var); - #define GET_16(TYPE, var) TYPE var = ByteSwap16(dataARM->var); - #define GET_8(TYPE, var) TYPE var = dataARM->var; - - #define GET_PTRV(TYPE, member, var) \ - TYPE *var = (TYPE *)ReadUnaligned32(&dataARM->member); - - #define GET_XPTR(var, dst, src, TYPE) \ - dst.var = (TYPE *)ReadUnaligned32(&src->var); - - #define GET_X32(var, dst, src) \ - dst.var = ReadUnaligned32(&src->var); - - #define GET_X16(var, dst, src) \ - dst.var = ByteSwap16(src->var); - - #define GET_X8(var, dst, src) \ - dst.var = src->var; - - - - - #define _MEMBER(base, member) ((byte *)userData68KP + OffsetOf(base, member)) - # define RETVAL(member) WriteUnaligned32(_MEMBER(MAIN_TYPE, member), member) -#endif diff --git a/backends/PalmOS/Src/arm/native.h b/backends/PalmOS/Src/arm/native.h deleted file mode 100644 index 714d49c366..0000000000 --- a/backends/PalmOS/Src/arm/native.h +++ /dev/null @@ -1,200 +0,0 @@ -#ifndef _ARMNATIVE_H_ -#define _ARMNATIVE_H_ - -#include "arm/pnodefs.h" - -#ifndef __PALM_OS__ - -typedef UInt8 byte; -typedef UInt8 uint8; -typedef Int32 int32; -typedef UInt32 uint32; -typedef Int16 int16; -typedef UInt16 uint16; -typedef unsigned int uint; - -#endif - -typedef struct { - UInt32 funcID; - void *dataP; -} PnoType; - -typedef UInt32 (PnoProc)(void *); - -enum { - COMMON_COPYRECT = 0, - COMMON_WPORTRAIT, - COMMON_WLANDSCAPE, -// COMMON_SNDBUFFER -}; - -enum { - QUEEN_BLIT = 0 -}; - -enum { - SCUMM_DRAWSTRIP = 0, - SCUMM_PROC3 -}; - -enum { - SWORD1_SCREENDRAW = 0, - SWORD1_DRAWSPRITE, - SWORD1_FASTSHRINK, - SWORD1_RENDERPARALLAX, - SWORD1_DECOMPTONY, - SWORD1_DECOMPRLE7, - SWORD1_DECOMPRLE0 -}; - -// types -typedef struct { - void *srcP; - void *dstP; - UInt32 length; -} ARMPa1SndType, *ARMPa1SndPtr; - -typedef struct { - void *dst; - void *src; -} WideType; - -typedef struct { - void *dst; - const void *buf; - UInt32 pitch, _offScreenPitch; - UInt32 w, h; -} CopyRectangleType; - -typedef struct { - const byte *scaletable; - byte mask, shr; - byte repcolor; - byte replen; - int scaleXstep; - int x, y; - int scaleXindex, scaleYindex; - int skip_width; - byte *destptr; - const byte *mask_ptr; - int imgbufoffs; -} V1CodecType; - -typedef struct { - const byte *scaletable; - int32 mask, shr; - int32 repcolor; - int32 replen; - int32 scaleXstep; - int32 x, y; - int32 scaleXindex, scaleYindex; - int skip_width; - byte *destptr; - const byte *mask_ptr; -} V1Type; - -typedef struct { - void *v1; // struct v1 * - - const byte *_srcptr; - int _height; - - byte _scaleIndexX; // to be redefined, return it from the function - byte _scaleIndexY; - byte _scaleX; - byte _scaleY; - int32 _numStrips; - - int _out_pitch; - int _out_w; - int _out_h; - - byte *_shadow_table; - byte *_palette; - byte _shadow_mode; -} CostumeProc3Type; - -typedef struct { - int width; - int height; - - const byte *src; - byte *dst; - const byte *text; - - int _vm_screenWidth; - uint16 vs_pitch; - uint16 _textSurface_pitch; -} DrawStripType; - -// Queen -typedef struct { - uint8 *dstBuf; - const uint8 *srcBuf; - uint16 dstPitch; - uint16 srcPitch; - uint16 w; - uint16 h; - byte xflip; - byte masked; -} BlitType; - -// Sword1 -typedef struct { - uint8 *data; - uint32 *lineIndexes; - uint8 *_screenBuf; - uint16 _scrnSizeX; - uint16 scrnScrlX; - uint16 scrnScrlY; - uint16 paraScrlX; - uint16 paraScrlY; - uint16 scrnWidth; - uint16 scrnHeight; -} ParallaxType; - -typedef struct { - uint8 *sprData; - uint8 *dest; - uint16 sprHeight; - uint16 sprWidth; - uint16 sprPitch; - uint16 _scrnSizeX; -} DrawSpriteType; - -typedef struct { - uint8 *src; - uint8 *dest; - uint16 _scrnSizeX; - uint16 _scrnSizeY; -} DrawType; - -typedef struct { - uint8 *src; - uint8 *dest; - uint32 width; - uint32 height; - uint32 scale; -} FastShrinkType; - -typedef struct { - uint8 *src; - uint32 compSize; - uint8 *dest; -} CompressType; - -typedef struct { - int32 samples; - int32 len; - int16 *buffer; - const byte *_ptr; - int32 is16Bit; - int32 isUnsigned; - int32 isLE; -} ReadBufferType; - -// Warning : all the struct MUST be 4byte align and even -// from one member to another - -#endif diff --git a/backends/PalmOS/Src/arm/pno_common.h b/backends/PalmOS/Src/arm/pno_common.h deleted file mode 100755 index 1bc98694ba..0000000000 --- a/backends/PalmOS/Src/arm/pno_common.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef PNOCOMMON_H -#define PNOCOMMON_H - -#define COMPILE_COMMON - -unsigned long OSystem_CopyRectToScreen(void *userData68KP); -unsigned long MemoryStream_ReadBuffer(void *userData68KP); -unsigned long OSystem_updateScreen_widePortrait(void *userData68KP); -unsigned long OSystem_updateScreen_wideLandscape(void *userData68KP); - -#endif diff --git a/backends/PalmOS/Src/arm/pno_queen.h b/backends/PalmOS/Src/arm/pno_queen.h deleted file mode 100755 index 243e730fd7..0000000000 --- a/backends/PalmOS/Src/arm/pno_queen.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef PNOQUEEN_H -#define PNOQUEEN_H - -#define COMPILE_QUEEN - -unsigned long Display_blit(void *userData68KP); - -#endif diff --git a/backends/PalmOS/Src/arm/pno_scumm.h b/backends/PalmOS/Src/arm/pno_scumm.h deleted file mode 100755 index c195ce28a8..0000000000 --- a/backends/PalmOS/Src/arm/pno_scumm.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef PNOSCUMM_H -#define PNOSCUMM_H - -#define COMPILE_SCUMM - -unsigned long Gdi_drawStripToScreen(void *userData68KP); -unsigned long CostumeRenderer_proc3(void *userData68KP); - -#endif diff --git a/backends/PalmOS/Src/arm/pno_sword1.h b/backends/PalmOS/Src/arm/pno_sword1.h deleted file mode 100755 index 9c9775c57a..0000000000 --- a/backends/PalmOS/Src/arm/pno_sword1.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef PNOSWORD1_H -#define PNOSWORD1_H - -#define COMPILE_SWORD1 - -unsigned long Screen_decompressRLE0(void *userData68KP); -unsigned long Screen_decompressRLE7(void *userData68KP); -unsigned long Screen_decompressTony(void *userData68KP); -unsigned long Screen_drawSprite(void *userData68KP); -unsigned long Screen_fastShrink(void *userData68KP); -unsigned long Screen_renderParallax(void *userData68KP); -unsigned long Screen_draw(void *userData68KP); - -#endif diff --git a/backends/PalmOS/Src/arm/pnodefs.h b/backends/PalmOS/Src/arm/pnodefs.h deleted file mode 100755 index 3fda3c3635..0000000000 --- a/backends/PalmOS/Src/arm/pnodefs.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef PNODEFS_H -#define PNODEFS_H - -#include "PNOLoader.h" - -// Defined in PnoLoader, used to preinit PnoCall -typedef struct PnoEntryHeader { - UInt32 r10Value; - UInt32 pnoMainAddress; - UInt32 userDataP; -} PnoEntryHeader; - -#define ALIGN_4BYTE(addr) (((UInt32)(addr) + 3) & 0xFFFFFFFC) - -enum { - ARM_COMMON = 0, - ARM_ENGINE, - ARM_COUNT -}; - -enum { - RSC_ARMCOMMON = 100, - RSC_ARMENGINE = 101 -}; - -#endif diff --git a/backends/PalmOS/Src/arm/proc3.cpp b/backends/PalmOS/Src/arm/proc3.cpp deleted file mode 100644 index 0f7e087b76..0000000000 --- a/backends/PalmOS/Src/arm/proc3.cpp +++ /dev/null @@ -1,126 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE CostumeProc3Type -#include "macros.h" - -#define MSETPTR(type, member) v1.member = _GETPTR(v1comp, V1CodecType, member, type); -#define MSET32(type, member) v1.member = _GET32(v1comp, V1CodecType, member, type); -#define MSET8(type, member) v1.member = _GET8(v1comp, V1CodecType, member, type); - -UInt32 CostumeRenderer_proc3(void *userData68KP) { -// import variables - V1Type v1; - - SETPTRV (V1CodecType * , v1, v1comp ) - - SETPTR (const byte * ,_srcptr ) - SET32 (int ,_height ) - SET8 (byte ,_scaleIndexX ) - SET8 (byte ,_scaleIndexY ) - SET8 (byte ,_scaleX ) - SET8 (byte ,_scaleY ) - SET32 (int32 ,_numStrips ) - SET32 (int ,_out_pitch ) - SET32 (int ,_out_w ) - SET32 (int ,_out_h ) - SETPTR (byte * ,_shadow_table ) - SETPTR (byte * ,_palette ) - SET8 (byte ,_shadow_mode ) - - MSETPTR (const byte * ,scaletable ) - MSET8 (byte ,mask ) - MSET8 (byte ,shr ) - MSET8 (byte ,repcolor ) - MSET8 (byte ,replen ) - MSET32 (int ,scaleXstep ) - MSET32 (int ,x ) - MSET32 (int ,y ) - MSET32 (int ,scaleXindex ) - MSET32 (int ,scaleYindex ) - MSET32 (int ,skip_width ) - MSETPTR (byte * ,destptr ) - MSETPTR (byte * ,mask_ptr ) -// end of import - - const byte *mask, *src; - byte *dst; - byte len, maskbit; - int y; - uint color, height, pcolor; - const byte *scaleytab; - bool masked; - - y = v1.y; - src = _srcptr; - dst = v1.destptr; - len = v1.replen; - color = v1.repcolor; - height = _height; - - scaleytab = &v1.scaletable[_scaleIndexY]; - maskbit = revBitMask(v1.x & 7); - mask = v1.mask_ptr + v1.x / 8; - - if (len) - goto StartPos; - - do { - len = *src++; - color = len >> v1.shr; - len &= v1.mask; - if (!len) - len = *src++; - - do { - if (_scaleY == 255 || *scaleytab++ < _scaleY) { - masked = (y < 0 || y >= _out_h) || (v1.mask_ptr && (mask[0] & maskbit)); - - if (color && !masked) { - // FIXME: Fully implement _shadow_mode.in Sam & Max - // For now, it's enough for transparency. - if (_shadow_mode & 0x20) { - pcolor = _shadow_table[*dst]; - } else { - pcolor = _palette[color]; - if (pcolor == 13 && _shadow_table) - pcolor = _shadow_table[*dst]; - } - *dst = pcolor; - } - dst += _out_w; - mask += _numStrips; - y++; - } - if (!--height) { - if (!--v1.skip_width) - //return _scaleIndexX; - goto end_jump; - height = _height; - y = v1.y; - - scaleytab = &v1.scaletable[_scaleIndexY]; - - - if (_scaleX == 255 || v1.scaletable[_scaleIndexX] < _scaleX) { - v1.x += v1.scaleXstep; - if (v1.x < 0 || v1.x >= _out_w) - //return _scaleIndexX; - goto end_jump; - maskbit = revBitMask(v1.x & 7); - v1.destptr += v1.scaleXstep; - } - _scaleIndexX += v1.scaleXstep; - dst = v1.destptr; - mask = v1.mask_ptr + v1.x / 8; - } - StartPos:; - } while (--len); - } while (1); - -end_jump: -// v1comp->x = ByteSwap32(v1.x); -// v1comp->destptr = (byte *)ByteSwap32(v1.destptr); - - return _scaleIndexX; -} diff --git a/backends/PalmOS/Src/arm/renderparallax.cpp b/backends/PalmOS/Src/arm/renderparallax.cpp deleted file mode 100755 index 09e47076d7..0000000000 --- a/backends/PalmOS/Src/arm/renderparallax.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE ParallaxType -#include "macros.h" - -#define READ_LE_UINT32(ptr) *(const uint32 *)(ptr) - -UInt32 Screen_renderParallax(void *userData68KP) { -// import variables - SETPTR (UInt8 * ,data ); - SETPTR (UInt32 * ,lineIndexes); - SETPTR (UInt8 * ,_screenBuf ); - SET16 (UInt16, _scrnSizeX ); - SET16 (UInt16, scrnScrlX ); - SET16 (UInt16, scrnScrlY ); - SET16 (UInt16, paraScrlX ); - SET16 (UInt16, paraScrlY ); - SET16 (UInt16, scrnWidth ); - SET16 (UInt16, scrnHeight ); -// end of import - - for (uint16 cnty = 0; cnty < scrnHeight; cnty++) { - uint8 *src = data + READ_LE_UINT32(lineIndexes + cnty + paraScrlY); - uint8 *dest = _screenBuf + scrnScrlX + (cnty + scrnScrlY) * _scrnSizeX; - uint16 remain = paraScrlX; - uint16 xPos = 0; - bool copyFirst = false; - while (remain) { // skip past the first part of the parallax to get to the right scrolling position - uint8 doSkip = *src++; - if (doSkip <= remain) - remain -= doSkip; - else { - xPos = doSkip - remain; - dest += xPos; - remain = 0; - } - if (remain) { - uint8 doCopy = *src++; - if (doCopy <= remain) { - remain -= doCopy; - src += doCopy; - } else { - uint16 remCopy = doCopy - remain; - MemMove(dest, src + remain, remCopy); - dest += remCopy; - src += doCopy; - xPos = remCopy; - remain = 0; - } - } else - copyFirst = true; - } - while (xPos < scrnWidth) { - if (!copyFirst) { - if (uint8 skip = *src++) { - dest += skip; - xPos += skip; - } - } else - copyFirst = false; - if (xPos < scrnWidth) { - if (uint8 doCopy = *src++) { - if (xPos + doCopy > scrnWidth) - doCopy = scrnWidth - xPos; - MemMove(dest, src, doCopy); - dest += doCopy; - xPos += doCopy; - src += doCopy; - } - } - } - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/screendraw.cpp b/backends/PalmOS/Src/arm/screendraw.cpp deleted file mode 100755 index 846b1a4ffd..0000000000 --- a/backends/PalmOS/Src/arm/screendraw.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "native.h" -#include "endianutils.h" - -#define MAIN_TYPE DrawType -#include "macros.h" - -UInt32 Screen_draw(void *userData68KP) { -// import variables - SET16 (UInt16, _scrnSizeX ); - SET16 (UInt16, _scrnSizeY ); - SETPTR (UInt8 * ,src ); - SETPTR (UInt8 * ,dest ); -// end of import - - for (uint16 cnty = 0; cnty < _scrnSizeY; cnty++) - for (uint16 cntx = 0; cntx < _scrnSizeX; cntx++) { - if (*src) - *dest = *src; - dest++; - src++; - } - - return 0; -} diff --git a/backends/PalmOS/Src/arm/widelandscape.cpp b/backends/PalmOS/Src/arm/widelandscape.cpp deleted file mode 100644 index 917dd42228..0000000000 --- a/backends/PalmOS/Src/arm/widelandscape.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "native.h" -#include "endianutils.h" -#include "../shared.h" - -#define MAIN_TYPE WideType -#include "macros.h" - -UInt32 OSystem_updateScreen_wideLandscape(void *userData68KP) { -// import variables - SETPTR(UInt8 * ,dst) - SETPTR(UInt8 * ,src) -// end of import - - Coord x, y; - - for (y = 0; y < WIDE_HALF_HEIGHT; y++) { - // draw 2 lines - for (x = 0; x < WIDE_FULL_WIDTH; x++) { - *dst++ = *src++; - *dst++ = *src; - *dst++ = *src++; - } - // copy the second to the next line - MemMove(dst, dst - 480, 480); - dst += 480; - } - - return 0; -} - diff --git a/backends/PalmOS/Src/arm/wideportrait.cpp b/backends/PalmOS/Src/arm/wideportrait.cpp deleted file mode 100644 index 32134d5824..0000000000 --- a/backends/PalmOS/Src/arm/wideportrait.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "native.h" -#include "endianutils.h" -#include "../shared.h" - -#define MAIN_TYPE WideType -#include "macros.h" - -UInt32 OSystem_updateScreen_widePortrait(void *userData68KP) { -// import variables - SETPTR(UInt8 * ,dst) - SETPTR(UInt8 * ,src) -// end of import - - Coord x, y; - UInt8 *src2 = src; - - for (x = 0; x < WIDE_HALF_WIDTH; x++) { - for (y = 0; y < WIDE_HALF_HEIGHT; y++) { - *dst++ = *src; - src += WIDE_PITCH; - *dst++ = *src; - *dst++ = *src; - src += WIDE_PITCH; - } - src = --src2; - dst += 20; // we draw 200pix scaled to 1.5 = 300, screen width=320, so next is 20 - - for (y = 0; y < WIDE_HALF_HEIGHT; y++) { - *dst++ = *src; - src += WIDE_PITCH; - *dst++ = *src; - *dst++ = *src; - src += WIDE_PITCH; - } - src = --src2; - dst += 20; - - MemMove(dst, dst - WIDE_PITCH, 300); // 300 = 200 x 1.5 - dst += WIDE_PITCH; - } - - return 0; -} |