home *** CD-ROM | disk | FTP | other *** search
Wrap
#include <inline/stub.h> #ifndef BASE_EXT_DECL #define BASE_EXT_DECL extern struct Library * LayersBase; #endif #ifndef BASE_PAR_DECL #define BASE_PAR_DECL #define BASE_PAR_DECL0 void #endif #ifndef BASE_NAME #define BASE_NAME LayersBase #endif __inline static void InitLayers(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0x1e)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static struct Layer* CreateUpfrontLayer(BASE_PAR_DECL struct Layer_Info* li, struct BitMap* bm, long int x0, long int y0, long int x1, long int y1, long int flags, struct BitMap* bm2) { BASE_EXT_DECL register struct Layer* res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); register struct BitMap* a1 __asm("a1"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); register long int d2 __asm("d2"); register long int d3 __asm("d3"); register long int d4 __asm("d4"); register struct BitMap* a2 __asm("a2"); a6 = BASE_NAME; a0 = li; a1 = bm; d0 = x0; d1 = y0; d2 = x1; d3 = y1; d4 = flags; a2 = bm2; __asm volatile ("" : /* no input */ : "g" (a0), "g" (a1)); __asm volatile (" jsr a6@(-0x24)" : "=g" (res) : "g" (a6), "g" (a1), "g" (d0), "g" (d1), "g" (d2), "g" (d3), "g" (d4) : "d0", "d1", "a0", "a1", "d2", "d3", "d4", "a2"); return res; } __inline static struct Layer* CreateBehindLayer(BASE_PAR_DECL struct Layer_Info* li, struct BitMap* bm, long int x0, long int y0, long int x1, long int y1, long int flags, struct BitMap* bm2) { BASE_EXT_DECL register struct Layer* res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); register struct BitMap* a1 __asm("a1"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); register long int d2 __asm("d2"); register long int d3 __asm("d3"); register long int d4 __asm("d4"); register struct BitMap* a2 __asm("a2"); a6 = BASE_NAME; a0 = li; a1 = bm; d0 = x0; d1 = y0; d2 = x1; d3 = y1; d4 = flags; a2 = bm2; __asm volatile ("" : /* no input */ : "g" (a0), "g" (a1)); __asm volatile (" jsr a6@(-0x2a)" : "=g" (res) : "g" (a6), "g" (a1), "g" (d0), "g" (d1), "g" (d2), "g" (d3), "g" (d4) : "d0", "d1", "a0", "a1", "d2", "d3", "d4", "a2"); return res; } __inline static LONG UpfrontLayer(BASE_PAR_DECL long int dummy, struct Layer* layer) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register long int a0 __asm("a0"); register struct Layer* a1 __asm("a1"); a6 = BASE_NAME; a0 = dummy; a1 = layer; __asm volatile (" jsr a6@(-0x30)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); return res; } __inline static LONG BehindLayer(BASE_PAR_DECL long int dummy, struct Layer* layer) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register long int a0 __asm("a0"); register struct Layer* a1 __asm("a1"); a6 = BASE_NAME; a0 = dummy; a1 = layer; __asm volatile (" jsr a6@(-0x36)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); return res; } __inline static LONG MoveLayer(BASE_PAR_DECL long int dummy, struct Layer* layer, long int dx, long int dy) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register long int a0 __asm("a0"); register struct Layer* a1 __asm("a1"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); a6 = BASE_NAME; a0 = dummy; a1 = layer; d0 = dx; d1 = dy; __asm volatile (" jsr a6@(-0x3c)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1), "g" (d0), "g" (d1) : "d0", "d1", "a0", "a1"); return res; } __inline static LONG SizeLayer(BASE_PAR_DECL long int dummy, struct Layer* layer, long int dx, long int dy) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register long int a0 __asm("a0"); register struct Layer* a1 __asm("a1"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); a6 = BASE_NAME; a0 = dummy; a1 = layer; d0 = dx; d1 = dy; __asm volatile (" jsr a6@(-0x42)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1), "g" (d0), "g" (d1) : "d0", "d1", "a0", "a1"); return res; } __inline static void ScrollLayer(BASE_PAR_DECL long int dummy, struct Layer* layer, long int dx, long int dy) { BASE_EXT_DECL register void *a6 __asm ("a6"); register long int a0 __asm("a0"); register struct Layer* a1 __asm("a1"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); a6 = BASE_NAME; a0 = dummy; a1 = layer; d0 = dx; d1 = dy; __asm volatile (" jsr a6@(-0x48)" : /* no output */ : "g" (a6), "g" (a0), "g" (a1), "g" (d0), "g" (d1) : "d0", "d1", "a0", "a1"); } __inline static LONG BeginUpdate(BASE_PAR_DECL struct Layer* l) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer* a0 __asm("a0"); a6 = BASE_NAME; a0 = l; __asm volatile (" jsr a6@(-0x4e)" : "=g" (res) : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); return res; } __inline static void EndUpdate(BASE_PAR_DECL struct Layer* layer, long unsigned int flag) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer* a0 __asm("a0"); register long unsigned int d0 __asm("d0"); a6 = BASE_NAME; a0 = layer; d0 = flag; __asm volatile (" jsr a6@(-0x54)" : /* no output */ : "g" (a6), "g" (a0), "g" (d0) : "d0", "d1", "a0", "a1"); } __inline static LONG DeleteLayer(BASE_PAR_DECL long int dummy, struct Layer* layer) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register long int a0 __asm("a0"); register struct Layer* a1 __asm("a1"); a6 = BASE_NAME; a0 = dummy; a1 = layer; __asm volatile (" jsr a6@(-0x5a)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); return res; } __inline static void LockLayer(BASE_PAR_DECL long int dummy, struct Layer* layer) { BASE_EXT_DECL register void *a6 __asm ("a6"); register long int a0 __asm("a0"); register struct Layer* a1 __asm("a1"); a6 = BASE_NAME; a0 = dummy; a1 = layer; __asm volatile (" jsr a6@(-0x60)" : /* no output */ : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); } __inline static void UnlockLayer(BASE_PAR_DECL struct Layer* layer) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer* a0 __asm("a0"); a6 = BASE_NAME; a0 = layer; __asm volatile (" jsr a6@(-0x66)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static void LockLayers(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0x6c)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static void UnlockLayers(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0x72)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static void LockLayerInfo(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0x78)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static void SwapBitsRastPortClipRect(BASE_PAR_DECL struct RastPort* rp, struct ClipRect* cr) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct RastPort* a0 __asm("a0"); register struct ClipRect* a1 __asm("a1"); a6 = BASE_NAME; a0 = rp; a1 = cr; __asm volatile (" jsr a6@(-0x7e)" : /* no output */ : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); } __inline static struct Layer* WhichLayer(BASE_PAR_DECL struct Layer_Info* li, long int x, long int y) { BASE_EXT_DECL register struct Layer* res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); a6 = BASE_NAME; a0 = li; d0 = x; d1 = y; __asm volatile (" jsr a6@(-0x84)" : "=g" (res) : "g" (a6), "g" (a0), "g" (d0), "g" (d1) : "d0", "d1", "a0", "a1"); return res; } __inline static void UnlockLayerInfo(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0x8a)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static struct Layer_Info* NewLayerInfo(BASE_PAR_DECL0) { BASE_EXT_DECL register struct Layer_Info* res __asm("d0"); register void *a6 __asm ("a6"); a6 = BASE_NAME; __asm volatile (" jsr a6@(-0x90)" : "=g" (res) : "g" (a6) : "d0", "d1", "a0", "a1"); return res; } __inline static void DisposeLayerInfo(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0x96)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static LONG FattenLayerInfo(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0x9c)" : "=g" (res) : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); return res; } __inline static void ThinLayerInfo(BASE_PAR_DECL struct Layer_Info* li) { BASE_EXT_DECL register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); a6 = BASE_NAME; a0 = li; __asm volatile (" jsr a6@(-0xa2)" : /* no output */ : "g" (a6), "g" (a0) : "d0", "d1", "a0", "a1"); } __inline static LONG MoveLayerInFrontOf(BASE_PAR_DECL struct Layer* layer_to_move, struct Layer* other_layer) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer* a0 __asm("a0"); register struct Layer* a1 __asm("a1"); a6 = BASE_NAME; a0 = layer_to_move; a1 = other_layer; __asm volatile (" jsr a6@(-0xa8)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); return res; } __inline static struct Region* InstallClipRegion(BASE_PAR_DECL struct Layer* layer, struct Region* region) { BASE_EXT_DECL register struct Region* res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer* a0 __asm("a0"); register struct Region* a1 __asm("a1"); a6 = BASE_NAME; a0 = layer; a1 = region; __asm volatile (" jsr a6@(-0xae)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); return res; } __inline static LONG MoveSizeLayer(BASE_PAR_DECL struct Layer* layer, long int dx, long int dy, long int dw, long int dh) { BASE_EXT_DECL register LONG res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer* a0 __asm("a0"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); register long int d2 __asm("d2"); register long int d3 __asm("d3"); a6 = BASE_NAME; a0 = layer; d0 = dx; d1 = dy; d2 = dw; d3 = dh; __asm volatile (" jsr a6@(-0xb4)" : "=g" (res) : "g" (a6), "g" (a0), "g" (d0), "g" (d1), "g" (d2), "g" (d3) : "d0", "d1", "a0", "a1", "d2", "d3"); return res; } __inline static struct Layer* CreateUpfrontHookLayer(BASE_PAR_DECL struct Layer_Info* li, struct BitMap* bm, long int x0, long int y0, long int x1, long int y1, long int flags, struct Hook* hook, struct BitMap* bm2) { BASE_EXT_DECL register struct Layer* res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); register struct BitMap* a1 __asm("a1"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); register long int d2 __asm("d2"); register long int d3 __asm("d3"); register long int d4 __asm("d4"); register struct Hook* a3 __asm("a3"); register struct BitMap* a2 __asm("a2"); a6 = BASE_NAME; a0 = li; a1 = bm; d0 = x0; d1 = y0; d2 = x1; d3 = y1; d4 = flags; a3 = hook; a2 = bm2; __asm volatile ("" : /* no input */ : "g" (a0), "g" (a1), "g" (d0)); __asm volatile (" jsr a6@(-0xba)" : "=g" (res) : "g" (a6), "g" (d0), "g" (d1), "g" (d2), "g" (d3), "g" (d4), "g" (a3) : "d0", "d1", "a0", "a1", "d2", "d3", "d4", "a3", "a2"); return res; } __inline static struct Layer* CreateBehindHookLayer(BASE_PAR_DECL struct Layer_Info* li, struct BitMap* bm, long int x0, long int y0, long int x1, long int y1, long int flags, struct Hook* hook, struct BitMap* bm2) { BASE_EXT_DECL register struct Layer* res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer_Info* a0 __asm("a0"); register struct BitMap* a1 __asm("a1"); register long int d0 __asm("d0"); register long int d1 __asm("d1"); register long int d2 __asm("d2"); register long int d3 __asm("d3"); register long int d4 __asm("d4"); register struct Hook* a3 __asm("a3"); register struct BitMap* a2 __asm("a2"); a6 = BASE_NAME; a0 = li; a1 = bm; d0 = x0; d1 = y0; d2 = x1; d3 = y1; d4 = flags; a3 = hook; a2 = bm2; __asm volatile ("" : /* no input */ : "g" (a0), "g" (a1), "g" (d0)); __asm volatile (" jsr a6@(-0xc0)" : "=g" (res) : "g" (a6), "g" (d0), "g" (d1), "g" (d2), "g" (d3), "g" (d4), "g" (a3) : "d0", "d1", "a0", "a1", "d2", "d3", "d4", "a3", "a2"); return res; } __inline static struct Hook* InstallLayerHook(BASE_PAR_DECL struct Layer* layer, struct Hook* hook) { BASE_EXT_DECL register struct Hook* res __asm("d0"); register void *a6 __asm ("a6"); register struct Layer* a0 __asm("a0"); register struct Hook* a1 __asm("a1"); a6 = BASE_NAME; a0 = layer; a1 = hook; __asm volatile (" jsr a6@(-0xc6)" : "=g" (res) : "g" (a6), "g" (a0), "g" (a1) : "d0", "d1", "a0", "a1"); return res; } #undef BASE_EXT_DECL #undef BASE_PAR_DECL #undef BASE_PAR_DECL0 #undef BASE_NAME