home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / OS2 / SPEL / UCHESS / UCHESSRC / BOBS.H < prev    next >
Text File  |  1994-10-29  |  2KB  |  58 lines

  1. #ifndef SYS_BOBS_INCL
  2.  
  3. //*************************************************************
  4. // Raster Object Primitives, for OS/2 PM
  5. // CopyRight (c) 1994 W. Roger Uzun
  6. // Avatar Consulting 
  7. //*************************************************************
  8.  
  9.  
  10. #define SYS_BOBS_INCL
  11.  
  12. #define INCL_DOS
  13. #define INCL_WIN
  14. #define INCL_GPI
  15. #include <os2.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18.  
  19. struct BOBSTRUCT {
  20. LONG XPos,YPos; // where do I go next frame?
  21. LONG OldX,OldY; // Where was I last time I was drawn on the screen?
  22. LONG Width,Height,Depth; // Image dimensions
  23. LONG Flags; // for future options, who  knows
  24. struct BOBSTRUCT *Next;  // next BOB in the list of Graphics Element Objects (GELS)
  25. HBITMAP Image;  // image data in bitmap format
  26. HBITMAP SaveBuffer; // area to save background to
  27. HBITMAP ShadowMask;
  28. UCHAR *ShadowImage;
  29. PBITMAPINFO2 bmi2; // bitmap info filled in by creation, semi priv
  30.           // OS/2 specific information
  31. PBITMAPINFO2 sbmi2; // bitmap info for shadow masks
  32. };
  33.  
  34. typedef unsigned char UBYTE;
  35. typedef struct BOBSTRUCT BOB;
  36.  
  37. extern HPS hwClientPS; // we need to keep a PS around for the target
  38. extern BOB *SystemBobList;
  39. extern HPS hwCLientPS; // we need to keep a PS around for the target
  40. extern HMTX DrawSemaphore; // have WM_PAINT and Gels go 1 at a time
  41.  
  42. int LoadBMPImage(char *,void *,ULONG,ULONG);
  43. int InitGels(void);
  44. int CloseGels(void);
  45. void RepaintBobs(HPS); // for WM_Paint situations
  46. BOB *CreateBob(LONG Width,LONG Height,LONG Depth,void *Image,UCHAR *);
  47. int FreeBob(BOB *);
  48. void DrawGList(void);
  49. void AddBob(BOB *);
  50. void RemBob(BOB *);
  51. void RemBobNR(BOB *);
  52. void EraseBob(BOB *);
  53. int LoadFullBitmap(HPS,char *,int,UCHAR *);
  54. void FreeFullBitmap(void);
  55.  
  56. #endif // SYS_BOBS_INCL
  57.  
  58.