Topic : The VGA Training Program
Author : Grant Smith
Page : << Previous 10  Next >>
Go to page :


is draw in the next line on the right hand side, move it,
draw the next line, move it etc. etc. Tah-Dah! You have a scrolly! Fairly
simple, isn't it?



  How do we scroll up or down?

To scroll up or down is also fairly simple. This can be used for 'movie
credit' endings (I once wrote a little game with a desert scrolling down
with you being a little robot on the bottom of the screen). The theory is
this : Draw the top line (or bottom line) then move the entire screen :

  [Pascal]

             Move  (mem[vga:0],mem[vga:320],63680);
                       { 64000 - 320 = 63680 }

  [C++]

             memcpy (vga, vga+320, 63680);


For scrolling down, or :

  [Pascal]

             Move (mem[vga:320],mem[vga:0],63680);

  [C++]

             memcpy (vga+320, vga, 63680);


For scrolling up. You then draw the next line and repeat.

Because of the simplicity of coding in a scrolly, most demos have one. It
is usually best to have something extra happening on the screen so that
the viewer doesn't get too bored, even, as I say, if it is only a really nice
picture.



  In closing

The University of Natal, Durban, Science Dept., now has 10 new 486's!
This is a great boon, as now I can program nice routines during frees
(even though I am a Commerce Student (Shhhhh) ;-) ). I can now use those
previously wasted hours that I spent socialising and making friends
coding instead ;-)

I suggest you get a copy of TEXTER, for coding demos with fonts, or in fact
almost any graphics application, it is an amazing help, and we have used it
for *ALL* our demos. (P.S. We have written many demos, but many have been
written for companies and have not been released for the general public)
NOTE : For TEXTER's test program TEST.PAS, add {$X+} {$R-} if you have range
checking on (I code with it off.)

            [  "I'm from the Computer Inspection Agency, sir,
                   I'm here to check your computer. Here is
                   my identification."
               "Certainly. Have a look, I'm clean. I don't have
                   any pirated software."
               The C-man pushes past him and sits in front of the
                   computer. He notes the fact that the computer
                   is currently off with a look of disdain. He
                   makes a note on his clipboard. He boots up.
               "What is this?" he asks, pointing at the screen.
               "It's MasterMenu" stutters the man. "I wrote it
                   myself!"
               "Do you know what the penalty is for using junk
                   like this on a private machine?" The C-man smiles.
                   "This is a two-month sentance in itself!"
               "I'm sorry sir! It won't happen again!"
               "I know. I'll make sure of that." He smiles again.
               The C-man runs through the hard drive, checking for
                   illeagal software, bad programs and anti-government
                   propaganda. He notes with satisfaction that he has
                   enough to put this weenie away for ten years, not that
                   it mattered. He usually could just make something up.
               He comes to the last entry on the aphebetised menu tree.
                   His hands jerk away from the keyboard. Then, tentatively,
                   he types in the three letters of doom. He looks at the
                   man, who is backing away with wide eyes and his hands
                   outstretched in front of him, as if to ward off a blow.
               The C-man smiles, his lips a thin, hard line.
               "Windows!"
                                                                     ]
                                                           - Grant Smith
                                                               1:55pm
                                                                 16/9/93

Cheers,
  - Denthor


--==[ PART 6 ]==--



[Note: things in brackets have been added by Snowman.  The original text
has remained mostly unaltered except for the inclusion of C++ material]



Introduction

Hi there! I'm back, with the latest part in the series : Pregenerated
arrays. This is a fairly simple concept that can treble the speed of
your code, so have a look.

I still suggest that if you haven't got a copy of TEXTER that you get it.
This is shareware, written by me, that allows you to grab fonts and use
them in your own programs.

I downloaded the Friendly City BBS Demo, an intro for a PE BBS, written
by a new group called DamnRite, with coder Brett Step. The music was
excellent, written by Kon Wilms (If I'm not mistaken, he is an Amiga
weenie ;-)). A very nice first production, and I can't wait to see more
of their work. I will try con a local BBS to allow me to send Brett some
fido-mail.

If you would like to contact

Page : << Previous 10  Next >>