Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
draw_obj & Entities #415376
01/17/13 21:09
01/17/13 21:09
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Did a search, found nothing of use.

The manual states that draw_obj can be used with view entities. Neato!

However...

Code:
PANEL* atestpanel = {
	flags=LIGHT;
	size_x = 50;
	size_y = 50;
	red = 200;
	green = 100;
	blue = 20;
}

ENTITY* atestent = {
	type="dummy.bmp";
	pan = 180;
	x = 200;
}

function main() {
	video_set(800,600,0,2);
	set(atestpanel,SHOW);
	atestent.flags2|=SHOW;
	while(!key_space) { 
		draw_text("Showing Originals",1,570,vector(255,255,255));
		wait(1);
	}
	while(key_space) wait(1);
	reset(atestpanel,SHOW);
	atestent.flags2&=~SHOW;
	while(1) {

		if(key_space) {
			atestpanel.pos_x = 30; //So we should have two panels shown
			draw_obj(atestpanel);
			atestpanel.pos_x = 100;
			draw_obj(atestpanel);

			atestent.z = 50;	//So we should have two entities shown
			draw_obj(atestent);
			atestent.z = 0;
			draw_obj(atestent);
		}
		
		draw_text("Using draw_obj when you press [SPACE].",1,570,vector(255,255,255));
		wait(1);
	}	
}



This little test project displays a testpanel (orange) and a testentity ("dummy.bmp"). Sweet. This should convince you that the settings of the entity are not at fault.
Now, if you hit space, we get to the interesting part.

Here, draw_obj is used (as long as the spacebar is pressed) to draw two panels and two entities, in theory. The manual explicitly states:

Quote:
The SHOW flag of the object needs not be set.


So I reset the SHOW-flag.
As you can see, two panels are correctly rendered. Neat!
However, as you can also see, the entity is not shown.
For the curious, setting the entities' SHOW-flag won't help with draw_obj - it still won't be rendered (though you will see the entity at the last set position, obviously).


Why is that? What am I doing wrong? Is that a bug or am I misunderstanding something?

Thanks in advance!


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: draw_obj & Entities [Re: Error014] #415388
01/17/13 23:58
01/17/13 23:58
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Tried a few things, does not work for me, too. I assume it's a bug or it never got implemented (please report it then as the ability to draw entities manually sounds awesome).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: draw_obj & Entities [Re: Superku] #415390
01/18/13 00:07
01/18/13 00:07
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Thanks!

Yeah, it seems like this is a bug. As requested, I've reported it.


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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