Path: chuka.playstation.co.uk!news From: "Gareth" Newsgroups: scee.yaroze.beginners Subject: LoadImage sending me to the loony farm Date: 7 Mar 1999 22:51:34 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 59 Message-ID: <01b9eb4c$79110640$1a92a6c3@gareth> NNTP-Posting-Host: 26.hiper03.shef.dialup.force9.net X-Newsreader: Microsoft Internet News 4.70.1161 Oh well, here goes... I know a lot of more experienced people out there are gonna be hacked off with another stupid question, but what's up with this code? What it's supposed to do is copy a .tim from RAM to VRAM so that it's displayed on the frame buffer every cycle but for some reason it just doesn't show up. It's not like I haven't done this before I've had great success using LoadImage in the past. I've spent pretty much all weekend looking at other people's code and demos and tuts but none of it has helped. It's driving me crazy! ARRGGGGHHH!!! I've tried a putpixel function and that worked fine so I know the buffers are set up okay. I've tried my .tim in other programs and it's displayed, then I tried editing these programs code and PSComUtil kept reporting an error on data fetch or something?! Well, enough yammering here's the source from the main function, should be pretty self explanetory. Gareth! I hope it doesn't drive any of you crazy too... void main(void) { GsIMAGE green; RECT dest; init_game (); // Set up the screen res, d/buffer and joypads active_buffer = GsGetActiveBuff(); // Initialise the active_buffer variable GsGetTimInfo ((u_long *) (LOGO_ADDR + 4), &green); if (green.ph == 256) printf ("TIM Loaded successfully"); dest.x = 0; dest.w = green.pw; dest.h = green.ph; while (! PAD_PRESS (buffer1, PAD_CROSS)) // Exit when X pressed on controller 1 { GsSetWorkBase ((PACKET *) gpu_packet_area [active_buffer]); GsClearOt (0, 0, &ordering_table [active_buffer]); dest.y = active_buffer * SCREEN_HEIGHT; LoadImage (&dest, green.pixel); DrawSync (0); VSync(0); GsSwapDispBuff(); GsSortClear (0, 0, 0, &ordering_table [active_buffer]); GsDrawOt (&ordering_table [active_buffer]); active_buffer = 1 - active_buffer; // Flip the active_buffer } ResetGraph(3); }