Files
fs2open.github.com/code/object/object_flags.h
T
Fabian Woltermann 770fce8de5 Bitset flags -- take 2 (#775)
This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
2016-08-12 16:13:50 -07:00

36 lines
1.8 KiB
C++

#ifndef OBJECT_FLAGS_H
#define OBJECT_FLAGS_H
#include "globalincs/flagset.h"
namespace Object {
FLAG_LIST(Object_Flags) {
Renders, // It renders as something ( objtype_render gets called)
Collides, // It collides with stuff (objtype_check_impact & objtype_hit gets called)
Physics, // It moves with standard physics.
Should_be_dead, // this object should be dead, so next time we can, we should delete this object.
Invulnerable, // invulnerable
Protected, // Don't kill this object, probably mission-critical.
Player_ship, // this object under control of some player -- don't do ai stuff on it!!!
No_shields, // object has no shield generator system (i.e. no shields)
Just_updated, // for multiplayer -- indicates that we received object update this frame
Could_be_player, // for multiplayer -- indicates that it is selectable ingame joiners as their ship
Was_rendered, // Set if this object was rendered this frame. Only gets set if OF_RENDERS set. Gets cleared or set in obj_render_all().
Not_in_coll, // object has not been added to collision list
Beam_protected, // don't fire beam weapons at this type of object, probably mission critical.
Special_warpin, // Object has special warp-in enabled.
Docked_already_handled, // Goober5000 - a docked object that we already moved
Targetable_as_bomb,
Flak_protected, // Goober5000 - protected from flak turrets
Laser_protected, // Goober5000 - protected from laser turrets
Missile_protected, // Goober5000 - protected from missile turrets
Immobile, // Goober5000 - doesn't move, no matter what
Marked, // Object is marked (Fred). Can be reused in FreeSpace for anything that won't be used by Fred.
Temp_marked, // Temporarily marked (Fred).
Hidden, // Object is hidden (not shown) and can't be manipulated
NUM_VALUES
};
}
#endif