venom a écrit :Chez moi tes exe's plante sph
des que je lance sa ouvre un screen et juste après 2sec rapport d'erreur.
Sais tu afficher en 1024/768 ? (je me demande encore ce qui cloche)
Pour ma premiere anim, tout est en page 1 (les datas en DL, et le code que j'ai mis en page 1)
Pour la 2eme anim, les datas sont en page 3. Et voici le code :
Code : Tout sélectionner
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Another earth - RENDU
; SPH(2010)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
InitSprite()
InitKeyboard()
InitMouse()
#dw=1024
#dh=768
#dc=32
UseJPEGImageDecoder()
If OpenScreen(#dw,#dh,#dc,"Another Earth")=0
MessageRequester("Erreur", "Screen Open ("+Str(#dw)+","+Str(#dh)+",32) : impossible à ouvrir", 0) : End
EndIf
;chemin$="d:\polygons\"
;chemin$=""
chm$=chemin$+"1.poly" : del=1500 : spr=-1 : Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"2.poly" : del=90 : spr=1 : Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"3.poly"
Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"4.poly"
Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"5.poly"
Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"6.poly"
Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"7.poly"
Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"8.poly"
Gosub poly
FlipBuffers()
Delay(del)
chm$=chemin$+"8.1.poly"
Gosub poly
spr=0
chm$=chemin$+"9.poly"
Gosub poly
FlipBuffers()
Delay(del)
spr=1
chm$=chemin$+"8.1.poly"
Gosub poly
spr=0
chm$=chemin$+"10.poly"
Gosub poly
FlipBuffers()
Delay(del)
spr=1
chm$=chemin$+"8.1.poly"
Gosub poly
spr=0
chm$=chemin$+"11.poly"
Gosub poly
FlipBuffers()
Delay(del)
spr=1
chm$=chemin$+"8.1.poly"
Gosub poly
spr=0
chm$=chemin$+"12.poly"
Gosub poly
FlipBuffers()
Delay(del)
spr=1
chm$=chemin$+"8.1.poly"
Gosub poly
spr=0
chm$=chemin$+"13.poly"
Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-280 : yy=-38
chm$=chemin$+"8.1.poly"
Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+"8.1.poly"
Gosub poly
chm$=chemin$+"14.poly"
Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+"8.1.poly" : Gosub poly
chm$=chemin$+"15.poly" : Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+"8.1.poly" : Gosub poly
chm$=chemin$+"16.poly" : Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+"8.1.poly" : Gosub poly
chm$=chemin$+"17.poly" : Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+"8.1.poly" : Gosub poly
chm$=chemin$+"18.poly" : Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+"8.1.poly" : Gosub poly
chm$=chemin$+"19.poly" : Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
;chm$=chemin$+"8.1.poly" : Gosub poly
chm$=chemin$+"20.poly" : Gosub poly
FlipBuffers()
Delay(del)
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+"20.1.poly" : Gosub poly
chm$=chemin$+"21.poly" : Gosub poly
FlipBuffers()
Delay(del)
For nb=22 To 34
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=-40 : yy=20
chm$=chemin$+"20.1.poly" : Gosub poly
xx=0 : yy=0
chm$=chemin$+Str(nb)+".poly" : Gosub poly
FlipBuffers()
Delay(del)
Next
For nb=35 To 39
spr=1
xx=-290 : yy=-16
chm$=chemin$+"8.1.poly" : Gosub poly
spr=0
xx=0 : yy=0
chm$=chemin$+Str(nb)+".poly" : Gosub poly
FlipBuffers()
Delay(del)
Next
For nb=40 To 45
spr=1
xx=0 : yy=0
chm$=chemin$+Str(nb)+".poly" : Gosub poly
FlipBuffers()
Delay(del)
Next
chm$=chemin$+"1.poly" : del=1 : spr=-1 : Gosub poly
FlipBuffers()
Delay(del)
Repeat
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape)
End
poly:
If spr=1
DisplaySprite(0,0,0)
EndIf
If OpenFile(0, chm$) ; Ouvre un fichier existant ou en crée un nouveau s'il n'existait pas
l=Lof(0)
If l<=0
Debug("Fichier vide")
End
EndIf
l/2
Dim bank.w(l)
For i=0 To l
bank(i)=ReadWord(0)
Next
CloseFile(0)
EndIf
;temps = ElapsedMilliseconds()
la=1
For i=1 To bank(0)
u=bank(la)
; Dim ps2.Point(nb-1) ; Array of 5 POINT structures
la+1
If bank(la)<>-1
Debug "bank<>-1":End
EndIf
la+1
rvb=RGB(bank(la),bank(la+1),bank(la+2))
la+3
Dim ps2.Point(u) ; Array of 5 POINT structures
For p=0 To u
ps2(p)\x=bank(la):la+1
ps2(p)\y=bank(la):la+1
Next p
hDC=StartDrawing(ScreenOutput())
Box(0,0,0,0,rvb) ; Would be nice to have a Cls() facility !!!
SetPolyFillMode_(hDC,#WINDING)
SetWindowOrgEx_(hDC,-xx,-yy,#Null) ; Move origin downwards
Polygon_(hDC,@ps2(0),u+1)
StopDrawing()
Next
If spr=-1
GrabSprite(0,0,0,#dw,#dh)
EndIf
;temps = ElapsedMilliseconds()-temps
Return