Article View: comp.sys.atari.st
Article #23484Re: Hexmines v1.2
From: Chris Herborth
Date: Mon, 25 Jan 1993 16:50
Date: Mon, 25 Jan 1993 16:50
50 lines
2489 bytes
2489 bytes
In <8698@laas.laas.fr>, Jean-Etienne Doucet writes:
> Quite a long time ago, I've asked -- on the net -- if there were
> some ways to simulate the GET/PUT GFA Basic instructions in C ?
> (Preferably HSC)
Nobody answered?!? Sheesh! We all must've been in a flame war or
something... ;-)
> So what ? I stick to GFA Basic for writing games and only use
> C for writing programs with no (or little) graphics
IMHO, GFA BASIC is nasty and hellishly incompatible... Hopefully I
won't start another flame war by saying that.
> For people who don't know what GET and PUT are:
> GET x1,y1,x2,y2,CH$
> copy the screen portion given by x1,x2,y1,y2 into the string CH$
> PUT x,y,CH$
> copy back the screen portion in CH$ as a rectangle with x,y being
> the upper left point coordinates.
Have you done any VDI programming? It needs a little bit of setting up,
but not too much. And it'll generally work in any resolution...
vro_cpyfm() is the function you're after:
Copy Raster, Opaque
int vid_handle, mode, points[8];
struct fdbstr
{
int *fd_addr; /* ptr to image data area [just a buffer] */
int fd_w; /* width in pixels */
int fd_h; /* height in pixels */
int fd_wdwidth; /* image width in words (ie, 16-bits) */
int fd_stand; /* standard format or ST format flag */
int fd_nplanes; /* number of colour bit planes */
int fd_r1, fd_r2, /* reserved for future use */
fd_r3;
} src, dst;
vro_cpyfm( vdi_handle, mode, points, &src, &dst );
For more info, grab a VDI book, or beg someone for sample code... ;-)
I'd type the rest of the manual page, but it's quite long. Useful mode
values are 3 (replace dst with src), 6 (XOR dst with src).
--
-------------------========================================-------------------
Chris Herborth
cherborth@semprini.tdkcs.waterloo.on.ca
Technical Details
Message-ID:
<H.ea.dl0lu3NFGmA@semprini.tdkcs.waterloo.on.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!opl.com!hri.com!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!uunet.ca!xenitec!tdkcs.waterloo.on.ca!semprini.tdkcs.waterloo.on.ca!cherborthReferences:
<H.ea.kVX8Hq&7qfI@semprini.tdkcs.waterloo.on.ca> <8698@laas.laas.fr>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!opl.com!hri.com!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!uunet.ca!xenitec!tdkcs.waterloo.on.ca!semprini.tdkcs.waterloo.on.ca!cherborth From: cherborth@semprini.tdkcs.waterloo.on.ca (Chris Herborth) Newsgroups: comp.sys.atari.st Subject: Re: Hexmines v1.2 Message-ID: <H.ea.dl0lu3NFGmA@semprini.tdkcs.waterloo.on.ca> Date: 25 Jan 93 16:50:58 GMT References: <H.ea.kVX8Hq&7qfI@semprini.tdkcs.waterloo.on.ca> <8698@laas.laas.fr> Reply-To: cherborth@semprini.tdkcs.waterloo.on.ca Organization: InterZONE Design Lines: 50 X-Software: HERMES GUS 1.04 Rev. Sep 5 1992