main/object.c File Reference

#include <string.h>
#include <stdio.h>
#include "inferno.h"
#include "game.h"
#include "gr.h"
#include "stdlib.h"
#include "bm.h"
#include "mono.h"
#include "3d.h"
#include "segment.h"
#include "texmap.h"
#include "laser.h"
#include "key.h"
#include "gameseg.h"
#include "textures.h"
#include "object.h"
#include "physics.h"
#include "slew.h"
#include "render.h"
#include "wall.h"
#include "vclip.h"
#include "polyobj.h"
#include "fireball.h"
#include "error.h"
#include "ai.h"
#include "hostage.h"
#include "morph.h"
#include "cntrlcen.h"
#include "powerup.h"
#include "fuelcen.h"
#include "sounds.h"
#include "collide.h"
#include "lighting.h"
#include "newdemo.h"
#include "player.h"
#include "weapon.h"
#include "network.h"
#include "newmenu.h"
#include "gauges.h"
#include "multi.h"
#include "menu.h"
#include "args.h"
#include "text.h"
#include "piggy.h"
#include "robot.h"
#include "gameseq.h"
#include "observer.h"

Defines

#define MAX_VELOCITY   i2f(50)
#define CLOAKED_FADE_LEVEL   28
#define CLOAK_FADEIN_DURATION_PLAYER   F2_0
#define CLOAK_FADEOUT_DURATION_PLAYER   F2_0
#define CLOAK_FADEIN_DURATION_ROBOT   F1_0
#define CLOAK_FADEOUT_DURATION_ROBOT   F1_0
#define vm_angvec_zero(v)   (v)->p=(v)->b=(v)->h=0
#define DEATH_SEQUENCE_LENGTH   (F1_0*5)
#define DEATH_SEQUENCE_EXPLODE_TIME   (F1_0*2)

Functions

void obj_detach_all (object *parent)
void obj_detach_one (object *sub)
void object_goto_next_viewer ()
void draw_object_blob (object *obj, bitmap_index bmi)
void draw_object_tmap_rod (object *obj, bitmap_index bitmapi, int lighted)
void draw_tmap_flat ()
void draw_cloaked_object (object *obj, fix light, fix *glow, fix cloak_start_time, fix cloak_end_time, bitmap_index *alt_textures)
void draw_polygon_object (object *obj)
void set_robot_location_info (object *objp)
void create_small_fireball_on_object (object *objp, fix size_scale, int sound_flag)
void create_vclip_on_object (object *objp, fix size_scale, int vclip_num)
void render_object (object *obj)
void check_and_fix_matrix (vms_matrix *m)
void reset_player_object ()
void init_player_object ()
void init_objects ()
void special_reset_objects (void)
int is_object_in_seg (int segnum, int objn)
int search_all_segments_for_object (int objnum)
void johns_obj_unlink (int segnum, int objnum)
void remove_incorrect_objects ()
void remove_all_objects_but (int segnum, int objnum)
int check_duplicate_objects ()
void list_seg_objects (int segnum)
void obj_link (int objnum, int segnum)
void obj_unlink (int objnum)
int obj_allocate (void)
void obj_free (int objnum)
void free_object_slots (int num_used)
int obj_create (ubyte type, ubyte id, int segnum, vms_vector *pos, vms_matrix *orient, fix size, ubyte ctype, ubyte mtype, ubyte rtype)
void obj_delete (int objnum)
void dead_player_end (void)
void set_camera_pos (vms_vector *camera_pos, object *objp)
void drop_player_eggs (object *objp)
int get_explosion_vclip (object *obj, int stage)
void dead_player_frame (void)
void start_player_death_sequence (object *player)
void obj_delete_all_that_should_be_dead ()
void obj_relink (int objnum, int newsegnum)
void spin_object (object *obj)
void object_move_one (object *obj)
void object_move_all ()
void compress_objects (void)
void reset_objects (int n_objs)
int find_object_seg (object *obj)
int update_object_seg (object *obj)
void fix_object_segs ()
void clear_transient_objects (int clear_all)
void obj_attach (object *parent, object *sub)

Variables

ubyte CollisionResult [MAX_OBJECT_TYPES][MAX_OBJECT_TYPES]
objectConsoleObject
static short free_obj_list [MAX_OBJECTS]
object Object_minus_one
object Objects [MAX_OBJECTS]
int num_objects = 0
int Highest_object_index = 0
int Highest_ever_object_index = 0
int print_object_info = 0
short Ordered_rendered_object_list [MAX_RENDERED_OBJECTS]
int Num_rendered_objects = 0
char Object_type_names [MAX_OBJECT_TYPES][9]
int Linear_tmap_polygon_objects = 1
fix Max_thrust
fix Cloak_fadein_duration
fix Cloak_fadeout_duration
int Player_fired_laser_this_frame = -1
int Object_next_signature = 0
int Debris_object_count = 0
int Unused_object_slots
int Player_is_dead = 0
objectDead_player_camera = NULL
fix Player_time_of_death
objectViewer_save
int Player_flags_save
int Player_exploded = 0
int Death_sequence_aborted = 0
int Player_eggs_dropped = 0
fix Camera_to_player_dist_goal = F1_0*4
ubyte Control_type_save
ubyte Render_type_save
ubyte cockpit_mode_save
int Killed_in_frame = -1
int Killed_objnum = -1
int Max_used_objects = MAX_OBJECTS - 20

Define Documentation

#define CLOAK_FADEIN_DURATION_PLAYER   F2_0
 

#define CLOAK_FADEIN_DURATION_ROBOT   F1_0
 

#define CLOAK_FADEOUT_DURATION_PLAYER   F2_0
 

#define CLOAK_FADEOUT_DURATION_ROBOT   F1_0
 

#define CLOAKED_FADE_LEVEL   28
 

#define DEATH_SEQUENCE_EXPLODE_TIME   (F1_0*2)
 

#define DEATH_SEQUENCE_LENGTH   (F1_0*5)
 

#define MAX_VELOCITY   i2f(50)
 

#define vm_angvec_zero  )     (v)->p=(v)->b=(v)->h=0
 


Function Documentation

void check_and_fix_matrix vms_matrix m  ) 
 

int check_duplicate_objects  ) 
 

void clear_transient_objects int  clear_all  ) 
 

void compress_objects void   ) 
 

void create_small_fireball_on_object object objp,
fix  size_scale,
int  sound_flag
 

void create_vclip_on_object object objp,
fix  size_scale,
int  vclip_num
 

void dead_player_end void   ) 
 

void dead_player_frame void   ) 
 

void draw_cloaked_object object obj,
fix  light,
fix glow,
fix  cloak_start_time,
fix  cloak_end_time,
bitmap_index alt_textures
 

void draw_object_blob object obj,
bitmap_index  bmi
 

void draw_object_tmap_rod object obj,
bitmap_index  bitmapi,
int  lighted
 

void draw_polygon_object object obj  ) 
 

void draw_tmap_flat  ) 
 

void drop_player_eggs object objp  ) 
 

int find_object_seg object obj  ) 
 

void fix_object_segs  ) 
 

void free_object_slots int  num_used  ) 
 

int get_explosion_vclip object obj,
int  stage
 

void init_objects  ) 
 

void init_player_object  ) 
 

int is_object_in_seg int  segnum,
int  objn
 

void johns_obj_unlink int  segnum,
int  objnum
 

void list_seg_objects int  segnum  ) 
 

int obj_allocate void   ) 
 

void obj_attach object parent,
object sub
 

int obj_create ubyte  type,
ubyte  id,
int  segnum,
vms_vector pos,
vms_matrix orient,
fix  size,
ubyte  ctype,
ubyte  mtype,
ubyte  rtype
 

void obj_delete int  objnum  ) 
 

void obj_delete_all_that_should_be_dead  ) 
 

void obj_detach_all object parent  ) 
 

void obj_detach_one object sub  ) 
 

void obj_free int  objnum  ) 
 

void obj_link int  objnum,
int  segnum
 

void obj_relink int  objnum,
int  newsegnum
 

void obj_unlink int  objnum  ) 
 

void object_goto_next_viewer  ) 
 

void object_move_all  ) 
 

void object_move_one object obj  ) 
 

void remove_all_objects_but int  segnum,
int  objnum
 

void remove_incorrect_objects  ) 
 

void render_object object obj  ) 
 

void reset_objects int  n_objs  ) 
 

void reset_player_object  ) 
 

int search_all_segments_for_object int  objnum  ) 
 

void set_camera_pos vms_vector camera_pos,
object objp
 

void set_robot_location_info object objp  ) 
 

void special_reset_objects void   ) 
 

void spin_object object obj  ) 
 

void start_player_death_sequence object player  ) 
 

int update_object_seg object obj  ) 
 


Variable Documentation

fix Camera_to_player_dist_goal = F1_0*4
 

fix Cloak_fadein_duration
 

fix Cloak_fadeout_duration
 

ubyte cockpit_mode_save
 

ubyte CollisionResult[MAX_OBJECT_TYPES][MAX_OBJECT_TYPES]
 

object* ConsoleObject
 

ubyte Control_type_save
 

object* Dead_player_camera = NULL
 

int Death_sequence_aborted = 0
 

int Debris_object_count = 0
 

short free_obj_list[MAX_OBJECTS] [static]
 

int Highest_ever_object_index = 0
 

int Highest_object_index = 0
 

int Killed_in_frame = -1
 

int Killed_objnum = -1
 

int Linear_tmap_polygon_objects = 1
 

fix Max_thrust
 

int Max_used_objects = MAX_OBJECTS - 20
 

int num_objects = 0
 

int Num_rendered_objects = 0
 

object Object_minus_one
 

int Object_next_signature = 0
 

char Object_type_names[MAX_OBJECT_TYPES][9]
 

Initial value:

 {
        "WALL    ",
        "FIREBALL",
        "ROBOT   ",
        "HOSTAGE ",
        "PLAYER  ",
        "WEAPON  ",
        "CAMERA  ",
        "POWERUP ",
        "DEBRIS  ",
        "CNTRLCEN",
        "FLARE   ",
        "CLUTTER ",
        "GHOST   ",
        "LIGHT   ",
        "COOP    ",
}

object Objects[MAX_OBJECTS]
 

short Ordered_rendered_object_list[MAX_RENDERED_OBJECTS]
 

int Player_eggs_dropped = 0
 

int Player_exploded = 0
 

int Player_fired_laser_this_frame = -1
 

int Player_flags_save
 

int Player_is_dead = 0
 

fix Player_time_of_death
 

int print_object_info = 0
 

ubyte Render_type_save
 

int Unused_object_slots
 

object* Viewer_save
 


Generated on Mon Aug 28 20:55:33 2006 for D1X-Rebirth by  doxygen 1.4.6