diff options
| author | KiritoDv <36680385+KiritoDv@users.noreply.github.com> | 2025-05-16 02:44:40 +0000 |
|---|---|---|
| committer | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2025-05-16 02:44:40 +0000 |
| commit | b53a5dbcfa24ef2aa4860b6d9512709976686de8 (patch) | |
| tree | 441f2bb9c0bc8f955eb9289d19b13beab5c239c5 /src/engine/objects/Penguin.cpp | |
| parent | bdf5ca8d603ae56ac275bebf9fde58ae72484d76 (diff) | |
clang formatclang-format
Diffstat (limited to 'src/engine/objects/Penguin.cpp')
| -rw-r--r-- | src/engine/objects/Penguin.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/engine/objects/Penguin.cpp b/src/engine/objects/Penguin.cpp index d283101b3..147922896 100644 --- a/src/engine/objects/Penguin.cpp +++ b/src/engine/objects/Penguin.cpp @@ -33,7 +33,6 @@ extern "C" { extern s8 gPlayerCount; } - OPenguin::OPenguin(FVector pos, u16 direction, PenguinType type, Behaviour behaviour) { Name = "Penguin"; _type = type; @@ -43,13 +42,13 @@ OPenguin::OPenguin(FVector pos, u16 direction, PenguinType type, Behaviour behav init_object(_objectIndex, 0); - Object *object = &gObjectList[_objectIndex]; + Object* object = &gObjectList[_objectIndex]; object->origin_pos[0] = pos.x * xOrientation; object->origin_pos[1] = pos.y; object->origin_pos[2] = pos.z; object->unk_0C6 = direction; - switch(type) { + switch (type) { case PenguinType::CHICK: object->surfaceHeight = 5.0f; object->sizeScaling = 0.04f; @@ -91,8 +90,7 @@ void OPenguin::Tick(void) { } else { func_80089820(objectIndex, 1.5f, 1.25f, 0x1900A046U); } - if ((is_obj_flag_status_active(objectIndex, 0x02000000) != 0) && - (func_80072354(objectIndex, 0x00000020) != 0)) { + if ((is_obj_flag_status_active(objectIndex, 0x02000000) != 0) && (func_80072354(objectIndex, 0x00000020) != 0)) { func_800722A4(objectIndex, 0x00000060); clear_object_flag(objectIndex, 0x02000000); } @@ -113,7 +111,6 @@ void OPenguin::Draw(s32 cameraId) { var_s3 = 0x00015F90; } - if (gObjectList[objectIndex].state >= 2) { // This code decreased draw dist if there's more players. @@ -121,9 +118,9 @@ void OPenguin::Draw(s32 cameraId) { // It seems to check the angle of the camera. // These changes were so instance indices are not required. - //if (gPlayerCountSelection1 == 1) { - var_s1 = 0x4000; - drawDistance = 1500; + // if (gPlayerCountSelection1 == 1) { + var_s1 = 0x4000; + drawDistance = 1500; //} else { // if (func_80072320(objectIndex, 8) != 0) { // drawDistance = 500; @@ -283,7 +280,6 @@ void OPenguin::func_8008502C(s32 objectIndex) { func_800873F4(objectIndex); } - void OPenguin::EmperorPenguin(s32 objectIndex) { switch (gObjectList[objectIndex].state) { case 0: @@ -304,8 +300,8 @@ void OPenguin::InitEmperorPenguin(s32 objectIndex) { object->unk_0D8 = 0; object->model = (Gfx*) d_course_sherbet_land_unk_data1; object->vertex = (Vtx*) d_course_sherbet_land_unk_data11; - //object->sizeScaling = 0.2f; - //object->boundingBoxSize = 0x000C; + // object->sizeScaling = 0.2f; + // object->boundingBoxSize = 0x000C; object->unk_09C = 1; set_obj_direction_angle(objectIndex, 0U, 0U, 0U); object->unk_0DD = 1; @@ -372,14 +368,14 @@ void OPenguin::InitOtherPenguin(s32 objectIndex) { object->unk_0D8 = 0; object->model = (Gfx*) d_course_sherbet_land_unk_data1; object->vertex = (Vtx*) d_course_sherbet_land_unk_data11; - //object->boundingBoxSize = 4; + // object->boundingBoxSize = 4; object->unk_09C = 2; object->unk_04C = random_int(300); set_object_flag(objectIndex, 0x04000220); // This code has been significantly refactored from the original func_800845C8 // Into a switch statement instead of checking for the index of the penguin - switch(_bhv) { + switch (_bhv) { case Behaviour::CIRCLE: object->unk_01C[1] = Diameter; @@ -391,7 +387,7 @@ void OPenguin::InitOtherPenguin(s32 objectIndex) { _toggle = !_toggle; - //object->unk_0DD = 2; + // object->unk_0DD = 2; func_800722A4(objectIndex, 8); break; case Behaviour::SLIDE3: |
