mirror of
https://github.com/CTR-tools/CTR-ModSDK.git
synced 2024-12-02 18:26:45 +00:00
progress
This commit is contained in:
parent
123b4cfe2a
commit
32c968ded5
@ -109,20 +109,18 @@ void DECOMP_UI_DrawRankedDrivers(void) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
psVar17 = &data.rankIconsCurr[0];
|
||||
|
||||
short* psVar8;
|
||||
psVar8 = &data.rankIconsDesired[0];
|
||||
|
||||
for (iVar14 = 0; iVar14 < 8; iVar14++)
|
||||
{
|
||||
short* curr = &data.rankIconsCurr[iVar14];
|
||||
|
||||
short* des = &data.rankIconsDesired[iVar14];
|
||||
|
||||
if (
|
||||
// if player structure pointer is not nullptr
|
||||
(gGT->drivers[iVar14] != 0) &&
|
||||
|
||||
// if you haven't gotten to the last driver
|
||||
((*psVar8 + 1) < 9)
|
||||
((*des + 1) < 9)
|
||||
)
|
||||
{
|
||||
// player structure + [some offset]
|
||||
@ -174,19 +172,18 @@ void DECOMP_UI_DrawRankedDrivers(void) {
|
||||
if (*psVar13 == 0)
|
||||
{
|
||||
// get absolute pos-rank of driver
|
||||
iVar12 = *psVar8;
|
||||
iVar12 = *des;
|
||||
|
||||
// if current == desired
|
||||
if (iVar12 == (int)*psVar17)
|
||||
if (iVar12 == *curr)
|
||||
{
|
||||
// if top positions
|
||||
if ((iVar12 + 1) < 5)
|
||||
if (iVar12 < 4)
|
||||
{
|
||||
posXY[0] = 0x14;
|
||||
posXY[1] = iVar12 * 0x1b + 0x39;
|
||||
|
||||
*psVar17 = *psVar8;
|
||||
}
|
||||
else continue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,10 +192,18 @@ void DECOMP_UI_DrawRankedDrivers(void) {
|
||||
{
|
||||
UI_Lerp2D_Angular(
|
||||
&posXY[0],
|
||||
data.rankIconsCurr[iVar14],
|
||||
data.rankIconsDesired[iVar14],
|
||||
*curr,
|
||||
*des,
|
||||
*psVar13
|
||||
);
|
||||
|
||||
psVar13[0]++;
|
||||
|
||||
if (*psVar13 >= FPS_DOUBLE(5))
|
||||
{
|
||||
*psVar13 = 0;
|
||||
*curr = *des;
|
||||
}
|
||||
}
|
||||
|
||||
UI_DrawDriverIcon(
|
||||
@ -214,19 +219,7 @@ void DECOMP_UI_DrawRankedDrivers(void) {
|
||||
gGT->tileView_UI.ptrOT,
|
||||
|
||||
1, 0x1000, local_30);
|
||||
|
||||
*psVar13++;
|
||||
|
||||
if (*psVar13 >= FPS_DOUBLE(5))
|
||||
{
|
||||
*psVar13 = 0;
|
||||
data.rankIconsCurr[iVar14] = data.rankIconsDesired[iVar14];
|
||||
}
|
||||
}
|
||||
|
||||
LAB_800528cc:
|
||||
psVar17 += 1;
|
||||
psVar8 += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,29 +43,15 @@ void DECOMP_UI_INSTANCE_InitAll(void)
|
||||
|
||||
if ((gameMode1 & (RELIC_RACE | ADVENTURE_ARENA | TIME_TRIAL)) != 0)
|
||||
{
|
||||
|
||||
// We dont know what this is yet
|
||||
#if 0
|
||||
puVar7 = &DAT_800862d8;
|
||||
puVar6 = &DAT_800862c8;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
// loop through all player structures
|
||||
|
||||
// player structure + 0x482 is your rank in the race
|
||||
// 0 = 1st place, 1 = 2nd place, 2 = 3rd place, etc
|
||||
*puVar6 = gGT->drivers[i]->driverRank;
|
||||
data.rankIconsCurr[i] = gGT->drivers[i]->driverRank;
|
||||
|
||||
// if more than 1 screen
|
||||
if (1 < gGT->numPlyrCurrGame) {
|
||||
*puVar7 = 5;
|
||||
data.rankIconsTransitionTimer[i] = 5;
|
||||
}
|
||||
|
||||
puVar7 = puVar7 + 1;
|
||||
puVar6 = puVar6 + 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// If you're not in a Relic Race
|
||||
if ((gameMode1 & RELIC_RACE) == 0) {
|
||||
|
@ -58,7 +58,7 @@ void DECOMP_UI_Lerp2D_Angular(short* ptrPos, short drawnPosition, short absolute
|
||||
)
|
||||
|
||||
// divide distance down
|
||||
/ FPS_DOUBLE(5)
|
||||
/ (FPS_DOUBLE(5)*4)
|
||||
);
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user