Did a search, found nothing of use.
The manual states that draw_obj can be used with view entities. Neato!
However...
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:
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!