I have a problem with this code
i want to scroll only PART of the screen XYWH as in 100,100,200,200 so I set the SetViewPort to those specs; then my updates are within that field OK! it works ... or so i thought! except i noticed that after the viewport has been set, I cant animate elsewhere on the screen. so i thought the soilution was to add another / a second setviewport after my "drawing", a setviewport() that "normalised" the viewport to 0,0,640,480, but it doesnt seem to work; here is my code:
While Not KeyHit(KEY_ESCAPE)
Cls
Do-something()
Do-something()
…
…
SetViewport(100,100,200,200) ‘only do something is specific area!
..
…
Flip 0;
Wend
I tried putting a SetViewPort(0,0,640,480) just before flip 0; but it did not seem to work! all "future" drawings are only done is the tiny area??
i want to scroll only PART of the screen XYWH as in 100,100,200,200 so I set the SetViewPort to those specs; then my updates are within that field OK! it works ... or so i thought! except i noticed that after the viewport has been set, I cant animate elsewhere on the screen. so i thought the soilution was to add another / a second setviewport after my "drawing", a setviewport() that "normalised" the viewport to 0,0,640,480, but it doesnt seem to work; here is my code:
While Not KeyHit(KEY_ESCAPE)
Cls
Do-something()
Do-something()
…
…
SetViewport(100,100,200,200) ‘only do something is specific area!
..
…
Flip 0;
Wend
I tried putting a SetViewPort(0,0,640,480) just before flip 0; but it did not seem to work! all "future" drawings are only done is the tiny area??