home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / RAYCAST.ZIP / GROUND.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-09  |  553 b   |  21 lines

  1. #include "ray.h"
  2. #include "globals.h"
  3. #include "ground.h"
  4. #include "voxinter.h"
  5.  
  6. long Ground_Height(pobject test_obj) {
  7. if (test_obj->cur_sec->flags & VOXEL_SECTOR) {
  8.    return (Get_Voxel_Alt((PUCHAR)test_obj->cur_sec->extra_data, test_obj->x, test_obj->y));
  9. } else {
  10.    return test_obj->cur_sec->floor_height;
  11. } /* endif */
  12. }
  13.  
  14. long Ground_Height_XY(MYFIXED x, MYFIXED y, psector sec) {
  15. if (sec->flags & VOXEL_SECTOR) {
  16.    return (Get_Voxel_Alt((PUCHAR)sec->extra_data, x, y));
  17. } else {
  18.    return sec->floor_height;
  19. } /* endif */
  20. }
  21.