Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: "Antony Arciuolo" Newsgroups: scee.yaroze.programming.2d_graphics Subject: I can't get TIM information (newbie question) Date: 30 May 1998 01:35:44 GMT Organization: SCEA News Server Lines: 83 Message-ID: <01bd8b6c$9f9df520$5c3d7bd1@skynet> NNTP-Posting-Host: 209.123.61.92 X-Newsreader: Microsoft Internet News 4.70.1161 I give up! I cannot get this to work! I'm sorry if this is a newbie issue, but it's really pissing me off! All I want to do is display the information in a GsIMAGE structure. Is that so much to ask? Here's what doesn't work... Any Ideas? /* GrafTest.c ---------- by Antony Arciuolo This is my first attempt to display an image on the screen. However I cannot even get the getTIMInfo() procedure to properly obtain the required information from the tim file. */ // INCLUDES //////////////////////////////////////////////////////////////////////////// /// #include // DEFINITIONS //////////////////////////////////////////////////////////////////////////// #define WARPED_CHECKERED_FLOOR ((u_long)0x80100000) // EXTERNALS //////////////////////////////////////////////////////////////////////////// // // GLOBALS //////////////////////////////////////////////////////////////////////////// //// // PROTOTYPES //////////////////////////////////////////////////////////////////////////// / void dumpTIMInfo(GsIMAGE *img, char *desc) { printf( "\nTIM Info for %s:\n pmode: %d\n picPos: (%d,%d)\n picDim: [%d x %d]\nclutPos: (%d,%d)\nclutDim: [%d x %d]\n---------\n", desc, img->pmode, img->px, img->py, img->pw, img->ph, img->cx, img->cy, img->cw, img->ch ); } void loadTIM(long addrOfTIMToLoad) // load up from conventional memeory into video memory { GsIMAGE timPicture; // the +4 starts the reading after the 4 byte header GsGetTimInfo((u_long *)(addrOfTIMToLoad+4), &timPicture); dumpTIMInfo(&timPicture, "Checkered Pattern"); } // MAIN //////////////////////////////////////////////////////////////////////////// /////// int main (void) { loadTIM(WARPED_CHECKERED_FLOOR); }