/*************************************************************** lib2d.c ======= ***************************************************************/ #include #include #include "lib2d.h" #define MAX_NO_SPRITES (10+1) #define ORDERING_TABLE_LENGTH (8) #define MAX_NO_PACKETS (MAX_NO_SPRITES * sizeof(GsSPRITE)) // We need two Ordering Table Headers, one for each buffer GsOT othWorld[2]; // And we need Two Ordering Tables, one for each buffer GsOT_TAG otWorld[2][1<attribute = sa.LONG; /* Flags */ pSprite->x = x; /* Position */ pSprite->y = y; pSprite->w = iRealWidth; /* Size */ pSprite->h = img.ph; /* Texture, offset, CLUT */ pSprite->tpage = GetTPage( (img.pmode & 0x3), 0, img.px, img.py); pSprite->u = img.px- ((pSprite->tpage&0xF)*64); pSprite->v = (img.py & 0xFF); pSprite->cx = img.cx; pSprite->cy = img.cy; pSprite->r = 0x80; /* Colour */ pSprite->g = 0x80; pSprite->b = 0x80; pSprite->mx = iRealWidth>>1; /* Rotation co-ordinates at centre of image*/ pSprite->my = img.ph>>1; pSprite->rotate = 0L; /* and angle (4096 = 1') */ pSprite->scalex = ONE; /* Scale (ONE = 2048) */ pSprite->scaley = ONE; /*printf("Initialised sprite 0x%08lx: x=%d y=%d w=%d h=%d with 0x%08lx\n" "\ttpage=%d u=%d v=%d cx=%d cy=%d\n", pSprite, pSprite->x, pSprite->y, pSprite->w, pSprite->h, pSprite->attribute, pSprite->tpage, pSprite->u, pSprite->v, pSprite->cx, pSprite->cy); */ } void DrawSprite( GsSPRITE* pSprite, int nPriority ) { GsSortSprite( pSprite, &othWorld[currentBuffer], nPriority ); } void LoadTexture( long pTIM ) { }