From 0e382f79d7eb3c626563931cbcd14d2703363fa1 Mon Sep 17 00:00:00 2001 From: Amethyst-szs Date: Mon, 15 Jan 2024 07:28:52 -0800 Subject: [PATCH] Assist bubble recovery point info added --- .gitignore | 1 + .vscode/c_cpp_properties.json | 3 +- .vscode/settings.json | 43 ++++++++++--------- Makefile | 2 +- src/game/Player/PlayerActorHakoniwa.h | 1 + src/game/Player/PlayerHackKeeper.h | 2 +- src/game/Player/PlayerRecoverySafetyPoint.h | 27 ++++++++++++ .../categories/info/CategoryInfPlayer.cpp | 3 ++ src/program/devgui/homemenu/HomeMenuPrims.cpp | 7 +++ .../devgui/settings/PrimMenuSettings.cpp | 1 + 10 files changed, 66 insertions(+), 24 deletions(-) create mode 100644 src/game/Player/PlayerRecoverySafetyPoint.h diff --git a/.gitignore b/.gitignore index db45922..5e61a36 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ build/ compile_commands.jso deploy imgui/backends/vulkan/generate_spv.sh +.vscode/ # promo assets promo_screenshots/ diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index bd4df41..32d4d3b 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -6,7 +6,8 @@ "${workspaceFolder}/src/**", "${workspaceFolder}/src/nn/**", "${workspaceFolder}/src/sead/**", - "${workspaceFolder}/src/lib/**" + "${workspaceFolder}/src/lib/**", + "${workspaceFolder}/imgui" ], "defines": [], "compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++", diff --git a/.vscode/settings.json b/.vscode/settings.json index 140ea5c..ffc2afb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,22 +1,23 @@ { - "liveshare.sharedTerminalWidth": 300, - "files.associations": { - "type_traits": "cpp", - "*.tcc": "cpp", - "functional": "cpp", - "optional": "cpp", - "istream": "cpp", - "ostream": "cpp", - "ratio": "cpp", - "system_error": "cpp", - "array": "cpp", - "tuple": "cpp", - "utility": "cpp", - "atomic": "cpp", - "cstdarg": "cpp", - "xlocinfo": "cpp", - "xstring": "cpp" - }, - "cmake.configureOnOpen": false, - "C_Cpp.errorSquiggles": "Enabled" -} \ No newline at end of file + "liveshare.sharedTerminalWidth": 300, + "files.associations": { + "type_traits": "cpp", + "*.tcc": "cpp", + "functional": "cpp", + "optional": "cpp", + "istream": "cpp", + "ostream": "cpp", + "ratio": "cpp", + "system_error": "cpp", + "array": "cpp", + "tuple": "cpp", + "utility": "cpp", + "atomic": "cpp", + "cstdarg": "cpp", + "xlocinfo": "cpp", + "xstring": "cpp", + "ranges": "cpp" + }, + "cmake.configureOnOpen": false, + "C_Cpp.errorSquiggles": "Enabled" +} diff --git a/Makefile b/Makefile index ad8436d..3cdb693 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -FTP_IP ?= 192.168.0.24 # put console IP here +FTP_IP ?= 192.168.0.6 # put console IP here .PHONY: all clean all: diff --git a/src/game/Player/PlayerActorHakoniwa.h b/src/game/Player/PlayerActorHakoniwa.h index 6748757..6868eca 100644 --- a/src/game/Player/PlayerActorHakoniwa.h +++ b/src/game/Player/PlayerActorHakoniwa.h @@ -1,6 +1,7 @@ #pragma once #include +#include "game/Player/PlayerRecoverySafetyPoint.h" #include "PlayerActorBase.h" class PlayerConst; diff --git a/src/game/Player/PlayerHackKeeper.h b/src/game/Player/PlayerHackKeeper.h index dc46000..bc86ebe 100644 --- a/src/game/Player/PlayerHackKeeper.h +++ b/src/game/Player/PlayerHackKeeper.h @@ -11,9 +11,9 @@ #include "game/Player/HackCap.h" #include "game/Player/PlayerCollider.h" #include "game/Player/HackCap/CapTargetInfo.h" +#include "game/Player/PlayerRecoverySafetyPoint.h" struct HackEndParam; -struct PlayerRecoverySafetyPoint; struct PlayerDamageKeeper; struct IPlayerModelChanger; struct IUsePlayerHeightCheck; diff --git a/src/game/Player/PlayerRecoverySafetyPoint.h b/src/game/Player/PlayerRecoverySafetyPoint.h new file mode 100644 index 0000000..98044c2 --- /dev/null +++ b/src/game/Player/PlayerRecoverySafetyPoint.h @@ -0,0 +1,27 @@ +#pragma once + +#include "al/LiveActor/LiveActor.h" +#include "al/collision/Collider.h" +#include "al/sensor/HitSensor.h" +#include "game/Interfaces/IUseDimension.h" +#include "game/Player/HackCap.h" +#include "sead/math/seadVector.h" + +class PlayerRecoverySafetyPoint { +public: + sead::Vector3f* getSafetyPoint(); + void startRecovery(float); + void startBubbleWait(); + void noticeDangerousPoint(sead::Vector3f const&, bool); + + al::LiveActor* mActor; //0x00 + HackCap* mHackCap; //0x08 + IUseDimension* mIUseDimension; //0x10 + al::CollisionPartsFilterBase* mCollisionPartsFilterBase; //0x18 + al::HitSensor* mHitSensor; //0x20 + const char mUnk1[0x1c]; //0x28 + sead::Vector3f mSafetyPointPos; //0x44 + sead::Vector3f mSafetyPointGrav; //0x50 + const char mUnk2[0x54]; + const char mUnk3[0x8]; +}; \ No newline at end of file diff --git a/src/program/devgui/categories/info/CategoryInfPlayer.cpp b/src/program/devgui/categories/info/CategoryInfPlayer.cpp index ca422ff..0aaa2af 100644 --- a/src/program/devgui/categories/info/CategoryInfPlayer.cpp +++ b/src/program/devgui/categories/info/CategoryInfPlayer.cpp @@ -97,4 +97,7 @@ void CategoryInfPlayer::updateCatDisplay() PlayerAnimator* anim = playerHak->mPlayerAnimator; ImGui::Text("Anim: %s (%.00f/%.00f)", anim->curAnim.cstr(), anim->getAnimFrame(), anim->getAnimFrameMax()); ImGui::Text("Sub Anim: %s (%.00f/%.00f)", anim->curSubAnim.cstr(), anim->getSubAnimFrame(), anim->getSubAnimFrameMax()); + + sead::Vector3f kidsPos = playerHak->mPlayerRecoverySafetyPoint->mSafetyPointPos; + ImGui::InputFloat3("Assist Pos", &kidsPos.x, "%.00f", ImGuiInputTextFlags_ReadOnly); } \ No newline at end of file diff --git a/src/program/devgui/homemenu/HomeMenuPrims.cpp b/src/program/devgui/homemenu/HomeMenuPrims.cpp index d0493ed..34a7ce8 100644 --- a/src/program/devgui/homemenu/HomeMenuPrims.cpp +++ b/src/program/devgui/homemenu/HomeMenuPrims.cpp @@ -82,6 +82,13 @@ void HomeMenuPrims::renderPlayerCategory(al::Scene* scene, PrimitiveQueue* queue queue->pushLine(capPos, capTarget, {0.9f, 0.2f, 0.2f, 1.f}); } } + + if (mSettings->getSettingEntryByName("Assist Bubble")->isTrue()) { + PlayerActorHakoniwa* playerHak = tryGetPlayerActorHakoniwa(); + if (playerHak) { + queue->pushPoint(playerHak->mPlayerRecoverySafetyPoint->mSafetyPointPos, 15.f, sead::Color4f::cGreen); + } + } } void HomeMenuPrims::renderTriangleCategory(al::Scene* scene, PrimitiveQueue* queue) { diff --git a/src/program/devgui/settings/PrimMenuSettings.cpp b/src/program/devgui/settings/PrimMenuSettings.cpp index cafe123..3520fe8 100644 --- a/src/program/devgui/settings/PrimMenuSettings.cpp +++ b/src/program/devgui/settings/PrimMenuSettings.cpp @@ -20,6 +20,7 @@ PrimMenuSettings::PrimMenuSettings(DevGuiManager* parent) registerNewSetting(false, "World Axis", PrimMenuCat_PLAYER, false); registerNewSetting(false, "Player Front", PrimMenuCat_PLAYER, false); registerNewSetting(false, "Cappy Info", PrimMenuCat_PLAYER, false); + registerNewSetting(false, "Assist Bubble", PrimMenuCat_PLAYER, false); // Collision / Triangle category registerNewSetting(false, "Collision", PrimMenuCat_TRIANGLE, false);