home *** CD-ROM | disk | FTP | other *** search
- #include "ray.h"
- #include "globals.h"
- #include "maxmins.h"
-
- void Get_Map_Max_Mins(long & min_x, long & min_y, long & max_x, long & max_y) {
- pvector2 cur_vec;
- short counter;
-
- // Get min and max points of world be looping through vectors
-
- min_x=max_x=Vector_List[0].x;
- min_y=max_y=Vector_List[0].y;
-
- for (counter=1; counter < Number_Of_Vectors; counter++) {
- cur_vec=Vector_List+counter;
- if (cur_vec->x < min_x)
- min_x=cur_vec->x;
- if (cur_vec->y < min_y)
- min_y=cur_vec->y;
- if (cur_vec->x > max_x)
- max_x=cur_vec->x;
- if (cur_vec->y > max_y)
- max_y=cur_vec->y;
- }
- }