- This wiki is out of date, use the continuation of this wiki instead
Set mode
From FenixWiki
Revision as of 01:33, 1 May 2007 (edit) Sandman (Talk | contribs) m (→Throws - -> Errors) ← Previous diff |
Current revision (18:42, 4 January 2008) (edit) (undo) Sandman (Talk | contribs) m |
||
(8 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
[[Category:functions]] | [[Category:functions]] | ||
- | [[Category: | + | [[Category:programinteraction]] |
== Definition == | == Definition == | ||
'''INT''' set_mode ( <'''INT''' width> , <'''INT''' height> , [<'''INT''' depth>] , [<'''INT''' flags>] ) | '''INT''' set_mode ( <'''INT''' width> , <'''INT''' height> , [<'''INT''' depth>] , [<'''INT''' flags>] ) | ||
- | Sets the | + | 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 == | == Parameters == | ||
{| | {| | ||
- | | '''INT''' width || - Width of the screen in | + | | '''INT''' width || - Width of the screen in [[pixel]]s. |
|- | |- | ||
- | | '''INT''' height || - Height of the screen in | + | | '''INT''' height || - Height of the screen in [[pixel]]s. |
|- | |- | ||
- | | '''INT''' depth || - Color depth of the screen. | + | | '''INT''' [depth] || - [[Color depth]] of the screen. See [[color_depths]]. |
|- | |- | ||
- | | '''INT''' flags || - | + | | '''INT''' [flags] || - Mode of rendering. See [[render flags]]. |
|} | |} | ||
== Returns == | == Returns == | ||
'''INT''' : [[true]] | '''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. | ||
+ | |||
+ | To circumvent the maximum resolution (1600 pixels wide and 1400 pixels high), [[Media:setmode.zip|this DLL]] can help. | ||
== Errors == | == Errors == | ||
Line 25: | Line 34: | ||
| Unsupported graphical mode || - Specified graphical mode is not supported. | | Unsupported graphical mode || - Specified graphical mode is not supported. | ||
|} | |} | ||
+ | |||
+ | == Example == | ||
+ | <pre> | ||
+ | Program test; | ||
+ | Begin | ||
+ | Set_mode(640,480,16); | ||
+ | Repeat | ||
+ | Frame; | ||
+ | Until(key(_ESC)) | ||
+ | End | ||
+ | </pre> | ||
+ | |||
+ | {{Funcbox | ||
+ | | category=Programinteraction | ||
+ | }} |
Current revision
Contents |
[edit] 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.
[edit] 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. |
[edit] Returns
INT : true
[edit] 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.
To circumvent the maximum resolution (1600 pixels wide and 1400 pixels high), this DLL can help.
[edit] Errors
Unsupported graphical mode | - Specified graphical mode is not supported. |
[edit] Example
Program test; Begin Set_mode(640,480,16); Repeat Frame; Until(key(_ESC)) End
Programinteraction Functions | |
• Exit() • Getenv() • Key() • Move_window() • Set_fps() • Set_icon() • Set_mode() • Set_title() • |