mirror of
https://github.com/CTR-tools/CTR-ModSDK.git
synced 2024-12-11 15:04:03 +00:00
progress
This commit is contained in:
parent
212df871be
commit
ab750817e4
@ -398,28 +398,36 @@ void DECOMP_AA_EndEvent_DrawMenu(void)
|
||||
// when loading is done, remove flag for Boss Mode
|
||||
sdata->Loading.OnBegin.RemBitsConfig0 |= ADVENTURE_BOSS;
|
||||
|
||||
// bit offset 0x5e is where progress holds keys
|
||||
// This checks if you've unlocked a key,
|
||||
// by getting bit offset, converting that
|
||||
// to integer offset, and remainder
|
||||
// bitIndex of keys unlocked, and boss beaten
|
||||
bitIndex = gGT->bossID + 0x5e;
|
||||
|
||||
// If the number of keys you have is less than 4
|
||||
if (gGT->bossID < 4)
|
||||
// Go to Podium after returning to Adventure Hub
|
||||
gGT->podiumRewardID = 99; // key
|
||||
{
|
||||
// only if first time beating boss
|
||||
if (CHECK_ADV_BIT(adv->rewards, bitIndex) == 0)
|
||||
{
|
||||
// Go to Podium after returning to Adventure Hub
|
||||
gGT->podiumRewardID = 99; // key
|
||||
}
|
||||
}
|
||||
|
||||
// If you have 4 keys (only here if you beat oxide)
|
||||
else
|
||||
{
|
||||
// goes to bits after purple gem, cause bossID is 5 or 6
|
||||
bitIndex = gGT->bossID + 0x6f;
|
||||
|
||||
// Go to podium, with no key (0x38 = empty)
|
||||
// Always go to podium after oxide,
|
||||
// with no key (0x38 = empty)
|
||||
gGT->podiumRewardID = 0x38;
|
||||
|
||||
if ((sdata->advProgress.rewards[3] & 4) == 0)
|
||||
sdata->advProgress.rewards[3] |= 0x80004;
|
||||
// assume oxide beaten 1st time
|
||||
sdata->advProgress.rewards[3] |= 0x80004;
|
||||
|
||||
// if beaten oxide 2nd time
|
||||
if(gGT->bossID == 6)
|
||||
{
|
||||
// beat 2nd time
|
||||
sdata->advProgress.rewards[3] |= 0x100008;
|
||||
}
|
||||
}
|
||||
|
||||
// hot air skyway
|
||||
@ -447,6 +455,8 @@ void DECOMP_AA_EndEvent_DrawMenu(void)
|
||||
{
|
||||
// 6th bit of adventure profile is where trophies start
|
||||
bitIndex = gGT->levelID + 6;
|
||||
|
||||
// if first time unlocking trophy
|
||||
if (CHECK_ADV_BIT(adv->rewards, bitIndex) == 0)
|
||||
{
|
||||
// go to podium with trophy
|
||||
@ -454,9 +464,8 @@ void DECOMP_AA_EndEvent_DrawMenu(void)
|
||||
}
|
||||
}
|
||||
|
||||
// If you haven't unlocked this reward
|
||||
if (CHECK_ADV_BIT(adv->rewards, bitIndex) == 0)
|
||||
UNLOCK_ADV_BIT(adv->rewards, bitIndex);
|
||||
// Unlock reward
|
||||
UNLOCK_ADV_BIT(adv->rewards, bitIndex);
|
||||
|
||||
MainRaceTrack_RequestLoad(levSpawn);
|
||||
}
|
||||
|
@ -656,8 +656,7 @@ LAB_OVR1__800a03b8:
|
||||
// Record that you have now beaten Oxide
|
||||
(&DAT_8008fba4)[(int)(iVar15 + 0x5eU) >> 5] = uVar7 | 1 << uVar5;
|
||||
|
||||
// 6f is where purple CTR tokens are, not sure what this does
|
||||
// ghidra fail? should be 0x5e?
|
||||
// goes to bits after purple gem, cause bossID is 5 or 6
|
||||
(&DAT_8008fba4)[(int)(*(int *)(puVar6 + 0x1eb8) + 0x6fU) >> 5] =
|
||||
(&DAT_8008fba4)[(int)(*(int *)(puVar6 + 0x1eb8) + 0x6fU) >> 5] |
|
||||
1 << (*(int *)(puVar6 + 0x1eb8) + 0x6fU & 0x1f);
|
||||
|
@ -155,8 +155,8 @@ struct AdvProgress
|
||||
// 0x0C:
|
||||
0x1: Glacier Park Key
|
||||
0x2: Citadel Key
|
||||
0x4: Beat Oxide
|
||||
0x8: ???
|
||||
0x4: BeatOxide1
|
||||
0x8: BeatOxide2
|
||||
0x10: Beach to Gemstone Valley door
|
||||
0x20: Gemstone Valley to cups
|
||||
0x40: Beach to Glacier Park
|
||||
@ -172,8 +172,8 @@ struct AdvProgress
|
||||
0x10000: Lost Ruins Purple CTR Token
|
||||
0x20000: Glacier Park Purple CTR Token
|
||||
0x40000: Citadel City Purple CTR Token
|
||||
0x80000: ???
|
||||
0x100000: ???
|
||||
0x80000: BeatOxide1 (again?)
|
||||
0x100000: BeatOxide2 (again?)
|
||||
0x200000: ???
|
||||
0x400000: Hint - Map Information
|
||||
0x800000: Hint - Using a Warp Pad
|
||||
|
Loading…
Reference in New Issue
Block a user