|
16 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | */ |
18 | 18 |
|
| 19 | +#include <cstdint> |
19 | 20 | #include "attach.h" |
20 | 21 | #include "terrain.h" |
21 | 22 | #include "log.h" |
@@ -142,7 +143,7 @@ PI); rot_angle = acos(dot); |
142 | 143 |
|
143 | 144 | // Finds the position of a attach point on an object |
144 | 145 | // The uvec is optional as most attaching objects don't need at complete orientation set (only an fvec) |
145 | | -static bool AttachPointPos(object *obj, char ap, bool f_compute_pos, vector *attach_pos, bool f_compute_fvec, |
| 146 | +static bool AttachPointPos(object *obj, int8_t ap, bool f_compute_pos, vector *attach_pos, bool f_compute_fvec, |
146 | 147 | vector *attach_fvec, bool *f_computed_uvec = NULL, vector *attach_uvec = NULL) { |
147 | 148 | poly_model *pm; |
148 | 149 | vector pnt; |
@@ -459,7 +460,7 @@ static void ProprogateUltimateAttachParent(object *parent, int ultimate_handle) |
459 | 460 |
|
460 | 461 | // Attaches 2 objects via attach points on each. The f_used_aligned allows for an aligned connection. |
461 | 462 | // NOTE: The child always moves to the parent |
462 | | -bool AttachObject(object *parent, char parent_ap, object *child, char child_ap, bool f_use_aligned) { |
| 463 | +bool AttachObject(object *parent, int8_t parent_ap, object *child, char child_ap, bool f_use_aligned) { |
463 | 464 | ASSERT(parent); |
464 | 465 | ASSERT(child); |
465 | 466 |
|
@@ -510,7 +511,7 @@ bool AttachObject(object *parent, char parent_ap, object *child, char child_ap, |
510 | 511 |
|
511 | 512 | // Attaches a child object to a parent object by a percent of the radius of the child. |
512 | 513 | // NOTE: The child always moves to the parent and not the reverse |
513 | | -bool AttachObject(object *parent, char parent_ap, object *child, float percent_rad) { |
| 514 | +bool AttachObject(object *parent, int8_t parent_ap, object *child, float percent_rad) { |
514 | 515 | ASSERT(parent); |
515 | 516 | ASSERT(child); |
516 | 517 |
|
@@ -661,7 +662,7 @@ bool UnattachFromParent(object *child) { |
661 | 662 | } |
662 | 663 |
|
663 | 664 | // Unattaches a child from an attach point |
664 | | -bool UnattachChild(object *parent, char parent_ap) { |
| 665 | +bool UnattachChild(object *parent, int8_t parent_ap) { |
665 | 666 | object *child; |
666 | 667 |
|
667 | 668 | if ((child = ObjGet(parent->attach_children[parent_ap])) != NULL) { |
|
0 commit comments