-
Notifications
You must be signed in to change notification settings - Fork 36
NpcCoinWork #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ThePlayerRolo
wants to merge
26
commits into
doldecomp:main
Choose a base branch
from
ThePlayerRolo:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
NpcCoinWork #56
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
11bdbda
WIP getHandle Decompilation
ThePlayerRolo 499e91b
Edit 0 to nullptr for consientesy.
ThePlayerRolo 0b99bab
Update According to @break-core revision
ThePlayerRolo b265aef
Implement getSceneNo
ThePlayerRolo 2cdbe7f
100% GETSCENENO MATCHING LETS GOOOOO
ThePlayerRolo c1934f8
Broken SetTrack Volume
ThePlayerRolo c64fba9
76% matching SetTrackVolume
ThePlayerRolo 0010d97
Actually 74% I forgot for a second
ThePlayerRolo f70783a
I think this is what you said to do?
ThePlayerRolo a2227c3
Change the right thing
ThePlayerRolo 11b00e5
Changing it to JAISound still doesn't work?
ThePlayerRolo 339f8e2
Update DOcs I guess?
ThePlayerRolo 41e229a
Change Value to track for 76% matching
ThePlayerRolo 29fc552
Final edit to setTrackVolume For now
ThePlayerRolo 14894cb
Format
ThePlayerRolo c868cfe
100% SET TRACK VOLUME BABY
ThePlayerRolo 86b2b20
Lots more functions
ThePlayerRolo 7b74abb
WIP progress StopTrackBGM, StartBGM, and setStageBgmYoshiPercussion. …
ThePlayerRolo 2a3c32e
Yeah I think I'm good
ThePlayerRolo 43660bb
Remove Useless Include
ThePlayerRolo 3a0b778
Format
ThePlayerRolo 0493c60
unk14 change
ThePlayerRolo 7aad333
FormatING!!!
ThePlayerRolo 1fb8770
Merge branch 'main' of https://github.com/ThePlayerRolo/sms
ThePlayerRolo e8d223e
make the repo actually proper
ThePlayerRolo 6c61290
NpcCoinWork
ThePlayerRolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,4 +52,4 @@ class MSBgm : public JALListHioNode<MSBgm, u32> { | |
| /* 0x14 */ JAISound* unk14; | ||
| }; | ||
|
|
||
| #endif | ||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #include "MoveBG/MapObjBase.hpp" | ||
| #include "dolphin.h" | ||
| #include "dolphin/mtx.h" | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| class TNpcCoin { | ||
| TNpcCoin(int); | ||
| void requestAppearAfterCoin(const Vec&, f32, int); | ||
| void updateCoin(); | ||
| TMapObjBase* unk0; | ||
| s32 unk4; | ||
| JGeometry::TVec3<f32> unk8; | ||
| JGeometry::TVec3<f32> unk14; | ||
|
|
||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| #include "NPC/NpcCoin.hpp" | ||
| #include "MSound/MSound.hpp" | ||
| #include "MSound/MSoundSE.hpp" | ||
| #include "MoveBG/ItemManager.hpp" | ||
| #include "MoveBG/MapObjBase.hpp" | ||
| #include "MoveBG/MapObjManager.hpp" | ||
| #include "System/MarDirector.hpp" | ||
| #include "types.h" | ||
|
|
||
|
|
||
|
|
||
|
|
||
| TNpcCoin::TNpcCoin(int arg1) { | ||
| unk0 = nullptr; | ||
| unk4 = 0; | ||
| unk8.x = 0.0f; | ||
| unk8.y = 0.0f; | ||
| unk8.z = 0.0f; | ||
| unk14.x = 0.0f; | ||
| unk14.y = 0.0f; | ||
| unk14.z = 0.0f; | ||
| unk0 = TMapObjBaseManager::newAndRegisterObjByEventID(arg1, nullptr); | ||
| this->unk0->kill(); | ||
| }; | ||
|
|
||
| void TNpcCoin::updateCoin() { | ||
| bool bVar2; | ||
| bool bVar3; | ||
| TMapObjBase* temp; | ||
| if (0 < this->unk4) { | ||
| bVar2 = true; | ||
| bVar3 = true; | ||
| if (gpMarDirector->unk124 != 1 && gpMarDirector->unk124 != 2 ) { | ||
| bVar2 = false; | ||
| } | ||
| if (!bVar2) { | ||
| bVar2 = true; | ||
| if (gpMarDirector->unk124 != 3 && gpMarDirector->unk124 != 4) { | ||
| bVar2 = false; | ||
| } | ||
| } | ||
| if (!bVar2) { | ||
| bVar3 = false; | ||
| } | ||
| if (!bVar3 && (this->unk4--, this->unk4 != 0)) { | ||
| temp->appear(); | ||
| } else { | ||
| temp = gpItemManager->makeObjAppear(unk8.x, unk8.y, unk8.z,0x2000000e,true); | ||
| if (temp) { | ||
| f32 float2; | ||
| f32 float1; | ||
| f32 float3; | ||
| float1 = unk14.z; | ||
| float2 = unk14.y; | ||
| float3 = unk14.x; | ||
| temp->unkAC.x = float3; | ||
| temp->unkAC.y = float2; | ||
| temp->unkAC.z = float1; | ||
| temp->mLiveFlag &= ~0x10; | ||
| } | ||
| } | ||
| if (gpMSound->gateCheck(0x8807)) { | ||
| MSoundSESystem::MSoundSE::startSoundNpcActor(0x8807, unk8, 0, nullptr, 0, 4); | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.