Path: chuka.playstation.co.uk!news From: "Mario Wynands" Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: Is this possible? Date: Tue, 9 Feb 1999 13:13:14 +1300 Organization: Sidhe Interactive Lines: 73 Message-ID: <79nu4b$1do4@chuka.playstation.co.uk> References: <36bbe459.2503062@news.scea.sony.com> <36BB4EE9.9825937E@vmlabs.com> <36bd6d86.3448161@news.scea.sony.com> NNTP-Posting-Host: p28-max2.wlg.ihug.co.nz X-Newsreader: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Jesse Palmer wrote in message <36bd6d86.3448161@news.scea.sony.com>... >Thanks, that's a great idea! I'm a beginner at the moment, I have a >question. Is it possible to simply draw a single poly? or do you need >to create an object then rotate,trans,project it? Just use a semi-trans GsBOXF (a 2d rectangle) and modify the colour values. See below for snippet from "Fading.." thread on scee.yaroze.programming.2d_graphics. Robert Swan wrote in message <35a51a8f.15816166@www.playstation.co.uk>... >On Sat, 9 May 1998 20:06:08 +0200, "Anders Clerwall" > wrote: > >>Hi.. I've seen some fading done in many Yaroze programs.. How's it done? >>If I LoadImage(&pic, (u_long *)picaddr); how do I fade it up/down to/from >>black??? I really wanna do this.. please help! > >The answer is not to modify the image that you are LoadImage-ing, but >to draw a semitransparent rectangle over the top of it after it is >copied to screen. > >Using the GsBOXF rectangle handler (found in your Library Reference, >page 45) you can do the following - > >GsBOXF FadingRect; >u_long tTemp1; > >FadingRect.x = FadingRect.y = 0; >// top left corner at (0,0) > >FadingRect.w = 320; >FadingRect.h = 240; >// specify width and height. This will vary depending on screen mode > >FadingRect.attribute += (1<<30) + (2<<28); >// (1<<30) sets it to be drawn semitransparently >// (2<<28) specifies the rectangle to subtract from the background > >for (tTemp1=0; tTemp1<256; tTemp1++) > { > FadingRect.r = FadingRect.g = FadingRect.b = (u_char) tTemp1; > // set the colour of the box to go from transparent to opaque > GsSortBoxFill(&FadingRect, &OTableHeader[CurrentBuffer], 0); > // (see Lib Ref page 148) Send rectangle to ordering table at > // front > } > >Obviously the loop wouldnt work as it is, it needs to be incorporated >into the screen drawing routine, so that every time the screen updates >the rgb members of the rectangle increase each time. When the rgb >values are 255 then the screen will be blank. > >Robert Swan >rs108@mdx.ac.uk >http://www.netyaroze-europe.com/~middex2 If you need more help feel free to email me. Regards Mario Wynands Sidhe Interactive Sony Playstation Software Development House Email mario@sidhe.co.nz Website www.sidhe.co.nz