Change resolution

Posted By: NL_3DGS_n00b

Change resolution - 07/08/06 14:17

Is this a good command for switching the resolution ingame?

video_switch(8,0,0);

A friend of mine is using this commando, and he gets the following error:

< video_switch(8,0,0)>
TESTGAME.WDL 670:0 Error(0): Bad or missing parameter unknown function
Posted By: Michael_Schwarz

Re: Change resolution - 07/08/06 16:28

video_set(var width,var height,var depth,var screen)

Like video_switch, but the width and height can now be set individually, thus allowing arbitrary video resolutions not contained in the 12 supported modes.

Parameters:
width width of screen resolution
height height of screen resolution
depth color depth of screen resolution
screen fullscreen or window mode

Remarks:
In window mode, arbitrary video resolutions are supported as long as they fit on the desktop screen and sufficient video memory is available.

In fullscreen mode, only a few video resolutions are supported, dependent on the 3D card.

Speed:
Medium

Example:
Code:

// place the window at position (500,300) and remove the

bordervideo_window(vector(500,300,0),nullvector,1,NULL);

// But a small engine window at this position (to fake the eninge into another applictaion)
video_set(100, 100, 32, 0);



From the M A N U A L
Posted By: ulillillia

Re: Change resolution - 07/09/06 04:08

I encountered a bug when doing this. Oddly enough, video_screen and video_depth must be defined as well before they even work, but they shouldn't produce any errors like that. Check the code around this instruction to make sure you don't have any missing semicolons somewhere and that you don't have any extra braces, the }. These are the most likely cases that cause this.

But yes, video_set should be the instruction to use to switch resolutions. Video_switch can be more problematic, especially when odd/unusual resolutions are used and only when in fullscreen mode.
Posted By: NL_3DGS_n00b

Re: Change resolution - 07/09/06 12:33

Problem solved;

Forgot to define the video_depth variable at the beginning of my script.
© 2023 lite-C Forums