It is currently Mon Sep 21, 2020 12:25 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [PB 5.22x86] TransformSprite() is acting strange
PostPosted: Sat Jul 19, 2014 11:23 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
The following snippet has not the same result on Window or on Linux :
Code:
InitSprite()
InitKeyboard()

OpenWindow(0, 0, 0, 800, 400, "MoonLander", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, 800, 400)
KeyboardMode(1)

CreateSprite(1, 10, 10, 4)

Macro circle_(x, y, x1, y1, x2, y2, x3, y3, x4, y4)
   Circle(x+x1, y+y1, 2, $FF)
   Circle(x+x2, y+y2, 2, $FF00)
   Circle(x+x3, y+y3, 2, $FF0000)
   Circle(x+x4, y+y4, 2, $FFFFFF)
EndMacro



Repeat
   _count_ + 1
   
   Repeat
      _event_ = WindowEvent()
   Until _event_ = 0 Or #PB_Event_CloseWindow
   
   ExamineKeyboard()
   
   If KeyboardPushed(#PB_Key_Escape)
      _event_ = #PB_Event_CloseWindow
   EndIf
   
   
   ClearScreen($2FC9F0)
   
   TransformSprite(1, 100, 100, 200, 100, 200, 200, 100, 200)
   DisplaySprite(1, 0, 0)
   
   
   TransformSprite(1, 100, 100, 200, 100, 300, 300, 100, 200)
   DisplaySprite(1, 200, 0)
   
   
   
   TransformSprite(1, 100, 100, 200, 300, 300, 300, 100, 200)
   DisplaySprite(1, 400, 0)
   
   StartDrawing(ScreenOutput())
   
   circle_(0, 0, 100, 100, 200, 100, 200, 200, 100, 200)
   circle_(200, 0, 100, 100, 200, 100, 300, 300, 100, 200)
   circle_(400, 0, 100, 100, 200, 300, 300, 300, 100, 200)
   
   StopDrawing()
   
   FlipBuffers()
   
   
Until  _event_ = #PB_Event_CloseWindow


On Windows :
Image

On Linux Mandriva
Image

I don't know if it does this for Mac, or Other machines

_________________
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed ;))


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 5.22x86] TransformSprite() is acting strange
PostPosted: Sun Jul 20, 2014 12:05 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3543
Location: New Zealand
it's been like this for quite some time.
the order on linux in 4.61 used to be x1,y1,x3,y2,x2,y3,x4,y4
but it has changed on 5.22 and I've not figured it out yet


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 5.22x86] TransformSprite() is acting strange
PostPosted: Mon Jul 21, 2014 9:18 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
I gave up on the logic too !
My research didn't give any result on previous post. I'm relieve to find it's not only my computer :wink:

Didn't tested this with the bêta, because I can't download it (it say 7h or more...)

_________________
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed ;))


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 5.22x86] TransformSprite() is acting strange
PostPosted: Wed Jul 23, 2014 9:42 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
TransformSprite() doesn't work on Mac too. And the SpritepixelCollision() is not working too !

_________________
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed ;))


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 5.22x86] TransformSprite() is acting strange
PostPosted: Thu Jul 24, 2014 1:56 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
For those of you that want it :

Code:
Macro TransformSprite_linux(sprite, _x1, _y1, _x2, _y2, _x3, _y3, _x4, _y4)
   CompilerIf #PB_Compiler_OS = #PB_OS_Windows
      TransformSprite(sprite, _x1, _y1, _x2, _y2, _x3, _y3, _x4, _y4)
   CompilerElse
      ; Linux / Mac
      TransformSprite(sprite, _x4, _y1, _x2, (_y1)-(_y3)+(_y4), _x3, (_y1)-(_y2)+(_y4), _x1, _y4)
   CompilerEndIf
EndMacro


This works on Linux and Mac !

_________________
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed ;))


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye