Article View: dnet.graphik
Article #19Animation in Turbo C
From: Ruediger Kolb
Date: Thu, 06 Dec 1990 10:35
Date: Thu, 06 Dec 1990 10:35
39 lines
2414 bytes
2414 bytes
------------------------------------------------------------------------------
Date: Wed, 05 Dec 90 18:31:47 EST
From: RQUAZI@SBCCVM
Subject: Animation in Turbo C
Title: animation in Turbo C
Forum: Computer Science
Does anyone know how to perform graphics animation of sprites (using the
Getimage and Putimage functions found in <graphics.h>) so that the background
behind a sprite is not corrupted, and so that the background is not hidden
by the whole 'box' of the sprite? Normally, using putimage will place the
image on the screen in a rectangular 'box', which apart from drawing the
sprite, also draws the portions of the sprite which are not 'essential'.
For example if I wanted to draw and store a little stick figure, getimage
would store the whole image in a 'box' including the background, and later
when 'put' against say a white background, the sprite would be drawn with
its box. How can I get around this problem? Any help would be appreciated.
I have been able to do this provided the sprite colours are different from
the background, simply by storing the background behind where the sprite is
supposed to be, putting the sprite using COPY_PUT, and then putting the
background using AND_PUT. Also, the sprite colour in this case must be
higher than the background in order for the AND_PUT to work properly.
.-----------------------------.
| Rishad J. Quazi |
| RQUAZI@SBCCVM.BITNET |
| RQUAZI@CSSERV1.IC.SUNYSB.ED |
`-----------------------------'
* * * E n d o f e n t r y * * *
--
Ruediger Kolb Phone: +49-2241-14-2644
GMD e-mail:
Postfach 1240 kolb@gmdzi
D-5205 Sankt Augustin kolb@f3.gmd.dbp.de
Technical Details
Message-ID:
<3679@gmdzi.gmd.de>Path:
arc1-ca.pugleaf.net!gmdzi!kolbShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 115c6e,8fe3f67655336a3,start X-Google-Attributes: gid115c6e,public X-Google-ArrivalTime: 1990-12-06 02:35:02 PST Path: arc1-ca.pugleaf.net!gmdzi!kolb From: kolb@gmdzi.gmd.de (Ruediger Kolb) Newsgroups: dnet.graphik Subject: Animation in Turbo C Message-ID: <3679@gmdzi.gmd.de> Date: 6 Dec 90 10:35:01 GMT Distribution: dnet Organization: GMD, Sankt Augustin, F. R. Germany Lines: 39 Approved: kolb@gmdzi.UUCP