Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (TipmyPip, clint000, Grant, chsmac85, Martin_HH), 5,858 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Setting video_mode with a var??? #10472
09/28/02 13:48
09/28/02 13:48

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I don't know why this wouldn't work:

var res_mode = 6;

var video_mode = res_mode;

Is there an easy way to adjust the video_mode from my slider in my options panel?

Thanks for your help [Smile]

-raiden

Re: Setting video_mode with a var??? #10473
09/28/02 21:58
09/28/02 21:58
Joined: Mar 2002
Posts: 801
Switzerland, Zürich
napo Offline
Developer
napo  Offline
Developer

Joined: Mar 2002
Posts: 801
Switzerland, Zürich
you should use switch_video() instead of video_mode because u can't change video_mode during the game [Wink]

Re: Setting video_mode with a var??? #10474
09/28/02 23:13
09/28/02 23:13

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



So would this be the right way to adjust it with a slider:

var vid_mode = 6;//default 640X480

panel switch_vid_res_panel
{
//......
hslider = x, y, len, bmap, 6, 7, vid_mode;
//......
}

function startup { switch_video(vid_mode); }

I checked out the menu.wdl in the templates, the only thing I saw as far as how they did it was in a function: _toggle_video. I could not find this function anywhere in any of the templates ??? I am only wanting to switch from 2 resolution sizes 640X480 & 800X600 with my hslider.

-raiden

Re: Setting video_mode with a var??? #10475
09/29/02 00:21
09/29/02 00:21
Joined: May 2002
Posts: 752
Frankenthal Pfalz/ Germany
Rich E. Offline
Developer
Rich E.  Offline
Developer

Joined: May 2002
Posts: 752
Frankenthal Pfalz/ Germany
_toggle_video is engine internally function,
but you can write you own function.

Here is the originally _toggle_video code:
code:
 function _toggle_video()
{
if (key_shift == 0)
{
temp = video_mode + 1;
again:
if (temp >= 12) { temp = 1; }
switch_video temp,0,0;
if (result == 0)
{
temp += 1;
goto again;
}
}
else
{
temp = video_mode - 1;
again2:
if (temp < 1) { temp = 12; }
switch_video temp,0,0;
if (result == 0)
{
temp -= 1;
goto again2;
}
}
}

If you press F5, you also call this function.

Rich E.

P.S.: My english is bad... very, very bad.


Re: Setting video_mode with a var??? #10476
09/29/02 02:48
09/29/02 02:48

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Thanks Rich, I should be able to figure out how to do it from the code you supplied. [Smile]

-raiden


Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1