home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / WTJ9403.ZIP / BARNHART / SO.H < prev    next >
C/C++ Source or Header  |  1993-03-18  |  1KB  |  107 lines

  1. class ScreenObj
  2. {protected:
  3. WORD x;WOR
  4. D y;WORD old
  5. x;WORD oldy;
  6. WORD width;
  7. WORD height;
  8. WORD targetx;
  9.  
  10. WORD targety
  11. ;BOOL shown;
  12. public:sta
  13. tic HDC hDC;
  14. static HWND hWnd
  15. ;static HAND
  16. LE hInst;S
  17. creenObj *next;
  18.  
  19. ScreenObj(
  20. WORD ix, WORD iy
  21. );void Sho
  22. w( BOOL nCmdShow
  23.  ) {shown=nCmdSh
  24. ow;Paint();}
  25. virtual BOOL Upd
  26. ate( void ){retu
  27. rn FALSE;}vi
  28. rtual void Paint
  29. ( void){;}vo
  30. id Paint( RECT *
  31. rc){;}void S
  32. etTarget( WORD t
  33. x, WORD ty) {tar
  34. getx=(tx/4)*4; t
  35.  
  36. argety=(ty/4)*4;
  37. }};class S
  38. creenIcon : publ
  39. ic ScreenObj{
  40. protected:H
  41. ICON hIcon;pub
  42. lic:ScreenIc
  43. on( char *res, W
  44.  
  45. ORD ix, WORD iy)
  46. ;~ScreenIcon
  47. ( void);void
  48.  Paint( void);
  49. BOOL Update( v
  50. oid);};cla
  51. ss ScreenBM : pu
  52. blic ScreenObj
  53.  
  54. {protected:v
  55. oid MoveImage( H
  56. WND hWnd);HB
  57. ITMAP hbmImage;
  58.  
  59.   // image handl
  60. eWORD wElapse;
  61.  
  62.  
  63.        // speed
  64. parameterWORD
  65. wTimer;
  66.                /
  67. / timer idBOOL
  68.  bBottom;
  69.  
  70. // TRUE if frog
  71.  
  72. is at bottom of
  73. screenint xPos
  74. ;
  75.             // c
  76. urrent x positio
  77. nint yPos;
  78.  
  79.        // curren
  80.  
  81. t y positionin
  82. t xPosInit;
  83.  
  84.   // initial x p
  85. ositionint yPo
  86. sInit;
  87.              //
  88. initial y positi
  89.  
  90. onint xVelocIn
  91. it;
  92.         // x ini
  93. tial velocityi
  94. nt yVeloc;int
  95. nGravity;
  96.  
  97. // acceleration
  98.  
  99. factorpublic
  100. :ScreenBM( c
  101. har *res, WORD i
  102. x, WORD iy);
  103. ~ScreenBM( void)
  104. ;void Paint(
  105.  void);BOOL
  106. Update( void);
  107.