Path: chuka.playstation.co.uk!news From: "Nigel Critten" Newsgroups: scee.yaroze.freetalk.english Subject: Re: BG Maps Date: Tue, 13 Mar 2001 17:17:58 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 64 Message-ID: <98lku0$h8r1@www.netyaroze-europe.com> References: <98h41o$7i11@www.netyaroze-europe.com> <98idjo$eo92@www.netyaroze-europe.com> NNTP-Posting-Host: host213-122-13-214.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 I've thought about doing it that way before, it depends how much hassle I have with the BG stuff, I've had a good read of it this time, I'm using tUME for the maps so I hope to use them, I can always write an exporter for tUME for a specific format... should be fun :) I've also ripped the code apart and put it back together its a little bit cleaner now, I've a new main loop which has finally allowed me to exit cleanly so it's a bit quicker developing now because I'm not resetting the Yaroze every 5 minutes :) should have done it ages ago. And I've also started a new diary on my Yaroze website, like I say nobody reads them but i found them very useful, 5 months afterwards it nice to see what you were thinking :) Thanks again for the help so far... Nigel "Derek da Silva" wrote in message news:98idjo$eo92@www.netyaroze-europe.com... Hi These might be useful - both progs use the BG functions. www.netyaroze-europe.com/~shaughnj/ftp/bgedit.zip www.netyaroze-europe.com/~shaughnj/ftp/bgview.zip Or, you can avoid using the lib function and use something similar to this : u_long scrolly, scrollx; // map scroll offsets u_char bg_data[NTILEH][NTILEW]; tile.w = 16; tile.h = 16; void draw_bg(void) { u_long x, y, mx, my, ox, oy; ox = scrollx & 15; oy = scrolly & 15; for (y=0, my=scrolly>>4; y<=8; y++, my++) { tile.y = (y<<4)-oy; for (x=0, mx=scrollx>>4; x<=20; x++, mx++) { tile.x = (x<<4)-ox; tile.u = (bgdata[my][mx]%16)<<4; tile.v = (bgdata[my][mx]/16)<<4; GsSortFastSprite(&tile,&WorldOT,0); } } } cheers Derek