home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / RAYCAST.ZIP / INVENTOR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-13  |  1.0 KB  |  39 lines

  1. #include "ray.h"
  2. #include "globals.h"
  3. #include "sfvars.h"
  4. #include "sprfunc.h"
  5. #include "sprtypes.h"
  6. #include "inventor.h"
  7. #include "rayspr.h"
  8.  
  9. void Inventory_Update(pobject cur_object, long update_num);
  10. void Inventory_Render(pobject cur_sprite);
  11.  
  12. void Init_Inventory(func_index index) {
  13.    update_funcs[index]=Inventory_Update;
  14.    render_funcs[index]=Inventory_Render;
  15. }
  16.  
  17. void Create_Inventory_Object(pobject new_object, pobject owner) {
  18.    pinventory_data new_data=(pinventory_data)NewPtr(sizeof(inventory_data));
  19.  
  20.    new_data->old_type=new_object->type;
  21.    new_data->old_extra_data=new_object->extra_data;
  22.    new_object->owner=owner;
  23.    new_object->extra_data=new_data;
  24.    new_object->type=Obj_Type_List+INVENTORY_TYPE;
  25.  
  26. }
  27.  
  28. void Inventory_Update(pobject cur_object, long update_num) {
  29.    cur_object->x=cur_object->owner->x;
  30.    cur_object->y=cur_object->owner->y;
  31.    cur_object->z=cur_object->owner->z;
  32.    cur_object->angle=cur_object->owner->angle;
  33. }
  34.  
  35. void Inventory_Render(pobject cur_sprite) {
  36. }
  37.  
  38.  
  39.