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:18:34 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 143 Message-ID: <9i81vq$dor8@www.netyaroze-europe.com> References: <9i4n4l$b931@www.netyaroze-europe.com> <9i4sa2$b933@www.netyaroze-europe.com> <9i7ktj$dor5@www.netyaroze-europe.com> <9i810e$dor6@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 Were we reading eachother's minds? Alex "John ( QuietBloke )" wrote in message news:9i810e$dor6@www.netyaroze-europe.com... > Im not quite sure what your after Max.. > > The bg Work area is an area of memory you allocate which the Libraries need > to use when displaying the tiled background. > The formulae doesnt relate to number of pixels on the screen just like the > size of a GsSPRITE doesnt relate to the number of pixels. > Its merely how much space is required by the libraries to process and > display your tileset. > > Also I cant see how the formulae can return a float. > > What your really after is an explanation of exactly what the libraries do in > order to display a tileset and therefore why they need to use exactly that > amount of space to do thier thing. > > Id be very interested to fnd out the exact details myslef but looking at the > formulae you could make a fairly reasonable stab at some of it: > > > My Rough guess work says the formulae is : > > (ScreenW/CellW+1) = maximum number of tiles which can appear on screen in > the x direction > > (ScreenH/CellH+1+1) = maximum number of tiles which can appear on screen in > the y direction + 1. I still have no idea why you need to add another one > here. > > Multipy the two together to gives total number of tiles we need to be store > information about. > > Multipy the result by 6 = For each tile the Library functions need this much > work space to do its thing. I Guess this would be stuff like GsCell info + > phsical screen position. > > Then add an additional 4 u_longs = I guess these are required to store > additional information about the whole displayable tileset ( at a guess this > might be to hold something like the x/y offset within the top/left tile > corresponding to pixel 0,0) > > Muliply the result by 2 = A long shot but maybe just like the > gpu_buffer we require 2 buffers. > > Finally add another 2 u_longs = Dunno.. Guess the tileset needs some more > global information. Perhaps an offset where the second buffer exists within > the workspace and which buffer we are currently working on ? > > > Then again I could be way off and totally wrong.. In which case can someone > give the real reason for the formulae ? It would be intersting to know how > the formulae came to be. > > Cheers > John ( QuietBloke ) > With more insane ramblings > > > "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 > > > > > > > > > > > > > > > > > > > >