Document Vehicles (#641)

* start doc collision

* fix merge

* finish rename fonction related to vehicle

* document around waypoint of vehicle

* make some modification

* make some change and rename one

* copy_ to oldPos

* doc smoke ferry and train

* some rename

* fix some renaming

* precise index

* rename a funciton

* simplify waypoint_vehicles

* change some name

* change some name

* rename move_to_point_direction

* fix some conflict

* Update code_80005FD0.c

* Update code_80005FD0.h

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
coco875
2024-08-23 07:56:57 +02:00
committed by GitHub
parent 7025ff0ca1
commit 40f677db52
23 changed files with 550 additions and 541 deletions
+18 -18
View File
@@ -1515,31 +1515,31 @@ void func_8007542C(s32 arg0) {
}
}
void func_80075574(s32 objectIndex, Vec3f arg1, f32 arg2) {
void init_train_smoke(s32 objectIndex, Vec3f pos, f32 velocity) {
Object *object;
UNUSED s32 pad[2];
init_object(objectIndex, 0);
object = &gObjectList[objectIndex];
object->origin_pos[0] = arg1[0];
object->origin_pos[1] = arg1[1];
object->origin_pos[2] = arg1[2];
object->velocity[1] = arg2;
object->origin_pos[0] = pos[0];
object->origin_pos[1] = pos[1];
object->origin_pos[2] = pos[2];
object->velocity[1] = velocity;
object->type = random_int(0x0064U) + 0x1E;
}
s32 func_800755FC(s32 arg0, Vec3f arg1, f32 arg2) {
s32 spawn_train_smoke(s32 trainIndex, Vec3f pos, f32 velocity) {
s32 objectIndex;
if (arg0 == 0) {
if (trainIndex == 0) {
objectIndex = add_unused_obj_index(gObjectParticle2, &gNextFreeObjectParticle2, gObjectParticle2_SIZE);
if (objectIndex != NULL_OBJECT_ID) {
func_80075574(objectIndex, arg1, arg2);
init_train_smoke(objectIndex, pos, velocity);
}
} else {
objectIndex = add_unused_obj_index(gObjectParticle3, &gNextFreeObjectParticle3, gObjectParticle3_SIZE);
if (objectIndex != NULL_OBJECT_ID) {
func_80075574(objectIndex, arg1, arg2);
init_train_smoke(objectIndex, pos, velocity);
}
}
return objectIndex;
@@ -1635,31 +1635,31 @@ void update_train_smoke(void) {
}
}
void func_800759EC(s32 objectIndex, Vec3f arg1, f32 arg2) {
void init_ferry_smoke(s32 objectIndex, Vec3f pos, f32 velocity) {
Object *object;
init_object(objectIndex, 0);
object = &gObjectList[objectIndex];
object->origin_pos[0] = arg1[0];
object->origin_pos[1] = arg1[1];
object->origin_pos[2] = arg1[2];
object->velocity[1] = arg2;
object->origin_pos[0] = pos[0];
object->origin_pos[1] = pos[1];
object->origin_pos[2] = pos[2];
object->velocity[1] = velocity;
object->type = 0x00FF;
object->unk_0A2 = 0x0096;
}
s32 func_80075A6C(s32 arg0, Vec3f arg1, f32 arg2) {
s32 spawn_ferry_smoke(s32 ferryIndex, Vec3f pos, f32 velocity) {
s32 objectIndex;
if (arg0 == 0) {
if (ferryIndex == 0) {
objectIndex = add_unused_obj_index(gObjectParticle2, &gNextFreeObjectParticle2, gObjectParticle2_SIZE);
if (objectIndex != NULL_OBJECT_ID) {
func_800759EC(objectIndex, arg1, arg2);
init_ferry_smoke(objectIndex, pos, velocity);
}
} else {
objectIndex = add_unused_obj_index(gObjectParticle3, &gNextFreeObjectParticle3, gObjectParticle3_SIZE);
if (objectIndex != NULL_OBJECT_ID) {
func_800759EC(objectIndex, arg1, arg2);
init_ferry_smoke(objectIndex, pos, velocity);
}
}