Page 1 of 1

createimage / code consistency usewindow usesprite etc.

Posted: Wed Oct 22, 2003 11:13 pm
by blueznl
perhaps a good suggestion would be to make the commands for 2d output consistent...

UseImage
UseSprite
UseTexture

WindowOutput( [ window_id ] )
SpriteOutput( [ sprite_id ] )

etc.

Code: Select all


    Windows

      UseWindow( window_id )
      StartDrawing( WindowOutput() )
      ..
      StopDrawing


    Images.

    As for windows.

      UseImage( image_id )
      StartDrawing( ImageOutput() )
      ..
      StopDrawing


    Sprites.

    Multiple sprites are possible. The syntax however is slightly different from using windows.

      StartDrawing( SpriteOutput( sprite_id ) )
      ..
      StopDrawing


    Screens.

    There can only be one screen, so you don't have to 'use' it.

      StartDrawing( ScreenOutput() )
      ..
      StopDrawing


Posted: Wed Oct 22, 2003 11:37 pm
by blueznl
in general, there are many commands that could do without that additional 'use' statement...

UseImage(1)
d4.l=ImageDepth()

could be replaced with

d4.l=ImageDepth(1)

less llines and better readable, and might result in quicker code... what if i don't want to use (send output to) that image, just want to have the depth?

Posted: Wed Oct 22, 2003 11:40 pm
by blueznl
and, as a final note, how about CreateImage() with a depth parameter?