ÜÜÜÜÜÜ Ü ÜÛßßÛÛÛÛÛÛÜ Ü Û ÛÛÛÛÛÛß ÜÜÛÛÛÛÛÛÛÛÛÛÛÛÛß ÜÜÜÜÜÜÜÜÜÜ ßÜÛ Ü ÜÜÜÜÜÜÜÜÜ °ß ÞÛÛßÛÛ ÜÛÛßßß ßÛß ÜÜÛÛÛÛÛÛÛÛÛÛÛÛÛÜ ÛÛÛÛÜ ÜÛÛÛÛÛÛÛÛÛÛÛÜ ° ÛÛÝ ÞÛ ÛÛ ° ÛÛßß ÜÜÜÜÜÜÜÜÜ ßÛ Û Ü Ü Ûß Ü Û ÛÛ Û ßÛ ÛÛß Ûß ßÜÜ ÜÜÛÛß ÛÜ ßÝ Ü ÞÛÝ ÞÛ Û ÜÜÜÜÛÜÜÜÜÜ ÛÛ Û ßÜ ßÛÛ ßÛÛÛÛÛÛÛÛÜ ÛÛ Û ÛÜ ß° ßÛ ÛÛÜ Û ÜßßÜ Û ÛÛÛ °ßßßßßßßß²²Ü ÛÛ Ü Û ßÛÜ ° ÛÛ ßÜ ° ßÜ Û ÛÛÛ ßÛÛ ÞÛ ÜÛÛÛÜ Û ßÛÜ ÛÛÜ ßÜÜÜÜÜ ÜÜß ÛÛ ÛÛÛ Ü ÜÛÛ ÜÜ ÛÜ ° ÜÛÛ ßÛÛÜÜ Ü ÜÜÛÜ ßÛÛÜÜÜÜÜ ßß ÜÜÛÛÛ ÛÛ ÜÛ ß Üܲ²Û ß Û ß ÜÛÛ °ßßÛÜ ßßÛÛÛÛÛÛÛÛÛÛÜ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ÜÛÛ ÛÛÛÛÛÛÛÛÛÛÛß ° ÝßÜÜÜÛÛßß ° kP°ßÛÛÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ ÜÜ Ü Ü Ü Ü Ý ß ß ß Ü Üß ßÜÛ Ûßß Ûß± Ûß± Ûß± Ü ß ß Ü ß ÜßÜ Û ²ÜÜ ²ÜÛ ²ßÜ ²ßß <´EGiS CoRP TuToRiaL SeRiES ú úú-ÄÄÄÄÄÄÄÄÄÄÄÄ--úú ú ChaPTeR 1 ú úú-ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ--úú ú DiSPLaYiNG STRiNGS WiTH eFFeCTS By LoNE RuNNeR WARNING ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ WARNING : If you want to learn PPL from scratch, the AEGiS Tutorial series are not for you... the tutorial series are intended to sysops that already have some basis on PPL programming, it is only here to give you hints and ideas or simply to show you some different wayz to do different things... However, if you never tried to code somme PPE's but you know how to code in basic or pascal, you should have no problem to transfer your skills on PPL! Also, if you think that we don't have anything to learn you, don't read this and delete it from your disk... this file is not here to say "Hey man! look, this is the way it HAS to be done coz we are the best!"... we just want to give some hints to all the sysops that need it or that want to see others coding technics.. everybody code diferent... so there is allways something to learn from a source code... WHAT ARE THE TUTORIAL SERIES ? ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Why using other group's PPE's when it is so easy to make your own ones...? This is after asking such a question to sysop (a good friend of mine), and after he answered "coz i cannot find the fucking way to do what i want!" that i decided to begin the tutorial series... In thoses tutorials, you will find the basics to begin PPE coding, and i hope you will begin to make some good releases and, why not, join the Aegis Corp crew ! ;) CHAPTER 1 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Today we will have a look to the different methods on how to display strings with some visual effects... We have to examples (see AGSTUT1.PPS) : PrintFade() PrintScramble() The first procedure will write a string with a fading effect... The seconf procedure will write a string with a scramble effect... PRINTFADE() ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ With this procedure, we want to add a fading effet to the string beeing displayed... for example we can put each character in color 8 (dark grey) then change it's color to 7 (grey), and finish with the color 15 (white). This will make a nice visual effect... i think ;) PRINTSCRAMBLE() ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ With this procedure, we have a precise wish on what have to be the effect... the string has to appear in a scramble way, that is in fact that each character will be displayed normally but in a random order... The first way to do it is the flat way : we take randomly a character from the string to print, and we put it in the right place... with or without trying to verify if it has already be printed... and we stop when the screen contains the complete string (comparision with a ScrText(row, line, len, code)) This way will work, but if you are unlucky, you may wait for a long time before each character has been printed... So we will forget this way... The second way is more complex, but a lot more reliable... we take a string made of spaces that is as long as the string to print... so we have for example " " for "Hello, world!"... We take a reference that hold the amount of chars to be printed... so it begins with the string's length... ref = 13 Then we generate a random number from 1 to ref... for example, we have 9... we try to find the 9th space in the string : " " ^ 9th space and we replace it with the right character : " o " ^ 9th space replaced by "o" from "world" and we decrement the reference variable... Then we repeat this as long as the reference variable is not 0... here is for example the second pass : randomly generated number (from 1 to ref=12) -> 11 " o " ^ 11th space (but 12th char!) we replace it by the right char : " o d " ^ 11th space replaced by "d" from "world" at the end of the loop, we will have less and less spaces left, and it will end with a random from 1 to 1... The problem of this algorythm is that it does not handle spaces... if we replace the nth space by the corresponding character -> a space, the reference var will be decremented but the string will stay the same, and the already printed character that is a space will be replaced by another char in a futur pass... The solution consist in replacing spaces by CHR(255) that looks exactly the same that spaces, but are different in screen memory... To optimize the procedure, we won't use a special string made of spaces for working... but we will use the screen instead... so it has to contain spaces before to begin, or the procedure will go in an endless loop trying to find a free char (a space) that does not exist... FINAL PROCEDURES ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ To see the final procedures, have a look a AGSTUT1.PPS DISCLAIMER ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Do what you want with this, you have the code so you keep control over the compilation... you may use this code in whatever you want, you may destroy it, burn it, compile it or modify it, you may do what you want, but no member of AEGiS CoRP may be responsible for any damage caused by the use of this code or it's modifications... Also you can use it into your own releases, but please, don't be lame, greet us ;) FINAL WORDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Hope this will help you in customizing your PCB... If you have any comment or suggection, or if you just want to chat about PPE's and PPL, or for any other reason, don't hesitate to write us to : aegis.corp_barnabo@sparkhq.fdn.org - LoNE RuNNeR - _ _ _ ___ ___/\ _________/\ /\_____________/\________________ ___ _ _ \/\______________ / _ \/ _________ / ______________________ / __________ / _/ __/ \ ____)___\/ \ \_/ \/\___________ \/_ \ \ \_ \ \_ \__ \_ \_ / / \______\ /____________/________________/_____________/____________/kP ú-------`------'---------------------------------------------------------ú