Advertisement
Guest User

Untitled

a guest
Sep 18th, 2013
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.95 KB | None | 0 0
  1. #include <proto/intuition.h>
  2. #include <proto/exec.h>
  3. #include <proto/graphics.h>
  4. #include <proto/dos.h>
  5.  
  6. #include <exec/memory.h>
  7.  
  8. struct IntuitionBase *IntuitionBase = NULL;
  9. struct GfxBase *GfxBase = NULL;
  10.  
  11.  
  12. typedef struct {
  13.     UWORD uwWidth;
  14.     UWORD uwHeight;
  15.     UBYTE ubChars;
  16.     // UBYTE ubFixedSize;
  17.     UWORD *pCharOffsets;
  18.     struct BitMap *pRawData;
  19. } tFont;
  20.  
  21.  
  22. void drawChar(struct BitMap *pbmDest, tFont *pFont, UWORD uwX, UWORD uwY, char cNo) {
  23.     WORD uwCharLength = pFont->pCharOffsets[cNo+1] - pFont->pCharOffsets[cNo];
  24.     BltBitMap(
  25.         pFont->pRawData, pFont->pCharOffsets[cNo], 0,
  26.         pbmDest, uwX, uwY,
  27.         uwCharLength, pFont->uwHeight,
  28.         0x0c0, 0xff, 0
  29.         );
  30.     }
  31.  
  32.  
  33. int main(void)
  34.     {
  35.     IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 0L);
  36.     GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 0L);
  37.  
  38.     CloseLibrary((struct Library *)GfxBase);
  39.     CloseLibrary((struct Library *)IntuitionBase);
  40.    
  41.     return 0;
  42.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement