Scaling is not working

Just starting out? Need help? Post your questions and find answers here.
Foz
Posts: 20
Joined: Mon Feb 24, 2014 11:25 pm

Scaling is not working

Post by Foz »

Code: Select all

#OutputSprite = 0
#tmpSprite = 1

Global GameWidth.i = 320, GameHeight.i = 240, GameSpriteSize.i = 16
Global DisplayWidth.i = 0, DisplayHeight.i = 0

Procedure RenderFrame()
  ClearScreen($000077)
  
  ClipSprite(#tmpSprite, 20 , 20 , 56 , 52 )
  DisplaySprite(#tmpSprite, 20, 20 )
  
  
  FlipBuffers()
  
EndProcedure


ExamineDesktops()
DisplayWidth = DesktopWidth(0) / 2
DisplayHeight = DesktopHeight(0) /2

OpenWindow (0, 0, 0, DisplayWidth, DisplayHeight, "", #PB_Window_ScreenCentered | #PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0), 0, 0, GameWidth, GameHeight, 1, 0, 0) ; auto scale is set, not not working

SetFrameRate(3)

BindEvent(#PB_Event_RenderFrame, @RenderFrame())

CreateSprite(#tmpSprite, 32, 32)
StartDrawing(SpriteOutput(#tmpSprite))
Box(0, 0, 32, 32, RGB(255,255,255))
StopDrawing()

FlipBuffers(); // start the rendering
Fred
Site Admin
Posts: 1510
Joined: Mon Feb 24, 2014 10:51 am

Re: Scaling is not working

Post by Fred »

Everything seems OK here, can someone else confirm ? BTW, you can't clip a sprite above it own width/height.
Post Reply