Builds the free object list by scanning the list of free objects & adding unused ones to the list Also sets Highest_object_index
| 3123 | // Builds the free object list by scanning the list of free objects & adding unused ones to the list |
| 3124 | // Also sets Highest_object_index |
| 3125 | void ResetFreeObjects() { |
| 3126 | int i; |
| 3127 | |
| 3128 | Highest_object_index = -1; |
| 3129 | |
| 3130 | for (i = Num_objects = MAX_OBJECTS; --i >= 0;) |
| 3131 | if (Objects[i].type == OBJ_NONE) |
| 3132 | free_obj_list[--Num_objects] = i; |
| 3133 | else if (Highest_object_index == -1) |
| 3134 | Highest_object_index = i; |
| 3135 | } |
| 3136 | |
| 3137 | // sets the orientation of an object. This should be called to orient an object |
| 3138 | void ObjSetOrient(object *obj, const matrix *orient) { |
no outgoing calls
no test coverage detected