Re: multiple video pages?

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Mon, 21 Apr 1997, Joshua Milligan wrote:
>I was having difficulty and am hoping that someone can help me.  What I want to
>do is to load a gif image on a hidden screen and then save sections of
>the image
> into some sequences.  I thought that either changing the active page or the
> display page while I did this would work I can't seem to find a graphics mode
> that supports more than one video page and supports 640 by 480 resolution.
>
> So what I want is a graphics mode that supports more than one video
>page, 640 by
> 480 pixel graphics, and preferably 256 color (although I'd settle for 16 if I
> had to.)  So far I've had no luck.  I've tried to following modes (* indicates
> that it does not seem to support more than one video page, ^ indicates that it
> doesn't seem to be compatible with my system):  18*, 19*(not 640 by
>480), 257*,
> 258^, 259^, 260^, and 261^.
>
> Is there a mode that I overlooked?  Would a mode that I mentioned above actual
ly
> work, but I just didn't realize it?  Is there another way of hiding something
> from the user without using a different active/display video page?  I'd
> appreciate any help anyone can give.

when you load the image, it is stored as a sequence.  Just index into that
sequence y,x and grab the section you want.

something like:
image=read_gif("botswana.gif")
temp=image[2] -- this is the data of the image

if you want the 50x80 section of the image starting at pixel location
{10,30} you would

section=repeat(0,80)  --dimention the sequence for 80 lines high
for i = 1 to 80 do
section=temp[i+29][10..59] -- grab the 50 pixels from 10 to 59 starting
                              at y=30.
end for

do this for whatever section you need.


Michael Packard
Lord Generic Productions
lgp at exo.com http://exo.com/~lgp
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu