Voici la lib que j'ai utiliser a renommer Math+ :
Code : Tout sélectionner
 ;*****************************************************************************
;  Fonctions sinus et cosinus en degrée
DefType.f pi 
!fldpi 
!fstp dword[v_pi] 
Declare.f gSin(winkel)
Declare.f gCos(winkel)
Declare.f Hypotenus(Cote1.f,Cote2.f)
Procedure.f gsin(winkel)                              
   ProcedureReturn Sin(winkel*0.017444)
EndProcedure
Procedure.f gCos(winkel)                              
   ProcedureReturn Cos(winkel*0.017444)
EndProcedure
Procedure.f Hypotenus(Cote1.f,Cote2.f)
  !fld dword[esp] 
  !fmul st0,st0   
  !fld dword[esp+4] 
  !fmul st0,st0   
  !faddp  
  !fsqrt  
EndProcedure
Procedure.b Sgn(n.f)
  !fld dword[esp] 
  !fstp st1 
  !ftst   
  !fnstsw ax  
  !fwait
  !xor al,al
  !sahf    
  !jz near @f
  !inc al
  !;inc instruction doesn't modify CPU C flag ;)
  !jnc near @f
  !neg al
  !@@:MOVSX eax,al 
  ProcedureReturn
EndProcedureVoici le code de mon premier VRAI effet
Code : Tout sélectionner
;Initialisation des composant
InitSprite() : InitKeyboard()
IncludeFile "Math+.pb"
;Fonction ouverture de la fenetre screen
SetRefreshRate(60)
If OpenScreen(1024,768,32,"Effet Ligne tournante dans un cercle")  ; L'écran va essayer de s'ouvrir en 60hz.  
  Goto play 
Else 
  SetRefreshRate(0)
  If OpenScreen(1024,768,32,"Effet Ligne tournante dans un cercle")  
    SetFrameRate(60) 
  EndIf
EndIf
play :
;Initialisation des variable
centrex=512
centrey=384
rayon=256
angle=0
;Debug Sin(1)
; BOUCLE
Repeat
ClearScreen(0,0,0)
;Debut du dessin du cercle
StartDrawing(ScreenOutput())
    DrawingMode(1|4)
    For anglecercle=0 To 359
        x=centrex+rayon*Sin(anglecercle*0.017444)
        y=centrey+rayon*Cos(anglecercle*0.017444)
        Plot(x,y,RGB(255,0,0))        
    Next anglecercle
;Calcul des ligne 
   x1=centrex+rayon*gSin(angle)
   y1=centrey+rayon*gCos(angle)
   
   x2=centrex+rayon*gSin(angle+250)
   y2=centrey+rayon*gCos(angle+250)
;Affichage des ligne    
   LineXY(x1,y1,x2,y2,RGB(255,255,0))
   LineXY(x2,y2,x3,y3,RGB(255,255,0))
  
   Locate(0,0):FrontColor(255,255,255):DrawText(FPS$)
StopDrawing()
angle+1
angle=angle % 360
Gosub FPS
FlipBuffers(0)
ExamineKeyboard()
;Fin du programme
Until KeyboardPushed(#PB_Key_Escape)
End
;Comptage du nombre de fps
FPS  :
If Val(FormatDate("%ss", Date()))=sek
  FPS  + 1
Else
       FPS$  = Str(FPS)
       FPS  = 1
EndIf
sek  = Val(FormatDate("%ss", Date()))