Merge branch 'develop' of garrettjoecox.github.com:HarbourMasters/Shipwright into develop-rando-merge
This commit is contained in:
@@ -2065,16 +2065,40 @@ void func_800EE404(void) {
|
||||
|
||||
void Audio_OcaMemoryGameStart(u8 minigameRound) {
|
||||
u8 i;
|
||||
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger("gCustomizeOcarinaGame", 0)) {
|
||||
u8 startingNotes = 3;
|
||||
u8 roundOneCount = CVarGetInteger("gOcarinaGameRoundOneNotes", 5);
|
||||
u8 roundTwoCount = CVarGetInteger("gOcarinaGameRoundTwoNotes", 6);
|
||||
u8 roundThreeCount = CVarGetInteger("gOcarinaGameRoundThreeNotes", 8);
|
||||
u8 modMinigameNoteCnts[] = { roundOneCount, roundTwoCount, roundThreeCount };
|
||||
|
||||
if (minigameRound > 2) {
|
||||
minigameRound = 2;
|
||||
}
|
||||
|
||||
sOcaMinigameAppendPos = 0;
|
||||
sOcaMinigameEndPos = sOcaMinigameNoteCnts[minigameRound];
|
||||
startingNotes = CVarGetInteger("gOcarinaGameStartingNotes", 3);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
Audio_OcaMemoryGameGenNote();
|
||||
if (minigameRound > 2) {
|
||||
minigameRound = 2;
|
||||
}
|
||||
|
||||
sOcaMinigameAppendPos = 0;
|
||||
sOcaMinigameEndPos = modMinigameNoteCnts[minigameRound];
|
||||
|
||||
for (i = 0; i < startingNotes; i++) {
|
||||
Audio_OcaMemoryGameGenNote();
|
||||
}
|
||||
// #endregion
|
||||
} else {
|
||||
if (minigameRound > 2) {
|
||||
minigameRound = 2;
|
||||
}
|
||||
|
||||
sOcaMinigameAppendPos = 0;
|
||||
sOcaMinigameEndPos = sOcaMinigameNoteCnts[minigameRound];
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
Audio_OcaMemoryGameGenNote();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2093,11 +2117,24 @@ s32 Audio_OcaMemoryGameGenNote(void) {
|
||||
rndNote = sOcarinaNoteValues[(rnd + 1) % 5];
|
||||
}
|
||||
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = 0x2D;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].volume = 0x50;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].vibrato = 0;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].tone = 0;
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger("gCustomizeOcarinaGame", 0)) {
|
||||
int noteSpeed = 0x2D;
|
||||
noteSpeed = noteSpeed / CVarGetInteger("gOcarinaGameNoteSpeed", 1);
|
||||
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = noteSpeed;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].volume = 0x50;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].vibrato = 0;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].tone = 0;
|
||||
// #endregion
|
||||
} else {
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = 0x2D;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].volume = 0x50;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].vibrato = 0;
|
||||
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].tone = 0;
|
||||
}
|
||||
|
||||
sOcaMinigameAppendPos++;
|
||||
|
||||
|
||||
@@ -297,6 +297,11 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
|
||||
PadUtils_UpdateRelXY(input);
|
||||
input->press.stick_x += (s8)(input->cur.stick_x - input->prev.stick_x);
|
||||
input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y);
|
||||
// #region SOH [Enhancement]
|
||||
PadUtils_UpdateRelRXY(input);
|
||||
input->press.right_stick_x += (s8)(input->cur.right_stick_x - input->prev.right_stick_x);
|
||||
input->press.right_stick_y += (s8)(input->cur.right_stick_y - input->prev.right_stick_y);
|
||||
// #endregion
|
||||
}
|
||||
|
||||
uint8_t rumble = (padMgr->rumbleEnable[0] > 0);
|
||||
@@ -389,6 +394,11 @@ void PadMgr_RequestPadData(PadMgr* padMgr, Input* inputs, s32 mode) {
|
||||
PadUtils_UpdateRelXY(newInput);
|
||||
newInput->press.stick_x += (s8)(newInput->cur.stick_x - newInput->prev.stick_x);
|
||||
newInput->press.stick_y += (s8)(newInput->cur.stick_y - newInput->prev.stick_y);
|
||||
// #region SOH [Enhancement]
|
||||
PadUtils_UpdateRelRXY(newInput);
|
||||
newInput->press.right_stick_x += (s8)(newInput->cur.right_stick_x - newInput->prev.right_stick_x);
|
||||
newInput->press.right_stick_y += (s8)(newInput->cur.right_stick_y - newInput->prev.right_stick_y);
|
||||
// #endregion
|
||||
}
|
||||
ogInput++;
|
||||
newInput++;
|
||||
|
||||
@@ -92,3 +92,60 @@ void PadUtils_UpdateRelXY(Input* input) {
|
||||
|
||||
PadUtils_SetRelXY(input, relX, relY);
|
||||
}
|
||||
|
||||
// #region SOH [Enhancement]
|
||||
s8 PadUtils_GetCurRX(Input* input) {
|
||||
return input->cur.right_stick_x;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetCurRY(Input* input) {
|
||||
return input->cur.right_stick_y;
|
||||
}
|
||||
|
||||
void PadUtils_SetRelRXY(Input* input, s32 x, s32 y) {
|
||||
input->rel.right_stick_x = x;
|
||||
input->rel.right_stick_y = y;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetRelRXImpl(Input* input) {
|
||||
return input->rel.right_stick_x;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetRelRYImpl(Input* input) {
|
||||
return input->rel.right_stick_y;
|
||||
}
|
||||
|
||||
s8 PadUtils_GetRelRX(Input* input) {
|
||||
return PadUtils_GetRelRXImpl(input);
|
||||
}
|
||||
|
||||
s8 PadUtils_GetRelRY(Input* input) {
|
||||
return PadUtils_GetRelRYImpl(input);
|
||||
}
|
||||
|
||||
void PadUtils_UpdateRelRXY(Input* input) {
|
||||
s32 curX = PadUtils_GetCurRX(input);
|
||||
s32 curY = PadUtils_GetCurRY(input);
|
||||
s32 relX;
|
||||
s32 relY;
|
||||
|
||||
if (curX > 7) {
|
||||
relX = (curX < 0x43) ? curX - 7 : 0x43 - 7;
|
||||
} else if (curX < -7) {
|
||||
relX = (curX > -0x43) ? curX + 7 : -0x43 + 7;
|
||||
} else {
|
||||
relX = 0;
|
||||
}
|
||||
|
||||
if (curY > 7) {
|
||||
relY = (curY < 0x43) ? curY - 7 : 0x43 - 7;
|
||||
|
||||
} else if (curY < -7) {
|
||||
relY = (curY > -0x43) ? curY + 7 : -0x43 + 7;
|
||||
} else {
|
||||
relY = 0;
|
||||
}
|
||||
|
||||
PadUtils_SetRelRXY(input, relX, relY);
|
||||
}
|
||||
// #endregion
|
||||
|
||||
@@ -1239,8 +1239,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
|
||||
CollisionCheck_InitInfo(&actor->colChkInfo);
|
||||
actor->floorBgId = BGCHECK_SCENE;
|
||||
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
|
||||
//if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex))
|
||||
{
|
||||
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
|
||||
//Actor_SetObjectDependency(play, actor);
|
||||
actor->init(actor, play);
|
||||
actor->init = NULL;
|
||||
@@ -2881,11 +2880,19 @@ s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
|
||||
if ((arg2->z > -actor->uncullZoneScale) && (arg2->z < (actor->uncullZoneForward + actor->uncullZoneScale))) {
|
||||
var = (arg3 < 1.0f) ? 1.0f : 1.0f / arg3;
|
||||
|
||||
if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < 2.0f) &&
|
||||
(((arg2->y + actor->uncullZoneDownward) * var) > -2.0f) &&
|
||||
(((arg2->y - actor->uncullZoneScale) * var) < 2.0f)) {
|
||||
// #region SoH [Widescreen support]
|
||||
// Doors will cull quite noticeably on wider screens. For these actors the zone is increased
|
||||
f32 limit = 1.0f;
|
||||
if (((actor->id == ACTOR_EN_DOOR) || (actor->id == ACTOR_DOOR_SHUTTER)) && CVarGetInteger("gIncreaseDoorUncullZones", 1)) {
|
||||
limit = 2.0f;
|
||||
}
|
||||
|
||||
if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < limit) &&
|
||||
(((arg2->y + actor->uncullZoneDownward) * var) > -limit) &&
|
||||
(((arg2->y - actor->uncullZoneScale) * var) < limit)) {
|
||||
return true;
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -3149,6 +3156,9 @@ void Actor_FreeOverlay(ActorDBEntry* dbEntry) {
|
||||
osSyncPrintf(VT_RST);
|
||||
}
|
||||
|
||||
// SoH: Flag to check if actors are being spawned from the actor entry list
|
||||
// This flag is checked against to allow actors which dont have an objectBankIndex in the objectCtx slot/status array to spawn
|
||||
// An example of what this fixes, is that it allows hookshot to be used as child
|
||||
int gMapLoading = 0;
|
||||
|
||||
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ,
|
||||
|
||||
@@ -1902,7 +1902,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
|
||||
s32 bgId2;
|
||||
f32 nx, ny, nz; // unit normal of polygon
|
||||
|
||||
if (CVarGetInteger("gNoClip", 0) != 0) {
|
||||
if (CVarGetInteger("gNoClip", 0) && actor != NULL && actor->id == ACTOR_PLAYER) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -7887,7 +7887,7 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags) {
|
||||
}
|
||||
}
|
||||
|
||||
// Clear free camera if an action is performed that would move the camera (targeting, first person, talking)
|
||||
// Clear free look if an action is performed that would move the camera (targeting, first person, talking)
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1 &&
|
||||
((mode >= CAM_MODE_TARGET && mode <= CAM_MODE_BATTLE) ||
|
||||
(mode >= CAM_MODE_FIRSTPERSON && mode <= CAM_MODE_CLIMBZ) || mode == CAM_MODE_HANGZ ||
|
||||
@@ -7933,7 +7933,8 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
if (setting == CAM_SET_NONE || setting >= CAM_SET_MAX) {
|
||||
//modified from "==" to "<=" to not crash when "setting" is a negative value
|
||||
if (setting <= CAM_SET_NONE || setting >= CAM_SET_MAX) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera set (%d) !!!!\n" VT_RST, setting);
|
||||
return -99;
|
||||
}
|
||||
|
||||
@@ -524,7 +524,6 @@ void Map_Init(PlayState* play) {
|
||||
interfaceCtx->unk_25A = -1;
|
||||
|
||||
interfaceCtx->mapSegment = GAMESTATE_ALLOC_MC(&play->state, 2 * sizeof(char*));
|
||||
interfaceCtx->mapSegmentName = GAMESTATE_ALLOC_MC(&play->state, 2 * sizeof(char*));
|
||||
// "MAP texture initialization scene_data_ID=%d mapSegment=%x"
|
||||
osSyncPrintf("\n\n\nMAP テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneNum,
|
||||
interfaceCtx->mapSegment, play);
|
||||
|
||||
@@ -3361,8 +3361,13 @@ void Message_Update(PlayState* play) {
|
||||
}
|
||||
if ((s32)(gSaveContext.inventory.questItems & 0xF0000000) == 0x40000000) {
|
||||
gSaveContext.inventory.questItems ^= 0x40000000;
|
||||
gSaveContext.healthCapacity += 0x10;
|
||||
gSaveContext.health += 0x10;
|
||||
if (!CVarGetInteger("gHurtContainer", 0)) {
|
||||
gSaveContext.healthCapacity += 0x10;
|
||||
gSaveContext.health += 0x10;
|
||||
} else {
|
||||
gSaveContext.healthCapacity -= 0x10;
|
||||
gSaveContext.health -= 0x10;
|
||||
}
|
||||
}
|
||||
if (msgCtx->ocarinaAction != OCARINA_ACTION_CHECK_NOWARP_DONE) {
|
||||
if (sLastPlayedSong == OCARINA_SONG_SARIAS) {
|
||||
|
||||
@@ -69,7 +69,13 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
PosRot sp8C;
|
||||
f32 tempRand;
|
||||
Unique9OnePointCs* csInfo = ONEPOINT_CS_INFO(csCam);
|
||||
|
||||
|
||||
// #region SOH [Enhancement]
|
||||
//the default is 90, lower values necessary to prevent camera swing as animation speeds up
|
||||
s16 camCrawlTemp = CVarGetInteger("gCrawlSpeed", 1);
|
||||
s16 camCrawlTimer = D_8012042C / camCrawlTemp;
|
||||
// #endregion
|
||||
|
||||
switch (csId) {
|
||||
case 1020:
|
||||
if (timer < 20) {
|
||||
@@ -330,13 +336,26 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
case 9601:
|
||||
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
|
||||
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
|
||||
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
|
||||
if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
|
||||
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120398);
|
||||
} else {
|
||||
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
|
||||
}
|
||||
break;
|
||||
case 9602:
|
||||
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
|
||||
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
|
||||
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
|
||||
break;
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
|
||||
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
|
||||
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
|
||||
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120434);
|
||||
break;
|
||||
// #endregion
|
||||
} else {
|
||||
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
|
||||
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
|
||||
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
|
||||
break;
|
||||
}
|
||||
case 4175:
|
||||
csInfo->keyFrames = D_8012147C;
|
||||
csInfo->keyFrameCnt = 4;
|
||||
|
||||
@@ -2278,8 +2278,13 @@ u8 Item_Give(PlayState* play, u8 item) {
|
||||
gSaveContext.sohStats.heartPieces++;
|
||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||
} else if (item == ITEM_HEART_CONTAINER) {
|
||||
gSaveContext.healthCapacity += 0x10;
|
||||
gSaveContext.health += 0x10;
|
||||
if (!CVarGetInteger("gHurtContainer", 0)) {
|
||||
gSaveContext.healthCapacity += 0x10;
|
||||
gSaveContext.health += 0x10;
|
||||
} else {
|
||||
gSaveContext.healthCapacity -= 0x10;
|
||||
gSaveContext.health -= 0x10;
|
||||
}
|
||||
gSaveContext.sohStats.heartContainers++;
|
||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||
} else if (item == ITEM_HEART) {
|
||||
@@ -3615,7 +3620,7 @@ void Interface_DrawLineupTick(PlayState* play) {
|
||||
s16 width = 32;
|
||||
s16 height = 32;
|
||||
s16 x = -8 + (SCREEN_WIDTH / 2);
|
||||
s16 y = CVarGetInteger("gOpenMenuBar", 0) ? -4 : -6;
|
||||
s16 y = -6;
|
||||
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gEmptyCDownArrowTex, width, height, x, y, width, height, 2 << 10, 2 << 10);
|
||||
|
||||
|
||||
@@ -600,13 +600,23 @@ void Player_SetModelsForHoldingShield(Player* this) {
|
||||
if ((CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
|
||||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
||||
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
|
||||
if (LINK_IS_CHILD && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][0];
|
||||
} else if (LINK_IS_ADULT && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_DEKU)) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][1];
|
||||
} else {
|
||||
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
|
||||
}
|
||||
if (this->sheathType == PLAYER_MODELTYPE_SHEATH_18) {
|
||||
this->sheathType = PLAYER_MODELTYPE_SHEATH_16;
|
||||
} else if (this->sheathType == PLAYER_MODELTYPE_SHEATH_19) {
|
||||
this->sheathType = PLAYER_MODELTYPE_SHEATH_17;
|
||||
}
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
|
||||
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_CHILD &&
|
||||
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
}
|
||||
this->modelAnimType = PLAYER_ANIMTYPE_2;
|
||||
this->itemAction = -1;
|
||||
}
|
||||
@@ -617,12 +627,40 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
||||
// Left hand
|
||||
this->leftHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_LEFT_HAND];
|
||||
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][gSaveContext.linkAge];
|
||||
|
||||
|
||||
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
|
||||
if (LINK_IS_CHILD &&
|
||||
(this->leftHandType == PLAYER_MODELTYPE_LH_HAMMER ||
|
||||
((this->leftHandType == PLAYER_MODELTYPE_LH_SWORD || this->leftHandType == PLAYER_MODELTYPE_LH_BGS) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)))) {
|
||||
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][0];
|
||||
}
|
||||
|
||||
if (LINK_IS_ADULT && (this->leftHandType == PLAYER_MODELTYPE_LH_BOOMERANG ||
|
||||
(this->leftHandType == PLAYER_MODELTYPE_LH_SWORD && gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI))) {
|
||||
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][1];
|
||||
}
|
||||
}
|
||||
|
||||
// Right hand
|
||||
this->rightHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_RIGHT_HAND];
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][gSaveContext.linkAge];
|
||||
|
||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && this->rightHandType == 11) { // If holding Bow/Slingshot
|
||||
this->rightHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_RIGHT_HAND];
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][gSaveContext.linkAge];
|
||||
|
||||
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
|
||||
if (LINK_IS_CHILD &&
|
||||
(this->rightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT ||
|
||||
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_MIRROR))) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][0];
|
||||
}
|
||||
if (LINK_IS_ADULT &&
|
||||
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_DEKU)) {
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][1];
|
||||
}
|
||||
}
|
||||
if ((CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && this->rightHandType == 11) { // If holding Bow/Slingshot
|
||||
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][Player_HoldsSlingshot(this)];
|
||||
}
|
||||
|
||||
@@ -630,6 +668,23 @@ void Player_SetModels(Player* this, s32 modelGroup) {
|
||||
this->sheathType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
|
||||
|
||||
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
|
||||
if (LINK_IS_CHILD &&
|
||||
(this->currentShield == PLAYER_SHIELD_HYLIAN || this->currentShield == PLAYER_SHIELD_MIRROR) &&
|
||||
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
} else if (LINK_IS_CHILD && this->currentShield == PLAYER_SHIELD_MIRROR && gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KOKIRI &&
|
||||
this->sheathType == PLAYER_MODELTYPE_SHEATH_18) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
} else if (LINK_IS_ADULT && this->currentShield == PLAYER_SHIELD_DEKU) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][1];
|
||||
} else if (LINK_IS_CHILD && this->sheathType == PLAYER_MODELTYPE_SHEATH_17 &&
|
||||
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) || (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) {
|
||||
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
|
||||
}
|
||||
}
|
||||
|
||||
// Waist
|
||||
this->waistDLists = &sPlayerDListGroups[gPlayerModelTypes[modelGroup][4]][gSaveContext.linkAge];
|
||||
|
||||
@@ -1187,6 +1242,42 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
|
||||
|
||||
s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0) && CVarGetInteger("gEnhancements.ScaleAdultEquimentAsChild", 0) && LINK_IS_CHILD) {
|
||||
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI && sLeftHandType == PLAYER_MODELTYPE_LH_SWORD) ||
|
||||
(sLeftHandType == PLAYER_MODELTYPE_LH_BGS) || (sLeftHandType == PLAYER_MODELTYPE_LH_HAMMER)) {
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
if (limbIndex == PLAYER_LIMB_R_HAND) {
|
||||
if ((this->currentShield == PLAYER_SHIELD_MIRROR && sRightHandType == PLAYER_MODELTYPE_RH_SHIELD) ||
|
||||
(this->currentShield == PLAYER_SHIELD_HYLIAN && (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER ||
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS)) || (sRightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT) ||
|
||||
(sRightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT && Player_HoldsBow(this))) {
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
if (limbIndex == PLAYER_LIMB_SHEATH) {
|
||||
if ((this->currentShield == PLAYER_SHIELD_MIRROR ||
|
||||
(this->currentShield == PLAYER_SHIELD_HYLIAN &&
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER ||
|
||||
gSaveContext.equips.buttonItems[0] == ITEM_SWORD_BGS))) &&
|
||||
((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17) ||
|
||||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_18) ||
|
||||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_19))) {
|
||||
Matrix_Translate(218, -100, 62, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
if ((this->currentShield == PLAYER_SHIELD_DEKU &&
|
||||
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI &&
|
||||
(this->sheathType == PLAYER_MODELTYPE_SHEATH_16 ||
|
||||
this->sheathType == PLAYER_MODELTYPE_SHEATH_17))) {
|
||||
Matrix_Translate(218, -100, 62, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (limbIndex == PLAYER_LIMB_ROOT) {
|
||||
sLeftHandType = this->leftHandType;
|
||||
@@ -1305,9 +1396,11 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||
dLists += PLAYER_SHIELD_MAX * 4;
|
||||
}
|
||||
} else if (!LINK_IS_ADULT && ((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17)) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||
dLists = &sSheathWithSwordDLs[PLAYER_SHIELD_MAX * 4];
|
||||
} else if (!CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
|
||||
if (!LINK_IS_ADULT && ((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17)) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||
dLists = &sSheathWithSwordDLs[PLAYER_SHIELD_MAX * 4];
|
||||
}
|
||||
}
|
||||
|
||||
if (dLists[sDListsLodOffset] != NULL) {
|
||||
@@ -1345,7 +1438,7 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
|
||||
*dList = sFirstPersonLeftForearmDLs[gSaveContext.linkAge];
|
||||
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
s32 handOutDlIndex = gSaveContext.linkAge;
|
||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
|
||||
if ((CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
|
||||
handOutDlIndex = 1;
|
||||
}
|
||||
*dList = sFirstPersonLeftHandDLs[handOutDlIndex];
|
||||
@@ -1355,7 +1448,7 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
|
||||
*dList = sFirstPersonForearmDLs[gSaveContext.linkAge];
|
||||
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
|
||||
s32 firstPersonWeaponIndex = gSaveContext.linkAge;
|
||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0)) {
|
||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
|
||||
if (Player_HoldsBow(this)) {
|
||||
firstPersonWeaponIndex = 0;
|
||||
} else if (Player_HoldsSlingshot(this)) {
|
||||
@@ -1759,7 +1852,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
||||
Matrix_Get(&this->shieldMf);
|
||||
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT) || (this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2)) {
|
||||
s32 stringModelToUse = gSaveContext.linkAge;
|
||||
if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){
|
||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
|
||||
stringModelToUse = Player_HoldsSlingshot(this);
|
||||
}
|
||||
BowStringData* stringData = &sBowStringData[stringModelToUse];
|
||||
|
||||
@@ -83,9 +83,10 @@ void Object_UpdateBank(ObjectContext* objectCtx) {
|
||||
RomFile* objectFile;
|
||||
size_t size;
|
||||
|
||||
/*
|
||||
|
||||
for (i = 0; i < objectCtx->num; i++) {
|
||||
if (status->id < 0) {
|
||||
/*
|
||||
if (status->dmaRequest.vromAddr == 0) {
|
||||
osCreateMesgQueue(&status->loadQueue, &status->loadMsg, 1);
|
||||
objectFile = &gObjectTable[-status->id];
|
||||
@@ -96,10 +97,12 @@ void Object_UpdateBank(ObjectContext* objectCtx) {
|
||||
} else if (!osRecvMesg(&status->loadQueue, NULL, OS_MESG_NOBLOCK)) {
|
||||
status->id = -status->id;
|
||||
}
|
||||
*/
|
||||
status->id = -status->id;
|
||||
}
|
||||
status++;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId) {
|
||||
|
||||
Reference in New Issue
Block a user