Function BattleMessage(Msg$) Local MS1 = MilliSecs() Local MS2 Repeat battleDrawScreen DrawImage BXTop,0,20-ImageHeight(BXTop) SetViewport 0,20,800,80 SetOrigin 0,20 TileImage BxBody,0,0 SetScale 2,2 SetColor BXR,BXG,BXB DrawText MSG,400-(TextWidth(MSG)),40-(TextHeight(MSG)) SetScale 1,1 SetColor 255,255,255 SetOrigin 0,0 SetViewport 0,0,800,600 DrawImage BXBottom,0,100 Flip MS2=MilliSecs() Until MS2<MS1 Or MS2-MS1>5000 End Function
This is part of some code I set up for universal use in multiple projects.
In the Mac version this code works precisely as I meant to.
In the Windows version it doesn't.
I hoped that this would work on as well small pictures (which would be tiled), as big pictures which would be cut so that only the part within the viewport was shown.
As I said. The Mac version does it that way, the Windows version acts like I didn't use the SetViewPort command at all. Since the Mac version works, I don't think anything is wrong with my code. There's something in the Windows version that does it. Is it Windows, or BlitzMax that's the problem?
I'm really sorry, I cannot put more of the source code in it. I cannot reveal too much in the project's current state, plus that I have too much initiation routines. So I hope this code is what you need. If not, I'll try to set up a small program that can be built completely.
Anyway, the problem occurs in both "windowed" as "Full-Screen" mode.
I couldn't test this in Linux, since I do not have a fully operational Linux system.