Author Topic: Boulderdash  (Read 3430 times)

0 Members and 1 Guest are viewing this topic.

Offline PMACKAY

  • Forum Regular
  • Posts: 188
  • LIFE is Temporary
    • View Profile
Boulderdash
« on: February 15, 2020, 04:39:38 am »
reworked on graphics (draw frame routine easier to read)

FPS1:
CLS
SELECT CASE ANIMATE%
    CASE 1
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY1()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY1()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND1()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA1()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH1() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%
    CASE 2
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY2()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY2()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND2()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA2()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH2() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%
    CASE 3
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY3()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY3()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND3()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA3()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH1() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%
    CASE 4
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY4()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY4()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND4()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA4()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH2() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%

    CASE 5
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY5()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY5()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND5()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA5()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH1() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%
    CASE 6
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY6()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY6()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND6()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA6()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH2() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%
    CASE 7
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY7()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY7()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND7()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA7()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH1() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%
    CASE 8
        FOR J% = 1 TO 40
            FOR I% = 1 TO 22
                B% = SCREENMEM%(J%, I%)
                SELECT CASE B%
                    CASE WALL: PUT (J% * 16, I% * 16), BORDER()
                    CASE BUTTERFLY: PUT (J% * 16, I% * 16), BUTTERFLY8()
                    CASE FIREFLY: PUT (J% * 16, I% * 16), FIREFLY8()
                    CASE DIRT: PUT (J% * 16, I% * 16), DIRT()
                    CASE DIAMOND: PUT (J% * 16, I% * 16), DIAMOND8()
                    CASE ROCK: PUT (J% * 16, I% * 16), ROCK()
                    CASE SPACE: PUT (J% * 16, I% * 16), EXPLODE4()
                    CASE BRICK1: PUT (J% * 16, I% * 16), BRICK1()
                    CASE AMOEBA: PUT (J% * 16, I% * 16), AMOEBA8()
                    CASE CRUMBLE: PUT (J% * 16, I% * 16), CRUMBLE()
                    CASE EXITCLOSED: PUT (J% * 16, I% * 16), WALLFLASH1()
                    CASE EXITDOOR: IF FLAG% = 1 THEN PUT (J% * 16, I% * 16), WALLFLASH2() ELSE PUT (J% * 16, I% * 16), WALLFLASH2()
                END SELECT
            NEXT I%
        NEXT J%

END SELECT
_DISPLAY
RETURN

also fixed error in code for Fireflys and Butterflies. Now working as should. similar to original. but works great. (not copy is my own original code).. infarct all code is mine. 

FIREFLYMOVE:
FTAD% = 1
FOR FTAD% = 1 TO 100
    SELECT CASE FIREFLYD(FTAD%)
        CASE 0
            GOTO FIREFLYPASSMOVE
        CASE 1 ' UP
            FBUT%% = SCREENMEM%((FIREFLYY(FTAD%)), FIREFLYX(FTAD%) - 1)
            FCUT%% = SCREENMEM%((FIREFLYY(FTAD%) - 1), FIREFLYX(FTAD%))
            FDUT%% = SCREENMEM%((FIREFLYY(FTAD%) + 1), FIREFLYX(FTAD%))
            IF FCUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYY(FTAD%) = FIREFLYY(FTAD%) - 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 2: GOTO FIREFLYPASSMOVE
            IF FBUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYX(FTAD%) = FIREFLYX(FTAD%) - 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 1: GOTO FIREFLYPASSMOVE
            IF FDUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYY(FTAD%) = FIREFLYY(FTAD%) + 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 4: GOTO FIREFLYPASSMOVE
            FIREFLYD(FTAD%) = 3
        CASE 2 ' LEFT
            FBUT%% = SCREENMEM%((FIREFLYY(FTAD%) - 1), FIREFLYX(FTAD%))
            FCUT%% = SCREENMEM%((FIREFLYY(FTAD%)), FIREFLYX(FTAD%) + 1)
            FDUT%% = SCREENMEM%((FIREFLYY(FTAD%)), FIREFLYX(FTAD%) - 1)
            IF FCUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYX(FTAD%) = FIREFLYX(FTAD%) + 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 3: GOTO FIREFLYPASSMOVE
            IF FBUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYY(FTAD%) = FIREFLYY(FTAD%) - 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 2: GOTO FIREFLYPASSMOVE
            IF FDUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYX(FTAD%) = FIREFLYX(FTAD%) - 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 1: GOTO FIREFLYPASSMOVE
            FIREFLYD(FTAD%) = 4
        CASE 3 'DOWN
            FBUT%% = SCREENMEM%((FIREFLYY(FTAD%)), FIREFLYX(FTAD%) + 1)
            FCUT%% = SCREENMEM%((FIREFLYY(FTAD%) + 1), FIREFLYX(FTAD%))
            FDUT%% = SCREENMEM%((FIREFLYY(FTAD%) - 1), FIREFLYX(FTAD%))
            IF FCUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYY(FTAD%) = FIREFLYY(FTAD%) + 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 4: GOTO FIREFLYPASSMOVE
            IF FBUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYX(FTAD%) = FIREFLYX(FTAD%) + 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 3: GOTO FIREFLYPASSMOVE
            IF FDUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYY(FTAD%) = FIREFLYY(FTAD%) - 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 2: GOTO FIREFLYPASSMOVE
            FIREFLYD(FTAD%) = 1
        CASE 4 'RIGHT
            FBUT%% = SCREENMEM%((FIREFLYY(FTAD%) + 1), FIREFLYX(FTAD%))
            FCUT%% = SCREENMEM%((FIREFLYY(FTAD%)), FIREFLYX(FTAD%) - 1)
            FDUT%% = SCREENMEM%((FIREFLYY(FTAD%)), FIREFLYX(FTAD%) + 1)
            IF FCUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYX(FTAD%) = FIREFLYX(FTAD%) - 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 1: GOTO FIREFLYPASSMOVE
            IF FBUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYY(FTAD%) = FIREFLYY(FTAD%) + 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 4: GOTO FIREFLYPASSMOVE
            IF FDUT%% = SPACE THEN SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = SPACE: FIREFLYX(FTAD%) = FIREFLYX(FTAD%) + 1: SCREENMEM%(FIREFLYY(FTAD%), FIREFLYX(FTAD%)) = FIREFLY: FIREFLYD(FTAD%) = 3: GOTO FIREFLYPASSMOVE
            FIREFLYD(FTAD%) = 2
            FIREFLYPASSMOVE:
    END SELECT
NEXT FTAD%
'GOSUB FPS1
RETURN

BUTTERMOVE:
TAD% = 1
FOR TAD% = 1 TO 100
    SELECT CASE BUTTERFLYD(TAD%)
        CASE 0
            GOTO PASSMOVE
        CASE 3 ' UP
            BUT% = SCREENMEM%((BUTTERFLYY(TAD%)), BUTTERFLYX(TAD%) - 1)
            CUT% = SCREENMEM%((BUTTERFLYY(TAD%) + 1), BUTTERFLYX(TAD%))
            DUT% = SCREENMEM%((BUTTERFLYY(TAD%) - 1), BUTTERFLYX(TAD%))
            IF CUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYY(TAD%) = BUTTERFLYY(TAD%) + 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 4: GOTO PASSMOVE
            IF BUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYX(TAD%) = BUTTERFLYX(TAD%) - 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 1: GOTO PASSMOVE
            IF DUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYY(TAD%) = BUTTERFLYY(TAD%) - 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 2: GOTO PASSMOVE
            BUTTERFLYD(TAD%) = 1
        CASE 2 ' LEFT
            BUT% = SCREENMEM%((BUTTERFLYY(TAD%) - 1), BUTTERFLYX(TAD%))
            CUT% = SCREENMEM%((BUTTERFLYY(TAD%)), BUTTERFLYX(TAD%) - 1)
            DUT% = SCREENMEM%((BUTTERFLYY(TAD%)), BUTTERFLYX(TAD%) + 1)
            IF CUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYX(TAD%) = BUTTERFLYX(TAD%) - 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 1: GOTO PASSMOVE
            IF BUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYY(TAD%) = BUTTERFLYY(TAD%) - 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 2: GOTO PASSMOVE
            IF DUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYX(TAD%) = BUTTERFLYX(TAD%) + 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 3: GOTO PASSMOVE
            BUTTERFLYD(TAD%) = 4
        CASE 1 'DOWN
            BUT% = SCREENMEM%((BUTTERFLYY(TAD%)), BUTTERFLYX(TAD%) + 1)
            CUT% = SCREENMEM%((BUTTERFLYY(TAD%) - 1), BUTTERFLYX(TAD%))
            DUT% = SCREENMEM%((BUTTERFLYY(TAD%) + 1), BUTTERFLYX(TAD%))
            IF CUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYY(TAD%) = BUTTERFLYY(TAD%) - 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 2: GOTO PASSMOVE
            IF BUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYX(TAD%) = BUTTERFLYX(TAD%) + 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 3: GOTO PASSMOVE
            IF DUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYY(TAD%) = BUTTERFLYY(TAD%) + 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 4: GOTO PASSMOVE
            BUTTERFLYD(TAD%) = 3
        CASE 4 'RIGHT
            BUT% = SCREENMEM%((BUTTERFLYY(TAD%) + 1), BUTTERFLYX(TAD%))
            CUT% = SCREENMEM%((BUTTERFLYY(TAD%)), BUTTERFLYX(TAD%) + 1)
            DUT% = SCREENMEM%((BUTTERFLYY(TAD%)), BUTTERFLYX(TAD%) - 1)
            IF CUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYX(TAD%) = BUTTERFLYX(TAD%) + 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 3: GOTO PASSMOVE
            IF BUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYY(TAD%) = BUTTERFLYY(TAD%) + 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 4: GOTO PASSMOVE
            IF DUT% = SPACE THEN SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = SPACE: BUTTERFLYX(TAD%) = BUTTERFLYX(TAD%) - 1: SCREENMEM%(BUTTERFLYY(TAD%), BUTTERFLYX(TAD%)) = BUTTERFLY: BUTTERFLYD(TAD%) = 1: GOTO PASSMOVE
            BUTTERFLYD(TAD%) = 2
            PASSMOVE:
    END SELECT
NEXT TAD%
GOSUB FPS1
GOSUB FIREFLYMOVE
RETURN




sprite data is written as

DATA 33333333300333033103333333333333,33333333300333033103333333333333,33333333300333033103333333333333,33333333300333033103333333333333: '          * BORDER (EDGE TILE)

colors are represented as 1=color 1      2=color 2      3=color3     0=bkground

data is read as left top (4x8), right top (4x8), bottom left (4x8), bottom right (4x8) all in 3 forground and 1 back ground. so four colours only
eg. blocks are 1=x2 block 2=x2 block 3=x2 block 0=bkg(nil colour)    4 dots wide x 8 dots down (grid is 4x8,4x8 =16 x 2 wide 23 down (16x23 character)
bd1.png
* bd1.png (Filesize: 42.42 KB, Dimensions: 1920x1080, Views: 284)
« Last Edit: February 15, 2020, 04:49:51 am by PMACKAY »
MackyWhite