declare a%,b%,c%[5],d%[13],e%,f%,g%,h%,i%,j%,k%,l%,m%,n%,o%,p%,q%,r%,s%,t%,u%,v%,w%,x%,y&,z%
def t(0)&gettickcount
def i$(0)$appdatadir+"\CHAOS.INI"
def x(0)%umessage<>16
def k(1)iskey(&(1))
proc t
usefont Arial,99,0,0,0,0:textcolor &(1),-1:drawtext &(2),&(3),$(4)
endproc
proc b
b%=d%[&(1)]:a%=rnd(2) & (b%<47) | (b%<9):copybmp 1,&(2)-639,48>0,&(2);0:setpixel 639,&(3)+&(4)*b%,a%*b%*si(e%<1536,($505-(-256 & e%)),0):b%=b%+en%*2-1:setpixel 639,&(3)+&(4)*b%,$CCFF-$3355*a%:d%[&(1)]=b%
endproc
proc e
play 0;0;0;39,0,0:k%=en%+20:l%=b%+50:m%=50:t%=t%-(1 << z%)
endproc
windowtitle "proXus":style de fenêtre 26:cls 0:window 1280-width(%hwnd),(960-height(%hwnd)):x%=val(readini$(i$(),"proXus","h"))
cas readini$(i$(),"proXus","p")<>oct$(xor(% X,29^6)):x%=500
mcls 640,480:randomize:o%=5:q%=190:h%=-12:usermessages 16:set("ERRORLEVEL",0):play 45;38;63;16,-1,0
tandis que x() and (o%+r%)
windowtitle "proXus - Highscore: "+str$(x%)+" - Score: "+str$(n%)+" - Lives: "+str$(o%)+" - Contrôle avec STRG et Pfeiltasten"
whileloop 2
whileloop 5
cas t()-y&>500:y&=t()
y&=y&+12
tandis que t()<y&
sleep 9
Wend
m%=m%-(m%>0)*2:s%=(s%+(s%>0)*21)*((s%<640) | k(17))
si o%
p%=p%+(k(39) & (p%<541)-k(37) and p%)*2:q%=q%+(k(40) & (q%<317)-k(38) & (q%>64))*2
si (s%=0) & k(17)
play 0;0;0;28,0,0:s%=p%+61
endif
endif
whileloop 6
z%=&loop
si t% & (1 << z%)
a%=d%[z%]:b%=d%[z%+7]
sélectionner u%
caseof 0
si v%
a%=-98:b%=9+z%*54
endif
si (en%\9<>41) | (b%<64) | (b%>332)
a%=en%+1+e%\1792
cas a%>640:a%=-99
elseif b%>198
inc b%
d'autre
dec b%
endif
caseof 1
si v%
a%=640+abs(z%-3.5)*68:b%=9+z%*54
endif
a%=en%-3
caseof 2
si v%
a%=640+rnd(99):b%=63+rnd(270)
endif
a%=en%-z%
caseof 3
si v%
a%=640+((z%-1) mod 3)*68:b%=63+z%\4*269
endif
a%=en%-3
caseof 4
si v%
a%=640*z%:b%=63+rnd(270)
endif
a%=en%-7
caseof 5
cas v%:a%=640
a%=en%-3:b%=sin((y&/999+z%/9)*pi()*2)*135+198
caseof 6
cas v%:a%=572+z%*68
a%=en%-4:b%=sin((y&/2048+z%/9)*pi()*2)*135+198
caseof 7
cas v%:a%=572+z%*68
a%=en%-5:b%=sin((y&/2048)*pi()*2)*135+198
caseof 8
cas v%:a%=572+z%*68
a%=en%-7:b%=q%
endselect
cas u%:a%=en%-e%\1792
si abs(b%-q%)<59
si (abs(en%-p%)<40) & (r%=0)
e:dec o%:p%=0:q%=190:r%=320
elseif s% and (abs(en%-s%)<49)
e:s%=9999:w%=w%-(1 << z%):n%=n%+si(w%,5,50)*(e%\1792+1)
cas w%=0:j%=42
endif
endif
cas a%<-98:t%=t%-(1 << z%)
d%[z%]=a%:d%[z%+7]=b%
endif
Wend
v%=0:dec r%,r%>0
startpaint -1
cas d%[0]=0:cls 0
rectangle 0,64-640,432
si e%<1792
b 0,0,0,1:b 7,432,479,-1
endif
usebrush 1,m%*2047:ellipse k%-m%,(L%-m%)-k%+m%,l%+m%:usebrush 1,0
si o% and ((r%=0)+(&loop>3))
t $DDCCAA,p%,q%,"l=":t $99AACC,p%+2,q%,">"
endif
cas s%:t $77FFFF,s%,q%,"="
whileloop 6
z%=&loop
si t% & (1 << z%)
b%=d%[z%+7]
t rnd(9999),d%[z%]+35-(u%=0)*22,b%-8,»
t $FFFF-99*z%,d%[z%],b%,chr$(17)
endif
Wend
cas (o%=0) and r%:t 2^24-1,51,190,"GAME OVER"
endpaint
mcopybmp 0,0-640,480>0,0;0
Wend
si j%
play 125-j%,0,0:j%=j%-7
endif
Wend
play i%;0;0;45,0,0:i%=g%-ord(mid$(")35)8)35'35'8'57)78):)78'7:'85'7",e% & 7+f%+1,1))
cas e% & 1=0:play 0;h%;h%+12;43,0,0
cas e% & 7=0:h%=i%
cas e% & 3=0:play 0;-h%;-h%-12;37+e% & 4,0,0
play -i%,0,0:e%=e%+si(e%<1792,1,8)
si e% & 31=0
f%=rnd(4)*8:g%=rnd(9)-5
endif
si e% & 15+t%=0
u%=rnd(9):t%=126:w%=t%:v%=1
endif
Wend
play i%,h%;h%+12;43,0,0
cas n%<x%:end
writeini i$(),"proXus","h"=str$(n%):writeini i$(),"proXus","p"=oct$(xor(n%,29^6)):e%=0:play 80,81,82;16;87,-1,0:t 2^24-1,225,240,str$(n%)
tandis que x() & (e%<62)
clear d%[]:d%[9]=43
whileloop 5
z%=&loop
a%=ord(mid$(substr$("I P P U O R R W W|D M M P K O O R T|A I I M F K K O P|1 ; 3 ; 1 1 3 ;31 ; 3 ; 1 313 ; 1 ; 3 ;3143114333>|% 1 % 1 % 1 % 1 ' 3 ' 3 ' 3 ' 3 , 8 , 8 , 8 , 8 8",z%,"|"),e%+1,1))-12
si a%>20
d%[z%]=c%[z%]:d%[5+z%]=a%:c%[z%]=-a%:t 2^si(e% & 2,8,24)-1,52,140,"HIGHSCORE"
endif
Wend
sleep 88:play d%[1];d%[2];d%[3];43;d%[5],0,0:play d%[6];d%[7];d%[8];d%[9];d%[10],0,0:inc e%
Wend
play c%[1];c%[2];c%[3];43;c%[5],0,0