-
Notifications
You must be signed in to change notification settings - Fork 0
Match most of CKYellowPages #18
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| #include "K/KCore/Serialization/CKSavingManager.h" | ||||||
| #include "types.h" // IWYU pragma: export | ||||||
| #include "K/KCore/Main/CKYellowPages.h" | ||||||
| #include "K/KCore/Interfaces/IKBaseClass.h" | ||||||
| #include "K/KCore/Interfaces/IKSerializable.h" | ||||||
|
|
||||||
| static CKYellowPages* g_pYellowPages; | ||||||
|
|
||||||
|
|
@@ -57,63 +57,60 @@ CKYellowPages::CKYellowPages() | |||||
|
|
||||||
| CKYellowPages::~CKYellowPages() {} | ||||||
|
|
||||||
| extern s32 FUN_801bb454(void* pServiceManager, u32 c); | ||||||
| BOOL CKYellowPages::FindNonRecreableInstances(u32 a, u32 b, u32 c, s32* ppInstances) | ||||||
| extern IKBaseClass** FUN_801bb454(IKBaseClass* pServiceManager, u32 b); | ||||||
| BOOL CKYellowPages::FindNonRecreableInstances(u32 a, u32 b, u32 c, IKBaseClass*** ppInstances) | ||||||
| { | ||||||
| typedef BOOL (*FuncType)(); | ||||||
| BOOL found; | ||||||
| s32 iVar2; | ||||||
| u32 uVar1; | ||||||
| IKBaseClass** iVar2; | ||||||
| switch(a) | ||||||
| { | ||||||
| case 0: | ||||||
| if (b == 1) | ||||||
| switch(b) | ||||||
| { | ||||||
| *ppInstances = (int)this->m_pServiceManager; | ||||||
| } | ||||||
| else if (b == 2) | ||||||
| { | ||||||
| *ppInstances = (int)this->m_pGraphic; | ||||||
| } | ||||||
| else if (b == 3) | ||||||
| { | ||||||
| *ppInstances = (int)this->m_pSound; | ||||||
| } | ||||||
| else | ||||||
| { | ||||||
| if (b != 4) | ||||||
| { | ||||||
| typedef u32 (*FuncType2)(); | ||||||
| uVar1 = (*(FuncType2*)(*(int*)this->m_pGameLoop + 0x24))(); | ||||||
| return uVar1; | ||||||
| } | ||||||
| *ppInstances = (int)this->m_pInput; | ||||||
| case 1: | ||||||
| *ppInstances = (IKBaseClass**)this->m_pServiceManager; | ||||||
| break; | ||||||
| case 2: | ||||||
| *ppInstances = (IKBaseClass**)this->m_pGraphic; | ||||||
| break; | ||||||
| case 3: | ||||||
| *ppInstances = (IKBaseClass**)this->m_pSound; | ||||||
| break; | ||||||
| case 4: | ||||||
| *ppInstances = (IKBaseClass**)this->m_pInput; | ||||||
| break; | ||||||
| default: | ||||||
| if (b != 4) | ||||||
| { | ||||||
| BOOL uVar1 = this->m_pGameLoop->FindNonRecreableInstances(a, b, c, ppInstances); | ||||||
| return uVar1; | ||||||
| } | ||||||
| break; | ||||||
| } | ||||||
| found = (*ppInstances != NULL); | ||||||
| break; | ||||||
| case 1: | ||||||
| iVar2 = FUN_801bb454(this->m_pServiceManager,c); | ||||||
| iVar2 = FUN_801bb454(this->m_pServiceManager, b); | ||||||
|
||||||
| iVar2 = FUN_801bb454(this->m_pServiceManager, b); | |
| iVar2 = FUN_801bb454(this->m_pServiceManager, c); |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition checks parameter b but cases 10 and 13 should likely check parameter c based on the original code structure (case 11 checked c == 6).
| if (b == 6) | |
| if (c == 6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition check for
b != 4is redundant as it's already inside thecase 4branch of the outer switch statement, which only executes whenb == 4. This code is unreachable.