mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-07-02 20:56:27 -04:00
Adds support for custom drawing functions, and adds one for Small Keys and Boss Keys.
This commit is contained in:
@@ -1360,7 +1360,11 @@ void EnItem00_DrawCollectible(EnItem00* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry randoGetItemEntry =
|
||||
Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
||||
GetItem_Draw(globalCtx, randoGetItemEntry.gid);
|
||||
if (randoGetItemEntry.drawFunc != NULL) {
|
||||
randoGetItemEntry.drawFunc(globalCtx, &randoGetItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(globalCtx, randoGetItemEntry.gid);
|
||||
}
|
||||
} else {
|
||||
s32 texIndex = this->actor.params - 3;
|
||||
|
||||
@@ -1419,7 +1423,11 @@ void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry randoGetItemEntry =
|
||||
Randomizer_GetRandomizedItem(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
||||
GetItem_Draw(globalCtx, randoGetItemEntry.gid);
|
||||
if (randoGetItemEntry.drawFunc != NULL) {
|
||||
randoGetItemEntry.drawFunc(globalCtx, &randoGetItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(globalCtx, randoGetItemEntry.gid);
|
||||
}
|
||||
} else {
|
||||
s32 pad;
|
||||
|
||||
|
||||
@@ -1170,7 +1170,11 @@ void Player_DrawGetItemImpl(GlobalContext* globalCtx, Player* this, Vec3f* refPo
|
||||
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
|
||||
GetItem_Draw(globalCtx, drawIdPlusOne - 1);
|
||||
if(this->getItemEntry.drawFunc != NULL) {
|
||||
this->getItemEntry.drawFunc(globalCtx, &this->getItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(globalCtx, drawIdPlusOne - 1);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user