Mouse chaser

Cool ways to do cool things.
rutger
Posts: 21
Joined: Tue Sep 16, 2008 8:27 pm

Mouse chaser

Post by rutger »

Here's my entry for the challenge on the Justbasic forum

Code: Select all

nomainwin
    gosub [sb1]
    gosub [writebmp]
    loadbmp "sb1bmp","xxqqyyzzrutger.qyx"
    gosub [sb2]
    gosub [writebmp]
    loadbmp "sb2bmp","xxqqyyzzrutger.qyx"
    gosub [sb3]
    gosub [writebmp]
    loadbmp "sb3bmp","xxqqyyzzrutger.qyx"
    gosub [sf1]
    gosub [writebmp]
    loadbmp "sf1bmp","xxqqyyzzrutger.qyx"
    gosub [sf2]
    gosub [writebmp]
    loadbmp "sf2bmp","xxqqyyzzrutger.qyx"
    gosub [sf3]
    gosub [writebmp]
    loadbmp "sf3bmp","xxqqyyzzrutger.qyx"
    gosub [sr1]
    gosub [writebmp]
    loadbmp "sr1bmp","xxqqyyzzrutger.qyx"
    gosub [sr2]
    gosub [writebmp]
    loadbmp "sr2bmp","xxqqyyzzrutger.qyx"
    gosub [sr3]
    gosub [writebmp]
    loadbmp "sr3bmp","xxqqyyzzrutger.qyx"
    kill "xxqqyyzzrutger.qyx"
    WindowHeight=500:WindowWidth=600
    sx=-20:sy=-20
    open "mousechaser" for graphics_nf_nsb as #a
    print #a, "trapclose [quit]"
    print #a, "when characterInput [findesc]"
    print #a, "setfocus"
    print #a, "addsprite stand sf1bmp": print #a, "addsprite sb sb1bmp sb2bmp sb3bmp"
    print #a, "addsprite sf sf1bmp sf2bmp sf3bmp": print #a, "addsprite sr sr1bmp sr2bmp sr3bmp"
    print #a, "addsprite sl sr1bmp sr2bmp sr3bmp": print #a, "spriteorient sl mirror"
    print #a, "cyclesprite sf 1": print #a, "cyclesprite sb 1"
    print #a, "cyclesprite sr 1": print #a, "cyclesprite sl 1"
    gosub [resetsprites]
    print #a, "drawsprites"
    mx=2:my=2:or$="":olddir=0:process=10
[begin]
    print #a, "when mouseMove [readmouse]"
    if MouseX>sx then mx=MouseX-sx:mmx=1
    if MouseX<sx then mx=sx-MouseX:mmx=-1
    if MouseX=sx then mx=0:mmx=1
    if MouseY>sy then my=MouseY-sy:mmy=1
    if MouseY<sy then my=sy-MouseY:mmy=-1
    if MouseY=sy then my=0:mmy=1
    if mx>my then or$="x"
    if my>mx then or$="y"
    if mx=my then or$="x"
    if (mousemoved=0) and (sx<MouseX+5) and (sx>MouseX-5) and (sy<MouseY+5) and (sy>MouseY-5) then goto [reached]
    if (or$="x") and (mmx=1) then gosub [right]
    if (or$="x") and (mmx=-1) then gosub [left]
    if (or$="y") and (mmy=1) then gosub [down]
    if (or$="y") and (mmy=-1) then gosub [up]
[begbeg]
    timer 0
    timer 50, [begfurther]
    wait
    [begfurther]
    mousemoved=0
    goto [begin]
[readmouse]
    mousemoved=1
    gosub [resetsprites]
    goto [begin]
[findesc]
    if Inkey$ = chr$(27) then goto [quit]
    wait

[right]
    process=process+1
    if (mousemoved=1) and (process<4) then return
    process=0
    gosub [resetsprites]
    olddir=1
    if my<>0 then
        if mmy=1 then myy=int(1/(mx/my)*5)
        if mmy=-1 then myy=-1*(int(1/(mx/my)*5))
    else
        my=0
    end if
    print #a, "spritevisible sr on"
    sx=sx+5:sy=sy+myy
    print #a, "spritexy sr ";sx;" ";sy
    print #a, "drawsprites"
    return
[left]
    process=process+1
    if (mousemoved=1) and (process<4) then return   ' slowing down the smiley when the mouse is moved
    process=0
    gosub [resetsprites]
    olddir=2
    if my<>0 then
        if mmy=1 then myy=int(1/(mx/my)*5)
        if mmy=-1 then myy=-1*(int(1/(mx/my)*5))
    else
        my=0
    end if
    print #a, "spritevisible sl on"
    sx=sx-5:sy=sy+myy
    print #a, "spritexy sl ";sx;" ";sy
    print #a, "drawsprites"
    return
[up]
    process=process+1
    if (mousemoved=1) and (process<4) then return
    process=0
    gosub [resetsprites]
    olddir=3
    if mx<>0 then
        if mmx=1 then mxx=int(1/(my/mx)*5)
        if mmx=-1 then mxx=-1*(int(1/(my/mx)*5))
    else
        mxx=0
    end if
    print #a, "spritevisible sb on"
    sy=sy-5:sx=sx+mxx
    print #a, "spritexy sb ";sx;" ";sy
    print #a, "drawsprites"
    return
[down]
    process=process+1
    if (mousemoved=1) and (process<4) then return
    process=0
    gosub [resetsprites]
    olddir=1
    if mx<>0 then
        if mmx=1 then mxx=int(1/(my/mx)*5)
        if mmx=-1 then mxx=-1*(int(1/(my/mx)*5))
    else
        mxx=0
    end if
    print #a, "spritevisible sf on"
    sy=sy+5:sx=sx+mxx
    print #a, "spritexy sf ";sx;" ";sy
    print #a, "drawsprites"
    return
[reached]
    if olddir=5 then goto [begbeg]
    gosub [resetsprites]
    olddir=5
    print #a, "spritevisible stand on"
    print #a, "spritexy stand ";sx;" ";sy
    print #a, "drawsprites"
    goto [begbeg]
[resetsprites]
    print #a, "spritexy stand -50 -50"
    print #a, "spritexy sf -50 -50"
    print #a, "spritexy sb -50 -50"
    print #a, "spritexy sr -50 -50"
    print #a, "spritexy sl -50 -50"
    return
[quit]
    unloadbmp "sb1bmp":unloadbmp "sb2bmp":unloadbmp "sb3bmp":unloadbmp "sf1bmp":unloadbmp "sf2bmp"
    unloadbmp "sf3bmp":unloadbmp "sr1bmp":unloadbmp "sr2bmp":unloadbmp "sr3bmp"
    close #a
    end

[writebmp]                          ' CREATE .BMP FILES
    bmphfd$=""
    for bmpt=1 to 54
        hoofd$=word$(bmphoofd$,bmpt," ")
        hoofd=val(hoofd$)
        hoofd$=chr$(hoofd)
        bmphfd$=bmphfd$+hoofd$
    next bmpt
    bmpl$=""
    for bmpln=1 to bmplijnen        'READING THE PICTURE AND RECALCULATING IT
        punten=0:teller=1:herhaal=0:herhaalaantal=0:heraan=0
        if left$(z$(bmpln),1)="#" then
            teller=3
            herhaalaantal=val(word$(z$(bmpln),2," "))
            herhaal=1
        end if
        bmpli$=""
[readinglines]
        bmpunt$=word$(z$(bmpln),teller," ")
        if bmpunt$="*" then
            bmpunt=val(word$(z$(bmpln),teller+1," "))
            bmkleur=val(word$(z$(bmpln),teller+2," "))
            for informatie=1 to bmpunt
                bmpl$=bmpl$+chr$(bmkleur)
                bmpli$=bmpli$+chr$(bmkleur)
            next informatie
            teller=teller+3: punten=punten+bmpunt
        else
            bmkleur=val(bmpunt$)
            bmpl$=bmpl$+chr$(bmkleur)
            bmpli$=bmpli$+chr$(bmkleur)
            teller=teller+1:punten=punten+1
        end if
        if punten<56 then goto [readinglines]
        if herhaal=1 then
[readinglinesherhaal]
            heraan=heraan+1
            bmpl$=bmpl$+bmpli$
            if heraan<herhaalaantal-1 then teller=3:punten=0:goto [readinglinesherhaal]
        end if
    next bmpln
    open "xxqqyyzzrutger.qyx" for output as #opslaan
        print #opslaan, bmphfd$+bmpl$
    close #opslaan
    return
' --------------------------------------------- BMP DATA ---------------------------------------------------------------------------
[sb1]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 21 0 9 144 0 153 * 13 0 144 0 144 * 7 0 0"
    z$(3)="* 5 0 48 0 48 * 13 0 48 0 48 * 13 0 48 0 48 * 13 0 48 0 48"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 * 6 187 176 * 5 0 0"
    z$(5)="0 0 11 * 7 187 * 8 0 * 8 187 176 * 7 0 * 8 187 176 * 6 0 11 * 5 187 187"
    z$(6)="* 3 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 4 0 0"
    z$(7)="0 0 * 8 187 176 * 7 0 * 8 187 176 * 7 0 11 * 7 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 4 255 240 15 255 0 * 4 255 240 * 3 0 * 5 255 15 255 15"
    z$(10)="* 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 0 0 0"
    z$(11)="* 5 255 15 255 15 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sb2]
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 21 0 9 144 * 15 0 144 * 9 0 0"
    z$(3)="* 5 0 48 0 153 * 13 0 48 0 144 * 13 0 48 0 48 * 13 0 48 0 48"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 * 6 187 176 * 5 0 0"
    z$(5)="0 0 11 * 7 187 * 8 0 * 8 187 176 * 7 0 * 8 187 176 * 6 0 11 * 5 187 187"
    z$(6)="* 3 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 4 0 0"
    z$(7)="0 0 * 8 187 176 * 7 0 * 8 187 176 * 7 0 11 * 7 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 4 255 240 15 * 6 255 240 * 3 0 * 5 255 15 255 255"
    z$(10)="* 4 255 240 * 3 0 * 5 255 15 255 0 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 0 0 0"
    z$(11)="* 5 255 15 255 15 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sb3]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 24 0 153 * 15 0 144 * 7 0 0"
    z$(3)="* 4 0 9 144 0 48 * 13 0 144 0 48 * 13 0 48 0 48 * 13 0 48 0 48"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 * 6 187 176 * 5 0 0"
    z$(5)="0 0 11 * 7 187 * 8 0 * 8 187 176 * 7 0 * 8 187 176 * 6 0 11 * 5 187 187"
    z$(6)="* 3 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 4 0 0"
    z$(7)="0 0 * 8 187 176 * 7 0 * 8 187 176 * 7 0 11 * 7 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 7 255 0 * 4 255 240 * 3 0 * 7 255 15"
    z$(10)="* 4 255 240 * 3 0 * 4 255 240 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 0 0 0"
    z$(11)="* 5 255 15 255 15 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sf1]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 21 0 9 144 0 153 * 13 0 144 0 144 * 7 0 0"
    z$(3)="* 5 0 48 0 48 * 13 0 48 0 48 * 13 0 48 0 48 * 13 0 48 0 48"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 187 176 * 3 0 187 176 * 5 0 0"
    z$(5)="0 0 11 187 11 * 3 187 11 187 * 8 0 187 176 * 4 187 176 187 176 * 7 0 187 11 * 5 187 11 176 * 6 0 11 187 11 * 3 187 187"
    z$(6)="187 11 187 * 6 0 11 * 9 187 * 6 0 11 187 187 176 187 187 176 * 3 187 * 6 0 11 187 187 0 11 187 0 11 187 187 * 4 0 0"
    z$(7)="0 0 187 187 0 11 187 0 11 187 176 * 7 0 187 187 176 187 187 176 187 187 176 * 7 0 11 * 7 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 4 255 240 15 255 0 * 4 255 240 * 3 0 * 5 255 15 255 15"
    z$(10)="* 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 0 0 0"
    z$(11)="* 5 255 15 255 15 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sf2]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 21 0 9 144 * 15 0 144 * 9 0 0"
    z$(3)="* 5 0 48 0 153 * 13 0 48 0 144 * 13 0 48 0 48 * 13 0 48 0 48"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 187 176 * 3 0 187 176 * 5 0 0"
    z$(5)="0 0 11 187 11 * 3 187 11 187 * 8 0 187 176 * 4 187 176 187 176 * 7 0 187 11 * 5 187 11 176 * 6 0 11 187 11 * 3 187 187"
    z$(6)="187 11 187 * 6 0 11 * 9 187 * 6 0 11 187 187 176 187 187 176 * 3 187 * 6 0 11 187 187 0 11 187 0 11 187 187 * 4 0 0"
    z$(7)="0 0 187 187 0 11 187 0 11 187 176 * 7 0 187 187 176 187 187 176 187 187 176 * 7 0 11 * 7 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 4 255 240 15 * 6 255 240 * 3 0 * 5 255 15 255 255"
    z$(10)="* 4 255 240 * 3 0 * 5 255 15 255 0 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 0 0 0"
    z$(11)="* 5 255 15 255 15 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sf3]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 24 0 153 * 15 0 144 * 7 0 0"
    z$(3)="* 4 0 9 144 0 48 * 13 0 144 0 48 * 13 0 48 0 48 * 13 0 48 0 48"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 187 176 * 3 0 187 176 * 5 0 0"
    z$(5)="0 0 11 187 11 * 3 187 11 187 * 8 0 187 176 * 4 187 176 187 176 * 7 0 187 11 * 5 187 11 176 * 6 0 11 187 11 * 3 187 187"
    z$(6)="187 11 187 * 6 0 11 * 9 187 * 6 0 11 187 187 176 187 187 176 * 3 187 * 6 0 11 187 187 0 11 187 0 11 187 187 * 4 0 0"
    z$(7)="0 0 187 187 0 11 187 0 11 187 176 * 7 0 187 187 176 187 187 176 187 187 176 * 7 0 11 * 7 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 7 255 0 * 4 255 240 * 3 0 * 7 255 15"
    z$(10)="* 4 255 240 * 3 0 * 4 255 240 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 * 3 0 * 5 255 15 255 15 * 4 255 240 0 0 0"
    z$(11)="* 5 255 15 255 15 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sr1]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 23 0 153 144 * 14 0 153 * 8 0 0"
    z$(3)="* 6 0 48 * 15 0 48 * 15 0 48 * 15 0 48 0"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 * 6 187 176 * 5 0 0"
    z$(5)="0 0 11 * 4 187 * 11 0 * 4 187 176 11 187 187 176 * 7 0 * 4 187 11 * 3 187 176 * 6 0 11 * 4 187 11 187"
    z$(6)="* 3 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 6 0 11 * 6 187 176 187 187 * 4 0 0"
    z$(7)="0 0 * 6 187 0 11 176 * 7 0 * 6 187 0 11 176 * 7 0 11 * 5 187 176 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 6 255 0 15 * 4 255 240 * 3 0 * 6 255 0 255"
    z$(10)="* 4 255 240 * 3 0 * 6 255 15 * 5 255 240 * 3 0 * 6 255 15 * 5 255 240 * 3 0 * 6 255 15 * 5 255 240 0 0 0"
    z$(11)="* 6 255 15 * 5 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sr2]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 22 0 153 144 * 14 0 153 0 0 144 * 6 0 0"
    z$(3)="* 5 0 51 0 9 153 * 12 0 3 48 51 9 144 * 12 0 51 48 * 14 0 48 0"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 * 6 187 176 * 5 0 0"
    z$(5)="0 0 11 * 4 187 * 11 0 * 4 187 176 11 187 187 176 * 7 0 * 4 187 11 * 3 187 176 * 6 0 11 * 4 187 11 187"
    z$(6)="* 3 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 6 0 11 * 6 187 176 187 187 * 4 0 0"
    z$(7)="0 0 * 6 187 0 11 176 * 7 0 * 6 187 0 11 176 * 7 0 11 * 5 187 176 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 5 255 0 15 * 5 255 240 * 3 0 * 5 255 0 255 255"
    z$(10)="15 * 3 255 240 * 3 0 * 5 255 0 255 240 0 * 3 255 240 * 3 0 * 5 255 240 15 0 240 15 255 255 240 * 3 0 * 6 255 0 15 * 4 255 240 0 0 0"
    z$(11)="* 6 255 15 * 5 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return
[sr3]
    bmphoofd$="66 77 150 3 0 0 0 0 0 0 118 0 0 0 40 0 0 0 25 0 0 0 50 0 0 0 1 0 4 0 0 0 0 0 32 3 0 0 18 11 0 0 18 11 0 0 0 0 0 0 0 0 0 0"
    bmplijnen=16
    dim z$(bmplijnen)
    z$(1)="* 6 0 128 0 0 128 * 3 0 128 128 0 128 * 3 0 128 0 128 0 128 128 0 0 * 3 128 0 * 3 192 * 3 0 255 0 0 255 * 3 0 255 255 0 255 * 3 0 255 0 255 0"
    z$(2)="255 255 0 0 * 3 255 * 24 0 153 144 * 10 0 9 144 0 0 153 * 7 0 0"
    z$(3)="* 4 0 153 0 3 48 * 12 0 153 51 51 * 13 0 153 0 51 * 15 0 48 0"
    z$(4)="* 12 0 11 * 3 187 * 11 0 11 * 5 187 * 10 0 * 6 187 176 * 5 0 0"
    z$(5)="0 0 11 * 4 187 * 11 0 * 4 187 176 11 187 187 176 * 7 0 * 4 187 11 * 3 187 176 * 6 0 11 * 4 187 11 187"
    z$(6)="* 3 187 * 6 0 11 * 9 187 * 6 0 11 * 9 187 * 6 0 11 * 6 187 176 187 187 * 4 0 0"
    z$(7)="0 0 * 6 187 0 11 176 * 7 0 * 6 187 0 11 176 * 7 0 11 * 5 187 176 187 * 9 0 * 4 187 187"
    z$(8)="187 176 * 9 0 11 * 5 187 * 11 0 11 * 3 187 * 23 0 0"
    z$(9)="* 16 0 * 12 255 240 * 3 0 * 7 255 0 15 * 3 255 240 * 3 0 * 3 255 240 15 255 255 0"
    z$(10)="* 4 255 240 * 3 0 * 4 255 0 255 240 15 * 4 255 240 * 3 0 * 4 255 * 3 0 * 5 255 240 * 3 0 * 4 255 0 255 0 * 5 255 240 0 0 0"
    z$(11)="* 6 255 15 * 5 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 3 255 * 4 0 0"
    z$(12)="0 15 255 255 240 * 3 0 255 255 240 * 7 0 255 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 0 0 0"
    z$(13)="255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 9 0 255 240 * 3 0 255 240 * 5 0 0"
    z$(14)="* 3 0 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 * 8 0 15 255 240 * 3 0 255 255 240 * 7 0 255 255 240 0 0 0"
    z$(15)="* 3 255 * 6 0 15 255 255 240 * 3 0 * 3 255 240 * 5 0 * 3 255 240 * 3 0 * 4 255 240 * 3 0 * 4 255 240 * 3 0 * 7 255 255"
    z$(16)="* 4 255 240 * 3 0 * 12 255 240 * 34 0 0"
    return


stpendl
Site Admin
Posts: 60
Joined: Wed Jan 18, 2006 10:05 pm
Location: Austria

Post by stpendl »

Nice code, but it would be easier for others, if they could download your .bas file instead of copy'n'paste from the message.
Stefan
The invisible Admin
rutger
Posts: 21
Joined: Tue Sep 16, 2008 8:27 pm

Post by rutger »

Sorry, but I did it on purpose. I always like it much more to copy paste directly into Justbasic. But if it's preferred, from now on I'll post the .bas files.
stpendl
Site Admin
Posts: 60
Joined: Wed Jan 18, 2006 10:05 pm
Location: Austria

Post by stpendl »

It was just a hint, since we had complaints about code not working due to problems with cut 'n' paste.

Saving a fully functional BAS file to the disk and opening it, results in less errors.
Stefan
The invisible Admin