mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Merge pull request #1758 from HarbourMasters/develop-zhora
zhora -> dev
This commit is contained in:
commit
595e105ef1
13 changed files with 49 additions and 27 deletions
|
@ -370,7 +370,7 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
|
||||
// Bombchus (max: 50, no upgrades)
|
||||
if (AMMO(ITEM_BOMBCHU) < 50) {
|
||||
if (INV_CONTENT(ITEM_BOMBCHU) == ITEM_BOMBCHU && AMMO(ITEM_BOMBCHU) < 50) {
|
||||
AMMO(ITEM_BOMBCHU) = 50;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2006,7 +2006,7 @@ s32 func_800C0DB4(GlobalContext* globalCtx, Vec3f* pos) {
|
|||
}
|
||||
|
||||
void Gameplay_PerformSave(GlobalContext* globalCtx) {
|
||||
if (globalCtx != NULL) {
|
||||
if (globalCtx != NULL && gSaveContext.fileNum != 0xFF) {
|
||||
Gameplay_SaveSceneFlags(globalCtx);
|
||||
gSaveContext.savedSceneNum = globalCtx->sceneNum;
|
||||
if (gSaveContext.temporaryWeapon) {
|
||||
|
|
|
@ -1242,8 +1242,12 @@ void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAn
|
|||
if (ResourceMgr_OTRSigCheck(animation) != 0)
|
||||
animation = ResourceMgr_LoadAnimByName(animation);
|
||||
|
||||
AnimationHeader* currentAnimation = (AnimationHeader*)skelAnime->animation;
|
||||
if (ResourceMgr_OTRSigCheck(currentAnimation) != 0)
|
||||
currentAnimation = ResourceMgr_LoadAnimByName(currentAnimation);
|
||||
|
||||
skelAnime->mode = mode;
|
||||
if ((morphFrames != 0.0f) && ((animation != skelAnime->animation) || (startFrame != skelAnime->curFrame))) {
|
||||
if ((morphFrames != 0.0f) && ((animation != currentAnimation) || (startFrame != skelAnime->curFrame))) {
|
||||
if (morphFrames < 0) {
|
||||
LinkAnimation_SetUpdateFunction(skelAnime);
|
||||
SkelAnime_CopyFrameTable(skelAnime, skelAnime->morphTable, skelAnime->jointTable);
|
||||
|
@ -1687,8 +1691,17 @@ s32 SkelAnime_Once(SkelAnime* skelAnime) {
|
|||
*/
|
||||
void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
|
||||
u8 mode, f32 morphFrames, s8 taper) {
|
||||
LinkAnimationHeader* ogAnim = animation;
|
||||
|
||||
if (ResourceMgr_OTRSigCheck(animation) != 0)
|
||||
animation = ResourceMgr_LoadAnimByName(animation);
|
||||
|
||||
AnimationHeader* currentAnimation = (AnimationHeader*)skelAnime->animation;
|
||||
if (ResourceMgr_OTRSigCheck(currentAnimation) != 0)
|
||||
currentAnimation = ResourceMgr_LoadAnimByName(currentAnimation);
|
||||
|
||||
skelAnime->mode = mode;
|
||||
if ((morphFrames != 0.0f) && ((animation != skelAnime->animation) || (startFrame != skelAnime->curFrame))) {
|
||||
if ((morphFrames != 0.0f) && ((animation != currentAnimation) || (startFrame != skelAnime->curFrame))) {
|
||||
if (morphFrames < 0) {
|
||||
SkelAnime_SetUpdate(skelAnime);
|
||||
SkelAnime_CopyFrameTable(skelAnime, skelAnime->morphTable, skelAnime->jointTable);
|
||||
|
@ -1710,7 +1723,7 @@ void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32
|
|||
skelAnime->morphWeight = 0.0f;
|
||||
}
|
||||
|
||||
skelAnime->animation = animation;
|
||||
skelAnime->animation = ogAnim;
|
||||
skelAnime->startFrame = startFrame;
|
||||
skelAnime->endFrame = endFrame;
|
||||
skelAnime->animLength = Animation_GetLength(animation);
|
||||
|
|
|
@ -1349,6 +1349,11 @@ void EnGo2_RollingAnimation(EnGo2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGo2_WakeUp(EnGo2* this, GlobalContext* globalCtx) {
|
||||
if (CVar_GetS32("gUnfixGoronSpin", 0)) {
|
||||
// Trick SkelAnime into thinking the current animation is changing so that it morphs between the same position,
|
||||
// making the goron do a spin
|
||||
this->skelAnime.animation = NULL;
|
||||
}
|
||||
if (this->skelAnime.playSpeed == 0.0f) {
|
||||
if ((this->actor.params & 0x1F) != GORON_DMT_BIGGORON) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOLON_WAKE_UP);
|
||||
|
|
|
@ -10976,11 +10976,14 @@ void Player_DrawGameplay(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* c
|
|||
this);
|
||||
|
||||
if ((overrideLimbDraw == func_80090014) && (this->currentMask != PLAYER_MASK_NONE)) {
|
||||
// Fixes a bug in vanilla where ice traps are rendered extremely large while wearing a bunny hood
|
||||
if (CVar_GetS32("gFixIceTrapWithBunnyHood", 1)) Matrix_Push();
|
||||
Mtx* sp70 = Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Mtx));
|
||||
|
||||
if (this->currentMask == PLAYER_MASK_BUNNY) {
|
||||
Vec3s sp68;
|
||||
|
||||
FrameInterpolation_RecordActorPosRotMatrix();
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B, sp70);
|
||||
|
||||
sp68.x = D_80858AC8.unk_02 + 0x3E2;
|
||||
|
@ -10997,6 +11000,7 @@ void Player_DrawGameplay(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* c
|
|||
}
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]);
|
||||
if (CVar_GetS32("gFixIceTrapWithBunnyHood", 1)) Matrix_Pop();
|
||||
}
|
||||
|
||||
if ((this->currentBoots == PLAYER_BOOTS_HOVER) && !(this->actor.bgCheckFlags & 1) &&
|
||||
|
|
|
@ -10,6 +10,7 @@ void Opening_SetupTitleScreen(OpeningContext* this) {
|
|||
gSaveContext.gameMode = 1;
|
||||
this->state.running = false;
|
||||
gSaveContext.linkAge = 0;
|
||||
gSaveContext.fileNum = 0xFF;
|
||||
Sram_InitDebugSave();
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
gSaveContext.sceneSetupIndex = 7;
|
||||
|
|
|
@ -307,6 +307,7 @@ void Title_Init(GameState* thisx) {
|
|||
Randomizer_LoadSettings("");
|
||||
Randomizer_LoadHintLocations("");
|
||||
Randomizer_LoadItemLocations("", true);
|
||||
Randomizer_LoadMerchantMessages("");
|
||||
gSaveContext.gameMode = 0;
|
||||
gSaveContext.magic = gSaveContext.magic;
|
||||
SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext);
|
||||
|
|
|
@ -381,7 +381,8 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
--INV_CONTENT(ITEM_TRADE_CHILD);
|
||||
} else if ((pauseCtx->stickRelX < -30 || pauseCtx->stickRelX > 30 || pauseCtx->stickRelY < -30 || pauseCtx->stickRelY > 30) ||
|
||||
dpad && CHECK_BTN_ANY(input->press.button, BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT)) {
|
||||
if (INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_LETTER_ZELDA) {
|
||||
// Change to keaton mask if no mask is in child trade slot. Catches Zelda's letter and bottle duping over this slot.
|
||||
if (INV_CONTENT(ITEM_TRADE_CHILD) < ITEM_MASK_KEATON || INV_CONTENT(ITEM_TRADE_CHILD) > ITEM_MASK_TRUTH) {
|
||||
INV_CONTENT(ITEM_TRADE_CHILD) = ITEM_MASK_KEATON;
|
||||
} else {
|
||||
INV_CONTENT(ITEM_TRADE_CHILD) ^= ITEM_MASK_KEATON ^ ITEM_MASK_TRUTH;
|
||||
|
|
|
@ -1134,6 +1134,7 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
|
|||
static s16 D_8082AD48 = 0;
|
||||
static s16 D_8082AD4C = 0;
|
||||
static s16 D_8082AD50 = 0;
|
||||
const Color_RGB8 A_cursor = CVar_GetRGB("gCCABtnPrim", A_BTN_ori);
|
||||
PauseContext* pauseCtx = &globalCtx->pauseCtx;
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
s16 stepR;
|
||||
|
@ -1508,7 +1509,7 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
|
|||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, CVar_GetRGB("gCCABtnPrim", A_BTN_ori).r, CVar_GetRGB("gCCABtnPrim", A_BTN_ori).g, CVar_GetRGB("gCCABtnPrim", A_BTN_ori).b, VREG(61)); //Save prompt cursor colour
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_cursor.r, A_cursor.g, A_cursor.b, VREG(61)); //Save prompt cursor colour
|
||||
}
|
||||
|
||||
if (pauseCtx->promptChoice == 0) {
|
||||
|
@ -1533,7 +1534,13 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
|
|||
|
||||
gDPSetCombineLERP(POLY_KAL_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0,
|
||||
TEXEL0, 0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { //Continue prompt cursor colour
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 100, 255, VREG(61));
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_cursor.r, A_cursor.g, A_cursor.b, VREG(61)); //Continue prompt cursor colour
|
||||
}
|
||||
|
||||
if (pauseCtx->promptChoice == 0) {
|
||||
gSPDisplayList(POLY_KAL_DISP++, gPromptCursorLeftDL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue