mirror of
https://github.com/LIV2/libnix.git
synced 2025-12-06 00:23:08 +00:00
71 lines
1.6 KiB
C
71 lines
1.6 KiB
C
/* Automatically generated header (sfdc 1.11d)! Do not edit! */
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
#if defined (__libnix__)
|
|
|
|
#include <stabs.h>
|
|
#ifdef __baserel__
|
|
void* GfxBase = 0;
|
|
void ** __getGfxBase() { return &GfxBase; }
|
|
static void * __init[2] = { __getGfxBase, "graphics.library"};
|
|
ADD2LIB(__init);
|
|
#else
|
|
void* GfxBase[2] = { 0, "graphics.library" };
|
|
ADD2LIB(GfxBase);
|
|
#endif
|
|
|
|
#elif defined (__AMIGAOS4__)
|
|
|
|
#undef __USE_INLINE__
|
|
#define _NO_INLINE
|
|
#include <graphics/gfx.h>
|
|
#include <graphics/displayinfo.h>
|
|
#include <graphics/gels.h>
|
|
#include <graphics/rastport.h>
|
|
#include <graphics/view.h>
|
|
#include <graphics/copper.h>
|
|
#include <graphics/clip.h>
|
|
#include <graphics/regions.h>
|
|
#include <graphics/sprite.h>
|
|
#include <graphics/text.h>
|
|
#include <graphics/scale.h>
|
|
#include <hardware/blit.h>
|
|
#include <exec/types.h>
|
|
#include <utility/tagitem.h>
|
|
|
|
#include <interfaces/graphics.h>
|
|
#include <proto/exec.h>
|
|
#include <assert.h>
|
|
|
|
__attribute__((weak)) struct GfxBase * GfxBase = NULL;
|
|
__attribute__((weak)) struct GfxIFace* IGfx = NULL;
|
|
|
|
void __init_Gfx(void) __attribute__((constructor));
|
|
void __exit_Gfx(void) __attribute__((destructor));
|
|
|
|
void __init_Gfx(void) {
|
|
if (GfxBase == NULL) {
|
|
GfxBase = (struct GfxBase *) IExec->OpenLibrary("graphics.library", 0);
|
|
assert(GfxBase != NULL);
|
|
}
|
|
if (IGfx == NULL) {
|
|
IGfx = (struct GfxIFace*) IExec->GetInterface((struct Library*) GfxBase, "main", 1, NULL);
|
|
assert(IGfx != NULL);
|
|
}
|
|
}
|
|
|
|
void __exit_Gfx(void) {
|
|
IExec->DropInterface((struct Interface*) IGfx);
|
|
IExec->CloseLibrary((struct Library*) GfxBase);
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|