diff --git a/aide.c b/aide.c index 2f75a041..c2ccb35b 100644 --- a/aide.c +++ b/aide.c @@ -6,6 +6,7 @@ #include "divers.h" #include "graph.h" #include "moteur.h" +#include "tables_aide.h" #include @@ -19,66 +20,83 @@ void Afficher_aide(void) { - byte * Curseur; - byte * Curseur_initial; - word Debut_de_fonte; - short X; // Indices d'affichage d'un caractŠre + short X; // Indices d'affichage d'un caractère short Y; short Position_X; // Parcours de remplissage du buffer de ligne short Indice_de_ligne; // 0-15 (16 lignes de textes) - short Indice_de_caractere; // Parcours des caractŠres d'une ligne + short Indice_de_caractere; // Parcours des caractères d'une ligne short Ligne_de_depart=Position_d_aide_en_cours; - short Longueur_de_ligne; // Longueur en char d'une ligne de texte short Repeat_Menu_Facteur_X; short Repeat_Menu_Facteur_Y; short Pos_Reel_X; short Pos_Reel_Y; + int Curseur; short Largeur; // Largeur physique d'une ligne de texte + char TypeLigne; // N: Normale, T: Titre, S: Sous-titre + // -: Ligne inférieur de sous-titre + const unsigned char * Ligne; Pos_Reel_X=Fenetre_Pos_X+(13*Menu_Facteur_X); Pos_Reel_Y=Fenetre_Pos_Y+(19*Menu_Facteur_Y); - for (Curseur=Table_d_aide[Section_d_aide_en_cours].Debut_de_la_liste; - Ligne_de_depart>0; - Ligne_de_depart--) - Curseur+=( (*Curseur) & 0x7F )+1; - for (Indice_de_ligne=0;Indice_de_ligne<16;Indice_de_ligne++) { // On affiche la ligne - Debut_de_fonte =((*Curseur) & 0x80)?147:0; - Indice_de_caractere=((*Curseur) & 0x7F); - Curseur++; + Ligne = Table_d_aide[Section_d_aide_en_cours].Table_aide[Ligne_de_depart + Indice_de_ligne]; + TypeLigne = Ligne[0]; + // Si c'est une sous-ligne de titre, on utilise le texte de la ligne précédente + if (TypeLigne == '-' && (Ligne_de_depart + Indice_de_ligne > 0)) + Ligne = Table_d_aide[Section_d_aide_en_cours].Table_aide[Ligne_de_depart + Indice_de_ligne - 1]; + // On ignore le premier caractère + Ligne++; + // Calcul de la taille + Largeur=strlen(Ligne); + // Les lignes de titres prennent plus de place + if (TypeLigne == 'T' || TypeLigne == '-') + Largeur = Largeur*2; - Curseur_initial=Curseur; - Longueur_de_ligne=Indice_de_caractere; - Largeur=Longueur_de_ligne*Menu_Facteur_X*6; - - // Pour chaque ligne dans la fenˆtre: + // Pour chaque ligne dans la fenêtre: for (Y=0;Y<8;Y++) { - Curseur=Curseur_initial; Position_X=0; - - // On cr‚e une nouvelle ligne … splotcher - for (Indice_de_caractere=0;Indice_de_caractere 315) + Curseur = 1; // '!' affiché pour les caractères non prévus + for (X=0;X<6;X++) for (Repeat_Menu_Facteur_X=0;Repeat_Menu_Facteur_X #include @@ -187,7 +187,6 @@ void Charger_DAT(void) byte * Fonte_temporaire; byte Pos_X; byte Pos_Y; - word Mot_temporaire; struct stat Informations_Fichier; @@ -285,38 +284,8 @@ void Charger_DAT(void) if (fread(Fonte_help,1,315*6*8,Handle)!=(315*6*8)) Erreur(ERREUR_DAT_CORROMPU); - // Lecture des différentes sections de l'aide: - - // Pour chaque section "Indice" de l'aide: - for (Indice=0;Indice+ stops the program when you") + AIDE_TEXTE(" are entering values. So don't press") + AIDE_TEXTE(" these keys until we fix this bug.") + AIDE_TEXTE(" - A few different key combinations return") + AIDE_TEXTE(" the same code.") + AIDE_TEXTE(" - A red flash appears at start up when an") + AIDE_TEXTE(" empty Zip drive is found.") + AIDE_TEXTE(" - Some functions aren't finished yet.") + AIDE_TEXTE(" This is normal for a Beta version, so") + AIDE_TEXTE(" don't worry.") + AIDE_TEXTE(" But if you still find some bugs in the") + AIDE_TEXTE(" next versions, then we'd appreciate") + AIDE_TEXTE(" that you tell us what they exactly are") + AIDE_TEXTE(" and how and when they occur.") +}; +static const char * TableAide2[] = +{ + AIDE_TITRE("REGISTERING ?") + AIDE_TEXTE("") + AIDE_TEXTE(" You'll probably say:") + AIDE_TEXTE(" \"Does this mean that I have to pay?\"") + AIDE_TEXTE("") + AIDE_TEXTE(" And we'll reply to you: No...") + AIDE_TEXTE("") + AIDE_TITRE("GRAFX 2.00 IS FREEWARE") + AIDE_TEXTE("") + AIDE_TEXTE(" ... But, but, but...") + AIDE_TEXTE("") + AIDE_TEXTE(" Considering the amount of work (and love)") + AIDE_TEXTE(" we put in this program, we would extremely") + AIDE_TEXTE(" appreciate that you \"give\" us something in") + AIDE_TEXTE(" exchange for the use you make of it.") + AIDE_TEXTE(" Let's say some money, or a nice picture") + AIDE_TEXTE(" you drew with GrafX2, or a postcard...") + AIDE_TEXTE("") + AIDE_TEXTE(" If you make profit with an image you drew") + AIDE_TEXTE(" with GrafX2, it would be great if you sent") + AIDE_TEXTE(" us this picture. If you used it for a game,") + AIDE_TEXTE(" would be wiser not to send all your graphs,") + AIDE_TEXTE(" what about sending a copy of the game?") + AIDE_TITRE("") + AIDE_TITRE("FREEWARE CONVENTIONS:") + AIDE_TEXTE("") + AIDE_TEXTE(" This version of GrafX2 is being released") + AIDE_TEXTE(" to you as is.") + AIDE_TEXTE(" All bugs should be reported to either") + AIDE_TEXTE(" Robinson or X-Man.") + AIDE_TEXTE(" The authors take no responsibility for") + AIDE_TEXTE(" lost work, or damaged equipment caused") + AIDE_TEXTE(" directly or indirectly by this program.") + AIDE_TEXTE(" GrafX2 cannot be modified in any way") + AIDE_TEXTE(" without our written consent.") + AIDE_TEXTE(" Finally, the charging of monetary fees by") + AIDE_TEXTE(" any unauthorized party for the circulation") + AIDE_TEXTE(" or use of this utility is expressly") + AIDE_TEXTE(" forbidden.") + AIDE_TEXTE(" This means that if you had to pay for") + AIDE_TEXTE(" getting GrafX2, you have been swindled.") +}; +static const char * TableAide3[] = +{ + AIDE_TITRE("GREETINGS:") + AIDE_TEXTE("") + AIDE_TEXTE("Our best regards go to...") + AIDE_TEXTE("") + AIDE_TEXTE(" Access Filter Pink") + AIDE_TEXTE(" Ace Fiver Pixel") + AIDE_TEXTE(" AcidJam Flan Profil") + AIDE_TEXTE(" Acryl Fred Prowler") + AIDE_TEXTE(" Alexel FreddyV Puznik") + AIDE_TEXTE(" Alias Frost Quick") + AIDE_TEXTE(" Amiral Ga‰l(GDC) Ra") + AIDE_TEXTE(" Arrakis GainX Raster") + AIDE_TEXTE(" Avocado Gandalf Ravian") + AIDE_TEXTE(" Baloo Goblin RedBug") + AIDE_TEXTE(" Barti Greenpix7 Rem") + AIDE_TEXTE(" Bat Grid Rez") + AIDE_TEXTE(" Biro GrosQuick Roudoudou") + AIDE_TEXTE(" Bisounours HackerCroll Sacrilege") + AIDE_TEXTE(" BlackAxe Haplo Sam") + AIDE_TEXTE(" Bonnie Hof SandMan") + AIDE_TEXTE(" Boo Hornet Scape") + AIDE_TEXTE(" Boz Hulud S‚bastien") + AIDE_TEXTE(" Carine Java Shodan") + AIDE_TEXTE(" Chandra JBT Skal") + AIDE_TEXTE(" Cheetah J‚r“me Skyfire") + AIDE_TEXTE(" Chill Julien(JCA) Sphair") + AIDE_TEXTE(" Cougar KalMinDo Sprocket") + AIDE_TEXTE(" Cremax KaneWood Stef") + AIDE_TEXTE(" Cyclone Karma Stony") + AIDE_TEXTE(" Dake Keith303 Sumaleth") + AIDE_TEXTE(" Danny Lazur Sunday") + AIDE_TEXTE(" Danube LightShow Suny") + AIDE_TEXTE(" Darjul Lluvia Sybaris") + AIDE_TEXTE(" Darwin Louie TBF") + AIDE_TEXTE(" DarkAngel Luk Tempest") + AIDE_TEXTE(" Das Made Thor") + AIDE_TEXTE(" Decker Mamos TMK") + AIDE_TEXTE(" DerPiipo Mandrixx TwoFace") + AIDE_TEXTE(" Destop Mangue Underking") + AIDE_TEXTE(" Diabolo Mars Unreal") + AIDE_TEXTE(" DineS Mephisto VaeVictis") + AIDE_TEXTE(" Drac Mercure Vastator") + AIDE_TEXTE(" DrYes Mirec Vatin") + AIDE_TEXTE(" Edyx Moa Veckman") + AIDE_TEXTE(" Eller Moxica Wain") + AIDE_TEXTE(" Ellyn MRK Wally") + AIDE_TEXTE(" EOF Nitch WillBe") + AIDE_TEXTE(" Fall Noal Xoomie") + AIDE_TEXTE(" Fame Nytrik Xtrm") + AIDE_TEXTE(" Fantom Optic YannSulu") + AIDE_TEXTE(" Fear Orome Z") + AIDE_TEXTE(" Feather Pahladin Zeb") + AIDE_TEXTE(" Fennec Phar Zebig") + AIDE_TEXTE(" and all #pixel, #demofr and #coders.") +}; + +struct Section_d_aide Table_d_aide[NB_SECTIONS_AIDE] = +{ + {TableAide1, sizeof(TableAide1)/sizeof(const char **)}, + {TableAide2, sizeof(TableAide2)/sizeof(const char **)}, + {TableAide3, sizeof(TableAide3)/sizeof(const char **)} +};