Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Ayumi), 662 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PROC_NOFREEZE still doesn't work #372247
05/30/11 18:26
05/30/11 18:26
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
PROC_NOFREEZE still doesn't work ... even in the current version 8.20.1.

Regards,
Pegamode.

Re: PROC_NOFREEZE still doesn't work [Re: pegamode] #372297
05/31/11 10:08
05/31/11 10:08
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Works here perfectly. Can you give some details of your problem?

Re: PROC_NOFREEZE still doesn't work [Re: jcl] #372306
05/31/11 12:48
05/31/11 12:48
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
I'll try to write a little test program as soon as possible ... maybe I use PROC_NOFREEZE in a wrong way.

Re: PROC_NOFREEZE still doesn't work [Re: pegamode] #372343
05/31/11 19:24
05/31/11 19:24
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
I tried this code, but had no luck to get it working:

Code:
FONT* pause_font = "Arial#20b";

STRING* pause_str = "Pause";

TEXT* txtPause = {
	layer 	= 2;
	pos_x 	= 512;
	pos_y 	= 353;
	red 		= 255;
	green 	= 255;
	blue 		= 255;
	string 	= pause_str;  
	font 		= pause_font;
	alpha 	= 100;
	flags 	|= CENTER_X | CENTER_Y | OUTLINE | TRANSLUCENT;
}

int space_been_pressed = false;

void handle_key_space() {
	proc_mode = PROC_NOFREEZE;
		
	space_been_pressed = true;
		
	if(freeze_mode == 2) {
		freeze_mode = 0;		
		reset(txtPause, SHOW);				
	} else {		
		set(txtPause, SHOW);
		freeze_mode = 2;		
	}
	while (key_space) {
		wait(1);
	}
	
	space_been_pressed = false;	
}

void mouse_key_observer() {
	proc_mode = PROC_NOFREEZE;	
	while (1) {		
		if (key_space && !space_been_pressed) {				
			handle_key_space();		
		}					
		wait (1);						
	}
}

void main() {
	
	mouse_key_observer();
	
	while(1) {		
		wait(1);
	}
}



The same code works fine when using "freeze_mode = 1;",

Re: PROC_NOFREEZE still doesn't work [Re: pegamode] #372397
06/01/11 07:23
06/01/11 07:23
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You must set proc_mode inside your wait loop, not outside:

void mouse_key_observer() {
while (1) {
if (key_space && !space_been_pressed) {
handle_key_space();
}
proc_mode = PROC_NOFREEZE;
wait (1);
}
}


Re: PROC_NOFREEZE still doesn't work [Re: jcl] #372412
06/01/11 09:47
06/01/11 09:47
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Oh, ok ... sorry, I didn't see the remark in the manual at proc_mode.
My mistake.

Works like a charm now.

Thanks.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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