mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 19:04:38 +00:00
Merge branch 'master' into doc_pause_menu
This commit is contained in:
commit
b4d3d1d6d2
182 changed files with 5231 additions and 1600 deletions
|
@ -78,136 +78,141 @@ u32 gGsFlagsMasks[] = { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 };
|
|||
u32 gGsFlagsShifts[] = { 0, 8, 16, 24 };
|
||||
|
||||
void* gItemIcons[] = {
|
||||
gDekuStickIconTex,
|
||||
gDekuNutIconTex,
|
||||
gBombIconTex,
|
||||
gFairyBowIconTex,
|
||||
gFireArrowIconTex,
|
||||
gDinsFireIconTex,
|
||||
gFairySlingshotIconTex,
|
||||
gFairyOcarinaIconTex,
|
||||
gOcarinaofTimeIconTex,
|
||||
gBombchuIconTex,
|
||||
gHookshotIconTex,
|
||||
gLongshotIconTex,
|
||||
gIceArrowIconTex,
|
||||
gFaroresWindIconTex,
|
||||
gBoomerangIconTex,
|
||||
gLensofTruthIconTex,
|
||||
gMagicBeansIconTex,
|
||||
gMegatonHammerIconTex,
|
||||
gLightArrowIconTex,
|
||||
gNayrusLoveIconTex,
|
||||
gEmptyBottleIconTex,
|
||||
gRedPotionIconTex,
|
||||
gGreenPotionIconTex,
|
||||
gBluePotionIconTex,
|
||||
gBottledFairyIconTex,
|
||||
gFishIconTex,
|
||||
gMilkFullIconTex,
|
||||
gRutosLetterIconTex,
|
||||
gBlueFireIconTex,
|
||||
gBugIconTex,
|
||||
gBigPoeIconTex,
|
||||
gMilkhalfIconTex,
|
||||
gPoeIconTex,
|
||||
gWeirdEggIconTex,
|
||||
gCuccoIconTex,
|
||||
gZeldasLetterIconTex,
|
||||
gKeatonMaskIconTex,
|
||||
gSkullMaskIconTex,
|
||||
gSpookyMaskIconTex,
|
||||
gBunnyHoodIconTex,
|
||||
gGoronMaskIconTex,
|
||||
gZoraMaskIconTex,
|
||||
gGerudoMaskIconTex,
|
||||
gMaskofTruthIconTex,
|
||||
gSoldOutIconTex,
|
||||
gPocketEggIconTex,
|
||||
gPocketCuccoIconTex,
|
||||
gCojiroIconTex,
|
||||
gOddMushroomIconTex,
|
||||
gOddPotionIconTex,
|
||||
gPoachersSawIconTex,
|
||||
gBrokenBiggoronSwordIconTex,
|
||||
gPrescriptionIconTex,
|
||||
gEyeBallFrogIconTex,
|
||||
gEyeDropsIconTex,
|
||||
gClaimCheckIconTex,
|
||||
gFairyBowFireIconTex,
|
||||
gFairyBowIceIconTex,
|
||||
gFairyBowLightIconTex,
|
||||
gKokiriSwordIconTex,
|
||||
gMasterSwordIconTex,
|
||||
gBiggoronSwordIconTex,
|
||||
gDekuShieldIconTex,
|
||||
gHylianShieldIconTex,
|
||||
gMirrorShieldIconTex,
|
||||
gKokiriTunicIconTex,
|
||||
gGoronTunicIconTex,
|
||||
gZoraTunicIconTex,
|
||||
gKokiriBootsIconTex,
|
||||
gIronBootsIconTex,
|
||||
gHoverBootsIconTex,
|
||||
gBulletBag30IconTex,
|
||||
gBulletBag40IconTex,
|
||||
gBulletBag50IconTex,
|
||||
gQuiver30IconTex,
|
||||
gQuiver40IconTex,
|
||||
gQuiver50IconTex,
|
||||
gBombBag20IconTex,
|
||||
gBombBag30IconTex,
|
||||
gBombBag40IconTex,
|
||||
gGoronsBraceletIconTex,
|
||||
gSilverGauntletsIconTex,
|
||||
gGoldenGauntletsIconTex,
|
||||
gSilverScaleIconTex,
|
||||
gGoldenScaleIconTex,
|
||||
gBrokenGiantsKnifeIconTex,
|
||||
gAdultsWalletIconTex,
|
||||
gGiantsWalletIconTex,
|
||||
gDekuSeedsIconTex,
|
||||
gFishingPoleIconTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gSongNoteTex,
|
||||
gForestMedallionIconTex,
|
||||
gFireMedallionIconTex,
|
||||
gWaterMedallionIconTex,
|
||||
gSpiritMedallionIconTex,
|
||||
gShadowMedallionIconTex,
|
||||
gLightMedallionIconTex,
|
||||
gKokiriEmeraldIconTex,
|
||||
gGoronRubyIconTex,
|
||||
gZoraSapphireIconTex,
|
||||
gStoneOfAgonyIconTex,
|
||||
gGerudosCardIconTex,
|
||||
gGoldSkulltulaIconTex,
|
||||
gHeartContainerIconTex,
|
||||
gUnusedPieceOfHeartIconTex,
|
||||
gBossKeyIconTex,
|
||||
gDungeonMapIconTex,
|
||||
gCompassIconTex,
|
||||
gBossKeyIconTex,
|
||||
gSmallMagicJarIconTex,
|
||||
gBigMagicJarIconTex,
|
||||
gHeartPieceIcon1Tex,
|
||||
gHeartPieceIcon2Tex,
|
||||
gHeartPieceIcon3Tex,
|
||||
gOcarinaCUpTex,
|
||||
gOcarinaCDownTex,
|
||||
gOcarinaCLeftTex,
|
||||
gOcarinaCRightTex,
|
||||
gOcarinaATex,
|
||||
// icon_item_static 32x32 rgba32
|
||||
gItemIconDekuStickTex, // ITEM_DEKU_STICK
|
||||
gItemIconDekuNutTex, // ITEM_DEKU_NUT
|
||||
gItemIconBombTex, // ITEM_BOMB
|
||||
gItemIconBowTex, // ITEM_BOW
|
||||
gItemIconArrowFireTex, // ITEM_ARROW_FIRE
|
||||
gItemIconDinsFireTex, // ITEM_DINS_FIRE
|
||||
gItemIconSlingshotTex, // ITEM_SLINGSHOT
|
||||
gItemIconOcarinaFairyTex, // ITEM_OCARINA_FAIRY
|
||||
gItemIconOcarinaOfTimeTex, // ITEM_OCARINA_OF_TIME
|
||||
gItemIconBombchuTex, // ITEM_BOMBCHU
|
||||
gItemIconHookshotTex, // ITEM_HOOKSHOT
|
||||
gItemIconLongshotTex, // ITEM_LONGSHOT
|
||||
gItemIconArrowIceTex, // ITEM_ARROW_ICE
|
||||
gItemIconFaroresWindTex, // ITEM_FARORES_WIND
|
||||
gItemIconBoomerangTex, // ITEM_BOOMERANG
|
||||
gItemIconLensOfTruthTex, // ITEM_LENS_OF_TRUTH
|
||||
gItemIconMagicBeanTex, // ITEM_MAGIC_BEAN
|
||||
gItemIconHammerTex, // ITEM_HAMMER
|
||||
gItemIconArrowLightTex, // ITEM_ARROW_LIGHT
|
||||
gItemIconNayrusLoveTex, // ITEM_NAYRUS_LOVE
|
||||
gItemIconBottleEmptyTex, // ITEM_BOTTLE_EMPTY
|
||||
gItemIconBottlePotionRedTex, // ITEM_BOTTLE_POTION_RED
|
||||
gItemIconBottlePotionGreenTex, // ITEM_BOTTLE_POTION_GREEN
|
||||
gItemIconBottlePotionBlueTex, // ITEM_BOTTLE_POTION_BLUE
|
||||
gItemIconBottleFairyTex, // ITEM_BOTTLE_FAIRY
|
||||
gItemIconBottleFishTex, // ITEM_BOTTLE_FISH
|
||||
gItemIconBottleMilkFullTex, // ITEM_BOTTLE_MILK_FULL
|
||||
gItemIconBottleRutosLetterTex, // ITEM_BOTTLE_RUTOS_LETTER
|
||||
gItemIconBottleBlueFireTex, // ITEM_BOTTLE_BLUE_FIRE
|
||||
gItemIconBottleBugTex, // ITEM_BOTTLE_BUG
|
||||
gItemIconBottleBigPoeTex, // ITEM_BOTTLE_BIG_POE
|
||||
gItemIconBottleMilkHalfTex, // ITEM_BOTTLE_MILK_HALF
|
||||
gItemIconBottlePoeTex, // ITEM_BOTTLE_POE
|
||||
gItemIconWeirdEggTex, // ITEM_WEIRD_EGG
|
||||
gItemIconChickenTex, // ITEM_CHICKEN
|
||||
gItemIconZeldasLetterTex, // ITEM_ZELDAS_LETTER
|
||||
gItemIconMaskKeatonTex, // ITEM_MASK_KEATON
|
||||
gItemIconMaskSkullTex, // ITEM_MASK_SKULL
|
||||
gItemIconMaskSpookyTex, // ITEM_MASK_SPOOKY
|
||||
gItemIconMaskBunnyHoodTex, // ITEM_MASK_BUNNY_HOOD
|
||||
gItemIconMaskGoronTex, // ITEM_MASK_GORON
|
||||
gItemIconMaskZoraTex, // ITEM_MASK_ZORA
|
||||
gItemIconMaskGerudoTex, // ITEM_MASK_GERUDO
|
||||
gItemIconMaskTruthTex, // ITEM_MASK_TRUTH
|
||||
gItemIconSoldOutTex, // ITEM_SOLD_OUT
|
||||
gItemIconPocketEggTex, // ITEM_POCKET_EGG
|
||||
gItemIconPocketCuccoTex, // ITEM_POCKET_CUCCO
|
||||
gItemIconCojiroTex, // ITEM_COJIRO
|
||||
gItemIconOddMushroomTex, // ITEM_ODD_MUSHROOM
|
||||
gItemIconOddPotionTex, // ITEM_ODD_POTION
|
||||
gItemIconPoachersSawTex, // ITEM_POACHERS_SAW
|
||||
gItemIconBrokenGoronsSwordTex, // ITEM_BROKEN_GORONS_SWORD
|
||||
gItemIconPrescriptionTex, // ITEM_PRESCRIPTION
|
||||
gItemIconEyeballFrogTex, // ITEM_EYEBALL_FROG
|
||||
gItemIconEyeDropsTex, // ITEM_EYE_DROPS
|
||||
gItemIconClaimCheckTex, // ITEM_CLAIM_CHECK
|
||||
gItemIconBowFireTex, // ITEM_BOW_FIRE
|
||||
gItemIconBowIceTex, // ITEM_BOW_ICE
|
||||
gItemIconBowLightTex, // ITEM_BOW_LIGHT
|
||||
gItemIconSwordKokiriTex, // ITEM_SWORD_KOKIRI
|
||||
gItemIconSwordMasterTex, // ITEM_SWORD_MASTER
|
||||
gItemIconSwordBiggoronTex, // ITEM_SWORD_BIGGORON
|
||||
gItemIconShieldDekuTex, // ITEM_SHIELD_DEKU
|
||||
gItemIconShieldHylianTex, // ITEM_SHIELD_HYLIAN
|
||||
gItemIconShieldMirrorTex, // ITEM_SHIELD_MIRROR
|
||||
gItemIconTunicKokiriTex, // ITEM_TUNIC_KOKIRI
|
||||
gItemIconTunicGoronTex, // ITEM_TUNIC_GORON
|
||||
gItemIconTunicZoraTex, // ITEM_TUNIC_ZORA
|
||||
gItemIconBootsKokiriTex, // ITEM_BOOTS_KOKIRI
|
||||
gItemIconBootsIronTex, // ITEM_BOOTS_IRON
|
||||
gItemIconBootsHoverTex, // ITEM_BOOTS_HOVER
|
||||
gItemIconBulletBag30Tex, // ITEM_BULLET_BAG_30
|
||||
gItemIconBulletBag40Tex, // ITEM_BULLET_BAG_40
|
||||
gItemIconBulletBag50Tex, // ITEM_BULLET_BAG_50
|
||||
gItemIconQuiver30Tex, // ITEM_QUIVER_30
|
||||
gItemIconQuiver40Tex, // ITEM_QUIVER_40
|
||||
gItemIconQuiver50Tex, // ITEM_QUIVER_50
|
||||
gItemIconBombBag20Tex, // ITEM_BOMB_BAG_20
|
||||
gItemIconBombBag30Tex, // ITEM_BOMB_BAG_30
|
||||
gItemIconBombBag40Tex, // ITEM_BOMB_BAG_40
|
||||
gItemIconGoronsBraceletTex, // ITEM_STRENGTH_GORONS_BRACELET
|
||||
gItemIconSilverGauntletsTex, // ITEM_STRENGTH_SILVER_GAUNTLETS
|
||||
gItemIconGoldenGauntletsTex, // ITEM_STRENGTH_GOLD_GAUNTLETS
|
||||
gItemIconScaleSilverTex, // ITEM_SCALE_SILVER
|
||||
gItemIconScaleGoldenTex, // ITEM_SCALE_GOLDEN
|
||||
gItemIconBrokenGiantsKnifeTex, // ITEM_GIANTS_KNIFE
|
||||
gItemIconAdultsWalletTex, // ITEM_ADULTS_WALLET
|
||||
gItemIconGiantsWalletTex, // ITEM_GIANTS_WALLET
|
||||
gItemIconDekuSeedsTex, // ITEM_DEKU_SEEDS
|
||||
gItemIconFishingPoleTex, // ITEM_FISHING_POLE
|
||||
// icon_item_static 16x24 ia8
|
||||
gSongNoteTex, // ITEM_SONG_MINUET
|
||||
gSongNoteTex, // ITEM_SONG_BOLERO
|
||||
gSongNoteTex, // ITEM_SONG_SERENADE
|
||||
gSongNoteTex, // ITEM_SONG_REQUIEM
|
||||
gSongNoteTex, // ITEM_SONG_NOCTURNE
|
||||
gSongNoteTex, // ITEM_SONG_PRELUDE
|
||||
gSongNoteTex, // ITEM_SONG_LULLABY
|
||||
gSongNoteTex, // ITEM_SONG_EPONA
|
||||
gSongNoteTex, // ITEM_SONG_SARIA
|
||||
gSongNoteTex, // ITEM_SONG_SUN
|
||||
gSongNoteTex, // ITEM_SONG_TIME
|
||||
gSongNoteTex, // ITEM_SONG_STORMS
|
||||
// icon_item_24static 24x24 rgba32
|
||||
gQuestIconMedallionForestTex, // ITEM_MEDALLION_FOREST
|
||||
gQuestIconMedallionFireTex, // ITEM_MEDALLION_FIRE
|
||||
gQuestIconMedallionWaterTex, // ITEM_MEDALLION_WATER
|
||||
gQuestIconMedallionSpiritTex, // ITEM_MEDALLION_SPIRIT
|
||||
gQuestIconMedallionShadowTex, // ITEM_MEDALLION_SHADOW
|
||||
gQuestIconMedallionLightTex, // ITEM_MEDALLION_LIGHT
|
||||
gQuestIconKokiriEmeraldTex, // ITEM_KOKIRI_EMERALD
|
||||
gQuestIconGoronRubyTex, // ITEM_GORON_RUBY
|
||||
gQuestIconZoraSapphireTex, // ITEM_ZORA_SAPPHIRE
|
||||
gQuestIconStoneOfAgonyTex, // ITEM_STONE_OF_AGONY
|
||||
gQuestIconGerudosCardTex, // ITEM_GERUDOS_CARD
|
||||
gQuestIconGoldSkulltulaTex, // ITEM_SKULL_TOKEN
|
||||
gQuestIconHeartContainerTex, // ITEM_HEART_CONTAINER
|
||||
gQuestIconHeartPieceTex, // ITEM_HEART_PIECE
|
||||
gQuestIconDungeonBossKeyTex, // ITEM_DUNGEON_BOSS_KEY
|
||||
gQuestIconDungeonMapTex, // ITEM_DUNGEON_COMPASS (swapped with map (inconsequential))
|
||||
gQuestIconDungeonCompassTex, // ITEM_DUNGEON_MAP (swapped with compass (inconsequential))
|
||||
gQuestIconDungeonBossKeyTex, // ITEM_SMALL_KEY (but texture is boss key (inconsequential))
|
||||
gQuestIconMagicJarSmallTex, // ITEM_MAGIC_JAR_SMALL
|
||||
gQuestIconMagicJarBigTex, // ITEM_MAGIC_JAR_BIG
|
||||
// icon_item_static 48x48 ia8
|
||||
gHeartPieceIcon1Tex, // ITEM_HEART_PIECE_2
|
||||
gHeartPieceIcon2Tex, // ITEM_INVALID_1
|
||||
gHeartPieceIcon3Tex, // ITEM_INVALID_2
|
||||
// parameter_static 16x16 ia8
|
||||
gOcarinaBtnIconCUpTex, // ITEM_INVALID_3
|
||||
gOcarinaBtnIconCDownTex, // ITEM_INVALID_4
|
||||
gOcarinaBtnIconCLeftTex, // ITEM_INVALID_5
|
||||
gOcarinaBtnIconCRightTex, // ITEM_INVALID_6
|
||||
gOcarinaBtnIconATex, // ITEM_INVALID_7
|
||||
};
|
||||
|
||||
// Used to map item IDs to inventory slots
|
||||
|
|
|
@ -1025,7 +1025,7 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
|
|||
}
|
||||
|
||||
s32 func_8002DEEC(Player* player) {
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != 0);
|
||||
return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != PLAYER_CSMODE_NONE);
|
||||
}
|
||||
|
||||
void func_8002DF18(PlayState* play, Player* player) {
|
||||
|
@ -1570,7 +1570,30 @@ u32 Actor_HasParent(Actor* actor, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
|
||||
/**
|
||||
* This function covers various interactions with the player actor, using Get Item IDs (see `GetItemID` enum).
|
||||
* It is typically used to give items to the player, but also has other purposes.
|
||||
*
|
||||
* This function carries a get item request to the player actor if context allows it (e.g. the player is in range and
|
||||
* not busy with certain things). The player actor performs the requested action itself.
|
||||
*
|
||||
* The following description of what the `getItemId` values can do is provided here for completeness, but these
|
||||
* behaviors are entirely out of the scope of this function. All behavior is defined by the player actor.
|
||||
*
|
||||
* - Positive values (`GI_NONE < getItemId < GI_MAX`):
|
||||
* Give an item to the player. The player may not get it immediately (for example if diving), but is expected to
|
||||
* in the near future.
|
||||
* - Negative values (`-GI_MAX < getItemId < GI_NONE`):
|
||||
* Used by treasure chests to indicate the chest can be opened (by pressing A).
|
||||
* The item gotten corresponds to the positive Get Item ID `abs(getItemId)`.
|
||||
* - `GI_NONE`:
|
||||
* Allows the player to pick up the actor (by pressing A), to carry it around.
|
||||
* - `GI_MAX`:
|
||||
* Allows the player to catch specific actors in a bottle.
|
||||
*
|
||||
* @return true If the player actor is capable of accepting the offer.
|
||||
*/
|
||||
s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (!(player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_12 | PLAYER_STATE1_13 | PLAYER_STATE1_14 |
|
||||
|
@ -1596,12 +1619,12 @@ s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32
|
|||
return false;
|
||||
}
|
||||
|
||||
void func_8002F554(Actor* actor, PlayState* play, s32 getItemId) {
|
||||
func_8002F434(actor, play, getItemId, 50.0f, 10.0f);
|
||||
s32 Actor_OfferGetItemNearby(Actor* actor, PlayState* play, s32 getItemId) {
|
||||
return Actor_OfferGetItem(actor, play, getItemId, 50.0f, 10.0f);
|
||||
}
|
||||
|
||||
void func_8002F580(Actor* actor, PlayState* play) {
|
||||
func_8002F554(actor, play, GI_NONE);
|
||||
s32 Actor_OfferCarry(Actor* actor, PlayState* play) {
|
||||
return Actor_OfferGetItemNearby(actor, play, GI_NONE);
|
||||
}
|
||||
|
||||
u32 Actor_HasNoParent(Actor* actor, PlayState* play) {
|
||||
|
@ -1627,11 +1650,11 @@ void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play) {
|
|||
actorA->parent = NULL;
|
||||
}
|
||||
|
||||
void func_8002F5F0(Actor* actor, PlayState* play) {
|
||||
void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (actor->xyzDistToPlayerSq < player->unk_6A4) {
|
||||
player->unk_6A4 = actor->xyzDistToPlayerSq;
|
||||
if (actor->xyzDistToPlayerSq < player->closestSecretDistSq) {
|
||||
player->closestSecretDistSq = actor->xyzDistToPlayerSq;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2218,25 +2241,25 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
|||
if (actor->colorFilterTimer != 0) {
|
||||
Color_RGBA8 color = { 0, 0, 0, 255 };
|
||||
|
||||
if (actor->colorFilterParams & 0x8000) {
|
||||
color.r = color.g = color.b = ((actor->colorFilterParams & 0x1F00) >> 5) | 7;
|
||||
} else if (actor->colorFilterParams & 0x4000) {
|
||||
color.r = ((actor->colorFilterParams & 0x1F00) >> 5) | 7;
|
||||
if (actor->colorFilterParams & COLORFILTER_COLORFLAG_GRAY) {
|
||||
color.r = color.g = color.b = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7;
|
||||
} else if (actor->colorFilterParams & COLORFILTER_COLORFLAG_RED) {
|
||||
color.r = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7;
|
||||
} else {
|
||||
color.b = ((actor->colorFilterParams & 0x1F00) >> 5) | 7;
|
||||
color.b = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7;
|
||||
}
|
||||
|
||||
if (actor->colorFilterParams & 0x2000) {
|
||||
func_80026860(play, &color, actor->colorFilterTimer, actor->colorFilterParams & 0xFF);
|
||||
if (actor->colorFilterParams & COLORFILTER_BUFFLAG_XLU) {
|
||||
func_80026860(play, &color, actor->colorFilterTimer, COLORFILTER_GET_DURATION(actor->colorFilterParams));
|
||||
} else {
|
||||
func_80026400(play, &color, actor->colorFilterTimer, actor->colorFilterParams & 0xFF);
|
||||
func_80026400(play, &color, actor->colorFilterTimer, COLORFILTER_GET_DURATION(actor->colorFilterParams));
|
||||
}
|
||||
}
|
||||
|
||||
actor->draw(actor, play);
|
||||
|
||||
if (actor->colorFilterTimer != 0) {
|
||||
if (actor->colorFilterParams & 0x2000) {
|
||||
if (actor->colorFilterParams & COLORFILTER_BUFFLAG_XLU) {
|
||||
func_80026A6C(play);
|
||||
} else {
|
||||
func_80026608(play);
|
||||
|
@ -2500,7 +2523,10 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
|
|||
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 6563);
|
||||
}
|
||||
|
||||
void func_80031A28(PlayState* play, ActorContext* actorCtx) {
|
||||
/**
|
||||
* Kill every actor which depends on an object that is not loaded.
|
||||
*/
|
||||
void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) {
|
||||
Actor* actor;
|
||||
s32 i;
|
||||
|
||||
|
@ -2530,6 +2556,9 @@ void Actor_FreezeAllEnemies(PlayState* play, ActorContext* actorCtx, s32 duratio
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill actors on room change and update flags accordingly
|
||||
*/
|
||||
void func_80031B14(PlayState* play, ActorContext* actorCtx) {
|
||||
Actor* actor;
|
||||
s32 i;
|
||||
|
@ -3633,12 +3662,12 @@ void func_8003424C(PlayState* play, Vec3f* arg1) {
|
|||
CollisionCheck_SpawnShieldParticlesMetal(play, arg1);
|
||||
}
|
||||
|
||||
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration) {
|
||||
if ((colorFlag == 0x8000) && !(colorIntensityMax & 0x8000)) {
|
||||
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 bufFlag, s16 duration) {
|
||||
if ((colorFlag == COLORFILTER_COLORFLAG_GRAY) && !(colorIntensityMax & COLORFILTER_INTENSITY_FLAG)) {
|
||||
Audio_PlayActorSfx2(actor, NA_SE_EN_LIGHT_ARROW_HIT);
|
||||
}
|
||||
|
||||
actor->colorFilterParams = colorFlag | xluFlag | ((colorIntensityMax & 0xF8) << 5) | duration;
|
||||
actor->colorFilterParams = colorFlag | bufFlag | ((colorIntensityMax & 0xF8) << 5) | duration;
|
||||
actor->colorFilterTimer = duration;
|
||||
}
|
||||
|
||||
|
@ -4061,7 +4090,7 @@ s32 func_80035124(Actor* actor, PlayState* play) {
|
|||
ret = 1;
|
||||
} else {
|
||||
actor->shape.rot.x = actor->shape.rot.z = 0;
|
||||
func_8002F580(actor, play);
|
||||
Actor_OfferCarry(actor, play);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -5260,7 +5260,7 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, CAM_HUD_VISIBILITY(rwData->curKeyFrame->unk_01), 0));
|
||||
} else if (camera->player->stateFlags1 & PLAYER_STATE1_27 &&
|
||||
player->currentBoots != PLAYER_BOOTS_IRON) {
|
||||
func_8002DF38(camera->play, camera->target, 8);
|
||||
func_8002DF38(camera->play, camera->target, PLAYER_CSMODE_8);
|
||||
osSyncPrintf("camera: demo: player demo set WAIT\n");
|
||||
} else {
|
||||
osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->unk_01);
|
||||
|
@ -5464,9 +5464,9 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
rwData->rollTarget = CAM_DEG_TO_BINANG(rwData->curKeyFrame->rollTargetInit);
|
||||
}
|
||||
|
||||
action = rwData->curKeyFrame->actionFlags & 0x1F;
|
||||
action = ONEPOINT_CS_GET_ACTION(rwData->curKeyFrame);
|
||||
switch (action) {
|
||||
case 15:
|
||||
case ONEPOINT_CS_ACTION_ID_15:
|
||||
// static copy to at/eye/fov/roll
|
||||
*at = rwData->atTarget;
|
||||
*eyeNext = rwData->eyeTarget;
|
||||
|
@ -5474,7 +5474,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->roll = rwData->rollTarget;
|
||||
camera->stateFlags |= CAM_STATE_10;
|
||||
break;
|
||||
case 21:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_21:
|
||||
// same as 15, but with unk_38 ?
|
||||
if (rwData->unk_38 == 0) {
|
||||
rwData->unk_38 = 1;
|
||||
|
@ -5487,7 +5488,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->fov = rwData->fovTarget;
|
||||
camera->roll = rwData->rollTarget;
|
||||
break;
|
||||
case 16:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_16:
|
||||
// same as 21, but don't unset CAM_STATE_3 on stateFlags
|
||||
if (rwData->unk_38 == 0) {
|
||||
rwData->unk_38 = 1;
|
||||
|
@ -5500,7 +5502,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->fov = rwData->fovTarget;
|
||||
camera->roll = rwData->rollTarget;
|
||||
break;
|
||||
case 1:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_1:
|
||||
// linear interpolation of eye/at using the geographic coordinates
|
||||
OLib_Vec3fDiffToVecGeo(&eyeNextAtOffset, at, eyeNext);
|
||||
OLib_Vec3fDiffToVecGeo(&rwData->atEyeOffsetTarget, &rwData->atTarget, &rwData->eyeTarget);
|
||||
|
@ -5512,7 +5515,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
eyeNextAtOffset.yaw + ((s16)(rwData->atEyeOffsetTarget.yaw - eyeNextAtOffset.yaw) * invKeyFrameTimer);
|
||||
Camera_AddVecGeoToVec3f(&eyeTarget, at, &scratchGeo);
|
||||
goto setEyeNext;
|
||||
case 2:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_2:
|
||||
// linear interpolation of eye/at using the eyeTarget
|
||||
invKeyFrameTimer = 1.0f / rwData->keyFrameTimer;
|
||||
eyeTarget.x = F32_LERPIMP(camera->eyeNext.x, rwData->eyeTarget.x, invKeyFrameTimer);
|
||||
|
@ -5527,8 +5531,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->eyeNext.z =
|
||||
Camera_LERPFloorF(eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f);
|
||||
FALLTHROUGH;
|
||||
case 9:
|
||||
case 10:
|
||||
case ONEPOINT_CS_ACTION_ID_9:
|
||||
case ONEPOINT_CS_ACTION_ID_10:
|
||||
// linear interpolation of at/fov/roll
|
||||
invKeyFrameTimer = 1.0f / rwData->keyFrameTimer;
|
||||
atTarget.x = F32_LERPIMP(camera->at.x, rwData->atTarget.x, invKeyFrameTimer);
|
||||
|
@ -5542,7 +5546,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->roll = Camera_LERPFloorS(BINANG_LERPIMPINV(camera->roll, rwData->rollTarget, rwData->keyFrameTimer),
|
||||
camera->roll, rwData->curKeyFrame->lerpStepScale, 0xA);
|
||||
break;
|
||||
case 4:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_4:
|
||||
// linear interpolation of eye/at/fov/roll using the step scale, and spherical coordinates
|
||||
OLib_Vec3fDiffToVecGeo(&eyeNextAtOffset, at, eyeNext);
|
||||
OLib_Vec3fDiffToVecGeo(&rwData->atEyeOffsetTarget, &rwData->atTarget, &rwData->eyeTarget);
|
||||
|
@ -5554,7 +5559,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
rwData->curKeyFrame->lerpStepScale, 1);
|
||||
Camera_AddVecGeoToVec3f(eyeNext, at, &scratchGeo);
|
||||
goto setAtFOVRoll;
|
||||
case 3:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_3:
|
||||
// linear interplation of eye/at/fov/roll using the step scale using eyeTarget
|
||||
camera->eyeNext.x =
|
||||
Camera_LERPCeilF(rwData->eyeTarget.x, camera->eyeNext.x, rwData->curKeyFrame->lerpStepScale, 1.0f);
|
||||
|
@ -5563,8 +5569,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->eyeNext.z =
|
||||
Camera_LERPCeilF(rwData->eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f);
|
||||
FALLTHROUGH;
|
||||
case 11:
|
||||
case 12:
|
||||
case ONEPOINT_CS_ACTION_ID_11:
|
||||
case ONEPOINT_CS_ACTION_ID_12:
|
||||
setAtFOVRoll:
|
||||
// linear interpolation of at/fov/roll using the step scale.
|
||||
camera->at.x = Camera_LERPCeilF(rwData->atTarget.x, camera->at.x, rwData->curKeyFrame->lerpStepScale, 1.0f);
|
||||
|
@ -5573,7 +5579,8 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->fov = Camera_LERPCeilF(rwData->fovTarget, camera->fov, rwData->curKeyFrame->lerpStepScale, 1.0f);
|
||||
camera->roll = Camera_LERPCeilS(rwData->rollTarget, camera->roll, rwData->curKeyFrame->lerpStepScale, 1);
|
||||
break;
|
||||
case 13:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_13:
|
||||
// linear interpolation of at, with rotation around eyeTargetInit.y
|
||||
camera->at.x = Camera_LERPCeilF(rwData->atTarget.x, camera->at.x, rwData->curKeyFrame->lerpStepScale, 1.0f);
|
||||
camera->at.y += camera->playerPosDelta.y * rwData->curKeyFrame->lerpStepScale;
|
||||
|
@ -5603,18 +5610,20 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
camera->fov, rwData->curKeyFrame->lerpStepScale, 1.0f);
|
||||
camera->roll = Camera_LERPCeilS(rwData->rollTarget, camera->roll, rwData->curKeyFrame->lerpStepScale, 1);
|
||||
break;
|
||||
case 24:
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_24:
|
||||
// Set current keyframe to the roll target?
|
||||
rwData->curKeyFrameIdx = rwData->rollTarget;
|
||||
break;
|
||||
case 19: {
|
||||
|
||||
case ONEPOINT_CS_ACTION_ID_19: {
|
||||
// Change the parent camera (or default)'s mode to normal
|
||||
s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId;
|
||||
|
||||
Camera_ChangeModeFlags(camera->play->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1);
|
||||
}
|
||||
FALLTHROUGH;
|
||||
case 18: {
|
||||
case ONEPOINT_CS_ACTION_ID_18: {
|
||||
// copy the current camera to the parent (or default)'s camera.
|
||||
s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId;
|
||||
Camera* cam = camera->play->cameraPtrs[camIdx];
|
||||
|
@ -5632,11 +5641,11 @@ s32 Camera_Unique9(Camera* camera) {
|
|||
|
||||
*eye = *eyeNext;
|
||||
|
||||
if (rwData->curKeyFrame->actionFlags & 0x80) {
|
||||
if (rwData->curKeyFrame->actionFlags & ONEPOINT_CS_ACTION_FLAG_BGCHECK) {
|
||||
Camera_BGCheck(camera, at, eye);
|
||||
}
|
||||
|
||||
if (rwData->curKeyFrame->actionFlags & 0x40) {
|
||||
if (rwData->curKeyFrame->actionFlags & ONEPOINT_CS_ACTION_FLAG_40) {
|
||||
// Set the player's position
|
||||
camera->player->actor.world.pos.x = rwData->playerPos.x;
|
||||
camera->player->actor.world.pos.z = rwData->playerPos.z;
|
||||
|
@ -6072,7 +6081,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D79C);
|
||||
if ((targetScreenPosX < 0x15) || (targetScreenPosX >= 0x12C) || (targetScreenPosY < 0x29) ||
|
||||
(targetScreenPosY >= 0xC8)) {
|
||||
D_8011D79C[0].actionFlags = 0x41;
|
||||
D_8011D79C[0].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false);
|
||||
D_8011D79C[0].atTargetInit.y = -30.0f;
|
||||
D_8011D79C[0].atTargetInit.x = 0.0f;
|
||||
D_8011D79C[0].atTargetInit.z = 0.0f;
|
||||
|
@ -6156,8 +6165,8 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
targethead.pos.x += 50.0f * Math_SinS(sp4A - 0x7FFF);
|
||||
targethead.pos.z += 50.0f * Math_CosS(sp4A - 0x7FFF);
|
||||
if (Camera_BGCheck(camera, &playerhead.pos, &targethead.pos)) {
|
||||
D_8011D954[1].actionFlags = 0xC1;
|
||||
D_8011D954[2].actionFlags = 0x8F;
|
||||
D_8011D954[1].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true);
|
||||
D_8011D954[2].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true);
|
||||
} else {
|
||||
D_8011D954[2].timerInit = (s16)(eyeTargetDist * 0.004f) + 6;
|
||||
}
|
||||
|
@ -6181,7 +6190,7 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
Actor_GetFocus(&targethead, camera->target);
|
||||
if (Camera_BGCheck(camera, &playerhead.pos, &targethead.pos)) {
|
||||
D_8011D9F4[1].timerInit = 4;
|
||||
D_8011D9F4[1].actionFlags = 0x8F;
|
||||
D_8011D9F4[1].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true);
|
||||
} else {
|
||||
t = eyeTargetDist * 0.005f;
|
||||
D_8011D9F4[1].timerInit = t + 8;
|
||||
|
@ -6218,14 +6227,14 @@ s32 Camera_Demo5(Camera* camera) {
|
|||
framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame;
|
||||
if (player->stateFlags1 & PLAYER_STATE1_11) {
|
||||
// holding object over head.
|
||||
func_8002DF54(camera->play, camera->target, 8);
|
||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_8);
|
||||
} else if (ABS(framesDiff) > 3000) {
|
||||
func_8002DF54(camera->play, camera->target, 12);
|
||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_12);
|
||||
} else {
|
||||
func_8002DF54(camera->play, camera->target, 69);
|
||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_69);
|
||||
}
|
||||
} else {
|
||||
func_8002DF54(camera->play, camera->target, 1);
|
||||
func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6285,7 +6294,7 @@ s32 Camera_Demo6(Camera* camera) {
|
|||
FALLTHROUGH;
|
||||
case 1:
|
||||
if (stateTimers[camera->animState] < rwData->animTimer) {
|
||||
func_8002DF54(camera->play, &camera->player->actor, 8);
|
||||
func_8002DF54(camera->play, &camera->player->actor, PLAYER_CSMODE_8);
|
||||
Actor_GetWorld(&focusPosRot, camFocus);
|
||||
rwData->atTarget.x = focusPosRot.pos.x;
|
||||
rwData->atTarget.y = focusPosRot.pos.y - 20.0f;
|
||||
|
@ -7813,8 +7822,8 @@ void Camera_Finish(Camera* camera) {
|
|||
player->actor.freezeTimer = 0;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_29;
|
||||
|
||||
if (player->csMode != 0) {
|
||||
func_8002DF54(camera->play, &player->actor, 7);
|
||||
if (player->csMode != PLAYER_CSMODE_NONE) {
|
||||
func_8002DF54(camera->play, &player->actor, PLAYER_CSMODE_7);
|
||||
osSyncPrintf("camera: player demo end!!\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -2675,105 +2675,311 @@ s32 sDemo5PrevSfxFrame = -200;
|
|||
|
||||
// target is player, far from eye
|
||||
OnePointCsFull D_8011D6AC[] = {
|
||||
{ // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit
|
||||
// initFlags & 0xFF00 (eye): none
|
||||
// action: 15, copy at, eye, roll, fov to camera
|
||||
// result: eye remains in the same locaiton, at is View's lookAt
|
||||
0x8F,
|
||||
0xFF,
|
||||
0x0002,
|
||||
0x0001,
|
||||
0x0000,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f } },
|
||||
{ // initFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit
|
||||
// initFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit
|
||||
// action: interplate eye and at.
|
||||
// result: eye and at's y interpolate to become +20 from their current location.
|
||||
0x81,
|
||||
0xFF,
|
||||
0x0303,
|
||||
0x0013,
|
||||
0x0000,
|
||||
45.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 20.0f, 0.0f },
|
||||
{ 0.0f, 20.0f, 0.0f } },
|
||||
{ // initFlags & 0x00FF (at): 0 none
|
||||
// initFlags & 0xFF00 (eye): 0 none
|
||||
// action: 18, copy this camera to default camera.
|
||||
0x12,
|
||||
0xFF,
|
||||
0x0000,
|
||||
0x0001,
|
||||
0x0000,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
// initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit
|
||||
// initFlags & 0xFF00 (eye): none
|
||||
// action: 15, copy at, eye, roll, fov to camera
|
||||
// result: eye remains in the same location, at is View's lookAt
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
0x0002,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
},
|
||||
{
|
||||
// initFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit
|
||||
// initFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit
|
||||
// action: interpolate eye and at.
|
||||
// result: eye and at's y interpolate to become +20 from their current location.
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
|
||||
0xFF,
|
||||
0x0303,
|
||||
19,
|
||||
0,
|
||||
45.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 20.0f, 0.0f },
|
||||
{ 0.0f, 20.0f, 0.0f },
|
||||
},
|
||||
{
|
||||
// initFlags & 0x00FF (at): 0 none
|
||||
// initFlags & 0xFF00 (eye): 0 none
|
||||
// action: 18, copy this camera to default camera.
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
// target is player close to current eye
|
||||
OnePointCsFull D_8011D724[] = {
|
||||
{ 0x8F, 0xFF, 0x2424, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, -20.0f } },
|
||||
{ 0x81, 0xFF, 0x2121, 0x0013, 0x0000, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 60.0f } },
|
||||
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
0x2424,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 10.0f, -20.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
|
||||
0xFF,
|
||||
0x2121,
|
||||
19,
|
||||
0,
|
||||
50.0f,
|
||||
1.0f,
|
||||
{ 0.0f, -10.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 60.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
// target is close to player
|
||||
OnePointCsFull D_8011D79C[] = {
|
||||
{ 0xCF, 0xFF, 0x0002, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 0xC1, 0xFF, 0x0303, 0x0013, 0x0000, 45.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, -10.0f, 5.0f } },
|
||||
{
|
||||
0xC1,
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, true),
|
||||
0xFF,
|
||||
0x0002,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true),
|
||||
0xFF,
|
||||
0x0303,
|
||||
0x0009,
|
||||
0x0000,
|
||||
19,
|
||||
0,
|
||||
45.0f,
|
||||
1.0f,
|
||||
{ 0.0f, -20.0f, 0.0f },
|
||||
{ 0.0f, -10.0f, 5.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true),
|
||||
0xFF,
|
||||
0x0303,
|
||||
9,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 10.0f, 0.0f },
|
||||
{ 0.0f, 10.0f, 0.0f },
|
||||
},
|
||||
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
// target is within 300 units of eye, and player is within 30 units of eye
|
||||
OnePointCsFull D_8011D83C[] = {
|
||||
{ 0x83, 0xFF, 0x2141, 0x0014, 0x0000, 45.0f, 0.2f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 10.0f } },
|
||||
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
||||
0xFF,
|
||||
0x2141,
|
||||
20,
|
||||
0,
|
||||
45.0f,
|
||||
0.2f,
|
||||
{ 0.0f, 0.0f, 10.0f },
|
||||
{ 0.0f, 0.0f, 10.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
// target is within 700 units of eye, angle between player/eye and target/eye is less than
|
||||
// 76.9 degrees. The x/y coordinates of the target on screen is between (21, 41) and (300, 200),
|
||||
// and the player is farther than 30 units of the eye
|
||||
OnePointCsFull D_8011D88C[] = {
|
||||
{ 0x81, 0xFF, 0x0303, 0x0014, 0x0000, 45.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
|
||||
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
|
||||
0xFF,
|
||||
0x0303,
|
||||
20,
|
||||
0,
|
||||
45.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
// same as above, but the target is NOT within the screen area.
|
||||
OnePointCsFull D_8011D8DC[] = {
|
||||
{ 0x8F, 0xFF, 0x0404, 0x0014, 0x0001, 50.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } },
|
||||
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0000, 60.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 5.0f, 5.0f, -200.0f } },
|
||||
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
0x0404,
|
||||
20,
|
||||
1,
|
||||
50.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 5.0f, 10.0f },
|
||||
{ 0.0f, 10.0f, -80.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
|
||||
0xFF,
|
||||
0x2121,
|
||||
5,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 5.0f, 0.0f },
|
||||
{ 5.0f, 5.0f, -200.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
// target is a door.
|
||||
OnePointCsFull D_8011D954[] = {
|
||||
{ 0x0F, 0xFF, 0xC1C1, 0x0014, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 50.0f }, { 0.0f, 0.0f, 250.0f } },
|
||||
{ 0x83, 0xFF, 0x05B1, 0x0005, 0x0000, 60.0f, 0.1f, { 0.0f, 10.0f, 50.0f }, { 0.0f, 10.0f, 100.0f } },
|
||||
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
|
||||
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
|
||||
0xFF,
|
||||
0xC1C1,
|
||||
20,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 50.0f },
|
||||
{ 0.0f, 0.0f, 250.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
|
||||
0xFF,
|
||||
0x05B1,
|
||||
5,
|
||||
0,
|
||||
60.0f,
|
||||
0.1f,
|
||||
{ 0.0f, 10.0f, 50.0f },
|
||||
{ 0.0f, 10.0f, 100.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
|
||||
0xFF,
|
||||
0x2121,
|
||||
5,
|
||||
2,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 10.0f, 0.0f },
|
||||
{ 0.0f, 20.0f, -150.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
// otherwise
|
||||
OnePointCsFull D_8011D9F4[] = {
|
||||
{ 0x8F, 0xFF, 0x0504, 0x0014, 0x0002, 60.0f, 1.0f, { 0.0f, 5.0f, 50.0f }, { 0.0f, 20.0f, 300.0f } },
|
||||
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
|
||||
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
|
||||
0xFF,
|
||||
0x0504,
|
||||
20,
|
||||
2,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 5.0f, 50.0f },
|
||||
{ 0.0f, 20.0f, 300.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
|
||||
0xFF,
|
||||
0x2121,
|
||||
5,
|
||||
2,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 10.0f, 0.0f },
|
||||
{ 0.0f, 20.0f, -150.0f },
|
||||
},
|
||||
{
|
||||
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
|
||||
0xFF,
|
||||
0x0000,
|
||||
1,
|
||||
0,
|
||||
60.0f,
|
||||
1.0f,
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
{ -1.0f, -1.0f, -1.0f },
|
||||
},
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -4,6 +4,8 @@ void Interface_Destroy(PlayState* play) {
|
|||
Map_Destroy(play);
|
||||
}
|
||||
|
||||
#define ICON_ITEM_SEGMENT_SIZE (4 * ITEM_ICON_SIZE)
|
||||
|
||||
void Interface_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
u32 parameterSize;
|
||||
|
@ -70,10 +72,10 @@ void Interface_Init(PlayState* play) {
|
|||
(uintptr_t)_do_action_staticSegmentRomStart + doActionOffset, DO_ACTION_TEX_SIZE,
|
||||
"../z_construct.c", 178);
|
||||
|
||||
interfaceCtx->iconItemSegment = GameState_Alloc(&play->state, 4 * ICON_ITEM_TEX_SIZE, "../z_construct.c", 190);
|
||||
interfaceCtx->iconItemSegment = GameState_Alloc(&play->state, ICON_ITEM_SEGMENT_SIZE, "../z_construct.c", 190);
|
||||
|
||||
// "Icon Item Texture Initialization = %x"
|
||||
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 4 * ICON_ITEM_TEX_SIZE);
|
||||
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", ICON_ITEM_SEGMENT_SIZE);
|
||||
osSyncPrintf("parameter->icon_itemSegment=%x\n", interfaceCtx->iconItemSegment);
|
||||
|
||||
ASSERT(interfaceCtx->iconItemSegment != NULL, "parameter->icon_itemSegment != NULL", "../z_construct.c", 193);
|
||||
|
@ -83,36 +85,31 @@ void Interface_Init(PlayState* play) {
|
|||
gSaveContext.equips.buttonItems[3]);
|
||||
|
||||
if (gSaveContext.equips.buttonItems[0] < 0xF0) {
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart +
|
||||
gSaveContext.equips.buttonItems[0] * ICON_ITEM_TEX_SIZE,
|
||||
ICON_ITEM_TEX_SIZE, "../z_construct.c", 198);
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (0 * ITEM_ICON_SIZE),
|
||||
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[0]), ITEM_ICON_SIZE,
|
||||
"../z_construct.c", 198);
|
||||
} else if (gSaveContext.equips.buttonItems[0] != 0xFF) {
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart +
|
||||
gSaveContext.equips.buttonItems[0] * ICON_ITEM_TEX_SIZE,
|
||||
ICON_ITEM_TEX_SIZE, "../z_construct.c", 203);
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (0 * ITEM_ICON_SIZE),
|
||||
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[0]), ITEM_ICON_SIZE,
|
||||
"../z_construct.c", 203);
|
||||
}
|
||||
|
||||
if (gSaveContext.equips.buttonItems[1] < 0xF0) {
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + ICON_ITEM_TEX_SIZE,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart +
|
||||
gSaveContext.equips.buttonItems[1] * ICON_ITEM_TEX_SIZE,
|
||||
ICON_ITEM_TEX_SIZE, "../z_construct.c", 209);
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (1 * ITEM_ICON_SIZE),
|
||||
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[1]), ITEM_ICON_SIZE,
|
||||
"../z_construct.c", 209);
|
||||
}
|
||||
|
||||
if (gSaveContext.equips.buttonItems[2] < 0xF0) {
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + 2 * ICON_ITEM_TEX_SIZE,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart +
|
||||
gSaveContext.equips.buttonItems[2] * ICON_ITEM_TEX_SIZE,
|
||||
ICON_ITEM_TEX_SIZE, "../z_construct.c", 214);
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (2 * ITEM_ICON_SIZE),
|
||||
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[2]), ITEM_ICON_SIZE,
|
||||
"../z_construct.c", 214);
|
||||
}
|
||||
|
||||
if (gSaveContext.equips.buttonItems[3] < 0xF0) {
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + 3 * ICON_ITEM_TEX_SIZE,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart +
|
||||
gSaveContext.equips.buttonItems[3] * ICON_ITEM_TEX_SIZE,
|
||||
ICON_ITEM_TEX_SIZE, "../z_construct.c", 219);
|
||||
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (3 * ITEM_ICON_SIZE),
|
||||
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[3]), ITEM_ICON_SIZE,
|
||||
"../z_construct.c", 219);
|
||||
}
|
||||
|
||||
osSyncPrintf("EVENT=%d\n", ((void)0, gSaveContext.timerState));
|
||||
|
@ -173,6 +170,9 @@ void Interface_Init(PlayState* play) {
|
|||
R_A_BTN_COLOR(2) = 50;
|
||||
}
|
||||
|
||||
#define TEXTBOX_SEGMENT_SIZE \
|
||||
(MESSAGE_STATIC_TEX_SIZE + MAX(MAX(ITEM_ICON_SIZE, QUEST_ICON_SIZE), 2 * MESSAGE_TEXTURE_STATIC_TEX_SIZE))
|
||||
|
||||
void Message_Init(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
s32 pad;
|
||||
|
@ -188,15 +188,11 @@ void Message_Init(PlayState* play) {
|
|||
|
||||
View_Init(&msgCtx->view, play->state.gfxCtx);
|
||||
|
||||
msgCtx->textboxSegment =
|
||||
GameState_Alloc(&play->state,
|
||||
MESSAGE_STATIC_TEX_SIZE +
|
||||
MAX(MAX(ICON_ITEM_TEX_SIZE, ICON_ITEM_24_TEX_SIZE), 2 * MESSAGE_TEXTURE_STATIC_TEX_SIZE),
|
||||
"../z_construct.c", 349);
|
||||
msgCtx->textboxSegment = GameState_Alloc(&play->state, TEXTBOX_SEGMENT_SIZE, "../z_construct.c", 349);
|
||||
|
||||
osSyncPrintf("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
|
||||
|
||||
osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200); // "Textbox game_alloc=%x"
|
||||
osSyncPrintf("吹き出しgame_alloc=%x\n", TEXTBOX_SEGMENT_SIZE); // "Textbox game_alloc=%x"
|
||||
ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352);
|
||||
|
||||
Font_LoadOrderedFont(&play->msgCtx.font);
|
||||
|
@ -257,7 +253,7 @@ void Regs_InitDataImpl(void) {
|
|||
R_TEXTBOX_ICON_YPOS = 10;
|
||||
YREG(73) = -8;
|
||||
YREG(74) = 8;
|
||||
R_TEXTBOX_ICON_SIZE = 24;
|
||||
R_TEXTBOX_ICON_DIMENSION = 24;
|
||||
YREG(76) = 32;
|
||||
YREG(77) = 0;
|
||||
R_MESSAGE_DEBUGGER_SELECT = 0;
|
||||
|
|
|
@ -351,7 +351,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
|
||||
func_8002F554(&this->actor, play, getItemId);
|
||||
Actor_OfferGetItemNearby(&this->actor, play, getItemId);
|
||||
}
|
||||
|
||||
EnItem00_SetupAction(this, EnItem00_Collected);
|
||||
|
@ -498,7 +498,7 @@ void EnItem00_Collected(EnItem00* this, PlayState* play) {
|
|||
|
||||
if (this->getItemId != GI_NONE) {
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
func_8002F434(&this->actor, play, this->getItemId, 50.0f, 80.0f);
|
||||
Actor_OfferGetItem(&this->actor, play, this->getItemId, 50.0f, 80.0f);
|
||||
this->despawnTimer++;
|
||||
} else {
|
||||
this->getItemId = GI_NONE;
|
||||
|
@ -696,7 +696,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
params = &this->actor.params;
|
||||
|
||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
|
||||
func_8002F554(&this->actor, play, getItemId);
|
||||
Actor_OfferGetItemNearby(&this->actor, play, getItemId);
|
||||
}
|
||||
|
||||
switch (*params) {
|
||||
|
|
|
@ -755,17 +755,17 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
|
|||
gDPSetPrimColor(gfx++, 0, 0, 255, 255, 255, msgCtx->textColorAlpha);
|
||||
|
||||
if (itemId >= ITEM_MEDALLION_FOREST) {
|
||||
gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, 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);
|
||||
gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
||||
QUEST_ICON_WIDTH, QUEST_ICON_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);
|
||||
} else {
|
||||
gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32,
|
||||
32, 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);
|
||||
gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
||||
ITEM_ICON_WIDTH, ITEM_ICON_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(gfx++, (msgCtx->textPosX + R_TEXTBOX_ICON_XPOS) << 2, R_TEXTBOX_ICON_YPOS << 2,
|
||||
(msgCtx->textPosX + R_TEXTBOX_ICON_XPOS + R_TEXTBOX_ICON_SIZE) << 2,
|
||||
(R_TEXTBOX_ICON_YPOS + R_TEXTBOX_ICON_SIZE) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
(msgCtx->textPosX + R_TEXTBOX_ICON_XPOS + R_TEXTBOX_ICON_DIMENSION) << 2,
|
||||
(R_TEXTBOX_ICON_YPOS + R_TEXTBOX_ICON_DIMENSION) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
|
@ -1164,21 +1164,18 @@ void Message_LoadItemIcon(PlayState* play, u16 itemId, s16 y) {
|
|||
}
|
||||
if (itemId < ITEM_MEDALLION_FOREST) {
|
||||
R_TEXTBOX_ICON_XPOS = R_TEXT_INIT_XPOS - sIconItem32XOffsets[gSaveContext.language];
|
||||
R_TEXTBOX_ICON_YPOS = y + 6;
|
||||
R_TEXTBOX_ICON_SIZE = 32;
|
||||
DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart + (itemId * ICON_ITEM_TEX_SIZE),
|
||||
ICON_ITEM_TEX_SIZE, "../z_message_PAL.c", 1473);
|
||||
R_TEXTBOX_ICON_YPOS = y + ((44 - ITEM_ICON_HEIGHT) / 2);
|
||||
R_TEXTBOX_ICON_DIMENSION = ITEM_ICON_WIDTH; // assumes the image is square
|
||||
DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, GET_ITEM_ICON_VROM(itemId),
|
||||
ITEM_ICON_SIZE, "../z_message_PAL.c", 1473);
|
||||
// "Item 32-0"
|
||||
osSyncPrintf("アイテム32-0\n");
|
||||
} else {
|
||||
R_TEXTBOX_ICON_XPOS = R_TEXT_INIT_XPOS - sIconItem24XOffsets[gSaveContext.language];
|
||||
R_TEXTBOX_ICON_YPOS = y + 10;
|
||||
R_TEXTBOX_ICON_SIZE = 24;
|
||||
DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
|
||||
(uintptr_t)_icon_item_24_staticSegmentRomStart +
|
||||
(itemId - ITEM_MEDALLION_FOREST) * ICON_ITEM_24_TEX_SIZE,
|
||||
ICON_ITEM_24_TEX_SIZE, "../z_message_PAL.c", 1482);
|
||||
R_TEXTBOX_ICON_YPOS = y + ((44 - QUEST_ICON_HEIGHT) / 2);
|
||||
R_TEXTBOX_ICON_DIMENSION = QUEST_ICON_WIDTH; // assumes the image is square
|
||||
DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, GET_QUEST_ICON_VROM(itemId),
|
||||
QUEST_ICON_SIZE, "../z_message_PAL.c", 1482);
|
||||
// "Item 24"
|
||||
osSyncPrintf("アイテム24=%d (%d) {%d}\n", itemId, itemId - ITEM_KOKIRI_EMERALD, 84);
|
||||
}
|
||||
|
@ -1977,7 +1974,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
};
|
||||
static s16 sOcarinaEffectActorParams[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000 };
|
||||
static void* sOcarinaNoteTextures[] = {
|
||||
gOcarinaATex, gOcarinaCDownTex, gOcarinaCRightTex, gOcarinaCLeftTex, gOcarinaCUpTex,
|
||||
gOcarinaBtnIconATex, // OCARINA_BTN_A
|
||||
gOcarinaBtnIconCDownTex, // OCARINA_BTN_C_DOWN
|
||||
gOcarinaBtnIconCRightTex, // OCARINA_BTN_C_RIGHT
|
||||
gOcarinaBtnIconCLeftTex, // OCARINA_BTN_C_LEFT
|
||||
gOcarinaBtnIconCUpTex, // OCARINA_BTN_C_UP
|
||||
};
|
||||
static s16 sOcarinaButtonAPrimColors[][3] = {
|
||||
{ 80, 255, 150 },
|
||||
|
|
|
@ -147,7 +147,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCnt = 11;
|
||||
|
||||
for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
|
||||
if (D_80120B94[i].actionFlags != 0x8F) {
|
||||
if (D_80120B94[i].actionFlags != ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true)) {
|
||||
D_80120B94[i].atTargetInit.x = Rand_ZeroOne() * 5.0f;
|
||||
D_80120B94[i].atTargetInit.z = (Rand_ZeroOne() * 30.0f) + 10.0f;
|
||||
D_80120B94[i].eyeTargetInit.x = (Rand_ZeroOne() * 100.0f) + 20.0f;
|
||||
|
@ -169,7 +169,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCnt = 7;
|
||||
|
||||
for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
|
||||
if (D_80120D4C[i].actionFlags != 0x8F) {
|
||||
if (D_80120D4C[i].actionFlags != ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true)) {
|
||||
D_80120D4C[i].atTargetInit.x = Rand_ZeroOne() * 20.0f;
|
||||
D_80120D4C[i].atTargetInit.z = (Rand_ZeroOne() * 40.0f) + 10.0f;
|
||||
D_80120D4C[i].eyeTargetInit.x = (Rand_ZeroOne() * 40.0f) + 60.0f;
|
||||
|
@ -264,7 +264,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
case 2290: {
|
||||
Actor* rideActor = player->rideActor;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
if (rideActor != NULL) {
|
||||
rideActor->freezeTimer = 180;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
} break;
|
||||
case 5120:
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
|
||||
csInfo->keyFrames = D_80121314;
|
||||
csInfo->keyFrameCnt = 1;
|
||||
|
@ -285,7 +285,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
case 4510:
|
||||
D_8012133C[0].eyeTargetInit = actor->world.pos;
|
||||
D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f;
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
|
||||
csInfo->keyFrames = D_8012133C;
|
||||
csInfo->keyFrameCnt = 3;
|
||||
|
@ -303,7 +303,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
||||
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
||||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 50.0f;
|
||||
if (subCam->childCamId != CAM_ID_MAIN) {
|
||||
|
@ -317,7 +317,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
if (Rand_ZeroOne() < 0.0f) {
|
||||
D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x;
|
||||
}
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
|
||||
csInfo->keyFrames = D_801213B4;
|
||||
csInfo->keyFrameCnt = 5;
|
||||
|
@ -361,10 +361,10 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 6;
|
||||
subCam->fov = 75.0f;
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 3040:
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
D_8012151C[0].timerInit = timer - 1;
|
||||
|
||||
csInfo->keyFrames = D_8012151C;
|
||||
|
@ -388,7 +388,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCnt = 2;
|
||||
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 3010:
|
||||
D_801215BC[0].timerInit = timer;
|
||||
|
@ -416,7 +416,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3090:
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
|
||||
csInfo->keyFrames = D_80121814;
|
||||
csInfo->keyFrameCnt = 4;
|
||||
|
@ -432,14 +432,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 70.0f;
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 3380:
|
||||
case 3065:
|
||||
csInfo->keyFrames = D_801218B4;
|
||||
csInfo->keyFrameCnt = 2;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
|
||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||
|
@ -451,12 +451,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80121904;
|
||||
csInfo->keyFrameCnt = 2;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3050:
|
||||
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
||||
func_8002DF54(play, &player->actor, 5);
|
||||
func_8002DF54(play, &player->actor, PLAYER_CSMODE_5);
|
||||
OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos);
|
||||
|
@ -485,14 +485,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
subCam->stateFlags |= CAM_STATE_1;
|
||||
csInfo->keyFrameCnt = 2;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3130:
|
||||
csInfo->keyFrames = D_80121A44;
|
||||
csInfo->keyFrameCnt = 12;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
subCam->stateFlags |= CAM_STATE_1;
|
||||
break;
|
||||
|
@ -517,7 +517,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0x50;
|
||||
subCam->fov = 55.0f;
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 3170:
|
||||
Actor_GetWorld(&spA0, actor);
|
||||
|
@ -533,7 +533,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CopyCamera(play, CAM_ID_MAIN, subCamId);
|
||||
subCam->roll = -1;
|
||||
subCam->fov = 55.0f;
|
||||
func_8002DF38(play, actor, 1);
|
||||
func_8002DF38(play, actor, PLAYER_CSMODE_1);
|
||||
break;
|
||||
case 3160:
|
||||
Actor_GetWorld(&spA0, actor);
|
||||
|
@ -546,7 +546,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 55.0f;
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 3180:
|
||||
Actor_GetWorldPosShapeRot(&spA0, actor);
|
||||
|
@ -560,12 +560,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 60.0f;
|
||||
func_8002DF38(play, actor, 1);
|
||||
func_8002DF38(play, actor, PLAYER_CSMODE_1);
|
||||
break;
|
||||
case 3190:
|
||||
Play_CameraChangeSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
func_8002DF38(play, actor, 0xC);
|
||||
func_8002DF38(play, actor, PLAYER_CSMODE_12);
|
||||
break;
|
||||
case 3230:
|
||||
spC0.x = 120.0f;
|
||||
|
@ -578,7 +578,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0x1E;
|
||||
subCam->fov = 75.0f;
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
Actor_GetWorldPosShapeRot(&spA0, actor);
|
||||
Actor_GetFocus(&sp8C, &player->actor);
|
||||
spC0.x = sp8C.pos.x;
|
||||
|
@ -607,7 +607,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
||||
subCam->roll = 0;
|
||||
subCam->fov = 45.0f;
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 3220:
|
||||
Actor_GetFocus(&spA0, actor);
|
||||
|
@ -623,7 +623,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
subCam->roll = 0;
|
||||
subCam->fov = 75.0f;
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF;
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 3240:
|
||||
D_80121D3C[2].timerInit = timer - 5;
|
||||
|
@ -631,12 +631,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80121D3C;
|
||||
csInfo->keyFrameCnt = 3;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 6001:
|
||||
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
Actor_GetWorld(&spA0, actor);
|
||||
if (spA0.pos.z > -750.0f) {
|
||||
OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820);
|
||||
|
@ -651,7 +651,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
break;
|
||||
case 3400:
|
||||
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4);
|
||||
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos);
|
||||
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos);
|
||||
|
@ -667,12 +667,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80121DB4;
|
||||
csInfo->keyFrameCnt = 9;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3310:
|
||||
Play_CameraChangeSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE);
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
||||
|
||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||
|
@ -705,7 +705,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80121FBC;
|
||||
csInfo->keyFrameCnt = 4;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
|
||||
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
||||
|
@ -717,7 +717,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_8012205C;
|
||||
csInfo->keyFrameCnt = 3;
|
||||
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3350:
|
||||
|
@ -732,7 +732,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
D_801220D4[1].eyeTargetInit.y = 80.0f;
|
||||
D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x;
|
||||
}
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
|
||||
csInfo->keyFrames = D_801220D4;
|
||||
csInfo->keyFrameCnt = 5;
|
||||
|
@ -743,14 +743,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_8012219C;
|
||||
csInfo->keyFrameCnt = 7;
|
||||
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3410:
|
||||
csInfo->keyFrames = D_801222B4;
|
||||
csInfo->keyFrameCnt = 5;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
|
||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||
|
@ -762,7 +762,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_8012237C;
|
||||
csInfo->keyFrameCnt = 2;
|
||||
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
|
||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||
|
@ -774,7 +774,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_801223CC;
|
||||
csInfo->keyFrameCnt = 6;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
player->stateFlags1 |= PLAYER_STATE1_29;
|
||||
player->actor.freezeTimer = 90;
|
||||
|
@ -788,7 +788,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_801224BC;
|
||||
csInfo->keyFrameCnt = 7;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
|
||||
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
||||
|
@ -802,17 +802,17 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC;
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
break;
|
||||
case 4110:
|
||||
csInfo->keyFrames = D_8012269C;
|
||||
csInfo->keyFrameCnt = 3;
|
||||
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 4120:
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
D_80122714[1].timerInit = 80;
|
||||
csInfo->keyFrames = D_80122714;
|
||||
csInfo->keyFrameCnt = 4;
|
||||
|
@ -830,7 +830,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_801228A4;
|
||||
csInfo->keyFrameCnt = 5;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
@ -838,7 +838,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_8012296C;
|
||||
csInfo->keyFrameCnt = 4;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
@ -846,7 +846,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80122A0C;
|
||||
csInfo->keyFrameCnt = 2;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
@ -854,7 +854,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80122A5C;
|
||||
csInfo->keyFrameCnt = 8;
|
||||
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
@ -862,7 +862,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80122B9C;
|
||||
csInfo->keyFrameCnt = 3;
|
||||
|
||||
func_8002DF38(play, &player->actor, 8);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_8);
|
||||
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
|
@ -884,7 +884,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrameCnt = 1;
|
||||
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
func_8002DF38(play, &player->actor, 1);
|
||||
func_8002DF38(play, &player->actor, PLAYER_CSMODE_1);
|
||||
|
||||
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
||||
Quake_SetSpeed(i, 12000);
|
||||
|
@ -895,11 +895,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
csInfo->keyFrames = D_80122C8C;
|
||||
csInfo->keyFrameCnt = 1;
|
||||
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3260:
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
D_80122CB4[1].timerInit = timer - 5;
|
||||
|
||||
csInfo->keyFrames = D_80122CB4;
|
||||
|
@ -908,7 +908,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
|||
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
||||
break;
|
||||
case 3261:
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
D_80122D04[1].timerInit = timer - 10;
|
||||
|
||||
csInfo->keyFrames = D_80122D04;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1298,10 +1298,9 @@ void Interface_LoadItemIcon1(PlayState* play, u16 button) {
|
|||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
|
||||
DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart +
|
||||
(gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE),
|
||||
ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171);
|
||||
DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + (button * ITEM_ICON_SIZE),
|
||||
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[button]), ITEM_ICON_SIZE, 0,
|
||||
&interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171);
|
||||
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
|
@ -1309,10 +1308,9 @@ void Interface_LoadItemIcon2(PlayState* play, u16 button) {
|
|||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
|
||||
DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE,
|
||||
(uintptr_t)_icon_item_staticSegmentRomStart +
|
||||
(gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE),
|
||||
ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193);
|
||||
DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + (button * ITEM_ICON_SIZE),
|
||||
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[button]), ITEM_ICON_SIZE, 0,
|
||||
&interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193);
|
||||
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
|
@ -3377,8 +3375,8 @@ void Interface_Draw(PlayState* play) {
|
|||
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_QUAD_CURSOR_4 * 4], 4, 0);
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gItemIcons[pauseCtx->equipTargetItem], G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
||||
32, 32, 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);
|
||||
ITEM_ICON_WIDTH, ITEM_ICON_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);
|
||||
} else {
|
||||
// Magic Arrow Equip Effect
|
||||
svar1 = pauseCtx->equipTargetItem - 0xBF;
|
||||
|
@ -3803,7 +3801,7 @@ void Interface_Draw(PlayState* play) {
|
|||
gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN;
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
Message_StartTextbox(play, 0x71B0, NULL);
|
||||
func_8002DF54(play, NULL, 8);
|
||||
func_8002DF54(play, NULL, PLAYER_CSMODE_8);
|
||||
} else {
|
||||
sSubTimerStateTimer = 40;
|
||||
gSaveContext.subTimerState = SUBTIMER_STATE_STOP;
|
||||
|
|
|
@ -488,7 +488,7 @@ void Player_SetBootData(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
|
||||
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != 0) ||
|
||||
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != PLAYER_CSMODE_NONE) ||
|
||||
(play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) ||
|
||||
(this->stateFlags3 & PLAYER_STATE3_7) ||
|
||||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
|
||||
|
@ -577,7 +577,7 @@ void func_8008EC70(Player* this) {
|
|||
}
|
||||
|
||||
void Player_SetEquipmentData(PlayState* play, Player* this) {
|
||||
if (this->csMode != 0x56) {
|
||||
if (this->csMode != PLAYER_CSMODE_86) {
|
||||
this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD));
|
||||
this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC));
|
||||
this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS));
|
||||
|
|
|
@ -269,7 +269,7 @@ void Scene_CommandObjectList(PlayState* play, SceneCmd* cmd) {
|
|||
status2++;
|
||||
}
|
||||
play->objectCtx.num = i;
|
||||
func_80031A28(play, &play->actorCtx);
|
||||
Actor_KillAllWithMissingObject(play, &play->actorCtx);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue