103 lines
3.6 KiB
HTML
103 lines
3.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>The Display</title>
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body background="images/back.gif">
|
|
<!--START-->
|
|
|
|
<h3>The display</h3>
|
|
|
|
The display represents the whole area on the monitor. It has a size
|
|
(typically 1024x768, or 1280x1024), a color depth, that is, the number
|
|
of bits that are used to represent a single pixel (typically 16 = High Color
|
|
or 32 = Full Color) and a refresh frequency, that is, the number of times
|
|
per second the display is refreshed (typically between 60 and 120).
|
|
These settings can normally be changed though the display properties.
|
|
For games though, in particular when they run in full-screen mode,
|
|
it is important to be able to change these settings. All these
|
|
settings can be initialized for the game in the <b>Game Settings</b>.
|
|
For use during game play the following functions exist. Note
|
|
though that changing the settings during game play will result
|
|
in a time delay as things has to be rebuilt.
|
|
<b><i>The functions to set the mode are only available in the Pro Edition.</i></b>
|
|
|
|
<p>
|
|
<blockquote>
|
|
<tt><b>display_get_width()</b></tt>
|
|
Returns the width of the display in pixels.<br>
|
|
<tt><b>display_get_height()</b></tt>
|
|
Returns the height of the display in pixels.<br>
|
|
<tt><b>display_get_colordepth()</b></tt>
|
|
Returns the color depth in bits.<br>
|
|
<tt><b>display_get_frequency()</b></tt>
|
|
Returns the refresh frequency of the display.<br>
|
|
<tt><b>display_set_size(w,h)</b></tt>
|
|
Sets the width and height of the display in pixels. Returns whether
|
|
this was successful. (Realize that only certain combinations are allowed.)<br>
|
|
<tt><b>display_set_colordepth(coldepth)</b></tt>
|
|
Sets the color depth. In general only 16 and 32 are allowed values.
|
|
Returns whether successful.<br>
|
|
<tt><b>display_set_frequency(frequency)</b></tt>
|
|
Sets the refresh frequency for the display. Only few frequencies
|
|
are allowed. Typically you could set this to 60 with a same
|
|
room speed to get smooth 60 frames per second motion.
|
|
Returns whether successful.<br>
|
|
<tt><b>display_set_all(w,h,frequency,coldepth)</b></tt>
|
|
Sets all at once. Use -1 for values you do not want to change.
|
|
Returns whether successful.<br>
|
|
<tt><b>display_test_all(w,h,frequency,coldepth)</b></tt>
|
|
Tests whether the indicated settings are allowed.
|
|
It does not change the settings. Use -1 for values you do
|
|
not want to change. Returns whether the settings are allowed.<br>
|
|
<tt><b>display_reset()</b></tt>
|
|
Resets the display settings to the ones when the program was started.<br>
|
|
</blockquote>
|
|
|
|
<p>
|
|
|
|
Sometimes it is useful to get information about the position of the mouse on the display or to change this position. For this the following functions exist:
|
|
|
|
<p>
|
|
<blockquote>
|
|
<tt><b>display_mouse_get_x()</b></tt>
|
|
Returns the x-coordinate of the mouse on the display.<br>
|
|
<tt><b>display_mouse_get_y()</b></tt>
|
|
Returns the y-coordinate of the mouse on the display.<br>
|
|
<tt><b>display_mouse_set(x,y)</b></tt>
|
|
Sets the position of the mouse on the display to the indicated values.<br>
|
|
</blockquote>
|
|
|
|
<p>
|
|
|
|
<!--END-->
|
|
</body>
|
|
</html>
|
|
|
|
<!-- KEYWORDS
|
|
display
|
|
monitor
|
|
screen
|
|
changing display settings
|
|
display settings
|
|
frequency
|
|
color depth
|
|
resolution
|
|
|
|
display_get_width()
|
|
display_get_height()
|
|
display_get_colordepth()
|
|
display_get_frequency()
|
|
display_set_size()
|
|
display_set_colordepth()
|
|
display_set_frequency()
|
|
display_set_all()
|
|
display_test_all()
|
|
display_reset()
|
|
display_mouse_get_x()
|
|
display_mouse_get_y()
|
|
display_mouse_set()
|
|
|
|
--> |