diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..b2f7f23c2 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85447c3da..4ed423e5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -203,6 +203,8 @@ jobs: - build - build-previous if: github.event_name == 'pull_request' + permissions: + pull-requests: write steps: - name: Checkout repository uses: actions/checkout@v4 @@ -228,13 +230,7 @@ jobs: run: | ./ok --previous artifacts/previous.json --current artifacts/progress.json pr > pr.txt cat pr.txt - - - name: Post comment to PR - run: | - PR_NUMBER=$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH) - COMMENT_BODY=$(cat pr.txt) - curl -X POST \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: application/json" \ - --data "{\"body\":\"$COMMENT_BODY\"}" \ - "https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/comments" + - name: PR comment with file + uses: thollander/actions-comment-pull-request@v3 + with: + file-path: pr.txt diff --git a/src/SB/Game/zNPCTypeKingJelly.cpp b/src/SB/Game/zNPCTypeKingJelly.cpp index 1b4c07699..297d4cc22 100644 --- a/src/SB/Game/zNPCTypeKingJelly.cpp +++ b/src/SB/Game/zNPCTypeKingJelly.cpp @@ -139,7 +139,7 @@ xVec3* zNPCKingJelly::get_bottom() void zNPCKingJelly::Setup() { - this->children_size = 0; //Called for address 0x88C, Started plugging things in till it matched. + this->children_size = 0; //0x88C load_model(); load_curtain_model(); zNPCSubBoss::Setup(); @@ -165,6 +165,11 @@ void zNPCKingJelly::BUpdate(xVec3* pos) zNPCCommon::BUpdate(pos); } +void zNPCKingJelly::RenderExtra() +{ + zNPCKingJelly::render_debug(); +} + void zNPCKingJelly::SelfSetup() { xBehaveMgr* bmgr; @@ -302,6 +307,36 @@ void zNPCKingJelly::create_tentacle_lightning() { } +void zNPCKingJelly::destroy_tentacle_lightning() +{ + for (S32 i = 0; i < 7; i++) + { + if (tentacle_lightning[i]) + { + zLightningKill(tentacle_lightning[i]); + tentacle_lightning[i] = NULL; + } + } +} + +void zNPCKingJelly::refresh_tentacle_points() +{ + S32 tempvar = 0; + do + { + refresh_tentacle_points(tempvar); + tempvar = tempvar + 1; + } while (tempvar < 7); +} + +void zNPCKingJelly::destroy_ambient_rings() +{ + for (S32 i = 0; i < 3; i++) + { + ambient_rings[i].destroy(); + } +} + void zNPCKingJelly::generate_spawn_particles() { } @@ -324,12 +359,37 @@ void zNPCKingJelly::load_curtain_model() // } +// void zNPCKingJelly::start_blink() +// { +// blink.active = 1; +// blink.delay = 0; +// blink.count = 0; +// model = 0; +// render = 0; +// this = 0; + +// // 0x24 model +// // 0x44 render +// } + S32 zNPCGoalKJDamage::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn) { // TODO return 0; } +S32 zNPCGoalKJShockGround::Exit(F32 dt, void* updCtxt) +{ + zNPCKingJelly& kj = *(zNPCKingJelly*)this->psyche->clt_owner; + if (kj.flag.charging != 0) + { + kj.end_charge(); + } + kj.create_ambient_rings(); + kj.disable_tentacle_damage = 0; + return xGoal::Exit(dt, updCtxt); +} + S32 zNPCGoalKJDamage::Enter(F32 dt, void* updCtxt) { // TODO diff --git a/src/SB/Game/zNPCTypeKingJelly.h b/src/SB/Game/zNPCTypeKingJelly.h index 880593dbd..d8526ecde 100644 --- a/src/SB/Game/zNPCTypeKingJelly.h +++ b/src/SB/Game/zNPCTypeKingJelly.h @@ -16,7 +16,7 @@ struct lightning_ring F32 segment_length; F32 min_height; F32 max_height; - F32 min_radius; + F32 min_radius; //0x1c? F32 max_radius; //0x20? F32 delay; F32 accel; @@ -38,11 +38,14 @@ struct lightning_ring F32 rot_radius; F32 degrees; //0x58? } property; - zLightning* arcs[8]; + zLightning* arcs[8]; //0x78 U32 arcs_size; //0x7c + void (*update_callback)(lightning_ring&, F32); void create(); + void destroy(); + static void destroy(S32); }; struct zNPCKingJelly : zNPCSubBoss @@ -110,7 +113,7 @@ struct zNPCKingJelly : zNPCSubBoss U8 active; //0x2EC S32 count; //0x2f0 F32 intensity; - F32 delay; + F32 delay; //0x2f8 } blink; struct { @@ -120,7 +123,7 @@ struct zNPCKingJelly : zNPCSubBoss child_data children[32]; U32 children_size; //0x88C F32 last_tentacle_shock; - zLightning* tentacle_lightning[7]; + zLightning* tentacle_lightning[7]; //0x894 [0] xVec3 tentacle_points[13][7]; lightning_ring ambient_rings[3]; lightning_ring wave_rings[4]; @@ -136,6 +139,7 @@ struct zNPCKingJelly : zNPCSubBoss void Destroy(); U32 AnimPick(S32 rawgoal, en_NPC_GOAL_SPOT gspot, xGoal* goal); void BUpdate(xVec3*); + void RenderExtra(); void SelfSetup(); void init_child(zNPCKingJelly::child_data&, zNPCCommon&, int); void disable_child(zNPCKingJelly::child_data&); @@ -144,6 +148,7 @@ struct zNPCKingJelly : zNPCSubBoss void load_model(); void load_curtain_model(); void reset_curtain(); + void start_blink(); void decompose(); void post_decompose(); void vanish(); @@ -153,10 +158,14 @@ struct zNPCKingJelly : zNPCSubBoss void on_change_fade_obstructions(const tweak_info&); void render_debug(); void create_tentacle_lightning(); + void destroy_tentacle_lightning(); void refresh_tentacle_points(); void refresh_tentacle_points(S32); + void destroy_ambient_rings(); void generate_spawn_particles(); void update_round(); + void end_charge(); + void create_ambient_rings(); }; struct zNPCGoalKJIdle : zNPCGoalCommon @@ -204,6 +213,15 @@ struct zNPCGoalKJShockGround : zNPCGoalCommon zNPCGoalKJShockGround(S32 goalID) : zNPCGoalCommon(goalID) { } + + S32 Enter(F32 dt, void* updCtxt); + S32 Exit(F32 dt, void* updCtxt); + S32 Process(en_trantype*, float, void*, xScene*); + S32 update_start(float); + S32 update_warm_up(float); + S32 update_release(float); + S32 update_cool_down(float); + S32 update_stop(float); }; struct zNPCGoalKJDamage : zNPCGoalCommon diff --git a/src/SB/Game/zNPCTypeVillager.cpp b/src/SB/Game/zNPCTypeVillager.cpp index 6d6506c70..8b35a5e9c 100644 --- a/src/SB/Game/zNPCTypeVillager.cpp +++ b/src/SB/Game/zNPCTypeVillager.cpp @@ -361,14 +361,16 @@ void zNPCVillager::SpeakBegin() psy_instinct->GoalSet(NPC_GOAL_SPEAK, 1); } -void zNPCVillager::SpeakEnd() //80% +void zNPCVillager::SpeakEnd() { xPsyche* psy = psy_instinct; - psy->GIDInStack(NPC_GOAL_LIMBO); - - if ((psy == 0) && (psy->GIDOfSafety() != 0)) + if ((psy->GIDInStack(NPC_GOAL_LIMBO) == 0)) { - psy->GoalSet(NPC_GOAL_LIMBO, 1); + S32 safetyGid = psy->GIDOfSafety(); + if (safetyGid != 0) + { + psy->GoalSet(safetyGid, 1); + } } } @@ -489,13 +491,14 @@ void zNPCSandyBikini::Process(xScene* xscn, float dt) //100% code match zNPCSandyBikini::VFXLeakyFaucet(dt); } -void zNPCBalloonBoy::Init(xEntAsset* asset) //68% +void zNPCBalloonBoy::Init(xEntAsset* asset) { zNPCFish::Init(asset); rast_shadBalloon = 0; - bound.type = 0; + cfg_npc->dst_castShadow = -1; + return; - //cg_npc 0x1d8 + //cfg_npc 0x1d8 //bound.type 0x84 } diff --git a/src/SB/Game/zNPCTypeVillager.h b/src/SB/Game/zNPCTypeVillager.h index 1f9ad3232..3a2552add 100644 --- a/src/SB/Game/zNPCTypeVillager.h +++ b/src/SB/Game/zNPCTypeVillager.h @@ -37,6 +37,7 @@ struct zNPCVillager : zNPCCommon void SpeakBegin(); void SpeakEnd(); void TossMyConverse(); + S32 PlayerIsStaring(); void ChkCheatSize(); F32 GenShadCacheRad(); }; @@ -49,6 +50,7 @@ struct zNPCFish : zNPCVillager xEntDrive raw_drvdata; zNPCFish(S32 myType); + void Init(xEntAsset*); void ParseINI(); void FishSoundTables(); void CheckDoChat(); @@ -76,7 +78,7 @@ struct zNPCBalloonBoy : zNPCFish S32 specialBalloon; zPlatform* plat_balloons; xShadowCache* shadCache; - RwRaster* rast_shadBalloon; + static RwRaster* rast_shadBalloon; zNPCBalloonBoy(S32 myType); @@ -213,6 +215,7 @@ xAnimTable* ZNPC_AnimTable_BalloonBoy(); xAnimTable* ZNPC_AnimTable_BalloonBoy(xAnimTable* callerTable); xAnimTable* ZNPC_AnimTable_SuperFriend(); xAnimTable* ZNPC_AnimTable_SuperFriend(xAnimTable* callerTable); +S32 FOLK_grul_goAlert(xGoal*, void*, en_trantype*, float, void*); void FOLK_KillEffects(); void FOLK_InitEffects(); void zNPCVillager_ScenePostInit();