home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************/
- /* ClassX Amiga Rexx script - Copyright © 1997 ClassX Development */
- /******************************************************************/
-
- /*
- $VER: TUT_FontOro.rexx 3.0
- */
-
- /*
- #ITA "Tutorial Font Dorato"
- #INF "Esempio guidato interattivo per la"
- #INF "creazione di un font dorato."
- #END
- */
-
- /*
- #ENG "Tutorial Golden Font"
- #INF "Interactive guided example to"
- #INF "create a golden-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)
-
- /******************************************************************/
-
- LockGui
-
- /* language support */
- GetLocale
- Select
- /* italiano */
- when FM_RESULT = "ITA" then do
- TXT_01 = '"Tutorial: come costruire un font Dorato"'
- TXT_02 = '"Risoluzione 16 colori"'
- TXT_03 = '"Caricare font Balloon di 100 punti"'
- TXT_04 = '"Tessitura di fronte Plasma 100x100 Gold."'
- TXT_05 = '"Tessitura di bordo Pattern 100x100 Gold Linear30."'
- TXT_06 = '"Ottimizzare la palette."'
- TXT_07 = '"Settare il colore di sfondo (0) con il blu."'
- TXT_08 = '"Settare mappatura tessiture a Solido RndMap (mappatura casuale)"'
- TXT_09 = '"Settare la tessitura di bordo a 3 punti"'
- TXT_10 = '"Pronto ! Vuoi salvare il ColorFont ?"'
- TXT_11 = '"Ok|Annulla"'
- TXT_12 = '"Fine Tutorial"'
- end
-
- /* english or default language */
- when FM_RESULT = "ENG" then do
- TXT_01 = '"Tutorial: how to make a Golden font"'
- TXT_02 = '"Set resolution to 16 colours"'
- TXT_03 = '"Load font Balloon, 100 points"'
- TXT_04 = '"Load front texture Plasma 100x100 Gold"'
- TXT_05 = '"Load border texture Pattern 100x100 Gold Linear30"'
- TXT_06 = '"Optimize the palette"'
- TXT_07 = '"Set the background colour (0) with blu"'
- TXT_08 = '"Set texture mapping to Solid RndMap (random mapping)"'
- TXT_09 = '"Set the border texture to 3 pixels"'
- TXT_10 = '"Ready. Do you want to save the ColorFont ?"'
- TXT_11 = '"Ok|Cancel"'
- TXT_12 = '"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 4
-
- Request '"FontMachine"' TXT_03 'Ok'
- LoadFont "Balloon.font" 100
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_04 'Ok'
- LoadTexture "Front" "Plasma" 100 100 0
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_05 'Ok'
- LoadTexture "Border" "Pattern" 100 100 0 "Linear30"
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_06 'Ok'
- OptimizePal
-
- Request '"FontMachine"' TXT_07 'Ok'
- EditPal 0 0 0 180
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_08 'Ok'
- SetMapMode "SolidMappedRnd" 3
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_09 'Ok'
- SetAttr "OutTexture" 3
- CALL WaitRedraw (FM_RESULT)
-
- Request '"FontMachine"' TXT_10 TXT_11
- IF (FM_RESULT) THEN DO
- SaveFont "Fonts:BalloonC" "106.16C"
- IF (RC) THEN DO
- Request '"ARexx Error"' '"'FM_ERROR'"' 'Ok'
- END
- CALL WaitRedraw (FM_RESULT)
- END
-
- Request '"ARexx Message"' TXT_12 '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
-
-
- /******************************************************************/
-