home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
WTJ9403.ZIP
/
BARNHART
/
SO.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-18
|
1KB
|
107 lines
class ScreenObj
{protected:
WORD x;WOR
D y;WORD old
x;WORD oldy;
WORD width;
WORD height;
WORD targetx;
WORD targety
;BOOL shown;
public:sta
tic HDC hDC;
static HWND hWnd
;static HAND
LE hInst;S
creenObj *next;
ScreenObj(
WORD ix, WORD iy
);void Sho
w( BOOL nCmdShow
) {shown=nCmdSh
ow;Paint();}
virtual BOOL Upd
ate( void ){retu
rn FALSE;}vi
rtual void Paint
( void){;}vo
id Paint( RECT *
rc){;}void S
etTarget( WORD t
x, WORD ty) {tar
getx=(tx/4)*4; t
argety=(ty/4)*4;
}};class S
creenIcon : publ
ic ScreenObj{
protected:H
ICON hIcon;pub
lic:ScreenIc
on( char *res, W
ORD ix, WORD iy)
;~ScreenIcon
( void);void
Paint( void);
BOOL Update( v
oid);};cla
ss ScreenBM : pu
blic ScreenObj
{protected:v
oid MoveImage( H
WND hWnd);HB
ITMAP hbmImage;
// image handl
eWORD wElapse;
// speed
parameterWORD
wTimer;
/
/ timer idBOOL
bBottom;
// TRUE if frog
is at bottom of
screenint xPos
;
// c
urrent x positio
nint yPos;
// curren
t y positionin
t xPosInit;
// initial x p
ositionint yPo
sInit;
//
initial y positi
onint xVelocIn
it;
// x ini
tial velocityi
nt yVeloc;int
nGravity;
// acceleration
factorpublic
:ScreenBM( c
har *res, WORD i
x, WORD iy);
~ScreenBM( void)
;void Paint(
void);BOOL
Update( void);