Code : Tout sélectionner
;Comtois 15/04/05
;{- Initialisation
#ScreenWidth = 640 : #ScreenHeight = 480 : #ScreenDepth = 32
If InitSprite() = 0 Or InitKeyboard() = 0 Or InitSprite3D() = 0
MessageRequester( "Erreur" , "Impossible d'initialiser DirectX 7 Ou plus" , 0 ) : End
ElseIf OpenScreen( #ScreenWidth , #ScreenHeight , #ScreenDepth , "Effets" ) = 0
MessageRequester( "Erreur" , "Impossible d'ouvrir l'écran " , 0 ) : End
EndIf
StartDrawing(ScreenOutput())
For l=0 To 479
Restore couleur
For i = 0 To 479
Read coul
Plot(i,l,coul)
Next i
Next l
StopDrawing()
For i = 0 To 29
GrabSprite(i+1, i* 16, i * 4, 16 , 480 - i * 4)
CopySprite(i+1, i+31, #PB_Sprite_Texture)
CreateSprite3D(i+1, i+31)
FreeSprite(i+1)
Next
CentreX = #ScreenWidth / 2
CentreY = (#ScreenHeight - SpriteHeight(31)) / 2
Vitesse = 1
Angle = 0
Amplitude = 160
Pas = 3
Repeat
ClearScreen(0,0,0)
ExamineKeyboard()
Start3D()
Sprite3DBlendingMode(5, 7)
For i = 1 To 30
DisplaySprite3D(i, CentreX + Sin((Angle + i * Pas * 2) * 0.0174533) * Amplitude, CentreY + i * 2, 200)
DisplaySprite3D(i, CentreX - Sin((Angle + i * Pas * 2) * 0.0174533) * Amplitude, CentreY + i * 2, 200)
Next i
Stop3D()
Angle + Vitesse
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
DataSection
couleur :
Data.l $13, $30, $50, $70, $8E, $AE, $CF, $EC
Data.l $FF, $EB, $CF, $AF, $8E, $71, $50, $30
Data.l $0, $30914, $61632, $92454, $D3373, $104193, $144FB5, $185CD2
Data.l $1A65E7, $185CD2, $144FB4, $114193, $D3373, $A2554, $51632, $30A15
Data.l $1D2D, $314B, $4569, $5785, $6BA3, $7EC1, $90DC, $9CEE
Data.l $90DB, $7FC2, $6BA3, $5785, $4569, $314B, $1D2C, $D12
Data.l $62518, $B3E27, $F5837, $136F46, $178755, $1CA165, $1FB673, $22C67D
Data.l $20B773, $1CA166, $178755, $136F46, $F5837, $B3F28, $62518, $30F0A
Data.l $152516, $233E25, $315735, $3F6D43, $4D8652, $5B9F62, $67B56F, $70C478
Data.l $67B56E, $5BA062, $4D8752, $3E6D43, $325635, $243E26, $152417, $80F0A
Data.l $152209, $24390F, $324F15, $3F651A, $4E7C20, $5C9226, $69A62C, $72B42F
Data.l $69A62C, $5C9226, $4E7C20, $40641A, $324F15, $24390E, $152209, $90E04
Data.l $22230B, $393A13, $50511A, $666621, $7C7E29, $939631, $A7AA38, $B5B83C
Data.l $A7AA37, $939631, $7C7E2A, $656621, $50521B, $393A13, $22230B, $E0E05
Data.l $423411, $5E4919, $785D1F, $927226, $AD872D, $C89C34, $DFAE3B, $EFBB3F
Data.l $DEAE3B, $C79C34, $AD872D, $927227, $785D1F, $5D4A18, $423412, $271E0A
Data.l $251A12, $3E2C1E, $573C2A, $6E4D35, $875F41, $A0704D, $B68058, $C58A5F
Data.l $B58057, $A0704D, $875F41, $6E4D35, $573D29, $3E2B1E, $251A12, $F0A07
Data.l $211513, $372321, $4E302D, $633D39, $784C46, $8F5953, $A3665F, $B06E66
Data.l $A3655E, $8F5A53, $794B46, $623D39, $4E312D, $372220, $211514, $D0808
Data.l $C0609, $1D0F14, $311921, $44232F, $562C3B, $693649, $7D4056, $8E4961
Data.l $9A4F6A, $8E4962, $7D4056, $693648, $562C3B, $44232F, $311921, $1D0F14
Data.l $1D101B, $311B2D, $44263F, $573050, $6B3B62, $7E4673, $8F4F83, $9B568E
Data.l $8F5083, $7E4673, $6A3B61, $573050, $45263E, $301B2D, $1D101A, $C070B
Data.l $C0912, $1E142C, $31214A, $452F69, $583C84, $6D49A3, $8157C0, $9262DA
Data.l $9E6BED, $9262DB, $8157C0, $6D4AA2, $583C85, $462F69, $32224B, $1E152C
Data.l $211D42, $2E2A5D, $3B3676, $484190, $564EAB, $635AC5, $6E63DC, $766BEC
Data.l $6E64DC, $6259C6, $554EAB, $48418F, $3B3676, $2F2A5C, $211D41, $141227
Data.l $18003F, $220058, $2C0070, $350089, $3F00A3, $4900BD, $5100D2, $5700E1
Data.l $5100D1, $4800BC, $3F00A3, $350089, $2C0070, $220059, $18003E, $E0025
Data.l $23003E, $320059, $3F0071, $4D008A, $5C00A3, $6A00BD, $7600D3, $7F00E2
Data.l $7700D2, $6A00BD, $5C00A4, $4D0089, $400071, $320058, $23003F, $150025
Data.l $220029, $310039, $3E0049, $4B0059, $59006A, $66007A, $720088, $7B0092
Data.l $730088, $67007A, $59006A, $4A0059, $3E0049, $300039, $220028, $140018
Data.l $22031C, $310328, $3D0433, $4B053E, $59064A, $670755, $73085F, $7B0966
Data.l $73085F, $670855, $590649, $4A053E, $3D0433, $300428, $22021C, $140111
Data.l $220511, $300718, $3E081E, $4A0B25, $590D2C, $670E33, $721038, $7B113D
Data.l $721039, $670E33, $590C2C, $4A0A25, $3E091F, $300718, $220510, $14030A
Data.l $29130E, $3A1B13, $4B2219, $5A291F, $6C3125, $7C382A, $8B3E2F, $954332
Data.l $8B3F2F, $7C382A, $6C3025, $5A291E, $4A2219, $3B1A14, $2A130E, $190B08
Data.l $E0800, $221400, $382100, $4F2F00, $643B00, $7A4800, $915500, $A56100
Data.l $B36900, $A56000, $925600, $7B4800, $643B00, $4F2F00, $382100, $221300
Data.l $120D00, $2C2100, $4A3800, $684E00, $836300, $A17A00, $BF9000, $D9A400
Data.l $EBB200, $D9A400, $BF9100, $A17A00, $836400, $684E00, $4A3900, $2C2200
Data.l $D0D00, $1D1F00, $323400, $464900, $595C00, $6C7100, $808500, $929700
Data.l $9EA400, $919700, $808600, $6C7100, $585B00, $464800, $323300, $1E1F00
Data.l $1B2C00, $273E00, $314F00, $3B6000, $477300, $528500, $5C9400, $629F00
Data.l $5B9400, $518500, $477300, $3C6100, $315000, $263E00, $1B2C00, $101A00
Data.l $50E00, $B2100, $133700, $1A4D00, $216200, $287800, $308F00, $36A200
Data.l $3BB000, $37A200, $308E00, $297900, $216200, $1A4E00, $133800, $B2100
Data.l $93722, $D4D31, $11633F, $15794C, $198F5A, $1DA669, $20B975, $22C67D
Data.l $20B975, $1CA568, $18905B, $15784C, $11633E, $D4E30, $93723, $62114
Data.l $4344, $5F62, $7A7D, $9497, $B0B4, $CCD0, $E3E8, $F4F9
Data.l $E3E8, $CCD0, $B1B5, $9597, $7A7D, $6062, $4344, $2829
Data.l $2B42, $3E5E, $4E77, $5F90, $71AC, $82C7, $91DD, $9CEE
Data.l $92DE, $83C7, $71AD, $5F91, $4E77, $3D5D, $2B41, $1A27
Data.l $20812, $4132C, $81F48, $B2C66, $F3881, $12469E, $1552BC, $185DD5
Data.l $1A65E7, $185DD5, $1552BB, $12459F, $F3881, $B2D66, $82049, $5132C
Data.l $40011, $8002A, $D0046, $120063, $17007C, $1C0099, $2200B5, $2600CE
Data.l $2900DF, $2500CE, $2100B5, $1C0099, $17007C, $120063, $D0046, $80029
EndDataSection