Remove old WinCE port files
svn-id: r3749
This commit is contained in:
parent
fa9cc1d341
commit
cff3d47012
8 changed files with 0 additions and 3624 deletions
|
@ -1,145 +0,0 @@
|
|||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "newres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""newres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_GAMESELECT DIALOG DISCARDABLE 0, 0, 121, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Choose a Game"
|
||||
FONT 8, "System"
|
||||
BEGIN
|
||||
PUSHBUTTON "Exit",IDCANCEL,64,127,50,10
|
||||
PUSHBUTTON "Monkey Island 1",IDC_MONKEY,7,7,107,10
|
||||
PUSHBUTTON "Monkey Island 2",IDC_MONKEY2,7,22,107,10
|
||||
PUSHBUTTON "Fate of Atlantis",IDC_ATLANTIS,7,37,107,10
|
||||
PUSHBUTTON "Fate of Atlantis Demo",IDC_PLAYFATE,7,52,107,10
|
||||
PUSHBUTTON "Day Of The Tentacle",IDC_TENTACLE,7,67,107,10
|
||||
PUSHBUTTON "Day Of The Tentacle Demo",IDC_DOTTDEMO,7,82,107,10
|
||||
PUSHBUTTON "Sam && Max",IDC_SAMNMAX,7,97,107,10
|
||||
PUSHBUTTON "Sam && Max Demo",IDC_SNMDEMO,7,112,107,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menubar
|
||||
//
|
||||
|
||||
IDM_MENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "PocketSCUMM"
|
||||
BEGIN
|
||||
MENUITEM "Exit", IDC_EXIT
|
||||
MENUITEM "About", IDC_ABOUT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Landscape", IDC_LANDSCAPE
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Data
|
||||
//
|
||||
|
||||
IDM_MENU SHMENUBAR DISCARDABLE
|
||||
BEGIN
|
||||
IDM_MENU, 1,
|
||||
I_IMAGENONE, ID_POCKETSCUMM, TBSTATE_ENABLED,
|
||||
TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_CAP_POCKETSCUMM, 0, 0,
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_GAMESELECT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 114
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 136
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CAP_POCKETSCUMM "PocketSCUMM"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1,41 +0,0 @@
|
|||
#ifndef __NEWRES_H__
|
||||
#define __NEWRES_H__
|
||||
|
||||
#if !defined(UNDER_CE)
|
||||
#define UNDER_CE _WIN32_WCE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
#if !defined(WCEOLE_ENABLE_DIALOGEX)
|
||||
#define DIALOGEX DIALOG DISCARDABLE
|
||||
#endif
|
||||
#include <commctrl.h>
|
||||
#define SHMENUBAR RCDATA
|
||||
#if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300)
|
||||
#include <aygshell.h>
|
||||
#define AFXCE_IDR_SCRATCH_SHMENU 28700
|
||||
#else
|
||||
#define I_IMAGENONE (-2)
|
||||
#define NOMENU 0xFFFF
|
||||
#define IDS_SHNEW 1
|
||||
|
||||
#define IDM_SHAREDNEW 10
|
||||
#define IDM_SHAREDNEWDEFAULT 11
|
||||
#endif // _WIN32_WCE_PSPC
|
||||
#define AFXCE_IDD_SAVEMODIFIEDDLG 28701
|
||||
#endif // _WIN32_WCE
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
#ifndef _INC_WINDOWS
|
||||
#define _INC_WINDOWS
|
||||
#include "winuser.h" // extract from windows header
|
||||
#include "winver.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef IDC_STATIC
|
||||
#undef IDC_STATIC
|
||||
#endif
|
||||
#define IDC_STATIC (-1)
|
||||
|
||||
#endif //__NEWRES_H__
|
|
@ -1,30 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by PocketSCUMM.rc
|
||||
//
|
||||
#define IDD_GAMESELECT 105
|
||||
#define IDM_MENU 1000
|
||||
#define IDC_ABOUT 1000
|
||||
#define IDC_MONKEY 1000
|
||||
#define IDC_EXIT 1001
|
||||
#define IDC_MONKEY2 1001
|
||||
#define IDC_ATLANTIS 1002
|
||||
#define IDC_PLAYFATE 1003
|
||||
#define IDC_TENTACLE 1004
|
||||
#define IDC_DOTTDEMO 1005
|
||||
#define IDC_SAMNMAX 1006
|
||||
#define IDC_SNMDEMO 1007
|
||||
#define ID_POCKETSCUMM 40005
|
||||
#define IDS_CAP_POCKETSCUMM 40006
|
||||
#define IDC_LANDSCAPE 40007
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 106
|
||||
#define _APS_NEXT_COMMAND_VALUE 40008
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
319
wince/screen.cpp
319
wince/screen.cpp
|
@ -1,319 +0,0 @@
|
|||
/* (C) 2001 Vasyl Tsvirkunov */
|
||||
|
||||
#include <windows.h>
|
||||
#include "gx.h"
|
||||
#include "screen.h"
|
||||
|
||||
#define SMOOTH
|
||||
|
||||
#define MAX_CLR 0x100
|
||||
#ifdef SMOOTH
|
||||
static UBYTE palRed[MAX_CLR];
|
||||
static UBYTE palGreen[MAX_CLR];
|
||||
static UBYTE palBlue[MAX_CLR];
|
||||
#endif
|
||||
static unsigned short pal[MAX_CLR];
|
||||
|
||||
|
||||
GXDisplayProperties gxdp;
|
||||
int active;
|
||||
|
||||
struct tScreenGeometry
|
||||
{
|
||||
long width;
|
||||
long height;
|
||||
long startoffset;
|
||||
long sourceoffset;
|
||||
long linestep;
|
||||
long pixelstep;
|
||||
long xSkipMask;
|
||||
long xLimit;
|
||||
long lineLimit;
|
||||
};
|
||||
|
||||
tScreenGeometry geom[3];
|
||||
|
||||
int currentScreenMode = 0;
|
||||
int useMode = 0;
|
||||
int maxMode = 2;
|
||||
|
||||
void SetScreenMode(int mode)
|
||||
{
|
||||
currentScreenMode = mode;
|
||||
if(currentScreenMode > maxMode)
|
||||
currentScreenMode = 0;
|
||||
}
|
||||
|
||||
int GetScreenMode()
|
||||
{
|
||||
return currentScreenMode;
|
||||
}
|
||||
|
||||
void GraphicsSuspend()
|
||||
{
|
||||
if(active)
|
||||
{
|
||||
active = 0;
|
||||
GXSuspend();
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsResume()
|
||||
{
|
||||
if(!active)
|
||||
{
|
||||
active = 1;
|
||||
GXResume();
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsOff(void)
|
||||
{
|
||||
GXCloseDisplay();
|
||||
active = 0;
|
||||
}
|
||||
|
||||
int GraphicsOn(HWND hWndMain)
|
||||
{
|
||||
GXOpenDisplay(hWndMain, GX_FULLSCREEN);
|
||||
|
||||
gxdp = GXGetDisplayProperties();
|
||||
if((gxdp.ffFormat & (kfDirect555 | kfDirect565)) == 0 || gxdp.cxWidth < 240 || gxdp.cyHeight < 240)
|
||||
{
|
||||
GraphicsOff();
|
||||
return 1;
|
||||
}
|
||||
|
||||
// portrait
|
||||
geom[0].width = gxdp.cxWidth; // 240
|
||||
geom[0].height = gxdp.cyHeight; // 320
|
||||
geom[0].startoffset = 0;
|
||||
geom[0].sourceoffset = 0;
|
||||
geom[0].linestep = gxdp.cbyPitch;
|
||||
geom[0].pixelstep = gxdp.cbxPitch;
|
||||
geom[0].xSkipMask = gxdp.cxWidth < 320 ? 0x00000003 : 0xffffffff;
|
||||
geom[0].xLimit = 320; // skip 1/4
|
||||
geom[0].lineLimit = 320*200;
|
||||
|
||||
// left handed landscape
|
||||
geom[1].width = gxdp.cyHeight; // 320
|
||||
geom[1].height = gxdp.cxWidth; // 240
|
||||
geom[1].startoffset = gxdp.cbyPitch*(gxdp.cyHeight-1);
|
||||
geom[1].sourceoffset = 0;
|
||||
geom[1].linestep = gxdp.cbxPitch;
|
||||
geom[1].pixelstep = -gxdp.cbyPitch;
|
||||
geom[1].xSkipMask = 0xffffffff;
|
||||
geom[1].xLimit = 320; // no skip
|
||||
geom[1].lineLimit = 320*200;
|
||||
|
||||
// right handed landscape
|
||||
geom[2].width = gxdp.cyHeight; // 320
|
||||
geom[2].height = gxdp.cxWidth; // 240
|
||||
geom[2].startoffset = gxdp.cbxPitch*(gxdp.cxWidth-1);
|
||||
geom[2].sourceoffset = 0;
|
||||
geom[2].linestep = -gxdp.cbxPitch;
|
||||
geom[2].pixelstep = gxdp.cbyPitch;
|
||||
geom[2].xSkipMask = 0xffffffff;
|
||||
geom[2].xLimit = 320; // no skip
|
||||
geom[2].lineLimit = 320*200;
|
||||
|
||||
if(gxdp.cyHeight < 320)
|
||||
maxMode = 0; // portrait only!
|
||||
|
||||
active = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetPalEntry(int ent, UBYTE r, UBYTE g, UBYTE b)
|
||||
{
|
||||
if (ent >= MAX_CLR)
|
||||
return;
|
||||
#ifdef SMOOTH
|
||||
palRed[ent] = r;
|
||||
palGreen[ent] = g;
|
||||
palBlue[ent] = b;
|
||||
#endif
|
||||
if(gxdp.ffFormat & kfDirect565)
|
||||
pal[ent] = ((r&0xf8)<<(11-3))|((g&0xfc)<<(5-2))|((b&0xf8)>>3);
|
||||
else if(gxdp.ffFormat & kfDirect555)
|
||||
pal[ent] = ((r&0xf8)<<(10-3))|((g&0xf8)<<(5-2))|((b&0xf8)>>3);
|
||||
}
|
||||
|
||||
void Cls()
|
||||
{
|
||||
int x, y;
|
||||
UBYTE* dst;
|
||||
UBYTE *scraddr;
|
||||
scraddr = (UBYTE*)GXBeginDraw();
|
||||
if(scraddr)
|
||||
{
|
||||
for(y=0; y<geom[useMode].height; y++)
|
||||
{
|
||||
dst = scraddr+geom[useMode].startoffset;
|
||||
for(x=0; x<geom[useMode].width; x++)
|
||||
{
|
||||
*(unsigned short*)dst = 0;
|
||||
dst += geom[useMode].pixelstep;
|
||||
}
|
||||
scraddr += geom[useMode].linestep;
|
||||
}
|
||||
GXEndDraw();
|
||||
}
|
||||
}
|
||||
|
||||
int counter = 0;
|
||||
|
||||
void Blt(UBYTE * scr_ptr)
|
||||
{
|
||||
static UBYTE *src;
|
||||
static UBYTE *dst;
|
||||
static UBYTE *scraddr;
|
||||
static UBYTE *scr_ptr_limit;
|
||||
static UBYTE *src_limit;
|
||||
static long pixelstep;
|
||||
static long linestep;
|
||||
static long skipmask;
|
||||
|
||||
#ifdef SMOOTH
|
||||
static bool b565 = (gxdp.ffFormat & kfDirect565);
|
||||
#endif
|
||||
|
||||
if(!active)
|
||||
{
|
||||
Sleep(100);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Update screen mode, also thread protection by doing this */
|
||||
if(useMode != currentScreenMode)
|
||||
{
|
||||
useMode = currentScreenMode;
|
||||
Cls();
|
||||
}
|
||||
|
||||
scraddr = (UBYTE*)GXBeginDraw();
|
||||
if(scraddr)
|
||||
{
|
||||
scraddr += geom[useMode].startoffset;
|
||||
scr_ptr += geom[useMode].sourceoffset;
|
||||
scr_ptr_limit = scr_ptr + geom[useMode].lineLimit;
|
||||
pixelstep = geom[useMode].pixelstep;
|
||||
linestep = geom[useMode].linestep;
|
||||
src_limit = scr_ptr + geom[useMode].xLimit;
|
||||
skipmask = geom[useMode].xSkipMask;
|
||||
|
||||
/* Internal pixel loops */
|
||||
#ifdef SMOOTH
|
||||
if(skipmask == 3)
|
||||
{
|
||||
while(scr_ptr < scr_ptr_limit)
|
||||
{
|
||||
src = scr_ptr;
|
||||
dst = scraddr;
|
||||
while(src < src_limit)
|
||||
{
|
||||
UBYTE r, g, b;
|
||||
r = (3*palRed[*(src+0)] + palRed[*(src+1)])>>2;
|
||||
g = (3*palGreen[*(src+0)] + palGreen[*(src+1)])>>2;
|
||||
b = (3*palBlue[*(src+0)] + palBlue[*(src+1)])>>2;
|
||||
|
||||
if(b565)
|
||||
*(unsigned short*)dst = ((r&0xf8)<<(11-3))|((g&0xfc)<<(5-2))|((b&0xf8)>>3);
|
||||
else
|
||||
*(unsigned short*)dst = ((r&0xf8)<<(10-3))|((g&0xf8)<<(5-2))|((b&0xf8)>>3);
|
||||
dst += pixelstep;
|
||||
|
||||
r = (palRed[*(src+1)] + palRed[*(src+2)])>>1;
|
||||
g = (palGreen[*(src+1)] + palGreen[*(src+2)])>>1;
|
||||
b = (palBlue[*(src+1)] + palBlue[*(src+2)])>>1;
|
||||
|
||||
if(b565)
|
||||
*(unsigned short*)dst = ((r&0xf8)<<(11-3))|((g&0xfc)<<(5-2))|((b&0xf8)>>3);
|
||||
else
|
||||
*(unsigned short*)dst = ((r&0xf8)<<(10-3))|((g&0xf8)<<(5-2))|((b&0xf8)>>3);
|
||||
dst += pixelstep;
|
||||
|
||||
r = (palRed[*(src+2)] + 3*palRed[*(src+3)])>>2;
|
||||
g = (palGreen[*(src+2)] + 3*palGreen[*(src+3)])>>2;
|
||||
b = (palBlue[*(src+2)] + 3*palBlue[*(src+3)])>>2;
|
||||
|
||||
if(b565)
|
||||
*(unsigned short*)dst = ((r&0xf8)<<(11-3))|((g&0xfc)<<(5-2))|((b&0xf8)>>3);
|
||||
else
|
||||
*(unsigned short*)dst = ((r&0xf8)<<(10-3))|((g&0xf8)<<(5-2))|((b&0xf8)>>3);
|
||||
dst += pixelstep;
|
||||
|
||||
src += 4;
|
||||
}
|
||||
scraddr += linestep;
|
||||
scr_ptr += 320;
|
||||
src_limit += 320;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if(skipmask != 0xffffffff)
|
||||
{
|
||||
while(scr_ptr < scr_ptr_limit)
|
||||
{
|
||||
src = scr_ptr;
|
||||
dst = scraddr;
|
||||
while(src < src_limit)
|
||||
{
|
||||
if((long)src & skipmask)
|
||||
{
|
||||
*(unsigned short*)dst = pal[*src];
|
||||
dst += pixelstep;
|
||||
}
|
||||
src ++;
|
||||
}
|
||||
scraddr += linestep;
|
||||
scr_ptr += 320;
|
||||
src_limit += 320;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while(scr_ptr < scr_ptr_limit)
|
||||
{
|
||||
src = scr_ptr;
|
||||
dst = scraddr;
|
||||
while(src < src_limit)
|
||||
{
|
||||
*(unsigned short*)dst = pal[*src];
|
||||
dst += pixelstep;
|
||||
src ++;
|
||||
}
|
||||
scraddr += linestep;
|
||||
scr_ptr += 320;
|
||||
src_limit += 320;
|
||||
}
|
||||
}
|
||||
|
||||
GXEndDraw();
|
||||
}
|
||||
}
|
||||
|
||||
void Translate(int* px, int* py)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
switch(currentScreenMode)
|
||||
{
|
||||
case 0: /* portrait */
|
||||
*px = *px*4/3;
|
||||
break;
|
||||
case 1: /* landscape left */
|
||||
x = 320 - *py;
|
||||
y = *px;
|
||||
*px = x;
|
||||
*py = y;
|
||||
break;
|
||||
case 2: /* landscape right */
|
||||
x = *py;
|
||||
y = 240 - *px;
|
||||
*px = x;
|
||||
*py = y;
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/* (C) 2001 Vasyl Tsvirkunov */
|
||||
|
||||
#ifndef SCREEN_H
|
||||
#define SCREEN_H
|
||||
|
||||
#ifndef UBYTE
|
||||
#define UBYTE unsigned char
|
||||
#endif
|
||||
|
||||
int GraphicsOn(HWND hWndMain);
|
||||
void GraphicsOff();
|
||||
void GraphicsSuspend();
|
||||
void GraphicsResume();
|
||||
|
||||
void SetPalEntry(int ent, UBYTE r, UBYTE g, UBYTE b);
|
||||
void Blt(UBYTE * scr_ptr);
|
||||
|
||||
/* meaning: 0 - portrait, 1 - left hand landscape, 2 - right hand landscape */
|
||||
void SetScreenMode(int mode);
|
||||
int GetScreenMode();
|
||||
|
||||
void Translate(int* x, int* y);
|
||||
|
||||
#endif
|
|
@ -1,4 +0,0 @@
|
|||
/* dummy header */
|
||||
|
||||
// A little hack...
|
||||
#undef NOCTLMGR
|
Loading…
Add table
Add a link
Reference in a new issue