/* Handy common routines and defs */ #include #include "common.h" /* Init heap for malloc() */ void PS_InitHeap(void) { /* !!!! HEAP NOT INIT */ } /* Decode memory TIM image, storing data in screen, returning used texture page and filled in image structure */ void PS_DecodeTIM(unsigned long *tim, GsIMAGE *img, int *texture_page) { RECT r; GsGetTimInfo(tim+1,img); /* Copy TIM data to frame buffer */ setRECT(&r,img->px,img->py,img->pw,img->ph); LoadImage (&r,img->pixel); setRECT(&r,img->cx,img->cy,img->cw,img->ch); LoadImage (&r,img->clut); /* Wait for data to be loaded */ DrawSync(0); *texture_page=GetTPage(img->pmode,0,img->px,img->py); } /* END OF FILE */