Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
back2root:archives:denthor:part-05 [2021/08/26 22:24] – créée frater | back2root:archives:denthor:part-05 [2023/05/18 21:06] (Version actuelle) – [In closing] frater | ||
---|---|---|---|
Ligne 121: | Ligne 121: | ||
I suggest you get a copy of TEXTER, for coding demos with fonts, or in fact almost any graphics application, | I suggest you get a copy of TEXTER, for coding demos with fonts, or in fact almost any graphics application, | ||
- | written for companies and have not been released for the general public) | + | written for companies and have not been released for the general public) |
+ | |||
+ | <WRAP round box> | ||
+ | For TEXTER' | ||
+ | </ | ||
< | < | ||
- | | + | [ |
- | | + | |
- | | + | " |
- | | + | 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. |
- | | + | " |
- | | + | "Do you know what the penalty is for using junk like this on a private machine?" |
- | | + | " |
- | | + | "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 comes to the last entry on the aphebetised menu tree. His hands jerk away from the keyboard. Then, tentatively, |
- | | + | |
+ | The C-man smiles, his lips a thin, hard line. | ||
+ | " | ||
+ | ] | ||
</ | </ | ||
Grant Smith | Grant Smith | ||
- | |||
1:55pm | 1:55pm | ||
- | |||
16/9/93 | 16/9/93 | ||
Ligne 148: | Ligne 153: | ||
Denthor | Denthor | ||
+ | ==== Code Source ==== | ||
+ | |||
+ | === PASCAL === | ||
+ | |||
+ | <code pascal> | ||
+ | (*****************************************************************************) | ||
+ | (* *) | ||
+ | (* TUT3.PAS - VGA Trainer Program 5 (in Pascal) | ||
+ | (* *) | ||
+ | (* "The VGA Trainer Program" | ||
+ | (* was limited to Pascal only in its first run. All I have done is taken *) | ||
+ | (* his original release, translated it to C++, and touched up a few things. | ||
+ | (* I take absolutely no credit for the concepts presented in this code, and *) | ||
+ | (* am NOT the person to ask for help if you are having trouble. | ||
+ | (* *) | ||
+ | (* Program Notes : This program presents the basic demo scroller. | ||
+ | (* *) | ||
+ | (* Author | ||
+ | (* *) | ||
+ | (*****************************************************************************) | ||
+ | |||
+ | {$X+} {$R-} | ||
+ | Uses Crt; | ||
+ | |||
+ | CONST VGA = $a000; | ||
+ | XSize = 16; | ||
+ | YSize = 16; | ||
+ | |||
+ | TYPE | ||
+ | Letter = Array[1..xsize, | ||
+ | Letters = Array[' | ||
+ | |||
+ | VAR Font : ^Letters; | ||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | Procedure SetMCGA; | ||
+ | BEGIN | ||
+ | asm | ||
+ | | ||
+ | | ||
+ | end; | ||
+ | END; | ||
+ | |||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | Procedure SetText; | ||
+ | BEGIN | ||
+ | asm | ||
+ | | ||
+ | | ||
+ | end; | ||
+ | END; | ||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | procedure WaitRetrace; | ||
+ | { This waits until you are in a Verticle Retrace } | ||
+ | |||
+ | label | ||
+ | l1, l2; | ||
+ | asm | ||
+ | mov dx,3DAh | ||
+ | l1: | ||
+ | in al,dx | ||
+ | and al,08h | ||
+ | jnz l1 | ||
+ | l2: | ||
+ | in al,dx | ||
+ | and al,08h | ||
+ | jz l2 | ||
+ | end; | ||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | Procedure Pal(ColorNo : Byte; R,G,B : Byte); | ||
+ | { This sets the Red, Green and Blue values of a certain color } | ||
+ | Begin | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | End; | ||
+ | |||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | Procedure PutPixel (X,Y : Integer; Col : Byte; Where : Word); | ||
+ | { This puts a pixel at X,Y using color col, on VGA or the Virtual Screen} | ||
+ | BEGIN | ||
+ | Mem [Where: | ||
+ | END; | ||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | procedure LoadPal (FileName : string); | ||
+ | { This loads the Pallette file and puts it on screen } | ||
+ | type DACType = array [0..255] of record | ||
+ | R, G, B : byte; | ||
+ | end; | ||
+ | var DAC : DACType; | ||
+ | Fil : file of DACType; | ||
+ | I : integer; | ||
+ | BEGIN | ||
+ | assign (Fil, FileName); | ||
+ | reset (Fil); | ||
+ | read (Fil, DAC); | ||
+ | close (Fil); | ||
+ | for I := 0 to 255 do Pal(I, | ||
+ | end; | ||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | function Exist(FileName: | ||
+ | { Checks to see if filename exits or not } | ||
+ | var f: file; | ||
+ | begin | ||
+ | {$I-} | ||
+ | Assign(f, FileName); | ||
+ | Reset(f); | ||
+ | Close(f); | ||
+ | {$I+} | ||
+ | Exist := (IOResult = 0) and | ||
+ | | ||
+ | end; | ||
+ | |||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | Procedure Setup; | ||
+ | { This loads the font and the pallette } | ||
+ | VAR f:file; | ||
+ | loop1:char; | ||
+ | loop2, | ||
+ | BEGIN | ||
+ | getmem (font, | ||
+ | If exist (' | ||
+ | Assign (f,' | ||
+ | reset (f,1); | ||
+ | blockread (f, | ||
+ | close (f); | ||
+ | Writeln (' | ||
+ | END | ||
+ | ELSE BEGIN | ||
+ | Writeln (' | ||
+ | For loop1: | ||
+ | For loop2:=1 to 16 do | ||
+ | for loop3:=1 to 16 do | ||
+ | font^[loop1, | ||
+ | END; | ||
+ | If exist (' | ||
+ | Writeln (' | ||
+ | ELSE | ||
+ | Writeln (' | ||
+ | Writeln; | ||
+ | Writeln; | ||
+ | Write ('Hit any key to continue ...'); | ||
+ | readkey; | ||
+ | setmcga; | ||
+ | If exist (' | ||
+ | END; | ||
+ | |||
+ | |||
+ | {ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ} | ||
+ | Procedure ScrollMsg (Msg : String); | ||
+ | { This scrolls the string in MSG across the screen } | ||
+ | Var Loop1, | ||
+ | Begin | ||
+ | For loop1:=1 to length (msg) do BEGIN | ||
+ | For loop2:=1 to xsize do BEGIN | ||
+ | |||
+ | { This bit scrolls the screen by one then puts in the new row of | ||
+ | letters } | ||
+ | |||
+ | waitretrace; | ||
+ | For Loop3 := 100 to 99+ysize do | ||
+ | move (mem[vga: | ||
+ | for loop3:=100 to 99+ysize do | ||
+ | putpixel (319, | ||
+ | { Change the -99 above to the minimum of loop3-1, which you | ||
+ | will change in order to move the position of the scrolly } | ||
+ | END; | ||
+ | |||
+ | {This next bit scrolls by one pixel after each letter so that there | ||
+ | are gaps between the letters } | ||
+ | |||
+ | waitretrace; | ||
+ | For Loop3 := 100 to 99+ysize do | ||
+ | move (mem[vga: | ||
+ | for loop3:=100 to 99+ysize do | ||
+ | putpixel (319, | ||
+ | END; | ||
+ | End; | ||
+ | |||
+ | |||
+ | BEGIN | ||
+ | ClrScr; | ||
+ | Writeln ('This program will give you an example of a scrolly. If the file' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln ('and PALLETTE.COL come with TEXTER5.ZIP, | ||
+ | Writeln; | ||
+ | Writeln ('You will note that you can change what the scrolly says merely by'); | ||
+ | Writeln (' | ||
+ | Writeln; | ||
+ | Setup; | ||
+ | repeat | ||
+ | ScrollMsg (' | ||
+ | until keypressed; | ||
+ | Settext; | ||
+ | freemem (font, sizeof (font^)); | ||
+ | Writeln ('All done. This concludes the fifth sample program in the ASPHYXIA' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln (' | ||
+ | Writeln ('I hope to hear from you soon!' | ||
+ | Writeln; Writeln; | ||
+ | Write | ||
+ | Readkey; | ||
+ | END. | ||
+ | </ | ||
+ | |||
+ | === C === | ||
+ | |||
+ | <code c> | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // TUTPROG5.CPP - VGA Trainer Program 5 (in Turbo C++ 3.0) // | ||
+ | // // | ||
+ | // "The VGA Trainer Program" | ||
+ | // was limited to Pascal only in its first run. All I have done is taken // | ||
+ | // his original release, translated it to C++ and touched up a few things. // | ||
+ | // I take absolutely no credit for the concepts presented in this code and // | ||
+ | // am NOT the person to ask for help if you are having trouble. | ||
+ | // // | ||
+ | // Program Notes : This program presents the basic demo scroller. | ||
+ | // // | ||
+ | // If you are compiling this code command line, be sure to // | ||
+ | // use the " | ||
+ | // | ||
+ | // lock up your system. | ||
+ | // // | ||
+ | // Author | ||
+ | // Translator | ||
+ | // // | ||
+ | // Last Modified : December 27, 1994 // | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | // // | ||
+ | // INCLUDE FILES // | ||
+ | // // | ||
+ | |||
+ | #include < | ||
+ | // clrscr(), getch(), kbhit() | ||
+ | #include < | ||
+ | // MK_FP, geninterrupt() | ||
+ | #include < | ||
+ | // cout | ||
+ | #include < | ||
+ | // fopen(), fread(), fclose(), FILE | ||
+ | #include < | ||
+ | // calloc(), free(), exit() | ||
+ | |||
+ | // // | ||
+ | // CONSTANTS // | ||
+ | // // | ||
+ | |||
+ | const XSize = 16; // the width of our font | ||
+ | const YSize = 16; // the height of our font | ||
+ | const NumLetters = 62; // the number of characters in our font | ||
+ | |||
+ | // // | ||
+ | // FUNCTION PROTOTYPES // | ||
+ | // // | ||
+ | |||
+ | // MODE SETTING FUNCTIONS | ||
+ | void SetMCGA(); | ||
+ | void SetText(); | ||
+ | |||
+ | // UTILITY FUNCTIONS | ||
+ | void Pal(unsigned char ColorNo, unsigned char R, | ||
+ | | ||
+ | void LoadPal(char *FileName); | ||
+ | void Putpixel(int x, int y, unsigned char Col, unsigned char *Where); | ||
+ | void WaitRetrace(); | ||
+ | int Exist(char *FileName); | ||
+ | |||
+ | // MID-LEVEL FUNCTIONS | ||
+ | void Setup(); | ||
+ | void ScrollMsg (char *Msg, int SizeMsg); | ||
+ | |||
+ | // // | ||
+ | // GLOBAL TYPEDEFs // | ||
+ | // // | ||
+ | |||
+ | typedef unsigned char Letter[XSize][YSize]; | ||
+ | |||
+ | // // | ||
+ | // GLOBAL VARIABLE DECLARATIONS // | ||
+ | // // | ||
+ | |||
+ | // pointer to the offset of the VGA memory | ||
+ | unsigned char *vga = (unsigned char *) MK_FP(0xA000, | ||
+ | |||
+ | // pointer to our index of font data | ||
+ | Letter *Font; | ||
+ | |||
+ | |||
+ | /////////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // MAIN FUNCTION | ||
+ | // // | ||
+ | /////////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void main() { | ||
+ | |||
+ | clrscr(); | ||
+ | cout | ||
+ | << "This program will give you an example of a scrolly. If the file\n" | ||
+ | << " | ||
+ | << " | ||
+ | << " | ||
+ | << "and PALLETTE.COL come with TEXTER5.ZIP, | ||
+ | cout | ||
+ | << "You will note that you can change what the scrolly says merely by\n" | ||
+ | << " | ||
+ | |||
+ | Setup(); | ||
+ | |||
+ | do ScrollMsg (" | ||
+ | getch(); | ||
+ | |||
+ | SetText(); | ||
+ | free(Font); | ||
+ | |||
+ | cout | ||
+ | << "All done. This concludes the fifth sample program in the ASPHYXIA\n" | ||
+ | << " | ||
+ | << "SMITH on the MailBox BBS, or leave a message to ASPHYXIA on the\n" | ||
+ | << " | ||
+ | << " | ||
+ | << " | ||
+ | << " | ||
+ | << " | ||
+ | << "I hope to hear from you soon!\n\n"; | ||
+ | cout | ||
+ | << "Hit any key to exit ..."; | ||
+ | getch(); | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // SetMCGA() - This function gets you into 320x200x256 mode. // | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void SetMCGA() { | ||
+ | _AX = 0x0013; | ||
+ | geninterrupt (0x10); | ||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // SetText() - This function gets you into text mode. // | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void SetText() { | ||
+ | _AX = 0x0003; | ||
+ | geninterrupt (0x10); | ||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // Pal() - This sets the Red, Green, and Blue values of a certain color. | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void Pal(unsigned char ColorNo, unsigned char R, | ||
+ | unsigned char G, | ||
+ | |||
+ | outp (0x03C8, | ||
+ | outp (0x03C9,R); | ||
+ | outp (0x03C9,G); | ||
+ | outp (0x03C9,B); | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // LoadPal() - This loads the Pallette file and puts it on screen. | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void LoadPal(char *FileName) { | ||
+ | |||
+ | typedef unsigned char DACType[256][3]; | ||
+ | DACType DAC; | ||
+ | FILE *fp; | ||
+ | int loop1; | ||
+ | |||
+ | fp = fopen(FileName," | ||
+ | fread(DAC, | ||
+ | fclose(fp); | ||
+ | |||
+ | for (loop1=0; loop1< | ||
+ | Pal(loop1, DAC[loop1][0], | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // Putpixel() - This puts a pixel at X,Y using color Col, on VGA or the // | ||
+ | // Virtual Screen; | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void Putpixel (int x, int y, unsigned char Col, unsigned char *Where) { | ||
+ | memset(Where+(x+(y*320)), | ||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // WaitRetrace() - This waits until you are in a Verticle Retrace. | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void WaitRetrace() { | ||
+ | |||
+ | _DX = 0x03DA; | ||
+ | |||
+ | l1: asm { | ||
+ | in al,dx; | ||
+ | and al,0x08; | ||
+ | jnz l1; | ||
+ | } | ||
+ | |||
+ | l2: asm { | ||
+ | in al,dx; | ||
+ | and al,0x08; | ||
+ | jz l2; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // Exist() - Checks to see if file exists or not. // | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | int Exist (char *FileName) { | ||
+ | |||
+ | FILE *fp; | ||
+ | |||
+ | if ((fp = fopen(FileName," | ||
+ | fclose(fp); | ||
+ | return 1; | ||
+ | } | ||
+ | else | ||
+ | return 0; | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // Setup() - This loads the font and the pallette. | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void Setup() { | ||
+ | |||
+ | FILE *fp; | ||
+ | int loop1, loop2, loop3; | ||
+ | |||
+ | Font = (Letter *) calloc(NumLetters, | ||
+ | |||
+ | if (Font == NULL) { // always check to make sure you have enough memory! | ||
+ | SetText(); | ||
+ | cout << "Not enough memory available, exiting program..."; | ||
+ | exit(1); | ||
+ | } | ||
+ | |||
+ | if (Exist(" | ||
+ | fp = fopen(" | ||
+ | fread(Font, | ||
+ | cout << " | ||
+ | fclose(fp); | ||
+ | } | ||
+ | else { | ||
+ | cout << " | ||
+ | for | ||
+ | for | ||
+ | for (loop3=0; loop3< | ||
+ | Font[loop1][loop2][loop3] = loop2; | ||
+ | } | ||
+ | |||
+ | if (Exist(" | ||
+ | cout << " | ||
+ | else | ||
+ | cout << " | ||
+ | |||
+ | cout << " | ||
+ | getch(); | ||
+ | |||
+ | SetMCGA(); | ||
+ | |||
+ | if (Exist(" | ||
+ | } | ||
+ | |||
+ | |||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | // // | ||
+ | // ScrollMsg() - This scrolls the string in Msg across the screen. | ||
+ | // // | ||
+ | ///////////////////////////////////////////////////////////////////////////// | ||
+ | |||
+ | void ScrollMsg (char *Msg, int SizeMsg) { | ||
+ | |||
+ | int loop1, loop2, loop3; | ||
+ | int Location = 100; // specify how far from the top of the screen we want | ||
+ | // the scroller to appear | ||
+ | |||
+ | // MAIN LOOP - do every letter in Msg | ||
+ | for (loop1 = 0; loop1 < SizeMsg; loop1++) { | ||
+ | |||
+ | // Do this loop <n> number of times where <n> = the width of a letter | ||
+ | for (loop2 = 0; loop2 < XSize; loop2++) { | ||
+ | |||
+ | // There are two loops here. | ||
+ | // | ||
+ | // 1. Copy YSize rows to the left by 1. In effect, this frees up a | ||
+ | // blank column of vertical pixels on the right side of the screen. | ||
+ | // 2. Replace that new blank column with pixels from our Font[] table. | ||
+ | |||
+ | WaitRetrace(); | ||
+ | |||
+ | for (loop3=Location; | ||
+ | // move each row to the left by 1 | ||
+ | memcpy(vga+(0+(loop3*320)), | ||
+ | |||
+ | for (loop3=Location; | ||
+ | // Replace the new column on the right with information from Font[]. | ||
+ | // In the following statement: | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | // [(Msg[loop1]-32)] - Access the correct letter from our Font | ||
+ | // table. | ||
+ | // ASCII value of the letter we want to display, | ||
+ | // but we need to subtract 32 to coordinate the | ||
+ | // ASCII value with our Font table. | ||
+ | // [loop2] | ||
+ | // [loop3-Location] | ||
+ | Putpixel (319, | ||
+ | |||
+ | } // we have now inserted a new letter on the right side of the screen | ||
+ | |||
+ | // This next bit scrolls by one pixel after each letter so that there | ||
+ | // are gaps between the letters | ||
+ | |||
+ | WaitRetrace(); | ||
+ | |||
+ | for (loop3=Location; | ||
+ | // move each row to the left by 1 (same as above) | ||
+ | memcpy( vga+(loop3*320), | ||
+ | |||
+ | for (loop3 = 100; loop3 < 100 + YSize; loop3++) | ||
+ | // put a blank column of pixels | ||
+ | Putpixel(319, | ||
+ | |||
+ | } // we have now scrolled the entire message once | ||
+ | |||
+ | } | ||
+ | </ | ||
<nspages back2root/ | <nspages back2root/ |