working horse yay

This commit is contained in:
William Kirk 2022-04-29 19:14:00 -05:00
parent b57a6ecdec
commit 3df6d950a8
30 changed files with 365 additions and 610 deletions

View File

@ -1,4 +1,8 @@
const char gBuildVersion[] = "DECKARD ALFA (1.0.0)";
const char gBuildTeam[] = "github.com/harbourmasters";
#ifdef __TIMESTAMP__
const char gBuildDate[] = __TIMESTAMP__;
#else
const char gBuildDate[] = __DATE__ " " __TIME__;
#endif
const char gBuildMakeOption[] = "";

View File

@ -381,11 +381,6 @@ void GameState_Update(GameState* gameState) {
gSaveContext.magic = (gSaveContext.doubleMagic + 1) * 0x30;
}
}
// Inf Nayru's Love Timer
if (CVar_GetS32("gInfiniteNayru", 0) != 0) {
gSaveContext.nayrusLoveTimer = 0x44B;
}
// Moon Jump On L
if (CVar_GetS32("gMoonJumpOnL", 0) != 0) {
@ -398,32 +393,6 @@ void GameState_Update(GameState* gameState) {
}
}
// Permanent infinite sword glitch (ISG)
if (CVar_GetS32("gEzISG", 0) != 0) {
if (gGlobalCtx) {
Player* player = GET_PLAYER(gGlobalCtx);
player->swordState = 1;
}
}
// Unrestricted Items
if (CVar_GetS32("gNoRestrictItems", 0) != 0) {
if (gGlobalCtx) {
memset(&gGlobalCtx->interfaceCtx.restrictions, 0, sizeof(gGlobalCtx->interfaceCtx.restrictions));
}
}
// Freeze Time
if (CVar_GetS32("gFreezeTime", 0) != 0) {
if (CVar_GetS32("gPrevTime", -1) == -1) {
CVar_SetS32("gPrevTime", gSaveContext.dayTime);
}
int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime);
gSaveContext.dayTime = prevTime;
}
gameState->frames++;
}

View File

@ -95,14 +95,12 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) {
pool->tailMagic = GFXPOOL_TAIL_MAGIC;
THGA_Ct(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer));
THGA_Ct(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer));
THGA_Ct(&gfxCtx->titlecard, pool->titlecardBuffer, sizeof(pool->titlecardBuffer));
THGA_Ct(&gfxCtx->polyKal, pool->polyKalBuffer, sizeof(pool->polyKalBuffer));
THGA_Ct(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer));
THGA_Ct(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer));
gfxCtx->polyOpaBuffer = pool->polyOpaBuffer;
gfxCtx->polyXluBuffer = pool->polyXluBuffer;
gfxCtx->titlecardBuffer = pool->titlecardBuffer;
gfxCtx->polyKalBuffer = pool->polyKalBuffer;
gfxCtx->overlayBuffer = pool->overlayBuffer;
gfxCtx->workBuffer = pool->workBuffer;
@ -276,7 +274,6 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0);
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0);
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0);
gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 開始", 0);//unsure if needed
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0);
CLOSE_DISPS(gfxCtx, "../graph.c", 975);
@ -289,7 +286,6 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0);
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0);
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0);
gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 終了", 0);
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0);
CLOSE_DISPS(gfxCtx, "../graph.c", 996);
@ -298,8 +294,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer);
gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer);
gSPBranchList(POLY_XLU_DISP++, gfxCtx->titlecardBuffer);
gSPBranchList(TITLE_CARD_DISP++, gfxCtx->polyKalBuffer);
gSPBranchList(POLY_XLU_DISP++, gfxCtx->polyKalBuffer);
gSPBranchList(POLY_KAL_DISP++, gfxCtx->overlayBuffer);
gDPPipeSync(OVERLAY_DISP++);
gDPFullSync(OVERLAY_DISP++);
@ -450,6 +445,7 @@ static void RunFrame()
while (runFrameContext.nextOvl)
{
runFrameContext.ovl = runFrameContext.nextOvl;
Overlay_LoadGameState(runFrameContext.ovl);

View File

@ -269,7 +269,7 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y);
}
controllerCallback.rumble = CVar_GetS32("gRumbleEnabled", 0) && (padMgr->rumbleEnable[0] > 0);
controllerCallback.rumble = padMgr->rumbleEnable[0] > 0 ? 1 : 0;
if (HealthMeter_IsCritical()) {
controllerCallback.ledColor = 0;
@ -303,11 +303,6 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
}
osRecvMesg(queue, NULL, OS_MESG_BLOCK);
osContGetReadData(padMgr->pads);
for (i = 0; i < __osMaxControllers; i++) {
padMgr->padStatus[i].status = CVar_GetS32("gRumbleEnabled", 0) && Controller_ShouldRumble(i);
}
if (padMgr->preNMIShutdown) {
memset(padMgr->pads, 0, sizeof(padMgr->pads));
}

View File

@ -334,38 +334,6 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, GlobalContext* g
void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, GlobalContext* globalCtx) {
NaviColor* naviColor = &sNaviColorList[actorCategory];
if (actorCategory == ACTORCAT_PLAYER) {
naviColor->inner.r = CVar_GetS32("gNavi_Idle_Inner_Red", naviColor->inner.r);
naviColor->inner.g = CVar_GetS32("gNavi_Idle_Inner_Green", naviColor->inner.g);
naviColor->inner.b = CVar_GetS32("gNavi_Idle_Inner_Blue", naviColor->inner.b);
naviColor->outer.r = CVar_GetS32("gNavi_Idle_Outer_Red", naviColor->outer.r);
naviColor->outer.g = CVar_GetS32("gNavi_Idle_Outer_Green", naviColor->outer.g);
naviColor->outer.b = CVar_GetS32("gNavi_Idle_Outer_Blue", naviColor->outer.b);
}
if (actorCategory == ACTORCAT_NPC) {
naviColor->inner.r = CVar_GetS32("gNavi_NPC_Inner_Red", naviColor->inner.r);
naviColor->inner.g = CVar_GetS32("gNavi_NPC_Inner_Green", naviColor->inner.g);
naviColor->inner.b = CVar_GetS32("gNavi_NPC_Inner_Blue", naviColor->inner.b);
naviColor->outer.r = CVar_GetS32("gNavi_NPC_Outer_Red", naviColor->outer.r);
naviColor->outer.g = CVar_GetS32("gNavi_NPC_Outer_Green", naviColor->outer.g);
naviColor->outer.b = CVar_GetS32("gNavi_NPC_Outer_Blue", naviColor->outer.b);
}
if (actorCategory == ACTORCAT_BOSS || actorCategory == ACTORCAT_ENEMY) {
naviColor->inner.r = CVar_GetS32("gNavi_Enemy_Inner_Red", naviColor->inner.r);
naviColor->inner.g = CVar_GetS32("gNavi_Enemy_Inner_Green", naviColor->inner.g);
naviColor->inner.b = CVar_GetS32("gNavi_Enemy_Inner_Blue", naviColor->inner.b);
naviColor->outer.r = CVar_GetS32("gNavi_Enemy_Outer_Red", naviColor->outer.r);
naviColor->outer.g = CVar_GetS32("gNavi_Enemy_Outer_Green", naviColor->outer.g);
naviColor->outer.b = CVar_GetS32("gNavi_Enemy_Outer_Blue", naviColor->outer.b);
}
if (actorCategory == ACTORCAT_PROP) {
naviColor->inner.r = CVar_GetS32("gNavi_Prop_Inner_Red", naviColor->inner.r);
naviColor->inner.g = CVar_GetS32("gNavi_Prop_Inner_Green", naviColor->inner.g);
naviColor->inner.b = CVar_GetS32("gNavi_Prop_Inner_Blue", naviColor->inner.b);
naviColor->outer.r = CVar_GetS32("gNavi_Prop_Outer_Red", naviColor->outer.r);
naviColor->outer.g = CVar_GetS32("gNavi_Prop_Outer_Green", naviColor->outer.g);
naviColor->outer.b = CVar_GetS32("gNavi_Prop_Outer_Blue", naviColor->outer.b);
}
targetCtx->naviRefPos.x = actor->focus.pos.x;
targetCtx->naviRefPos.y = actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y);
targetCtx->naviRefPos.z = actor->focus.pos.z;
@ -1009,6 +977,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
s32 doubleWidth;
s32 titleY;
s32 titleSecondY;
s32 textureLanguageOffset;
if (titleCtx->alpha != 0) {
width = titleCtx->width;
@ -1019,34 +988,33 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2824);
textureLanguageOffset = width * height * gSaveContext.language;
height = (width * height > 0x1000) ? 0x1000 / width : height;
titleSecondY = titleY + (height * 4);
//TITLE_CARD_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP
TITLE_CARD_DISP = func_80093808(TITLE_CARD_DISP);
OVERLAY_DISP = func_80093808(OVERLAY_DISP);
gDPSetPrimColor(TITLE_CARD_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
(u8)titleCtx->alpha);
gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture, G_IM_FMT_IA,
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA,
G_IM_SIZ_8b,
width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
height = titleCtx->height - height;
// If texture is bigger than 0x1000, display the rest
if (height > 0) {
gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + 0x1000,
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000,
G_IM_FMT_IA,
G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
}
@ -1958,7 +1926,7 @@ u32 Actor_SetRideActor(GlobalContext* globalCtx, Actor* horse, s32 mountSide) {
return false;
}
s32 Actor_NotMounted(GlobalContext* globalCtx, Actor* horse) {
s32 Actor_NotMounted(GlobalContext* globalCtx, Actor* horse) {
if (horse->child == NULL) {
return true;
} else {

View File

@ -56,8 +56,7 @@ void func_801109B0(GlobalContext* globalCtx) {
doActionOffset = 0x5700;
}
memcpy(interfaceCtx->doActionSegment, ResourceMgr_LoadTexByName(gAttackDoActionENGTex), 0x180);
memcpy(interfaceCtx->doActionSegment + 0x180, ResourceMgr_LoadTexByName(gCheckDoActionENGTex), 0x180);
memcpy(interfaceCtx->doActionSegment, ResourceMgr_LoadTexByName(gAttackDoActionENGTex), 0x300);
//DmaMgr_SendRequest1(interfaceCtx->doActionSegment, (uintptr_t)_do_action_staticSegmentRomStart + doActionOffset, 0x300,
//"../z_construct.c", 174);

View File

@ -5,9 +5,6 @@
#define FLAGS 0
//Used to force variable to be used in different function, feel free to correct me if you have a better way
static s16 DroppedItemRot = 0;
void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx);
void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx);
@ -358,34 +355,11 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
switch (this->actor.params) {
case ITEM00_RUPEE_GREEN:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.3f);
this->scale = 0.3f;
yOffset = 50.0f;
shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_RUPEE_BLUE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.3f);
this->scale = 0.3f;
yOffset = 50.0f;
shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000;
}
case ITEM00_RUPEE_RED:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.3f);
this->scale = 0.3f;
yOffset = 50.0f;
shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000;
} else {
Actor_SetScale(&this->actor, 0.015f);
this->scale = 0.015f;
yOffset = 750.0f;
}
Actor_SetScale(&this->actor, 0.015f);
this->scale = 0.015f;
yOffset = 750.0f;
break;
case ITEM00_SMALL_KEY:
this->unk_158 = 0;
@ -400,18 +374,10 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
this->scale = 0.02f;
break;
case ITEM00_HEART:
if (CVar_GetS32("gNewDrops", 0) !=0) {
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
yOffset = 25.0f;
Actor_SetScale(&this->actor, 0.3f);
this->scale = 0.3f;
shadowScale = 0.5f;
} else {
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
yOffset = 430.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
yOffset = 430.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
break;
case ITEM00_HEART_CONTAINER:
yOffset = 430.0f;
@ -420,154 +386,42 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
this->scale = 0.02f;
break;
case ITEM00_ARROWS_SINGLE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
} else {
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
}
break;
yOffset = 400.0f;
Actor_SetScale(&this->actor, 0.02f);
this->scale = 0.02f;
break;
case ITEM00_ARROWS_SMALL:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_ARROWS_MEDIUM:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_ARROWS_LARGE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
} else {
Actor_SetScale(&this->actor, 0.035f);
this->scale = 0.035f;
yOffset = 250.0f;
}
break;
Actor_SetScale(&this->actor, 0.035f);
this->scale = 0.035f;
yOffset = 250.0f;
break;
case ITEM00_BOMBS_A:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_BOMBS_B:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_NUTS:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_STICK:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_MAGIC_SMALL:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_SEEDS:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
break;
}
case ITEM00_BOMBS_SPECIAL:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
} else {
Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f;
yOffset = 320.0f;
}
break;
Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f;
yOffset = 320.0f;
break;
case ITEM00_MAGIC_LARGE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.2f);
this->scale = 0.2f;
yOffset = 50.0f;
shadowScale = 0.5f;
this->actor.world.rot.x = 0x4000;
} else {
Actor_SetScale(&this->actor, 0.045 - 1e-10);
this->scale = 0.045 - 1e-10;
yOffset = 320.0f;
}
break;
Actor_SetScale(&this->actor, 0.045 - 1e-10);
this->scale = 0.045 - 1e-10;
yOffset = 320.0f;
break;
case ITEM00_RUPEE_ORANGE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.45f);
this->scale = 0.45f;
yOffset = 50.0f;
shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000;
} else {
Actor_SetScale(&this->actor, 0.045 - 1e-10);
this->scale = 0.045 - 1e-10;
yOffset = 750.0f;
}
Actor_SetScale(&this->actor, 0.045 - 1e-10);
this->scale = 0.045 - 1e-10;
yOffset = 750.0f;
break;
case ITEM00_RUPEE_PURPLE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
Actor_SetScale(&this->actor, 0.4f);
this->scale = 0.4f;
yOffset = 50.0f;
shadowScale = 0.3f;
this->actor.world.rot.x = 0x4000;
} else {
Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f;
yOffset = 750.0f;
}
Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f;
yOffset = 750.0f;
break;
case ITEM00_FLEXIBLE:
yOffset = 500.0f;
@ -704,19 +558,6 @@ void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_8001DFC8(EnItem00* this, GlobalContext* globalCtx) {
if (CVar_GetS32("gNewDrops", 0) !=0) { //set the rotation system on selected model only :)
if ((this->actor.params == ITEM_RUPEE_GOLD) || (this->actor.params == ITEM_RUPEE_PURPLE) ||
(this->actor.params == ITEM00_ARROWS_SINGLE) || (this->actor.params == ITEM00_ARROWS_SMALL) ||
(this->actor.params == ITEM00_ARROWS_MEDIUM) || (this->actor.params == ITEM00_ARROWS_LARGE) ||
(this->actor.params == ITEM00_BOMBS_A) || (this->actor.params == ITEM00_BOMBS_B) ||
(this->actor.params == ITEM00_NUTS) || (this->actor.params == ITEM00_STICK) ||
(this->actor.params == ITEM00_MAGIC_SMALL) || (this->actor.params == ITEM00_SEEDS) ||
(this->actor.params == ITEM00_MAGIC_LARGE) || (this->actor.params == ITEM00_HEART) || (this->actor.params == ITEM00_BOMBS_SPECIAL)) {
this->actor.shape.rot.y = DroppedItemRot;
}
}
if ((this->actor.params <= ITEM00_RUPEE_RED) || ((this->actor.params == ITEM00_HEART) && (this->unk_15A < 0)) ||
(this->actor.params == ITEM00_HEART_PIECE)) {
this->actor.shape.rot.y += 960;
@ -890,10 +731,6 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
EnItem00* this = (EnItem00*)thisx;
s32 pad;
if (CVar_GetS32("gNewDrops", 0) !=0) { //Update 3D Model rotation on frame update :)
DroppedItemRot += 100;
}
if (this->unk_15A > 0) {
this->unk_15A--;
}
@ -1097,35 +934,15 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnItem00* this = (EnItem00*)thisx;
f32 mtxScale;
if (!(this->unk_156 & this->unk_158)) {
switch (this->actor.params) {
case ITEM00_RUPEE_GREEN:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_GREEN);
break;
}
case ITEM00_RUPEE_BLUE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_BLUE);
break;
}
case ITEM00_RUPEE_RED:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_RED);
break;
}
case ITEM00_RUPEE_ORANGE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_GOLD);
break;
}
case ITEM00_RUPEE_PURPLE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_RUPEE_PURPLE);
} else {
EnItem00_DrawRupee(this, globalCtx);
}
EnItem00_DrawRupee(this, globalCtx);
break;
case ITEM00_HEART_PIECE:
EnItem00_DrawHeartPiece(this, globalCtx);
@ -1134,85 +951,34 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnItem00_DrawHeartContainer(this, globalCtx);
break;
case ITEM00_HEART:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_HEART);
mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
break;
} else {
if (this->unk_15A < 0) {
if (this->unk_15A == -1) {
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
this->actor.objBankIndex = bankIndex;
Actor_SetObjectDependency(globalCtx, &this->actor);
this->unk_15A = -2;
}
} else {
mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(globalCtx, GID_HEART);
}
break;
}
if (this->unk_15A < 0) {
if (this->unk_15A == -1) {
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
this->actor.objBankIndex = bankIndex;
Actor_SetObjectDependency(globalCtx, &this->actor);
this->unk_15A = -2;
}
} else {
mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(globalCtx, GID_HEART);
}
break;
}
case ITEM00_BOMBS_A:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_BOMB);
break;
}
case ITEM00_BOMBS_B:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_BOMB);
break;
}
case ITEM00_BOMBS_SPECIAL:
case ITEM00_ARROWS_SINGLE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
break;
}
case ITEM00_ARROWS_SMALL:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
break;
}
case ITEM00_ARROWS_MEDIUM:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM);
break;
}
case ITEM00_ARROWS_LARGE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_ARROWS_LARGE);
break;
}
case ITEM00_NUTS:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_NUTS);
break;
}
case ITEM00_STICK:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_STICK);
break;
}
case ITEM00_MAGIC_LARGE:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_MAGIC_LARGE);
break;
}
case ITEM00_MAGIC_SMALL:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_MAGIC_SMALL);
break;
}
case ITEM00_SEEDS:
if (CVar_GetS32("gNewDrops", 0) !=0) {
GetItem_Draw(globalCtx, GID_SEEDS);
break;
}
case ITEM00_SMALL_KEY:
EnItem00_DrawCollectible(this, globalCtx);
break;

View File

@ -56,6 +56,8 @@ void TransitionCircle_Start(void* thisx) {
break;
}
this->texture = ResourceMgr_LoadTexByName(this->texture);
if (this->speed == 0) {
this->step = 0x14;
} else {

View File

@ -47,7 +47,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
{ SCENE_SPOT20, 928, 0, -2280, 0, 2 },
};
if ((AREG(6) != 0) && (Flags_GetEventChkInf(0x18) || (DREG(1) != 0))) {
if (((AREG(6) != 0) && ((Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) || !LINK_IS_ADULT))) { //ugh
player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, player->actor.world.pos.x,
player->actor.world.pos.y, player->actor.world.pos.z, player->actor.shape.rot.x,
player->actor.shape.rot.y, player->actor.shape.rot.z, 9);
@ -71,13 +71,13 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
Actor* horseActor =
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 389);
} else if ((globalCtx->sceneNum == gSaveContext.horseData.scene) &&
} else if ((globalCtx->sceneNum == gSaveContext.horseData.scene) && //this looks promising william
(Flags_GetEventChkInf(0x18) != 0 || DREG(1) != 0)) {
// "Set by existence of horse %d %d %d"
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(0x18),
DREG(1));
if (func_8006CFC0(gSaveContext.horseData.scene)) {
if (func_8006CFC0(gSaveContext.horseData.scene)) { //if in the correct scene
Actor* horseActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE,
gSaveContext.horseData.pos.x, gSaveContext.horseData.pos.y,
gSaveContext.horseData.pos.z, 0, gSaveContext.horseData.angle, 0, 1);
@ -96,7 +96,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
Actor* horseActor =
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 443);
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) {
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0) || !LINK_IS_ADULT) { //THIS DID IT OH MY GOD WILLIAM
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
HorseSpawn* horseSpawn = &horseSpawns[i];
if (horseSpawn->scene == globalCtx->sceneNum) {
@ -171,7 +171,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
if (globalCtx->sceneNum == SCENE_SPOT12) {
player->rideActor->room = -1;
}
} else {
} else { //I THIKN THIS SPAWNS THE OPENING CUTSCENE
static struct_8011F9B8 D_8011F9B8[] = {
{ 93, 0xFFF0, 0x0E10, 0x0585, 0x0168, 0x8001, 8 }, { 99, 0xFFF0, 0xFF06, 0x0001, 0xF9D4, 0x4000, 6 },
{ 99, 0xFFF1, 0x0000, 0x0000, 0x0000, 0x0000, 5 }, { 99, 0xFFF5, 0x0000, 0x0000, 0x0000, 0x0000, 7 },
@ -235,28 +235,29 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
}
void func_8006DC68(GlobalContext* globalCtx, Player* player) {
if (LINK_IS_ADULT) {
if (!func_8006CFC0(gSaveContext.horseData.scene)) {
osSyncPrintf(VT_COL(RED, WHITE));
// "Horse_Set_Check():%d set spot is no good."
osSyncPrintf("Horse_Set_Check():%d セットスポットまずいです。\n", gSaveContext.horseData.scene);
osSyncPrintf(VT_RST);
func_8006D074(globalCtx);
}
//if (LINK_IS_ADULT) {
if (!func_8006CFC0(gSaveContext.horseData.scene)) {
osSyncPrintf(VT_COL(RED, WHITE));
// "Horse_Set_Check():%d set spot is no good."
osSyncPrintf("Horse_Set_Check():%d セットスポットまずいです。\n", gSaveContext.horseData.scene);
osSyncPrintf(VT_RST);
func_8006D074(globalCtx);
}
if (func_8006CFC0(globalCtx->sceneNum)) {
if ((gSaveContext.sceneSetupIndex > 3) ||
((gSaveContext.entranceIndex == 0x028A || gSaveContext.entranceIndex == 0x028E ||
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
(gSaveContext.respawnFlag == 0)) ||
((globalCtx->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
!Flags_GetEventChkInf(0x18) && (DREG(1) == 0))) {
func_8006D684(globalCtx, player);
} else {
func_8006D0EC(globalCtx, player);
}
if (func_8006CFC0(globalCtx->sceneNum)) {
if ((gSaveContext.sceneSetupIndex > 3) ||
((gSaveContext.entranceIndex == 0x028A || gSaveContext.entranceIndex == 0x028E ||
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
(gSaveContext.respawnFlag == 0)) ||
((globalCtx->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
!Flags_GetEventChkInf(0x18) && (DREG(1) == 0))) {
func_8006D684(globalCtx, player);
} else {
func_8006D0EC(globalCtx, player);
}
}
//}
}
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2) {

View File

@ -664,7 +664,6 @@ void Minimap_Draw(GlobalContext* globalCtx) {
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha);
gSPInvalidateTexCache(OVERLAY_DISP++, interfaceCtx->mapSegment);
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

View File

@ -166,7 +166,7 @@ void Message_UpdateOcarinaGame(GlobalContext* globalCtx) {
u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
Input* input = &globalCtx->state.input[0];
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
: CHECK_BTN_ALL(input->press.button, BTN_B);
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
@ -178,7 +178,7 @@ u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
u8 Message_ShouldAdvanceSilent(GlobalContext* globalCtx) {
Input* input = &globalCtx->state.input[0];
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
: CHECK_BTN_ALL(input->press.button, BTN_B);
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
@ -391,7 +391,7 @@ void Message_FindCreditsMessage(GlobalContext* globalCtx, u16 textId) {
if (messageTableEntry->textId == textId) {
foundSeg = messageTableEntry->segment;
font->charTexBuf[0] = messageTableEntry->typePos;
//messageTableEntry++;
messageTableEntry++;
nextSeg = messageTableEntry->segment;
font->msgOffset = messageTableEntry->segment;
font->msgLength = messageTableEntry->msgSize;
@ -951,7 +951,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
}
}
i = j - 1;
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
msgCtx->textDrawPos = i + 1;
if (character) {}
}
@ -1061,7 +1061,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
break;
case MESSAGE_UNSKIPPABLE:
msgCtx->textUnskippable = CVar_GetS32("gSkipText", 0) != 1;
msgCtx->textUnskippable = CVar_GetS32("gFastText", 0) != 1;
break;
case MESSAGE_TWO_CHOICE:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
@ -1096,7 +1096,6 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
*gfxP = gfx;
return;
case MESSAGE_OCARINA:
msgCtx->textDrawPos = i + 1;
if (i + 1 == msgCtx->textDrawPos) {
Message_HandleOcarina(globalCtx);
*gfxP = gfx;
@ -2027,7 +2026,7 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0);
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B)
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B)
: CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B);
switch (msgCtx->msgMode) {
@ -2472,7 +2471,7 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
}
} else {
Message_CloseTextbox(globalCtx);
if (msgCtx->lastPlayedSong == OCARINA_SONG_EPONAS) {
if (msgCtx->lastPlayedSong == OCARINA_SONG_EPONAS) { //William
DREG(53) = 1;
}
osSyncPrintf(VT_FGCOL(YELLOW));
@ -3068,7 +3067,7 @@ void Message_Update(GlobalContext* globalCtx) {
return;
}
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
: CHECK_BTN_ALL(input->press.button, BTN_B);
switch (msgCtx->msgMode) {

View File

@ -3129,14 +3129,6 @@ void Interface_Draw(GlobalContext* globalCtx) {
};
static s16 rupeeDigitsFirst[] = { 1, 0, 0 };
static s16 rupeeDigitsCount[] = { 2, 3, 3 };
// courtesy of https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/ASM/c/hud_colors.c
static s16 rupeeWalletColors[3][3] = {
{ 0xC8, 0xFF, 0x64 }, // Base Wallet (Green)
{ 0x82, 0x82, 0xFF }, // Adult's Wallet (Blue)
{ 0xFF, 0x64, 0x64 }, // Giant's Wallet (Red)
};
static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 };
static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
static s16 D_80125B5C[] = { 91, 91 }; // unused
@ -3179,15 +3171,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
if (fullUi) {
// Rupee Icon
s16* rColor;
if (CVar_GetS32("gDynamicWalletIcon", 0)) {
rColor = &rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)];
} else {
rColor = &rupeeWalletColors[0];
}
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor[0], rColor[1], rColor[2], interfaceCtx->magicAlpha);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha);
gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255);
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26),
206, 16, 16, 1 << 10, 1 << 10);
@ -3285,7 +3269,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]), 8, 16,
OTRGetRectDimensionFromLeftEdge(svar3), 206, 8, 16, 1 << 10, 1 << 10);
}
}
}
else {
// Make sure item counts have black backgrounds
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, interfaceCtx->magicAlpha);

View File

@ -1119,7 +1119,6 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
gfxP = Graph_GfxPlusOne(sp1CC);
gSPDisplayList(OVERLAY_DISP++, gfxP);
gsSPGrayscale(gfxP++, false);
if ((globalCtx->transitionMode == 3) || (globalCtx->transitionMode == 11) ||
(globalCtx->transitionCtx.transitionType >= 56)) {
@ -1137,8 +1136,8 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
TransitionFade_Draw(&globalCtx->transitionFade, &gfxP);
if (D_801614B0.a > 0) {
gsDPSetGrayscaleColor(gfxP++, D_801614B0.r, D_801614B0.g, D_801614B0.b, D_801614B0.a);
gsSPGrayscale(gfxP++, true);
D_80161498.primColor.rgba = D_801614B0.rgba;
VisMono_Draw(&D_80161498, &gfxP);
}
gSPEndDisplayList(gfxP++);
@ -1172,7 +1171,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
//goto Gameplay_Draw_DrawOverlayElements;
}
//else
//else
{
s32 sp80;
@ -1473,7 +1472,7 @@ void Gameplay_InitEnvironment(GlobalContext* globalCtx, s16 skyboxId) {
Environment_Init(globalCtx, &globalCtx->envCtx, 0);
}
void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn)
void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn)
{
globalCtx->curSpawn = spawn;
globalCtx->linkActorEntry = NULL;

View File

@ -743,27 +743,8 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
#else
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[eyeIndex]));
#endif
if (tunic == PLAYER_TUNIC_KOKIRI) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", &sTunicColors[PLAYER_TUNIC_KOKIRI].r),
CVar_GetS32("gTunic_Kokiri_Green", &sTunicColors[PLAYER_TUNIC_KOKIRI].g),
CVar_GetS32("gTunic_Kokiri_Blue", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) };
color = &sTemp;
} else if (tunic == PLAYER_TUNIC_GORON) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Goron_Red", &sTunicColors[PLAYER_TUNIC_GORON].r),
CVar_GetS32("gTunic_Goron_Green", &sTunicColors[PLAYER_TUNIC_GORON].g),
CVar_GetS32("gTunic_Goron_Blue", &sTunicColors[PLAYER_TUNIC_GORON].b) };
color = &sTemp;
} else if (tunic == PLAYER_TUNIC_ZORA) {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Zora_Red", &sTunicColors[PLAYER_TUNIC_ZORA].r),
CVar_GetS32("gTunic_Zora_Green", &sTunicColors[PLAYER_TUNIC_ZORA].g),
CVar_GetS32("gTunic_Zora_Blue", &sTunicColors[PLAYER_TUNIC_ZORA].b) };
color = &sTemp;
} else {
Color_RGB8 sTemp = { CVar_GetS32("gTunic_Kokiri_Red", &sTunicColors[PLAYER_TUNIC_KOKIRI].r),
CVar_GetS32("gTunic_Kokiri_Green", &sTunicColors[PLAYER_TUNIC_KOKIRI].g),
CVar_GetS32("gTunic_Kokiri_Blue", &sTunicColors[PLAYER_TUNIC_KOKIRI].b) };
color = &sTemp;
}
color = &sTunicColors[tunic];
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
sDListsLodOffset = lod * 2;

View File

@ -816,10 +816,8 @@ EntranceInfo gEntranceTable[] = {
// (u32)_##title##SegmentRomEnd, unk_10, config, unk_12, 0 \
// }
#define TITLED_SCENE(name, title, unk_10, config, unk_12) \
{ \
{0, 0, #name}, {0, 0, #title}, unk_10, config, unk_12, 0 \
}
#define TITLED_SCENE(name, title, unk_10, config, unk_12) \
{ { 0, 0, #name }, { 0, 0, #title }, unk_10, config, unk_12, 0 }
//#define UNTITLED_SCENE(name, unk_10, config, unk_12) \
//{ (u32) _##name##SegmentRomStart, (u32)_##name##SegmentRomEnd, 0, 0, unk_10, config, unk_12, 0 }
@ -2445,7 +2443,7 @@ void func_8009FE58(GlobalContext* globalCtx) {
}
break;
}
if (globalCtx->pauseCtx.state == 0) {
D_8012A398 += 0.15f + (globalCtx->roomCtx.unk_74[1] * 0.001f);
}

View File

@ -378,6 +378,7 @@ void Sram_OpenSave(SramContext* sramCtx) {
}
break;
}
}
osSyncPrintf("scene_no = %d\n", gSaveContext.entranceIndex);

View File

@ -496,7 +496,7 @@ void EnExItem_DrawMagic(EnExItem* this, GlobalContext* globalCtx, s16 magicIndex
}
void EnExItem_DrawKey(EnExItem* this, GlobalContext* globalCtx, s32 index) {
static void* keySegments[] = { gDropKeySmallTex };
static s32 keySegments[] = { 0x0403F140 };
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_item.c", 880);

View File

@ -9,6 +9,10 @@
#include "objects/object_horse/object_horse.h"
#include "objects/object_hni/object_hni.h"
#include "scenes/overworld/spot09/spot09_scene.h"
//#include "z_en_horse_link_child.h"
#include "objects/object_horse_link_child/object_horse_link_child.h"
//#include "z_en_horse_ganon.h"
#include "objects/object_horse_ganon/object_horse_ganon.h"
#define FLAGS ACTOR_FLAG_4
@ -49,18 +53,33 @@ void EnHorse_CutsceneUpdate(EnHorse* this, GlobalContext* globalCtx);
void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx);
void EnHorse_FleePlayer(EnHorse* this, GlobalContext* globalCtx);
static AnimationHeader* sEponaAnimHeaders[] = {
static AnimationHeader* sEponaAnimHeaders[] = {
&gEponaIdleAnim, &gEponaWhinnyAnim, &gEponaRefuseAnim, &gEponaRearingAnim, &gEponaWalkingAnim,
&gEponaTrottingAnim, &gEponaGallopingAnim, &gEponaJumpingAnim, &gEponaJumpingHighAnim,
};
/*AnimationHeader* sEponaAnimHeaders[] = {
&gChildEponaIdleAnim, &gChildEponaWhinnyAnim, &gEponaRefuseAnim, &gEponaRearingAnim, &gChildEponaWalkingAnim,
&gChildEponaTrottingAnim, &gChildEponaGallopingAnim, &gEponaJumpingAnim, &gEponaJumpingHighAnim,
};*/
static AnimationHeader* sAnimations[] = { //william
&gChildEponaIdleAnim, &gChildEponaWhinnyAnim, &gEponaRefuseAnim, &gChildEponaWalkingAnim, &gChildEponaWalkingAnim,
&gChildEponaTrottingAnim, &gChildEponaGallopingAnim, &gEponaJumpingAnim, &gEponaJumpingHighAnim,
};
//static AnimationHeader* sAnimations[] = {
// &gHorseGanonIdleAnim, &gHorseGanonWhinnyAnim, &gHorseGanonWalkingAnim,
// &gHorseGanonTrottingAnim, &gHorseGanonGallopingAnim, &gHorseGanonRearingAnim,
//};
static AnimationHeader* sHniAnimHeaders[] = {
&gHorseIngoIdleAnim, &gHorseIngoWhinnyAnim, &gHorseIngoRefuseAnim,
&gHorseIngoRearingAnim, &gHorseIngoWalkingAnim, &gHorseIngoTrottingAnim,
&gHorseIngoGallopingAnim, &gHorseIngoJumpingAnim, &gHorseIngoJumpingHighAnim,
};
static AnimationHeader** sAnimationHeaders[] = { sEponaAnimHeaders, sHniAnimHeaders };
static AnimationHeader** sAnimationHeaders[] = { sEponaAnimHeaders, sHniAnimHeaders, sAnimations };
static f32 sPlaybackSpeeds[] = { 2.0f / 3.0f, 2.0f / 3.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 2.0f / 3.0f, 2.0f / 3.0f };
@ -610,8 +629,11 @@ void EnHorse_PlayWalkingSound(EnHorse* this) {
return;
}
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_WALK, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if(LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_WALK, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,&D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_WALK, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if (++this->soundTimer > 1) {
this->soundTimer = 0;
}
@ -619,11 +641,17 @@ void EnHorse_PlayWalkingSound(EnHorse* this) {
}
void EnHorse_PlayTrottingSound(EnHorse* this) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
void EnHorse_PlayGallopingSound(EnHorse* this) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if(LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
f32 EnHorse_SlopeSpeedMultiplier(EnHorse* this, GlobalContext* globalCtx) {
@ -681,7 +709,7 @@ s32 EnHorse_Spawn(EnHorse* this, GlobalContext* globalCtx) {
player = GET_PLAYER(globalCtx);
if (globalCtx->sceneNum != SCENE_SPOT20 ||
//! Same flag checked twice
(Flags_GetEventChkInf(0x18) && ((gSaveContext.eventInf[0] & 0xF) != 6 || Flags_GetEventChkInf(0x18))) ||
Flags_GetEventChkInf(0x18) && ((gSaveContext.eventInf[0] & 0xF) != 6 || Flags_GetEventChkInf(0x18)) ||
// always load two spawns inside lon lon
((sHorseSpawns[i].pos.x == 856 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -918) ||
(sHorseSpawns[i].pos.x == -1003 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -755))) {
@ -792,7 +820,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
} else if (this->actor.params == 6) {
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP;
if (Flags_GetEventChkInf(0x18) || DREG(1) != 0) {
if ((Flags_GetEventChkInf(0x18) || DREG(1) != 0)){ //|| !LINK_IS_ADULT) {
this->stateFlags &= ~ENHORSE_CANT_JUMP;
this->stateFlags |= ENHORSE_FLAG_26;
} else if (gSaveContext.eventInf[0] & 0x40 && this->type == HORSE_HNI) {
@ -805,12 +833,15 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
}
}
if (globalCtx->sceneNum == SCENE_SPOT20 && (gSaveContext.eventInf[0] & 0xF) == 6 &&
Flags_GetEventChkInf(0x18) == 0 && !DREG(1)) {
if (globalCtx->sceneNum == SCENE_SPOT20 && (gSaveContext.eventInf[0] & 0xF) == 6 && Flags_GetEventChkInf(0x18) == 0 && !DREG(1)) { // this is where william
this->stateFlags |= ENHORSE_FLAG_25;
}
Actor_SetScale(&this->actor, 0.01f);
if (LINK_IS_ADULT)
Actor_SetScale(&this->actor, 0.01f); // adult epona
else
Actor_SetScale(&this->actor, 0.0065f); // young epona
this->actor.gravity = -3.5f;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawHorse, 20.0f);
this->action = ENHORSE_ACT_IDLE;
@ -832,35 +863,48 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
Actor_Kill(&this->actor);
return;
}
if (Flags_GetEventChkInf(0x18)) {
Actor_Kill(&this->actor);
return;
}
if (Flags_GetEventChkInf(0x18)) {
Actor_Kill(&this->actor);
return;
}
if (this->actor.world.rot.z != 5) {
Actor_Kill(&this->actor);
return;
}
} else if (!Flags_GetEventChkInf(0x18) && !DREG(1) && !IS_DAY) {
Actor_Kill(&this->actor);
return;
}
} else if ((!Flags_GetEventChkInf(0x18) && !DREG(1) && !IS_DAY)) {
Actor_Kill(&this->actor);
return;
}
} else if (globalCtx->sceneNum == SCENE_MALON_STABLE) {
if (IS_DAY || Flags_GetEventChkInf(0x18) || DREG(1) != 0 || !LINK_IS_ADULT) {
Actor_Kill(&this->actor);
return;
}
if (IS_DAY || Flags_GetEventChkInf(0x18) || DREG(1) != 0) {
Actor_Kill(&this->actor);
return;
}
this->stateFlags |= ENHORSE_UNRIDEABLE;
}
Skin_Init(globalCtx, &this->skin, sSkeletonHeaders[this->type], sAnimationHeaders[this->type][ENHORSE_ANIM_IDLE]);
this->animationIdx = ENHORSE_ANIM_IDLE;
Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]);
globalCtx->horseSkin = this->skin;
if (LINK_IS_ADULT)
Skin_Init(globalCtx, &this->skin, sSkeletonHeaders[this->type],
sAnimationHeaders[this->type][ENHORSE_ANIM_IDLE]);
else {
this->type = 2;
Skin_Init(globalCtx, &this->skin, &gChildEponaSkel, sAnimationHeaders[this->type][ENHORSE_ANIM_IDLE]);
}
this->animationIdx = ENHORSE_ANIM_IDLE; // real
Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); // real
this->numBoosts = 6;
this->blinkTimer = this->postDrawFunc = this->boostRegenTime = 0;
EnHorse_ResetCutscene(this, globalCtx);
EnHorse_ResetRace(this, globalCtx);
EnHorse_ResetHorsebackArchery(this, globalCtx);
//race
if (this->actor.params == 2) {
EnHorse_InitInactive(this);
} else if (this->actor.params == 3) {
@ -881,7 +925,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
} else if (this->actor.params == 8) {
EnHorse_InitHorsebackArchery(this);
Interface_InitHorsebackArchery(globalCtx);
} else if (globalCtx->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(0x18) && !DREG(1)) {
}else if (globalCtx->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(0x18) && !DREG(1)) {
EnHorse_InitFleePlayer(this);
} else {
if (globalCtx->sceneNum == SCENE_SOUKO) {
@ -895,6 +939,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
this->actor.home.rot.z = this->actor.world.rot.z = this->actor.shape.rot.z = 0;
}
void EnHorse_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnHorse* this = (EnHorse*)thisx;
@ -1128,7 +1173,10 @@ void EnHorse_MountedIdleWhinney(EnHorse* this) {
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
@ -1400,7 +1448,10 @@ void EnHorse_StartRearing(EnHorse* this) {
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
func_800AA000(0.0f, 180, 20, 100);
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f,
@ -1470,7 +1521,11 @@ void EnHorse_Stopping(EnHorse* this, GlobalContext* globalCtx) {
if (Rand_ZeroOne() > 0.5) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
func_800AA000(0.0f, 180, 20, 100);
this->stateFlags &= ~ENHORSE_STOPPING_NEIGH_SOUND;
@ -1733,12 +1788,17 @@ void EnHorse_InitInactive(EnHorse* this) {
void EnHorse_SetFollowAnimation(EnHorse* this, GlobalContext* globalCtx);
//spawn horse in hyrule
void EnHorse_Inactive(EnHorse* this, GlobalContext* globalCtx2) {
//func_80078884(NA_SE_SY_ERROR);
GlobalContext* globalCtx = globalCtx2;
if (DREG(53) != 0 && this->type == HORSE_EPONA) {
//if just played song && the horses type is epona??
if (DREG(53) != 0 && (this->type == HORSE_EPONA || this->type == 2)) {
DREG(53) = 0;
if (EnHorse_Spawn(this, globalCtx) != 0) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
this->stateFlags &= ~ENHORSE_INACTIVE;
@ -1773,12 +1833,20 @@ void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 sta
} else if (this->animationIdx == ENHORSE_ANIM_WHINNEY) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
} else if (this->animationIdx == ENHORSE_ANIM_REARING) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
}
@ -1813,8 +1881,10 @@ void EnHorse_Idle(EnHorse* this, GlobalContext* globalCtx) {
DREG(53) = 0;
if (!func_80A5BBBC(globalCtx, this, &this->actor.world.pos)) {
if (EnHorse_Spawn(this, globalCtx)) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if(LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,&D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,&D_801333E8);
this->followTimer = 0;
EnHorse_SetFollowAnimation(this, globalCtx);
Camera_SetParam(globalCtx->cameraPtrs[0], 8, this);
@ -1822,8 +1892,11 @@ void EnHorse_Idle(EnHorse* this, GlobalContext* globalCtx) {
Camera_SetCameraData(globalCtx->cameraPtrs[0], 4, NULL, NULL, 0x51, 0, 0);
}
} else {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,&D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
this->followTimer = 0;
EnHorse_StartMovingAnimation(this, 6, -3.0f, 0.0f);
}
@ -1960,7 +2033,10 @@ void EnHorse_FollowPlayer(EnHorse* this, GlobalContext* globalCtx) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
@ -2041,10 +2117,18 @@ void EnHorse_UpdateIngoHorseAnim(EnHorse* this) {
animSpeed = this->actor.speedXZ * 0.5f;
} else if (this->animationIdx == ENHORSE_ANIM_TROT) {
animSpeed = this->actor.speedXZ * 0.25f;
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
} else if (this->animationIdx == ENHORSE_ANIM_GALLOP) {
animSpeed = this->actor.speedXZ * 0.2f;
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
} else {
animSpeed = 1.0f;
}
@ -2294,7 +2378,7 @@ void EnHorse_CsWarpMoveToPoint(EnHorse* this, GlobalContext* globalCtx, CsCmdAct
this->actor.speedXZ * 0.3f);
}
}
//cutscene
void EnHorse_CsWarpRearingInit(EnHorse* this, GlobalContext* globalCtx, CsCmdActorAction* action) {
this->actor.world.pos.x = action->startPos.x;
this->actor.world.pos.y = action->startPos.y;
@ -2470,11 +2554,18 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) {
animSpeed = this->actor.speedXZ * 0.5f;
} else if (this->animationIdx == ENHORSE_ANIM_TROT) {
animSpeed = this->actor.speedXZ * 0.25f;
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
func_800AA000(0.0f, 60, 8, 255);
} else if (this->animationIdx == ENHORSE_ANIM_GALLOP) {
animSpeed = this->actor.speedXZ * 0.2f;
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,&D_801333E8);
func_800AA000(0.0f, 120, 8, 255);
} else {
animSpeed = 1.0f;
@ -2531,7 +2622,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
if ((globalCtx->interfaceCtx.hbaAmmo == 0) || (this->hbaFlags & 2)) {
if (this->hbaFlags & 4) {
this->hbaFlags &= ~4;
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL); //william
}
}
@ -2576,8 +2667,11 @@ void EnHorse_FleePlayer(EnHorse* this, GlobalContext* globalCtx) {
if (DREG(53) || this->type == HORSE_HNI) {
EnHorse_StartIdleRidable(this);
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,&D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
distToHome = Math3D_Vec3f_DistXYZ(&this->actor.home.pos, &this->actor.world.pos);
@ -2687,8 +2781,11 @@ void EnHorse_FleePlayer(EnHorse* this, GlobalContext* globalCtx) {
this->animationIdx = ENHORSE_ANIM_WHINNEY;
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0,&D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_GROAN, &this->unk_21C, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
}
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f,
@ -2744,7 +2841,10 @@ void EnHorse_BridgeJumpInit(EnHorse* this, GlobalContext* globalCtx) {
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_JUMP, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
func_800AA000(0.0f, 170, 10, 10);
@ -3332,8 +3432,10 @@ void EnHorse_CheckBoost(EnHorse* thisx, GlobalContext* globalCtx2) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
if (Rand_ZeroOne() < 0.1f) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0,&D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0,&D_801333E8);
}
}
}
@ -3374,7 +3476,10 @@ void EnHorse_RegenBoost(EnHorse* this, GlobalContext* globalCtx) {
if (this->boostTimer == 8 && Rand_ZeroOne() < 0.25f) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
globalCtx->interfaceCtx.numHorseBoosts = this->numBoosts;
@ -3515,7 +3620,10 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx2) {
if (this->jntSph.base.acFlags & 2) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (LINK_IS_ADULT)
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else
Audio_PlaySoundGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->unk_21C, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
if (this->action != ENHORSE_ACT_INGO_RACE) {
@ -3657,6 +3765,13 @@ void EnHorse_PostDraw(Actor* thisx, GlobalContext* globalCtx, Skin* skin) {
Vec3f sp94 = { 0.0f, 0.0f, 0.0f };
Vec3f hoofOffset = { 5.0f, -4.0f, 5.0f };
Vec3f riderOffset = { 600.0f, -1670.0f, 0.0f };
if (!LINK_IS_ADULT) {
riderOffset.x = -2600.0f;
riderOffset.y = -1000.0f;
riderOffset.z = -710.0f;
}
Vec3f sp70;
Vec3f sp64 = { 0.0f, 0.0f, 0.0f };
Vec3f sp58 = { 0.0f, -1.0f, 0.0f };
@ -3808,7 +3923,7 @@ s32 EnHorse_OverrideLimbDraw(Actor* thisx, GlobalContext* globalCtx, s32 limbInd
s32 drawOriginalLimb = true;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse.c", 8582);
if (limbIndex == 13 && this->type == HORSE_EPONA) {
if (limbIndex == 13 && (this->type == HORSE_EPONA || this->type == 2)) { //william remember
u8 index = eyeBlinkIndexes[this->blinkTimer];
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[index]));

View File

@ -109,10 +109,10 @@ s32 EnHorseGameCheck_DestroyIngoRace(EnHorseGameCheckBase* base, GlobalContext*
void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, GlobalContext* globalCtx) {
gSaveContext.cutsceneIndex = 0;
if (this->result == INGORACE_PLAYER_WIN) {
if (this->result == INGORACE_PLAYER_WIN) { //player won race william
globalCtx->nextEntranceIndex = 0x4CE;
if (gSaveContext.eventInf[0] & 0x40) {
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 6;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 6; //this says that you won
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
globalCtx->fadeTransition = 3;
Environment_ForcePlaySequence(NA_BGM_INGO);

View File

@ -144,6 +144,11 @@ void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) {
EnHorseLinkChild* this = (EnHorseLinkChild*)thisx;
s32 pad;
//if (!Flags_GetEventChkInf(0x14)) {
Actor_Kill(&this->actor);
return;
//}
Actor_ProcessInitChain(&this->actor, sInitChain);
Actor_SetScale(&this->actor, 0.005f);
this->actor.gravity = -3.5f;
@ -152,8 +157,10 @@ void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) {
this->action = 1;
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 70.0f;
Skin_Init(globalCtx, &this->skin, &gChildEponaSkel, &gChildEponaGallopingAnim);
Skin_Init(globalCtx, &this->skin, &gChildEponaSkel, &gChildEponaGallopingAnim); //william
this->animationIdx = 0;
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[0]);
Collider_InitCylinder(globalCtx, &this->bodyCollider);
Collider_SetCylinderType1(globalCtx, &this->bodyCollider, &this->actor, &sCylinderInit);

View File

@ -612,8 +612,9 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
void func_80A7A304(EnIn* this, GlobalContext* globalCtx) {
if (this->skelAnime.animation == &object_in_Anim_015814 || this->skelAnime.animation == &object_in_Anim_01646C) {
if (this->skelAnime.curFrame == 8.0f) {
Audio_PlaySoundRandom(&this->actor.projectedPos, NA_SE_VO_IN_LASH_0,
NA_SE_VO_IN_LASH_1 - NA_SE_VO_IN_LASH_0 + 1);
Audio_PlaySoundRandom(&this->actor.projectedPos, NA_SE_SY_ERROR,
NA_SE_SY_ERROR); // NA_SE_VO_IN_LASH_0, //william
//NA_SE_VO_IN_LASH_1 - NA_SE_VO_IN_LASH_0 + 1);
}
}
if (this->skelAnime.animation == &object_in_Anim_018C38 && this->skelAnime.curFrame == 20.0f) {
@ -623,7 +624,8 @@ void func_80A7A304(EnIn* this, GlobalContext* globalCtx) {
this->animationIdx %= 8;
this->unk_1E8 = this->animationIdx;
if (this->animationIdx == 3 || this->animationIdx == 4) {
Audio_PlaySoundGeneral(NA_SE_IT_LASH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
//Audio_PlaySoundGeneral(NA_SE_IT_LASH, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); real
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (Rand_ZeroOne() < 0.3f) {
Audio_PlaySoundGeneral(NA_SE_IT_INGO_HORSE_NEIGH, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);

View File

@ -298,13 +298,13 @@ void EnPart_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x09, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0));
gSPSegment(POLY_OPA_DISP++, 0x0A, func_80ACEAC0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0));
} else if ((thisx->params == 9) && (this->displayList == ResourceMgr_LoadGfxByName(object_tite_DL_002FF0))) {
gSPSegment(POLY_OPA_DISP++, 0x08, object_tite_Tex_001300);
gSPSegment(POLY_OPA_DISP++, 0x09, object_tite_Tex_001700);
gSPSegment(POLY_OPA_DISP++, 0x0A, object_tite_Tex_001900);
gSPSegment(POLY_OPA_DISP++, 0x08, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001300)));
gSPSegment(POLY_OPA_DISP++, 0x09, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001700)));
gSPSegment(POLY_OPA_DISP++, 0x0A, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001900)));
} else if ((thisx->params == 10) && (this->displayList == ResourceMgr_LoadGfxByName(object_tite_DL_002FF0))) {
gSPSegment(POLY_OPA_DISP++, 0x08, object_tite_Tex_001B00);
gSPSegment(POLY_OPA_DISP++, 0x09, object_tite_Tex_001F00);
gSPSegment(POLY_OPA_DISP++, 0x0A, object_tite_Tex_002100);
gSPSegment(POLY_OPA_DISP++, 0x08, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001B00)));
gSPSegment(POLY_OPA_DISP++, 0x09, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_001F00)));
gSPSegment(POLY_OPA_DISP++, 0x0A, ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(object_tite_Tex_002100)));
}
if (this->displayList != NULL) {

View File

@ -84,8 +84,6 @@ void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) {
}
OVERLAY_DISP = func_80093F34(OVERLAY_DISP);
if (D_801614B0.a > 0)
gsSPGrayscale(OVERLAY_DISP++, false);
gDPSetTextureLUT(OVERLAY_DISP++, G_TT_NONE);
gDPSetEnvColor(OVERLAY_DISP++, 255, 120, 30, 0);
gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2);
@ -110,8 +108,7 @@ void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) {
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
1 << 10);
if (D_801614B0.a > 0)
gsSPGrayscale(OVERLAY_DISP++, true);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_end_title.c", 515);
}

View File

@ -19,7 +19,7 @@
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_link_child/object_link_child.h"
#include "textures/icon_item_24_static/icon_item_24_static.h"
#include <math.h>
typedef struct {
/* 0x00 */ u8 itemId;
@ -10266,7 +10266,7 @@ void func_80848C74(GlobalContext* globalCtx, Player* this) {
}
}
void func_80848EF8(Player* this, GlobalContext* globalCtx) {
void func_80848EF8(Player* this) {
if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)) {
f32 temp = 200000.0f - (this->unk_6A4 * 5.0f);
@ -10275,45 +10275,8 @@ void func_80848EF8(Player* this, GlobalContext* globalCtx) {
}
this->unk_6A0 += temp;
/*Prevent it on horse, while jumping and on title screen.
If you fly around no stone of agony for you! */
if (CVar_GetS32("gVisualAgony", 0) !=0 && !this->stateFlags1) {
int rectLeft = OTRGetRectDimensionFromLeftEdge(26); //Left X Pos
int rectTop = 60; //Top Y Pos
int rectWidth = 24; //Texture Width
int rectHeight = 24; //Texture Heigh
int DefaultIconA= 50; //Default icon alphe (55 on 255)
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 2824);
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
if (this->unk_6A0 > 4000000.0f) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255);
} else {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA);
}
if (temp == 0 || temp <= 0.1f) {
/*Fail check, it is used to draw off the icon when
link is standing out range but do not refresh unk_6A0.
Also used to make a default value in my case.*/
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA);
}
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
gDPSetOtherMode(OVERLAY_DISP++, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_IA16 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2);
gDPLoadTextureBlock(OVERLAY_DISP++, gStoneOfAgonyIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 24, 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gDPSetOtherMode(OVERLAY_DISP++, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_IA16 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2);
gSPWideTextureRectangle(OVERLAY_DISP++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, (rectTop + rectHeight) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 3500);
}
if (this->unk_6A0 > 4000000.0f) {
this->unk_6A0 = 0.0f;
if (CVar_GetS32("gVisualAgony", 0) !=0 && !this->stateFlags1) {
//This audio is placed here and not in previous CVar check to prevent ears ra.. :)
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E0);
}
func_8083264C(this, 120, 20, 10, 0);
}
}
@ -10585,7 +10548,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
else {
this->fallStartHeight = this->actor.world.pos.y;
}
func_80848EF8(this, globalCtx);
func_80848EF8(this);
}
}
@ -12005,12 +11968,21 @@ void func_8084CC98(Player* this, GlobalContext* globalCtx) {
}
}
this->actor.world.pos.x = rideActor->actor.world.pos.x + rideActor->riderPos.x;
this->actor.world.pos.y = (rideActor->actor.world.pos.y + rideActor->riderPos.y) - 27.0f;
this->actor.world.pos.z = rideActor->actor.world.pos.z + rideActor->riderPos.z;
this->currentYaw = this->actor.shape.rot.y = rideActor->actor.shape.rot.y;
float miniOffset = 0;
if (LINK_IS_ADULT)
miniOffset = 27;
this->actor.world.pos.x = rideActor->actor.world.pos.x + rideActor->riderPos.x;
this->actor.world.pos.y = (rideActor->actor.world.pos.y + rideActor->riderPos.y) - miniOffset; //WILLIAM
this->actor.world.pos.z = rideActor->actor.world.pos.z + rideActor->riderPos.z;
if ((this->csMode != 0) ||
(!func_8083224C(globalCtx) && ((rideActor->actor.speedXZ != 0.0f) || !func_8083B644(this, globalCtx)) &&
!func_8083C1DC(this, globalCtx))) {
@ -12021,10 +11993,16 @@ void func_8084CC98(Player* this, GlobalContext* globalCtx) {
this->unk_84F = 0;
}
if (this->skelAnime2.animation == &gPlayerAnim_0033B0) {
if (this->skelAnime2.animation == &gPlayerAnim_0033B0) { //INITIAL KICKOFF WITH HORSE
if (LinkAnimation_OnFrame(&this->skelAnime2, 23.0f)) {
func_8002F7DC(&this->actor, NA_SE_IT_LASH);
func_80832698(this, NA_SE_VO_LI_LASH);
if (LINK_IS_ADULT) {
func_8002F7DC(&this->actor, NA_SE_IT_LASH); // real
func_80832698(this, NA_SE_VO_LI_LASH);
} else
{
func_8002F7DC(&this->actor, NA_SE_VO_LI_AUTO_JUMP);
func_80832698(this, NA_SE_VO_LI_AUTO_JUMP);
}
}
AnimationContext_SetCopyAll(globalCtx, this->skelAnime.limbCount, this->skelAnime.jointTable,
@ -12032,8 +12010,15 @@ void func_8084CC98(Player* this, GlobalContext* globalCtx) {
}
else {
if (LinkAnimation_OnFrame(&this->skelAnime2, 10.0f)) {
func_8002F7DC(&this->actor, NA_SE_IT_LASH);
func_80832698(this, NA_SE_VO_LI_LASH);
if (LINK_IS_ADULT) {
func_8002F7DC(&this->actor, NA_SE_IT_LASH);
func_80832698(this, NA_SE_VO_LI_LASH);
}
else
{
func_8002F7DC(&this->actor, NA_SE_VO_LI_AUTO_JUMP);
func_80832698(this, NA_SE_VO_LI_AUTO_JUMP);
}
}
AnimationContext_SetCopyTrue(globalCtx, this->skelAnime.limbCount, this->skelAnime.jointTable,

View File

@ -45,8 +45,11 @@ void FileChoose_SetView(FileChooseContext* this, f32 eyeX, f32 eyeY, f32 eyeZ) {
func_800AAA50(&this->view, 0x7F);
}
Gfx* FileChoose_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s16 point)
Gfx* FileChoose_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s16 point)
{
if (ResourceMgr_OTRSigCheck(texture))
texture = ResourceMgr_LoadTexByName(texture);
gDPLoadTextureBlock(gfx++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@ -1497,13 +1500,13 @@ void FileChoose_LoadGame(GameState* thisx) {
gSaveContext.naviTimer = 0;
// SWORDLESS LINK IS BACK BABY
if (CVar_GetS32("gSwordlessLink", 0) != 0)
if (CVar_GetS32("gSwordlessLink", 0) != 0)
{
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) &&
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER) &&
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_BGS) &&
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KNIFE)) {
gSaveContext.equips.buttonItems[0] = ITEM_NONE;
swordEquipMask = _byteswap_ushort(gEquipMasks[EQUIP_SWORD]) & gSaveContext.equips.equipment;
gSaveContext.equips.equipment &= gEquipNegMasks[EQUIP_SWORD];

View File

@ -199,7 +199,7 @@ void Title_Draw(TitleContext* this) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 170, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 128);
gDPLoadMultiBlock(POLY_OPA_DISP++, nintendo_rogo_static_Tex_001800, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
gDPLoadMultiBlock(POLY_OPA_DISP++, ResourceMgr_LoadTexByName(nintendo_rogo_static_Tex_001800), 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, 2, 11);
for (idx = 0, y = 94; idx < 16; idx++, y += 2)
@ -271,8 +271,6 @@ void Title_Init(GameState* thisx) {
//ResourceMgr_CacheDirectory("nintendo_rogo_static*");
// Disable vismono
D_801614B0.a = 0;
R_UPDATE_RATE = 1;
Matrix_Init(&this->state);
View_Init(&this->view, this->state.gfxCtx);

View File

@ -64,7 +64,7 @@ void KaleidoScope_DrawEquipmentImage(GlobalContext* globalCtx, void* source, u32
gDPLoadSync(POLY_KAL_DISP++);
gDPLoadTile(POLY_KAL_DISP++, G_TX_LOADTILE, 0, 0, (width - 1) << 2, (textureHeight - 1) << 2);
gDPSetTextureImageFB(POLY_KAL_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, fbTest);
gSP1Quadrangle(POLY_KAL_DISP++, 0, 2, 3, 1, 0);
@ -575,14 +575,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
} else if ((i == 0) && (k == 2) && (gBitFlags[bit + 1] & gSaveContext.inventory.equipment)) {
KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gBrokenGiantsKnifeIconTex, 32, 32, point);
} else if (gBitFlags[bit] & gSaveContext.inventory.equipment) {
int itemId = ITEM_SWORD_KOKIRI + temp;
bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge);
if (not_acquired) {
gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255);
gsSPGrayscale(POLY_KAL_DISP++, true);
}
KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32, 32, point);
gsSPGrayscale(POLY_KAL_DISP++, false);
KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[ITEM_SWORD_KOKIRI + temp], 32, 32, point);
}
}
}
@ -602,6 +595,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItemSegment);
//gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItem24Segment);
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->nameSegment);
gSPInvalidateTexCache(POLY_KAL_DISP++, globalCtx->interfaceCtx.mapSegment);
//gSPSegment(POLY_KAL_DISP++, 0x07, pauseCtx->playerSegment);
gSPSegment(POLY_KAL_DISP++, 0x08, pauseCtx->iconItemSegment);

View File

@ -467,15 +467,8 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
}
gSPVertex(POLY_KAL_DISP++, &pauseCtx->itemVtx[j + 0], 4, 0);
int itemId = gSaveContext.inventory.items[i];
bool not_acquired = (gItemAgeReqs[itemId] != 9) && (gItemAgeReqs[itemId] != gSaveContext.linkAge);
if (not_acquired) {
gsDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255);
gsSPGrayscale(POLY_KAL_DISP++, true);
}
KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[itemId], 32,
KaleidoScope_DrawQuadTextureRGBA32(globalCtx->state.gfxCtx, gItemIcons[gSaveContext.inventory.items[i]], 32,
32, 0);
gsSPGrayscale(POLY_KAL_DISP++, false);
}
}

View File

@ -332,10 +332,6 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
gSPVertex(POLY_KAL_DISP++, &pauseCtx->mapPageVtx[60], 8, 0);
// The dungeon map textures are recreated each frame, so always invalidate them
gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment);
gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment + 0x800);
gDPLoadTextureBlock_4b(POLY_KAL_DISP++, interfaceCtx->mapSegment, G_IM_FMT_CI, 48, 85, 0, G_TX_WRAP | G_TX_NOMIRROR,
G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

View File

@ -1614,24 +1614,14 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) {
if ((pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) && (pauseCtx->unk_1E4 == 0)) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, D_808321A0, D_808321A2, D_808321A4, D_808321A6);
} else {
if (CVar_GetS32("gUniformLR", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255);
}
}
gSPDisplayList(POLY_KAL_DISP++, gLButtonIconDL);
if (CVar_GetS32("gUniformLR", 0) == 0) { //Restore the misplace gDPSetPrimColor
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255);
}
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 220);
if ((pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) && (pauseCtx->unk_1E4 == 0)) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, D_808321A0, D_808321A2, D_808321A4, D_808321A6);
} else {
if (CVar_GetS32("gUniformLR", 0) != 0) {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 180, 210, 255, 255);
}
}
gSPDisplayList(POLY_KAL_DISP++, gRButtonIconDL);
@ -3091,6 +3081,14 @@ void KaleidoScope_Update(GlobalContext* globalCtx)
gSegments[8] = VIRTUAL_TO_PHYSICAL(pauseCtx->iconItemSegment);
for (i = 0; i < ARRAY_COUNTU(gItemAgeReqs); i++) {
if ((gItemAgeReqs[i] != 9) && (gItemAgeReqs[i] != ((void)0, gSaveContext.linkAge)))
{
gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyKal.p++, ResourceMgr_LoadTexByName(gItemIcons[i]));
KaleidoScope_GrayOutTextureRGBA32(SEGMENTED_TO_VIRTUAL(gItemIcons[i]), 0x400);
}
}
pauseCtx->iconItem24Segment = (void*)(((uintptr_t)pauseCtx->iconItemSegment + size0 + 0xF) & ~0xF);
#if 1
@ -3179,9 +3177,15 @@ void KaleidoScope_Update(GlobalContext* globalCtx)
if (gSaveContext.language == LANGUAGE_ENG) {
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[36 + gSaveContext.worldMapArea]), 0xA00);
} else if (gSaveContext.language == LANGUAGE_GER) {
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[59 + gSaveContext.worldMapArea]), 0xA00);
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
(uintptr_t)_map_name_staticSegmentRomStart +
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x16C00,
0xA00, "../z_kaleido_scope_PAL.c", 3780);
} else {
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[81 + gSaveContext.worldMapArea]), 0xA00);
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
(uintptr_t)_map_name_staticSegmentRomStart +
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x24800,
0xA00, "../z_kaleido_scope_PAL.c", 3784);
}
}
// OTRTODO - player on pause