home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fujiology Archive
/
fujiology_archive_v1_0.iso
/
!MAGS
/
!BONUS
/
COVERDSK
/
STFORMAT
/
STF35.ZIP
/
STF35B.MSA
/
RAYTRACE
/
SHOW512.LST
< prev
next >
Wrap
File List
|
1981-11-01
|
2KB
|
42 lines
' This program and the file SHOW512.OBJ are Public Domain
' It is strictly forbidden to use them in commercial programs !
' Use this routine in your GFA-BASIC 2.x/3.x programs to show
' GFA-RAYTRACE 512-Color pictures.
'
' This will load a picture called demo.sul.
' This picture can be created from within GFA Raytrace by using the save
' screen option. Change to demo.sch for high res.
'
RESERVE FRE(0)-21000 ! reserve memory for routines & palettes
base%=EXEC(3,"show512.obj","","") ! load routines
IF base% AND 1
ERROR base%
ENDIF ! continue only if routines loaded
@initray ! initialize routines and Palette-table
@loadray ! load 512-colors picture
CALL init% ! Mode ON
VOID INP(2) ! wait for a key
CALL exit% ! Mode OFF
SETCOLOR 0,&H777 ! now restore colors
SETCOLOR 3,0
VOID GEMDOS(73,L:HIMEM)
SUB base%,256
VOID GEMDOS(73,L:base%) ! free memory used by routines & palettes
END
'
PROCEDURE loadray
OPEN "i",#1,"demo.sul" ! open file
SEEK #1,8 ! skip file-type (used by GFA RAYTRACE)
BGET #1,XBIOS(3),32000 ! load screen
BGET #1,palbuf%,18400 ! load palettes in buffer
CLOSE #1
RETURN
'
PROCEDURE initray
ADD base%,256
palbuf%=base%+3000 ! palettes behind routines (see Reserve)
LPOKE base%,palbuf% ! start palette-buffer
init%=LPEEK(base%+4) ! 512-colors On - routine
exit%=LPEEK(base%+8) ! 512-colors Off - routine
RETURN