Path: chuka.playstation.co.uk!news From: "Cookie" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Newbie needs basic help Date: Tue, 20 Nov 2001 09:49:05 +1300 Organization: PlayStation Net Yaroze (SCEE) Lines: 107 Message-ID: <9tbr0p$iq3@www.netyaroze-europe.com> References: <9t4jt2$ob41@www.netyaroze-europe.com> <01c16fc2$8b592ba0$2f3be4d5@pal-s-omnibook> <9t76in$ob42@www.netyaroze-europe.com> <9tb0qt$iq1@www.netyaroze-europe.com> NNTP-Posting-Host: 202.37.124.253 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Doh, im an idiot! ( no comments please :) ) Yes i cut ,pasted and concatenated the wrong bit of code :) it was late i guess. looks like ive pasted half of the packet code and half of the worldTags Code.. Sorry, and thanks for your explanantion below... ive got a better understanding of it now.. woo hoo my first bit of code compiled last night, so im on my way :) look out for more stupid/beginner questions, though this time, i promise to paste the correct information. Thanks Greg ( who's feeling like a big idiot ) "Alex Herbert" wrote in message news:9tb0qt$iq1@www.netyaroze-europe.com... > Hi Greg, > > > GsOT_TAG WorldTags[2][NO_OF_SPRITES*sizeof(GsSPRITE)]; > > This is nonsense and is not the way to define the OTs. OT_TAGs should be > defined: > > GsOT_TAG WorldTags[2][1< > where OT_LENGTH is the bit depth of your ordering table. > > The OT is used to represent the z-axis with each array element representing > a point or plane along the z-axis, 0 being closest to the screen. So, if > your OT_LENGTH is defined as 4, then you'll have a 4-bit z-axis giving a > range of 0 to 15. Similarly, an OT_LENGTH of 14 will yield a z-axis depth > of 16384. > > If you're working in 2D then the z-axis is used for sprite priorities. I.e. > sprites with lower priorities appear in front of sprites with higher > priorities. If several sprites are sorted at the same priority then the > first one sorted will appear on top. > > The reason the array is 2 dimensional is because an OT (being a table) is a > 1 dimensional array, and you've got 2 of them - the one you're preparing and > the one the GPU is drawing. Note that when calling GsClearOt and GsDrawOt, > a pointer to either WorldTags[0] or WorldTags[1] is used to select which of > the 2 OTs should be cleared/drawn. > > Check out pages 17-18 of the Library Reference which sort of give an > explanation - ish. Also look at the source code for the 'check' program on > the Yaroze CD. > > Hope this helps. > > Alex > > > "Greg Cook" wrote in message > news:9t76in$ob42@www.netyaroze-europe.com... > > Thanks for the explanation of the struct stuff, thats great.. > > > > as for the second part.. i think i asked the question wrong. > > > > From looking at the reference manual how did you know to define the code > > below? > > > > GsOT_TAG WorldTags[2][NO_OF_SPRITES*sizeof(GsSPRITE)]; > > > > looking at the reference manual theres not example of how to define/use > the > > structure, so how did you know to define it as 2d? i know the example code > > that sony has supplied shows it define like what is abo ve, but apart from > > seeing that would anyone of known how to define/use the structure. > > > > again not sure if im putting the question the right way, all im trying to > > say is i wouldnt of known to write the code like above from just looking > at > > the reference manual ( i wouldnt of known to use 2 dimensions etc ) the > only > > way i know how to do it is because theres a sample bit of code provided by > > sony.. > > > > anyways i'll keep playing > > > > Greg > > > > > > >