Se ha completado el cambio de version del foro. Podeis comunicar los problemas que encontreis o lo que echeis de menos. Se han añadido mas temas de colores claros al foro. El proflat es muy adecuado para móviles, pruebalo y nos comentas.

ZX Boriel BASIC (proyectos del 2011)

Moderador: Fundadores

Responder
Avatar de Usuario
tacha
Hermano de Lucifer
Hermano de Lucifer
Mensajes: 2639
Registrado: 04 Abr 2013, 20:22
Ubicación: Montevideo, Uruguay
Contactar:

ZX Boriel BASIC (proyectos del 2011)

Mensaje por tacha » 12 Sep 2017, 10:26

Hola chicos!

Hace un par de días me dispouse a revisar el cajón de los recuerdos de programación y encontré algunas rutinas sueltas sobre un jueguecito que estaba haciendo para mi amada Spectrum.

En definitiva son mis primeras pruebas en BORIEL, por lo cual no pidan grandes Arcades XD Enjoy it!

Este es el Alpha version, le faltan montones de items que le tenía pensado, por ejemplo, ya tenía unas 10 pantallas diferentes diseñadas y funcionales en otra versión, también explosión animada en la dirección de los atributos para los BOSS'es, algun que otro gráfico y programación para BOSS, tenía pensado algún item que caía desde arriba que nos diera algun poder en particular más algún otro pequeño enemigo aleatorio que irrumpiera en la trayectoria de la pelotita. También os puedo decir que también hay una versión donde implemento música con el chip AY durante el juego hecha con mi propio tracker (también hecho en boriel).
https://www.youtube.com/watch?v=JqRg7VnAPwg

https://www.youtube.com/watch?v=peY_WTllluM&lc=z22jhbtrhryasnulxacdp431422bn3qvx4aidqkjzh1w03c010c

https://www.youtube.com/watch?v=0CURHU8lI7U


Saludos!
No me hago responsable de mis post pues estan escritos bajo la influencia del alcohol y drogas psicotropicas, por la esquizofrenia paranoide que padece flopping, o por el trauma de verle la cola a Izaro o por los 700 pesos que le debo a Sinclair200

Avatar de Usuario
wilco2009
Hermano de Lucifer
Hermano de Lucifer
Mensajes: 6794
Registrado: 01 Abr 2013, 23:47
Ubicación: Valencia
Contactar:

Re: ZX Boriel BASIC (proyectos del 2011)

Mensaje por wilco2009 » 12 Sep 2017, 16:07

Mola mucho. ;)

Esto lo tiene que ver el amigo Boriel.
"Aprender a volar es todo un arte. Aunque sólo hay que cogerle el truco. Consiste en tirarse al suelo y fallar".

Douglas Adams. Guía del autoestopista galáctico.

Avatar de Usuario
wilco2009
Hermano de Lucifer
Hermano de Lucifer
Mensajes: 6794
Registrado: 01 Abr 2013, 23:47
Ubicación: Valencia
Contactar:

Re: ZX Boriel BASIC (proyectos del 2011)

Mensaje por wilco2009 » 12 Sep 2017, 16:15

¿Esa explosión de atributos es tuya?. La he visto recientemente en un video demo de Cesar (el autor del ZesarUX)
"Aprender a volar es todo un arte. Aunque sólo hay que cogerle el truco. Consiste en tirarse al suelo y fallar".

Douglas Adams. Guía del autoestopista galáctico.

Avatar de Usuario
tacha
Hermano de Lucifer
Hermano de Lucifer
Mensajes: 2639
Registrado: 04 Abr 2013, 20:22
Ubicación: Montevideo, Uruguay
Contactar:

Re: ZX Boriel BASIC (proyectos del 2011)

Mensaje por tacha » 17 Sep 2017, 08:36

wilco2009 escribió:Mola mucho. ;)

Esto lo tiene que ver el amigo Boriel.
:-* :-* :-* :-* :-* :-* :-*
No me hago responsable de mis post pues estan escritos bajo la influencia del alcohol y drogas psicotropicas, por la esquizofrenia paranoide que padece flopping, o por el trauma de verle la cola a Izaro o por los 700 pesos que le debo a Sinclair200

Avatar de Usuario
tacha
Hermano de Lucifer
Hermano de Lucifer
Mensajes: 2639
Registrado: 04 Abr 2013, 20:22
Ubicación: Montevideo, Uruguay
Contactar:

Re: ZX Boriel BASIC (proyectos del 2011)

Mensaje por tacha » 17 Sep 2017, 08:43

Bueno, a pedido del compi Lord Raptor comparto el código de este ejemplar por aqui, tal vez a alguien más le sirva. Ésta es la versión "demo_043.bas" Hay un par de versiones nuevas con música funcional en el gameplay. Por favor, tener en cuenta de que es una demo de como programar sin puta idea más que del Spectrum BASIC, pues no he hecho las tareas ni me estudié todas las maravillas del compilador. También tener en cuenta de que hay montones de cosas de aqui que no funcionan pero que estan programadas (leeran algunas lineas que no hacen nada por el momento), como por ejemplo las varias pantallas (niveles), la música (que estaba en fase deprueba) y alguna cosas más. Es un boceto. He dicho.

Saludos chachos

Código: Seleccionar todo

'----------------------------------------------------------------------------------
'	(c) 2011-2012 - JUAN SEBASTIAN ABREU Y PAOLA GALATI
'----------------------------------------------------------------------------------

' Include these libraries 

#include <point.bas>
'#include <sfx.asm>
#include <screen.bas>
' #include <alloc.bas>

'----------------------------------------------------------------------------------
'	GENERA EN LOS CARACTERES A y B los UDGs del ladrillo
'----------------------------------------------------------------------------------

1	PAUSE 0
	LET c=PEEK 65535
	IF  c=0 THEN
		FOR p=24769 TO 30912
		LET a=(p-8385)
		LET b=PEEK a
		POKE p,b
		NEXT p
		POKE 65535,201
	END IF

	'---- VARIABLES TRACKER -------
DIM pp , patternplay , patternscantidad , patternslong , patternsorden , patternactual , concha , papel, play , outa , outb , pattern , patternview , mtemlongpattern , mcha , mchb , mchc , x , y , puntero , f , fil , col , octava , vola , volb , volc , deca , decb , decc , afine , acourse , bfine , bcourse , cfine , ccourse , noiseo , mixer , aslvivtime , aslide , bslvivtime , bslide , cslvivtime , cslide , contador , spice , aa , bb , cc , var , z as Uinteger

	LET patternplay = 0
	LET outa = 65533
	LET outb = 49129
	LET pattern = 0
	LET patternview = 1

	LET con = 6
	LET mtem = 28000
	LET longpattern = 64

	LET mcha = mtem
	LET mchb = mcha + 1
	LET mchc = mchb + 1
	LET concha = 0

	LET patternscantidad=31
	LET patternslong = mtem - 32
	LET patternsorden= mtem - 64
	LET patternactual = 0
'----------------------------------------------------------------------------------

	GOSUB 8000
	LET colorovni=0
	LET colorpelota=0
	LET onmalo=0
	LET pmalo=3
	LET xmalo=1
	LET ymalo=1
	LET amalo=1
	LET bmalo=1
	LET se=112
	LET vmalo=30
	

	LET vidas=5
	LET xovni=11	'pos x
	LET yovni=14	'pos y
	LET movni=1	'tiempo del poke 23706 para el freeze motion
	LET aovni=1	'movimiento x
	LET bovni=1	'movimiento y
	LET tovni=0	'tiempo de espera estatico
	LET ttonvi=0
	LET povni=4
	
	LET asy=1
	LET asx=6
	

	LET pija=24000
	LET time=50000
	FOR g = 65369 TO 65374
		
		POKE g,255
		POKE g+8,254
		
	NEXT g
	POKE 65368,255
	POKE 65375,0
	POKE 65376,254
	POKE 65383,0
'----------------------------------------------------------------------------------
'	SETEA COLORES Y BORRA PANTALLA
'----------------------------------------------------------------------------------
2 	border 5
	paper 7
	ink 0
	cls
	GOSUB 1000
	'
	print at 0,0;paper 0;INK 7;"                                "
	'
	GOTO 9000
'----------------------------------------------------------------------------------
'	IMPRIME LOS LADRILLOS
'----------------------------------------------------------------------------------
3	'
	

'----------------------------------------------------------------------------------
'	DEFINE VARIABLES
'----------------------------------------------------------------------------------
10	IF player = 1 THEN
		LET limite= 30
	END IF
	IF player = 2 THEN
		LET limite = 14
	END IF

	LET zovni1=7
	LET zovni2=22
	let a	= 1		' suma o resta x
	let b	= 1		' suma o resta y
	let x	= 15		' x pos
	let ax 	= 2		' x aceleracion
	let ay	= 2		' y aceleracion
	LET asy=ay
	LET asx=ax
	let y	= 100		' y pos
	let z	= 15		' posicion barrita
	LET scrx= 23-(int (x/8))
	LET scry= int (y/8)
	let m	= y		' m borra pos y anterior
	let n	= x		' n borra pos x anterior
	let t=250
	let r=50
	LET preball=22528+scry+(32*scrx)
	LET cito=PEEK preball

	RETURN

20	'
'----------------------------------------------------------------------------------
'	BORRA LOS 5 PIXELS DE LA POSICION ANTERIOR DE LA PELOTITA
'----------------------------------------------------------------------------------
22 	OVER 1 
	'BRIGHT 0
	INK colorpelota
	'IF POINT (m  ,n  ) THEN PLOT m  , n 
	'END IF
	IF POINT (m  ,n+1) THEN PLOT m  , n+1
	END IF
	IF POINT (m  ,n-1) THEN plot m  , n -1
	END IF
	IF POINT (m-1,n  ) THEN PLOT m-1, n
	END IF
	IF POINT (m+1,n  ) THEN plot m+1, n
	END IF
	OVER 0
	BRIGHT 0
		

24 	let n=x
	let m=y
	LET time=time-1
	RETURN
'----------------------------------------------------------------------------------
'	DIBUJA LOS 5 PIXELS DE LA PELOTITA
'----------------------------------------------------------------------------------

30 	'BRIGHT 1	
	INK colorpelota
	'PLOT  y  , x 
	PLOT  y  , x+1
	PLOT  y  , x-1
	PLOT  y-1, x
	PLOT  y+1, x
	BRIGHT 0
	LET povni=povni-1
	IF povni=0 THEN
		LET movni=movni+1
		LET povni=2
	END IF
	RETURN
'----------------------------------------------------------------------------------
'	MUEVE PELOTA
'----------------------------------------------------------------------------------   
50 	
	IF a=1 THEN
			LET x=x+ax
	END IF
	IF a=0 THEN
			LET x=x-ax
	END IF
	IF x>=181 THEN
			LET a=0
			BEEP .001,-12
	END IF
	IF x<=ax THEN
			GOSUB 7000
	END IF	
	IF b=1 THEN
			LET y=y+ay
	END IF
	IF b=0 THEN
			LET y=y-ay
	END IF
	IF y>=251 THEN
			LET b=0
			BEEP .001,-12
	END IF
	IF y<=4 THEN 
			LET b=1
			BEEP .001,-12
	END IF
	RETURN
'----------------------------------------------------------------------------------
'	CONVIERTE RESOLUCION GRAFICA DE
'	PIXELES A CARACTERES
'----------------------------------------------------------------------------------

55 	LET scrx=23-(int (x/8)) 	
	LET scry=int (y/8)
	LET SCRYY=y/8
	LET screy=10*(scryy-scry)
	RETURN

'----------------------------------------------------------------------------------
' 	VELOCIDAD???
'----------------------------------------------------------------------------------
60	'IF lad=0 THEN 
	'	RETURN
	'END IF

'----------------------------------------------------------------------------------
'	CHEQUEA COLISIONES ENTRE *** PELOTITA Y RAQUETA ***
'----------------------------------------------------------------------------------
62	'
70	IF (scry=zovni1 -1 AND x<13 AND a=0)  OR (scry=zovni1 AND x<13 AND a=0)  OR (scry=zovni1+1 AND x<16 AND a=0) THEN
		LET a=1
		LET z=zovni1
		GOSUB 290
		'LET ax=ax+1
		'LET ay=ay+1
		IF onmalo=1 THEN
				LET ax=ax+1
				LET ay=ay+1
		END IF	
	END IF
	IF player=2 THEN
		IF (scry=zovni2 -1 AND x<13 AND a=0) OR (scry=zovni2 AND x<13 AND a=0) OR (scry=zovni2 +1 AND x<13 AND a=0) THEN
			LET a=1
			LET z=zovni2
			GOSUB 290
			'LET ax=ax+1
			'LET ay=ay+1
			IF onmalo=1 THEN
				LET ax=ax+1
				LET ay=ay+1
			END IF	
		END IF
	END IF
	RETURN
'----------------------------------------------------------------------------------
'	CHEQUEA COLISIONES ENTRE *** PELOTITA Y LADRILLOS ***
'----------------------------------------------------------------------------------
71	'
72 	IF x>22 AND a=1 AND POINT (y,x+2+ax)  THEN 
		LET cry=scry
		LET crx=scrx-1
		GOSUB 4000
		GOSUB 7100
	END IF
74 	IF x>22 AND a=0 AND POINT (y,x-2-ax)  THEN 
		LET cry=scry
		LET crx=scrx+1
		GOSUB 4000
		GOSUB 7100
	END IF
76 	IF x>22 AND b=0 AND POINT (y-2-ay,x) THEN 
		LET cry=scry-1
		LET crx=scrx
		GOSUB 4000
		GOSUB 7101
	END IF
78 	IF x>22 AND b=1 AND POINT (y+2+ay,x) THEN 
		LET cry=scry+1
		LET crx=scrx
		GOSUB 4000
		GOSUB 7101
		
	END IF
	RETURN				

'----------------------------------------------------------------------------------
'	IMPRIME Y MUEVE LA RAQUETA
'----------------------------------------------------------------------------------
166 	POKE 23607,60
	POKE 23606,0

	'-----------------------------------------------------------------------------------'
	' 					SINCLAIR 1: 63486   2:61438					'
	'	ningun boton=191											'
	' 							1+3=186  1+3+5=170 1+4=182 1+4+5=166	'
	'	1=190 2=189 3=187 4=183 5=175 - 	2+4=185  2+3+5=169 2+4=181 2+4+5=165	'
	' 	5+1=174 5+2=173 5+3=171 5+4=167								'
	'-----------------------------------------------------------------------------------'
	LET A$=INKEY$
	IF A$="r" THEN
		 GOTO 1
	END IF
	LET tec=IN 63486
174 	IF tec=190 and zovni1 > 1 THEN
		LET zovni1 = zovni1 - 1 
		PRINT AT 22,zovni1 + 2;" ";AT 23,zovni1 + 2;" "
	END IF

175	IF tec=189 and zovni1 < limite  THEN
		LET zovni1 = zovni1 +1
		PRINT AT 22,zovni1 -2;" ";AT 23,zovni1 -2;" "	
	END IF
	LET z=zovni1
	GOSUB 5000
	IF tec=175 THEN
		LET movni = movni +1
		IF NOT conteo = 0 THEN 
				GOSUB 9900
				LET conteo = 0
		END IF
		
	END IF

176 	IF player=2 THEN
			LET tec=IN 61438

	
177 			IF tec=175 and zovni2 > 17 THEN
				LET zovni2 = zovni2 -1 
				PRINT AT 22,zovni2 + 2;" ";AT 23,zovni2 + 2;" "
			END IF
178			IF tec=183 and zovni2 < 30  THEN
				LET zovni2 = zovni2 +1
				PRINT AT 22,zovni2 -2;" ";AT 23,zovni2 -2;" "	
			END IF
			LET z=zovni2
			GOSUB 5010
	END IF
	'LET movni=movni+1
		LET zz=z*8
		LET zz=zz+3

190	RETURN


 
'----------------------------------------------------------------------------------
'	SUBRUTINA / CONDICIONES PARA LA ACELERACION DE LA PELOTITA
'----------------------------------------------------------------------------------
200'
290	BEEP .005,48
		IF b=1 THEN
			IF y=zz-12 OR y=zz-11 THEN
				LET ax=1
				LET ay=4
				
				GOSUB 7101
				RETURN
			END IF
			IF y=zz-10 OR y=zz-9 THEN
				LET ax=1
				LET ay=3
				'GOSUB 7100
				GOSUB 7101
				RETURN
			END IF
			IF y=zz-8 OR y=zz-7 THEN
				LET ax=2
				LET ay=2
				'GOSUB 7100
				GOSUB 7101
				RETURN
			END IF
			IF y=zz-6 OR y=zz-5 THEN
				LET ax=1
				LET ay=2
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz-4 OR y=zz-3 THEN
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz-2 OR y=zz-1 THEN
				LET axx=ax
				LET ax=ay
				LET ay=axx
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz+1 OR y=zz+2 THEN
				LET ax=1
				LET ay=ay+1
					IF ay=5 THEN 
						LET ay=4
					END IF
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz+8 OR y=zz+7 THEN
				LET axx=ax
				LET ax=ay
				LET ay=axx
				'GOSUB 7100
				RETURN
			END IF

			IF y=zz+6 OR y=zz+5 THEN
				LET ax=2
				LET ay=2
				'GOSUB 7100
				RETURN
			END IF
			
			IF y=zz+4 OR y=zz+3 THEN
				LET ax=1
				LET ax=3
				'GOSUB 7100
				RETURN
			END IF 

			IF y=zz+9 OR y=zz+10 THEN
				LET ax=1
				LET ay=3
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz+11 OR y=zz+12 THEN
				LET ax=1
				LET ay=4
				'GOSUB 7100
				RETURN
			END IF
		END IF


		IF b=0 THEN
			IF y=zz+12 OR y=zz+11 THEN
				LET ax=1
				LET ay=4
				'GOSUB 7100
				GOSUB 7101
				RETURN
			END IF
			IF y=zz+10 OR y=zz+9 THEN
				LET ax=1
				LET ay=3
				'GOSUB 7100
				GOSUB 7101
				RETURN
			END IF
			IF y=zz+8 OR y=zz+7 THEN
				LET ax=2
				LET ay=2
				'GOSUB 7100
				GOSUB 7101
				RETURN
			END IF


			IF y=zz+6 OR y=zz+5 THEN
				LET ax=1
				LET ay=2
				'GOSUB 7100
				RETURN
			END IF

			IF y=zz+4 OR y=zz+3 THEN
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz+2 OR y=zz+1 THEN
				LET axx=ax
				LET ax=ay
				LET ay=axx
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz-1 OR y=zz-2 THEN
				LET ax=1
				LET ay=ay+1
					IF ay=5 THEN 
						LET ay=4
					END IF
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz-8 OR y=zz-7 THEN
				LET axx=ax
				LET ax=ay
				LET ay=axx
				'GOSUB 7100
				RETURN
			END IF

			IF y=zz-6 OR y=zz-5 THEN
				LET ax=1
				LET ay=2
				'GOSUB 7100
				RETURN
			END IF
			
			IF y=zz-4 OR y=zz-3 THEN
				LET ax=2
				LET ax=2
				'GOSUB 7100
				RETURN
			END IF 

			IF y=zz-9 OR y=zz-10 THEN
				LET ax=1
				LET ay=3
				'GOSUB 7100
				RETURN
			END IF
			IF y=zz-11 OR y=zz-12 THEN
				LET ax=1
				LET ay=4
				'GOSUB 7100
				RETURN
			END IF
		END IF
	RETURN
600	'---------------------------------------------------------------
	'			BOSS 1
	'---------------------------------------------------------------

610	

	POKE 23606,0
	POKE 23607,60
	IF amalo=1 AND se=112 THEN 
		PRINT AT xmalo-1,ymalo-1;"         "
		LET xmalo=xmalo+1
		LET se=119	
	END IF
	IF amalo=1 THEN 
		LET se=se-1	
	END IF


	IF amalo=0 AND se=119 THEN 
		PRINT AT xmalo+2,ymalo-1;"         "
		LET xmalo=xmalo-1
		LET se=112		
	END IF
	IF amalo=0 THEN 
		LET se=se+1	
	END IF


	IF (bmalo=1 AND xmalo=6) OR (bmalo=1 AND xmalo=3) THEN
		FOR L=-1 to 3 
		PRINT AT xmalo+L, ymalo;" "
		NEXT L
		LET ymalo=ymalo+1
	END IF
	
	IF (bmalo=0 AND xmalo=6) OR (bmalo=0 AND xmalo=3) THEN 
		FOR L=-1 to 3 
		PRINT AT xmalo+L, ymalo+6;" "
		NEXT L
		LET ymalo=ymalo-1
	END IF

	IF xmalo=10 AND amalo=1 THEN
				LET amalo=0
				POKE 23607,253
				POKE 23606,80
				LET co=pija+(ymalo+2)
				LET di=32*13
				LET cod=co+di
				POKE cod, 49
				POKE cod+1, 65
				PRINT AT 13,ymalo+2; paper 7;INK 1;BRIGHT 1;"AB" 
				POKE 23607,0
				POKE 23606,60
	END IF
	IF xmalo=1 AND amalo=0 THEN 
				LET amalo=1
	END IF
	IF ymalo=24 AND bmalo=1 THEN 
				LET bmalo=0
	END IF
	IF ymalo=0 AND bmalo=0 THEN 
				LET bmalo=1
	END IF

	'GOTO 610
	POKE 23607,248
	POKE 23606,se 
	PRINT AT xmalo-1, ymalo;"159=AEI"
	PRINT AT xmalo  , ymalo;"26:>BFJ"
	PRINT AT xmalo+1, ymalo;"37;?CGK"
	PRINT AT xmalo+2, ymalo;"48<@DHL"

	IF scrx < (xmalo+3) THEN
		IF scrx > (xmalo-2) THEN
			IF scry < (ymalo+8) THEN
				IF scry > (ymalo-2) THEN
					POKE 23607,249
					POKE 23606,se-32
					PRINT AT xmalo-1, ymalo;"159=AEI"
					PRINT AT xmalo  , ymalo;"26:>BFJ"
					PRINT AT xmalo+1, ymalo;"37;?CGK"
					PRINT AT xmalo+2, ymalo;"48<@DHL"
					GOSUB 9902
					LET vmalo=vmalo-1
					IF vmalo=0 THEN
						POKE 23607,60
						POKE 23606,0
						PRINT AT xmalo-1, ymalo;"       "
						PRINT AT xmalo  , ymalo;"       "
						PRINT AT xmalo+1, ymalo;"       "
						PRINT AT xmalo+2, ymalo;"       "
						GOSUB 7700
					END IF
				END IF
			END IF
		END IF
	END IF



620	RETURN


'----------------------------------------------------------------------------------
' 	COLISION
'----------------------------------------------------------------------------------
300	'

'-------------------------------------------------------------------------++++--------+---------
'	MENU INICIAL
'----------------------------------------------------------------------------------
1000	'
	LET a=0
	LET player = 1
	PAPER 7
	BORDER 5
	BRIGHT 1
	CLS
		FOR f=24769 TO 30912
		LET a=f-8385
		LET b=PEEK f
		POKE a,b
		NEXT f
'	CALL 60000 EN ASEMBLER
1010 	PAPER 7
	INK a
	IF player = 2 THEN
	 		PRINT AT 13,1;"1-ONE OVNI"
			PAPER a
			PRINT AT 15,1; INK 7-a ;"2-TWO OVNI"
			PAPER 7
	END IF
	IF player = 1 THEN
			PRINT AT 15,1;"2-TWO OVNI"
			PAPER a
			PRINT AT 13,1; INK 7-a;"1-ONE OVNI"
			PAPER 7
	END IF			
	LET A$= INKEY$
	IF A$="1" THEN 
			LET player=1
	END IF
	IF A$="2" THEN 
			LET player=2
	END IF
	PRINT AT 22,1;"3-MISSION"
	
	LET a=a + 1
	IF a=2 THEN
		LET a=1
	END IF
	
1020	IF A$="3" THEN 
			FOR p=1 to 50
			FOR a=1 to 7
			PAPER a
			INK 0
			PRINT AT 22,1;"3-MISSION"
			NEXT a
			NEXT p
			PAPER 7
			BORDER 5
			INK 0
			BRIGHT 0
			CLS 
			RETURN
	END IF
	GOTO 1010




'----------------------------------------------------------------------------------
'	PANTALLA 1	
'----------------------------------------------------------------------------------


2001	'
	LET papel=7
	PAPER papel
	INK papel
	BORDER 0
	BRIGHT 0
	CLS
'	PRINT  AT  1,0;"                                "
	PRINT  AT  2,0;"                                "
	PRINT  AT  3,0;"1A    1A    1A    1A    1A    1A"
	PRINT  AT  4,0;" 5E  5E      5E  5E      5E  5E "
	PRINT  AT  5,0;"   4D          2B          4D   "
	PRINT  AT  6,0;" 5E  5E      5E  5E      5E  5E "
	PRINT  AT  7,0;"1A    1A    1A    1A    1A    1A"
	PRINT  AT  8,0;"                                "
	PRINT  AT  9,0;"                                "
	PRINT  AT 10,0;"                                "
	PRINT  AT 11,0;"1A    1A  4D   4D   4D  1A    1A"
	PRINT  AT 12,0;" 5E  5E    5E 5E5E 5E    5E  5E "
	PRINT  AT 13,0;"   4D        2B  2B        4D   "
	PRINT  AT 14,0;" 5E  5E    5E 5E5E 5E    5E  5E "
	PRINT  AT 15,0;"1A    1A  4D   1A   4D  1A    1A"
	PRINT  AT 16,0;"                                "
	PRINT  AT 17,0;"                                "
	RETURN

'----------------------------------------------------------------------------------
'	PANTALLA 2	
'----------------------------------------------------------------------------------


2002	'LET lad = 70
	LET papel=7
	PAPER papel
	INK papel
	BORDER 0
	BRIGHT 0
	CLS
'	PRINT  AT  2,0;"                                "
	PRINT  AT  3,0;"                                "
	PRINT  AT  4,0;"2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B"
 	PRINT  AT  5,0;" 2B  2B  2B  2B  2B  2B  2B  2B "
	PRINT  AT  6,0;"   3C  3C  3C  3C  3C  3C  3C   "
	PRINT  AT  7,0;" 5E  5E  5E  5E  5E  5E  5E  5E "
	PRINT  AT  8,0;"   5E  5E  5E  5E  5E  5E  5E   "
	PRINT  AT  9,0;" 6F  6F  6F  6F  6F  6F  6F  6F "
	PRINT  AT 10,0;"    4D4D4D4D4D4D4D4D4D4D4D4D    "
	PRINT  AT 11,0;"  4D                        4D  "
	PRINT  AT 12,0;"4D                            4D"
	PRINT  AT 13,0;"                                "
	PRINT  AT 14,0;"                                "
	PRINT  AT 15,0;"                                "
	PRINT  AT 16,0;"                                "
	PRINT  AT 17,0;"                                "
	PRINT  AT 18,0;"                                "
	RETURN
'----------------------------------------------------------------------------------
'	PANTALLA 3	
'----------------------------------------------------------------------------------


2003	'LET lad = 24
	LET papel=7
	PAPER papel
	INK papel
	BORDER 0
	BRIGHT 0
	CLS
'	PRINT  AT  2,0;"                                "
	PRINT  AT  3,0;"            1A1A1A1A            "
	PRINT  AT  4,0;"                                "
 	PRINT  AT  5,0;"                                "
	PRINT  AT  6,0;"      1A1A1A1A1A1A1A1A1A1A      "
	PRINT  AT  7,0;"          0Z        0Z          "
	PRINT  AT  8,0;"  2B 2B   0Z        0Z  2B  2B  "
	PRINT  AT  9,0;"          0Z        0Z          "
	PRINT  AT 10,0;"  3C 3C   0Z        0Z  3C  3C  "
	PRINT  AT 11,0;"          0Z        0Z          "
	PRINT  AT 12,0;"  4D 4D   0Z        0Z  4D  4D  "
	PRINT  AT 13,0;"          0Z        0Z          "
	PRINT  AT 14,0;"          0Z        0Z          "
	PRINT  AT 15,0;"0Z0Z0Z0Z0Z0Z        0Z0Z0Z0Z0Z0Z"
	PRINT  AT 16,0;"                                "
	PRINT  AT 17,0;"                                "
	PRINT  AT 18,0;"                                "
	RETURN
'----------------------------------------------------------------------------------
'	PANTALLA 4	
'----------------------------------------------------------------------------------


2004	'LET lad = 100
	LET papel=7
	PAPER papel
	INK papel
	BORDER 0
	BRIGHT 0
	CLS
'	PRINT  AT  2,0;""
	PRINT  AT  3,0;"0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z"
	PRINT  AT  4,0;"0Z             1A             0Z"
 	PRINT  AT  5,0;"0Z             1A             0Z"
	PRINT  AT  6,0;"0Z    0Z       1A       0Z    0Z"
	PRINT  AT  7,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT  8,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT  9,0;"0Z    0Z  5E5E 2B 5E5E  0Z    0Z"
	PRINT  AT 10,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT 11,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT 12,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT 13,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT 14,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT 15,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT 16,0;"0Z    0Z  5E5E 1A 5E5E  0Z    0Z"
	PRINT  AT 17,0;"0Z    0Z                0Z    0Z"
	PRINT  AT 18,0;"0Z    0Z0Z0Z0Z0Z0Z0Z0Z0Z0Z    0Z"
	RETURN

'----------------------------------------------------------------------------------
'	PANTALLA 5	
'----------------------------------------------------------------------------------


2005	'
	LET papel=2
	PAPER papel
	INK papel
	BORDER 0
	BRIGHT 1
	CLS
'	PRINT  AT  1,0;"                                "
	PRINT  AT  2,0;"                                "
	PRINT  AT  3,0;"             2B  2B             "
	PRINT  AT  4,0;"           4D  4D  4D           "
	PRINT  AT  5,0;"         4D  6F  6F  4D         "
	PRINT  AT  6,0;"       4D  2B  2B  2B  4D       "
	PRINT  AT  7,0;"     4D  6F  6F  6F  6F  4D     "
	PRINT  AT  8,0;"   4D  1A  1A  1A  1A  1A  4D   "
	PRINT  AT  9,0;" 4D  4D  4D  4D  4D  4D  4D  4D "
	PRINT  AT 10,0;"3C 3C  3C  3C  3C  3C  3C  3C 3C"
	PRINT  AT 11,0;" 4D  4D  4D  4D  4D  4D  4D  4D "
	PRINT  AT 12,0;"   4D  1A  1A  1A  1A  1A  4D   "
	PRINT  AT 13,0;"     4D  6F  6F  6F  6F  4D     "
	PRINT  AT 14,0;"       4D  2B  2B  2B  4D       "
	PRINT  AT 15,0;"         4D  6F  6F  4D         "
	PRINT  AT 16,0;"           4D  4D  4D           "
	PRINT  AT 17,0;"             2B  2B             "
	RETURN
'----------------------------------------------------------------------------------
'	PANTALLA 6	
'----------------------------------------------------------------------------------


2006	'
	LET papel=7
	PAPER papel
	INK papel
	BORDER 0
	BRIGHT 0
	CLS
'	PRINT  AT  1,0;"                                "
	PRINT  AT  2,0;"                                "
	PRINT  AT  3,0;"    3E   3E3E3E    3E     3E    "
	PRINT  AT  4,0;"  3E  3E 3E  3E  3E3E   3E  3E  "
	PRINT  AT  5,0;"      3E 3E  3E    3E       3E  "
	PRINT  AT  6,0;"    3E3E 3E  3E    3E     3E3E  "
	PRINT  AT  7,0;"  3E     3E  3E    3E   3E      "
	PRINT  AT  8,0;"  3E     3E  3E    3E   3E      "
	PRINT  AT  9,0;"  3E  3E 3E  3E    3E   3E  3E  "
	PRINT  AT 10,0;"  3E3E3E 3E3E3E  3E3E3E 3E3E3E  "
	PRINT  AT 11,0;"                                "
	PRINT  AT 12,0;"                                "
	PRINT  AT 13,0;"                                "
	PRINT  AT 14,0;"                                "
	PRINT  AT 15,0;"                                "
	PRINT  AT 16,0;"                                "
	PRINT  AT 17,0;"                                "
	RETURN
'----------------------------------------------------------------------------------
'	PANTALLA 7	
'----------------------------------------------------------------------------------


2007	'
	LET papel=7
	PAPER papel
	INK papel
	BORDER 0
	BRIGHT 0
	CLS
'	PRINT  AT  1,0;"    1A1A1A1A        1A1A1A1A   "
	PRINT  AT  3,0;"  1A2B2B2B2B1A    1A2B2B2B2B1A  "
	PRINT  AT  4,0;"1A2B2B2B2B2B2B1A1A2B2B2B2B2B2B1A"
	PRINT  AT  5,0;" 2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B "
	PRINT  AT  6,0;"2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B"
	PRINT  AT  7,0;"2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B"
	PRINT  AT  8,0;" 2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B "
	PRINT  AT  9,0;"1A2B2B2B2B2B2B2B2B2B2B2B2B2B2B1A"
	PRINT  AT 10,0;"  1A2B2B2B2B2B2B2B2B2B2B2B2B1A  "
	PRINT  AT 11,0;"    1A1A2B2B2B2B2B2B2B2B1A1A    "
	PRINT  AT 12,0;"        1A1A2B2B2B2B1A1A        "
	PRINT  AT 13,0;"            1A2B2B1A            "
	PRINT  AT 14,0;"             1A2B1A             "
	PRINT  AT 15,0;"               1A               "
	PRINT  AT 16,0;"                                "
	PRINT  AT 17,0;"                                "
	PRINT  AT 18,0;"                                "
	RETURN
'----------------------------------------------------------------------------------
' LADRILLOS:
'		0Z = NEGRO	
'		1A = AZUL	
'		2B = ROJO
'		3C = MAGENTA
'		4D = VERDE
'		5E = CELESTE
'		6F = AMARILLO
'		7G = BLANCO
'	
'----------------------------------------------------------------------------------
'----------------------------------------------------------------------------------
'	COPIA ESCENARIO FICTICIO A RAM (( PIJA ,576 ))
'----------------------------------------------------------------------------------
3000	FOR g=pija TO pija+(32*24)
	POKE g,32
	NEXT g
	LET gh=pija
3001	FOR l=0 to 31 : LET P$=SCREEN$( 1,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3002	FOR l=0 to 31 : LET P$=SCREEN$( 2,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3003	FOR l=0 to 31 : LET P$=SCREEN$( 3,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3004	FOR l=0 to 31 : LET P$=SCREEN$( 4,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3005	FOR l=0 to 31 : LET P$=SCREEN$( 5,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3006	FOR l=0 to 31 : LET P$=SCREEN$( 6,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3007	FOR l=0 to 31 : LET P$=SCREEN$( 7,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3008	FOR l=0 to 31 : LET P$=SCREEN$( 8,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3009	FOR l=0 to 31 : LET P$=SCREEN$( 9,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3010	FOR l=0 to 31 : LET P$=SCREEN$(10,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3011	FOR l=0 to 31 : LET P$=SCREEN$(11,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3012	FOR l=0 to 31 : LET P$=SCREEN$(12,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3013	FOR l=0 to 31 : LET P$=SCREEN$(13,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3014	FOR l=0 to 31 : LET P$=SCREEN$(14,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3015	FOR l=0 to 31 : LET P$=SCREEN$(15,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3016	FOR l=0 to 31 : LET P$=SCREEN$(16,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3017	FOR l=0 to 31 : LET P$=SCREEN$(17,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3018	FOR l=0 to 31 : LET P$=SCREEN$(18,l) : LET pp=CODE P$ : POKE gh,pp : let gh=gh+1 : next l
3020	RETURN
	
'----------------------------------------------------------------------------------
'	CONVIERTE RAM A ESCENARIO REAL EN PANTALLA
'----------------------------------------------------------------------------------
3050	'
	POKE 23607,253
	POKE 23606,80
	PAPER papel
	INK 7
	BRIGHT 0
	CLS
	PAPER 7
	bright 1
	
	LET lad=0
	'GOTO 3090

3058	LET gh=pija
3059	FOR d=0 to 18
3060	FOR q=0 to 31
	LET cod=q+pija+d*32
	LET codi= PEEK gh
3070	IF codi=48 THEN 
		INK 0
		PRINT AT d,q;"AB"
	END IF
3072	IF codi=49 OR codi=4 OR codi=3 OR codi=2 OR codi=1 THEN 
		INK 1
		LET lad=lad+1
		PRINT AT d,q;"AB"
	END IF
3074	IF codi=50 THEN 
		INK 2
		LET lad=lad+1
		PRINT AT d,q;"AB"
	END IF
3076	IF codi=51 THEN 
		INK 3
		LET lad=lad+1
		PRINT AT d,q;"AB"
	END IF
3078	IF codi=52 OR codi=13 OR codi=12 OR codi=11 THEN 
		INK 4
		LET lad=lad+1
		PRINT AT d,q;"AB"
	END IF
3080	IF codi=53 THEN 
		INK 5
		LET lad=lad+1
		PRINT AT d,q;"AB"
	END IF
3082	IF codi=54 THEN 
		INK 6
		LET lad=lad+1
		PRINT AT d,q;"AB"
	END IF
3084	IF codi=55 THEN 
		INK 7
		LET lad=lad+1
		PRINT AT d,q;"AB"
	END IF
3085	LET gh=gh+1
3086	NEXT q
3088	NEXT d
3090	
	POKE 23607,60
	POKE 23606,0
	PAPER papel
	BRIGHT 1
	INK 0
	RETURN
'----------------------------------------------------------------------------------
'	*** PELOTITA Y LADRILLOS ***    INTERACCIONES
'----------------------------------------------------------------------------------
4000	BRIGHT 1
	'
	LET co=pija+cry
	LET di=32*crx
	LET cod=co+di
	LET coq=PEEK cod
4009	 'cod,PEEK cod
	POKE 23607,253
	POKE 23606,80

REM	--------- NEGRO ---------

4010	IF coq=48 THEN
		PAPER papel
		PRINT AT crx,cry;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry;INK 4;"AB"
		BEEP .001,48
		PRINT AT crx,cry;INK 3;"AB"
		BEEP .001,45
		PRINT AT crx,cry;INK 2;"AB"
		BEEP .001,42
		PRINT AT crx,cry;INK 1;"AB"
		BEEP .001,39
		PRINT AT crx,cry;INK 0;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,36
		GOTO 4900
	END IF
4020	IF coq=90 THEN
		PAPER papel 
		PRINT AT crx,cry-1;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry-1;INK 4;"AB"
		BEEP .001,48
		PRINT AT crx,cry-1;INK 3;"AB"
		BEEP .001,45
		PRINT AT crx,cry-1;INK 2;"AB"
		BEEP .001,42
		PRINT AT crx,cry-1;INK 1;"AB"
		BEEP .001,39
		PRINT AT crx,cry-1;INK 0;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,36
		GOTO 4900
	END IF

REM	---------- AZUL ---------

4030	IF coq=49 THEN
		POKE cod, 4
		POKE cod+1, 9
		PAPER papel 
		PRINT AT crx,cry;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry;INK 4;"AB"
		BEEP .001,48
		PRINT AT crx,cry;INK 3;"AB"
		BEEP .001,45
		PRINT AT crx,cry;INK 2;"AB"
		BEEP .001,42
		PRINT AT crx,cry;INK 1;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,39
		GOTO 4900
	END IF
4040	IF coq=65 THEN
		POKE cod, 9
		POKE cod-1,4
		PAPER papel 
		PRINT AT crx,cry-1;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry-1;INK 4;"AB"
		BEEP .001,48
		PRINT AT crx,cry-1;INK 3;"AB"
		BEEP .001,45
		PRINT AT crx,cry-1;INK 2;"AB"
		BEEP .001,42
		PRINT AT crx,cry-1;INK 1;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,39
		GOTO 4900
	END IF
4050	IF coq=4 OR coq=3 OR coq=2 THEN
		POKE cod, coq-1
		LET kod=cod+1
		LET lod=PEEK kod
		POKE cod+1, lod-1
		PAPER papel 
		PRINT AT crx,cry;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry;INK 4;"AB"
		BEEP .001,48
		PRINT AT crx,cry;INK 3;"AB"
		BEEP .001,45
		PRINT AT crx,cry;INK 2;"AB"
		BEEP .001,42
		PRINT AT crx,cry;INK 1;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,39
		GOTO 4900
	END IF
4060	IF coq=9 OR coq=8 OR coq=7 THEN
		POKE cod, coq-1
		LET kod=cod-1
		LET lod=PEEK kod
		POKE cod-1, lod-1
		PAPER papel 
		PRINT AT crx,cry-1;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry-1;INK 4;"AB"
		BEEP .001,48
		PRINT AT crx,cry-1;INK 3;"AB"
		BEEP .001,45
		PRINT AT crx,cry-1;INK 2;"AB"
		BEEP .001,42
		PRINT AT crx,cry-1;INK 1;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,39
		GOTO 4900
	END IF
4070	IF coq=1 THEN
		POKE cod, 32
		POKE cod+1,32
		PAPER papel 
		PRINT AT crx,cry;INK 1;"AB"
		BEEP .001,48
		PRINT AT crx,cry;INK 2;"AB"
		BEEP .001,50
		PRINT AT crx,cry;INK 3;"AB"
		BEEP .001,52
		PRINT AT crx,cry;INK 4;"AB"
		BEEP .001,54
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF
4080	IF coq=6 THEN
		POKE cod, 32
		POKE cod-1,32
		PAPER papel 
		PRINT AT crx,cry-1;INK 1;"AB"
		BEEP .001,48
		PRINT AT crx,cry-1;INK 2;"AB"
		BEEP .001,50
		PRINT AT crx,cry-1;INK 3;"AB"
		BEEP .001,52
		PRINT AT crx,cry-1;INK 4;"AB"
		BEEP .001,54
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry-1;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF
REM	---------- ROJO ----------

4100	IF coq=50 THEN
		POKE cod, 32
		POKE cod+1,32
		PAPER papel 
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF
4110	IF coq=66 THEN
		POKE cod, 32
		POKE cod-1,32
		PAPER papel
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry-1;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF


REM	---------- MAGENTA ----------

4200	IF coq=51 THEN
		POKE cod, 32
		POKE cod+1,32
		PAPER papel 
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF
4210	IF coq=67 THEN
		POKE cod, 32
		POKE cod-1,32
		PAPER papel
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry-1;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF


REM	---------- VERDE ----------

4240	IF coq=52 THEN
		POKE cod,11 	' ERA 13
		PAPER papel 
		PRINT AT crx,cry;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry;INK 4;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,48
		GOTO 4900
	END IF
4250	IF coq=68 THEN
		POKE cod,14	' ERA 16 
		PAPER papel 
		PRINT AT crx,cry-1;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry-1;INK 4;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,48
		GOTO 4900
	END IF
4260	IF coq=13 OR coq=12 THEN
		POKE cod, coq-1
		LET kod=cod+1
		LET lod=PEEK lod
		POKE cod+1, kod-1
		PAPER papel 
		PRINT AT crx,cry;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry;INK 4;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,48
		GOTO 4900
	END IF
4270	IF coq=16 OR coq=15 THEN
		POKE cod, coq-1
		LET kod=cod-1
		LET lod=PEEK kod
		POKE cod-1, lod-1
		PAPER papel 
		PRINT AT crx,cry-1;INK 7;"AB"
		BEEP .001,57
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,54
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,51
		PRINT AT crx,cry-1;INK 4;PAPER 7; BRIGHT 1;"AB"
		BEEP .001,48
		GOTO 4900
	END IF
4280	IF coq=11 THEN
		POKE cod, 32
		POKE cod+1,32
		PAPER papel 
		PRINT AT crx,cry;INK 1;"AB"
		BEEP .001,48
		PRINT AT crx,cry;INK 2;"AB"
		BEEP .001,50
		PRINT AT crx,cry;INK 3;"AB"
		BEEP .001,52
		PRINT AT crx,cry;INK 4;"AB"
		BEEP .001,54
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF
4290	IF coq=14 THEN
		POKE cod, 32
		POKE cod-1,32
		PAPER papel 
		PRINT AT crx,cry-1;INK 1;"AB"
		BEEP .001,48
		PRINT AT crx,cry-1;INK 2;"AB"
		BEEP .001,50
		PRINT AT crx,cry-1;INK 3;"AB"
		BEEP .001,52
		PRINT AT crx,cry-1;INK 4;"AB"
		BEEP .001,54
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry-1;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF

REM	---------- CELESTE ----------

4300	IF coq=53 THEN
		POKE cod, 32
		POKE cod+1,32
		PAPER papel 
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF
4310	IF coq=69 THEN
		POKE cod, 32
		POKE cod-1,32
		PAPER papel
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry-1;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF


REM	---------- AMARILLO ----------

4320	IF coq=54 THEN
		POKE cod, 32
		POKE cod+1,32
		PAPER papel 
		PRINT AT crx,cry;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF
4340	IF coq=70 THEN
		POKE cod, 32
		POKE cod-1,32
		PAPER papel
		PRINT AT crx,cry-1;INK 5;"AB"
		BEEP .001,56
		PRINT AT crx,cry-1;INK 6;"AB"
		BEEP .001,58
		PRINT AT crx,cry-1;INK 7;BRIGHT 0;"  "
		BEEP .001,60
		LET lad=lad-1
		GOTO 4900
	END IF


REM	---------- BLANCO ----------

4900	BRIGHT 0
	'
	POKE 23607,60
	POKE 23606,0
	PRINT AT 0,20;lad; PAPER 0;"  "
4999	RETURN


'**********************************************************************************************
'
'   COMO FUNCIONAN LOS LADRILLOS
'
'**********************************************************************************************
'	NEGRO	- INDESTRUCTIBLE
'	AZUL	- 5 golpes
'	ROJO	- 4 golpes
'	MAGENTA	- 3 golpes
'	VERDE	- 2 golpes	
'	CELESTE	- 1 golpe
'	AMARILLO- 1 golpe
'	BLANCO	- 
'----------------------------------------------------------------------------------
'	SUBRUTINA DEL OVNI 1
'----------------------------------------------------------------------------------

'-------------- yovni -----------------

5000	LET cov=pija+yovni
	LET div=32*xovni
	LET codv=cov+div-32
	LET ovnia=PEEK (codv-1)
	LET ovnib=PEEK (codv+31)
	LET ovnic=PEEK (codv+3)
	LET ovnid=PEEK (codv+35)

	IF movni>=20 THEN
		LET movni=1
	END IF
	
	
	IF movni=1 THEN
		LET mojo=79
		POKE 65412,255
		POKE 65413,230
		POKE 65417,1
		POKE 65432,18
		POKE 65433,198
				
	END IF
	IF movni=2 THEN
		LET mojo=79
		POKE 65412,255
		POKE 65413,230
		POKE 65431,2
		POKE 65432,50
		POKE 65433,134
		POKE 65418,2		
	END IF
	IF movni=3 THEN
		LET mojo=79
		POKE 65412,255
		POKE 65413,206
		POKE 65417,0
		POKE 65418,13
		POKE 65431,2
		POKE 65432,34
		POKE 65433,70

	END IF
	IF movni=4 THEN
		LET mojo=80
		POKE 65412,255
		POKE 65413,206
		POKE 65431,2
		POKE 65432,2
		POKE 65433,198
		POKE 65417,1
		POKE 65418,28	
	END IF
	IF movni=5 THEN
		LET mojo=80
		POKE 65412,191
		POKE 65413,222
		POKE 65431,2
		POKE 65432,2
		POKE 65433,6
		POKE 65417,1
		POKE 65418,58	
	END IF
	IF movni=6 THEN
		LET mojo=81
		POKE 65412,191
		POKE 65413,222
		POKE 65417,0
		POKE 65418,118		
	END IF
	IF movni=7 THEN
		LET mojo=81
		POKE 65412,191
		POKE 65413,254
		POKE 65417,128
		POKE 65418,108
	END IF
	IF movni=8 THEN
		LET mojo=82
		POKE 65412,191
		POKE 65413,255
		POKE 65418,88
		POKE 65401,97		
	END IF
	IF movni=9 THEN
		LET mojo=82
		POKE 65412,255
		POKE 65413,254
		POKE 65418,48
		POKE 65401,99		
	END IF
	IF movni=10 THEN
		LET mojo=82
		POKE 65412,255
		POKE 65413,254
		POKE 65417,0
		POKE 65418,96
		POKE 65400,196		
	END IF
	IF movni=11 THEN
		LET mojo=82
		POKE 65412,255
		POKE 65413,254
		POKE 65417,128
		POKE 65418,64
		POKE 65400,204
		POKE 65401,98	
	END IF
	IF movni=12 THEN
		LET mojo=82
		POKE 65412,255
		POKE 65413,254
		POKE 65417,128
		POKE 65418,0
		POKE 65399,144
		POKE 65401,97		
	END IF
	IF movni=13 THEN
		LET mojo=81
		POKE 65412,255
		POKE 65413,254
		POKE 65417,0
		POKE 65400,200
		POKE 65401,99		
	END IF
	IF movni=14 THEN
		LET mojo=81
		POKE 65412,255
		POKE 65413,254
		POKE 65400,196
		POKE 65401,98		
	END IF
	IF movni=15 THEN
		LET mojo=80
		POKE 65412,255
		POKE 65413,254
		POKE 65399,128
		POKE 65400,204
		POKE 65401,96		
	END IF
	IF movni=16 THEN
		LET mojo=80
		POKE 65412,251
		POKE 65413,254
		POKE 65399,144
		POKE 65400,200
	END IF
	IF movni=17 THEN
		LET mojo=79
		POKE 65412,251
		POKE 65413,254
		POKE 65400,192		
	END IF
	IF movni=18 THEN
		LET mojo=79
		POKE 65412,251
		POKE 65413,246
		POKE 65399,128		
	END IF
	IF movni=19 THEN
		LET mojo=79
		POKE 65412,251
		POKE 65413,246
		POKE 65431,10
	END IF
	
5010	POKE 23606, mojo		
	POKE 23607,253
	INK colorovni
	PRINT AT 22,z-1;"DFH"
	PRINT AT 23,z-1;"EGI"
	'LET movni=movni+1

	POKE 23607,60
	POKE 23606,0
	RETURN
'-------------------------------------------------------------------
'	PIERDE UNA VIDA
'-------------------------------------------------------------------
7000	FOR K=1 TO 1000
	FOR V=7 TO 0 step -1
		BORDER V
	NEXT V
	NEXT K
	LET a=1
	LET vidas=vidas-1
	IF vidas=0 THEN
			GOSUB 7003
	END IF
	GOSUB 7002
	GOSUB 3050

	LET conteo=1000


	RETURN
7002 	'-----------------------------
	'	VIDA MENOS
	'-----------------------------
	BORDER 0
	PAPER 0
	INK 7
	CLS
	PRINT AT 10,11;"OVNIS "
	PRINT AT 10,18; vidas
	FOR K=1 TO 60000
	NEXT K
	PAPER 7
	INK 0
	RETURN
7003 	'-----------------------------
	'	GAME OVER
	'-----------------------------
	BORDER 0
	PAPER 0
	INK 7
	CLS
	PRINT AT 10,7;"G A M E    O V E R"
	FOR K=1 TO 60000
	NEXT K
	PAPER 7
	INK 0
	GOTO 1
	RETURN

7100	'------------------------------
	'------- invierte a -----------
	'------------------------------
	IF a=1 THEN
			LET a=0
			RETURN
	END IF
	IF a=0 THEN
			LET a=1
			RETURN
	END IF

7101	'------------------------------
	'------- invierte b -----------
	'------------------------------
	IF b=1 THEN
			LET b=0
			RETURN
	END IF
	IF b=0 THEN
			LET b=1
			RETURN
	END IF

'-----------------------------------------
'		 EXPLOSION 
'
'	cargar explosionATTR.bin en 62000
'-----------------------------------------

7700 	RANDOMIZE
	LET expd=62000
	LET pijota=22528
	
7759	FOR h = ( 0 + xmalo - 6 ) TO ( 9 + xmalo - 6 )
7760	FOR j = ( 0 + ymalo ) TO ( 6 + ymalo )
	IF h < 1 THEN 
			GOTO 7785
	END IF
	LET qwe= PEEK expd
	IF qwe = 56 THEN 
				PRINT AT h,j;PAPER 7;" "
	END IF
	IF qwe = 82 OR qwe = 87 THEN 
				PRINT AT h,j;PAPER 2;BRIGHT 1;" "
	END IF
	IF qwe = 71 OR qwe = 64 OR qwe= 70 THEN 
				PRINT AT h,j;PAPER 0;" "
	END IF

	IF qwe = 86 THEN 
				PRINT AT h,j;PAPER 6;BRIGHT 1;" "
	END IF
	IF  qwe = 120 OR qwe = 122  OR  qwe = 126 OR qwe = 118 OR qwe = 119 THEN 
				PRINT AT h,j;PAPER 6;BRIGHT 1;" "
	END IF
	IF  qwe = 127 THEN 
				PRINT AT h,j;PAPER 7;BRIGHT 1;" "
	END IF

7785	LET expd = expd + 1
7786	NEXT j
7788	NEXT h

7830	IF expd > 63090 THEN
		LET expd=62000
		LET pijota=22528
		border 4
		PAUSE 0
		GOTO 1
	END IF
7900	GOTO 7759
		


'**********************************************************************************************
'	GRAFICOS DE PLATO VOLADOR 1
'**********************************************************************************************
8000	POKE 65392,0
	POKE 65393,0
	POKE 65394,0
	POKE 65395,0
	POKE 65396,30
	POKE 65397,122
	POKE 65398,229
	POKE 65399,128

	POKE 65400,192
	POKE 65401,96
	POKE 65402,48
	POKE 65403,28
	POKE 65404,7
	POKE 65405,0
	POKE 65406,0
	POKE 65407,0

	POKE 65408,0
	POKE 65409,0
	POKE 65410,56
	POKE 65411,124
	POKE 65412,255
	POKE 65413,254
	POKE 65414,254
	POKE 65415,126

	POKE 65416,0
	POKE 65417,0
	POKE 65418,48
	POKE 65419,0
	POKE 65420,195
	POKE 65421,124
	POKE 65422,0
	POKE 65423,0

	POKE 65424,0
	POKE 65425,0
	POKE 65426,0
	POKE 65427,0
	POKE 65428,224
	POKE 65429,28
	POKE 65430,6
	POKE 65431,2

	POKE 65432,2
	POKE 65433,6
	POKE 65434,12
	POKE 65435,112
	POKE 65436,192
	POKE 65437,0
	POKE 65438,0
	POKE 65439,0

	POKE 65440,0
	POKE 65441,0
	POKE 65442,0
	POKE 65443,0
	POKE 65444,0

	RETURN	

9000 REM --------------- (MAIN provisorio) -----------------
	LET velocidad=2
	LET conteo=2000
	GOSUB 9520
	print at 0,0;paper 0;INK 7;"                                "
9005	GOSUB 10
	GOSUB 2001
	GOSUB 3000
	GOSUB 3050
	GOSUB 9521


9006	GOSUB 9521
	GOSUB 166
	IF conteo>0 THEN
			IF conteo=1 THEN
				GOSUB 9900
			END IF
	 		LET conteo=conteo-1
	END IF
	IF lad=0 THEN	
 		LET onmalo=1
	END IF

	GOSUB 22
	IF conteo=0 THEN
		GOSUB 50
		ELSE 	LET y=zz
			LET x=17
	END IF
	GOSUB 30
	GOSUB 55
	LET pmalo=pmalo-1
	IF onmalo=1 AND pmalo=0 THEN
			LET pmalo = 2			'AND LAD=0
			GOSUB 610
	END IF
9007	GOSUB 60
	GOSUB 71
	
9008	GOTO 9006
'------- pantalla 2 --------
9030 '
	



9500 	'******************************************
	'*							*
	'*							*
	'*		 VaDeReTRACKER - PLAYER			*
	'*							*
	'*							*
	'******************************************
	
	'------	VARIABLES INICIALES	--------

9520	'\/\/\/\/ PLAY \/\/\/\/
	


	LET vola=10
	LET volb=10
	LET volc=10

	LET deca=0
	LET decb=0
	LET decc=0

	LET afine	=0
	LET acourse	=0
	LET bfine	=0
	LET bcourse	=0
	LET cfine	=0
	LET ccourse	=0
	LET noisep	=0
	LET mixer	=56

	LET aslvivtime	=0	'tiempo de slide o vibrato 
	LET aslide	=0	'0=off 	1-9 up  11-9 down
	LET avibratO	=0 
	LET bslvivtime	=0
	LET bslide	=0
	LET cslvivtime	=0
	LET cslide	=0

	
	
	LET contador = con
	
	RANDOMIZE
	OUT 65533, 7
	OUT 49149, 56

	LET spice = 0
	LET pp = patternsorden + patternplay
	LET pp = PEEK pp
		LET mcha = mtem + (pp*192)
		LET mchb = mcha + 1
		LET mchc = mchb + 1

	RETURN


9521	'
	LET aa=PEEK (mcha + (spice*3))
	LET bb=PEEK (mchb + (spice*3))
	LET cc=PEEK (mchc + (spice*3))

 	'-------- PITCH ---------

9522	IF aa<84 AND contador=con THEN 
		OUT 65533, 0
		OUT 49149, PEEK (32000+aa)
		OUT 65533, 1
		OUT 49149, PEEK (32084+aa)
		LET deca=0
		OUT 65533, 8
		OUT 49149, vola-deca
	END IF
	IF bb<84 AND contador=con THEN 
		OUT 65533, 2
		OUT 49149, PEEK (32000+bb)
		OUT 65533, 3
		OUT 49149, PEEK (32084+bb)
		LET decb=0
		OUT 65533, 9
		OUT 49149, volb-decb
	END IF
	IF cc<84 AND contador=con THEN 
		OUT 65533, 4
		OUT 49149, PEEK (32000+cc)
		OUT 65533, 5
		OUT 49149, PEEK (32084+cc)
		LET decc=0
		OUT 65533, 10
		OUT 49149, volc-decc
	END IF

	'-------- VOLUMEN --------
 
	IF contador > 0 AND deca < (vola-5) THEN 
		OUT 65533, 8
		OUT 49149, vola-deca
		LET deca=deca+1
	END IF
	IF contador > 0 AND decb < (volb-5) THEN 
		OUT 65533, 9
		OUT 49149, volb-decb
		LET decb=decb+1
	END IF
	IF contador > 0 AND decc < (volc-5) THEN 
		OUT 65533, 10
		OUT 49149, volc-decc
		LET decc=decc+1
	END IF

	IF aa=254 THEN 
		OUT 65533, 0
		OUT 49149, 0
		OUT 65533, 1
		OUT 49149, 0
	END IF
	IF bb=254 THEN 
		OUT 65533, 2
		OUT 49149, 0
		OUT 65533, 3
		OUT 49149, 0
	END IF
	IF cc=254 THEN 
		OUT 65533, 4
		OUT 49149, 0
		OUT 65533, 5
		OUT 49149, 0
	END IF

	'-------- IMPRIME CURSOR --------


	IF contador > 0 THEN 
		LET contador=contador-1
		RETURN
	END IF
	IF contador = 0 THEN
		LET contador = con
	END IF
	LET spice = spice + 1
	IF spice = 64 THEN 
		LET spice=0
		LET patternplay = patternplay+1
		
		GOSUB 9520
	END IF
	IF PEEK (patternsorden+patternplay)=255 THEN
		LET patternplay=0
		GOSUB 9520
	END IF
	RETURN	

9529	RETURN


	Return

9900 	'---- SONIDO 1 ------
		BEEP .001,0
		BEEP .001,2
		BEEP .001,14
		BEEP .001,16
		BEEP .001,28
		BEEP .001,30
		BEEP .001,32
		BEEP .001,44
		BEEP .001,46
		BEEP .001,58
		BEEP .001,50
		BEEP .001,60
	RETURN

9902 	'---- SONIDO 2 ------
		BEEP .001,60
		BEEP .001,59
		BEEP .001,58
		BEEP .001,57
		BEEP .001,58
		BEEP .001,59
		BEEP .001,60
		BEEP .001,59
		BEEP .001,58
		BEEP .001,57
		BEEP .001,58
		BEEP .001,59
	RETURN

9903 	'---- SONIDO 2 ------
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
		BEEP .001,RND*60
	RETURN


Última edición por tacha el 17 Sep 2017, 08:49, editado 1 vez en total.
No me hago responsable de mis post pues estan escritos bajo la influencia del alcohol y drogas psicotropicas, por la esquizofrenia paranoide que padece flopping, o por el trauma de verle la cola a Izaro o por los 700 pesos que le debo a Sinclair200

Avatar de Usuario
Lord Raptor
Aspirante a demonio
Aspirante a demonio
Mensajes: 202
Registrado: 15 Oct 2014, 23:41
Contactar:

Re: ZX Boriel BASIC (proyectos del 2011)

Mensaje por Lord Raptor » 19 Sep 2017, 02:55

Wow, muchas gracias por compartir código !!

Ahora intentaré entender todo lo relaccionado con los POKES... [cuando era un crío, no tenía ni idea del tema]... y ahora poco más :D :D :D
...Por ké kuesta más karo pagarse un entierro ke kobrarse una vida ?!
Miembro activo en la demoscene de Amiga desde 1992

Responder

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 2 invitados