mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-23 14:22:16 -05:00
Correctly renders freestanding items
Particle effects are probably broken, need to fix them still, I pretty much know how I would do that.
This commit is contained in:
parent
cfce0eba3d
commit
3258fc5fb3
@ -1318,11 +1318,13 @@ void EnItem00_DrawCollectible(EnItem00* this, GlobalContext* globalCtx) {
|
||||
f32 mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
s32 randoGetItemId = Randomizer_GetRandomizedItemId(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
GetItemEntry randoGetItemEntry =
|
||||
Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
|
||||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
|
||||
}
|
||||
GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
|
||||
GetItem_Draw(globalCtx, randoGetItemEntry.gi);
|
||||
} else {
|
||||
s32 texIndex = this->actor.params - 3;
|
||||
|
||||
@ -1379,11 +1381,13 @@ void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx) {
|
||||
f32 mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
s32 randoGetItemId = Randomizer_GetRandomizedItemId(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
GetItemEntry randoGetItemEntry =
|
||||
Randomizer_GetRandomizedItem(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
|
||||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
|
||||
}
|
||||
GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
|
||||
GetItem_Draw(globalCtx, ABS(randoGetItemEntry.gi - 1));
|
||||
} else {
|
||||
s32 pad;
|
||||
|
||||
|
@ -5041,7 +5041,11 @@ s32 func_8083B040(Player* this, GlobalContext* globalCtx) {
|
||||
func_80835DE4(globalCtx, this, func_8084F104, 0);
|
||||
|
||||
if (sp2C >= 0) {
|
||||
giEntry = ItemTable_Retrieve(D_80854528[sp2C] - 1);
|
||||
if (this->getItemEntry.objectId == OBJECT_INVALID) {
|
||||
giEntry = ItemTable_Retrieve(D_80854528[sp2C] - 1);
|
||||
} else {
|
||||
giEntry = this->getItemEntry;
|
||||
}
|
||||
func_8083AE40(this, giEntry.objectId);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user