Path: chuka.playstation.co.uk!argonet.co.uk!argbc08 From: R Fred Williams Newsgroups: scea.yaroze.freetalk,scee.yaroze.freetalk.english Subject: Re: Net Yaroze Tutorial Preview Date: Mon, 21 Sep 1998 20:48:51 BST Organization: ArgoNet, but does not reflect its views Lines: 86 Distribution: world Message-ID: References: <360587BD.5668FFB0@bigfoot.com> <36064067.123D@manc.u-net.com> Reply-To: R Fred Williams NNTP-Posting-Host: userk707.uk.uudial.com X-Newsreader: NewsAgent 0.84 for RISC OS X-NNTP-Poster: NewsHound v1.37ß2 Xref: chuka.playstation.co.uk scea.yaroze.freetalk:984 scee.yaroze.freetalk.english:2428 Hiya... Just read through. Good one. If you can stick at it (and it looks like being a *long* job, so good luck!), this should be superb... And now for the criticism (don't treat this as being harsh, please, 'tis in my nature to be "picky" ;) ) In article <36064067.123D@manc.u-net.com>, James Shaughnessy wrote: > Darco wrote: > > RECT screen_c; > I think this would be the best time to tell them that the display > area defaults to the upper left 320x240 of the 1Mb 1024x512 frame > buffer, with a nice diagram too perhaps. Organisation of the display area should be a *massively* important piece of a Yaroze tutorial, and really needs a chapter all to itself. But I agree, the "this is a good place to put the screen" would make a good intro to it at this stage. If the "how come the PAL conversions are all letterboxed?" whingers *knew* that most NTSC games stick the palettes under the screenspace and fill the right hand side with 256*256 textures, making full-256-high conversion such a dog, they'd (probably not, thinking about it, hohum...) soon shut up ;) > Also the macro setRECT should be taught from the start I think, as > it really tidies thing up (no need to tell them that it's a macro and > not a libps.h function yet though :), so you could do this: > RECT screen; > setRECT(&screen, 0, 0, 320, 240); Hmmm. personally I do almost all my RECTs as something like:- static RECT screen = {SCN_VRAM_X,SCN_VRAM_Y,SCN_WIDTH,SCN_HEIGHT}; -where the constants are defined in a header, to allow for easy vram shuffling. This has the additional benefits at being (literally) infinitely faster (unless GCC's got a hell of a lot better at optimising since last time I checked its output), and taking up about half the memory. But all this kinda thing is ultimately personal preference. -and, for a future tutorial, the fact that "x" and "w" are in "16-bit lumps", rather than "pixels" is something that *really* needs emphasising by the time you arrive at doing texture maps. > // The above setRECT line is eqivalent to doing these 4 lines: > // screen.x = 0; // .x .y is the top left coordinate of > // screen.y = 0; // the frame buffer we want to clear > // screen.w = 320; // .w is the width of the RECT > // screen.h = 240; // .h is the height of the RECT While we're critisising, if a newbie doesn't know about "\n", they're *certainly* not going to know that the gcc "c" compiler understands c++ "//" comments... Though they could prolly guess that from the context! > It is a brilliant thing you're doing as so many assumptions are > made that people are familiar with C, it's great that a total beginner > has a full explanation of everything rather than the all too common: > "I'd better put that bit of code in as it doesn't work otherwise..." Agreed. The "this is why this bit of code is here" stuff is *very* good in this first tutorial. I pretty much love it, really. The colour coding works (though I'd've used different colours ;) ) Oh, and the "to recap" cut'n'paste bit at the end is *essential*, coz I find interspersed code & discussion pretty difficult to follow as code. Bravo for remembering it. (oh, I *will* put the source to P2 up eventually, honest, it just needs a little tidying!) ttfn Fred -- R. Fred Williams PushyII... for the Acorn http://www.argonet.co.uk/users/rfredw & PSX Yaroze http://www.netyaroze-europe.com/~RFREDW