This wiki is out of date, use the continuation of this wiki instead

Set mode

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 02:10, 24 July 2007 (edit)
Rincewind (Talk | contribs)
(little overhaul)
← Previous diff
Revision as of 00:29, 19 December 2007 (edit) (undo)
Sandman (Talk | contribs)
m (Notes)
Next diff →
Line 24: Line 24:
== Notes == == Notes ==
-Any fpg files you load must have the same colordepth as you set for the screen.+Any fpg files you load must have the same or a lower colordepth as you set for the screen.
Uncommon resolutions can also be used, for example 399x10, which will be the actual size of the window if you run in windowed mode. At full screen black edges might appear. Uncommon resolutions can also be used, for example 399x10, which will be the actual size of the window if you run in windowed mode. At full screen black edges might appear.

Revision as of 00:29, 19 December 2007


Contents

Definition

INT set_mode ( <INT width> , <INT height> , [<INT depth>] , [<INT flags>] )

Sets the screen resolution of your program, and optionally the colordepth of the screen and any render flags for extra options. If this command is not used, the default settings will take effect (320x200 at 256(8 bit) colors).

Some much used resolutions are: 320x240, 640x480, 800x600, 1024x768, 1280x1024, and 1400x1050.

Parameters

INT width - Width of the screen in pixels.
INT height - Height of the screen in pixels.
INT depth - Color depth of the screen. See color_depths.
INT flags - Mode of rendering. See render flags.

Returns

INT : true

Notes

Any fpg files you load must have the same or a lower colordepth as you set for the screen.

Uncommon resolutions can also be used, for example 399x10, which will be the actual size of the window if you run in windowed mode. At full screen black edges might appear.

Errors

Unsupported graphical mode - Specified graphical mode is not supported.

Example

Program test;
Begin
    Set_mode(640,480,16);
    Loop
        Frame;
    End
End
Personal tools