Merge 1ff878f59f
into 897d3efbd0
This commit is contained in:
commit
109375dc58
|
@ -56,6 +56,13 @@ static const ALIGN_ASSET(2) char gTriforcePiece2DL[] = dgTriforcePiece2DL;
|
||||||
#define dgTriforcePieceCompletedDL "__OTR__objects/object_triforce_completed/gTriforcePieceCompletedDL"
|
#define dgTriforcePieceCompletedDL "__OTR__objects/object_triforce_completed/gTriforcePieceCompletedDL"
|
||||||
static const ALIGN_ASSET(2) char gTriforcePieceCompletedDL[] = dgTriforcePieceCompletedDL;
|
static const ALIGN_ASSET(2) char gTriforcePieceCompletedDL[] = dgTriforcePieceCompletedDL;
|
||||||
|
|
||||||
|
#define dgLinkBottleDL "__OTR__objects/object_link_eq/gLinkBottleDL"
|
||||||
|
static const ALIGN_ASSET(2) char gLinkBottleDL[] = dgLinkBottleDL;
|
||||||
|
|
||||||
|
#define dgLinkBottleContentsDL "__OTR__objects/object_link_eq/gLinkBottleContentsDL"
|
||||||
|
static const ALIGN_ASSET(2) char gLinkBottleContentsDL[] = dgLinkBottleContentsDL;
|
||||||
|
|
||||||
|
|
||||||
// overlays
|
// overlays
|
||||||
#define dgOptionsDividerChangeLangVtx "__OTR__overlays/ovl_file_choose/gOptionsDividerChangeLangVtx"
|
#define dgOptionsDividerChangeLangVtx "__OTR__overlays/ovl_file_choose/gOptionsDividerChangeLangVtx"
|
||||||
static const ALIGN_ASSET(2) char gOptionsDividerChangeLangVtx[] = dgOptionsDividerChangeLangVtx;
|
static const ALIGN_ASSET(2) char gOptionsDividerChangeLangVtx[] = dgOptionsDividerChangeLangVtx;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "objects/object_link_child/object_link_child.h"
|
#include "objects/object_link_child/object_link_child.h"
|
||||||
#include "objects/object_triforce_spot/object_triforce_spot.h"
|
#include "objects/object_triforce_spot/object_triforce_spot.h"
|
||||||
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
|
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
|
||||||
|
#include "soh_assets.h"
|
||||||
|
|
||||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||||
#include "soh/Enhancements/randomizer/draw.h"
|
#include "soh/Enhancements/randomizer/draw.h"
|
||||||
|
@ -563,6 +564,23 @@ uint8_t Player_IsCustomLinkModel() {
|
||||||
(LINK_IS_CHILD && ResourceGetIsCustomByName(gLinkChildSkel));
|
(LINK_IS_CHILD && ResourceGetIsCustomByName(gLinkChildSkel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alternate Equipment Loading function. (global function)
|
||||||
|
// Checks if player can use new loading method, for Bottles Only.
|
||||||
|
uint8_t Player_CanUseNewLoadingMethodBottle(Player* this) {
|
||||||
|
if (!CVarGetInteger("gAltLinkEquip", 1)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (this->leftHandType) {
|
||||||
|
case PLAYER_MODELTYPE_LH_BOTTLE:
|
||||||
|
if (ResourceGetIsCustomByName(gLinkBottleDL)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
|
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
|
||||||
return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
|
return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
|
||||||
(this->stateFlags1 & PLAYER_STATE1_LOADING) || (this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING) ||
|
(this->stateFlags1 & PLAYER_STATE1_LOADING) || (this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING) ||
|
||||||
|
@ -1808,11 +1826,22 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx);
|
OPEN_DISPS(play->state.gfxCtx);
|
||||||
|
|
||||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, bottleColor->r, bottleColor->g, bottleColor->b, 0);
|
gDPSetEnvColor(POLY_XLU_DISP++, bottleColor->r, bottleColor->g, bottleColor->b, 0);
|
||||||
gSPDisplayList(POLY_XLU_DISP++, sBottleDLists[(gSaveContext.linkAge)]);
|
|
||||||
|
|
||||||
|
if (this->itemAction != PLAYER_IA_BOTTLE && Player_CanUseNewLoadingMethodBottle(this) &&
|
||||||
|
ResourceGetIsCustomByName(gLinkBottleContentsDL)) { //check to make sure that this won't break everything
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||||
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gLinkBottleContentsDL);
|
||||||
|
}
|
||||||
|
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||||
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
if (Player_CanUseNewLoadingMethodBottle(this)) {
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gLinkBottleDL);
|
||||||
|
} else {
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, sBottleDLists[(gSaveContext.linkAge)]);
|
||||||
|
}
|
||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue