Commit 067c4362 by kollo

version 1.12-1

parent b3404ae1
' Displays Atari-ST 8*16 fixed Fonts (c) Markus Hoffmann
scale=2
text$="This example demonstrates the use of the old Atari-ST fonts!"+chr$(14)+chr$(15)+" We used "
color get_color(65535,65535,0)
fileselect "FONT-Laden","./*.fnt","",f$
if len(f$)
if exist(f$)
open "I",#1,f$
text$=text$+f$
f$=input$(#1,4096)
close #1
for i=0 to 256
text$=text$+chr$(i)
next i
endif
@text(text$)
endif
endif
pause 10
quit
procedure text(t$)
local i
for i=0 to len(t$)-1
char=peek(varptr(t$)+i) and 255
@char(x,y,char)
vsync
pause 0.1
add x,8*scale
if x>=640
x=0
add y,16*scale
endif
next i
return
procedure char(x,y,c)
local i,j
for i=0 to 15
for j=0 to 7
if btst(peek(varptr(f$)+c+i*256),7-j)=0
pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
endif
next j
next i
return
' Displays Atari-ST 8*16 fixed Fonts (c) Markus Hoffmann
scale=2
color get_color(65535,65535,0)
sizew ,scale*16*16+32,scale*16*16
f1$=param$(2)
f2$=param$(3)
print "font1: ";f1$
print "font2: ";f2$
if exist(f1$) and exist(f2$)
open "I",#1,f1$
open "I",#2,f2$
ff1$=input$(#1,4096)
ff2$=input$(#2,4096)
close #1,#2
endif
for i=0 to 15
for j=0 to 15
@char1(j*scale*8,i*scale*16,i*16+j)
@char2(scale*8*16+30+j*scale*8,i*scale*16,i*16+j)
vsync
next j
next i
stop
open "O",#1,"out.fnt"
for i=0 to 255
for j=0 to 15
print #1,chr$(peek(varptr(f$)+i+j*256));
next j
next i
close
quit
procedure text(t$)
local i
for i=0 to len(t$)-1
char=peek(varptr(t$)+i)
@char(x,y,char)
vsync
add x,8*scale
if x>=640
x=0
add y,16*scale
endif
next i
return
procedure char1(x,y,c)
local i,j
for i=0 to 15
for j=0 to 7
if btst(peek(varptr(ff1$)+i+c*16),7-j)=0
pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
endif
next j
next i
return
procedure char2(x,y,c)
local i,j
for i=0 to 15
for j=0 to 7
if btst(peek(varptr(ff2$)+i+c*16),7-j)=0
pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
endif
next j
next i
return
' Displays Atari-ST 8*16 fixed Fonts (c) Markus Hoffmann
scale=2
text$="This example demonstrates the use of the old Atari-ST fonts!"+chr$(14)+chr$(15)+" We used "
color get_color(65535,65535,0)
fileselect "FONT-Laden","./*.fnt","",f$
if len(f$)
if exist(f$)
open "I",#1,f$
text$=text$+f$
f$=input$(#1,4096)
close #1
for i=0 to 256
text$=text$+chr$(i)
next i
endif
@text(text$)
endif
endif
open "O",#1,"out.fnt"
for i=0 to 255
for j=0 to 15
print #1,chr$(peek(varptr(f$)+i+j*256));
next j
next i
close
quit
procedure text(t$)
local i
for i=0 to len(t$)-1
char=peek(varptr(t$)+i)
@char(x,y,char)
vsync
add x,8*scale
if x>=640
x=0
add y,16*scale
endif
next i
return
procedure char(x,y,c)
local i,j
for i=0 to 15
for j=0 to 7
if btst(peek(varptr(f$)+c+i*256),7-j)=0
pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
endif
next j
next i
return
' Displays Atari-ST 8*16 fixed Fonts (c) Markus Hoffmann
scale=2
weiss=get_color(65535,65535,0)
n=19
o=-1
x=0
y=0
text$=""
print n,o
f$=param$(2)
if exist(f$)
open "I",#1,f$
l=lof(#1)
print int(n*4096/l*100);"%"
seek #1,n*4096+862+6*256
f$=input$(#1,4096)
close #1
for i=0 to 256
text$=text$+chr$(i)
next i
endif
@text(text$)
endif
inc o
open "O",#1,"ST-font-8-16.fnt"
print #1,f$;
close #1
quit
procedure text(t$)
local i
for i=0 to len(t$)-1
char=peek(varptr(t$)+i) and 255
@char(x,y,char)
vsync
add x,8*scale
if x>=640
x=0
add y,16*scale+1
endif
next i
return
procedure char(x,y,c)
color 0
pbox x,y,x+8*scale,y+16*scale
color weiss
local i,j
for i=0 to 15
for j=0 to 7
if btst(peek(varptr(f$)+c+i*256),7-j)=0
pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
endif
next j
next i
return
' Displays 8*16 fixed Fonts (c) Markus Hoffmann
scale=1
text$="This example demonstrates the use of the PC (console) fonts!"+" We used "
color get_color(65535,65535,0)
fileselect "load PC-FONT","/usr/share/kbd/*.fnt","",f$
if len(f$)
if exist(f$)
open "I",#1,f$
text$=text$+f$
f$=input$(#1,4096)
close #1
for i=0 to 256
text$=text$+chr$(i)
next i
endif
@text(text$)
endif
pause 10
quit
procedure text(t$)
local i
for i=0 to len(t$)-1
char=peek(varptr(t$)+i) and 255
@char(x,y,char)
vsync
add x,8*scale
if x>=640
x=0
add y,16*scale
endif
next i
return
procedure char(x,y,c)
local i,j,t$
print c
' for i=0 to 15
' for j=0 to 7
' if btst(peek(varptr(f$)+i+c*16),7-j)=0
' pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
' endif
' next j
' next i
t$=mid$(f$,c*16+1,16*2)
put_bitmap t$,x,y,8,16
return
......@@ -2,12 +2,12 @@ color get_color(65535,0,0)
pbox 0,0,640,400
' Test der Rsrc-Funktionen
' Es koennen ATARI ST *.RSC-Files verwendet werden...
' v.1.11
color get_color(0,65535,0)
for i=0 to 30
circle 320,200,i*5
circle 320,200,i*5
next i
text 10,10,"Mit der rechten Maustaste geht es weiter."
fileselect "RSC-Laden","./rsc/*.rsc","",f$
......@@ -27,7 +27,13 @@ count=0
adr=rsrc_gaddr(0,count)
while adr<>-1
print count,adr
print form_do(adr)
print "CENTER"
~form_center(adr,x,y,w,h)
~form_dial(0,x,y,w,h,x,y,w,h)
~form_dial(1,x,y,w,h,x,y,w,h)
print form_do(adr)
~form_dial(2,x,y,w,h,x,y,w,h)
~form_dial(3,x,y,w,h,x,y,w,h)
inc count
adr=rsrc_gaddr(0,count)
wend
......
' Utility to convert ATARI ST RSC Files to GUI Files
' (c) Markus Hoffmann 2003 (letzte Bearbeitung: 10.07.2003)
'
' (c) Markus Hoffmann 2003 (letzte Bearbeitung: 10.08.2003)
' 27.01.2005
'
i=1
outputfilename$="b.gui"
......@@ -49,11 +49,11 @@ else
endif
quit
procedure intro
print "GEM RSC to GUI Converter V.1.08 (c) Markus Hoffmann 2003"
print "GEM RSC to GUI Converter V.1.09 (c) Markus Hoffmann 2003"
version
return
procedure using
print "Usage: bas2x11basic [options] file..."
print "Usage: rsc2gui [options] file..."
print "Options:"
print " -h, --help Display this information"
print " -o <file> Place the output into <file>"
......@@ -63,9 +63,10 @@ procedure convert
rsc$=input$(#1,lof(#1))
close #1
colors$()=["WHITE","BLACK","RED","GREEN","BLUE","CYAN","YELLOW","MAGENTA","LWHITE","LBLACK","LRED","LGREEN","LBLUE","LCYAN","LYELLOW","LMAGENTA"]
open "O",#2,outputfilename$
print #2,"' rsc2gui V.1.08 ("+f$+")"
print #2,"' rsc2gui V.1.09 ("+f$+")"
print #2,"' (c) Markus Hoffmann "+date$+" "+time$
spaces=0
@header(varptr(rsc$))
......@@ -81,7 +82,7 @@ procedure convert
if nfrstr>0
for i=0 to nfrstr-1
text$=@getchar$(varptr(rsc$)+@lswap(lpeek(varptr(rsc$)+frstradr+4*i)))
print #2,"FREESTR_"+str$(i)+": STRING="+chr$(34)+text$+chr$(34)
print #2,"FREESTR_"+str$(i)+": FREESTR STRING="+chr$(34)+text$+chr$(34)+""
next i
endif
print #2,"' ----- End of INPUT -----"
......@@ -199,6 +200,8 @@ procedure doobj(idx,parent)
typ$="ICON"
else if obtype=32
typ$="TITLE"
else if obtype=33
typ$="CICON"
else if obtype=42
typ$="ALERTTYP"
else
......@@ -231,6 +234,54 @@ procedure doobj(idx,parent)
print #2,", JUST=";just;
print #2,", COLOR=";color;
print #2,", BORDER=";border;
else if obtype=23
bitblk=varptr(rsc$)+obspec
iw=@dswap(dpeek(bitblk+4))
ih=@dswap(dpeek(bitblk+6))
ix=@dswap(dpeek(bitblk+8))
iy=@dswap(dpeek(bitblk+10))
ic=@dswap(dpeek(bitblk+12))
data$=@inlineconv$(varptr(rsc$)+@lswap(lpeek(bitblk)),ih*iw)
print #2,", IW=";str$(iw);
print #2,", IH=";str$(ih);
print #2,", IX=";str$(ix);
print #2,", IY=";str$(iy);
print #2,", IC=";str$(ic);
print #2,", DATA="+chr$(34)+data$+chr$(34);
else if obtype=31 or obtype=33
iconblk=varptr(rsc$)+obspec
text$=@getchar$(varptr(rsc$)+@lswap(lpeek(iconblk+8)))
char=@dswap(dpeek(iconblk+12))
xchar=@dswap(dpeek(iconblk+14))
ychar=@dswap(dpeek(iconblk+16))
if char and 255
print #2,", CHAR='";chr$(char);"'";
print #2,", XCHAR=";str$(xchar);
print #2,", YCHAR=";str$(ychar);
endif
print #2,", TEXT="+chr$(34)+text$+chr$(34);
xicon=@dswap(dpeek(iconblk+18))
yicon=@dswap(dpeek(iconblk+20))
wicon=@dswap(dpeek(iconblk+22))
hicon=@dswap(dpeek(iconblk+24))
print #2,", XICON=";str$(xicon);
print #2,", YICON=";str$(yicon);
print #2,", WICON=";str$(wicon);
print #2,", HICON=";str$(hicon);
xtext=@dswap(dpeek(iconblk+26))
ytext=@dswap(dpeek(iconblk+28))
wtext=@dswap(dpeek(iconblk+30))
htext=@dswap(dpeek(iconblk+32))
print #2,", XTEXT=";str$(xtext);
print #2,", YTEXT=";str$(ytext);
print #2,", WTEXT=";str$(wtext);
print #2,", HTEXT=";str$(htext);
mask$=@inlineconv$(varptr(rsc$)+@lswap(lpeek(iconblk)),hicon*wicon/16*2)
data$=@inlineconv$(varptr(rsc$)+@lswap(lpeek(iconblk+4)),hicon*wicon/16*2)
print #2,", DATA="+chr$(34)+data$+chr$(34);
print #2,", MASK="+chr$(34)+mask$+chr$(34);
else
char=asc(right$(mkl$(obspec)))
framesize=asc(mid$(mkl$(obspec),3,1))
......@@ -282,7 +333,16 @@ procedure doobj(idx,parent)
if obflags and 256
print #2,"INDIRECT+";
endif
if obflags and (65535 xor 255 xor 256)
if obflags and 0x0200
print #2,"FL3DIND+";
endif
if obflags and 0x0400
print #2,"FL3DACT+";
endif
if obflags and 0x0800
print #2,"SUBMENU+";
endif
if obflags and (65535 xor 0xfff)
print #2,"MOREFLAGS(%";bin$(obflags,16,16,1);")";
endif
endif
......@@ -350,3 +410,30 @@ function lswap(v)
a$=mkl$(v)
return cvl(right$(a$)+mid$(a$,3,1)+mid$(a$,2,1)+left$(a$))
endfunc
function inlineconv$(adr,l)
local t$,a$,ll
ll=l
while l>3
a$=chr$(peek(adr+ll-l))+chr$(peek(adr+ll-l+1))+chr$(peek(adr+ll-l+2))
t$=t$+chr$(36+(peek(varptr(a$)) and 0xfc)/4)
t$=t$+chr$(36+(peek(varptr(a$)) and 0x3)*16+(peek(varptr(a$)+1) and 0xf0)/16)
t$=t$+chr$(36+(peek(varptr(a$)+1) and 0xf)*4+(peek(varptr(a$)+2) and 0xc0)/64)
t$=t$+chr$(36+(peek(varptr(a$)+2) and 0x3f))
sub l,3
wend
if l
a$=chr$(peek(adr+ll-l))
if l>1
a$=a$+chr$(peek(adr+ll-l+1))
endif
if l>2
a$=a$+chr$(peek(adr+ll-l+2))
endif
a$=a$+mkl$(0)
t$=t$+chr$(36+(peek(varptr(a$)) and 0xfc)/4)
t$=t$+chr$(36+(peek(varptr(a$)) and 0x3)*16+(peek(varptr(a$)+1) and 0xf0)/16)
t$=t$+chr$(36+(peek(varptr(a$)+1) and 0xf)*4+(peek(varptr(a$)+2) and 0xc0)/64)
t$=t$+chr$(36+(peek(varptr(a$)+2) and 0x3f))
endif
return t$
endfunc
Summary: Example basic program sourcefiles for X11-Basic
Vendor: Markus Hoffmann
Name: X11Basic-examples
Version: 1.09
Version: 1.11
Release: 4
Copyright: GPL
Group: Development/Languages
......
' output of inline.bas for X11-Basic 26.04.2004
' fnt.fnt 4096 Bytes.
fnt$=""
fnt$=fnt$+"$*=Z?J<$=J=J3$%D<*%b$$$$&%TZ<[@8)%4@+$$$$$$$$$$@+%48)+AG1ET,$$$$"
fnt$=fnt$+"$$$$$%D@aP3Z+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$$*%T2%T2+'ET<$%bCD$$"
fnt$=fnt$+"$$$*'ET\@'D@'D<$CK\$$$$$'EH?*UD<*%D<*%D<*%D<*%D<*%D<*%D<Z1F<@$$$"
fnt$=fnt$+"$$$$*%D$CK\$*%D$$$$$$$$$$$,bC($&3KU$$$$$$$$$2*U(?'D$$$$$$$$$$$$$"
fnt$=fnt$+"$'E`C+T\$$$$$$$$$$$$$$$$$$$$$$$$$%D`3%D$$$$$$$$$$%`4X1%4@&$$$$$$"
fnt$=fnt$+"$$$TB(E,6(D$$$$$$$$$$$$$0(D<0*%\$$$$$$$$$$$$$+D<0%E,0$$$$$$$$$$$"
fnt$=fnt$+"$3_b$$$$$$$$$$$$$$$$$$$$"
font$=inline$(fnt$)
dim l$(15)
@text("Hallo")
for i=0 to 15
print l$(i)
next i
quit
procedure text(t$)
local i
for i=0 to len(t$)-1
@char(peek(varptr(t$)+i))
next i
return
procedure char(a)
local i,j
print chr$(a)
for j=0 to 15
for i=0 to 7
if btst(peek(varptr(font$)+16*a+j),7-i)
l$(j)=l$(j)+"WW"
else
l$(j)=l$(j)+" "
endif
next i
print
next j
return
text$="Test, das ist der Test"+chr$(10)+chr$(0)
link #1,"/usr/lib/libncurses.so"
exec sym_adr(#1,"initscr")
exec sym_adr(#1,"cbreak")
exec sym_adr(#1,"noecho")
exec sym_adr(#1,"nonl")
stdscr=sym_adr(#1,"stdscr")
exec sym_adr(#1,"intrflush"),L:stdscr,0
exec sym_adr(#1,"keypad"),L:stdscr,1
lptr=sym_adr(#1,"LINES")
cptr=sym_adr(#1,"COLS")
exec sym_adr(#1,"printw"),L:varptr(text$)
for i=0 to 16
exec sym_adr(#1,"attron"),2^(16+i)
exec sym_adr(#1,"printw"),L:varptr(text$)
exec sym_adr(#1,"attroff"),2^(16+i)
next i
' newwin=exec(sym_adr("subwin"),stdscr,1,21,10,35)
exec sym_adr(#1,"refresh")
c=exec(sym_adr(#1,"getch"))
exec sym_adr(#1,"endwin")
print "c=";c
print "Screen: Lines: ";lpeek(lptr);" Columns: ";lpeek(cptr)
unlink #1
quit
......@@ -6,11 +6,11 @@
phi=0
do
cls
print at(10,9);"Bresenham X11-Basic (c) Markus Hoffmann 2003"
print at(ROWS/2-1,COLS/2-20);"Bresenham X11-Basic (c) Markus Hoffmann 2003"
xx=2*(11+10*cos(phi1/180*pi))
xxx=2*(20-19*cos(phi2/180*pi))
yy=11+10*sin(phi1/180*pi)
yyy=11-10*sin(phi2/180*pi)
xxx=2*(COLS/4-19*cos(phi2/180*pi))
yy=ROWS/2+(ROWS/2-1)*sin(phi1/180*pi)
yyy=ROWS/2-(ROWS/2-1)*sin(phi2/180*pi)
@gline(xx,yy,xxx,yyy)
flush
pause 0.03
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Index of /examples/console</TITLE>
</HEAD>
<BODY>
<H1>Index of /examples/console</H1>
<PRE><IMG SRC="/icons/blank.gif" ALT=" "> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A>
<A HREF="?S=A">Size</A> <A HREF="?D=A">Description</A>
<HR>
<IMG SRC="/icons/back.gif" ALT="[DIR]"> <A HREF="/examples/">Parent Directory</A> 11-Sep-2003 18:17 -
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="console_clock.bas">console_clock.bas</A> 5k<A HREF="../screenshots/console_clock.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="g_line.bas">g_line.bas</A> 2k <A HREF="../screenshots/g_line.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="laufschrift.bas">laufschrift.bas</A> 24k <A HREF="../screenshots/laufschrift.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="maze.bas">maze.bas</A> 2k <A HREF="../screenshots/maze.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="timetext.bas">timetext.bas</A> 25k <A HREF="../screenshots/timetext.png">(Screenshot)</A>
</PRE><HR>
<ADDRESS>Apache/1.3.26 Server at x11-basic.sourceforge.net Port 80</ADDRESS>
</BODY></HTML>
......@@ -33,7 +33,7 @@ do
for k=0 to len(lauf$)*b step 1
print at(1,1);
for i=0 to h-1
print mid$(zeile$(i),k,79)
print mid$(zeile$(i),k,COLS-1)
next i
pause 0.1
next k
......
<TITLE>Directory listing of examples/games</TITLE>
<H1>Directory listing of examples/games</H1>
<PRE><A HREF="..">Up to higher level directory</A><BR>
<A HREF="atomium.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> atomium.bas</A> 24 Kb Sun Dec 30 23:01:48 2001 <a href="atomium.png">Screenshot</a>
<A HREF="atomium.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> atomium.bas</A> 24 Kb Sun Dec 30 23:01:48 2001 <a href="../screenshots/atomium.png">Screenshot</a>
<A HREF="civil-war.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> civil-war.bas</A> 9 Kb Jun 27 00:02
<A HREF="crap.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> crap.bas</A> 3 Kb Jun 22 20:16
<A HREF="lander.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> lander.bas</A> 3 Kb Jun 27 00:04 <a href="lander.png">Screenshot</a>
<A HREF="lander.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> lander.bas</A> 3 Kb Jun 27 00:04 <a href="../screenshots/lander.png">Screenshot</a>
<A HREF="last.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> last.bas</A> 4 Kb Sun Apr 4 14:55:42 1999
<A HREF="TicTacToe.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> TicTacToe.bas</A> 3 Kb Sun Apr 4 14:55:42 1999 <a href="TicTacToe.png">Screenshot</a>
<A HREF="TicTacToe.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> TicTacToe.bas</A> 3 Kb Sun Apr 4 14:55:42 1999 <a href="../screenshots/TicTacToe.png">Screenshot</a>
<A HREF="zahlenrate.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> zahlenrat...</A> 1 Kb Tue Sep 4 00:54:14 2001
</PRE>
Programme zur Visualisierung der Daten eines GPS-Empfaengers
(c) Markus Hoffmann 01/2002
04/2004
01/2005
getestet fuer GARMIN etrex Europa
tested for GARMIN etrex Europa and GARMIN etrex Venture
garmin.bas --- das Frontend fuer den GPS-Empfaenger
gps-time.bas --- gets time from GPS-Receiver
gps-screen.bas --- gets a screenshot from GPS-Receiver
tracks/europa.track --- Kuestenlinie Europas
tracks/world.track --- alle Kuestenlinien aller Kontinente
Note on serial device settings:
There is q mysterious bug in X11-Basic which sometimes prevents from setting the
correct device parameters. If you can not connect to your GPS receiver
please invoke minicom once to configure the device settings.
' gets a screendump from a Garmin GPS-Receiver
' e.g. the Garmin Etrex (c) Markus Hoffmann 2005
'
'
devicename$="/dev/ttyS1"
outputfilename$="screen.xpm"
clr interactive,showit
@loadsettings(env$("HOME")+"/.garminrc")
WHILE LEN(param$(i))
IF LEFT$(param$(i))="-"
IF param$(i)="--help" OR param$(i)="-h"
@intro
@using
ELSE IF param$(i)="--version"
@intro
QUIT
ELSE IF param$(i)="--interactive"
interactive=TRUE
ELSE IF param$(i)="--show" OR param$(i)="-s"
showit=TRUE
ELSE IF param$(i)="-o"
INC i
IF LEN(param$(i))
outputfilename$=param$(i)
ENDIF
else
collect$=collect$+param$(i)+" "
ENDIF
ELSE
' devicename$=param$(i)
' IF NOT EXIST(devicename$)
' PRINT "gps-screen: "+devicename$+": file or path not found"
' quit
' ENDIF
ENDIF
INC i
WEND