make room for polylight object

This commit is contained in:
Asad M. Zaman 2004-06-09 21:30:37 +00:00
parent 022f83833f
commit 67a0fd47db
4 changed files with 34 additions and 0 deletions

View File

@ -490,6 +490,30 @@ get_portal_flag() const {
return ((_flags2 & F2_portal_flag) != 0);
}
////////////////////////////////////////////////////////////////////
// Function: EggGroup::set_polylight_flag
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE void EggGroup::
set_polylight_flag(bool flag) {
if (flag) {
_flags2 |= F2_polylight_flag;
} else {
_flags2 &= ~F2_polylight_flag;
}
}
////////////////////////////////////////////////////////////////////
// Function: EggGroup::get_polylight_flag
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE bool EggGroup::
get_polylight_flag() const {
return ((_flags2 & F2_polylight_flag) != 0);
}
////////////////////////////////////////////////////////////////////
// Function: EggGroup::set_collide_mask
// Access: Public

View File

@ -213,6 +213,10 @@ write(ostream &out, int indent_level) const {
indent(out, indent_level) << "<Portal> { 1 }\n";
}
if (get_polylight_flag()) {
indent(out, indent_level) << "<Polylight> { 1 }\n";
}
// We have to write the children nodes before we write the vertex
// references, since we might be referencing a vertex that's defined
// in one of those children nodes!

View File

@ -177,6 +177,9 @@ PUBLISHED:
INLINE void set_portal_flag(bool flag);
INLINE bool get_portal_flag() const;
INLINE void set_polylight_flag(bool flag);
INLINE bool get_polylight_flag() const;
INLINE void set_collide_mask(CollideMask mask);
INLINE void clear_collide_mask();
INLINE bool has_collide_mask() const;
@ -268,6 +271,7 @@ private:
F2_dcs_type = 0x00000030,
F2_portal_flag = 0x00000040,
F2_polylight_flag = 0x00000080,
};
int _flags;

View File

@ -970,6 +970,8 @@ group_body:
group->set_into_collide_mask(group->get_into_collide_mask() | ulong_value);
} else if (cmp_nocase_uh(name, "portal") == 0) {
group->set_portal_flag(value != 0);
} else if (cmp_nocase_uh(name, "polylight") == 0) {
group->set_polylight_flag(value != 0);
} else {
eggyywarning("Unknown group scalar " + name);
}