mirror of
https://github.com/CTR-tools/CTR-ModSDK.git
synced 2025-02-15 10:49:27 +00:00
Faradise UI_Map_DrawDrivers
This commit is contained in:
parent
825e6d7cad
commit
cdf095f881
@ -0,0 +1,59 @@
|
||||
#include <common.h>
|
||||
|
||||
void UI_Map_DrawDrivers(int ptrMap,struct Thread* bucket,short *param_3)
|
||||
|
||||
{
|
||||
int kartColor;
|
||||
int uVar2;
|
||||
struct Driver* d;
|
||||
struct GameTracker* gGT = sdata->gGT;
|
||||
|
||||
// if 2P or 4P
|
||||
if((gGT->numPlyrCurrGame & 1) == 0)
|
||||
{
|
||||
// quit, no map drawn
|
||||
return;
|
||||
}
|
||||
|
||||
for( /* bucket */ ;
|
||||
bucket != 0;
|
||||
bucket = bucket->siblingThread,
|
||||
*param_3 = *param_3 + 1
|
||||
)
|
||||
{
|
||||
// Player structure
|
||||
d = bucket->object;
|
||||
|
||||
// characterID + 5
|
||||
kartColor = data.characterIDs[d->driverID] + 5;
|
||||
|
||||
// default (AI)
|
||||
uVar2 = 0x31;
|
||||
|
||||
// if this is human and not AI
|
||||
if ((d->actionsFlagSet & 0x100000) == 0)
|
||||
{
|
||||
// If this is an even numbered frame
|
||||
if ((gGT->timer & 2) == 0) {
|
||||
kartColor = 4;
|
||||
}
|
||||
|
||||
// If you're in Adventure Arena
|
||||
if ((gGT->gameMode1 & 0x100000) != 0)
|
||||
{
|
||||
// Draw dot for Player on 2D Adv Map
|
||||
UI_Map_DrawAdvPlayer(ptrMap,bucket->inst->matrix.m[0][2],0x32,kartColor,
|
||||
(d->rotCurr.y + 0x800U) | 0x1000,0x800);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Player
|
||||
uVar2 = 0x32;
|
||||
}
|
||||
|
||||
// Draw icon on map
|
||||
UI_Map_DrawRawIcon(ptrMap,&bucket->inst->matrix.t[0],uVar2,(short)kartColor,0,0x1000);
|
||||
}
|
||||
return;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user