Path: chuka.playstation.co.uk!news From: "Alex Herbert" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Have I mentioned this before... bgWorkArea? Date: Sat, 7 Jul 2001 23:11:45 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 88 Message-ID: <9i81j1$dor7@www.netyaroze-europe.com> References: <9i4n4l$b931@www.netyaroze-europe.com> <9i4sa2$b933@www.netyaroze-europe.com> <9i7ktj$dor5@www.netyaroze-europe.com> NNTP-Posting-Host: host213-1-147-88.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Hi Max, I tried to work this out before and some of it makes sense... sort of... If the bg is scrolled to the left a few pixels, an extra tile becomes visible on the right hand side of the screen making a total of 21 titles across, hence the first +1 in the formula. The same applies to the y-axis which explains the second +1. I'm not sure about the third +1, but it seems to suggest an extra word is needed per row of tiles. Can't imagine why - flags maybe? I first thought this might be a typo and left it out without any obvious problems, until I tried a high-res interlaced mode and the bottom 2 rows of tiles were getting messed up. I put the +1 back in and it all worked fine. I'm guessing that the GPU primitive for a 16x16 tile is 6 words in length and hence the *6. I'm not sure about the +4. Flags again, maybe? I think the *2 is needed for double buffering. The bgWorkArea will need to hold 2 packet workspaces as normal - the one being drawn and the one being prepared. Not sure about the last +2. Oh, and the library reference says the unit is 'long', so no idea why floats would come into it. Alex "Max" wrote in message news:9i7ktj$dor5@www.netyaroze-europe.com... > Hmm.. > > Its really the +1s and +1+1s and *6+4 etc that I don't understand besides > this usually turns up a float value which is wierd considering the Yaroze is > a 32 bit integer machine and the value you get from this formula is always > FAR bigger that you actually need. > > I don't think I'll ever figure this out :( > > Max > > Alex Herbert wrote in message > news:9i4sa2$b933@www.netyaroze-europe.com... > > Hi Max, > > > > According to the Library Reference (page 142): > > > > size=(((ScreenW/CellW+1)*(ScreenH/CellH+1+1)*6+4)*2+2) > > > > Hope this helps. > > > > Alex > > > > > > > > "Max" wrote in message > > news:9i4n4l$b931@www.netyaroze-europe.com... > > > Hey all, > > > > > > I've started up again on the 2D tutorial and I'm puzzling over this > > > bgWorkArea size. Basically I have played around with it quite a bit. I > > have > > > 320 [16x16] tiles on the screen (20 tiles width x 16 tiles height) and > my > > > bgWorkArea is (20*16)*12 = 3840, now I get the 20*16 bit - the number of > > > tiles on the screen but 12 is just an arbitiary number I put in but it > > won't > > > work with anything less. I have also tried SCREEN_WIDTH (320) * > > > SCREEN_HEIGHT (256) = 81920 (the number of pixels on the screen) but > this > > > number far outweighs what I actually need as a bare minimum... because > it > > > works with 3840. > > > > > > Can anyone tell me what the bgWorkArea size is actually mean to be? - > > > please? > > > > > > Max > > > > > > > > > > > >