alien-b-u
Descripción del contenido de la página
Programa herramienta escrito en Beta BASIC para crear los GDU del juego Alien-B.
Etiquetas:
Este programa herramienta, escrito en Beta BASIC, crea los GDU del juego Alien-B, para ahorrar memoria en el programa principal.
Pantallazo
Código fuente
10 REM alien-b-u
20 REM This tool program creates the UDG used by the program Alien-B.
30 REM Copyright (C) 2010 Marcos Cruz (programandala.net)
40 REM Licencia/Permesilo/License
programandala.net/license
50
REM ###################### Change log
60 REM 2011-01-31 First version, extracted from the main program.
70 REM 2011-02-03 Added oAcuteU.
80 REM 2011-02-04 Changed the value of ammoChar.
90 REM 2011-02-05 Rewritten for simplicity. It will be easier to create several UDG sets.
100
REM ###################### Main
110 CLS #
PRINT INVERSE 1;"alien-b-u"''
120 aAcuteL 144
oAcuteU 145
ammoSymbol 146
iExcl 147
SAVE OVER d*"udg"CODE USR "a",3*8
130 PRINT '"Done!"
STOP
140 DEF PROC udg DATA
LOCAL b,c,c$,n
READ c
PRINT "UDG "; USING "###";c,
LET c$=CHR$ c
FOR n=0 TO 7
READ b
POKE USR c$+n,b
NEXT n
KEYWORDS 0
PRINT CHR$ c
KEYWORDS 1
END PROC
150
REM ###################### UDG patterns
160 DEF PROC aAcuteL udgCode
udg udgCode,
BIN 00001000,
BIN 00010000,
BIN 00111000,
BIN 00000100,
BIN 00111100,
BIN 01000100,
BIN 00111100,
BIN 00000000
END PROC
170 DEF PROC oAcuteU udgCode
udg udgCode,
BIN 00001000,
BIN 00010000,
BIN 11111110,
BIN 10000010,
BIN 10000010,
BIN 10000010,
BIN 11111110,
BIN 00000000
END PROC
180 DEF PROC ammoSymbol udgCode
udg udgCode,
BIN 00111000,
BIN 11111100,
BIN 11110100,
BIN 11110100,
BIN 11110100,
BIN 11110100,
BIN 11111100,
BIN 00000000
END PROC
190 DEF PROC iExcl udgCode
udg udgCode,
BIN 00000000,
BIN 00001000,
BIN 00000000,
BIN 00001000,
BIN 00001000,
BIN 00001000,
BIN 00001000,
BIN 00000000
END PROC
200 DEF PROC uBreveU udgCode
udg uBreveU,
BIN 00100100,
BIN 00011000,
BIN 01000010,
BIN 01000010,
BIN 01000010,
BIN 01000010,
BIN 00111100,
BIN 00000000
END PROC
210
REM ###################### Meta
220 DEF PROC s
230 ERASE d*"alien-b-u~"
240 ERASE d*"alien-b-u" TO "alien-b-u~"
250 CLEAR
SAVE d*"alien-b-u"
STOP
260 END PROC
270
REM ######################
Deprecated code
280 REM first version
DEF PROC udg DATA
LOCAL b,c$,n
READ c$
FOR n=0 TO 7
READ b
POKE USR c$+n,b
NEXT n
END PROC
290 REM second version
LET nextUdg=144
DEF PROC udg udgCode,b0,b1,b2,b3,b4,b5,b6,b7
LOCAL a,c$
LET udgCode=nextUdg,nextUdg=nextUdg+1,c$=CHR$ udgCode,a=USR c$
POKE a,b0
POKE a+1,b1
POKE a+2,b2
POKE a+3,b3
POKE a+4,b4
POKE a+5,b5
POKE a+6,b6
POKE a+7,b7
END PROC
300 DEF PROC makeUdg
LOCAL udg,address,i,scan,firstUdg,maxAddress
LET firstUdg=144,maxAddress=0
RESTORE 160
DO
READ udg
EXIT IF NOT udg
LET address=USR "a"+(udg-firstUdg)*8
310 IF address>maxAddress THEN LET maxAddress=address
320 FOR i=0 TO 7
READ scan
POKE address+i,scan
NEXT i
LOOP
SAVE d*"udg"CODE USR "a",maxAddress+8-USR "a"
END PROC
Descargas
Este programa está en el disco de Alien-B.