Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <proto/intuition.h>
- #include <proto/exec.h>
- #include <proto/graphics.h>
- #include <proto/dos.h>
- #include <exec/memory.h>
- struct IntuitionBase *IntuitionBase = NULL;
- struct GfxBase *GfxBase = NULL;
- typedef struct {
- UWORD uwWidth;
- UWORD uwHeight;
- UBYTE ubChars;
- // UBYTE ubFixedSize;
- UWORD *pCharOffsets;
- struct BitMap *pRawData;
- } tFont;
- void drawChar(struct BitMap *pbmDest, tFont *pFont, UWORD uwX, UWORD uwY, char cNo) {
- WORD uwCharLength = pFont->pCharOffsets[cNo+1] - pFont->pCharOffsets[cNo];
- BltBitMap(
- pFont->pRawData, pFont->pCharOffsets[cNo], 0,
- pbmDest, uwX, uwY,
- uwCharLength, pFont->uwHeight,
- 0x0c0, 0xff, 0
- );
- }
- int main(void)
- {
- IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 0L);
- GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 0L);
- CloseLibrary((struct Library *)GfxBase);
- CloseLibrary((struct Library *)IntuitionBase);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement