Seite 1 von 1

SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 20:25
von kutta
Und nochmal ich,
SpriteQuality(#PB_Sprite3D_BilinearFiltering) , spuckt bei mir immer unbekannte Konstante aus.
Weiß dazu jemand was ?

Code: Alles auswählen

InitSprite()
SpriteQuality(#PB_Sprite3D_NoFiltering) 
Gruß

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 20:30
von ts-soft
Vielleicht mal in die Hilfe gucken? :wink:
SpriteQuality

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 20:31
von RSBasic
Es liegt daran, dass in der Version 5.20 LTS die Bibliothek "Sprite3D" in "Sprite" umbenannt wurde.

Code: Alles auswählen

#PB_Sprite_NoFiltering
PS: Die deutsche Hilfe ist veraltet.

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 20:33
von Kiffi
ts-soft hat geschrieben:Vielleicht mal in die Hilfe gucken? :wink:
SpriteQuality
:lol:

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 20:36
von kutta
Ahh danke, ohne 3d im Namen läufts !

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 20:53
von kutta
Screen sollte auch geöffnet sein damit der Befehl funktioniert, steht auch nicht in der Hilfe >_<

Code: Alles auswählen

InitSprite() 
InitMouse()
InitKeyboard() 
OpenScreen(1024,768,32,"test") 
LoadFont(1, "comic sans ms", 35)
SpriteQuality(#PB_Sprite_BilinearFiltering)  
CreateSprite(1,256,256) 
StartDrawing(SpriteOutput(1))
  Box(0, 0, 256, 256,RGB(0,0,50))
  DrawingFont(FontID(1))
  DrawingMode(#PB_2DDrawing_Transparent)
  DrawText(20,20,"Purebasic", RGB(0, 250, 250))
StopDrawing() 

CreateSprite(2,256,256)
CreateSprite(3,256,256)

StartDrawing(SpriteOutput(3))
  For t=0 To 80
    Box(0, t, 256,1,RGB(t*2+60,0,0))
  Next
  For t=80 To 160
    p=p+1
    Box(0, t, 256,1,RGB(210-p*2,0,0))
  Next
StopDrawing() 


count=10
ClearScreen(RGB(0,0,50))
CreateSprite(4,256,256) 
CreateSprite(5,256,256)
CreateSprite(6,256,256)
For t=0 To 36 
  StartDrawing(SpriteOutput(4)) 
    For h=0 To 256 
      ClipSprite (1,h,0,1,256) 
      DisplaySprite (1,h,Sin((h+t*20)*(3.14159265/180))*20) 
    Next
  StopDrawing() 
  GrabSprite(5,0,0,256,256)
  ClearScreen(RGB(0,0,50))
  StartDrawing(SpriteOutput(6)) 
    For h=0 To 256 
      ClipSprite (5,0,h,256,1) 
      DisplaySprite (5,Sin((h+t*10)*(3.14159265/180))*10,h) 
    Next
  StopDrawing() 
  GrabSprite(count,0,0,256,256) 
  count=count+1 
Next 

speed=1
frame=10

Repeat 
  ExamineKeyboard() 
  ClearScreen(RGB(0,0,0))
  y.f=1
  off=(off+speed) %256
  If frame = count:frame=10:EndIf

  StartDrawing(SpriteOutput(2))
    For n=1 To 256 
		  y.f=y+Sin(n/1.4*(3.14159265/180))
		  temp=(temp+1) %256
		  ClipSprite(frame, 0,temp, 256,1)
		  DisplaySprite(frame,0,y)
    Next
  StopDrawing()
  
  GrabSprite(7, 0, 0, 256, 256,#PB_Sprite_AlphaBlending )

  temp=off
  y=1
  frame=frame+1
  ClearScreen(RGB(0,0,0))
 
  ZoomSprite(7, 1024,150)
  ZoomSprite(3, 1024,148)   
  DisplaySprite(3,0,400)
  DisplayTransparentSprite(7,0,400,150) 
  FlipBuffers()
  FreeSprite(7)
Until KeyboardPushed(#PB_Key_Escape)

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 21:02
von ts-soft
Und dann würde ich Dir mal EnableExplicit ans Herz legen. Gab es vermutlich zu "Deiner Zeit" auch nicht,
ist aber sehr hilfreich!

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 21:04
von kutta
Ok schau ich mir mal an danke, genuch für heut

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 21:10
von ts-soft
Kiffi hat geschrieben:
ts-soft hat geschrieben:Vielleicht mal in die Hilfe gucken? :wink:
SpriteQuality
:lol:
Sind es die Augen, geh zu Ruhnke. Werde ich mich also demnächst mal aufmachen :lol:

Gruß
Thomas

Re: SpriteQuality - unbekannte Konstante

Verfasst: 07.06.2015 21:26
von Kiffi
<OT>
ts-soft hat geschrieben:Sind es die Augen, geh zu Ruhnke.
Besser noch, Du gehst zu Mampe,
gießt dir or'ndlich einen auf die Lampe.
Kannst dann alles doppelt seh'n,
brauchst nicht mehr zu Ruhnke gehn.
:D

Grüße ... Peter (der fast auch den Link zur PB-Hilfe gepostet hätte ;-))

</OT>