home *** CD-ROM | disk | FTP | other *** search
- #include <intuition/intuitionbase.h>
- #include <exec/memory.h>
- #include <string.h>
- #ifdef LATTICE
- #include <proto/exec.h>
- #include <proto/intuition.h>
- #endif
- #include "logo.h"
- #include "messages.h"
- extern struct Window *Window1;
-
- static struct Image LogoImage =
- {
- 0, 0, logo_iff_width, logo_iff_height, logo_iff_num_planes,
- (USHORT *)logo_iff_data, 0xF, 0, NULL
- };
-
- static USHORT *LogoBuffer=NULL;
-
- extern long conwin;
- extern void WrConWin(long,char*);
-
- void PrepareLogo(void)
- {
- if(TypeOfMem(logo_iff_data) & MEMF_FAST)
- {
- LogoBuffer=(USHORT *)AllocMem(sizeof(logo_iff_data),
- MEMF_CHIP|MEMF_PUBLIC);
- if(LogoBuffer==NULL)
- WrConWin(conwin,NO_LOGO_MEM);
- else
- {
- movmem(logo_iff_data,LogoBuffer,sizeof(logo_iff_data));
- LogoImage.ImageData=LogoBuffer;
- }
- }
- }
-
- void Logo(void)
- {
- DrawImage(Window1->RPort, &LogoImage, Window1->Width - logo_iff_width - 10,
- Window1->Height - logo_iff_height - 2);
- }
-
- void FreeLogo(void)
- {
- if(LogoBuffer)
- FreeMem(LogoBuffer,sizeof(logo_iff_data));
- }
-