FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "globalincs/globals.h"
#include "globalincs/pstypes.h"
#include "math/vecmat.h"
#include "physics/physics.h"
Go to the source code of this file.
Classes | |
struct | obj_flag_name |
class | object |
struct | object_h |
struct | object_orient_pos |
struct | checkobject |
Macros | |
#define | DEFAULT_SHIELD_SECTIONS 4 |
#define | OBJECT_CHECK |
#define | OBJ_NONE 0 |
#define | OBJ_SHIP 1 |
#define | OBJ_WEAPON 2 |
#define | OBJ_FIREBALL 3 |
#define | OBJ_START 4 |
#define | OBJ_WAYPOINT 5 |
#define | OBJ_DEBRIS 6 |
#define | OBJ_GHOST 8 |
#define | OBJ_POINT 9 |
#define | OBJ_SHOCKWAVE 10 |
#define | OBJ_WING 11 |
#define | OBJ_OBSERVER 12 |
#define | OBJ_ASTEROID 13 |
#define | OBJ_JUMP_NODE 14 |
#define | OBJ_BEAM 15 |
#define | MAX_OBJECT_TYPES 16 |
#define | UNUSED_OBJNUM (-MAX_OBJECTS*2) |
#define | OF_RENDERS (1<<0) |
#define | OF_COLLIDES (1<<1) |
#define | OF_PHYSICS (1<<2) |
#define | OF_SHOULD_BE_DEAD (1<<3) |
#define | OF_INVULNERABLE (1<<4) |
#define | OF_PROTECTED (1<<5) |
#define | OF_PLAYER_SHIP (1<<6) |
#define | OF_NO_SHIELDS (1<<7) |
#define | OF_JUST_UPDATED (1<<8) |
#define | OF_COULD_BE_PLAYER (1<<9) |
#define | OF_WAS_RENDERED (1<<10) |
#define | OF_NOT_IN_COLL (1<<11) |
#define | OF_BEAM_PROTECTED (1<<12) |
#define | OF_SPECIAL_WARPIN (1<<13) |
#define | OF_DOCKED_ALREADY_HANDLED (1<<14) |
#define | OF_TARGETABLE_AS_BOMB (1<<15) |
#define | OF_FLAK_PROTECTED (1<<16) |
#define | OF_LASER_PROTECTED (1<<17) |
#define | OF_MISSILE_PROTECTED (1<<18) |
#define | OF_IMMOBILE (1<<19) |
#define | OF_MARKED (1<<29) |
#define | OF_TEMP_MARKED (1<<30) |
#define | OF_HIDDEN (1<<31) |
#define | MAX_OBJECT_FLAG_NAMES 10 |
#define | OBJ_INDEX(objp) (ptrdiff_t)(objp-Objects) |
#define | OBJ_RECALC_PAIRS(obj_to_reset) do { obj_set_flags(obj_to_reset, obj_to_reset->flags & ~(OF_COLLIDES)); obj_set_flags(obj_to_reset, obj_to_reset->flags | OF_COLLIDES); } while(0); |
Typedefs | |
typedef struct obj_flag_name | obj_flag_name |
typedef struct object_orient_pos | object_orient_pos |
typedef struct checkobject | checkobject |
#define OBJ_RECALC_PAIRS | ( | obj_to_reset | ) | do { obj_set_flags(obj_to_reset, obj_to_reset->flags & ~(OF_COLLIDES)); obj_set_flags(obj_to_reset, obj_to_reset->flags | OF_COLLIDES); } while(0); |
#define UNUSED_OBJNUM (-MAX_OBJECTS*2) |
typedef struct checkobject checkobject |
typedef struct obj_flag_name obj_flag_name |
typedef struct object_orient_pos object_orient_pos |
Definition at line 271 of file object.cpp.
Definition at line 260 of file object.cpp.
Definition at line 308 of file object.cpp.
Definition at line 289 of file object.cpp.
Add an element to the CheckObjects[] array, and update the object pairs. This is called from obj_create(), and the restore save-game code.
Definition at line 1901 of file object.cpp.
void obj_client_post_interpolate | ( | ) |
Do client-side post-interpolation object movement
Definition at line 1748 of file object.cpp.
void obj_client_pre_interpolate | ( | ) |
Do client-side pre-interpolation object movement
Definition at line 1703 of file object.cpp.
int obj_create | ( | ubyte | type, |
int | parent_obj, | ||
int | instance, | ||
matrix * | orient, | ||
vec3d * | pos, | ||
float | radius, | ||
uint | flags | ||
) |
Initialize a new object. Adds to the list for the given segment.
The object will be a non-rendering, non-physics object. Pass -1 if no parent.
Definition at line 467 of file object.cpp.
Remove object from the world If Player_obj, don't remove it!
objnum | Object number to remove |
Definition at line 522 of file object.cpp.
Returns a vector of the average position of all ships in the mission.
Definition at line 1796 of file object.cpp.
Quickly finds an object by its signature
Definition at line 2074 of file object.cpp.
Definition at line 1817 of file object.cpp.
Definition at line 1826 of file object.cpp.
void obj_init | ( | ) |
Sets up the free list & init player & whatever else
Definition at line 327 of file object.cpp.
void obj_init_all_ships_physics | ( | ) |
Definition at line 1689 of file object.cpp.
Add all newly created objects to the end of the used list and create their object pairs for collision detection
Definition at line 651 of file object.cpp.
Move all objects for the current frame
Definition at line 1383 of file object.cpp.
Definition at line 1167 of file object.cpp.
Definition at line 1103 of file object.cpp.
Definition at line 781 of file object.cpp.
Definition at line 682 of file object.cpp.
Definition at line 1772 of file object.cpp.
void obj_player_fire_stuff | ( | object * | objp, |
control_info | ci | ||
) |
Deals with firing player things like lasers, missiles, etc.
Separated out because of multiplayer issues.
Definition at line 720 of file object.cpp.
Definition at line 1625 of file object.cpp.
Definition at line 1938 of file object.cpp.
Definition at line 1604 of file object.cpp.
Definition at line 172 of file objectsort.cpp.
Definition at line 1537 of file object.cpp.
void obj_render_queue_all | ( | ) |
Definition at line 347 of file objectsort.cpp.
Call this if you want to change an object flag so that the object code knows what's going on. For instance if you turn off OF_COLLIDES, the object code needs to know this in order to actually turn the object collision detection off. By calling this you shouldn't get Int3's in the checkobject code. If you do, then put code in here to correctly handle the case.
Definition at line 1000 of file object.cpp.
Return the team for the object passed as a parameter
objp | Pointer to object that you want team for |
Definition at line 1843 of file object.cpp.
bool object_get_gliding | ( | object * | objp | ) |
Definition at line 2059 of file object.cpp.
Gets object model
Definition at line 2092 of file object.cpp.
bool object_glide_forced | ( | object * | objp | ) |
Definition at line 2066 of file object.cpp.
Definition at line 2025 of file object.cpp.
Definition at line 2019 of file object.cpp.
Makes an object start 'gliding'
It will continue on the same velocity that it was going, regardless of orientation -WMC
Definition at line 2036 of file object.cpp.
Definition at line 672 of file objcollide.cpp.
int Highest_ever_object_index |
Definition at line 70 of file object.cpp.
int Highest_object_index |
Definition at line 69 of file object.cpp.
int Num_objects |
Definition at line 68 of file object.cpp.
object obj_create_list |
Definition at line 54 of file object.cpp.
object obj_free_list |
Definition at line 52 of file object.cpp.
object obj_used_list |
Definition at line 53 of file object.cpp.
obj_flag_name Object_flag_names[] |
Definition at line 97 of file object.cpp.
int Object_inited |
Definition at line 72 of file object.cpp.
int Object_next_signature |
Definition at line 71 of file object.cpp.
char* Object_type_names[MAX_OBJECT_TYPES] |
Definition at line 76 of file object.cpp.
object Objects[] |
Definition at line 62 of file object.cpp.
object* Player_obj |
Definition at line 56 of file object.cpp.
int render_order[MAX_OBJECTS] |
int render_total |
int Show_waypoints |
Definition at line 73 of file object.cpp.
object* Viewer_obj |
Definition at line 57 of file object.cpp.