home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************/
- /* ClassX Amiga Rexx script - Copyright © 1997 ClassX Development */
- /******************************************************************/
-
- /*
- $VER: TUT_FontGroviera.rexx 3.0
- */
-
- /*
- #ITA "Tutorial Font Groviera"
- #INF "Esempio guidato interattivo per la"
- #INF "creazione di un font in stile Groviera."
- #END
- */
-
- /*
- #ENG "Tutorial Cheesy Font"
- #INF "Interactive guided example to"
- #INF "create a cheese-looking font."
- #END
- */
-
-
- MYPORT = 'FontMachine'
-
- IF ~SHOW('P', MYPORT) THEN DO
- IF EXISTS('FontMachine:FontMachine') THEN DO
- ADDRESS COMMAND 'Run >NIL: FontMachine:FontMachine'
- DO 30 WHILE ~SHOW('P',MYPORT)
- ADDRESS COMMAND 'Wait >NIL: 1 SEC'
- END
- END
- ELSE DO
- SAY "FontMachine could not be loaded."
- EXIT 10
- END
- END
-
- IF ~SHOW('P', MYPORT) THEN DO
- SAY 'FontMachine Rexx port could not be opened.'
- EXIT 10
- END
-
- ADDRESS VALUE MYPORT
- OPTIONS RESULTS
- OPTIONS FAILAT 10000
-
- /* Make sure rexxsupport library is opened */
- IF ~SHOW('L','rexxsupport.library') THEN CALL ADDLIB('rexxsupport.library',0,-30)
-
- /******************************************************************/
-
- /* language support */
-
- LockGui
- GetLocale
-
- Select
- /* italiano */
- when FM_RESULT = "ITA" then do
- TXT_01 = '"Tutorial: come costruire un font stile Groviera"'
- TXT_02 = '"Risoluzione 8 colori"'
- TXT_03 = '"Caricare font Balloon di 100 punti"'
- TXT_04 = '"Tessitura di fronte Brush:Groviera"'
- TXT_05 = '"Settaggio palette appropriata"'
- TXT_06 = '"Settare mappatura tessiture a RndMap (mappatura casuale)"'
- TXT_07 = '"Settare uno Sbalzo di 3 punti, parte illuminata Alto-Sinistra"'
- TXT_08 = '"Settare un Ombra di 8 punti, posizione Basso-Destra"'
- TXT_09 = '"Pronto ! Vuoi salvare il ColorFont ?"'
- TXT_10 = '"Ok|Annulla"'
- TXT_11 = '"Fine Tutorial"'
- end
-
- /* english or default language */
- when FM_RESULT = "ENG" then do
- TXT_01 = '"Tutorial: how to make a Cheesy font"'
- TXT_02 = '"Set resolution to 8 colours"'
- TXT_03 = '"Load font Balloon, 100 points"'
- TXT_04 = '"Load front texture Brush:Groviera"'
- TXT_05 = '"Set the appropriate cheesy palette"'
- TXT_06 = '"Set texture mapping to RndMap (random mapping)"'
- TXT_07 = '"Set the Emboss attribute to 3 pixels, lighted Up-Left"'
- TXT_08 = '"Set the Shadow attirbute to 8 pixels, direction Down-Right"'
- TXT_09 = '"Ready. Do you want to save the ColorFont ?"'
- TXT_10 = '"Ok|Cancel"'
- TXT_11 = '"End Tutorial"'
- end
- end
-
-
- FreeTexture FRONT
- FreeTexture BORDER
- SetAttr "Emboss" 0
- SetAttr "Bevel" 0
- SetAttr "3D" 0
- SetAttr "Shadow" 0
- SetAttr "Outline" 0
- SetAttr "OutTexture" 0
-
- Request '"FontMachine"' TXT_01 'Ok'
- Request '"FontMachine"' TXT_02 'Ok'
- Resolution 3
-
- Request '"FontMachine"' TXT_03 'Ok'
- LoadFont "Balloon.font" 100
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_04 'Ok'
- LoadTexture "Front" "Brush" "FontMachine:Brush/Groviera"
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_05 'Ok'
- EditPal 1 0 0 0
- EditPal 2 72 33 0
- EditPal 3 145 67 0
- EditPal 4 217 100 0
- EditPal 5 221 121 0
- EditPal 6 222 140 0
- EditPal 7 223 159 0
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_06 'Ok'
- SetMapMode "MappedRnd"
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_07 'Ok'
- SetAttr "Emboss" 3 "UL"
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_08 'Ok'
- SetAttr "Shadow" 8 "DR" 1
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_09 TXT_10
- IF (FM_RESULT) THEN DO
- SaveFont "Fonts:BalloonC" "108.8C"
- IF (RC) THEN DO
- Request '"ARexx Error"' '"'FM_ERROR'"' 'Ok'
- END
- CALL WaitRedraw (FM_RESULT)
- END
-
- Request '"FontMachine"' TXT_11 'Ok'
-
- UnLockGui
- EXIT
-
- /******************************************************************/
-
- WaitRedraw:
- ARG Res
- /* wait the rendering of the font */
- DO WHILE Res ~= 0
- CheckRedraw
- Res = FM_RESULT
- ADDRESS COMMAND 'Wait >NIL: 1 SEC'
- END
- RETURN
-
- /******************************************************************/
-