freak wrote:For the 2ddrawing: There is no information in these structures which you
cannot get with normal PB commands or which is not already known when
you create the object you are drawing on (for example Width/Height)
So no, i do not think you need this...
Ohh yes ... I prefer to use normal PB commands ... I really do.
And you are right that one should know these Informations while creating the drawing object, but there are a lot of informations you cannot get "back" later on.
If you need things like these in an common Procedure you don't know them there (I try to write a Userlib and I need theses values within this lib).
Using the unsupported PB-Internals is the only way I see at the moment to get to these kind of informations within a linked or included common subroutine.
If you may have a look at
>this< german Thread, you can see some of the PB commands which are missing to write things like this.
Nevertheless here is an even more precise list:
- IsScreen() - checks if a screen is already opened
- ScreenWidth() - provides the Screen-Width
- ScreenHeight() - provides the Screen-Height
- ScreenDepth() - provides the Screen-Depth
- ScreenPixelFormat() - provides the PixelFormat of the Output channel
- IsOutpuBuffer() - checks if there is an actual Output channel (StartDrawing() has been called already)
- OutputWidth() - provides the Width of the Output channel
- OutputHeight() - provides the Height of the Output channel
- OutputDepth() - provides the Depth of the Output channel
- OutputPixelFormat() - provides the PixelFormat of the Output channel
I've already realised some of these commands by using just 2 lines of assembler and some PB-internal Informations. E.g.:
Code: Select all
Procedure ScreenHeight()
!EXTRN _PB_Screen_Height
!MOV Eax,[_PB_Screen_Height]
EndProcedure
But as you've said: Because this is not native PB, it can differs for each OS and can change with any release.
Because of this it would be nice if you can implement some very easy commands like this or if you could just provide a pointer to a structure, so one can get this kind of information out somehow.