mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
Flags stuff (#3014)
* Manual adjustments to flags * Script run to adjust flags
This commit is contained in:
parent
83ebaa2fce
commit
7c5efb2785
@ -553,10 +553,19 @@ Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3,
|
|||||||
void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2);
|
void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2);
|
||||||
s32 Flags_GetEventChkInf(s32 flag);
|
s32 Flags_GetEventChkInf(s32 flag);
|
||||||
void Flags_SetEventChkInf(s32 flag);
|
void Flags_SetEventChkInf(s32 flag);
|
||||||
|
void Flags_UnsetEventChkInf(s32 flag);
|
||||||
|
s32 Flags_GetItemGetInf(s32 flag);
|
||||||
|
void Flags_SetItemGetInf(s32 flag);
|
||||||
|
void Flags_UnsetItemGetInf(s32 flag);
|
||||||
s32 Flags_GetInfTable(s32 flag);
|
s32 Flags_GetInfTable(s32 flag);
|
||||||
void Flags_SetInfTable(s32 flag);
|
void Flags_SetInfTable(s32 flag);
|
||||||
|
void Flags_UnsetInfTable(s32 flag);
|
||||||
|
s32 Flags_GetEventInf(s32 flag);
|
||||||
|
void Flags_SetEventInf(s32 flag);
|
||||||
|
void Flags_UnsetEventInf(s32 flag);
|
||||||
s32 Flags_GetRandomizerInf(RandomizerInf flag);
|
s32 Flags_GetRandomizerInf(RandomizerInf flag);
|
||||||
void Flags_SetRandomizerInf(RandomizerInf flag);
|
void Flags_SetRandomizerInf(RandomizerInf flag);
|
||||||
|
void Flags_UnsetRandomizerInf(RandomizerInf flag);
|
||||||
u16 func_80037C30(PlayState* play, s16 arg1);
|
u16 func_80037C30(PlayState* play, s16 arg1);
|
||||||
s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3);
|
s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3);
|
||||||
s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4);
|
s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4);
|
||||||
|
@ -88,6 +88,7 @@
|
|||||||
|
|
||||||
#define GET_ITEMGETINF(flag) (gSaveContext.itemGetInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
#define GET_ITEMGETINF(flag) (gSaveContext.itemGetInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
||||||
#define SET_ITEMGETINF(flag) (gSaveContext.itemGetInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
#define SET_ITEMGETINF(flag) (gSaveContext.itemGetInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
||||||
|
#define CLEAR_ITEMGETINF(flag) (gSaveContext.itemGetInf[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
|
||||||
|
|
||||||
#define GET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
#define GET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
||||||
#define SET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
#define SET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
||||||
|
@ -406,6 +406,9 @@ typedef enum {
|
|||||||
FLAG_SCENE_CLEAR,
|
FLAG_SCENE_CLEAR,
|
||||||
FLAG_SCENE_COLLECTIBLE,
|
FLAG_SCENE_COLLECTIBLE,
|
||||||
FLAG_EVENT_CHECK_INF,
|
FLAG_EVENT_CHECK_INF,
|
||||||
|
FLAG_ITEM_GET_INF,
|
||||||
|
FLAG_INF_TABLE,
|
||||||
|
FLAG_EVENT_INF,
|
||||||
FLAG_RANDOMIZER_INF
|
FLAG_RANDOMIZER_INF
|
||||||
} FlagType;
|
} FlagType;
|
||||||
|
|
||||||
|
@ -389,15 +389,15 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define EVENTCHKINF_FIRST_SPOKE_TO_MIDO 0x02
|
#define EVENTCHKINF_FIRST_SPOKE_TO_MIDO 0x02
|
||||||
#define EVENTCHKINF_03 0x03
|
#define EVENTCHKINF_COMPLAINED_ABOUT_MIDO 0x03
|
||||||
#define EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD 0x04
|
#define EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD 0x04
|
||||||
#define EVENTCHKINF_DEKU_TREE_OPENED_MOUTH 0x05
|
#define EVENTCHKINF_DEKU_TREE_OPENED_MOUTH 0x05
|
||||||
#define EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD 0x07
|
#define EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD 0x07
|
||||||
#define EVENTCHKINF_09 0x09
|
#define EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP 0x09
|
||||||
#define EVENTCHKINF_0A 0x0A
|
#define EVENTCHKINF_PLAYED_SARIAS_SONG_FOR_MIDO_AS_ADULT 0x0A
|
||||||
#define EVENTCHKINF_0B 0x0B
|
#define EVENTCHKINF_0B 0x0B
|
||||||
#define EVENTCHKINF_MET_DEKU_TREE 0x0C
|
#define EVENTCHKINF_MET_DEKU_TREE 0x0C
|
||||||
#define EVENTCHKINF_0F 0x0F
|
#define EVENTCHKINF_SPOKE_TO_MIDO_ABOUT_SARIA 0x0F
|
||||||
#define EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_CASTLE_OR_MARKET 0x10
|
#define EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_CASTLE_OR_MARKET 0x10
|
||||||
#define EVENTCHKINF_SPOKE_TO_INGO_AT_RANCH_BEFORE_TALON_RETURNS 0x11
|
#define EVENTCHKINF_SPOKE_TO_INGO_AT_RANCH_BEFORE_TALON_RETURNS 0x11
|
||||||
#define EVENTCHKINF_OBTAINED_POCKET_EGG 0x12
|
#define EVENTCHKINF_OBTAINED_POCKET_EGG 0x12
|
||||||
@ -406,30 +406,31 @@ typedef enum {
|
|||||||
#define EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_RANCH 0x15
|
#define EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_RANCH 0x15
|
||||||
#define EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON 0x16
|
#define EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON 0x16
|
||||||
#define EVENTCHKINF_EPONA_OBTAINED 0x18
|
#define EVENTCHKINF_EPONA_OBTAINED 0x18
|
||||||
|
#define EVENTCHKINF_OBTAINED_KOKIRI_EMERALD 0x19
|
||||||
#define EVENTCHKINF_RENTED_HORSE_FROM_INGO 0x1B
|
#define EVENTCHKINF_RENTED_HORSE_FROM_INGO 0x1B
|
||||||
#define EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH 0x1C
|
#define EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH 0x1C
|
||||||
#define EVENTCHKINF_1D 0x1D
|
#define EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB 0x1D
|
||||||
#define EVENTCHKINF_1E 0x1E
|
#define EVENTCHKINF_WON_COW_IN_MALONS_RACE 0x1E
|
||||||
#define EVENTCHKINF_20 0x20
|
#define EVENTCHKINF_20 0x20
|
||||||
#define EVENTCHKINF_21 0x21
|
#define EVENTCHKINF_21 0x21
|
||||||
#define EVENTCHKINF_22 0x22
|
#define EVENTCHKINF_22 0x22
|
||||||
#define EVENTCHKINF_23 0x23
|
#define EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE 0x23
|
||||||
#define EVENTCHKINF_25 0x25
|
#define EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP 0x25
|
||||||
#define EVENTCHKINF_2A 0x2A
|
#define EVENTCHKINF_2A 0x2A
|
||||||
#define EVENTCHKINF_2B 0x2B
|
#define EVENTCHKINF_2B 0x2B
|
||||||
#define EVENTCHKINF_2C 0x2C
|
#define EVENTCHKINF_2C 0x2C
|
||||||
#define EVENTCHKINF_2D 0x2D
|
#define EVENTCHKINF_2D 0x2D
|
||||||
#define EVENTCHKINF_DEATH_MOUNTAIN_ERUPTED 0x2F
|
#define EVENTCHKINF_DEATH_MOUNTAIN_ERUPTED 0x2F
|
||||||
#define EVENTCHKINF_30 0x30
|
#define EVENTCHKINF_SPOKE_TO_A_ZORA 0x30
|
||||||
#define EVENTCHKINF_31 0x31
|
#define EVENTCHKINF_OBTAINED_RUTOS_LETTER 0x31
|
||||||
#define EVENTCHKINF_32 0x32
|
#define EVENTCHKINF_32 0x32
|
||||||
#define EVENTCHKINF_33 0x33
|
#define EVENTCHKINF_KING_ZORA_MOVED 0x33
|
||||||
#define EVENTCHKINF_37 0x37
|
#define EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP 0x37
|
||||||
#define EVENTCHKINF_38 0x38
|
#define EVENTCHKINF_OBTAINED_SILVER_SCALE 0x38
|
||||||
#define EVENTCHKINF_39 0x39
|
#define EVENTCHKINF_OPENED_ZORAS_DOMAIN 0x39
|
||||||
#define EVENTCHKINF_3A 0x3A
|
#define EVENTCHKINF_OFFERED_FISH_TO_JABU_JABU 0x3A
|
||||||
#define EVENTCHKINF_BEGAN_NABOORU_BATTLE 0x3B
|
#define EVENTCHKINF_BEGAN_NABOORU_BATTLE 0x3B
|
||||||
#define EVENTCHKINF_3C 0x3C
|
#define EVENTCHKINF_FINISHED_NABOORU_BATTLE 0x3C
|
||||||
|
|
||||||
// 0x40
|
// 0x40
|
||||||
#define EVENTCHKINF_40_INDEX 4
|
#define EVENTCHKINF_40_INDEX 4
|
||||||
@ -439,28 +440,29 @@ typedef enum {
|
|||||||
|
|
||||||
#define EVENTCHKINF_41 0x41
|
#define EVENTCHKINF_41 0x41
|
||||||
#define EVENTCHKINF_42 0x42
|
#define EVENTCHKINF_42 0x42
|
||||||
#define EVENTCHKINF_43 0x43
|
#define EVENTCHKINF_OBTAINED_OCARINA_OF_TIME 0x43
|
||||||
#define EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL 0x45
|
#define EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL 0x45
|
||||||
#define EVENTCHKINF_48 0x48
|
#define EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP 0x48
|
||||||
#define EVENTCHKINF_49 0x49
|
#define EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP 0x49
|
||||||
#define EVENTCHKINF_4A 0x4A
|
#define EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP 0x4A
|
||||||
#define EVENTCHKINF_OPENED_THE_DOOR_OF_TIME 0x4B
|
#define EVENTCHKINF_OPENED_THE_DOOR_OF_TIME 0x4B
|
||||||
#define EVENTCHKINF_4C 0x4C
|
#define EVENTCHKINF_4C 0x4C
|
||||||
#define EVENTCHKINF_4D 0x4D
|
#define EVENTCHKINF_RAINBOW_BRIDGE_BUILT 0x4D
|
||||||
#define EVENTCHKINF_4E 0x4E
|
#define EVENTCHKINF_CAUGHT_BY_CASTLE_GUARDS 0x4E
|
||||||
#define EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER 0x4F
|
#define EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER 0x4F
|
||||||
#define EVENTCHKINF_50 0x50
|
#define EVENTCHKINF_LEARNED_MINUET_OF_FOREST 0x50
|
||||||
#define EVENTCHKINF_51 0x51
|
#define EVENTCHKINF_LEARNED_BOLERO_OF_FIRE 0x51
|
||||||
#define EVENTCHKINF_52 0x52
|
#define EVENTCHKINF_LEARNED_SERENADE_OF_WATER 0x52
|
||||||
#define EVENTCHKINF_54 0x54
|
#define EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW 0x54
|
||||||
#define EVENTCHKINF_55 0x55
|
#define EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT 0x55
|
||||||
|
#define EVENTCHKINF_LEARNED_SARIAS_SONG 0x57
|
||||||
#define EVENTCHKINF_LEARNED_ZELDAS_LULLABY 0x59
|
#define EVENTCHKINF_LEARNED_ZELDAS_LULLABY 0x59
|
||||||
#define EVENTCHKINF_5A 0x5A
|
#define EVENTCHKINF_LEARNED_SUNS_SONG 0x5A
|
||||||
#define EVENTCHKINF_5B 0x5B
|
#define EVENTCHKINF_LEARNED_SONG_OF_STORMS 0x5B
|
||||||
#define EVENTCHKINF_5C 0x5C
|
#define EVENTCHKINF_5C 0x5C
|
||||||
#define EVENTCHKINF_65 0x65
|
#define EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL 0x65
|
||||||
#define EVENTCHKINF_67 0x67
|
#define EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO 0x67
|
||||||
#define EVENTCHKINF_68 0x68
|
#define EVENTCHKINF_PLAYED_HORSEBACK_ARCHERY 0x68
|
||||||
#define EVENTCHKINF_RAISED_LAKE_HYLIA_WATER 0x69
|
#define EVENTCHKINF_RAISED_LAKE_HYLIA_WATER 0x69
|
||||||
#define EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO 0x6A
|
#define EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO 0x6A
|
||||||
|
|
||||||
@ -471,7 +473,7 @@ typedef enum {
|
|||||||
#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO ((EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_INDEX << 4) | EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT)
|
#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO ((EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_INDEX << 4) | EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT)
|
||||||
|
|
||||||
#define EVENTCHKINF_6E 0x6E
|
#define EVENTCHKINF_6E 0x6E
|
||||||
#define EVENTCHKINF_6F 0x6F
|
#define EVENTCHKINF_SPOKE_TO_KAEPORA_BY_LOST_WOODS 0x6F
|
||||||
#define EVENTCHKINF_BEGAN_GOHMA_BATTLE 0x70
|
#define EVENTCHKINF_BEGAN_GOHMA_BATTLE 0x70
|
||||||
#define EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE 0x71
|
#define EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE 0x71
|
||||||
#define EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE 0x72
|
#define EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE 0x72
|
||||||
@ -481,11 +483,11 @@ typedef enum {
|
|||||||
#define EVENTCHKINF_BEGAN_BARINA_BATTLE 0x76
|
#define EVENTCHKINF_BEGAN_BARINA_BATTLE 0x76
|
||||||
#define EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE 0x77
|
#define EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE 0x77
|
||||||
#define EVENTCHKINF_BEGAN_GANONDORF_BATTLE 0x78
|
#define EVENTCHKINF_BEGAN_GANONDORF_BATTLE 0x78
|
||||||
#define EVENTCHKINF_80 0x80
|
#define EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE 0x80
|
||||||
#define EVENTCHKINF_82 0x82
|
#define EVENTCHKINF_DRAWBRIDGE_OPENED_AFTER_ZELDA_FLED 0x82
|
||||||
#define EVENTCHKINF_8C 0x8C
|
#define EVENTCHKINF_PAID_BACK_KEATON_MASK_FEE 0x8C
|
||||||
#define EVENTCHKINF_8D 0x8D
|
#define EVENTCHKINF_PAID_BACK_SKULL_MASK_FEE 0x8D
|
||||||
#define EVENTCHKINF_8E 0x8E
|
#define EVENTCHKINF_PAID_BACK_SPOOKY_MASK_FEE 0x8E
|
||||||
#define EVENTCHKINF_PAID_BACK_BUNNY_HOOD_FEE 0x8F
|
#define EVENTCHKINF_PAID_BACK_BUNNY_HOOD_FEE 0x8F
|
||||||
|
|
||||||
// 0x90-0x93
|
// 0x90-0x93
|
||||||
@ -503,9 +505,9 @@ typedef enum {
|
|||||||
CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX], EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)
|
CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX], EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)
|
||||||
|
|
||||||
#define EVENTCHKINF_SPOKE_TO_NABOORU_IN_SPIRIT_TEMPLE 0x94
|
#define EVENTCHKINF_SPOKE_TO_NABOORU_IN_SPIRIT_TEMPLE 0x94
|
||||||
#define EVENTCHKINF_95 0x95
|
#define EVENTCHKINF_NABOORU_CAPTURED_BY_TWINROVA 0x95
|
||||||
#define EVENTCHKINF_96 0x96
|
#define EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE 0x96
|
||||||
#define EVENTCHKINF_9C 0x9C
|
#define EVENTCHKINF_PLAYED_SONG_FOR_SCARECROW_AS_ADULT 0x9C
|
||||||
#define EVENTCHKINF_ENTERED_HYRULE_FIELD 0xA0
|
#define EVENTCHKINF_ENTERED_HYRULE_FIELD 0xA0
|
||||||
#define EVENTCHKINF_ENTERED_DEATH_MOUNTAIN_TRAIL 0xA1
|
#define EVENTCHKINF_ENTERED_DEATH_MOUNTAIN_TRAIL 0xA1
|
||||||
#define EVENTCHKINF_ENTERED_KAKARIKO_VILLAGE 0xA3
|
#define EVENTCHKINF_ENTERED_KAKARIKO_VILLAGE 0xA3
|
||||||
@ -514,10 +516,10 @@ typedef enum {
|
|||||||
#define EVENTCHKINF_ENTERED_GORON_CITY 0xA6
|
#define EVENTCHKINF_ENTERED_GORON_CITY 0xA6
|
||||||
#define EVENTCHKINF_ENTERED_TEMPLE_OF_TIME 0xA7
|
#define EVENTCHKINF_ENTERED_TEMPLE_OF_TIME 0xA7
|
||||||
#define EVENTCHKINF_ENTERED_DEKU_TREE 0xA8
|
#define EVENTCHKINF_ENTERED_DEKU_TREE 0xA8
|
||||||
#define EVENTCHKINF_A9 0xA9
|
#define EVENTCHKINF_LEARNED_SONG_OF_TIME 0xA9
|
||||||
#define EVENTCHKINF_AA 0xAA
|
#define EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL 0xAA
|
||||||
#define EVENTCHKINF_AC 0xAC
|
#define EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT 0xAC
|
||||||
#define EVENTCHKINF_AD 0xAD
|
#define EVENTCHKINF_COMPLETED_SPIRIT_TRIAL 0xAD
|
||||||
#define EVENTCHKINF_ENTERED_DODONGOS_CAVERN 0xB0
|
#define EVENTCHKINF_ENTERED_DODONGOS_CAVERN 0xB0
|
||||||
#define EVENTCHKINF_ENTERED_LAKE_HYLIA 0xB1
|
#define EVENTCHKINF_ENTERED_LAKE_HYLIA 0xB1
|
||||||
#define EVENTCHKINF_ENTERED_GERUDO_VALLEY 0xB2
|
#define EVENTCHKINF_ENTERED_GERUDO_VALLEY 0xB2
|
||||||
@ -529,20 +531,20 @@ typedef enum {
|
|||||||
#define EVENTCHKINF_ENTERED_DESERT_COLOSSUS 0xB8
|
#define EVENTCHKINF_ENTERED_DESERT_COLOSSUS 0xB8
|
||||||
#define EVENTCHKINF_ENTERED_DEATH_MOUNTAIN_CRATER 0xB9
|
#define EVENTCHKINF_ENTERED_DEATH_MOUNTAIN_CRATER 0xB9
|
||||||
#define EVENTCHKINF_ENTERED_GANONS_CASTLE_EXTERIOR 0xBA
|
#define EVENTCHKINF_ENTERED_GANONS_CASTLE_EXTERIOR 0xBA
|
||||||
#define EVENTCHKINF_BB 0xBB
|
#define EVENTCHKINF_COMPLETED_FOREST_TRIAL 0xBB
|
||||||
#define EVENTCHKINF_BC 0xBC
|
#define EVENTCHKINF_COMPLETED_WATER_TRIAL 0xBC
|
||||||
#define EVENTCHKINF_BD 0xBD
|
#define EVENTCHKINF_COMPLETED_SHADOW_TRIAL 0xBD
|
||||||
#define EVENTCHKINF_BE 0xBE
|
#define EVENTCHKINF_COMPLETED_FIRE_TRIAL 0xBE
|
||||||
#define EVENTCHKINF_BF 0xBF
|
#define EVENTCHKINF_COMPLETED_LIGHT_TRIAL 0xBF
|
||||||
#define EVENTCHKINF_NABOORU_ORDERED_TO_FIGHT_BY_TWINROVA 0xC0
|
#define EVENTCHKINF_NABOORU_ORDERED_TO_FIGHT_BY_TWINROVA 0xC0
|
||||||
#define EVENTCHKINF_C1 0xC1
|
#define EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE 0xC1
|
||||||
#define EVENTCHKINF_C3 0xC3
|
#define EVENTCHKINF_DISPELLED_GANONS_TOWER_BARRIER 0xC3
|
||||||
#define EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS 0xC4
|
#define EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS 0xC4
|
||||||
#define EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL 0xC5
|
#define EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL 0xC5
|
||||||
#define EVENTCHKINF_C6 0xC6
|
#define EVENTCHKINF_SPOKE_TO_DEKU_TREE_SPROUT 0xC6
|
||||||
#define EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO 0xC7
|
#define EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO 0xC7
|
||||||
#define EVENTCHKINF_C8 0xC8
|
#define EVENTCHKINF_OBTAINED_SPIRIT_MEDALLION 0xC8
|
||||||
#define EVENTCHKINF_C9 0xC9
|
#define EVENTCHKINF_TIME_TRAVELED_TO_ADULT 0xC9
|
||||||
|
|
||||||
// 0xD0-0xD6
|
// 0xD0-0xD6
|
||||||
#define EVENTCHKINF_SONGS_FOR_FROGS_INDEX 13
|
#define EVENTCHKINF_SONGS_FOR_FROGS_INDEX 13
|
||||||
@ -569,12 +571,12 @@ typedef enum {
|
|||||||
#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT)
|
#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT)
|
||||||
|
|
||||||
// 0xDA-0xDE
|
// 0xDA-0xDE
|
||||||
#define EVENTCHKINF_DA_DB_DC_DD_DE_INDEX 13
|
#define EVENTCHKINF_SKULLTULA_REWARD_INDEX 13
|
||||||
#define EVENTCHKINF_DA_MASK (1 << 10)
|
#define EVENTCHKINF_SKULLTULA_REWARD_10_MASK (1 << 10)
|
||||||
#define EVENTCHKINF_DB_MASK (1 << 11)
|
#define EVENTCHKINF_SKULLTULA_REWARD_20_MASK (1 << 11)
|
||||||
#define EVENTCHKINF_DC_MASK (1 << 12)
|
#define EVENTCHKINF_SKULLTULA_REWARD_30_MASK (1 << 12)
|
||||||
#define EVENTCHKINF_DD_MASK (1 << 13)
|
#define EVENTCHKINF_SKULLTULA_REWARD_40_MASK (1 << 13)
|
||||||
#define EVENTCHKINF_DE_MASK (1 << 14)
|
#define EVENTCHKINF_SKULLTULA_REWARD_50_MASK (1 << 14)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -618,8 +620,8 @@ typedef enum {
|
|||||||
#define ITEMGETINF_1B 0x1B
|
#define ITEMGETINF_1B 0x1B
|
||||||
#define ITEMGETINF_1C 0x1C
|
#define ITEMGETINF_1C 0x1C
|
||||||
#define ITEMGETINF_1D 0x1D
|
#define ITEMGETINF_1D 0x1D
|
||||||
#define ITEMGETINF_1E 0x1E
|
#define ITEMGETINF_OBTAINED_STICK_UPGRADE_FROM_STAGE 0x1E
|
||||||
#define ITEMGETINF_1F 0x1F
|
#define ITEMGETINF_OBTAINED_NUT_UPGRADE_FROM_STAGE 0x1F
|
||||||
#define ITEMGETINF_23 0x23
|
#define ITEMGETINF_23 0x23
|
||||||
#define ITEMGETINF_24 0x24
|
#define ITEMGETINF_24 0x24
|
||||||
#define ITEMGETINF_25 0x25
|
#define ITEMGETINF_25 0x25
|
||||||
@ -794,6 +796,7 @@ typedef enum {
|
|||||||
|
|
||||||
// 0x1D0-0x1DF
|
// 0x1D0-0x1DF
|
||||||
#define INFTABLE_1DX_INDEX 29
|
#define INFTABLE_1DX_INDEX 29
|
||||||
|
#define INFTABLE_SWORDLESS 0x1D0
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -856,7 +859,7 @@ typedef enum {
|
|||||||
(gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_0F_MASK) | ((v) << EVENTINF_HORSES_0F_SHIFT)
|
(gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_0F_MASK) | ((v) << EVENTINF_HORSES_0F_SHIFT)
|
||||||
|
|
||||||
|
|
||||||
#define EVENTINF_10 0x10
|
#define EVENTINF_MARATHON_ACTIVE 0x10
|
||||||
|
|
||||||
// 0x20-0x24
|
// 0x20-0x24
|
||||||
#define EVENTINF_20_21_22_23_24_INDEX 2
|
#define EVENTINF_20_21_22_23_24_INDEX 2
|
||||||
|
@ -587,7 +587,7 @@ void Entrance_OverrideWeatherState() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Lon Lon Ranch (No Epona)
|
// Lon Lon Ranch (No Epona)
|
||||||
if (!Flags_GetEventChkInf(0x18)){ // if you don't have Epona
|
if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)){ // if you don't have Epona
|
||||||
switch (gSaveContext.entranceIndex) {
|
switch (gSaveContext.entranceIndex) {
|
||||||
case 0x0157: // Lon Lon Ranch from HF
|
case 0x0157: // Lon Lon Ranch from HF
|
||||||
case 0x01F9: // Hyrule Field from LLR
|
case 0x01F9: // Hyrule Field from LLR
|
||||||
@ -596,7 +596,7 @@ void Entrance_OverrideWeatherState() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Water Temple
|
// Water Temple
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x0400)) { // have not beaten Water Temple
|
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) { // have not beaten Water Temple
|
||||||
switch (gSaveContext.entranceIndex) {
|
switch (gSaveContext.entranceIndex) {
|
||||||
case 0x019D: // Zora River from behind waterfall
|
case 0x019D: // Zora River from behind waterfall
|
||||||
case 0x01DD: // Zora River from LW water shortcut
|
case 0x01DD: // Zora River from LW water shortcut
|
||||||
@ -630,7 +630,7 @@ void Entrance_OverrideWeatherState() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Death Mountain Cloudy
|
// Death Mountain Cloudy
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x0200)) { // have not beaten Fire Temple
|
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) { // have not beaten Fire Temple
|
||||||
if (gPlayState->nextEntranceIndex == 0x04D6) { // Lost Woods Goron City Shortcut
|
if (gPlayState->nextEntranceIndex == 0x04D6) { // Lost Woods Goron City Shortcut
|
||||||
gWeatherMode = 2;
|
gWeatherMode = 2;
|
||||||
return;
|
return;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -340,13 +340,13 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 19:
|
case 19:
|
||||||
gSaveContext.eventChkInf[6] |= 0x0020;
|
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL);
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
gSaveContext.eventChkInf[6] |= 0x0080;
|
Flags_SetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO);
|
||||||
break;
|
break;
|
||||||
case 21:
|
case 21:
|
||||||
gSaveContext.eventChkInf[6] |= 0x0200;
|
Flags_SetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER);
|
||||||
break;
|
break;
|
||||||
case 22:
|
case 22:
|
||||||
D_801614B0.r = 255;
|
D_801614B0.r = 255;
|
||||||
@ -624,8 +624,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
gSaveContext.fw.set = 0;
|
gSaveContext.fw.set = 0;
|
||||||
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
|
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
|
||||||
}
|
}
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x20)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x20;
|
Flags_SetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL);
|
||||||
play->nextEntranceIndex = 0x00A0;
|
play->nextEntranceIndex = 0x00A0;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||||
@ -697,7 +697,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
play->fadeTransition = 3;
|
play->fadeTransition = 3;
|
||||||
break;
|
break;
|
||||||
case 18:
|
case 18:
|
||||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER);
|
||||||
play->nextEntranceIndex = 0x0324;
|
play->nextEntranceIndex = 0x0324;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
play->fadeTransition = 2;
|
play->fadeTransition = 2;
|
||||||
@ -842,14 +842,14 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
play->fadeTransition = 17;
|
play->fadeTransition = 17;
|
||||||
break;
|
break;
|
||||||
case 46:
|
case 46:
|
||||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER);
|
||||||
play->nextEntranceIndex = 0x0324;
|
play->nextEntranceIndex = 0x0324;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
play->fadeTransition = 4;
|
play->fadeTransition = 4;
|
||||||
break;
|
break;
|
||||||
case 47:
|
case 47:
|
||||||
Item_Give(play, ITEM_SONG_NOCTURNE);
|
Item_Give(play, ITEM_SONG_NOCTURNE);
|
||||||
gSaveContext.eventChkInf[5] |= 0x10;
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW);
|
||||||
play->nextEntranceIndex = 0x00DB;
|
play->nextEntranceIndex = 0x00DB;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||||
@ -1077,8 +1077,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
play->fadeTransition = 3;
|
play->fadeTransition = 3;
|
||||||
break;
|
break;
|
||||||
case 95:
|
case 95:
|
||||||
if ((gSaveContext.eventChkInf[4] & 0x100) && (gSaveContext.eventChkInf[4] & 0x200) &&
|
if ((Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) && (Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) &&
|
||||||
(gSaveContext.eventChkInf[4] & 0x400)) {
|
(Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP))) {
|
||||||
play->nextEntranceIndex = 0x0053;
|
play->nextEntranceIndex = 0x0053;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||||
@ -1111,7 +1111,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||||
play->fadeTransition = 5;
|
play->fadeTransition = 5;
|
||||||
} else {
|
} else {
|
||||||
gSaveContext.eventChkInf[12] |= 0x100;
|
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_SPIRIT_MEDALLION);
|
||||||
play->nextEntranceIndex = 0x0610;
|
play->nextEntranceIndex = 0x0610;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
play->fadeTransition = 3;
|
play->fadeTransition = 3;
|
||||||
@ -1233,8 +1233,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
play->fadeTransition = 2;
|
play->fadeTransition = 2;
|
||||||
break;
|
break;
|
||||||
case 113:
|
case 113:
|
||||||
if (Flags_GetEventChkInf(0xBB) && Flags_GetEventChkInf(0xBC) && Flags_GetEventChkInf(0xBD) &&
|
if (Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_FOREST_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_WATER_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_SHADOW_TRIAL) &&
|
||||||
Flags_GetEventChkInf(0xBE) && Flags_GetEventChkInf(0xBF) && Flags_GetEventChkInf(0xAD)) {
|
Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_FIRE_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_LIGHT_TRIAL) && Flags_GetEventChkInf(EVENTCHKINF_COMPLETED_SPIRIT_TRIAL)) {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTowerBarrierCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTowerBarrierCs);
|
||||||
play->csCtx.frames = 0;
|
play->csCtx.frames = 0;
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
@ -1257,7 +1257,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||||||
gSaveContext.nextTransitionType = 2;
|
gSaveContext.nextTransitionType = 2;
|
||||||
break;
|
break;
|
||||||
case 116:
|
case 116:
|
||||||
if (gSaveContext.eventChkInf[12] & 0x100) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SPIRIT_MEDALLION)) {
|
||||||
play->nextEntranceIndex = 0x0580;
|
play->nextEntranceIndex = 0x0580;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
play->fadeTransition = 3;
|
play->fadeTransition = 3;
|
||||||
@ -2152,39 +2152,39 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
|
|||||||
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||||
const bool bShouldTowerRandoSkip =
|
const bool bShouldTowerRandoSkip =
|
||||||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
|
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
|
||||||
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC)) {
|
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) {
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
Flags_SetEventChkInf(0xAC);
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
|
||||||
gSaveContext.entranceIndex = 0x0123;
|
gSaveContext.entranceIndex = 0x0123;
|
||||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||||
}
|
}
|
||||||
} else if ((gSaveContext.entranceIndex == 0x00DB) && LINK_IS_ADULT && (gSaveContext.eventChkInf[4] & 0x0100) &&
|
} else if ((gSaveContext.entranceIndex == 0x00DB) && LINK_IS_ADULT && (Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) &&
|
||||||
(gSaveContext.eventChkInf[4] & 0x0200) && (gSaveContext.eventChkInf[4] & 0x0400) &&
|
(Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) && (Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) &&
|
||||||
!Flags_GetEventChkInf(0xAA)) {
|
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) {
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
Flags_SetEventChkInf(0xAA);
|
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
|
||||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||||
}
|
}
|
||||||
} else if ((gSaveContext.entranceIndex == 0x05E0) && !Flags_GetEventChkInf(0xC1)) {
|
} else if ((gSaveContext.entranceIndex == 0x05E0) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
Flags_SetEventChkInf(0xC1);
|
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
|
||||||
Item_Give(play, ITEM_OCARINA_FAIRY);
|
Item_Give(play, ITEM_OCARINA_FAIRY);
|
||||||
gSaveContext.entranceIndex = 0x011E;
|
gSaveContext.entranceIndex = 0x011E;
|
||||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||||
}
|
}
|
||||||
} else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
} else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
|
||||||
LINK_IS_ADULT && !Flags_GetEventChkInf(0xC4) &&
|
LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
|
||||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA)) {
|
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA)) {
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
Flags_SetEventChkInf(0xC4);
|
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
|
||||||
gSaveContext.entranceIndex = 0x0053;
|
gSaveContext.entranceIndex = 0x0053;
|
||||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||||
}
|
}
|
||||||
} else if ((!Flags_GetEventChkInf(0xC7) &&
|
} else if ((!Flags_GetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO) &&
|
||||||
gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_DEMO) ||
|
gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_DEMO) ||
|
||||||
(bShouldTowerRandoSkip &&
|
(bShouldTowerRandoSkip &&
|
||||||
gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_FINAL)) {
|
gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_FINAL)) {
|
||||||
Flags_SetEventChkInf(0xC7);
|
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
|
||||||
gSaveContext.entranceIndex = 0x0517;
|
gSaveContext.entranceIndex = 0x0517;
|
||||||
// In rando, skip the cutscene for the tower falling down after the escape.
|
// In rando, skip the cutscene for the tower falling down after the escape.
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
|
@ -47,7 +47,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
|||||||
{ SCENE_SPOT20, 928, 0, -2280, 0, 2 },
|
{ SCENE_SPOT20, 928, 0, -2280, 0, 2 },
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((AREG(6) != 0) && (Flags_GetEventChkInf(0x18) || (DREG(1) != 0))) {
|
if ((AREG(6) != 0) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0))) {
|
||||||
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, player->actor.world.pos.x,
|
player->rideActor = Actor_Spawn(&play->actorCtx, play, 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.world.pos.y, player->actor.world.pos.z, player->actor.shape.rot.x,
|
||||||
player->actor.shape.rot.y, player->actor.shape.rot.z, 9, true);
|
player->actor.shape.rot.y, player->actor.shape.rot.z, 9, true);
|
||||||
@ -67,16 +67,16 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
|||||||
horseActor =
|
horseActor =
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1, true);
|
||||||
horseActor->room = -1;
|
horseActor->room = -1;
|
||||||
} else if ((gSaveContext.entranceIndex == 1230) && (gSaveContext.eventChkInf[1] & 0x100)) {
|
} else if ((gSaveContext.entranceIndex == 1230) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) {
|
||||||
Actor* horseActor =
|
Actor* horseActor =
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true);
|
||||||
ASSERT(horseActor != NULL);
|
ASSERT(horseActor != NULL);
|
||||||
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
|
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
|
||||||
(((Flags_GetEventChkInf(0x18) != 0) && (!gSaveContext.n64ddFlag ||
|
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!gSaveContext.n64ddFlag ||
|
||||||
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
|
||||||
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
|
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
|
||||||
// "Set by existence of horse %d %d %d"
|
// "Set by existence of horse %d %d %d"
|
||||||
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(0x18),
|
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),
|
||||||
DREG(1));
|
DREG(1));
|
||||||
|
|
||||||
if (func_8006CFC0(gSaveContext.horseData.scene)) {
|
if (func_8006CFC0(gSaveContext.horseData.scene)) {
|
||||||
@ -94,11 +94,11 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
|||||||
osSyncPrintf(VT_RST);
|
osSyncPrintf(VT_RST);
|
||||||
func_8006D074(play);
|
func_8006D074(play);
|
||||||
}
|
}
|
||||||
} else if ((play->sceneNum == SCENE_SPOT20) && !Flags_GetEventChkInf(0x18) && (DREG(1) == 0)) {
|
} else if ((play->sceneNum == SCENE_SPOT20) && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0)) {
|
||||||
Actor* horseActor =
|
Actor* horseActor =
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1, true);
|
||||||
ASSERT(horseActor != NULL);
|
ASSERT(horseActor != NULL);
|
||||||
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
|
||||||
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
|
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
|
||||||
HorseSpawn* horseSpawn = &horseSpawns[i];
|
HorseSpawn* horseSpawn = &horseSpawns[i];
|
||||||
if (horseSpawn->scene == play->sceneNum) {
|
if (horseSpawn->scene == play->sceneNum) {
|
||||||
@ -113,7 +113,7 @@ void func_8006D0EC(PlayState* play, Player* player) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!Flags_GetEventChkInf(0x18)) {
|
} else if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
|
||||||
if ((DREG(1) == 0) && (play->sceneNum == SCENE_SOUKO) && !IS_DAY) {
|
if ((DREG(1) == 0) && (play->sceneNum == SCENE_SOUKO) && !IS_DAY) {
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1, true);
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ void func_8006D684(PlayState* play, Player* player) {
|
|||||||
func_8002DE74(play, player);
|
func_8002DE74(play, player);
|
||||||
gSaveContext.horseData.scene = play->sceneNum;
|
gSaveContext.horseData.scene = play->sceneNum;
|
||||||
} else if ((play->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
|
} else if ((play->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
|
||||||
(Flags_GetEventChkInf(0x18) == 0) && (DREG(1) == 0)) {
|
(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) == 0) && (DREG(1) == 0)) {
|
||||||
player->rideActor =
|
player->rideActor =
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5, true);
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5, true);
|
||||||
ASSERT(player->rideActor != NULL);
|
ASSERT(player->rideActor != NULL);
|
||||||
@ -252,7 +252,7 @@ void func_8006DC68(PlayState* play, Player* player) {
|
|||||||
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
|
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
|
||||||
(gSaveContext.respawnFlag == 0)) ||
|
(gSaveContext.respawnFlag == 0)) ||
|
||||||
((play->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
|
((play->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
|
||||||
!Flags_GetEventChkInf(0x18) && (DREG(1) == 0))) {
|
!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0))) {
|
||||||
func_8006D684(play, player);
|
func_8006D684(play, player);
|
||||||
} else {
|
} else {
|
||||||
func_8006D0EC(play, player);
|
func_8006D0EC(play, player);
|
||||||
|
@ -2542,19 +2542,19 @@ void Environment_WarpSongLeave(PlayState* play) {
|
|||||||
|
|
||||||
switch (play->nextEntranceIndex) {
|
switch (play->nextEntranceIndex) {
|
||||||
case 0x147:
|
case 0x147:
|
||||||
Flags_SetEventChkInf(0xB9);
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_DEATH_MOUNTAIN_CRATER);
|
||||||
break;
|
break;
|
||||||
case 0x0102:
|
case 0x0102:
|
||||||
Flags_SetEventChkInf(0xB1);
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_LAKE_HYLIA);
|
||||||
break;
|
break;
|
||||||
case 0x0123:
|
case 0x0123:
|
||||||
Flags_SetEventChkInf(0xB8);
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_DESERT_COLOSSUS);
|
||||||
break;
|
break;
|
||||||
case 0x00E4:
|
case 0x00E4:
|
||||||
Flags_SetEventChkInf(0xB6);
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_GRAVEYARD);
|
||||||
break;
|
break;
|
||||||
case 0x0053:
|
case 0x0053:
|
||||||
Flags_SetEventChkInf(0xA7);
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_TEMPLE_OF_TIME);
|
||||||
break;
|
break;
|
||||||
case 0x00FC:
|
case 0x00FC:
|
||||||
break;
|
break;
|
||||||
|
@ -398,11 +398,11 @@ void Map_InitData(PlayState* play, s16 room) {
|
|||||||
extendedMapIndex = 0x15;
|
extendedMapIndex = 0x15;
|
||||||
}
|
}
|
||||||
} else if (play->sceneNum == SCENE_SPOT09) {
|
} else if (play->sceneNum == SCENE_SPOT09) {
|
||||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !((gSaveContext.eventChkInf[9] & 0xF) == 0xF)) {
|
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
|
||||||
extendedMapIndex = 0x16;
|
extendedMapIndex = 0x16;
|
||||||
}
|
}
|
||||||
} else if (play->sceneNum == SCENE_SPOT12) {
|
} else if (play->sceneNum == SCENE_SPOT12) {
|
||||||
if ((!gSaveContext.n64ddFlag && ((gSaveContext.eventChkInf[9] & 0xF) == 0xF)) ||
|
if ((!gSaveContext.n64ddFlag && GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) ||
|
||||||
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
|
(gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
|
||||||
extendedMapIndex = 0x17;
|
extendedMapIndex = 0x17;
|
||||||
}
|
}
|
||||||
|
@ -1616,7 +1616,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||||||
textId += (gSaveContext.inventory.questItems & 0xF0000000 & 0xF0000000) >> 0x1C;
|
textId += (gSaveContext.inventory.questItems & 0xF0000000 & 0xF0000000) >> 0x1C;
|
||||||
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
|
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
|
||||||
textId = 0xB; // Traded Giant's Knife for Biggoron Sword
|
textId = 0xB; // Traded Giant's Knife for Biggoron Sword
|
||||||
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xB4 && (gSaveContext.eventChkInf[9] & 0x40))) {
|
} else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xB4 && (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE)))) {
|
||||||
textId = 0xB5; // Destroyed Gold Skulltula
|
textId = 0xB5; // Destroyed Gold Skulltula
|
||||||
}
|
}
|
||||||
// Ocarina Staff + Dialog
|
// Ocarina Staff + Dialog
|
||||||
|
@ -1417,7 +1417,7 @@ void Inventory_SwapAgeEquipment(void) {
|
|||||||
// When becoming adult, remove swordless flag since we'll get master sword
|
// When becoming adult, remove swordless flag since we'll get master sword
|
||||||
// Only in rando to keep swordless link bugs in vanilla
|
// Only in rando to keep swordless link bugs in vanilla
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
gSaveContext.infTable[29] &= ~1;
|
Flags_UnsetInfTable(INFTABLE_SWORDLESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSaveContext.childEquips.equipment = gSaveContext.equips.equipment;
|
gSaveContext.childEquips.equipment = gSaveContext.equips.equipment;
|
||||||
@ -1471,13 +1471,13 @@ void Inventory_SwapAgeEquipment(void) {
|
|||||||
// When becoming child, set swordless flag if player doesn't have kokiri sword
|
// When becoming child, set swordless flag if player doesn't have kokiri sword
|
||||||
// Only in rando to keep swordless link bugs in vanilla
|
// Only in rando to keep swordless link bugs in vanilla
|
||||||
if (gSaveContext.n64ddFlag && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
|
if (gSaveContext.n64ddFlag && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
|
||||||
gSaveContext.infTable[29] |= 1;
|
Flags_SetInfTable(INFTABLE_SWORDLESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// When using enhancements, set swordless flag if player doesn't have kokiri sword or hasn't equipped a sword yet.
|
// When using enhancements, set swordless flag if player doesn't have kokiri sword or hasn't equipped a sword yet.
|
||||||
// Then set the child equips button items to item none to ensure kokiri sword is not equipped
|
// Then set the child equips button items to item none to ensure kokiri sword is not equipped
|
||||||
if ((CVarGetInteger("gSwitchAge", 0) || CVarGetInteger("gSwitchTimeline", 0)) && ((1 << 0 & gSaveContext.inventory.equipment) == 0 || gSaveContext.infTable[29] & 1)) {
|
if ((CVarGetInteger("gSwitchAge", 0) || CVarGetInteger("gSwitchTimeline", 0)) && ((1 << 0 & gSaveContext.inventory.equipment) == 0 || Flags_GetInfTable(INFTABLE_SWORDLESS))) {
|
||||||
gSaveContext.infTable[29] |= 1;
|
Flags_SetInfTable(INFTABLE_SWORDLESS);
|
||||||
gSaveContext.childEquips.buttonItems[0] = ITEM_NONE;
|
gSaveContext.childEquips.buttonItems[0] = ITEM_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1512,7 +1512,7 @@ void Inventory_SwapAgeEquipment(void) {
|
|||||||
gSaveContext.equips.equipment = gSaveContext.childEquips.equipment;
|
gSaveContext.equips.equipment = gSaveContext.childEquips.equipment;
|
||||||
gSaveContext.equips.equipment &= 0xFFF0;
|
gSaveContext.equips.equipment &= 0xFFF0;
|
||||||
// Equips kokiri sword in the inventory screen only if kokiri sword exists in inventory and a sword has been equipped already
|
// Equips kokiri sword in the inventory screen only if kokiri sword exists in inventory and a sword has been equipped already
|
||||||
if (!((1 << 0 & gSaveContext.inventory.equipment) == 0) && !(gSaveContext.infTable[29] & 1)) {
|
if (!((1 << 0 & gSaveContext.inventory.equipment) == 0) && !Flags_GetInfTable(INFTABLE_SWORDLESS)) {
|
||||||
gSaveContext.equips.equipment |= 0x0001;
|
gSaveContext.equips.equipment |= 0x0001;
|
||||||
}
|
}
|
||||||
} else if (gSaveContext.childEquips.buttonItems[0] != ITEM_NONE) {
|
} else if (gSaveContext.childEquips.buttonItems[0] != ITEM_NONE) {
|
||||||
@ -1543,7 +1543,7 @@ void Inventory_SwapAgeEquipment(void) {
|
|||||||
When becoming child, set swordless flag if player doesn't have kokiri sword
|
When becoming child, set swordless flag if player doesn't have kokiri sword
|
||||||
Only in rando to keep swordless link bugs in vanilla*/
|
Only in rando to keep swordless link bugs in vanilla*/
|
||||||
if (1 << 0 & gSaveContext.inventory.equipment == 0) {
|
if (1 << 0 & gSaveContext.inventory.equipment == 0) {
|
||||||
gSaveContext.infTable[29] |= 1;
|
Flags_SetInfTable(INFTABLE_SWORDLESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
//zero out items
|
//zero out items
|
||||||
@ -1558,7 +1558,7 @@ void Inventory_SwapAgeEquipment(void) {
|
|||||||
|
|
||||||
if ((CVarGetInteger("gSwitchAge", 0) || CVarGetInteger("gSwitchTimeline", 0)) &&
|
if ((CVarGetInteger("gSwitchAge", 0) || CVarGetInteger("gSwitchTimeline", 0)) &&
|
||||||
(gSaveContext.equips.buttonItems[0] == ITEM_NONE)) {
|
(gSaveContext.equips.buttonItems[0] == ITEM_NONE)) {
|
||||||
gSaveContext.infTable[29] |= 1;
|
Flags_SetInfTable(INFTABLE_SWORDLESS);
|
||||||
if (gSaveContext.childEquips.equipment == 0) {
|
if (gSaveContext.childEquips.equipment == 0) {
|
||||||
// force equip kokiri tunic and boots in scenario gSaveContext.childEquips.equipment is uninitialized
|
// force equip kokiri tunic and boots in scenario gSaveContext.childEquips.equipment is uninitialized
|
||||||
gSaveContext.equips.equipment &= 0xFFF0;
|
gSaveContext.equips.equipment &= 0xFFF0;
|
||||||
@ -2155,8 +2155,8 @@ u8 Item_Give(PlayState* play, u8 item) {
|
|||||||
AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG);
|
AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gSaveContext.itemGetInf[1] & 8)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_13)) {
|
||||||
gSaveContext.itemGetInf[1] |= 8;
|
Flags_SetItemGetInf(ITEMGETINF_13);
|
||||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2168,8 +2168,8 @@ u8 Item_Give(PlayState* play, u8 item) {
|
|||||||
AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG);
|
AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gSaveContext.itemGetInf[1] & 8)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_13)) {
|
||||||
gSaveContext.itemGetInf[1] |= 8;
|
Flags_SetItemGetInf(ITEMGETINF_13);
|
||||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2245,8 +2245,8 @@ u8 Item_Give(PlayState* play, u8 item) {
|
|||||||
func_80087708(play, 12, 5);
|
func_80087708(play, 12, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gSaveContext.infTable[25] & 0x100)) {
|
if (!Flags_GetInfTable(INFTABLE_198)) {
|
||||||
gSaveContext.infTable[25] |= 0x100;
|
Flags_SetInfTable(INFTABLE_198);
|
||||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2261,8 +2261,8 @@ u8 Item_Give(PlayState* play, u8 item) {
|
|||||||
func_80087708(play, 24, 5);
|
func_80087708(play, 24, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(gSaveContext.infTable[25] & 0x100)) {
|
if (!Flags_GetInfTable(INFTABLE_198)) {
|
||||||
gSaveContext.infTable[25] |= 0x100;
|
Flags_SetInfTable(INFTABLE_198);
|
||||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2321,7 +2321,7 @@ u8 Item_Give(PlayState* play, u8 item) {
|
|||||||
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
return Return_Item(item, MOD_NONE, ITEM_NONE);
|
||||||
} else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) {
|
} else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) {
|
||||||
if ((item == ITEM_SAW) && CVarGetInteger("gDekuNutUpgradeFix", 0) == 0) {
|
if ((item == ITEM_SAW) && CVarGetInteger("gDekuNutUpgradeFix", 0) == 0) {
|
||||||
gSaveContext.itemGetInf[1] |= 0x8000;
|
Flags_SetItemGetInf(ITEMGETINF_OBTAINED_NUT_UPGRADE_FROM_STAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item >= ITEM_POCKET_EGG) {
|
if (item >= ITEM_POCKET_EGG) {
|
||||||
@ -2670,7 +2670,7 @@ u8 Item_CheckObtainability(u8 item) {
|
|||||||
} else if (item == ITEM_LONGSHOT) {
|
} else if (item == ITEM_LONGSHOT) {
|
||||||
return ITEM_NONE;
|
return ITEM_NONE;
|
||||||
} else if ((item == ITEM_SEEDS) || (item == ITEM_SEEDS_30)) {
|
} else if ((item == ITEM_SEEDS) || (item == ITEM_SEEDS_30)) {
|
||||||
if (!(gSaveContext.itemGetInf[1] & 0x8)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_13)) {
|
||||||
return ITEM_NONE;
|
return ITEM_NONE;
|
||||||
} else {
|
} else {
|
||||||
return ITEM_SEEDS;
|
return ITEM_SEEDS;
|
||||||
@ -2685,8 +2685,8 @@ u8 Item_CheckObtainability(u8 item) {
|
|||||||
return ITEM_HEART;
|
return ITEM_HEART;
|
||||||
} else if ((item == ITEM_MAGIC_SMALL) || (item == ITEM_MAGIC_LARGE)) {
|
} else if ((item == ITEM_MAGIC_SMALL) || (item == ITEM_MAGIC_LARGE)) {
|
||||||
// "Magic Pot Get_Inf_Table( 25, 0x0100)=%d"
|
// "Magic Pot Get_Inf_Table( 25, 0x0100)=%d"
|
||||||
osSyncPrintf("魔法の壷 Get_Inf_Table( 25, 0x0100)=%d\n", gSaveContext.infTable[25] & 0x100);
|
osSyncPrintf("魔法の壷 Get_Inf_Table( 25, 0x0100)=%d\n", Flags_GetInfTable(INFTABLE_198));
|
||||||
if (!(gSaveContext.infTable[25] & 0x100)) {
|
if (!Flags_GetInfTable(INFTABLE_198)) {
|
||||||
return ITEM_NONE;
|
return ITEM_NONE;
|
||||||
} else {
|
} else {
|
||||||
return item;
|
return item;
|
||||||
|
@ -234,7 +234,7 @@ void GivePlayerRandoRewardNocturne(PlayState* play, RandomizerCheck check) {
|
|||||||
gSaveContext.entranceIndex == 0x0191 ||
|
gSaveContext.entranceIndex == 0x0191 ||
|
||||||
gSaveContext.entranceIndex == 0x0195) && LINK_IS_ADULT && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) &&
|
gSaveContext.entranceIndex == 0x0195) && LINK_IS_ADULT && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) &&
|
||||||
CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER) && player != NULL &&
|
CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER) && player != NULL &&
|
||||||
!Player_InBlockingCsMode(play, player) && !Flags_GetEventChkInf(0xAA)) {
|
!Player_InBlockingCsMode(play, player) && !Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) {
|
||||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_NOCTURNE_OF_SHADOW);
|
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_NOCTURNE_OF_SHADOW);
|
||||||
GiveItemEntryWithoutActor(play, getItemEntry);
|
GiveItemEntryWithoutActor(play, getItemEntry);
|
||||||
player->pendingFlag.flagID = 0xAA;
|
player->pendingFlag.flagID = 0xAA;
|
||||||
@ -246,7 +246,7 @@ void GivePlayerRandoRewardRequiem(PlayState* play, RandomizerCheck check) {
|
|||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||||
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC) && player != NULL &&
|
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT) && player != NULL &&
|
||||||
!Player_InBlockingCsMode(play, player)) {
|
!Player_InBlockingCsMode(play, player)) {
|
||||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME);
|
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME);
|
||||||
GiveItemEntryWithoutActor(play, getItemEntry);
|
GiveItemEntryWithoutActor(play, getItemEntry);
|
||||||
@ -433,7 +433,7 @@ void GivePlayerRandoRewardSariaGift(PlayState* play, RandomizerCheck check) {
|
|||||||
if (gSaveContext.entranceIndex == 0x05E0) {
|
if (gSaveContext.entranceIndex == 0x05E0) {
|
||||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_ZELDAS_LULLABY);
|
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_ZELDAS_LULLABY);
|
||||||
|
|
||||||
if (!Flags_GetEventChkInf(0xC1) && player != NULL && !Player_InBlockingCsMode(play, player)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE) && player != NULL && !Player_InBlockingCsMode(play, player)) {
|
||||||
GiveItemEntryWithoutActor(play, getItemEntry);
|
GiveItemEntryWithoutActor(play, getItemEntry);
|
||||||
player->pendingFlag.flagType = FLAG_EVENT_CHECK_INF;
|
player->pendingFlag.flagType = FLAG_EVENT_CHECK_INF;
|
||||||
player->pendingFlag.flagID = 0xC1;
|
player->pendingFlag.flagID = 0xC1;
|
||||||
@ -462,7 +462,7 @@ void Play_Init(GameState* thisx) {
|
|||||||
// entranceIndex 0x7A, Castle Courtyard - Day from crawlspace
|
// entranceIndex 0x7A, Castle Courtyard - Day from crawlspace
|
||||||
// entranceIndex 0x400, Zelda's Courtyard
|
// entranceIndex 0x400, Zelda's Courtyard
|
||||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
|
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
|
||||||
!(gSaveContext.eventChkInf[4] & 1) && !(gSaveContext.eventChkInf[5] & 0x200)) {
|
!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
|
||||||
if (gSaveContext.entranceIndex == 0x7A) {
|
if (gSaveContext.entranceIndex == 0x7A) {
|
||||||
gSaveContext.entranceIndex = 0x400;
|
gSaveContext.entranceIndex = 0x400;
|
||||||
}
|
}
|
||||||
@ -560,7 +560,7 @@ void Play_Init(GameState* thisx) {
|
|||||||
}
|
}
|
||||||
} else if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT04) && LINK_IS_ADULT &&
|
} else if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT04) && LINK_IS_ADULT &&
|
||||||
gSaveContext.sceneSetupIndex < 4) {
|
gSaveContext.sceneSetupIndex < 4) {
|
||||||
gSaveContext.sceneSetupIndex = (gSaveContext.eventChkInf[4] & 0x100) ? 3 : 2;
|
gSaveContext.sceneSetupIndex = (Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) ? 3 : 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Play_SpawnScene(
|
Play_SpawnScene(
|
||||||
|
@ -2030,7 +2030,7 @@ void func_8009E0B8(PlayState* play) {
|
|||||||
spA3 = 255 - (u8)play->roomCtx.unk_74[0];
|
spA3 = 255 - (u8)play->roomCtx.unk_74[0];
|
||||||
} else if (gSaveContext.sceneSetupIndex == 6) {
|
} else if (gSaveContext.sceneSetupIndex == 6) {
|
||||||
spA0 = play->roomCtx.unk_74[0] + 500;
|
spA0 = play->roomCtx.unk_74[0] + 500;
|
||||||
} else if (((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) && (gSaveContext.eventChkInf[0] & 0x80)) {
|
} else if (((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) && (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD))) {
|
||||||
spA0 = 2150;
|
spA0 = 2150;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2058,7 +2058,7 @@ void func_8009E54C(PlayState* play) {
|
|||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx);
|
OPEN_DISPS(play->state.gfxCtx);
|
||||||
|
|
||||||
if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200))) {
|
if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER))) {
|
||||||
play->roomCtx.unk_74[0] = 87;
|
play->roomCtx.unk_74[0] = 87;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ void Sram_OpenSave() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
|
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
|
||||||
if ((gSaveContext.eventChkInf[4] & 1) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !gSaveContext.n64ddFlag) {
|
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !gSaveContext.n64ddFlag) {
|
||||||
i = gSaveContext.eventChkInf[4] & ~1;
|
i = gSaveContext.eventChkInf[4] & ~1;
|
||||||
gSaveContext.eventChkInf[4] = i;
|
gSaveContext.eventChkInf[4] = i;
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ s32 BgBdanObjects_GetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||||||
case 0:
|
case 0:
|
||||||
return this->cameraSetting == CAM_SET_NORMAL0;
|
return this->cameraSetting == CAM_SET_NORMAL0;
|
||||||
case 4:
|
case 4:
|
||||||
return gSaveContext.infTable[20] & 0x40;
|
return Flags_GetInfTable(INFTABLE_146);
|
||||||
case 3:
|
case 3:
|
||||||
return this->cameraSetting == CAM_SET_DUNGEON1;
|
return this->cameraSetting == CAM_SET_DUNGEON1;
|
||||||
default:
|
default:
|
||||||
@ -98,7 +98,7 @@ void BgBdanObjects_SetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||||||
this->cameraSetting = CAM_SET_DUNGEON0;
|
this->cameraSetting = CAM_SET_DUNGEON0;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
gSaveContext.infTable[20] |= 0x40;
|
Flags_SetInfTable(INFTABLE_146);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
osSyncPrintf("Bg_Bdan_Objects_Set_Contact_Ru1\nそんな送信モードは無い%d!!!!!!!!\n");
|
osSyncPrintf("Bg_Bdan_Objects_Set_Contact_Ru1\nそんな送信モードは無い%d!!!!!!!!\n");
|
||||||
|
@ -298,8 +298,8 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
|
|||||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
|
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((wallType == BWALL_DC_ENTRANCE) && (!(Flags_GetEventChkInf(0xB0)))) {
|
if ((wallType == BWALL_DC_ENTRANCE) && (!Flags_GetEventChkInf(EVENTCHKINF_ENTERED_DODONGOS_CAVERN))) {
|
||||||
Flags_SetEventChkInf(0xB0);
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_DODONGOS_CAVERN);
|
||||||
Cutscene_SetSegment(play, gDcOpeningCs);
|
Cutscene_SetSegment(play, gDcOpeningCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||||
|
@ -181,7 +181,7 @@ void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) {
|
|||||||
sBgDodoagoFirstExplosiveFlag = true;
|
sBgDodoagoFirstExplosiveFlag = true;
|
||||||
sBgDodoagoTimer = 50;
|
sBgDodoagoTimer = 50;
|
||||||
}
|
}
|
||||||
} else if (Flags_GetEventChkInf(0xB0)) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_ENTERED_DODONGOS_CAVERN)) {
|
||||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderMain);
|
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderMain);
|
||||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderLeft);
|
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderLeft);
|
||||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderRight);
|
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderRight);
|
||||||
@ -311,7 +311,7 @@ void BgDodoago_Update(Actor* thisx, PlayState* play) {
|
|||||||
void BgDodoago_Draw(Actor* thisx, PlayState* play) {
|
void BgDodoago_Draw(Actor* thisx, PlayState* play) {
|
||||||
OPEN_DISPS(play->state.gfxCtx);
|
OPEN_DISPS(play->state.gfxCtx);
|
||||||
|
|
||||||
if (Flags_GetEventChkInf(0xB0)) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_ENTERED_DODONGOS_CAVERN)) {
|
||||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
@ -237,17 +237,17 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
|
|||||||
if (play->sceneNum != SCENE_DAIYOUSEI_IZUMI) {
|
if (play->sceneNum != SCENE_DAIYOUSEI_IZUMI) {
|
||||||
switch (this->fountainType) {
|
switch (this->fountainType) {
|
||||||
case FAIRY_SPELL_FARORES_WIND:
|
case FAIRY_SPELL_FARORES_WIND:
|
||||||
if (!(gSaveContext.itemGetInf[1] & 0x100)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_18)) {
|
||||||
givingReward = true;
|
givingReward = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FAIRY_SPELL_DINS_FIRE:
|
case FAIRY_SPELL_DINS_FIRE:
|
||||||
if (!(gSaveContext.itemGetInf[1] & 0x200)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_19)) {
|
||||||
givingReward = true;
|
givingReward = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FAIRY_SPELL_NAYRUS_LOVE:
|
case FAIRY_SPELL_NAYRUS_LOVE:
|
||||||
if (!(gSaveContext.itemGetInf[1] & 0x400)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_1A)) {
|
||||||
givingReward = true;
|
givingReward = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -44,8 +44,8 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->somePos.x = thisx->world.pos.x;
|
this->somePos.x = thisx->world.pos.x;
|
||||||
this->somePos.y = thisx->world.pos.y;
|
this->somePos.y = thisx->world.pos.y;
|
||||||
this->somePos.z = thisx->world.pos.z;
|
this->somePos.z = thisx->world.pos.z;
|
||||||
if (((gSaveContext.infTable[7] & 0x40) ||
|
if (((Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) ||
|
||||||
(!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[4] & 0x20)) ||
|
(!gSaveContext.n64ddFlag && (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) ||
|
||||||
(gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
|
(gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
|
||||||
(play->sceneNum == SCENE_SPOT01)) {
|
(play->sceneNum == SCENE_SPOT01)) {
|
||||||
thisx->world.pos.x = -89.0f;
|
thisx->world.pos.x = -89.0f;
|
||||||
@ -66,7 +66,7 @@ void BgGateShutter_Destroy(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_8087828C(BgGateShutter* this, PlayState* play) {
|
void func_8087828C(BgGateShutter* this, PlayState* play) {
|
||||||
if (this->openingState == 1 && !(gSaveContext.infTable[7] & 0x40)) {
|
if (this->openingState == 1 && !Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) {
|
||||||
this->unk_178 = 2;
|
this->unk_178 = 2;
|
||||||
this->actionFunc = func_80878300;
|
this->actionFunc = func_80878300;
|
||||||
} else if (this->openingState == 2) {
|
} else if (this->openingState == 2) {
|
||||||
|
@ -51,7 +51,7 @@ void BgGjyoBridge_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
|
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
|
||||||
|
|
||||||
int bridge = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE);
|
int bridge = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE);
|
||||||
if (gSaveContext.eventChkInf[4] & 0x2000 || (gSaveContext.n64ddFlag && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT) || (gSaveContext.n64ddFlag && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
|
||||||
this->actionFunc = func_808787A4;
|
this->actionFunc = func_808787A4;
|
||||||
} else {
|
} else {
|
||||||
this->dyna.actor.draw = NULL;
|
this->dyna.actor.draw = NULL;
|
||||||
@ -150,7 +150,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) {
|
|||||||
(play->csCtx.npcActions[2]->action == 2)) {
|
(play->csCtx.npcActions[2]->action == 2)) {
|
||||||
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
||||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||||
gSaveContext.eventChkInf[4] |= 0x2000;
|
Flags_SetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ void BgInGate_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||||
|
|
||||||
if ((play->sceneNum != SCENE_SPOT20 || !LINK_IS_ADULT) ||
|
if ((play->sceneNum != SCENE_SPOT20 || !LINK_IS_ADULT) ||
|
||||||
(((gSaveContext.eventChkInf[1] & 0x100)) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
(((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
||||||
Actor_Kill(&this->dyna.actor);
|
Actor_Kill(&this->dyna.actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ void BgRelayObjects_Init(Actor* thisx, PlayState* play) {
|
|||||||
DynaPolyActor_Init(&this->dyna, 3);
|
DynaPolyActor_Init(&this->dyna, 3);
|
||||||
if (thisx->params == WINDMILL_ROTATING_GEAR) {
|
if (thisx->params == WINDMILL_ROTATING_GEAR) {
|
||||||
CollisionHeader_GetVirtual(&gWindmillRotatingPlatformCol, &colHeader);
|
CollisionHeader_GetVirtual(&gWindmillRotatingPlatformCol, &colHeader);
|
||||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL)) {
|
||||||
thisx->world.rot.y = 0x400;
|
thisx->world.rot.y = 0x400;
|
||||||
} else {
|
} else {
|
||||||
thisx->world.rot.y = 0x80;
|
thisx->world.rot.y = 0x80;
|
||||||
@ -111,7 +111,7 @@ void BgRelayObjects_Destroy(Actor* thisx, PlayState* play) {
|
|||||||
|
|
||||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||||
if ((this->dyna.actor.params == WINDMILL_ROTATING_GEAR) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
if ((this->dyna.actor.params == WINDMILL_ROTATING_GEAR) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||||
gSaveContext.eventChkInf[6] &= ~0x20;
|
Flags_UnsetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,9 +182,9 @@ void func_808A932C(BgRelayObjects* this, PlayState* play) {
|
|||||||
|
|
||||||
void func_808A939C(BgRelayObjects* this, PlayState* play) {
|
void func_808A939C(BgRelayObjects* this, PlayState* play) {
|
||||||
if (Flags_GetEnv(play, 5)) {
|
if (Flags_GetEnv(play, 5)) {
|
||||||
gSaveContext.eventChkInf[6] |= 0x20;
|
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL);
|
||||||
}
|
}
|
||||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL)) {
|
||||||
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x400, 8);
|
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x400, 8);
|
||||||
} else {
|
} else {
|
||||||
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x80, 8);
|
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x80, 8);
|
||||||
|
@ -82,7 +82,7 @@ void BgSpot00Hanebasi_Init(Actor* thisx, PlayState* play) {
|
|||||||
if (gSaveContext.sceneSetupIndex != 6) {
|
if (gSaveContext.sceneSetupIndex != 6) {
|
||||||
// Don't close the bridge in rando to accomodate hyrule castle exit
|
// Don't close the bridge in rando to accomodate hyrule castle exit
|
||||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !(gSaveContext.eventChkInf[8] & 1) && !(gSaveContext.n64ddFlag)) {
|
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && !(gSaveContext.n64ddFlag)) {
|
||||||
this->dyna.actor.shape.rot.x = -0x4000;
|
this->dyna.actor.shape.rot.x = -0x4000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ void BgSpot00Hanebasi_DrawbridgeWait(BgSpot00Hanebasi* this, PlayState* play) {
|
|||||||
|
|
||||||
if ((gSaveContext.sceneSetupIndex >= 4) || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
|
if ((gSaveContext.sceneSetupIndex >= 4) || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
|
||||||
!CHECK_QUEST_ITEM(QUEST_GORON_RUBY) || !CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) ||
|
!CHECK_QUEST_ITEM(QUEST_GORON_RUBY) || !CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) ||
|
||||||
(gSaveContext.eventChkInf[8] & 1)) {
|
(Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE))) {
|
||||||
if (this->dyna.actor.shape.rot.x != 0) {
|
if (this->dyna.actor.shape.rot.x != 0) {
|
||||||
if (Flags_GetEnv(play, 0) || ((gSaveContext.sceneSetupIndex < 4) && IS_DAY)) {
|
if (Flags_GetEnv(play, 0) || ((gSaveContext.sceneSetupIndex < 4) && IS_DAY)) {
|
||||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||||
@ -214,14 +214,14 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) {
|
|||||||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||||
if (play->sceneNum == SCENE_SPOT00) {
|
if (play->sceneNum == SCENE_SPOT00) {
|
||||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !(gSaveContext.eventChkInf[8] & 1) && LINK_IS_CHILD) {
|
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && LINK_IS_CHILD) {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) &&
|
if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) &&
|
||||||
(player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) &&
|
(player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) &&
|
||||||
(!(Play_InCsMode(play)))) {
|
(!(Play_InCsMode(play)))) {
|
||||||
gSaveContext.eventChkInf[8] |= 1;
|
Flags_SetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE);
|
||||||
Flags_SetEventChkInf(0x82);
|
Flags_SetEventChkInf(EVENTCHKINF_DRAWBRIDGE_OPENED_AFTER_ZELDA_FLED);
|
||||||
this->actionFunc = BgSpot00Hanebasi_DoNothing;
|
this->actionFunc = BgSpot00Hanebasi_DoNothing;
|
||||||
func_8002DF54(play, &player->actor, 8);
|
func_8002DF54(play, &player->actor, 8);
|
||||||
play->nextEntranceIndex = 0x00CD;
|
play->nextEntranceIndex = 0x00CD;
|
||||||
|
@ -66,7 +66,7 @@ void func_808AAA50(BgSpot01Fusya* this, PlayState* play) {
|
|||||||
this->unk_158 = 100.0f;
|
this->unk_158 = 100.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL)) {
|
||||||
this->unk_158 = 1800.0f;
|
this->unk_158 = 1800.0f;
|
||||||
}
|
}
|
||||||
thisx->shape.rot.z += this->unk_154;
|
thisx->shape.rot.z += this->unk_154;
|
||||||
|
@ -303,7 +303,7 @@ void BgSpot01Idohashira_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||||
|
|
||||||
if (gSaveContext.sceneSetupIndex < 4) {
|
if (gSaveContext.sceneSetupIndex < 4) {
|
||||||
if ((gSaveContext.eventChkInf[5] & 0x10) && LINK_IS_ADULT) {
|
if ((Flags_GetEventChkInf(EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW)) && LINK_IS_ADULT) {
|
||||||
Actor_Kill(&this->dyna.actor);
|
Actor_Kill(&this->dyna.actor);
|
||||||
} else {
|
} else {
|
||||||
this->action = 0;
|
this->action = 0;
|
||||||
|
@ -37,7 +37,7 @@ void BgSpot01Idomizu_Init(Actor* thisx, PlayState* play) {
|
|||||||
BgSpot01Idomizu* this = (BgSpot01Idomizu*)thisx;
|
BgSpot01Idomizu* this = (BgSpot01Idomizu*)thisx;
|
||||||
|
|
||||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||||
if (gSaveContext.eventChkInf[6] & 0x80 || LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO) || LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||||
this->waterHeight = -550.0f;
|
this->waterHeight = -550.0f;
|
||||||
} else {
|
} else {
|
||||||
this->waterHeight = 52.0f;
|
this->waterHeight = 52.0f;
|
||||||
@ -50,7 +50,7 @@ void BgSpot01Idomizu_Destroy(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_808ABB84(BgSpot01Idomizu* this, PlayState* play) {
|
void func_808ABB84(BgSpot01Idomizu* this, PlayState* play) {
|
||||||
if (gSaveContext.eventChkInf[6] & 0x80) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO)) {
|
||||||
this->waterHeight = -550.0f;
|
this->waterHeight = -550.0f;
|
||||||
}
|
}
|
||||||
play->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
|
play->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
|
||||||
|
@ -51,7 +51,7 @@ void BgSpot01Idosoko_Init(Actor* thisx, PlayState* play) {
|
|||||||
// child Link has drained the water to the well
|
// child Link has drained the water to the well
|
||||||
if (!LINK_IS_ADULT || (gSaveContext.n64ddFlag &&
|
if (!LINK_IS_ADULT || (gSaveContext.n64ddFlag &&
|
||||||
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
|
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
|
||||||
Flags_GetEventChkInf(0x67))) {
|
Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO))) {
|
||||||
Actor_Kill(&this->dyna.actor);
|
Actor_Kill(&this->dyna.actor);
|
||||||
} else {
|
} else {
|
||||||
BgSpot01Idosoko_SetupAction(this, func_808ABF54);
|
BgSpot01Idosoko_SetupAction(this, func_808ABF54);
|
||||||
|
@ -88,7 +88,7 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play) {
|
|||||||
|
|
||||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
|
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
|
||||||
|
|
||||||
if (((gSaveContext.eventChkInf[1] & 0x2000) && (play->sceneNum == SCENE_SPOT02) &&
|
if (((Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) && (play->sceneNum == SCENE_SPOT02) &&
|
||||||
(thisx->params == 2)) ||
|
(thisx->params == 2)) ||
|
||||||
(LINK_IS_ADULT && (thisx->params == 1))) {
|
(LINK_IS_ADULT && (thisx->params == 1))) {
|
||||||
Actor_Kill(thisx);
|
Actor_Kill(thisx);
|
||||||
@ -101,7 +101,7 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->actionFunc = func_808ACC34;
|
this->actionFunc = func_808ACC34;
|
||||||
thisx->draw = func_808ACCB8;
|
thisx->draw = func_808ACCB8;
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[1] & 0x2000) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
|
||||||
Actor_Kill(thisx);
|
Actor_Kill(thisx);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -131,7 +131,7 @@ void func_808AC908(BgSpot02Objects* this, PlayState* play) {
|
|||||||
|
|
||||||
// We want to do most of the same things in rando, but we're not in a cutscene and the flag for
|
// We want to do most of the same things in rando, but we're not in a cutscene and the flag for
|
||||||
// destroying the royal tombstone is already set.
|
// destroying the royal tombstone is already set.
|
||||||
if (gSaveContext.n64ddFlag && gSaveContext.eventChkInf[1] & 0x2000) {
|
if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
|
||||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
|
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
|
||||||
this->timer = 25;
|
this->timer = 25;
|
||||||
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
|
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
|
||||||
@ -144,7 +144,7 @@ void func_808AC908(BgSpot02Objects* this, PlayState* play) {
|
|||||||
if (play->csCtx.state != 0) {
|
if (play->csCtx.state != 0) {
|
||||||
if (play->csCtx.npcActions[3] != NULL && play->csCtx.npcActions[3]->action == 2) {
|
if (play->csCtx.npcActions[3] != NULL && play->csCtx.npcActions[3]->action == 2) {
|
||||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
|
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
|
||||||
gSaveContext.eventChkInf[1] |= 0x2000;
|
Flags_SetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB);
|
||||||
this->timer = 25;
|
this->timer = 25;
|
||||||
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
|
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
|
||||||
pos.y = this->dyna.actor.world.pos.y + 30.0f;
|
pos.y = this->dyna.actor.world.pos.y + 30.0f;
|
||||||
@ -220,7 +220,7 @@ void func_808ACC34(BgSpot02Objects* this, PlayState* play) {
|
|||||||
// This is the actionFunc that the game settles on when you load the Graveyard
|
// This is the actionFunc that the game settles on when you load the Graveyard
|
||||||
// When we're in rando and the flag for the gravestone being destroyed gets set,
|
// When we're in rando and the flag for the gravestone being destroyed gets set,
|
||||||
// set the actionFunc to the function where the gravestone explodes.
|
// set the actionFunc to the function where the gravestone explodes.
|
||||||
if (gSaveContext.n64ddFlag && gSaveContext.eventChkInf[1] & 0X2000) {
|
if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
|
||||||
this->actionFunc = func_808AC908;
|
this->actionFunc = func_808AC908;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ void BgSpot06Objects_Init(Actor* thisx, PlayState* play) {
|
|||||||
Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderItem);
|
Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderItem);
|
||||||
|
|
||||||
if (LINK_IS_ADULT && Flags_GetSwitch(play, this->switchFlag)) {
|
if (LINK_IS_ADULT && Flags_GetSwitch(play, this->switchFlag)) {
|
||||||
if (!(gSaveContext.eventChkInf[6] & 0x200)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER)) {
|
||||||
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_LOWERED;
|
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_LOWERED;
|
||||||
} else {
|
} else {
|
||||||
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_RAISED;
|
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_RAISED;
|
||||||
@ -154,7 +154,7 @@ void BgSpot06Objects_Init(Actor* thisx, PlayState* play) {
|
|||||||
Actor_ProcessInitChain(thisx, sInitChainWaterPlane);
|
Actor_ProcessInitChain(thisx, sInitChainWaterPlane);
|
||||||
thisx->flags = ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED;
|
thisx->flags = ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED;
|
||||||
|
|
||||||
if (LINK_IS_ADULT && !(Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER))) {
|
if (LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER)) {
|
||||||
if (gSaveContext.sceneSetupIndex < 4) {
|
if (gSaveContext.sceneSetupIndex < 4) {
|
||||||
this->lakeHyliaWaterLevel = -681.0f;
|
this->lakeHyliaWaterLevel = -681.0f;
|
||||||
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface =
|
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface =
|
||||||
@ -623,7 +623,7 @@ void BgSpot06Objects_WaterPlaneCutsceneLower(BgSpot06Objects* this, PlayState* p
|
|||||||
this->dyna.actor.world.pos.y = (this->lakeHyliaWaterLevel + 680.0f) + WATER_LEVEL_RAISED;
|
this->dyna.actor.world.pos.y = (this->lakeHyliaWaterLevel + 680.0f) + WATER_LEVEL_RAISED;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSaveContext.eventChkInf[6] &= ~0x200; // Unset the "raised lake hylia water" flag
|
Flags_UnsetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER); // Unset the "raised lake hylia water" flag
|
||||||
play->roomCtx.unk_74[0] = 87; // Remove the moving under water texture from lake hylia ground
|
play->roomCtx.unk_74[0] = 87; // Remove the moving under water texture from lake hylia ground
|
||||||
|
|
||||||
if (this->lakeHyliaWaterLevel <= -681.0f) {
|
if (this->lakeHyliaWaterLevel <= -681.0f) {
|
||||||
|
@ -64,7 +64,7 @@ s32 func_808B1AE0(BgSpot09Obj* this, PlayState* play) {
|
|||||||
return this->dyna.actor.params == 0;
|
return this->dyna.actor.params == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
carpentersRescued = (gSaveContext.eventChkInf[9] & 0xF) == 0xF;
|
carpentersRescued = GET_EVENTCHKINF_CARPENTERS_FREE_ALL();
|
||||||
|
|
||||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||||
switch (this->dyna.actor.params) {
|
switch (this->dyna.actor.params) {
|
||||||
@ -139,7 +139,7 @@ void BgSpot09Obj_Init(Actor* thisx, PlayState* play) {
|
|||||||
BgSpot09Obj* this = (BgSpot09Obj*)thisx;
|
BgSpot09Obj* this = (BgSpot09Obj*)thisx;
|
||||||
|
|
||||||
osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", this->dyna.actor.params,
|
osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", this->dyna.actor.params,
|
||||||
gSaveContext.eventChkInf[9] & 0xF);
|
GET_EVENTCHKINF_CARPENTERS_FREE_ALL());
|
||||||
this->dyna.actor.params &= 0xFF;
|
this->dyna.actor.params &= 0xFF;
|
||||||
if ((this->dyna.actor.params < 0) || (this->dyna.actor.params >= 5)) {
|
if ((this->dyna.actor.params < 0) || (this->dyna.actor.params >= 5)) {
|
||||||
osSyncPrintf("Error : Spot 09 object の arg_data が判別出来ない(%s %d)(arg_data 0x%04x)\n",
|
osSyncPrintf("Error : Spot 09 object の arg_data が判別出来ない(%s %d)(arg_data 0x%04x)\n",
|
||||||
|
@ -110,7 +110,7 @@ s32 func_808B3AAC(BgSpot15Rrbox* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rotY < 0x2000 && rotY > -0x6000) {
|
if (rotY < 0x2000 && rotY > -0x6000) {
|
||||||
return gSaveContext.eventChkInf[1] & 0x10;
|
return Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ void BgSpot15Saku_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->unk_170.x = this->dyna.actor.world.pos.x;
|
this->unk_170.x = this->dyna.actor.world.pos.x;
|
||||||
this->unk_170.y = this->dyna.actor.world.pos.y;
|
this->unk_170.y = this->dyna.actor.world.pos.y;
|
||||||
this->unk_170.z = this->dyna.actor.world.pos.z;
|
this->unk_170.z = this->dyna.actor.world.pos.z;
|
||||||
if (gSaveContext.infTable[7] & 2) {
|
if (Flags_GetInfTable(INFTABLE_71)) {
|
||||||
this->dyna.actor.world.pos.z = 2659.0f;
|
this->dyna.actor.world.pos.z = 2659.0f;
|
||||||
}
|
}
|
||||||
this->actionFunc = func_808B4930;
|
this->actionFunc = func_808B4930;
|
||||||
@ -59,7 +59,7 @@ void BgSpot15Saku_Destroy(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_808B4930(BgSpot15Saku* this, PlayState* play) {
|
void func_808B4930(BgSpot15Saku* this, PlayState* play) {
|
||||||
if (this->unk_168 && !(gSaveContext.infTable[7] & 2)) {
|
if (this->unk_168 && !Flags_GetInfTable(INFTABLE_71)) {
|
||||||
this->timer = 2;
|
this->timer = 2;
|
||||||
this->actionFunc = func_808B4978;
|
this->actionFunc = func_808B4978;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +443,7 @@ void func_808B5950(BgSpot16Bombstone* this, PlayState* play) {
|
|||||||
OnePointCutscene_Init(play, 4180, 50, NULL, MAIN_CAM);
|
OnePointCutscene_Init(play, 4180, 50, NULL, MAIN_CAM);
|
||||||
|
|
||||||
Flags_SetSwitch(play, this->switchFlag);
|
Flags_SetSwitch(play, this->switchFlag);
|
||||||
gSaveContext.eventChkInf[2] |= 8;
|
Flags_SetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE);
|
||||||
|
|
||||||
func_808B5A78(this);
|
func_808B5A78(this);
|
||||||
} else {
|
} else {
|
||||||
|
@ -71,7 +71,7 @@ void BgSpot16Doughnut_Init(Actor* thisx, PlayState* play) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
osSyncPrintf(VT_FGCOL(CYAN) "%f" VT_RST "\n", this->actor.scale.x);
|
osSyncPrintf(VT_FGCOL(CYAN) "%f" VT_RST "\n", this->actor.scale.x);
|
||||||
if (!LINK_IS_ADULT || gSaveContext.eventChkInf[2] & 0x8000) {
|
if (!LINK_IS_ADULT || Flags_GetEventChkInf(EVENTCHKINF_DEATH_MOUNTAIN_ERUPTED)) {
|
||||||
this->fireFlag &= ~1;
|
this->fireFlag &= ~1;
|
||||||
} else {
|
} else {
|
||||||
this->fireFlag |= 1;
|
this->fireFlag |= 1;
|
||||||
|
@ -48,7 +48,7 @@ void BgSpot18Shutter_Init(Actor* thisx, PlayState* play) {
|
|||||||
|
|
||||||
if (param == 0) {
|
if (param == 0) {
|
||||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||||
if (gSaveContext.infTable[16] & 0x200) {
|
if (Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
||||||
this->actionFunc = func_808B95AC;
|
this->actionFunc = func_808B95AC;
|
||||||
this->dyna.actor.world.pos.y += 180.0f;
|
this->dyna.actor.world.pos.y += 180.0f;
|
||||||
} else {
|
} else {
|
||||||
@ -63,7 +63,7 @@ void BgSpot18Shutter_Init(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.infTable[16] & 0x200) {
|
if (Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
||||||
this->dyna.actor.world.pos.x += 125.0f * Math_CosS(this->dyna.actor.world.rot.y);
|
this->dyna.actor.world.pos.x += 125.0f * Math_CosS(this->dyna.actor.world.rot.y);
|
||||||
this->dyna.actor.world.pos.z -= 125.0f * Math_SinS(this->dyna.actor.world.rot.y);
|
this->dyna.actor.world.pos.z -= 125.0f * Math_SinS(this->dyna.actor.world.rot.y);
|
||||||
this->actionFunc = func_808B95AC;
|
this->actionFunc = func_808B95AC;
|
||||||
@ -94,7 +94,7 @@ void func_808B95B8(BgSpot18Shutter* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_808B9618(BgSpot18Shutter* this, PlayState* play) {
|
void func_808B9618(BgSpot18Shutter* this, PlayState* play) {
|
||||||
if (gSaveContext.infTable[16] & 0x200) {
|
if (Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
||||||
Actor_SetFocus(&this->dyna.actor, 70.0f);
|
Actor_SetFocus(&this->dyna.actor, 70.0f);
|
||||||
if (((this->dyna.actor.params >> 8) & 1) == 0) {
|
if (((this->dyna.actor.params >> 8) & 1) == 0) {
|
||||||
this->actionFunc = func_808B9698;
|
this->actionFunc = func_808B9698;
|
||||||
|
@ -47,7 +47,7 @@ void BgTokiHikari_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->actionFunc = BgTokiHikari_DoNothing;
|
this->actionFunc = BgTokiHikari_DoNothing;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
|
||||||
this->actionFunc = func_808BA204;
|
this->actionFunc = func_808BA204;
|
||||||
this->unk_14C = 0.0f;
|
this->unk_14C = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
|
@ -112,14 +112,14 @@ void BgTokiSwd_Destroy(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
||||||
if (((gSaveContext.eventChkInf[4] & 0x8000) == 0) && (gSaveContext.sceneSetupIndex < 4) &&
|
if (((Flags_GetEventChkInf(EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER)) == 0) && (gSaveContext.sceneSetupIndex < 4) &&
|
||||||
Actor_IsFacingAndNearPlayer(&this->actor, 800.0f, 0x7530) && !Play_InCsMode(play)) {
|
Actor_IsFacingAndNearPlayer(&this->actor, 800.0f, 0x7530) && !Play_InCsMode(play)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
Flags_SetEventChkInf(EVENTCHKINF_ENTERED_MASTER_SWORD_CHAMBER);
|
||||||
play->csCtx.segment = D_808BBD90;
|
play->csCtx.segment = D_808BBD90;
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!LINK_IS_ADULT || (gSaveContext.eventChkInf[5] & 0x20 && !gSaveContext.n64ddFlag) || gSaveContext.n64ddFlag) {
|
if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !gSaveContext.n64ddFlag) || gSaveContext.n64ddFlag) {
|
||||||
if (Actor_HasParent(&this->actor, play)) {
|
if (Actor_HasParent(&this->actor, play)) {
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
Item_Give(play, ITEM_SWORD_MASTER);
|
Item_Give(play, ITEM_SWORD_MASTER);
|
||||||
|
@ -143,9 +143,9 @@ void func_808BC864(BgTreemouth* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_808BC8B8(BgTreemouth* this, PlayState* play) {
|
void func_808BC8B8(BgTreemouth* this, PlayState* play) {
|
||||||
if ((!(Flags_GetEventChkInf(5))) || LINK_IS_ADULT) {
|
if ((!Flags_GetEventChkInf(EVENTCHKINF_DEKU_TREE_OPENED_MOUTH)) || LINK_IS_ADULT) {
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
if (Flags_GetEventChkInf(0xC)) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_MET_DEKU_TREE)) {
|
||||||
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) {
|
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) {
|
||||||
this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE;
|
this->dyna.actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||||
if (this->dyna.actor.isTargeted) {
|
if (this->dyna.actor.isTargeted) {
|
||||||
@ -156,7 +156,7 @@ void func_808BC8B8(BgTreemouth* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x4E20)) {
|
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x4E20)) {
|
||||||
Flags_SetEventChkInf(0xC);
|
Flags_SetEventChkInf(EVENTCHKINF_MET_DEKU_TREE);
|
||||||
play->csCtx.segment = D_808BCE20;
|
play->csCtx.segment = D_808BCE20;
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
BgTreemouth_SetupAction(this, func_808BC9EC);
|
BgTreemouth_SetupAction(this, func_808BC9EC);
|
||||||
@ -188,7 +188,7 @@ void func_808BC9EC(BgTreemouth* this, PlayState* play) {
|
|||||||
|
|
||||||
if (play->msgCtx.choiceIndex == 0) {
|
if (play->msgCtx.choiceIndex == 0) {
|
||||||
play->csCtx.segment = D_808BD520;
|
play->csCtx.segment = D_808BD520;
|
||||||
Flags_SetEventChkInf(5);
|
Flags_SetEventChkInf(EVENTCHKINF_DEKU_TREE_OPENED_MOUTH);
|
||||||
BgTreemouth_SetupAction(this, func_808BCAF0);
|
BgTreemouth_SetupAction(this, func_808BCAF0);
|
||||||
} else {
|
} else {
|
||||||
play->csCtx.segment = D_808BD790;
|
play->csCtx.segment = D_808BD790;
|
||||||
@ -237,7 +237,7 @@ void BgTreemouth_Draw(Actor* thisx, PlayState* play) {
|
|||||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||||
|
|
||||||
if ((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) {
|
if ((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) {
|
||||||
if (gSaveContext.eventChkInf[0] & 0x80) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD)) {
|
||||||
alpha = 2150;
|
alpha = 2150;
|
||||||
}
|
}
|
||||||
} else { // neeeded to match
|
} else { // neeeded to match
|
||||||
|
@ -42,7 +42,7 @@ void BgUmaJump_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||||
|
|
||||||
if (this->dyna.actor.params == 1) {
|
if (this->dyna.actor.params == 1) {
|
||||||
if (!Flags_GetEventChkInf(0x18) && (DREG(1) == 0)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0)) {
|
||||||
Actor_Kill(&this->dyna.actor);
|
Actor_Kill(&this->dyna.actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -353,7 +353,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
|
|||||||
this->cameraAt.z = player->actor.world.pos.z;
|
this->cameraAt.z = player->actor.world.pos.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[7] & 2) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
|
||||||
if (this->unk_198 == 100) {
|
if (this->unk_198 == 100) {
|
||||||
this->actor.world.pos.x = -1114.0f;
|
this->actor.world.pos.x = -1114.0f;
|
||||||
this->actor.world.pos.z = -2804.0f;
|
this->actor.world.pos.z = -2804.0f;
|
||||||
@ -394,7 +394,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
|
|||||||
case 4:
|
case 4:
|
||||||
Math_SmoothStepToF(&this->unk_20C, 0.0f, 1.0f, 0.01f, 0.0f);
|
Math_SmoothStepToF(&this->unk_20C, 0.0f, 1.0f, 0.01f, 0.0f);
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[7] & 2) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
|
||||||
phi_f0 = -50.0f;
|
phi_f0 = -50.0f;
|
||||||
} else {
|
} else {
|
||||||
phi_f0 = 0.0f;
|
phi_f0 = 0.0f;
|
||||||
@ -422,7 +422,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this->unk_198 == 0x5A) {
|
if (this->unk_198 == 0x5A) {
|
||||||
if (!(gSaveContext.eventChkInf[7] & 2)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardENGTex), 160, 180, 128, 40, true);
|
SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
@ -441,7 +441,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
|
|||||||
this->unk_1DA = 50;
|
this->unk_1DA = 50;
|
||||||
this->unk_1BC = 0;
|
this->unk_1BC = 0;
|
||||||
player->actor.shape.rot.y = -0x4002;
|
player->actor.shape.rot.y = -0x4002;
|
||||||
gSaveContext.eventChkInf[7] |= 2;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
|||||||
this->timers[0] = 0;
|
this->timers[0] = 0;
|
||||||
this->camData.speedMod = 0.0f;
|
this->camData.speedMod = 0.0f;
|
||||||
this->camData.accel = 0.0f;
|
this->camData.accel = 0.0f;
|
||||||
if (gSaveContext.eventChkInf[7] & 8) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
|
||||||
this->introState = BFD_CS_EMERGE;
|
this->introState = BFD_CS_EMERGE;
|
||||||
this->camData.nextEye.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
|
this->camData.nextEye.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
|
||||||
this->camData.nextEye.y = player2->actor.world.pos.y + 100.0f - 50.0f;
|
this->camData.nextEye.y = player2->actor.world.pos.y + 100.0f - 50.0f;
|
||||||
@ -471,7 +471,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
|||||||
osSyncPrintf("WAY_SPD X = %f\n", this->camData.atVel.x);
|
osSyncPrintf("WAY_SPD X = %f\n", this->camData.atVel.x);
|
||||||
osSyncPrintf("WAY_SPD Y = %f\n", this->camData.atVel.y);
|
osSyncPrintf("WAY_SPD Y = %f\n", this->camData.atVel.y);
|
||||||
osSyncPrintf("WAY_SPD Z = %f\n", this->camData.atVel.z);
|
osSyncPrintf("WAY_SPD Z = %f\n", this->camData.atVel.z);
|
||||||
if ((this->timers[3] > 190) && !(gSaveContext.eventChkInf[7] & 8)) {
|
if ((this->timers[3] > 190) && !Flags_GetEventChkInf(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
|
||||||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
|
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
|
||||||
&D_801333E0, &D_801333E8);
|
&D_801333E0, &D_801333E8);
|
||||||
}
|
}
|
||||||
@ -498,7 +498,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
|||||||
if (this->timers[3] == 160) {
|
if (this->timers[3] == 160) {
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||||
}
|
}
|
||||||
if ((this->timers[3] == 130) && !(gSaveContext.eventChkInf[7] & 8)) {
|
if ((this->timers[3] == 130) && !Flags_GetEventChkInf(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardENGTex), 160, 180, 128, 40, true);
|
SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
@ -549,7 +549,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
|||||||
func_8002DF54(play, &this->actor, 7);
|
func_8002DF54(play, &this->actor, 7);
|
||||||
this->actionFunc = BossFd_Wait;
|
this->actionFunc = BossFd_Wait;
|
||||||
this->handoffSignal = FD2_SIGNAL_GROUND;
|
this->handoffSignal = FD2_SIGNAL_GROUND;
|
||||||
gSaveContext.eventChkInf[7] |= 8;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -570,7 +570,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||||||
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
|
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
|
||||||
this->csCamFov = 60.0f;
|
this->csCamFov = 60.0f;
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[7] & 0x100 || gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE) || gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
|
||||||
// watched cutscene already, skip most of it
|
// watched cutscene already, skip most of it
|
||||||
this->csState = 17;
|
this->csState = 17;
|
||||||
this->csTimer = 0;
|
this->csTimer = 0;
|
||||||
@ -1108,12 +1108,12 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(
|
gSegments[6] = VIRTUAL_TO_PHYSICAL(
|
||||||
play->objectCtx.status[Object_GetIndex(&play->objectCtx, OBJECT_GANON)].segment);
|
play->objectCtx.status[Object_GetIndex(&play->objectCtx, OBJECT_GANON)].segment);
|
||||||
|
|
||||||
if (!(gSaveContext.eventChkInf[7] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE)) {
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gGanondorfTitleCardENGTex), 160, 180, 128, 40, true);
|
SEGMENTED_TO_VIRTUAL(gGanondorfTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSaveContext.eventChkInf[7] |= 0x100;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->csTimer >= 20) {
|
if (this->csTimer >= 20) {
|
||||||
@ -1540,7 +1540,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
|
|||||||
if (this->csTimer == 180) {
|
if (this->csTimer == 180) {
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || gSaveContext.isBossRush)) {
|
if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || gSaveContext.isBossRush)) {
|
||||||
Flags_SetEventChkInf(0xC7);
|
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
|
||||||
play->nextEntranceIndex = 0x517;
|
play->nextEntranceIndex = 0x517;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -680,7 +680,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
|
|||||||
// entrance of the boss room
|
// entrance of the boss room
|
||||||
if (fabsf(player->actor.world.pos.x - 150.0f) < 60.0f &&
|
if (fabsf(player->actor.world.pos.x - 150.0f) < 60.0f &&
|
||||||
fabsf(player->actor.world.pos.z - 350.0f) < 60.0f) {
|
fabsf(player->actor.world.pos.z - 350.0f) < 60.0f) {
|
||||||
if (gSaveContext.eventChkInf[7] & 1) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
|
||||||
BossGoma_SetupEncounterState4(this, play);
|
BossGoma_SetupEncounterState4(this, play);
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f,
|
||||||
-480.0f, 397.68002f, 0, -0x705C, 0, 0x180);
|
-480.0f, 397.68002f, 0, -0x705C, 0, 0x180);
|
||||||
@ -919,13 +919,13 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
|
|||||||
if (Animation_OnFrame(&this->skelanime, 40.0f)) {
|
if (Animation_OnFrame(&this->skelanime, 40.0f)) {
|
||||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_CRY1);
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_CRY1);
|
||||||
|
|
||||||
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardENGTex), 160, 180, 128, 40, true);
|
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||||
gSaveContext.eventChkInf[7] |= 1;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_GOHMA_BATTLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Animation_OnFrame(&this->skelanime, this->currentAnimFrameCount)) {
|
if (Animation_OnFrame(&this->skelanime, this->currentAnimFrameCount)) {
|
||||||
|
@ -377,7 +377,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
|
|||||||
MO_WATER_LEVEL(play) = -500;
|
MO_WATER_LEVEL(play) = -500;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (gSaveContext.eventChkInf[7] & 0x10) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_MORPHA_BATTLE)) {
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||||
this->tentMaxAngle = 5.0f;
|
this->tentMaxAngle = 5.0f;
|
||||||
this->timers[0] = 50;
|
this->timers[0] = 50;
|
||||||
@ -1445,7 +1445,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
|
|||||||
if (this->timers[2] == 130) {
|
if (this->timers[2] == 130) {
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gMorphaTitleCardENGTex), 160, 180, 128, 40, true);
|
SEGMENTED_TO_VIRTUAL(gMorphaTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
gSaveContext.eventChkInf[7] |= 0x10;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_MORPHA_BATTLE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MO_INTRO_FINISH:
|
case MO_INTRO_FINISH:
|
||||||
|
@ -395,7 +395,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
|
|||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT);
|
||||||
Play_ChangeCameraStatus(play, sCutsceneCamera, CAM_STAT_ACTIVE);
|
Play_ChangeCameraStatus(play, sCutsceneCamera, CAM_STAT_ACTIVE);
|
||||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||||
if (gSaveContext.eventChkInf[7] & 0x80) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
|
||||||
sCameraEye.z = ROOM_CENTER_Z - 100.0f;
|
sCameraEye.z = ROOM_CENTER_Z - 100.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,7 +431,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
|||||||
Play_ChangeCameraStatus(play, sCutsceneCamera, CAM_STAT_WAIT);
|
Play_ChangeCameraStatus(play, sCutsceneCamera, CAM_STAT_WAIT);
|
||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||||
Play_ClearCamera(play, sCutsceneCamera);
|
Play_ClearCamera(play, sCutsceneCamera);
|
||||||
gSaveContext.eventChkInf[7] |= 0x80;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE);
|
||||||
BossSst_HeadSetupNeutral(this);
|
BossSst_HeadSetupNeutral(this);
|
||||||
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||||
sHands[LEFT]->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
sHands[LEFT]->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||||
@ -454,7 +454,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
|||||||
this->ready = true;
|
this->ready = true;
|
||||||
func_800AA000(this->actor.xyzDistToPlayerSq, 0xFF, 0x14, 0x96);
|
func_800AA000(this->actor.xyzDistToPlayerSq, 0xFF, 0x14, 0x96);
|
||||||
Audio_PlayActorSound2(&sFloor->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH);
|
Audio_PlayActorSound2(&sFloor->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH);
|
||||||
} else if (gSaveContext.eventChkInf[7] & 0x80) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
|
||||||
sHands[RIGHT]->actor.draw = BossSst_DrawHand;
|
sHands[RIGHT]->actor.draw = BossSst_DrawHand;
|
||||||
sHands[LEFT]->actor.draw = BossSst_DrawHand;
|
sHands[LEFT]->actor.draw = BossSst_DrawHand;
|
||||||
this->actor.draw = BossSst_DrawHead;
|
this->actor.draw = BossSst_DrawHead;
|
||||||
@ -581,7 +581,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
if (this->timer <= 198) {
|
if (this->timer <= 198) {
|
||||||
revealStateTimer = 198 - this->timer;
|
revealStateTimer = 198 - this->timer;
|
||||||
if ((gSaveContext.eventChkInf[7] & 0x80) && (revealStateTimer <= 44)) {
|
if ((Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) && (revealStateTimer <= 44)) {
|
||||||
sCameraAt.x += 492.0f * 0.01f;
|
sCameraAt.x += 492.0f * 0.01f;
|
||||||
sCameraAt.y += 200.0f * 0.01f;
|
sCameraAt.y += 200.0f * 0.01f;
|
||||||
sCameraEye.x -= 80.0f * 0.01f;
|
sCameraEye.x -= 80.0f * 0.01f;
|
||||||
@ -610,7 +610,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
|||||||
sCameraEye.y += 125.0f * 0.01f;
|
sCameraEye.y += 125.0f * 0.01f;
|
||||||
sCameraEye.z -= 350.0f * 0.01f;
|
sCameraEye.z -= 350.0f * 0.01f;
|
||||||
} else if (revealStateTimer == 85) {
|
} else if (revealStateTimer == 85) {
|
||||||
if (!(gSaveContext.eventChkInf[7] & 0x80)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gBongoTitleCardENGTex), 160, 180, 128, 40, true);
|
SEGMENTED_TO_VIRTUAL(gBongoTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
|
@ -479,7 +479,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
|
|||||||
this->actor.naviEnemyId = 0x33;
|
this->actor.naviEnemyId = 0x33;
|
||||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_tw_Skel_0070E0, &object_tw_Anim_006F28, NULL, NULL, 0);
|
SkelAnime_InitFlex(play, &this->skelAnime, &object_tw_Skel_0070E0, &object_tw_Anim_006F28, NULL, NULL, 0);
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
|
||||||
// began twinrova battle
|
// began twinrova battle
|
||||||
BossTw_SetupFlyTo(this, play);
|
BossTw_SetupFlyTo(this, play);
|
||||||
this->actor.world.pos.x = -600.0f;
|
this->actor.world.pos.x = -600.0f;
|
||||||
@ -497,7 +497,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
|
|||||||
this->actor.naviEnemyId = 0x32;
|
this->actor.naviEnemyId = 0x32;
|
||||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_tw_Skel_01F888, &object_tw_Anim_006F28, NULL, NULL, 0);
|
SkelAnime_InitFlex(play, &this->skelAnime, &object_tw_Skel_01F888, &object_tw_Anim_006F28, NULL, NULL, 0);
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
|
||||||
// began twinrova battle
|
// began twinrova battle
|
||||||
BossTw_SetupFlyTo(this, play);
|
BossTw_SetupFlyTo(this, play);
|
||||||
this->actor.world.pos.x = 600.0f;
|
this->actor.world.pos.x = 600.0f;
|
||||||
@ -519,7 +519,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
|
|||||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_tw_Skel_032020, &object_tw_Anim_0244B4, NULL, NULL, 0);
|
SkelAnime_InitFlex(play, &this->skelAnime, &object_tw_Skel_032020, &object_tw_Anim_0244B4, NULL, NULL, 0);
|
||||||
Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_0244B4, -3.0f);
|
Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_0244B4, -3.0f);
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
|
||||||
// began twinrova battle
|
// began twinrova battle
|
||||||
BossTw_SetupWait(this, play);
|
BossTw_SetupWait(this, play);
|
||||||
} else {
|
} else {
|
||||||
@ -2184,7 +2184,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
|
|||||||
play->envCtx.unk_BD = 1;
|
play->envCtx.unk_BD = 1;
|
||||||
play->envCtx.unk_D8 = 0.0f;
|
play->envCtx.unk_D8 = 0.0f;
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardENGTex), 160, 180, 128, 40, true);
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
gSaveContext.eventChkInf[7] |= 0x20;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_TWINROVA_BATTLE);
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -638,7 +638,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
|
|||||||
0, BOSSVA_DOOR);
|
0, BOSSVA_DOOR);
|
||||||
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) {
|
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) {
|
||||||
warpId = ACTOR_EN_RU1;
|
warpId = ACTOR_EN_RU1;
|
||||||
if (gSaveContext.eventChkInf[3] & 0x80) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP)) {
|
||||||
warpId = ACTOR_DOOR_WARP1;
|
warpId = ACTOR_DOOR_WARP1;
|
||||||
}
|
}
|
||||||
Actor_Spawn(&play->actorCtx, play, warpId, this->actor.world.pos.x, this->actor.world.pos.y,
|
Actor_Spawn(&play->actorCtx, play, warpId, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||||
@ -651,7 +651,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
|
|||||||
} else {
|
} else {
|
||||||
this->actor.colChkInfo.damageTable = sDamageTable;
|
this->actor.colChkInfo.damageTable = sDamageTable;
|
||||||
sPhase2Timer = 0xFFFF;
|
sPhase2Timer = 0xFFFF;
|
||||||
if (gSaveContext.eventChkInf[7] & 0x40) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BARINA_BATTLE)) {
|
||||||
sCsState = INTRO_CALL_BARI;
|
sCsState = INTRO_CALL_BARI;
|
||||||
sDoorState = 100;
|
sDoorState = 100;
|
||||||
func_8002DF54(play, &this->actor, 1);
|
func_8002DF54(play, &this->actor, 1);
|
||||||
@ -986,7 +986,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
|
|||||||
sCameraNextAt.y = 140.0f;
|
sCameraNextAt.y = 140.0f;
|
||||||
sCameraNextAt.z = -200.0f;
|
sCameraNextAt.z = -200.0f;
|
||||||
|
|
||||||
if (!(gSaveContext.eventChkInf[7] & 0x40)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_BARINA_BATTLE)) {
|
||||||
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
|
||||||
SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardENGTex), 160, 180, 128, 40, true);
|
SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardENGTex), 160, 180, 128, 40, true);
|
||||||
}
|
}
|
||||||
@ -1028,7 +1028,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
|
|||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||||
func_8002DF54(play, &this->actor, 7);
|
func_8002DF54(play, &this->actor, 7);
|
||||||
sCsState++;
|
sCsState++;
|
||||||
gSaveContext.eventChkInf[7] |= 0x40;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_BARINA_BATTLE);
|
||||||
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000;
|
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -495,7 +495,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
|
|||||||
this->jewel.isPositionInit = 0;
|
this->jewel.isPositionInit = 0;
|
||||||
DemoEffect_InitJewel(play, this);
|
DemoEffect_InitJewel(play, this);
|
||||||
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTOR_EN_DOOR);
|
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTOR_EN_DOOR);
|
||||||
if ((play->sceneNum == SCENE_BDAN) && (gSaveContext.infTable[20] & 0x20)) {
|
if ((play->sceneNum == SCENE_BDAN) && (Flags_GetInfTable(INFTABLE_145))) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -702,7 +702,7 @@ void DemoEffect_InitTimeWarp(DemoEffect* this, PlayState* play) {
|
|||||||
Actor_SetScale(&this->actor, 84 * 0.001f);
|
Actor_SetScale(&this->actor, 84 * 0.001f);
|
||||||
}
|
}
|
||||||
} else if (gSaveContext.sceneSetupIndex == 5 || gSaveContext.sceneSetupIndex == 4 ||
|
} else if (gSaveContext.sceneSetupIndex == 5 || gSaveContext.sceneSetupIndex == 4 ||
|
||||||
(gSaveContext.entranceIndex == 0x0324 && !((gSaveContext.eventChkInf[12] & 0x200)))) {
|
(gSaveContext.entranceIndex == 0x0324 && !((Flags_GetEventChkInf(EVENTCHKINF_TIME_TRAVELED_TO_ADULT))))) {
|
||||||
SkelCurve_SetAnim(&this->skelCurve, &gTimeWarpAnim, 1.0f, 59.0f, 59.0f, 0.0f);
|
SkelCurve_SetAnim(&this->skelCurve, &gTimeWarpAnim, 1.0f, 59.0f, 59.0f, 0.0f);
|
||||||
SkelCurve_Update(play, &this->skelCurve);
|
SkelCurve_Update(play, &this->skelCurve);
|
||||||
this->updateFunc = DemoEffect_UpdateTimeWarpReturnFromChamberOfSages;
|
this->updateFunc = DemoEffect_UpdateTimeWarpReturnFromChamberOfSages;
|
||||||
@ -766,7 +766,7 @@ void DemoEffect_UpdateTimeWarpReturnFromChamberOfSages(DemoEffect* this, PlaySta
|
|||||||
|
|
||||||
if (this->timeWarp.shrinkTimer > 250) {
|
if (this->timeWarp.shrinkTimer > 250) {
|
||||||
if (gSaveContext.entranceIndex == 0x0324) {
|
if (gSaveContext.entranceIndex == 0x0324) {
|
||||||
gSaveContext.eventChkInf[12] |= 0x200;
|
Flags_SetEventChkInf(EVENTCHKINF_TIME_TRAVELED_TO_ADULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
@ -1587,8 +1587,8 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
|
|||||||
if (play->csCtx.state && play->csCtx.npcActions[this->csActionId]) {
|
if (play->csCtx.state && play->csCtx.npcActions[this->csActionId]) {
|
||||||
switch (play->csCtx.npcActions[this->csActionId]->action) {
|
switch (play->csCtx.npcActions[this->csActionId]->action) {
|
||||||
case 3:
|
case 3:
|
||||||
if (gSaveContext.eventChkInf[4] & 0x800) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x800;
|
Flags_SetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME);
|
||||||
}
|
}
|
||||||
DemoEffect_MoveJewelActivateDoorOfTime(this, play);
|
DemoEffect_MoveJewelActivateDoorOfTime(this, play);
|
||||||
if ((play->gameplayFrames & 1) == 0) {
|
if ((play->gameplayFrames & 1) == 0) {
|
||||||
@ -1622,7 +1622,7 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
|
||||||
hasCmdAction = play->csCtx.state && play->csCtx.npcActions[this->csActionId];
|
hasCmdAction = play->csCtx.state && play->csCtx.npcActions[this->csActionId];
|
||||||
if (!hasCmdAction) {
|
if (!hasCmdAction) {
|
||||||
this->effectFlags |= 0x1;
|
this->effectFlags |= 0x1;
|
||||||
|
@ -895,7 +895,7 @@ void func_80986BE4(DemoIm* this, s32 arg1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80986BF8(DemoIm* this, PlayState* play) {
|
void func_80986BF8(DemoIm* this, PlayState* play) {
|
||||||
if (gSaveContext.eventChkInf[4] & 1) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) {
|
||||||
this->action = 24;
|
this->action = 24;
|
||||||
this->drawConfig = 1;
|
this->drawConfig = 1;
|
||||||
this->unk_280 = 1;
|
this->unk_280 = 1;
|
||||||
@ -912,7 +912,7 @@ void GivePlayerRandoRewardImpa(Actor* impa, PlayState* play, RandomizerCheck che
|
|||||||
} else if (!Flags_GetTreasure(play, 0x1F) && !Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA)) {
|
} else if (!Flags_GetTreasure(play, 0x1F) && !Randomizer_GetSettingValue(RSK_SKIP_CHILD_ZELDA)) {
|
||||||
GiveItemEntryFromActor(impa, play, getItemEntry, 75.0f, 50.0f);
|
GiveItemEntryFromActor(impa, play, getItemEntry, 75.0f, 50.0f);
|
||||||
} else if (!Player_InBlockingCsMode(play, GET_PLAYER(play))) {
|
} else if (!Player_InBlockingCsMode(play, GET_PLAYER(play))) {
|
||||||
gSaveContext.eventChkInf[5] |= 0x200;
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY);
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
play->fadeTransition = 3;
|
play->fadeTransition = 3;
|
||||||
gSaveContext.nextTransitionType = 3;
|
gSaveContext.nextTransitionType = 3;
|
||||||
@ -933,7 +933,7 @@ void func_80986C30(DemoIm* this, PlayState* play) {
|
|||||||
} else {
|
} else {
|
||||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardLullabyCs);
|
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardLullabyCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
gSaveContext.eventChkInf[5] |= 0x200;
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY);
|
||||||
Item_Give(play, ITEM_SONG_LULLABY);
|
Item_Give(play, ITEM_SONG_LULLABY);
|
||||||
func_80985F54(this);
|
func_80985F54(this);
|
||||||
}
|
}
|
||||||
@ -941,7 +941,7 @@ void func_80986C30(DemoIm* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80986CC8(DemoIm* this) {
|
void func_80986CC8(DemoIm* this) {
|
||||||
if (gSaveContext.eventChkInf[4] & 1) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) {
|
||||||
this->action = 26;
|
this->action = 26;
|
||||||
this->drawConfig = 1;
|
this->drawConfig = 1;
|
||||||
this->unk_280 = 1;
|
this->unk_280 = 1;
|
||||||
@ -951,7 +951,7 @@ void func_80986CC8(DemoIm* this) {
|
|||||||
|
|
||||||
void func_80986CFC(DemoIm* this, PlayState* play) {
|
void func_80986CFC(DemoIm* this, PlayState* play) {
|
||||||
if (func_80986A5C(this, play)) {
|
if (func_80986A5C(this, play)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x1000;
|
Flags_SetEventChkInf(EVENTCHKINF_4C);
|
||||||
this->action = 19;
|
this->action = 19;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -960,9 +960,9 @@ void func_80986D40(DemoIm* this, PlayState* play) {
|
|||||||
if (gSaveContext.sceneSetupIndex == 6) {
|
if (gSaveContext.sceneSetupIndex == 6) {
|
||||||
this->action = 19;
|
this->action = 19;
|
||||||
this->drawConfig = 1;
|
this->drawConfig = 1;
|
||||||
} else if ((gSaveContext.eventChkInf[8] & 1) && !gSaveContext.n64ddFlag) {
|
} else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !gSaveContext.n64ddFlag) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
} else if (!(gSaveContext.eventChkInf[5] & 0x200)) {
|
} else if (!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
|
||||||
this->action = 23;
|
this->action = 23;
|
||||||
} else {
|
} else {
|
||||||
this->action = 20;
|
this->action = 20;
|
||||||
|
@ -234,7 +234,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) {
|
|||||||
case DEMOKANKYO_DOOR_OF_TIME:
|
case DEMOKANKYO_DOOR_OF_TIME:
|
||||||
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f;
|
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f;
|
||||||
this->unk_150[0].unk_18 = 0.0f;
|
this->unk_150[0].unk_18 = 0.0f;
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
|
||||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_TOKI,
|
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_TOKI,
|
||||||
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
|
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
|
||||||
0x0000);
|
0x0000);
|
||||||
@ -412,7 +412,7 @@ void DemoKankyo_UpdateDoorOfTime(DemoKankyo* this, PlayState* play) {
|
|||||||
this->unk_150[0].unk_18 += 1.0f;
|
this->unk_150[0].unk_18 += 1.0f;
|
||||||
if (this->unk_150[0].unk_18 >= 102.0f) {
|
if (this->unk_150[0].unk_18 >= 102.0f) {
|
||||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_STONEDOOR_STOP);
|
Audio_PlayActorSound2(&this->actor, NA_SE_EV_STONEDOOR_STOP);
|
||||||
gSaveContext.eventChkInf[4] |= 0x800;
|
Flags_SetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME);
|
||||||
Actor_Kill(this->actor.child);
|
Actor_Kill(this->actor.child);
|
||||||
DemoKankyo_SetupAction(this, DemoKankyo_KillDoorOfTimeCollision);
|
DemoKankyo_SetupAction(this, DemoKankyo_KillDoorOfTimeCollision);
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ void DemoKekkai_TowerBarrier(DemoKekkai* this, PlayState* play) {
|
|||||||
} else {
|
} else {
|
||||||
this->timer++;
|
this->timer++;
|
||||||
if (this->timer > 100) {
|
if (this->timer > 100) {
|
||||||
Flags_SetEventChkInf(0xC3);
|
Flags_SetEventChkInf(EVENTCHKINF_DISPELLED_GANONS_TOWER_BARRIER);
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
} else if (this->timer > 40) {
|
} else if (this->timer > 40) {
|
||||||
|
@ -599,7 +599,7 @@ void func_809975C0(DoorShutter* this, PlayState* play) {
|
|||||||
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
|
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
|
||||||
if (this->dyna.actor.bgCheckFlags & 1) {
|
if (this->dyna.actor.bgCheckFlags & 1) {
|
||||||
DoorShutter_SetupAction(this, func_809976B8);
|
DoorShutter_SetupAction(this, func_809976B8);
|
||||||
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
|
||||||
BossGoma* parent = (BossGoma*)this->dyna.actor.parent;
|
BossGoma* parent = (BossGoma*)this->dyna.actor.parent;
|
||||||
|
|
||||||
this->unk_164 = 10;
|
this->unk_164 = 10;
|
||||||
|
@ -50,7 +50,7 @@ void DoorToki_Destroy(Actor* thisx, PlayState* play) {
|
|||||||
void DoorToki_Update(Actor* thisx, PlayState* play) {
|
void DoorToki_Update(Actor* thisx, PlayState* play) {
|
||||||
DoorToki* this = (DoorToki*)thisx;
|
DoorToki* this = (DoorToki*)thisx;
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[4] & 0x800) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
|
||||||
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||||
} else {
|
} else {
|
||||||
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||||
|
@ -570,8 +570,8 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
|||||||
osSyncPrintf("\n\n\nじかんがきたからおーしまい fade_direction=[%d]", play->sceneLoadFlag, 0x14);
|
osSyncPrintf("\n\n\nじかんがきたからおーしまい fade_direction=[%d]", play->sceneLoadFlag, 0x14);
|
||||||
|
|
||||||
if (play->sceneNum == SCENE_DDAN_BOSS) {
|
if (play->sceneNum == SCENE_DDAN_BOSS) {
|
||||||
if (!Flags_GetEventChkInf(0x25)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
|
||||||
Flags_SetEventChkInf(0x25);
|
Flags_SetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP);
|
||||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN);
|
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN);
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
play->nextEntranceIndex = 0x47A;
|
play->nextEntranceIndex = 0x47A;
|
||||||
@ -586,9 +586,9 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
|||||||
gSaveContext.nextCutsceneIndex = 0;
|
gSaveContext.nextCutsceneIndex = 0;
|
||||||
}
|
}
|
||||||
} else if (play->sceneNum == SCENE_YDAN_BOSS) {
|
} else if (play->sceneNum == SCENE_YDAN_BOSS) {
|
||||||
if (!Flags_GetEventChkInf(7) || gSaveContext.n64ddFlag) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) || gSaveContext.n64ddFlag) {
|
||||||
Flags_SetEventChkInf(7);
|
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD);
|
||||||
Flags_SetEventChkInf(9);
|
Flags_SetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP);
|
||||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE);
|
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE);
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
play->nextEntranceIndex = 0x0457;
|
play->nextEntranceIndex = 0x0457;
|
||||||
@ -704,7 +704,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
|
|||||||
this->warpTimer++;
|
this->warpTimer++;
|
||||||
|
|
||||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
|
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
|
||||||
gSaveContext.eventChkInf[3] |= 0x80;
|
Flags_SetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP);
|
||||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY);
|
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY);
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
@ -829,8 +829,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||||||
if (gSaveContext.isBossRush) {
|
if (gSaveContext.isBossRush) {
|
||||||
BossRush_HandleBlueWarp(play, this->actor.world.pos.x, this->actor.world.pos.z);
|
BossRush_HandleBlueWarp(play, this->actor.world.pos.x, this->actor.world.pos.z);
|
||||||
} else if (play->sceneNum == SCENE_MORIBOSSROOM) {
|
} else if (play->sceneNum == SCENE_MORIBOSSROOM) {
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x100;
|
Flags_SetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
|
||||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE);
|
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE);
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
@ -851,8 +851,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||||||
gSaveContext.nextCutsceneIndex = 0;
|
gSaveContext.nextCutsceneIndex = 0;
|
||||||
}
|
}
|
||||||
} else if (play->sceneNum == SCENE_FIRE_BS) {
|
} else if (play->sceneNum == SCENE_FIRE_BS) {
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x200)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x200;
|
Flags_SetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP);
|
||||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE);
|
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE);
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
@ -874,8 +874,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||||||
gSaveContext.nextCutsceneIndex = 0;
|
gSaveContext.nextCutsceneIndex = 0;
|
||||||
}
|
}
|
||||||
} else if (play->sceneNum == SCENE_MIZUSIN_BS) {
|
} else if (play->sceneNum == SCENE_MIZUSIN_BS) {
|
||||||
if (!(gSaveContext.eventChkInf[4] & 0x400)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x400;
|
Flags_SetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP);
|
||||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE);
|
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE);
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
|
@ -81,7 +81,7 @@ void EfcErupc_UpdateAction(EfcErupc* this, PlayState* play) {
|
|||||||
case 2:
|
case 2:
|
||||||
if (this->unk_14E == 0) {
|
if (this->unk_14E == 0) {
|
||||||
func_800F3F3C(6);
|
func_800F3F3C(6);
|
||||||
gSaveContext.eventChkInf[2] |= 0x8000;
|
Flags_SetEventChkInf(EVENTCHKINF_DEATH_MOUNTAIN_ERUPTED);
|
||||||
}
|
}
|
||||||
this->unk_14E++;
|
this->unk_14E++;
|
||||||
break;
|
break;
|
||||||
|
@ -126,7 +126,7 @@ void func_809B0558(EnAni* this, PlayState* play) {
|
|||||||
} else {
|
} else {
|
||||||
EnAni_SetupAction(this, func_809B0524);
|
EnAni_SetupAction(this, func_809B0524);
|
||||||
}
|
}
|
||||||
gSaveContext.itemGetInf[1] |= 0x20;
|
Flags_SetItemGetInf(ITEMGETINF_15);
|
||||||
} else {
|
} else {
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||||
@ -175,7 +175,7 @@ void func_809B064C(EnAni* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||||
-80.0f < this->actor.yDistToPlayer) {
|
-80.0f < this->actor.yDistToPlayer) {
|
||||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
if (Flags_GetItemGetInf(ITEMGETINF_15)) {
|
||||||
EnAni_SetText(this, play, 0x5056);
|
EnAni_SetText(this, play, 0x5056);
|
||||||
} else {
|
} else {
|
||||||
EnAni_SetText(this, play, 0x5055);
|
EnAni_SetText(this, play, 0x5055);
|
||||||
@ -201,16 +201,16 @@ void func_809B07F8(EnAni* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
} else if (yawDiff > -0x36B0 && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
} else if (yawDiff > -0x36B0 && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||||
-80.0f < this->actor.yDistToPlayer) {
|
-80.0f < this->actor.yDistToPlayer) {
|
||||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
if (Flags_GetItemGetInf(ITEMGETINF_15)) {
|
||||||
EnAni_SetText(this, play, 0x5056);
|
EnAni_SetText(this, play, 0x5056);
|
||||||
} else {
|
} else {
|
||||||
EnAni_SetText(this, play, 0x5055);
|
EnAni_SetText(this, play, 0x5055);
|
||||||
}
|
}
|
||||||
} else if (yawDiff > -0x3E8 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
} else if (yawDiff > -0x3E8 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
||||||
if (!(gSaveContext.eventChkInf[2] & 0x8000)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_DEATH_MOUNTAIN_ERUPTED)) {
|
||||||
textId = 0x5052;
|
textId = 0x5052;
|
||||||
} else {
|
} else {
|
||||||
textId = (gSaveContext.itemGetInf[1] & 0x20) ? 0x5054 : 0x5053;
|
textId = (Flags_GetItemGetInf(ITEMGETINF_15)) ? 0x5054 : 0x5053;
|
||||||
}
|
}
|
||||||
EnAni_SetText(this, play, textId);
|
EnAni_SetText(this, play, textId);
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
|
|||||||
|
|
||||||
// Check for beaten Dodongo's Cavern if Rando is disabled
|
// Check for beaten Dodongo's Cavern if Rando is disabled
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
if ((gSaveContext.eventChkInf[2] & 0x20) || BREG(2)) {
|
if ((Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) || BREG(2)) {
|
||||||
this->actor.textId = 0xBF;
|
this->actor.textId = 0xBF;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x7058;
|
this->actor.textId = 0x7058;
|
||||||
@ -194,7 +194,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, PlayState* play) {
|
|||||||
bombchuBowlingClosed = (INV_CONTENT(explosive) == ITEM_NONE);
|
bombchuBowlingClosed = (INV_CONTENT(explosive) == ITEM_NONE);
|
||||||
} else {
|
} else {
|
||||||
// if not rando'd, check if we have beaten Dodongo's Cavern
|
// if not rando'd, check if we have beaten Dodongo's Cavern
|
||||||
bombchuBowlingClosed = !((gSaveContext.eventChkInf[2] & 0x20) || BREG(2));
|
bombchuBowlingClosed = !((Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) || BREG(2));
|
||||||
}
|
}
|
||||||
if (bombchuBowlingClosed) {
|
if (bombchuBowlingClosed) {
|
||||||
this->actionFunc = EnBomBowMan_WaitNotBeatenDC;
|
this->actionFunc = EnBomBowMan_WaitNotBeatenDC;
|
||||||
@ -426,7 +426,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
|
|||||||
switch (this->prizeSelect) {
|
switch (this->prizeSelect) {
|
||||||
case 0:
|
case 0:
|
||||||
prizeTemp = EXITEM_BOMB_BAG_BOWLING;
|
prizeTemp = EXITEM_BOMB_BAG_BOWLING;
|
||||||
if (gSaveContext.itemGetInf[1] & 2) {
|
if (Flags_GetItemGetInf(ITEMGETINF_11)) {
|
||||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -435,7 +435,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
|
|||||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||||
} else {
|
} else {
|
||||||
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
||||||
if (gSaveContext.itemGetInf[1] & 4) {
|
if (Flags_GetItemGetInf(ITEMGETINF_12)) {
|
||||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -446,7 +446,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
|
|||||||
case 3:
|
case 3:
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
||||||
if (gSaveContext.itemGetInf[1] & 4) {
|
if (Flags_GetItemGetInf(ITEMGETINF_12)) {
|
||||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -158,10 +158,10 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) {
|
|||||||
if (this->exItemDone != 0) {
|
if (this->exItemDone != 0) {
|
||||||
switch (this->prizeIndex) {
|
switch (this->prizeIndex) {
|
||||||
case EXITEM_BOMB_BAG_BOWLING:
|
case EXITEM_BOMB_BAG_BOWLING:
|
||||||
gSaveContext.itemGetInf[1] |= 2;
|
Flags_SetItemGetInf(ITEMGETINF_11);
|
||||||
break;
|
break;
|
||||||
case EXITEM_HEART_PIECE_BOWLING:
|
case EXITEM_HEART_PIECE_BOWLING:
|
||||||
gSaveContext.itemGetInf[1] |= 4;
|
Flags_SetItemGetInf(ITEMGETINF_12);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
|
|||||||
minigameRoomNum *= 2;
|
minigameRoomNum *= 2;
|
||||||
// Spawn Heart Piece in chest (or Purple Rupee if won Heart Piece)
|
// Spawn Heart Piece in chest (or Purple Rupee if won Heart Piece)
|
||||||
if (play->roomCtx.curRoom.num >= 6) {
|
if (play->roomCtx.curRoom.num >= 6) {
|
||||||
rewardChestParams = ((gSaveContext.itemGetInf[1] & 0x800) ? (0x4EA0) : (0x4EC0));
|
rewardChestParams = ((Flags_GetItemGetInf(ITEMGETINF_1B)) ? (0x4EA0) : (0x4EC0));
|
||||||
rewardChestParams = sTreasureFlags[5] | rewardChestParams;
|
rewardChestParams = sTreasureFlags[5] | rewardChestParams;
|
||||||
this->finalChest = (EnBox*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_BOX,
|
this->finalChest = (EnBox*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_BOX,
|
||||||
20.0f, 20.0f, -2500.0f, 0, 0x7FFF, 0, rewardChestParams);
|
20.0f, 20.0f, -2500.0f, 0, 0x7FFF, 0, rewardChestParams);
|
||||||
@ -110,7 +110,7 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
|
|||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
rewardParams = ((gSaveContext.itemGetInf[1] & 0x800) ? (ITEM_ETC_RUPEE_PURPLE_CHEST_GAME)
|
rewardParams = ((Flags_GetItemGetInf(ITEMGETINF_1B)) ? (ITEM_ETC_RUPEE_PURPLE_CHEST_GAME)
|
||||||
: (ITEM_ETC_HEART_PIECE_CHEST_GAME)) &
|
: (ITEM_ETC_HEART_PIECE_CHEST_GAME)) &
|
||||||
0xFF;
|
0xFF;
|
||||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 20.0f, 20.0f, -2500.0f, 0, 0, 0,
|
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 20.0f, 20.0f, -2500.0f, 0, 0, 0,
|
||||||
@ -275,8 +275,8 @@ void EnChanger_OpenChests(EnChanger* this, PlayState* play) {
|
|||||||
|
|
||||||
void EnChanger_SetHeartPieceFlag(EnChanger* this, PlayState* play) {
|
void EnChanger_SetHeartPieceFlag(EnChanger* this, PlayState* play) {
|
||||||
if (this->finalChest->unk_1F4 != 0) {
|
if (this->finalChest->unk_1F4 != 0) {
|
||||||
if (!(gSaveContext.itemGetInf[1] & 0x800)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_1B)) {
|
||||||
gSaveContext.itemGetInf[1] |= 0x800;
|
Flags_SetItemGetInf(ITEMGETINF_1B);
|
||||||
}
|
}
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
|
|||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(gSaveContext.eventChkInf[1] & 0x4000)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_WON_COW_IN_MALONS_RACE)) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ s32 EnCs_GetTalkState(EnCs* this, PlayState* play) {
|
|||||||
if (this->actor.textId == 0x2026) {
|
if (this->actor.textId == 0x2026) {
|
||||||
Player_UnsetMask(play);
|
Player_UnsetMask(play);
|
||||||
Item_Give(play, ITEM_SOLD_OUT);
|
Item_Give(play, ITEM_SOLD_OUT);
|
||||||
gSaveContext.itemGetInf[3] |= 0x400;
|
Flags_SetItemGetInf(ITEMGETINF_3A);
|
||||||
Rupees_ChangeBy(30);
|
Rupees_ChangeBy(30);
|
||||||
this->actor.textId = 0x2027;
|
this->actor.textId = 0x2027;
|
||||||
talkState = 2;
|
talkState = 2;
|
||||||
@ -213,7 +213,7 @@ s32 EnCs_GetTextID(EnCs* this, PlayState* play) {
|
|||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
s32 textId = Text_GetFaceReaction(play, 15);
|
s32 textId = Text_GetFaceReaction(play, 15);
|
||||||
|
|
||||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
|
||||||
if (textId == 0) {
|
if (textId == 0) {
|
||||||
textId = 0x2028;
|
textId = 0x2028;
|
||||||
}
|
}
|
||||||
@ -336,14 +336,14 @@ void EnCs_Walk(EnCs* this, PlayState* play) {
|
|||||||
animIndex = this->currentAnimIndex;
|
animIndex = this->currentAnimIndex;
|
||||||
|
|
||||||
if (this->talkState == 0) {
|
if (this->talkState == 0) {
|
||||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
|
||||||
rnd = Rand_ZeroOne() * 10.0f;
|
rnd = Rand_ZeroOne() * 10.0f;
|
||||||
} else {
|
} else {
|
||||||
rnd = Rand_ZeroOne() * 5.0f;
|
rnd = Rand_ZeroOne() * 5.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rnd == 0) {
|
if (rnd == 0) {
|
||||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
|
||||||
animIndex = 2.0f * Rand_ZeroOne();
|
animIndex = 2.0f * Rand_ZeroOne();
|
||||||
animIndex = (animIndex == 0) ? ENCS_ANIM_2 : ENCS_ANIM_1;
|
animIndex = (animIndex == 0) ? ENCS_ANIM_2 : ENCS_ANIM_1;
|
||||||
} else {
|
} else {
|
||||||
@ -472,7 +472,7 @@ void EnCs_Draw(Actor* thisx, PlayState* play) {
|
|||||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||||
EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
|
EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
|
||||||
|
|
||||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
|
||||||
s32 childLinkObjectIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
|
s32 childLinkObjectIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
|
||||||
|
|
||||||
// Handle attaching the Spooky Mask to the boy's face
|
// Handle attaching the Spooky Mask to the boy's face
|
||||||
|
@ -153,13 +153,13 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) {
|
|||||||
s32 noKill = true;
|
s32 noKill = true;
|
||||||
s32 isFree = false;
|
s32 isFree = false;
|
||||||
|
|
||||||
if ((this->actor.params & 3) == 0 && (gSaveContext.eventChkInf[9] & 1)) {
|
if ((this->actor.params & 3) == 0 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(0))) {
|
||||||
isFree = true;
|
isFree = true;
|
||||||
} else if ((this->actor.params & 3) == 1 && (gSaveContext.eventChkInf[9] & 2)) {
|
} else if ((this->actor.params & 3) == 1 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(1))) {
|
||||||
isFree = true;
|
isFree = true;
|
||||||
} else if ((this->actor.params & 3) == 2 && (gSaveContext.eventChkInf[9] & 4)) {
|
} else if ((this->actor.params & 3) == 2 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(2))) {
|
||||||
isFree = true;
|
isFree = true;
|
||||||
} else if ((this->actor.params & 3) == 3 && (gSaveContext.eventChkInf[9] & 8)) {
|
} else if ((this->actor.params & 3) == 3 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(3))) {
|
||||||
isFree = true;
|
isFree = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,10 +241,10 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, PlayState* play) {
|
|||||||
if (Message_ShouldAdvance(play)) {
|
if (Message_ShouldAdvance(play)) {
|
||||||
switch (this->actor.textId) {
|
switch (this->actor.textId) {
|
||||||
case 0x6061:
|
case 0x6061:
|
||||||
gSaveContext.infTable[23] |= 0x40;
|
Flags_SetInfTable(INFTABLE_176);
|
||||||
break;
|
break;
|
||||||
case 0x6064:
|
case 0x6064:
|
||||||
gSaveContext.infTable[23] |= 0x100;
|
Flags_SetInfTable(INFTABLE_178);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) {
|
|||||||
if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) {
|
if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) {
|
||||||
freedCount = 0;
|
freedCount = 0;
|
||||||
for (carpenterType = 0; carpenterType < 4; carpenterType++) {
|
for (carpenterType = 0; carpenterType < 4; carpenterType++) {
|
||||||
if (gSaveContext.eventChkInf[9] & (1 << carpenterType)) {
|
if (gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] & EVENTCHKINF_CARPENTERS_FREE_MASK(carpenterType)) {
|
||||||
freedCount++;
|
freedCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,7 +310,7 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) {
|
|||||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||||
this->actor.textId = 0x6063;
|
this->actor.textId = 0x6063;
|
||||||
} else {
|
} else {
|
||||||
if (!(gSaveContext.infTable[23] & 0x40)) {
|
if (!Flags_GetInfTable(INFTABLE_176)) {
|
||||||
this->actor.textId = 0x6061;
|
this->actor.textId = 0x6061;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x6062;
|
this->actor.textId = 0x6062;
|
||||||
@ -321,7 +321,7 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) {
|
|||||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||||
this->actor.textId = 0x6066;
|
this->actor.textId = 0x6066;
|
||||||
} else {
|
} else {
|
||||||
if (!(gSaveContext.infTable[23] & 0x100)) {
|
if (!Flags_GetInfTable(INFTABLE_178)) {
|
||||||
this->actor.textId = 0x6064;
|
this->actor.textId = 0x6064;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x6065;
|
this->actor.textId = 0x6065;
|
||||||
@ -402,7 +402,7 @@ void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) {
|
|||||||
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_RUN, &this->currentAnimIndex);
|
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_RUN, &this->currentAnimIndex);
|
||||||
this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
|
this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
|
||||||
|
|
||||||
gSaveContext.eventChkInf[9] |= 1 << (this->actor.params & 3);
|
gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] |= EVENTCHKINF_CARPENTERS_FREE_MASK(this->actor.params & 3);
|
||||||
|
|
||||||
this->actor.gravity = -1.0f;
|
this->actor.gravity = -1.0f;
|
||||||
this->escapeSubCamTimer = sEscapeSubCamParams[this->actor.params & 3].maxFramesActive;
|
this->escapeSubCamTimer = sEscapeSubCamParams[this->actor.params & 3].maxFramesActive;
|
||||||
@ -494,7 +494,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) {
|
|||||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||||
this->subCamActive = false;
|
this->subCamActive = false;
|
||||||
|
|
||||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
|
||||||
Matrix_RotateY(this->initRot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
Matrix_RotateY(this->initRot.y * (M_PI / 0x8000), MTXMODE_NEW);
|
||||||
Matrix_MultVec3f(&D_809E4148, &vec);
|
Matrix_MultVec3f(&D_809E4148, &vec);
|
||||||
gerudoGuard =
|
gerudoGuard =
|
||||||
|
@ -218,10 +218,10 @@ s32 EnDaikuKakariko_GetTalkState(EnDaikuKakariko* this, PlayState* play) {
|
|||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||||
switch (this->actor.textId) {
|
switch (this->actor.textId) {
|
||||||
case 0x6061:
|
case 0x6061:
|
||||||
gSaveContext.infTable[23] |= 0x40;
|
Flags_SetInfTable(INFTABLE_176);
|
||||||
break;
|
break;
|
||||||
case 0x6064:
|
case 0x6064:
|
||||||
gSaveContext.infTable[23] |= 0x100;
|
Flags_SetInfTable(INFTABLE_178);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
talkState = 0;
|
talkState = 0;
|
||||||
|
@ -144,14 +144,14 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) {
|
|||||||
} else {
|
} else {
|
||||||
s32 rupeesNeeded = 5;
|
s32 rupeesNeeded = 5;
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[3] & 0x100) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
rupeesNeeded = 10;
|
rupeesNeeded = 10;
|
||||||
}
|
}
|
||||||
if (this->grabbedRupeesCounter >= rupeesNeeded) {
|
if (this->grabbedRupeesCounter >= rupeesNeeded) {
|
||||||
// Won.
|
// Won.
|
||||||
gSaveContext.timer1State = 0;
|
gSaveContext.timer1State = 0;
|
||||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
this->actor.textId = 0x4055;
|
this->actor.textId = 0x4055;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x405D;
|
this->actor.textId = 0x405D;
|
||||||
@ -164,7 +164,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) {
|
|||||||
func_800F5B58();
|
func_800F5B58();
|
||||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||||
func_8002DF54(play, NULL, 8);
|
func_8002DF54(play, NULL, 8);
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
this->actionFunc = func_809EE96C;
|
this->actionFunc = func_809EE96C;
|
||||||
} else {
|
} else {
|
||||||
this->actionFunc = func_809EE048;
|
this->actionFunc = func_809EE048;
|
||||||
@ -210,7 +210,7 @@ void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) {
|
|||||||
switch (this->state) {
|
switch (this->state) {
|
||||||
case ENDIVINGGAME_STATE_NOTPLAYING:
|
case ENDIVINGGAME_STATE_NOTPLAYING:
|
||||||
this->unk_292 = TEXT_STATE_CHOICE;
|
this->unk_292 = TEXT_STATE_CHOICE;
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
this->actor.textId = 0x4053;
|
this->actor.textId = 0x4053;
|
||||||
this->phase = ENDIVINGGAME_PHASE_1;
|
this->phase = ENDIVINGGAME_PHASE_1;
|
||||||
} else {
|
} else {
|
||||||
@ -252,7 +252,7 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, PlayState* play) {
|
|||||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100) || this->actor.textId == 0x85 || this->actor.textId == 0x2D) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE) || this->actor.textId == 0x85 || this->actor.textId == 0x2D) {
|
||||||
Message_ContinueTextbox(play, this->actor.textId);
|
Message_ContinueTextbox(play, this->actor.textId);
|
||||||
this->unk_292 = TEXT_STATE_EVENT;
|
this->unk_292 = TEXT_STATE_EVENT;
|
||||||
this->actionFunc = func_809EE048;
|
this->actionFunc = func_809EE048;
|
||||||
@ -311,7 +311,7 @@ void EnDivingGame_SetupRupeeThrow(EnDivingGame* this, PlayState* play) {
|
|||||||
this->unk_2D0.x = -280.0f;
|
this->unk_2D0.x = -280.0f;
|
||||||
this->unk_2D0.y = -20.0f;
|
this->unk_2D0.y = -20.0f;
|
||||||
this->unk_2D0.z = -240.0f;
|
this->unk_2D0.z = -240.0f;
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
this->rupeesLeftToThrow = 5;
|
this->rupeesLeftToThrow = 5;
|
||||||
} else {
|
} else {
|
||||||
this->rupeesLeftToThrow = 10;
|
this->rupeesLeftToThrow = 10;
|
||||||
@ -355,7 +355,7 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, PlayState* play) {
|
|||||||
this->spawnRuppyTimer = 5;
|
this->spawnRuppyTimer = 5;
|
||||||
EnDivingGame_SpawnRuppy(this, play);
|
EnDivingGame_SpawnRuppy(this, play);
|
||||||
this->rupeesLeftToThrow--;
|
this->rupeesLeftToThrow--;
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
this->unk_296 = 30;
|
this->unk_296 = 30;
|
||||||
} else {
|
} else {
|
||||||
this->unk_296 = 5;
|
this->unk_296 = 5;
|
||||||
@ -413,7 +413,7 @@ void func_809EE800(EnDivingGame* this, PlayState* play) {
|
|||||||
SkelAnime_Update(&this->skelAnime);
|
SkelAnime_Update(&this->skelAnime);
|
||||||
if (this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) {
|
if (this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) {
|
||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
func_80088B34(BREG(2) + 50);
|
func_80088B34(BREG(2) + 50);
|
||||||
} else {
|
} else {
|
||||||
func_80088B34(BREG(2) + 50);
|
func_80088B34(BREG(2) + 50);
|
||||||
@ -486,7 +486,7 @@ void func_809EEAF8(EnDivingGame* this, PlayState* play) {
|
|||||||
// "Successful completion"
|
// "Successful completion"
|
||||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||||
gSaveContext.eventChkInf[3] |= 0x100;
|
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE);
|
||||||
this->actionFunc = func_809EDCB0;
|
this->actionFunc = func_809EDCB0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,7 @@ void func_809EFA28(EnDns* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_809EFA58(EnDns* this) {
|
void func_809EFA58(EnDns* this) {
|
||||||
gSaveContext.itemGetInf[0] |= 0x800;
|
Flags_SetItemGetInf(ITEMGETINF_0B);
|
||||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,12 +345,12 @@ void func_809EFACC(EnDns* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_809EFAFC(EnDns* this) {
|
void func_809EFAFC(EnDns* this) {
|
||||||
gSaveContext.infTable[25] |= 0x4;
|
Flags_SetInfTable(INFTABLE_192);
|
||||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_809EFB40(EnDns* this) {
|
void func_809EFB40(EnDns* this) {
|
||||||
gSaveContext.infTable[25] |= 0x8;
|
Flags_SetInfTable(INFTABLE_193);
|
||||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,14 +180,14 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
|
|||||||
delay = 0;
|
delay = 0;
|
||||||
switch (Player_GetMask(play)) {
|
switch (Player_GetMask(play)) {
|
||||||
case PLAYER_MASK_SKULL:
|
case PLAYER_MASK_SKULL:
|
||||||
if (!(gSaveContext.itemGetInf[1] & 0x4000)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_OBTAINED_STICK_UPGRADE_FROM_STAGE)) {
|
||||||
reaction = DNT_SIGNAL_CELEBRATE;
|
reaction = DNT_SIGNAL_CELEBRATE;
|
||||||
this->prize = DNT_PRIZE_STICK;
|
this->prize = DNT_PRIZE_STICK;
|
||||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SARIA_THEME);
|
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SARIA_THEME);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PLAYER_MASK_TRUTH:
|
case PLAYER_MASK_TRUTH:
|
||||||
if (!(gSaveContext.itemGetInf[1] & 0x8000) && (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
|
if (!Flags_GetItemGetInf(ITEMGETINF_OBTAINED_NUT_UPGRADE_FROM_STAGE) && (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
|
||||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
&D_801333E8);
|
&D_801333E8);
|
||||||
this->prize = DNT_PRIZE_NUTS;
|
this->prize = DNT_PRIZE_NUTS;
|
||||||
|
@ -286,7 +286,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, PlayState* play) {
|
|||||||
osSyncPrintf("実 \n");
|
osSyncPrintf("実 \n");
|
||||||
osSyncPrintf("実 \n");
|
osSyncPrintf("実 \n");
|
||||||
osSyncPrintf("実 \n");
|
osSyncPrintf("実 \n");
|
||||||
gSaveContext.itemGetInf[1] |= 0x8000;
|
Flags_SetItemGetInf(ITEMGETINF_OBTAINED_NUT_UPGRADE_FROM_STAGE);
|
||||||
} else {
|
} else {
|
||||||
// "stick"
|
// "stick"
|
||||||
osSyncPrintf("棒 \n");
|
osSyncPrintf("棒 \n");
|
||||||
@ -295,7 +295,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, PlayState* play) {
|
|||||||
osSyncPrintf("棒 \n");
|
osSyncPrintf("棒 \n");
|
||||||
osSyncPrintf("棒 \n");
|
osSyncPrintf("棒 \n");
|
||||||
osSyncPrintf("棒 \n");
|
osSyncPrintf("棒 \n");
|
||||||
gSaveContext.itemGetInf[1] |= 0x4000;
|
Flags_SetItemGetInf(ITEMGETINF_OBTAINED_STICK_UPGRADE_FROM_STAGE);
|
||||||
}
|
}
|
||||||
this->actor.textId = 0;
|
this->actor.textId = 0;
|
||||||
if ((this->stage != NULL) && (this->stage->actor.update != NULL)) {
|
if ((this->stage != NULL) && (this->stage->actor.update != NULL)) {
|
||||||
|
@ -249,7 +249,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
|
|||||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||||
// "Big hit"
|
// "Big hit"
|
||||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n" VT_RST, this->hitCounter);
|
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n" VT_RST, this->hitCounter);
|
||||||
if (!LINK_IS_ADULT && !(gSaveContext.itemGetInf[1] & 0x2000)) {
|
if (!LINK_IS_ADULT && !Flags_GetItemGetInf(ITEMGETINF_1D)) {
|
||||||
this->hitCounter++;
|
this->hitCounter++;
|
||||||
if (this->hitCounter >= 3) {
|
if (this->hitCounter >= 3) {
|
||||||
if(gSaveContext.n64ddFlag) {
|
if(gSaveContext.n64ddFlag) {
|
||||||
|
@ -171,7 +171,7 @@ void EnDoor_SetupType(EnDoor* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
} else if (doorType == DOOR_CHECKABLE) {
|
} else if (doorType == DOOR_CHECKABLE) {
|
||||||
this->actor.textId = (this->actor.params & 0x3F) + 0x0200;
|
this->actor.textId = (this->actor.params & 0x3F) + 0x0200;
|
||||||
if (this->actor.textId == 0x0229 && !(gSaveContext.eventChkInf[1] & 0x10)) {
|
if (this->actor.textId == 0x0229 && !Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||||
// Talon's house door. If Talon has not been woken up at Hyrule Castle
|
// Talon's house door. If Talon has not been woken up at Hyrule Castle
|
||||||
// this door should be openable at any time of day. Note that there is no
|
// this door should be openable at any time of day. Note that there is no
|
||||||
// check for time of day as the scene setup for Lon Lon merely initializes
|
// check for time of day as the scene setup for Lon Lon merely initializes
|
||||||
|
@ -85,7 +85,7 @@ void EnDs_DisplayOddPotionText(EnDs* this, PlayState* play) {
|
|||||||
this->actor.textId = 0x504F;
|
this->actor.textId = 0x504F;
|
||||||
this->actionFunc = EnDs_TalkAfterGiveOddPotion;
|
this->actionFunc = EnDs_TalkAfterGiveOddPotion;
|
||||||
this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO;
|
this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO;
|
||||||
gSaveContext.itemGetInf[3] |= 1;
|
Flags_SetItemGetInf(ITEMGETINF_30);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
|
|||||||
player->actor.textId = 0x504A;
|
player->actor.textId = 0x504A;
|
||||||
this->actionFunc = EnDs_OfferOddPotion;
|
this->actionFunc = EnDs_OfferOddPotion;
|
||||||
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
|
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
|
||||||
gSaveContext.itemGetInf[3] & 1) {
|
Flags_GetItemGetInf(ITEMGETINF_30)) {
|
||||||
player->actor.textId = 0x500C;
|
player->actor.textId = 0x500C;
|
||||||
this->actionFunc = EnDs_OfferBluePotion;
|
this->actionFunc = EnDs_OfferBluePotion;
|
||||||
} else {
|
} else {
|
||||||
|
@ -112,7 +112,7 @@ u16 func_809FDC38(PlayState* play, Actor* actor) {
|
|||||||
return 0x301D;
|
return 0x301D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gSaveContext.infTable[0x11] & 8) {
|
if (Flags_GetInfTable(INFTABLE_113)) {
|
||||||
return 0x301B;
|
return 0x301B;
|
||||||
} else {
|
} else {
|
||||||
return 0x301A;
|
return 0x301A;
|
||||||
@ -127,13 +127,13 @@ s16 func_809FDCDC(PlayState* play, Actor* actor) {
|
|||||||
case TEXT_STATE_CLOSING:
|
case TEXT_STATE_CLOSING:
|
||||||
switch (actor->textId) {
|
switch (actor->textId) {
|
||||||
case 0x301A:
|
case 0x301A:
|
||||||
gSaveContext.infTable[0x11] |= 8;
|
Flags_SetInfTable(INFTABLE_113);
|
||||||
break;
|
break;
|
||||||
case 0x301C:
|
case 0x301C:
|
||||||
case 0x301F:
|
case 0x301F:
|
||||||
return NPC_TALK_STATE_ACTION;
|
return NPC_TALK_STATE_ACTION;
|
||||||
case 0x3020:
|
case 0x3020:
|
||||||
gSaveContext.eventChkInf[0x2] |= 4;
|
Flags_SetEventChkInf(EVENTCHKINF_22);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -157,7 +157,7 @@ s16 func_809FDCDC(PlayState* play, Actor* actor) {
|
|||||||
s32 func_809FDDB4(EnDu* this, PlayState* play) {
|
s32 func_809FDDB4(EnDu* this, PlayState* play) {
|
||||||
if (play->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD) {
|
if (play->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (play->sceneNum == SCENE_HIDAN && !(gSaveContext.infTable[0x11] & 0x400) && LINK_IS_ADULT) {
|
} else if (play->sceneNum == SCENE_HIDAN && !Flags_GetInfTable(INFTABLE_SPOKE_TO_DARUNIA_IN_FIRE_TEMPLE) && LINK_IS_ADULT) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -431,7 +431,7 @@ void func_809FE798(EnDu* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
gSaveContext.infTable[0x11] |= 0x400;
|
Flags_SetInfTable(INFTABLE_SPOKE_TO_DARUNIA_IN_FIRE_TEMPLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ void EnEncount2_Init(Actor* thisx, PlayState* play) {
|
|||||||
// "☆☆☆☆☆ Death Mountain Encount2 set ☆☆☆☆☆"
|
// "☆☆☆☆☆ Death Mountain Encount2 set ☆☆☆☆☆"
|
||||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ デスマウンテンエンカウント2セットされました ☆☆☆☆☆ %d\n" VT_RST,
|
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ デスマウンテンエンカウント2セットされました ☆☆☆☆☆ %d\n" VT_RST,
|
||||||
this->actor.params);
|
this->actor.params);
|
||||||
if (LINK_IS_ADULT && (gSaveContext.eventChkInf[4] & 0x200)) { // flag for having used fire temple blue warp
|
if (LINK_IS_ADULT && (Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP))) { // flag for having used fire temple blue warp
|
||||||
Actor_Kill(thisx);
|
Actor_Kill(thisx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -442,7 +442,7 @@ void EnExItem_TargetPrizeFinish(EnExItem* this, PlayState* play) {
|
|||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||||
// "Successful completion"
|
// "Successful completion"
|
||||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||||
gSaveContext.itemGetInf[1] |= 0x2000;
|
Flags_SetItemGetInf(ITEMGETINF_1D);
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void EnExRuppy_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->actor.gravity = 0.0f;
|
this->actor.gravity = 0.0f;
|
||||||
|
|
||||||
// If you haven't won the diving game before, you will always get 5 rupees
|
// If you haven't won the diving game before, you will always get 5 rupees
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
this->rupeeValue = 5;
|
this->rupeeValue = 5;
|
||||||
this->colorIdx = 1;
|
this->colorIdx = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -271,7 +271,7 @@ void EnExRuppy_EnterWater(EnExRuppy* this, PlayState* play) {
|
|||||||
this->actor.world.pos.x = ((Rand_ZeroOne() - 0.5f) * 300.0f) + -260.0f;
|
this->actor.world.pos.x = ((Rand_ZeroOne() - 0.5f) * 300.0f) + -260.0f;
|
||||||
this->actor.world.pos.y = ((Rand_ZeroOne() - 0.5f) * 200.0f) + 370.0f;
|
this->actor.world.pos.y = ((Rand_ZeroOne() - 0.5f) * 200.0f) + 370.0f;
|
||||||
temp_f2 = this->unk_15A * -50.0f;
|
temp_f2 = this->unk_15A * -50.0f;
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) {
|
||||||
temp_f2 += -500.0f;
|
temp_f2 += -500.0f;
|
||||||
this->actor.world.pos.z = ((Rand_ZeroOne() - 0.5f) * 80.0f) + temp_f2;
|
this->actor.world.pos.z = ((Rand_ZeroOne() - 0.5f) * 80.0f) + temp_f2;
|
||||||
} else {
|
} else {
|
||||||
|
@ -626,12 +626,12 @@ void EnFr_Activate(EnFr* this, PlayState* play) {
|
|||||||
void EnFr_ActivateCheckFrogSong(EnFr* this, PlayState* play) {
|
void EnFr_ActivateCheckFrogSong(EnFr* this, PlayState* play) {
|
||||||
if (sEnFrPointers.flags == 11) {
|
if (sEnFrPointers.flags == 11) {
|
||||||
// Check if all 6 child songs have been played for the frogs
|
// Check if all 6 child songs have been played for the frogs
|
||||||
if ((gSaveContext.eventChkInf[13] & 0x2) // ZL
|
if ((Flags_GetEventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_ZL)) // ZL
|
||||||
&& (gSaveContext.eventChkInf[13] & 0x4) // Epona
|
&& (Flags_GetEventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_EPONA)) // Epona
|
||||||
&& (gSaveContext.eventChkInf[13] & 0x10) // Saria
|
&& (Flags_GetEventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_SARIA)) // Saria
|
||||||
&& (gSaveContext.eventChkInf[13] & 0x8) // Suns
|
&& (Flags_GetEventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_SUNS)) // Suns
|
||||||
&& (gSaveContext.eventChkInf[13] & 0x20) // SoT
|
&& (Flags_GetEventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_SOT)) // SoT
|
||||||
&& (gSaveContext.eventChkInf[13] & 0x40)) { // SoS
|
&& (Flags_GetEventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_STORMS))) { // SoS
|
||||||
this->actionFunc = EnFr_TalkBeforeFrogSong;
|
this->actionFunc = EnFr_TalkBeforeFrogSong;
|
||||||
this->songIndex = FROG_CHOIR_SONG;
|
this->songIndex = FROG_CHOIR_SONG;
|
||||||
Message_StartTextbox(play, 0x40AB, &this->actor);
|
Message_StartTextbox(play, 0x40AB, &this->actor);
|
||||||
@ -795,7 +795,7 @@ void EnFr_DeactivateButterfly() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u8 EnFr_GetNextNoteFrogSong(u8 ocarinaNoteIndex) {
|
u8 EnFr_GetNextNoteFrogSong(u8 ocarinaNoteIndex) {
|
||||||
if (!(gSaveContext.eventChkInf[13] & 1)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_CHOIR)) {
|
||||||
return gFrogsSongPtr[ocarinaNoteIndex];
|
return gFrogsSongPtr[ocarinaNoteIndex];
|
||||||
} else {
|
} else {
|
||||||
return sOcarinaNotes[(s32)Rand_ZeroFloat(60.0f) % 5];
|
return sOcarinaNotes[(s32)Rand_ZeroFloat(60.0f) % 5];
|
||||||
|
@ -137,7 +137,7 @@ void EnFu_WaitChild(EnFu* this, PlayState* play) {
|
|||||||
u16 textID = Text_GetFaceReaction(play, 0xB);
|
u16 textID = Text_GetFaceReaction(play, 0xB);
|
||||||
|
|
||||||
if (textID == 0) {
|
if (textID == 0) {
|
||||||
textID = (gSaveContext.eventChkInf[6] & 0x80) ? 0x5033 : 0x5032;
|
textID = (Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO)) ? 0x5033 : 0x5032;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ACTOR_FLAG_PLAYER_TALKED_TO is set and textID is 0x5033, change animation
|
// if ACTOR_FLAG_PLAYER_TALKED_TO is set and textID is 0x5033, change animation
|
||||||
@ -168,7 +168,7 @@ void func_WaitForSongGive(EnFu* this, PlayState* play) {
|
|||||||
void func_80A1DB60(EnFu* this, PlayState* play) {
|
void func_80A1DB60(EnFu* this, PlayState* play) {
|
||||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||||
this->actionFunc = EnFu_WaitAdult;
|
this->actionFunc = EnFu_WaitAdult;
|
||||||
gSaveContext.eventChkInf[5] |= 0x800;
|
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_SONG_OF_STORMS);
|
||||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ void func_80A1DBD4(EnFu* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||||
gSaveContext.eventChkInf[6] |= 0x20;
|
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL);
|
||||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||||
player->stateFlags2 &= ~0x1000000;
|
player->stateFlags2 &= ~0x1000000;
|
||||||
this->actionFunc = EnFu_WaitAdult;
|
this->actionFunc = EnFu_WaitAdult;
|
||||||
@ -244,7 +244,7 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) {
|
|||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||||
if ((gSaveContext.eventChkInf[5] & 0x800)) {
|
if ((Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SONG_OF_STORMS))) {
|
||||||
func_80A1D94C(this, play, 0x508E, func_80A1DBA0);
|
func_80A1D94C(this, play, 0x508E, func_80A1DBA0);
|
||||||
} else if (player->stateFlags2 & 0x1000000) {
|
} else if (player->stateFlags2 & 0x1000000) {
|
||||||
this->actor.textId = 0x5035;
|
this->actor.textId = 0x5035;
|
||||||
|
@ -143,7 +143,7 @@ static Vec3f sBottlesPositions[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void func_80A2F180(EnGb* this) {
|
void func_80A2F180(EnGb* this) {
|
||||||
if (gSaveContext.infTable[0xB] & 0x40) {
|
if (Flags_GetInfTable(INFTABLE_SPOKE_TO_POE_COLLECTOR_IN_RUINED_MARKET)) {
|
||||||
this->textId = 0x70F5;
|
this->textId = 0x70F5;
|
||||||
} else {
|
} else {
|
||||||
this->textId = 0x70F4;
|
this->textId = 0x70F4;
|
||||||
@ -308,8 +308,8 @@ void func_80A2F83C(EnGb* this, PlayState* play) {
|
|||||||
|
|
||||||
void func_80A2F94C(EnGb* this, PlayState* play) {
|
void func_80A2F94C(EnGb* this, PlayState* play) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
||||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
if (!Flags_GetInfTable(INFTABLE_SPOKE_TO_POE_COLLECTOR_IN_RUINED_MARKET)) {
|
||||||
gSaveContext.infTable[0xB] |= 0x40;
|
Flags_SetInfTable(INFTABLE_SPOKE_TO_POE_COLLECTOR_IN_RUINED_MARKET);
|
||||||
}
|
}
|
||||||
func_80A2F180(this);
|
func_80A2F180(this);
|
||||||
this->actionFunc = func_80A2F83C;
|
this->actionFunc = func_80A2F83C;
|
||||||
@ -318,8 +318,8 @@ void func_80A2F94C(EnGb* this, PlayState* play) {
|
|||||||
|
|
||||||
void func_80A2F9C0(EnGb* this, PlayState* play) {
|
void func_80A2F9C0(EnGb* this, PlayState* play) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
||||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
if (!Flags_GetInfTable(INFTABLE_SPOKE_TO_POE_COLLECTOR_IN_RUINED_MARKET)) {
|
||||||
gSaveContext.infTable[0xB] |= 0x40;
|
Flags_SetInfTable(INFTABLE_SPOKE_TO_POE_COLLECTOR_IN_RUINED_MARKET);
|
||||||
}
|
}
|
||||||
func_80A2F180(this);
|
func_80A2F180(this);
|
||||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||||
@ -330,8 +330,8 @@ void func_80A2F9C0(EnGb* this, PlayState* play) {
|
|||||||
|
|
||||||
void func_80A2FA50(EnGb* this, PlayState* play) {
|
void func_80A2FA50(EnGb* this, PlayState* play) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
||||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
if (!Flags_GetInfTable(INFTABLE_SPOKE_TO_POE_COLLECTOR_IN_RUINED_MARKET)) {
|
||||||
gSaveContext.infTable[0xB] |= 0x40;
|
Flags_SetInfTable(INFTABLE_SPOKE_TO_POE_COLLECTOR_IN_RUINED_MARKET);
|
||||||
}
|
}
|
||||||
func_80A2F180(this);
|
func_80A2F180(this);
|
||||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||||
|
@ -263,7 +263,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) {
|
|||||||
|
|
||||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||||
play->nextEntranceIndex = 0x1A5;
|
play->nextEntranceIndex = 0x1A5;
|
||||||
} else if (gSaveContext.eventChkInf[12] & 0x80) { // Caught previously
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO)) { // Caught previously
|
||||||
play->nextEntranceIndex = 0x5F8;
|
play->nextEntranceIndex = 0x5F8;
|
||||||
} else {
|
} else {
|
||||||
play->nextEntranceIndex = 0x3B4;
|
play->nextEntranceIndex = 0x3B4;
|
||||||
@ -532,9 +532,9 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
|
|||||||
s32 getItemId;
|
s32 getItemId;
|
||||||
|
|
||||||
if (Actor_HasParent(&this->actor, play)) {
|
if (Actor_HasParent(&this->actor, play)) {
|
||||||
if (gSaveContext.n64ddFlag && gSaveContext.minigameScore >= 1500 && !(gSaveContext.infTable[25] & 1)) {
|
if (gSaveContext.n64ddFlag && gSaveContext.minigameScore >= 1500 && !Flags_GetInfTable(INFTABLE_190)) {
|
||||||
gSaveContext.itemGetInf[0] |= 0x8000;
|
Flags_SetItemGetInf(ITEMGETINF_0F);
|
||||||
gSaveContext.infTable[25] |= 1;
|
Flags_SetInfTable(INFTABLE_190);
|
||||||
this->stateFlags |= GE1_STATE_GIVE_QUIVER;
|
this->stateFlags |= GE1_STATE_GIVE_QUIVER;
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
return;
|
return;
|
||||||
@ -543,9 +543,9 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||||
gSaveContext.itemGetInf[0] |= 0x8000;
|
Flags_SetItemGetInf(ITEMGETINF_0F);
|
||||||
} else {
|
} else {
|
||||||
gSaveContext.infTable[25] |= 1;
|
Flags_SetInfTable(INFTABLE_190);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||||
@ -659,7 +659,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) {
|
|||||||
play->fadeTransition = 0x26;
|
play->fadeTransition = 0x26;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
gSaveContext.eventInf[0] |= 0x100;
|
gSaveContext.eventInf[0] |= 0x100;
|
||||||
gSaveContext.eventChkInf[6] |= 0x100;
|
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_HORSEBACK_ARCHERY);
|
||||||
|
|
||||||
if (!(player->stateFlags1 & 0x800000)) {
|
if (!(player->stateFlags1 & 0x800000)) {
|
||||||
func_8002DF54(play, &this->actor, 1);
|
func_8002DF54(play, &this->actor, 1);
|
||||||
@ -712,14 +712,14 @@ void EnGe1_TalkAfterGame_Archery(EnGe1* this, PlayState* play) {
|
|||||||
if (gSaveContext.minigameScore < 1000) {
|
if (gSaveContext.minigameScore < 1000) {
|
||||||
this->actor.textId = 0x6045;
|
this->actor.textId = 0x6045;
|
||||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||||
} else if (!(gSaveContext.infTable[25] & 1)) {
|
} else if (!Flags_GetInfTable(INFTABLE_190)) {
|
||||||
this->actor.textId = 0x6046;
|
this->actor.textId = 0x6046;
|
||||||
this->actionFunc = EnGe1_TalkWinPrize_Archery;
|
this->actionFunc = EnGe1_TalkWinPrize_Archery;
|
||||||
this->stateFlags &= ~GE1_STATE_GIVE_QUIVER;
|
this->stateFlags &= ~GE1_STATE_GIVE_QUIVER;
|
||||||
} else if (gSaveContext.minigameScore < 1500) {
|
} else if (gSaveContext.minigameScore < 1500) {
|
||||||
this->actor.textId = 0x6047;
|
this->actor.textId = 0x6047;
|
||||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||||
} else if (gSaveContext.itemGetInf[0] & 0x8000) {
|
} else if (Flags_GetItemGetInf(ITEMGETINF_0F)) {
|
||||||
this->actor.textId = 0x6047;
|
this->actor.textId = 0x6047;
|
||||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||||
} else {
|
} else {
|
||||||
@ -744,8 +744,8 @@ void EnGe1_Wait_Archery(EnGe1* this, PlayState* play) {
|
|||||||
if (!(player->stateFlags1 & 0x800000)) {
|
if (!(player->stateFlags1 & 0x800000)) {
|
||||||
EnGe1_SetTalkAction(this, play, 0x603F, 100.0f, EnGe1_TalkNoHorse_Archery);
|
EnGe1_SetTalkAction(this, play, 0x603F, 100.0f, EnGe1_TalkNoHorse_Archery);
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.eventChkInf[6] & 0x100) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_PLAYED_HORSEBACK_ARCHERY)) {
|
||||||
if (gSaveContext.infTable[25] & 1) {
|
if (Flags_GetInfTable(INFTABLE_190)) {
|
||||||
textId = 0x6042;
|
textId = 0x6042;
|
||||||
} else {
|
} else {
|
||||||
textId = 0x6043;
|
textId = 0x6043;
|
||||||
|
@ -234,7 +234,9 @@ s32 EnGe2_CheckCarpentersFreed(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((u8)(gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] &
|
||||||
|
(EVENTCHKINF_CARPENTERS_FREE_MASK_ALL | 0xF0),
|
||||||
|
EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -250,7 +252,7 @@ void EnGe2_CaptureClose(EnGe2* this, PlayState* play) {
|
|||||||
|
|
||||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||||
play->nextEntranceIndex = 0x1A5;
|
play->nextEntranceIndex = 0x1A5;
|
||||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO)) {
|
||||||
play->nextEntranceIndex = 0x5F8;
|
play->nextEntranceIndex = 0x5F8;
|
||||||
} else {
|
} else {
|
||||||
play->nextEntranceIndex = 0x3B4;
|
play->nextEntranceIndex = 0x3B4;
|
||||||
@ -280,7 +282,7 @@ void EnGe2_CaptureCharge(EnGe2* this, PlayState* play) {
|
|||||||
|
|
||||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||||
play->nextEntranceIndex = 0x1A5;
|
play->nextEntranceIndex = 0x1A5;
|
||||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO)) {
|
||||||
play->nextEntranceIndex = 0x5F8;
|
play->nextEntranceIndex = 0x5F8;
|
||||||
} else {
|
} else {
|
||||||
play->nextEntranceIndex = 0x3B4;
|
play->nextEntranceIndex = 0x3B4;
|
||||||
|
@ -1568,7 +1568,7 @@ void EnGeldB_Draw(Actor* thisx, PlayState* play) {
|
|||||||
if (this->timer == 0) {
|
if (this->timer == 0) {
|
||||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||||
play->nextEntranceIndex = 0x1A5;
|
play->nextEntranceIndex = 0x1A5;
|
||||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO)) {
|
||||||
play->nextEntranceIndex = 0x5F8;
|
play->nextEntranceIndex = 0x5F8;
|
||||||
} else {
|
} else {
|
||||||
play->nextEntranceIndex = 0x3B4;
|
play->nextEntranceIndex = 0x3B4;
|
||||||
|
@ -324,55 +324,55 @@ void EnGirlA_SetupAction(EnGirlA* this, EnGirlAActionFunc func) {
|
|||||||
s32 EnGirlA_TryChangeShopItem(EnGirlA* this, PlayState* play) {
|
s32 EnGirlA_TryChangeShopItem(EnGirlA* this, PlayState* play) {
|
||||||
switch (this->actor.params) {
|
switch (this->actor.params) {
|
||||||
case SI_MILK_BOTTLE:
|
case SI_MILK_BOTTLE:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x4) {
|
if (Flags_GetItemGetInf(ITEMGETINF_TALON_BOTTLE)) {
|
||||||
this->actor.params = SI_HEART;
|
this->actor.params = SI_HEART;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_10_2:
|
case SI_BOMBCHU_10_2:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x40) {
|
if (Flags_GetItemGetInf(ITEMGETINF_06)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_10_3:
|
case SI_BOMBCHU_10_3:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x80) {
|
if (Flags_GetItemGetInf(ITEMGETINF_07)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_3:
|
case SI_BOMBCHU_20_3:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x100) {
|
if (Flags_GetItemGetInf(ITEMGETINF_08)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_4:
|
case SI_BOMBCHU_20_4:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x200) {
|
if (Flags_GetItemGetInf(ITEMGETINF_09)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_10_4:
|
case SI_BOMBCHU_10_4:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x400) {
|
if (Flags_GetItemGetInf(ITEMGETINF_0A)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_10_1:
|
case SI_BOMBCHU_10_1:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x8) {
|
if (Flags_GetItemGetInf(ITEMGETINF_03)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_1:
|
case SI_BOMBCHU_20_1:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x10) {
|
if (Flags_GetItemGetInf(ITEMGETINF_04)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_2:
|
case SI_BOMBCHU_20_2:
|
||||||
if (gSaveContext.itemGetInf[0] & 0x20) {
|
if (Flags_GetItemGetInf(ITEMGETINF_05)) {
|
||||||
this->actor.params = SI_SOLD_OUT;
|
this->actor.params = SI_SOLD_OUT;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -995,7 +995,7 @@ void EnGirlA_BuyEvent_ShieldDiscount(PlayState* play, EnGirlA* this) {
|
|||||||
gSaveContext.pendingSale = entry.itemId;
|
gSaveContext.pendingSale = entry.itemId;
|
||||||
gSaveContext.pendingSaleMod = entry.modIndex;
|
gSaveContext.pendingSaleMod = entry.modIndex;
|
||||||
if (this->actor.params == SI_HYLIAN_SHIELD) {
|
if (this->actor.params == SI_HYLIAN_SHIELD) {
|
||||||
if (gSaveContext.infTable[7] & 0x40) {
|
if (Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) {
|
||||||
Rupees_ChangeBy(-(this->basePrice - sShieldDiscounts[(s32)Rand_ZeroFloat(7.9f)]));
|
Rupees_ChangeBy(-(this->basePrice - sShieldDiscounts[(s32)Rand_ZeroFloat(7.9f)]));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1031,28 +1031,28 @@ void EnGirlA_BuyEvent_ObtainBombchuPack(PlayState* play, EnGirlA* this) {
|
|||||||
|
|
||||||
switch (this->actor.params) {
|
switch (this->actor.params) {
|
||||||
case SI_BOMBCHU_10_2:
|
case SI_BOMBCHU_10_2:
|
||||||
gSaveContext.itemGetInf[0] |= 0x40;
|
Flags_SetItemGetInf(ITEMGETINF_06);
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_10_3:
|
case SI_BOMBCHU_10_3:
|
||||||
gSaveContext.itemGetInf[0] |= 0x80;
|
Flags_SetItemGetInf(ITEMGETINF_07);
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_3:
|
case SI_BOMBCHU_20_3:
|
||||||
gSaveContext.itemGetInf[0] |= 0x100;
|
Flags_SetItemGetInf(ITEMGETINF_08);
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_4:
|
case SI_BOMBCHU_20_4:
|
||||||
gSaveContext.itemGetInf[0] |= 0x200;
|
Flags_SetItemGetInf(ITEMGETINF_09);
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_10_4:
|
case SI_BOMBCHU_10_4:
|
||||||
gSaveContext.itemGetInf[0] |= 0x400;
|
Flags_SetItemGetInf(ITEMGETINF_0A);
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_10_1:
|
case SI_BOMBCHU_10_1:
|
||||||
gSaveContext.itemGetInf[0] |= 0x8;
|
Flags_SetItemGetInf(ITEMGETINF_03);
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_1:
|
case SI_BOMBCHU_20_1:
|
||||||
gSaveContext.itemGetInf[0] |= 0x10;
|
Flags_SetItemGetInf(ITEMGETINF_04);
|
||||||
break;
|
break;
|
||||||
case SI_BOMBCHU_20_2:
|
case SI_BOMBCHU_20_2:
|
||||||
gSaveContext.itemGetInf[0] |= 0x20;
|
Flags_SetItemGetInf(ITEMGETINF_05);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1090,27 +1090,27 @@ void EnGirlA_SetItemDescription(PlayState* play, EnGirlA* this) {
|
|||||||
isMaskFreeToBorrow = false;
|
isMaskFreeToBorrow = false;
|
||||||
switch (this->actor.params) {
|
switch (this->actor.params) {
|
||||||
case SI_KEATON_MASK:
|
case SI_KEATON_MASK:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x100) {
|
if (Flags_GetItemGetInf(ITEMGETINF_38)) {
|
||||||
isMaskFreeToBorrow = true;
|
isMaskFreeToBorrow = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_SPOOKY_MASK:
|
case SI_SPOOKY_MASK:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
|
||||||
isMaskFreeToBorrow = true;
|
isMaskFreeToBorrow = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_SKULL_MASK:
|
case SI_SKULL_MASK:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x200) {
|
if (Flags_GetItemGetInf(ITEMGETINF_39)) {
|
||||||
isMaskFreeToBorrow = true;
|
isMaskFreeToBorrow = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_BUNNY_HOOD:
|
case SI_BUNNY_HOOD:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3B)) {
|
||||||
isMaskFreeToBorrow = true;
|
isMaskFreeToBorrow = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SI_MASK_OF_TRUTH:
|
case SI_MASK_OF_TRUTH:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3B)) {
|
||||||
isMaskFreeToBorrow = true;
|
isMaskFreeToBorrow = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1184,7 +1184,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
|
|||||||
this->actor.objBankIndex = this->objBankIndex;
|
this->actor.objBankIndex = this->objBankIndex;
|
||||||
switch (this->actor.params) {
|
switch (this->actor.params) {
|
||||||
case SI_KEATON_MASK:
|
case SI_KEATON_MASK:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x100) {
|
if (Flags_GetItemGetInf(ITEMGETINF_38)) {
|
||||||
this->actor.textId = 0x70B6;
|
this->actor.textId = 0x70B6;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = itemEntry->itemDescTextId;
|
this->actor.textId = itemEntry->itemDescTextId;
|
||||||
@ -1192,7 +1192,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
|
|||||||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||||
break;
|
break;
|
||||||
case SI_SPOOKY_MASK:
|
case SI_SPOOKY_MASK:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
|
||||||
this->actor.textId = 0x70B5;
|
this->actor.textId = 0x70B5;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = itemEntry->itemDescTextId;
|
this->actor.textId = itemEntry->itemDescTextId;
|
||||||
@ -1200,7 +1200,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
|
|||||||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||||
break;
|
break;
|
||||||
case SI_SKULL_MASK:
|
case SI_SKULL_MASK:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x200) {
|
if (Flags_GetItemGetInf(ITEMGETINF_39)) {
|
||||||
this->actor.textId = 0x70B4;
|
this->actor.textId = 0x70B4;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = itemEntry->itemDescTextId;
|
this->actor.textId = itemEntry->itemDescTextId;
|
||||||
@ -1208,7 +1208,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
|
|||||||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||||
break;
|
break;
|
||||||
case SI_BUNNY_HOOD:
|
case SI_BUNNY_HOOD:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3B)) {
|
||||||
this->actor.textId = 0x70B7;
|
this->actor.textId = 0x70B7;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = itemEntry->itemDescTextId;
|
this->actor.textId = itemEntry->itemDescTextId;
|
||||||
@ -1216,7 +1216,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
|
|||||||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||||
break;
|
break;
|
||||||
case SI_MASK_OF_TRUTH:
|
case SI_MASK_OF_TRUTH:
|
||||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
if (Flags_GetItemGetInf(ITEMGETINF_3B)) {
|
||||||
this->actor.textId = 0x70BB;
|
this->actor.textId = 0x70BB;
|
||||||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||||
} else {
|
} else {
|
||||||
|
@ -147,14 +147,14 @@ void EnGm_UpdateEye(EnGm* this) {
|
|||||||
void EnGm_SetTextID(EnGm* this) {
|
void EnGm_SetTextID(EnGm* this) {
|
||||||
switch (func_80A3D7C8()) {
|
switch (func_80A3D7C8()) {
|
||||||
case 0:
|
case 0:
|
||||||
if (gSaveContext.infTable[11] & 1) {
|
if (Flags_GetInfTable(INFTABLE_B0)) {
|
||||||
this->actor.textId = 0x304B;
|
this->actor.textId = 0x304B;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x304A;
|
this->actor.textId = 0x304A;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (gSaveContext.infTable[11] & 2) {
|
if (Flags_GetInfTable(INFTABLE_B1)) {
|
||||||
this->actor.textId = 0x304F;
|
this->actor.textId = 0x304F;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x304C;
|
this->actor.textId = 0x304C;
|
||||||
@ -208,16 +208,16 @@ void func_80A3DC44(EnGm* this, PlayState* play) {
|
|||||||
if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||||
switch (func_80A3D7C8()) {
|
switch (func_80A3D7C8()) {
|
||||||
case 0:
|
case 0:
|
||||||
gSaveContext.infTable[11] |= 1;
|
Flags_SetInfTable(INFTABLE_B0);
|
||||||
case 3:
|
case 3:
|
||||||
this->actionFunc = func_80A3DD7C;
|
this->actionFunc = func_80A3DD7C;
|
||||||
return;
|
return;
|
||||||
case 1:
|
case 1:
|
||||||
gSaveContext.infTable[11] |= 2;
|
Flags_SetInfTable(INFTABLE_B1);
|
||||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||||
//Resets "Talked to Medigoron" flag in infTable to restore initial conversation state
|
//Resets "Talked to Medigoron" flag in infTable to restore initial conversation state
|
||||||
gSaveContext.infTable[11] &= ~2;
|
Flags_UnsetInfTable(INFTABLE_B1);
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
this->actionFunc = EnGm_ProcessChoiceIndex;
|
this->actionFunc = EnGm_ProcessChoiceIndex;
|
||||||
@ -259,7 +259,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
|||||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||||
itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||||
gSaveContext.infTable[11] |= 2;
|
Flags_SetInfTable(INFTABLE_B1);
|
||||||
} else {
|
} else {
|
||||||
itemEntry = ItemTable_Retrieve(GI_SWORD_KNIFE);
|
itemEntry = ItemTable_Retrieve(GI_SWORD_KNIFE);
|
||||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||||
@ -292,7 +292,7 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
|
|||||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||||
gSaveContext.infTable[11] |= 2;
|
Flags_SetInfTable(INFTABLE_B1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||||
|
@ -115,20 +115,20 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
|
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
|
||||||
if (gSaveContext.infTable[16] & 0x8000) {
|
if (Flags_GetInfTable(INFTABLE_10F)) {
|
||||||
return 0x3042;
|
return 0x3042;
|
||||||
} else {
|
} else {
|
||||||
return 0x3041;
|
return 0x3041;
|
||||||
}
|
}
|
||||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1) || (gSaveContext.infTable[16] & 0x2000)) {
|
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1) || (Flags_GetInfTable(INFTABLE_10D))) {
|
||||||
if (gSaveContext.infTable[16] & 0x4000) {
|
if (Flags_GetInfTable(INFTABLE_SPOKE_TO_GORON_LINK)) {
|
||||||
return 0x3038;
|
return 0x3038;
|
||||||
} else {
|
} else {
|
||||||
return 0x3037;
|
return 0x3037;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.infTable[16] & 0x200) {
|
if (Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
|
||||||
if (gSaveContext.infTable[16] & 0x400) {
|
if (Flags_GetInfTable(INFTABLE_10A)) {
|
||||||
return 0x3033;
|
return 0x3033;
|
||||||
} else {
|
} else {
|
||||||
return 0x3032;
|
return 0x3032;
|
||||||
@ -146,9 +146,9 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||||||
case 0x20:
|
case 0x20:
|
||||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE)) {
|
||||||
return 0x3021;
|
return 0x3021;
|
||||||
} else if (gSaveContext.infTable[14] & 0x1) {
|
} else if (Flags_GetInfTable(INFTABLE_E0)) {
|
||||||
return 0x302A;
|
return 0x302A;
|
||||||
} else {
|
} else {
|
||||||
return 0x3008;
|
return 0x3008;
|
||||||
@ -156,7 +156,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||||||
case 0x30:
|
case 0x30:
|
||||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE)) {
|
||||||
return 0x3026;
|
return 0x3026;
|
||||||
} else {
|
} else {
|
||||||
return 0x3009;
|
return 0x3009;
|
||||||
@ -164,7 +164,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||||||
case 0x40:
|
case 0x40:
|
||||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE)) {
|
||||||
return 0x3026;
|
return 0x3026;
|
||||||
} else {
|
} else {
|
||||||
return 0x300A;
|
return 0x300A;
|
||||||
@ -172,7 +172,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||||||
case 0x50:
|
case 0x50:
|
||||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else if (gSaveContext.infTable[15] & 1) {
|
} else if (Flags_GetInfTable(INFTABLE_F0)) {
|
||||||
return 0x3015;
|
return 0x3015;
|
||||||
} else {
|
} else {
|
||||||
return 0x3014;
|
return 0x3014;
|
||||||
@ -180,7 +180,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||||||
case 0x60:
|
case 0x60:
|
||||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else if (gSaveContext.infTable[15] & 0x10) {
|
} else if (Flags_GetInfTable(INFTABLE_F4)) {
|
||||||
return 0x3017;
|
return 0x3017;
|
||||||
} else {
|
} else {
|
||||||
return 0x3016;
|
return 0x3016;
|
||||||
@ -188,7 +188,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||||||
case 0x70:
|
case 0x70:
|
||||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else if (gSaveContext.infTable[15] & 0x100) {
|
} else if (Flags_GetInfTable(INFTABLE_F8)) {
|
||||||
return 0x3019;
|
return 0x3019;
|
||||||
} else {
|
} else {
|
||||||
return 0x3018;
|
return 0x3018;
|
||||||
@ -209,36 +209,36 @@ s16 EnGo_UpdateTalkState(PlayState* play, Actor* thisx) {
|
|||||||
case TEXT_STATE_CLOSING:
|
case TEXT_STATE_CLOSING:
|
||||||
switch (thisx->textId) {
|
switch (thisx->textId) {
|
||||||
case 0x3008:
|
case 0x3008:
|
||||||
gSaveContext.infTable[14] |= 1;
|
Flags_SetInfTable(INFTABLE_E0);
|
||||||
unkState = NPC_TALK_STATE_IDLE;
|
unkState = NPC_TALK_STATE_IDLE;
|
||||||
break;
|
break;
|
||||||
case 0x300B:
|
case 0x300B:
|
||||||
gSaveContext.infTable[14] |= 0x800;
|
Flags_SetInfTable(INFTABLE_EB);
|
||||||
unkState = NPC_TALK_STATE_IDLE;
|
unkState = NPC_TALK_STATE_IDLE;
|
||||||
break;
|
break;
|
||||||
case 0x3014:
|
case 0x3014:
|
||||||
gSaveContext.infTable[15] |= 1;
|
Flags_SetInfTable(INFTABLE_F0);
|
||||||
unkState = NPC_TALK_STATE_IDLE;
|
unkState = NPC_TALK_STATE_IDLE;
|
||||||
break;
|
break;
|
||||||
case 0x3016:
|
case 0x3016:
|
||||||
gSaveContext.infTable[15] |= 0x10;
|
Flags_SetInfTable(INFTABLE_F4);
|
||||||
unkState = NPC_TALK_STATE_IDLE;
|
unkState = NPC_TALK_STATE_IDLE;
|
||||||
break;
|
break;
|
||||||
case 0x3018:
|
case 0x3018:
|
||||||
gSaveContext.infTable[15] |= 0x100;
|
Flags_SetInfTable(INFTABLE_F8);
|
||||||
unkState = NPC_TALK_STATE_IDLE;
|
unkState = NPC_TALK_STATE_IDLE;
|
||||||
break;
|
break;
|
||||||
case 0x3036:
|
case 0x3036:
|
||||||
func_8002F434(thisx, play, GI_TUNIC_GORON, xzRange, yRange);
|
func_8002F434(thisx, play, GI_TUNIC_GORON, xzRange, yRange);
|
||||||
gSaveContext.infTable[16] |= 0x2000; // EnGo exclusive flag
|
Flags_SetInfTable(INFTABLE_10D); // EnGo exclusive flag
|
||||||
unkState = NPC_TALK_STATE_ACTION;
|
unkState = NPC_TALK_STATE_ACTION;
|
||||||
break;
|
break;
|
||||||
case 0x3037:
|
case 0x3037:
|
||||||
gSaveContext.infTable[16] |= 0x4000;
|
Flags_SetInfTable(INFTABLE_SPOKE_TO_GORON_LINK);
|
||||||
unkState = NPC_TALK_STATE_IDLE;
|
unkState = NPC_TALK_STATE_IDLE;
|
||||||
break;
|
break;
|
||||||
case 0x3041:
|
case 0x3041:
|
||||||
gSaveContext.infTable[16] |= 0x8000;
|
Flags_SetInfTable(INFTABLE_10F);
|
||||||
unkState = NPC_TALK_STATE_IDLE;
|
unkState = NPC_TALK_STATE_IDLE;
|
||||||
break;
|
break;
|
||||||
case 0x3059:
|
case 0x3059:
|
||||||
@ -263,7 +263,7 @@ s16 EnGo_UpdateTalkState(PlayState* play, Actor* thisx) {
|
|||||||
switch (thisx->textId) {
|
switch (thisx->textId) {
|
||||||
case 0x300A:
|
case 0x300A:
|
||||||
if (play->msgCtx.choiceIndex == 0) {
|
if (play->msgCtx.choiceIndex == 0) {
|
||||||
if (CUR_UPG_VALUE(UPG_STRENGTH) != 0 || (gSaveContext.infTable[14] & 0x800)) {
|
if (CUR_UPG_VALUE(UPG_STRENGTH) != 0 || (Flags_GetInfTable(INFTABLE_EB))) {
|
||||||
thisx->textId = 0x300B;
|
thisx->textId = 0x300B;
|
||||||
} else {
|
} else {
|
||||||
thisx->textId = 0x300C;
|
thisx->textId = 0x300C;
|
||||||
@ -276,12 +276,12 @@ s16 EnGo_UpdateTalkState(PlayState* play, Actor* thisx) {
|
|||||||
break;
|
break;
|
||||||
case 0x3034:
|
case 0x3034:
|
||||||
if (play->msgCtx.choiceIndex == 0) {
|
if (play->msgCtx.choiceIndex == 0) {
|
||||||
if (gSaveContext.infTable[16] & 0x800) {
|
if (Flags_GetInfTable(INFTABLE_10B)) {
|
||||||
thisx->textId = 0x3033;
|
thisx->textId = 0x3033;
|
||||||
} else {
|
} else {
|
||||||
thisx->textId = 0x3035;
|
thisx->textId = 0x3035;
|
||||||
}
|
}
|
||||||
} else if (gSaveContext.infTable[16] & 0x800) {
|
} else if (Flags_GetInfTable(INFTABLE_10B)) {
|
||||||
thisx->textId = 0x3036;
|
thisx->textId = 0x3036;
|
||||||
} else {
|
} else {
|
||||||
thisx->textId = 0x3033;
|
thisx->textId = 0x3033;
|
||||||
@ -298,7 +298,7 @@ s16 EnGo_UpdateTalkState(PlayState* play, Actor* thisx) {
|
|||||||
Message_ContinueTextbox(play, thisx->textId);
|
Message_ContinueTextbox(play, thisx->textId);
|
||||||
unkState = NPC_TALK_STATE_TALKING;
|
unkState = NPC_TALK_STATE_TALKING;
|
||||||
}
|
}
|
||||||
gSaveContext.infTable[11] |= 0x10;
|
Flags_SetInfTable(INFTABLE_B4);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -307,7 +307,7 @@ s16 EnGo_UpdateTalkState(PlayState* play, Actor* thisx) {
|
|||||||
if (Message_ShouldAdvance(play)) {
|
if (Message_ShouldAdvance(play)) {
|
||||||
switch (thisx->textId) {
|
switch (thisx->textId) {
|
||||||
case 0x3035:
|
case 0x3035:
|
||||||
gSaveContext.infTable[16] |= 0x800;
|
Flags_SetInfTable(INFTABLE_10B);
|
||||||
case 0x3032:
|
case 0x3032:
|
||||||
case 0x3033:
|
case 0x3033:
|
||||||
thisx->textId = 0x3034;
|
thisx->textId = 0x3034;
|
||||||
@ -598,7 +598,7 @@ void func_80A3F908(EnGo* this, PlayState* play) {
|
|||||||
if (((this->actor.params & 0xF0) == 0x90) && (isUnkCondition == true)) {
|
if (((this->actor.params & 0xF0) == 0x90) && (isUnkCondition == true)) {
|
||||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_SWORD_BROKEN) {
|
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_SWORD_BROKEN) {
|
||||||
if (func_8002F368(play) == EXCH_ITEM_SWORD_BROKEN) {
|
if (func_8002F368(play) == EXCH_ITEM_SWORD_BROKEN) {
|
||||||
if (gSaveContext.infTable[11] & 0x10) {
|
if (Flags_GetInfTable(INFTABLE_B4)) {
|
||||||
this->actor.textId = 0x3055;
|
this->actor.textId = 0x3055;
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x3054;
|
this->actor.textId = 0x3054;
|
||||||
@ -666,7 +666,7 @@ void EnGo_Init(Actor* thisx, PlayState* play) {
|
|||||||
EnGo_SetupAction(this, EnGo_FireGenericActionFunc);
|
EnGo_SetupAction(this, EnGo_FireGenericActionFunc);
|
||||||
break;
|
break;
|
||||||
case 0x40:
|
case 0x40:
|
||||||
if (gSaveContext.infTable[14] & 0x800) {
|
if (Flags_GetInfTable(INFTABLE_EB)) {
|
||||||
EnGo_SetMovedPos(this, play);
|
EnGo_SetMovedPos(this, play);
|
||||||
}
|
}
|
||||||
Actor_SetScale(&this->actor, 0.015f);
|
Actor_SetScale(&this->actor, 0.015f);
|
||||||
@ -754,7 +754,7 @@ void EnGo_GoronLinkRolling(EnGo* this, PlayState* play) {
|
|||||||
(this->unk_218 == 0)) {
|
(this->unk_218 == 0)) {
|
||||||
this->actor.speedXZ = 0.0f;
|
this->actor.speedXZ = 0.0f;
|
||||||
EnGo_SetupAction(this, func_80A4008C);
|
EnGo_SetupAction(this, func_80A4008C);
|
||||||
gSaveContext.infTable[16] |= 0x200;
|
Flags_SetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->actor.shape.rot = this->actor.world.rot;
|
this->actor.shape.rot = this->actor.world.rot;
|
||||||
@ -849,7 +849,7 @@ void func_80A405CC(EnGo* this, PlayState* play) {
|
|||||||
this->skelAnime.curFrame = lastFrame;
|
this->skelAnime.curFrame = lastFrame;
|
||||||
this->skelAnime.playSpeed = 0.0f;
|
this->skelAnime.playSpeed = 0.0f;
|
||||||
this->unk_212 = Rand_S16Offset(30, 30);
|
this->unk_212 = Rand_S16Offset(30, 30);
|
||||||
if (((this->actor.params & 0xF0) == 0x40) && ((gSaveContext.infTable[14] & 0x800) == 0)) {
|
if (((this->actor.params & 0xF0) == 0x40) && ((Flags_GetInfTable(INFTABLE_EB)) == 0)) {
|
||||||
EnGo_SetupAction(this, func_80A40B1C);
|
EnGo_SetupAction(this, func_80A40B1C);
|
||||||
} else {
|
} else {
|
||||||
EnGo_SetupAction(this, EnGo_BiggoronActionFunc);
|
EnGo_SetupAction(this, EnGo_BiggoronActionFunc);
|
||||||
@ -936,7 +936,7 @@ void func_80A40A54(EnGo* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80A40B1C(EnGo* this, PlayState* play) {
|
void func_80A40B1C(EnGo* this, PlayState* play) {
|
||||||
if (gSaveContext.infTable[14] & 0x800) {
|
if (Flags_GetInfTable(INFTABLE_EB)) {
|
||||||
EnGo_ChangeAnim(this, ENGO_ANIM_3);
|
EnGo_ChangeAnim(this, ENGO_ANIM_3);
|
||||||
EnGo_SetupAction(this, func_80A40A54);
|
EnGo_SetupAction(this, func_80A40A54);
|
||||||
} else {
|
} else {
|
||||||
|
@ -10,27 +10,27 @@
|
|||||||
/*
|
/*
|
||||||
FLAGS
|
FLAGS
|
||||||
|
|
||||||
gSaveContext.eventChkInf[2] & 0x8 - DC entrance boulder blown up as child
|
Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE) - DC entrance boulder blown up as child
|
||||||
|
|
||||||
InfTable
|
InfTable
|
||||||
|
|
||||||
gSaveContext.infTable[11] & 0x10
|
Flags_GetInfTable(INFTABLE_B4)
|
||||||
gSaveContext.infTable[14] & 0x1 - Talked to DMT Goron at DC entrance (Before DC is opened as child)
|
Flags_GetInfTable(INFTABLE_E0) - Talked to DMT Goron at DC entrance (Before DC is opened as child)
|
||||||
gSaveContext.infTable[14] & 0x8 - Talked to GC Goron in bottom level stairwell
|
Flags_GetInfTable(INFTABLE_E3) - Talked to GC Goron in bottom level stairwell
|
||||||
gSaveContext.infTable[14] & 0x40 - Talked to GC Goron at LW entrance (Before LW shortcut is opened)
|
Flags_GetInfTable(INFTABLE_E6) - Talked to GC Goron at LW entrance (Before LW shortcut is opened)
|
||||||
gSaveContext.infTable[14] & 0x800 - Talked to DMT Goron at Bomb Flower with goron bracelet
|
Flags_GetInfTable(INFTABLE_EB) - Talked to DMT Goron at Bomb Flower with goron bracelet
|
||||||
gSaveContext.infTable[15] & 0x1 - Talked to Goron at GC Entrance (Before goron ruby is obtained)
|
Flags_GetInfTable(INFTABLE_F0) - Talked to Goron at GC Entrance (Before goron ruby is obtained)
|
||||||
gSaveContext.infTable[15] & 0x10 - Talked to Goron at GC Island (Before goron ruby is obtained)
|
Flags_GetInfTable(INFTABLE_F4) - Talked to Goron at GC Island (Before goron ruby is obtained)
|
||||||
gSaveContext.infTable[15] & 0x100 - (not on cloud modding) Talked to GC Goron outside Darunias door (after opening door,
|
Flags_GetInfTable(INFTABLE_F8) - (not on cloud modding) Talked to GC Goron outside Darunias door (after opening door,
|
||||||
before getting goron bracelet) gSaveContext.infTable[16] & 0x200 - Obtained Fire Tunic from Goron Link
|
before getting goron bracelet) Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED) - Obtained Fire Tunic from Goron Link
|
||||||
gSaveContext.infTable[16] & 0x400 - (not on cloud modding)
|
Flags_GetInfTable(INFTABLE_10A) - (not on cloud modding)
|
||||||
gSaveContext.infTable[16] & 0x800 - Spoke to Goron Link About Volvagia
|
Flags_GetInfTable(INFTABLE_10B) - Spoke to Goron Link About Volvagia
|
||||||
gSaveContext.infTable[16] & 0x1000 - Stopped Goron Link's Rolling
|
Flags_GetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING) - Stopped Goron Link's Rolling
|
||||||
gSaveContext.infTable[16] & 0x2000 - EnGo Exclusive
|
Flags_GetInfTable(INFTABLE_10D) - EnGo Exclusive
|
||||||
gSaveContext.infTable[16] & 0x4000 - Spoke to Goron Link
|
Flags_GetInfTable(INFTABLE_SPOKE_TO_GORON_LINK) - Spoke to Goron Link
|
||||||
gSaveContext.infTable[16] & 0x8000 - (not on cloud modding)
|
Flags_GetInfTable(INFTABLE_10F) - (not on cloud modding)
|
||||||
|
|
||||||
gSaveContext.infTable[17] & 0x4000 - Bomb bag upgrade obtained from rolling Goron
|
Flags_GetInfTable(INFTABLE_11E) - Bomb bag upgrade obtained from rolling Goron
|
||||||
|
|
||||||
EnGo
|
EnGo
|
||||||
pathIndex: this->actor.params & 0xF
|
pathIndex: this->actor.params & 0xF
|
||||||
@ -333,7 +333,7 @@ u16 EnGo2_GoronFireGenericGetTextId(EnGo2* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u16 EnGo2_GetTextIdGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
u16 EnGo2_GetTextIdGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
||||||
if (gSaveContext.infTable[17] & 0x4000) {
|
if (Flags_GetInfTable(INFTABLE_11E)) {
|
||||||
return 0x3013;
|
return 0x3013;
|
||||||
} else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || gSaveContext.n64ddFlag) && this->waypoint > 7 && this->waypoint < 12) {
|
} else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || gSaveContext.n64ddFlag) && this->waypoint > 7 && this->waypoint < 12) {
|
||||||
return 0x3012;
|
return 0x3012;
|
||||||
@ -356,7 +356,7 @@ s16 EnGo2_UpdateTalkStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
|||||||
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_GC_ROLLING_GORON_AS_CHILD, GI_BOMB_BAG_40));
|
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_GC_ROLLING_GORON_AS_CHILD, GI_BOMB_BAG_40));
|
||||||
}
|
}
|
||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
gSaveContext.infTable[17] |= 0x4000;
|
Flags_SetInfTable(INFTABLE_11E);
|
||||||
return NPC_TALK_STATE_ACTION;
|
return NPC_TALK_STATE_ACTION;
|
||||||
} else {
|
} else {
|
||||||
return NPC_TALK_STATE_ACTION;
|
return NPC_TALK_STATE_ACTION;
|
||||||
@ -375,8 +375,8 @@ u16 EnGo2_GetTextIdGoronDmtBombFlower(PlayState* play, EnGo2* this) {
|
|||||||
s16 EnGo2_UpdateTalkStateGoronDmtBombFlower(PlayState* play, EnGo2* this) {
|
s16 EnGo2_UpdateTalkStateGoronDmtBombFlower(PlayState* play, EnGo2* this) {
|
||||||
switch (Message_GetState(&play->msgCtx)) {
|
switch (Message_GetState(&play->msgCtx)) {
|
||||||
case TEXT_STATE_CLOSING:
|
case TEXT_STATE_CLOSING:
|
||||||
if ((this->actor.textId == 0x300B) && (gSaveContext.infTable[14] & 0x800) == 0) {
|
if ((this->actor.textId == 0x300B) && (Flags_GetInfTable(INFTABLE_EB)) == 0) {
|
||||||
gSaveContext.infTable[14] |= 0x800;
|
Flags_SetInfTable(INFTABLE_EB);
|
||||||
return NPC_TALK_STATE_ACTION;
|
return NPC_TALK_STATE_ACTION;
|
||||||
} else {
|
} else {
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
@ -403,7 +403,7 @@ u16 EnGo2_GetTextIdGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
|
|||||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.eventChkInf[2] & 0x8) ? 0x3026 : 0x3009;
|
return (Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE)) ? 0x3026 : 0x3009;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,14 +423,14 @@ u16 EnGo2_GetTextIdGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
|||||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return gSaveContext.eventChkInf[2] & 0x8 ? 0x3021 : gSaveContext.infTable[14] & 0x1 ? 0x302A : 0x3008;
|
return Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE) ? 0x3021 : Flags_GetInfTable(INFTABLE_E0) ? 0x302A : 0x3008;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s16 EnGo2_UpdateTalkStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
s16 EnGo2_UpdateTalkStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||||
if (this->actor.textId == 0x3008) {
|
if (this->actor.textId == 0x3008) {
|
||||||
gSaveContext.infTable[14] |= 0x1;
|
Flags_SetInfTable(INFTABLE_E0);
|
||||||
}
|
}
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
} else {
|
} else {
|
||||||
@ -446,14 +446,14 @@ u16 EnGo2_GetTextIdGoronCityEntrance(PlayState* play, EnGo2* this) {
|
|||||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return gSaveContext.infTable[15] & 0x1 ? 0x3015 : 0x3014;
|
return Flags_GetInfTable(INFTABLE_F0) ? 0x3015 : 0x3014;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s16 EnGo2_UpdateTalkStateGoronCityEntrance(PlayState* play, EnGo2* this) {
|
s16 EnGo2_UpdateTalkStateGoronCityEntrance(PlayState* play, EnGo2* this) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||||
if (this->actor.textId == 0x3014) {
|
if (this->actor.textId == 0x3014) {
|
||||||
gSaveContext.infTable[15] |= 0x1;
|
Flags_SetInfTable(INFTABLE_F0);
|
||||||
}
|
}
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
} else {
|
} else {
|
||||||
@ -469,14 +469,14 @@ u16 EnGo2_GetTextIdGoronCityIsland(PlayState* play, EnGo2* this) {
|
|||||||
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
(gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
|
||||||
return 0x3027;
|
return 0x3027;
|
||||||
} else {
|
} else {
|
||||||
return gSaveContext.infTable[15] & 0x10 ? 0x3017 : 0x3016;
|
return Flags_GetInfTable(INFTABLE_F4) ? 0x3017 : 0x3016;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s16 EnGo2_UpdateTalkStateGoronCityIsland(PlayState* play, EnGo2* this) {
|
s16 EnGo2_UpdateTalkStateGoronCityIsland(PlayState* play, EnGo2* this) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||||
if (this->actor.textId == 0x3016) {
|
if (this->actor.textId == 0x3016) {
|
||||||
gSaveContext.infTable[15] |= 0x10;
|
Flags_SetInfTable(INFTABLE_F4);
|
||||||
}
|
}
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
} else {
|
} else {
|
||||||
@ -494,7 +494,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
|||||||
} else {
|
} else {
|
||||||
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
|
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
|
||||||
: !Flags_GetSwitch(play, 0x1B) ? 0x3017
|
: !Flags_GetSwitch(play, 0x1B) ? 0x3017
|
||||||
: gSaveContext.infTable[15] & 0x100 ? 0x3019
|
: Flags_GetInfTable(INFTABLE_F8) ? 0x3019
|
||||||
: 0x3018;
|
: 0x3018;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -502,7 +502,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
|||||||
s16 EnGo2_UpdateTalkStateGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
s16 EnGo2_UpdateTalkStateGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||||
if (this->actor.textId == 0x3018) {
|
if (this->actor.textId == 0x3018) {
|
||||||
gSaveContext.infTable[15] |= 0x100;
|
Flags_SetInfTable(INFTABLE_F8);
|
||||||
}
|
}
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
} else {
|
} else {
|
||||||
@ -526,13 +526,13 @@ u16 EnGo2_GetTextIdGoronCityLink(PlayState* play, EnGo2* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
||||||
return gSaveContext.infTable[16] & 0x8000 ? 0x3042 : 0x3041;
|
return Flags_GetInfTable(INFTABLE_10F) ? 0x3042 : 0x3041;
|
||||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||||
return gSaveContext.infTable[16] & 0x4000 ? 0x3038 : 0x3037;
|
return Flags_GetInfTable(INFTABLE_SPOKE_TO_GORON_LINK) ? 0x3038 : 0x3037;
|
||||||
} else if (gSaveContext.infTable[16] & 0x1000) {
|
} else if (Flags_GetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING)) {
|
||||||
this->unk_20C = 0;
|
this->unk_20C = 0;
|
||||||
this->dialogState = TEXT_STATE_NONE;
|
this->dialogState = TEXT_STATE_NONE;
|
||||||
return gSaveContext.infTable[16] & 0x400 ? 0x3033 : 0x3032;
|
return Flags_GetInfTable(INFTABLE_10A) ? 0x3033 : 0x3032;
|
||||||
} else {
|
} else {
|
||||||
return 0x3030;
|
return 0x3030;
|
||||||
}
|
}
|
||||||
@ -559,7 +559,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
|
|||||||
return NPC_TALK_STATE_ACTION;
|
return NPC_TALK_STATE_ACTION;
|
||||||
}
|
}
|
||||||
case 0x3037:
|
case 0x3037:
|
||||||
gSaveContext.infTable[16] |= 0x4000;
|
Flags_SetInfTable(INFTABLE_SPOKE_TO_GORON_LINK);
|
||||||
default:
|
default:
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
}
|
}
|
||||||
@ -567,12 +567,12 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
|
|||||||
if (Message_ShouldAdvance(play)) {
|
if (Message_ShouldAdvance(play)) {
|
||||||
if (this->actor.textId == 0x3034) {
|
if (this->actor.textId == 0x3034) {
|
||||||
if (play->msgCtx.choiceIndex == 0) {
|
if (play->msgCtx.choiceIndex == 0) {
|
||||||
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3033 : 0x3035;
|
this->actor.textId = Flags_GetInfTable(INFTABLE_10B) ? 0x3033 : 0x3035;
|
||||||
if (this->actor.textId == 0x3035) {
|
if (this->actor.textId == 0x3035) {
|
||||||
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3036 : 0x3033;
|
this->actor.textId = Flags_GetInfTable(INFTABLE_10B) ? 0x3036 : 0x3033;
|
||||||
if (this->actor.textId == 0x3036) {
|
if (this->actor.textId == 0x3036) {
|
||||||
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
||||||
}
|
}
|
||||||
@ -588,7 +588,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
|
|||||||
if (Message_ShouldAdvance(play)) {
|
if (Message_ShouldAdvance(play)) {
|
||||||
switch (this->actor.textId) {
|
switch (this->actor.textId) {
|
||||||
case 0x3035:
|
case 0x3035:
|
||||||
gSaveContext.infTable[16] |= 0x800;
|
Flags_SetInfTable(INFTABLE_10B);
|
||||||
case 0x3032:
|
case 0x3032:
|
||||||
case 0x3033:
|
case 0x3033:
|
||||||
this->actor.textId = 0x3034;
|
this->actor.textId = 0x3034;
|
||||||
@ -719,13 +719,13 @@ s16 EnGo2_UpdateTalkStateGoronFireGeneric(PlayState* play, EnGo2* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u16 EnGo2_GetTextIdGoronCityStairwell(PlayState* play, EnGo2* this) {
|
u16 EnGo2_GetTextIdGoronCityStairwell(PlayState* play, EnGo2* this) {
|
||||||
return !LINK_IS_ADULT ? gSaveContext.infTable[14] & 0x8 ? 0x3022 : 0x300E : 0x3043;
|
return !LINK_IS_ADULT ? Flags_GetInfTable(INFTABLE_E3) ? 0x3022 : 0x300E : 0x3043;
|
||||||
}
|
}
|
||||||
|
|
||||||
s16 EnGo2_UpdateTalkStateGoronCityStairwell(PlayState* play, EnGo2* this) {
|
s16 EnGo2_UpdateTalkStateGoronCityStairwell(PlayState* play, EnGo2* this) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||||
if (this->actor.textId == 0x300E) {
|
if (this->actor.textId == 0x300E) {
|
||||||
gSaveContext.infTable[14] |= 0x8;
|
Flags_SetInfTable(INFTABLE_E3);
|
||||||
}
|
}
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
} else {
|
} else {
|
||||||
@ -751,7 +751,7 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(PlayState* play, EnGo2* this) {
|
|||||||
if (Flags_GetSwitch(play, 0x1C)) {
|
if (Flags_GetSwitch(play, 0x1C)) {
|
||||||
return 0x302F;
|
return 0x302F;
|
||||||
} else {
|
} else {
|
||||||
return gSaveContext.infTable[14] & 0x40 ? 0x3025 : 0x3024;
|
return Flags_GetInfTable(INFTABLE_E6) ? 0x3025 : 0x3024;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0x3043;
|
return 0x3043;
|
||||||
@ -761,7 +761,7 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(PlayState* play, EnGo2* this) {
|
|||||||
s16 EnGo2_UpdateTalkStateGoronCityLostWoods(PlayState* play, EnGo2* this) {
|
s16 EnGo2_UpdateTalkStateGoronCityLostWoods(PlayState* play, EnGo2* this) {
|
||||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||||
if (this->actor.textId == 0x3024) {
|
if (this->actor.textId == 0x3024) {
|
||||||
gSaveContext.infTable[14] |= 0x40;
|
Flags_SetInfTable(INFTABLE_E6);
|
||||||
}
|
}
|
||||||
return NPC_TALK_STATE_IDLE;
|
return NPC_TALK_STATE_IDLE;
|
||||||
} else {
|
} else {
|
||||||
@ -1114,7 +1114,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
|||||||
|
|
||||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_SWORD_BROKEN) {
|
} else if (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_SWORD_BROKEN) {
|
||||||
if (func_8002F368(play) == EXCH_ITEM_SWORD_BROKEN) {
|
if (func_8002F368(play) == EXCH_ITEM_SWORD_BROKEN) {
|
||||||
if (gSaveContext.infTable[11] & 0x10) {
|
if (Flags_GetInfTable(INFTABLE_B4)) {
|
||||||
textId = 0x3055;
|
textId = 0x3055;
|
||||||
} else {
|
} else {
|
||||||
textId = 0x3054;
|
textId = 0x3054;
|
||||||
@ -1413,7 +1413,7 @@ void EnGo2_GetItemAnimation(EnGo2* this, PlayState* play) {
|
|||||||
void EnGo2_SetupRolling(EnGo2* this, PlayState* play) {
|
void EnGo2_SetupRolling(EnGo2* this, PlayState* play) {
|
||||||
if ((this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG || (this->actor.params & 0x1F) == GORON_CITY_LINK) {
|
if ((this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG || (this->actor.params & 0x1F) == GORON_CITY_LINK) {
|
||||||
this->collider.info.bumperFlags = 1;
|
this->collider.info.bumperFlags = 1;
|
||||||
this->actor.speedXZ = gSaveContext.infTable[17] & 0x4000 ? 6.0f : 3.6000001f;
|
this->actor.speedXZ = Flags_GetInfTable(INFTABLE_11E) ? 6.0f : 3.6000001f;
|
||||||
} else {
|
} else {
|
||||||
this->actor.speedXZ = 6.0f;
|
this->actor.speedXZ = 6.0f;
|
||||||
}
|
}
|
||||||
@ -1637,7 +1637,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
|||||||
EnGo2_GetItemAnimation(this, play);
|
EnGo2_GetItemAnimation(this, play);
|
||||||
break;
|
break;
|
||||||
case GORON_CITY_LINK:
|
case GORON_CITY_LINK:
|
||||||
if ((gSaveContext.infTable[16] & 0x200)) {
|
if ((Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED))) {
|
||||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||||
this->actor.home.pos = this->actor.world.pos;
|
this->actor.home.pos = this->actor.world.pos;
|
||||||
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
|
||||||
@ -1648,7 +1648,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->actionFunc = EnGo2_CurledUp;
|
this->actionFunc = EnGo2_CurledUp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gSaveContext.infTable[16] &= ~0x1000;
|
Flags_UnsetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING);
|
||||||
this->collider.dim.height = (D_80A4816C[this->actor.params & 0x1F].height * 0.6f);
|
this->collider.dim.height = (D_80A4816C[this->actor.params & 0x1F].height * 0.6f);
|
||||||
EnGo2_SetupRolling(this, play);
|
EnGo2_SetupRolling(this, play);
|
||||||
this->isAwake = true;
|
this->isAwake = true;
|
||||||
@ -1679,7 +1679,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
|||||||
this->actionFunc = EnGo2_CurledUp;
|
this->actionFunc = EnGo2_CurledUp;
|
||||||
break;
|
break;
|
||||||
case GORON_DMT_BOMB_FLOWER:
|
case GORON_DMT_BOMB_FLOWER:
|
||||||
if (gSaveContext.infTable[14] & 0x800) {
|
if (Flags_GetInfTable(INFTABLE_EB)) {
|
||||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||||
this->actor.home.pos = this->actor.world.pos;
|
this->actor.home.pos = this->actor.world.pos;
|
||||||
}
|
}
|
||||||
@ -1902,7 +1902,7 @@ void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
|
|||||||
EnGo2_GetItemAnimation(this, play);
|
EnGo2_GetItemAnimation(this, play);
|
||||||
return;
|
return;
|
||||||
case GI_TUNIC_GORON:
|
case GI_TUNIC_GORON:
|
||||||
gSaveContext.infTable[16] |= 0x200;
|
Flags_SetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED);
|
||||||
EnGo2_GetItemAnimation(this, play);
|
EnGo2_GetItemAnimation(this, play);
|
||||||
return;
|
return;
|
||||||
case GI_SWORD_BGS:
|
case GI_SWORD_BGS:
|
||||||
@ -1996,7 +1996,7 @@ void EnGo2_GoronLinkStopRolling(EnGo2* this, PlayState* play) {
|
|||||||
if (Message_GetState(&play->msgCtx) != TEXT_STATE_CLOSING) {
|
if (Message_GetState(&play->msgCtx) != TEXT_STATE_CLOSING) {
|
||||||
player->actor.freezeTimer = 10;
|
player->actor.freezeTimer = 10;
|
||||||
} else {
|
} else {
|
||||||
gSaveContext.infTable[16] |= 0x1000;
|
Flags_SetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING);
|
||||||
this->trackingMode = NPC_TRACKING_NONE;
|
this->trackingMode = NPC_TRACKING_NONE;
|
||||||
this->unk_211 = false;
|
this->unk_211 = false;
|
||||||
this->isAwake = false;
|
this->isAwake = false;
|
||||||
|
@ -53,7 +53,7 @@ static InitChainEntry sInitChain[] = {
|
|||||||
void EnGuest_Init(Actor* thisx, PlayState* play) {
|
void EnGuest_Init(Actor* thisx, PlayState* play) {
|
||||||
EnGuest* this = (EnGuest*)thisx;
|
EnGuest* this = (EnGuest*)thisx;
|
||||||
|
|
||||||
if (gSaveContext.infTable[7] & 0x40) {
|
if (Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
} else {
|
} else {
|
||||||
this->osAnimeBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_OS_ANIME);
|
this->osAnimeBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_OS_ANIME);
|
||||||
|
@ -120,11 +120,11 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play) {
|
|||||||
// eventChkInf[4] & 1 = Got Zelda's Letter
|
// eventChkInf[4] & 1 = Got Zelda's Letter
|
||||||
// eventChkInf[5] & 0x200 = Got item from impa
|
// eventChkInf[5] & 0x200 = Got item from impa
|
||||||
// eventChkInf[8] & 1 = Ocarina thrown in moat
|
// eventChkInf[8] & 1 = Ocarina thrown in moat
|
||||||
bool metZelda = (gSaveContext.eventChkInf[4] & 1) && (gSaveContext.eventChkInf[5] & 0x200);
|
bool metZelda = (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY));
|
||||||
|
|
||||||
if (this->type != 5) {
|
if (this->type != 5) {
|
||||||
if ((gSaveContext.dayTime < 0xB888 || IS_DAY) &&
|
if ((gSaveContext.dayTime < 0xB888 || IS_DAY) &&
|
||||||
((!gSaveContext.n64ddFlag && !(gSaveContext.eventChkInf[8] & 1)) ||
|
((!gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
|
||||||
(gSaveContext.n64ddFlag && !metZelda))) {
|
(gSaveContext.n64ddFlag && !metZelda))) {
|
||||||
this->actionFunc = EnHeishi1_SetupWalk;
|
this->actionFunc = EnHeishi1_SetupWalk;
|
||||||
} else {
|
} else {
|
||||||
@ -132,7 +132,7 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY ||
|
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY ||
|
||||||
(!gSaveContext.n64ddFlag && gSaveContext.eventChkInf[8] & 1) ||
|
(!gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
|
||||||
(gSaveContext.n64ddFlag && metZelda)) {
|
(gSaveContext.n64ddFlag && metZelda)) {
|
||||||
this->actionFunc = EnHeishi1_SetupWaitNight;
|
this->actionFunc = EnHeishi1_SetupWaitNight;
|
||||||
} else {
|
} else {
|
||||||
@ -365,7 +365,7 @@ void EnHeishi1_Kick(EnHeishi1* this, PlayState* play) {
|
|||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
|
||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
if (!this->loadStarted) {
|
if (!this->loadStarted) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
Flags_SetEventChkInf(EVENTCHKINF_CAUGHT_BY_CASTLE_GUARDS);
|
||||||
play->nextEntranceIndex = 0x4FA;
|
play->nextEntranceIndex = 0x4FA;
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
this->loadStarted = true;
|
this->loadStarted = true;
|
||||||
|
@ -191,8 +191,8 @@ void func_80A53278(EnHeishi2* this, PlayState* play) {
|
|||||||
this->unk_30B = 1;
|
this->unk_30B = 1;
|
||||||
this->unk_300 = TEXT_STATE_DONE;
|
this->unk_300 = TEXT_STATE_DONE;
|
||||||
this->actionFunc = func_80A5475C;
|
this->actionFunc = func_80A5475C;
|
||||||
} else if ((gSaveContext.eventChkInf[0] & 0x200) && (gSaveContext.eventChkInf[2] & 0x20) &&
|
} else if ((Flags_GetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP)) && (Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) &&
|
||||||
(gSaveContext.eventChkInf[3] & 0x80)) {
|
(Flags_GetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP))) {
|
||||||
// "Get all spiritual stones!"
|
// "Get all spiritual stones!"
|
||||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST);
|
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST);
|
||||||
this->unk_300 = TEXT_STATE_DONE;
|
this->unk_300 = TEXT_STATE_DONE;
|
||||||
@ -211,7 +211,7 @@ void func_80A53278(EnHeishi2* this, PlayState* play) {
|
|||||||
this->unk_300 = TEXT_STATE_DONE;
|
this->unk_300 = TEXT_STATE_DONE;
|
||||||
this->actor.textId = 0x7099;
|
this->actor.textId = 0x7099;
|
||||||
this->actionFunc = func_80A5475C;
|
this->actionFunc = func_80A5475C;
|
||||||
} else if (gSaveContext.eventChkInf[1] & 4) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_POCKET_EGG)) {
|
||||||
if (this->unk_30E == 0) {
|
if (this->unk_30E == 0) {
|
||||||
// "Start under the first sleeve!"
|
// "Start under the first sleeve!"
|
||||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||||
@ -354,8 +354,8 @@ void func_80A5399C(EnHeishi2* this, PlayState* play) {
|
|||||||
|
|
||||||
this->unk_30B = 0;
|
this->unk_30B = 0;
|
||||||
var = 0;
|
var = 0;
|
||||||
if (gSaveContext.infTable[7] & 0x40) {
|
if (Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) {
|
||||||
if (!(gSaveContext.infTable[7] & 0x80)) {
|
if (!Flags_GetInfTable(INFTABLE_GATE_GUARD_PUT_ON_KEATON_MASK)) {
|
||||||
if (Player_GetMask(play) == PLAYER_MASK_KEATON) {
|
if (Player_GetMask(play) == PLAYER_MASK_KEATON) {
|
||||||
if (this->unk_309 == 0) {
|
if (this->unk_309 == 0) {
|
||||||
this->actor.textId = 0x200A;
|
this->actor.textId = 0x200A;
|
||||||
@ -526,7 +526,7 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) {
|
|||||||
void func_80A54038(EnHeishi2* this, PlayState* play) {
|
void func_80A54038(EnHeishi2* this, PlayState* play) {
|
||||||
SkelAnime_Update(&this->skelAnime);
|
SkelAnime_Update(&this->skelAnime);
|
||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
|
||||||
gSaveContext.infTable[7] |= 0x40;
|
Flags_SetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD);
|
||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
func_8002DF54(play, 0, 7);
|
func_8002DF54(play, 0, 7);
|
||||||
this->actionFunc = func_80A53908;
|
this->actionFunc = func_80A53908;
|
||||||
@ -541,8 +541,8 @@ void func_80A540C0(EnHeishi2* this, PlayState* play) {
|
|||||||
this->actor.textId = 0x2020;
|
this->actor.textId = 0x2020;
|
||||||
Message_ContinueTextbox(play, this->actor.textId);
|
Message_ContinueTextbox(play, this->actor.textId);
|
||||||
Player_UnsetMask(play);
|
Player_UnsetMask(play);
|
||||||
gSaveContext.infTable[7] |= 0x80;
|
Flags_SetInfTable(INFTABLE_GATE_GUARD_PUT_ON_KEATON_MASK);
|
||||||
gSaveContext.itemGetInf[3] |= 0x100;
|
Flags_SetItemGetInf(ITEMGETINF_38);
|
||||||
Item_Give(play, ITEM_SOLD_OUT);
|
Item_Give(play, ITEM_SOLD_OUT);
|
||||||
if (this->unk_30A != 0) {
|
if (this->unk_30A != 0) {
|
||||||
this->unk_30A = 2;
|
this->unk_30A = 2;
|
||||||
@ -848,7 +848,7 @@ void EnHeishi2_Draw(Actor* thisx, PlayState* play) {
|
|||||||
|
|
||||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi2_OverrideLimbDraw,
|
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi2_OverrideLimbDraw,
|
||||||
EnHeishi2_PostLimbDraw, this);
|
EnHeishi2_PostLimbDraw, this);
|
||||||
if ((this->type == 5) && (gSaveContext.infTable[7] & 0x80)) {
|
if ((this->type == 5) && (Flags_GetInfTable(INFTABLE_GATE_GUARD_PUT_ON_KEATON_MASK))) {
|
||||||
linkObjBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
|
linkObjBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
|
||||||
if (linkObjBankIndex >= 0) {
|
if (linkObjBankIndex >= 0) {
|
||||||
Matrix_Put(&this->mtxf_330);
|
Matrix_Put(&this->mtxf_330);
|
||||||
|
@ -205,7 +205,7 @@ void func_80A55D00(EnHeishi3* this, PlayState* play) {
|
|||||||
SkelAnime_Update(&this->skelAnime);
|
SkelAnime_Update(&this->skelAnime);
|
||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play) &&
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play) &&
|
||||||
(this->respawnFlag == 0)) {
|
(this->respawnFlag == 0)) {
|
||||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
Flags_SetEventChkInf(EVENTCHKINF_CAUGHT_BY_CASTLE_GUARDS);
|
||||||
play->nextEntranceIndex = 0x47E; // Hyrule Castle from Guard Capture (outside)
|
play->nextEntranceIndex = 0x47E; // Hyrule Castle from Guard Capture (outside)
|
||||||
play->sceneLoadFlag = 0x14;
|
play->sceneLoadFlag = 0x14;
|
||||||
this->respawnFlag = 1;
|
this->respawnFlag = 1;
|
||||||
|
@ -134,12 +134,12 @@ void func_80A563BC(EnHeishi4* this, PlayState* play) {
|
|||||||
this->unk_2B4 = 1;
|
this->unk_2B4 = 1;
|
||||||
this->actionFunc = func_80A56B40;
|
this->actionFunc = func_80A56B40;
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.eventChkInf[8] & 1) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) {
|
||||||
this->actor.textId = 0x5065;
|
this->actor.textId = 0x5065;
|
||||||
this->actionFunc = func_80A56B40;
|
this->actionFunc = func_80A56B40;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL)) {
|
||||||
this->actor.textId = 0x5068;
|
this->actor.textId = 0x5068;
|
||||||
this->actionFunc = func_80A56B40;
|
this->actionFunc = func_80A56B40;
|
||||||
return;
|
return;
|
||||||
@ -215,14 +215,14 @@ void func_80A56614(EnHeishi4* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80A5673C(EnHeishi4* this, PlayState* play) {
|
void func_80A5673C(EnHeishi4* this, PlayState* play) {
|
||||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL)) {
|
||||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ マスターソード祝入手! ☆☆☆☆☆ \n" VT_RST);
|
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ マスターソード祝入手! ☆☆☆☆☆ \n" VT_RST);
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->unk_284 = 0;
|
this->unk_284 = 0;
|
||||||
if (gSaveContext.eventChkInf[8] & 1) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) {
|
||||||
if (!(gSaveContext.infTable[6] & 0x1000)) {
|
if (!Flags_GetInfTable(INFTABLE_6C)) {
|
||||||
f32 frames = Animation_GetLastFrame(&gEnHeishiDyingGuardAnim_00C444);
|
f32 frames = Animation_GetLastFrame(&gEnHeishiDyingGuardAnim_00C444);
|
||||||
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardAnim_00C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP,
|
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardAnim_00C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP,
|
||||||
-10.0f);
|
-10.0f);
|
||||||
@ -269,7 +269,7 @@ void func_80A56994(EnHeishi4* this, PlayState* play) {
|
|||||||
func_80038290(play, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos);
|
func_80038290(play, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos);
|
||||||
if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
|
if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
|
||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
gSaveContext.infTable[6] |= 0x1000;
|
Flags_SetInfTable(INFTABLE_6C);
|
||||||
func_8002DF54(play, NULL, 8);
|
func_8002DF54(play, NULL, 8);
|
||||||
this->actionFunc = func_80A56A50;
|
this->actionFunc = func_80A56A50;
|
||||||
}
|
}
|
||||||
|
@ -462,7 +462,7 @@ s32 EnHorse_BgCheckBridgeJumpPoint(EnHorse* this, PlayState* play) {
|
|||||||
if (this->actor.speedXZ < 12.8f) {
|
if (this->actor.speedXZ < 12.8f) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -681,7 +681,7 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) {
|
|||||||
player = GET_PLAYER(play);
|
player = GET_PLAYER(play);
|
||||||
if (play->sceneNum != SCENE_SPOT20 ||
|
if (play->sceneNum != SCENE_SPOT20 ||
|
||||||
//! Same flag checked twice
|
//! Same flag checked twice
|
||||||
(Flags_GetEventChkInf(0x18) && ((gSaveContext.eventInf[0] & 0xF) != 6 || Flags_GetEventChkInf(0x18))) ||
|
(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && ((gSaveContext.eventInf[0] & 0xF) != 6 || Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) ||
|
||||||
// always load two spawns inside lon lon
|
// 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 == 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))) {
|
(sHorseSpawns[i].pos.x == -1003 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -755))) {
|
||||||
@ -792,7 +792,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
|||||||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
|
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
|
||||||
} else if (this->actor.params == 6) {
|
} else if (this->actor.params == 6) {
|
||||||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP;
|
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP;
|
||||||
if (Flags_GetEventChkInf(0x18) || DREG(1) != 0) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1) != 0) {
|
||||||
this->stateFlags &= ~ENHORSE_CANT_JUMP;
|
this->stateFlags &= ~ENHORSE_CANT_JUMP;
|
||||||
this->stateFlags |= ENHORSE_FLAG_26;
|
this->stateFlags |= ENHORSE_FLAG_26;
|
||||||
} else if (gSaveContext.eventInf[0] & 0x40 && this->type == HORSE_HNI) {
|
} else if (gSaveContext.eventInf[0] & 0x40 && this->type == HORSE_HNI) {
|
||||||
@ -806,7 +806,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (play->sceneNum == SCENE_SPOT20 && (gSaveContext.eventInf[0] & 0xF) == 6 &&
|
if (play->sceneNum == SCENE_SPOT20 && (gSaveContext.eventInf[0] & 0xF) == 6 &&
|
||||||
Flags_GetEventChkInf(0x18) == 0 && !DREG(1)) {
|
Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) == 0 && !DREG(1)) {
|
||||||
this->stateFlags |= ENHORSE_FLAG_25;
|
this->stateFlags |= ENHORSE_FLAG_25;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -832,7 +832,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
|||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Flags_GetEventChkInf(0x18)) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -840,12 +840,12 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
|||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (!Flags_GetEventChkInf(0x18) && !DREG(1) && !IS_DAY) {
|
} else if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && !DREG(1) && !IS_DAY) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (play->sceneNum == SCENE_MALON_STABLE) {
|
} else if (play->sceneNum == SCENE_MALON_STABLE) {
|
||||||
if (IS_DAY || Flags_GetEventChkInf(0x18) || DREG(1) != 0 || !LINK_IS_ADULT) {
|
if (IS_DAY || Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1) != 0 || !LINK_IS_ADULT) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -882,7 +882,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
|||||||
} else if (this->actor.params == 8) {
|
} else if (this->actor.params == 8) {
|
||||||
EnHorse_InitHorsebackArchery(this);
|
EnHorse_InitHorsebackArchery(this);
|
||||||
Interface_InitHorsebackArchery(play);
|
Interface_InitHorsebackArchery(play);
|
||||||
} else if (play->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(0x18) && !DREG(1)) {
|
} else if (play->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && !DREG(1)) {
|
||||||
EnHorse_InitFleePlayer(this);
|
EnHorse_InitFleePlayer(this);
|
||||||
} else {
|
} else {
|
||||||
if (play->sceneNum == SCENE_SOUKO) {
|
if (play->sceneNum == SCENE_SOUKO) {
|
||||||
@ -2517,7 +2517,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) {
|
|||||||
|
|
||||||
if (play->interfaceCtx.hbaAmmo != 0) {
|
if (play->interfaceCtx.hbaAmmo != 0) {
|
||||||
if (!(this->hbaFlags & 2)) {
|
if (!(this->hbaFlags & 2)) {
|
||||||
if (gSaveContext.infTable[25] & 1) {
|
if (Flags_GetInfTable(INFTABLE_190)) {
|
||||||
if ((s32)gSaveContext.minigameScore >= 1500) {
|
if ((s32)gSaveContext.minigameScore >= 1500) {
|
||||||
this->hbaFlags |= 4;
|
this->hbaFlags |= 4;
|
||||||
}
|
}
|
||||||
@ -3554,7 +3554,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
|
|||||||
this->stateFlags &= ~ENHORSE_FLAG_24;
|
this->stateFlags &= ~ENHORSE_FLAG_24;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (play->sceneNum == SCENE_SPOT09 && (gSaveContext.eventChkInf[9] & 0xF) != 0xF) {
|
if (play->sceneNum == SCENE_SPOT09 && !GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
|
||||||
EnHorse_CheckBridgeJumps(this, play);
|
EnHorse_CheckBridgeJumps(this, play);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ void EnHorseGameCheck_Init(Actor* thisx, PlayState* play) {
|
|||||||
s32 pad;
|
s32 pad;
|
||||||
EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx;
|
EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx;
|
||||||
|
|
||||||
if ((play->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(0x18) || DREG(1))) {
|
if ((play->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1))) {
|
||||||
this->actor.params = HORSEGAME_MALON_RACE;
|
this->actor.params = HORSEGAME_MALON_RACE;
|
||||||
}
|
}
|
||||||
if (sInitFuncs[this->actor.params] != NULL) {
|
if (sInitFuncs[this->actor.params] != NULL) {
|
||||||
|
@ -166,11 +166,11 @@ void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) {
|
|||||||
if (gSaveContext.sceneSetupIndex > 3) {
|
if (gSaveContext.sceneSetupIndex > 3) {
|
||||||
func_80A69EC0(this);
|
func_80A69EC0(this);
|
||||||
} else if (play->sceneNum == SCENE_SPOT20) {
|
} else if (play->sceneNum == SCENE_SPOT20) {
|
||||||
if (!Flags_GetEventChkInf(0x14)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->unk_2A0 = gSaveContext.eventChkInf[1] & 0x40;
|
this->unk_2A0 = Flags_GetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON);
|
||||||
func_80A69EC0(this);
|
func_80A69EC0(this);
|
||||||
} else {
|
} else {
|
||||||
func_80A69EC0(this);
|
func_80A69EC0(this);
|
||||||
@ -359,17 +359,17 @@ void func_80A6A068(EnHorseLinkChild* this, PlayState* play) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((gSaveContext.eventChkInf[1] & 0x40) && (DREG(53) != 0)) ||
|
if (((Flags_GetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON)) && (DREG(53) != 0)) ||
|
||||||
((play->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF1))) {
|
((play->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF1))) {
|
||||||
func_80A6A4DC(this);
|
func_80A6A4DC(this);
|
||||||
} else {
|
} else {
|
||||||
this->unk_2A0 = gSaveContext.eventChkInf[1] & 0x40;
|
this->unk_2A0 = Flags_GetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON);
|
||||||
}
|
}
|
||||||
|
|
||||||
newAnimationIdx = this->animationIdx;
|
newAnimationIdx = this->animationIdx;
|
||||||
animationEnded = SkelAnime_Update(&this->skin.skelAnime);
|
animationEnded = SkelAnime_Update(&this->skin.skelAnime);
|
||||||
if (animationEnded || (this->animationIdx == 1) || (this->animationIdx == 0)) {
|
if (animationEnded || (this->animationIdx == 1) || (this->animationIdx == 0)) {
|
||||||
if (gSaveContext.eventChkInf[1] & 0x20) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_RANCH)) {
|
||||||
distFromHome = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos);
|
distFromHome = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos);
|
||||||
distLinkFromHome = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos);
|
distLinkFromHome = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos);
|
||||||
if (distLinkFromHome > 250.0f) {
|
if (distLinkFromHome > 250.0f) {
|
||||||
|
@ -208,7 +208,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
if (Flags_GetEventChkInf(0x14)) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||||
if (this->actor.world.rot.z != 3) {
|
if (this->actor.world.rot.z != 3) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
@ -217,7 +217,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
|
|||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
|
||||||
if (this->actor.world.rot.z != 7) {
|
if (this->actor.world.rot.z != 7) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
return;
|
return;
|
||||||
|
@ -80,7 +80,7 @@ void EnHs_Init(Actor* thisx, PlayState* play) {
|
|||||||
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコの店(大人の時) \n" VT_RST);
|
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコの店(大人の時) \n" VT_RST);
|
||||||
func_80A6E3A0(this, func_80A6E9AC);
|
func_80A6E3A0(this, func_80A6E9AC);
|
||||||
bool shouldSpawn;
|
bool shouldSpawn;
|
||||||
bool tradedMushroom = gSaveContext.itemGetInf[3] & 1;
|
bool tradedMushroom = Flags_GetItemGetInf(ITEMGETINF_30);
|
||||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
|
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
|
||||||
// To explain the logic because Fado and Grog are linked:
|
// To explain the logic because Fado and Grog are linked:
|
||||||
// - If you have Cojiro, then spawn Grog and not Fado.
|
// - If you have Cojiro, then spawn Grog and not Fado.
|
||||||
|
@ -430,7 +430,7 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) {
|
|||||||
switch (this->actor.params & 0x7F) {
|
switch (this->actor.params & 0x7F) {
|
||||||
case ENHY_TYPE_AOB:
|
case ENHY_TYPE_AOB:
|
||||||
if (play->sceneNum == SCENE_KAKARIKO) {
|
if (play->sceneNum == SCENE_KAKARIKO) {
|
||||||
return (this->unk_330 & 0x800) ? 0x508D : ((gSaveContext.infTable[12] & 0x800) ? 0x508C : 0x508B);
|
return (this->unk_330 & 0x800) ? 0x508D : ((Flags_GetInfTable(INFTABLE_CB)) ? 0x508C : 0x508B);
|
||||||
} else if (play->sceneNum == SCENE_MARKET_DAY) {
|
} else if (play->sceneNum == SCENE_MARKET_DAY) {
|
||||||
return (gSaveContext.eventInf[3] & 1) ? 0x709B : 0x709C;
|
return (gSaveContext.eventInf[3] & 1) ? 0x709B : 0x709C;
|
||||||
} else if (gSaveContext.dogIsLost) {
|
} else if (gSaveContext.dogIsLost) {
|
||||||
@ -446,77 +446,77 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) {
|
|||||||
return 0x70A0;
|
return 0x70A0;
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_COB:
|
case ENHY_TYPE_COB:
|
||||||
if (gSaveContext.eventChkInf[8] & 1) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) {
|
||||||
return (gSaveContext.infTable[12] & 2) ? 0x7017 : 0x7045;
|
return (Flags_GetInfTable(INFTABLE_C1)) ? 0x7017 : 0x7045;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.infTable[12] & 1) ? 0x7017 : 0x7016;
|
return (Flags_GetInfTable(INFTABLE_C0)) ? 0x7017 : 0x7016;
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_AHG_2:
|
case ENHY_TYPE_AHG_2:
|
||||||
if (play->sceneNum == SCENE_KAKARIKO) {
|
if (play->sceneNum == SCENE_KAKARIKO) {
|
||||||
return 0x5086;
|
return 0x5086;
|
||||||
} else if (play->sceneNum == SCENE_SPOT01) {
|
} else if (play->sceneNum == SCENE_SPOT01) {
|
||||||
return 0x5085;
|
return 0x5085;
|
||||||
} else if (gSaveContext.eventChkInf[8] & 1) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) {
|
||||||
return (gSaveContext.infTable[12] & 8) ? 0x701A : 0x7047;
|
return (Flags_GetInfTable(INFTABLE_C3)) ? 0x701A : 0x7047;
|
||||||
} else if (gSaveContext.eventChkInf[1] & 0x10) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||||
return 0x701A;
|
return 0x701A;
|
||||||
} else if (gSaveContext.eventChkInf[1] & 1) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_CASTLE_OR_MARKET)) {
|
||||||
return 0x701B;
|
return 0x701B;
|
||||||
} else if (gSaveContext.infTable[12] & 4) {
|
} else if (Flags_GetInfTable(INFTABLE_C2)) {
|
||||||
return 0x701C;
|
return 0x701C;
|
||||||
} else {
|
} else {
|
||||||
return 0x701A;
|
return 0x701A;
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_BOJ_3:
|
case ENHY_TYPE_BOJ_3:
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? ((gSaveContext.infTable[12] & 0x10) ? 0x7001 : 0x70EB) : 0x7001;
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? ((Flags_GetInfTable(INFTABLE_C4)) ? 0x7001 : 0x70EB) : 0x7001;
|
||||||
case ENHY_TYPE_AHG_4:
|
case ENHY_TYPE_AHG_4:
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704B : ((gSaveContext.infTable[12] & 0x20) ? 0x7024 : 0x7023);
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x704B : ((Flags_GetInfTable(INFTABLE_C5)) ? 0x7024 : 0x7023);
|
||||||
case ENHY_TYPE_BOJ_5:
|
case ENHY_TYPE_BOJ_5:
|
||||||
player->exchangeItemId = EXCH_ITEM_BLUE_FIRE;
|
player->exchangeItemId = EXCH_ITEM_BLUE_FIRE;
|
||||||
return 0x700C;
|
return 0x700C;
|
||||||
case ENHY_TYPE_BBA:
|
case ENHY_TYPE_BBA:
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704A : ((gSaveContext.infTable[12] & 0x40) ? 0x7022 : 0x7021);
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x704A : ((Flags_GetInfTable(INFTABLE_C6)) ? 0x7022 : 0x7021);
|
||||||
case ENHY_TYPE_BJI_7:
|
case ENHY_TYPE_BJI_7:
|
||||||
if (play->sceneNum == SCENE_KAKARIKO) {
|
if (play->sceneNum == SCENE_KAKARIKO) {
|
||||||
return 0x5088;
|
return 0x5088;
|
||||||
} else if (play->sceneNum == SCENE_SPOT01) {
|
} else if (play->sceneNum == SCENE_SPOT01) {
|
||||||
return 0x5087;
|
return 0x5087;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704D
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x704D
|
||||||
: ((gSaveContext.infTable[12] & 0x80) ? 0x7028 : 0x7027);
|
: ((Flags_GetInfTable(INFTABLE_C7)) ? 0x7028 : 0x7027);
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_CNE_8:
|
case ENHY_TYPE_CNE_8:
|
||||||
if (gSaveContext.eventChkInf[8] & 1) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) {
|
||||||
return (gSaveContext.infTable[12] & 0x200) ? 0x701E : 0x7048;
|
return (Flags_GetInfTable(INFTABLE_C9)) ? 0x701E : 0x7048;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.infTable[12] & 0x100) ? 0x701E : 0x701D;
|
return (Flags_GetInfTable(INFTABLE_C8)) ? 0x701E : 0x701D;
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_BOJ_9:
|
case ENHY_TYPE_BOJ_9:
|
||||||
if (play->sceneNum == SCENE_KAKARIKO) {
|
if (play->sceneNum == SCENE_KAKARIKO) {
|
||||||
return (gSaveContext.eventChkInf[10] & 0x400) ? 0x5082 : 0x5081;
|
return (Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) ? 0x5082 : 0x5081;
|
||||||
} else if (play->sceneNum == SCENE_SPOT01) {
|
} else if (play->sceneNum == SCENE_SPOT01) {
|
||||||
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x5080 : 0x507F;
|
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x5080 : 0x507F;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7049
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x7049
|
||||||
: ((gSaveContext.infTable[12] & 0x400) ? 0x7020 : 0x701F);
|
: ((Flags_GetInfTable(INFTABLE_CA)) ? 0x7020 : 0x701F);
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_BOJ_10:
|
case ENHY_TYPE_BOJ_10:
|
||||||
if (play->sceneNum == SCENE_LABO) {
|
if (play->sceneNum == SCENE_LABO) {
|
||||||
return (gSaveContext.eventChkInf[10] & 0x400) ? 0x507E : 0x507D;
|
return (Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) ? 0x507E : 0x507D;
|
||||||
} else if (play->sceneNum == SCENE_SPOT01) {
|
} else if (play->sceneNum == SCENE_SPOT01) {
|
||||||
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x507C : 0x507B;
|
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x507C : 0x507B;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7046
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x7046
|
||||||
: ((gSaveContext.infTable[12] & 0x2000) ? 0x7019 : 0x7018);
|
: ((Flags_GetInfTable(INFTABLE_CD)) ? 0x7019 : 0x7018);
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_CNE_11:
|
case ENHY_TYPE_CNE_11:
|
||||||
return (gSaveContext.infTable[8] & 0x800) ? ((gSaveContext.infTable[12] & 0x1000) ? 0x7014 : 0x70A4)
|
return (Flags_GetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE)) ? ((Flags_GetInfTable(INFTABLE_CC)) ? 0x7014 : 0x70A4)
|
||||||
: 0x7014;
|
: 0x7014;
|
||||||
case ENHY_TYPE_BOJ_12:
|
case ENHY_TYPE_BOJ_12:
|
||||||
if (play->sceneNum == SCENE_SPOT01) {
|
if (play->sceneNum == SCENE_SPOT01) {
|
||||||
return !IS_DAY ? 0x5084 : 0x5083;
|
return !IS_DAY ? 0x5084 : 0x5083;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7044 : 0x7015;
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x7044 : 0x7015;
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_AHG_13:
|
case ENHY_TYPE_AHG_13:
|
||||||
return 0x7055;
|
return 0x7055;
|
||||||
@ -529,20 +529,20 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) {
|
|||||||
case ENHY_TYPE_AHG_17:
|
case ENHY_TYPE_AHG_17:
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
if (IS_DAY) {
|
if (IS_DAY) {
|
||||||
return (gSaveContext.infTable[22] & 1) ? 0x5058 : 0x5057;
|
return (Flags_GetInfTable(INFTABLE_160)) ? 0x5058 : 0x5057;
|
||||||
} else {
|
} else {
|
||||||
return (gSaveContext.infTable[22] & 2) ? 0x505A : 0x5059;
|
return (Flags_GetInfTable(INFTABLE_161)) ? 0x505A : 0x5059;
|
||||||
}
|
}
|
||||||
} else if (IS_DAY) {
|
} else if (IS_DAY) {
|
||||||
return (gSaveContext.infTable[22] & 4) ? 0x505C : 0x505B;
|
return (Flags_GetInfTable(INFTABLE_162)) ? 0x505C : 0x505B;
|
||||||
} else {
|
} else {
|
||||||
return 0x5058;
|
return 0x5058;
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_BOB_18:
|
case ENHY_TYPE_BOB_18:
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x505F : ((gSaveContext.infTable[22] & 8) ? 0x505E : 0x505D);
|
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x505F : ((Flags_GetInfTable(INFTABLE_163)) ? 0x505E : 0x505D);
|
||||||
} else {
|
} else {
|
||||||
return (this->unk_330 & 0x800) ? 0x5062 : ((gSaveContext.infTable[22] & 0x10) ? 0x5061 : 0x5060);
|
return (this->unk_330 & 0x800) ? 0x5062 : ((Flags_GetInfTable(INFTABLE_164)) ? 0x5061 : 0x5060);
|
||||||
}
|
}
|
||||||
case ENHY_TYPE_BJI_19:
|
case ENHY_TYPE_BJI_19:
|
||||||
return 0x7120;
|
return 0x7120;
|
||||||
@ -599,67 +599,67 @@ s16 func_80A70058(PlayState* play, Actor* thisx) {
|
|||||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||||
break;
|
break;
|
||||||
case 0x7016:
|
case 0x7016:
|
||||||
gSaveContext.infTable[12] |= 1;
|
Flags_SetInfTable(INFTABLE_C0);
|
||||||
break;
|
break;
|
||||||
case 0x7045:
|
case 0x7045:
|
||||||
gSaveContext.infTable[12] |= 2;
|
Flags_SetInfTable(INFTABLE_C1);
|
||||||
break;
|
break;
|
||||||
case 0x701B:
|
case 0x701B:
|
||||||
gSaveContext.infTable[12] |= 4;
|
Flags_SetInfTable(INFTABLE_C2);
|
||||||
break;
|
break;
|
||||||
case 0x7047:
|
case 0x7047:
|
||||||
gSaveContext.infTable[12] |= 8;
|
Flags_SetInfTable(INFTABLE_C3);
|
||||||
break;
|
break;
|
||||||
case 0x70EB:
|
case 0x70EB:
|
||||||
gSaveContext.infTable[12] |= 0x10;
|
Flags_SetInfTable(INFTABLE_C4);
|
||||||
break;
|
break;
|
||||||
case 0x7023:
|
case 0x7023:
|
||||||
gSaveContext.infTable[12] |= 0x20;
|
Flags_SetInfTable(INFTABLE_C5);
|
||||||
break;
|
break;
|
||||||
case 0x7021:
|
case 0x7021:
|
||||||
gSaveContext.infTable[12] |= 0x40;
|
Flags_SetInfTable(INFTABLE_C6);
|
||||||
break;
|
break;
|
||||||
case 0x7027:
|
case 0x7027:
|
||||||
gSaveContext.infTable[12] |= 0x80;
|
Flags_SetInfTable(INFTABLE_C7);
|
||||||
break;
|
break;
|
||||||
case 0x701D:
|
case 0x701D:
|
||||||
gSaveContext.infTable[12] |= 0x100;
|
Flags_SetInfTable(INFTABLE_C8);
|
||||||
break;
|
break;
|
||||||
case 0x7048:
|
case 0x7048:
|
||||||
gSaveContext.infTable[12] |= 0x200;
|
Flags_SetInfTable(INFTABLE_C9);
|
||||||
break;
|
break;
|
||||||
case 0x701F:
|
case 0x701F:
|
||||||
gSaveContext.infTable[12] |= 0x400;
|
Flags_SetInfTable(INFTABLE_CA);
|
||||||
break;
|
break;
|
||||||
case 0x7018:
|
case 0x7018:
|
||||||
gSaveContext.infTable[12] |= 0x2000;
|
Flags_SetInfTable(INFTABLE_CD);
|
||||||
break;
|
break;
|
||||||
case 0x70A4:
|
case 0x70A4:
|
||||||
gSaveContext.infTable[12] |= 0x1000;
|
Flags_SetInfTable(INFTABLE_CC);
|
||||||
break;
|
break;
|
||||||
case 0x5057:
|
case 0x5057:
|
||||||
gSaveContext.infTable[22] |= 1;
|
Flags_SetInfTable(INFTABLE_160);
|
||||||
break;
|
break;
|
||||||
case 0x5059:
|
case 0x5059:
|
||||||
gSaveContext.infTable[22] |= 2;
|
Flags_SetInfTable(INFTABLE_161);
|
||||||
break;
|
break;
|
||||||
case 0x505B:
|
case 0x505B:
|
||||||
gSaveContext.infTable[22] |= 4;
|
Flags_SetInfTable(INFTABLE_162);
|
||||||
break;
|
break;
|
||||||
case 0x505D:
|
case 0x505D:
|
||||||
gSaveContext.infTable[22] |= 8;
|
Flags_SetInfTable(INFTABLE_163);
|
||||||
break;
|
break;
|
||||||
case 0x5060:
|
case 0x5060:
|
||||||
gSaveContext.infTable[22] |= 0x10;
|
Flags_SetInfTable(INFTABLE_164);
|
||||||
break;
|
break;
|
||||||
case 0x508B:
|
case 0x508B:
|
||||||
gSaveContext.infTable[12] |= 0x800;
|
Flags_SetInfTable(INFTABLE_CB);
|
||||||
break;
|
break;
|
||||||
case 0x709E:
|
case 0x709E:
|
||||||
gSaveContext.dogParams = 0;
|
gSaveContext.dogParams = 0;
|
||||||
break;
|
break;
|
||||||
case 0x709F:
|
case 0x709F:
|
||||||
if (gSaveContext.infTable[25] & 2) { // Already brought the lost dog back
|
if (Flags_GetInfTable(INFTABLE_191)) { // Already brought the lost dog back
|
||||||
func_80A6F7CC(this, play, GI_RUPEE_BLUE);
|
func_80A6F7CC(this, play, GI_RUPEE_BLUE);
|
||||||
} else {
|
} else {
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
@ -869,7 +869,7 @@ s32 EnHy_ShouldSpawn(EnHy* this, PlayState* play) {
|
|||||||
return true;
|
return true;
|
||||||
} else if (IS_NIGHT) {
|
} else if (IS_NIGHT) {
|
||||||
return false;
|
return false;
|
||||||
} else if ((gSaveContext.eventChkInf[8] & 1) && !(gSaveContext.eventChkInf[4] & 0x20)) {
|
} else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
@ -1079,8 +1079,8 @@ void func_80A714C4(EnHy* this, PlayState* play) {
|
|||||||
void func_80A71530(EnHy* this, PlayState* play) {
|
void func_80A71530(EnHy* this, PlayState* play) {
|
||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
if (!(gSaveContext.infTable[25] & 2)) {
|
if (!Flags_GetInfTable(INFTABLE_191)) {
|
||||||
gSaveContext.infTable[25] |= 2;
|
Flags_SetInfTable(INFTABLE_191);
|
||||||
}
|
}
|
||||||
gSaveContext.dogParams = 0;
|
gSaveContext.dogParams = 0;
|
||||||
gSaveContext.dogIsLost = false;
|
gSaveContext.dogIsLost = false;
|
||||||
@ -1089,7 +1089,7 @@ void func_80A71530(EnHy* this, PlayState* play) {
|
|||||||
case GI_HEART_PIECE:
|
case GI_HEART_PIECE:
|
||||||
gSaveContext.dogParams = 0;
|
gSaveContext.dogParams = 0;
|
||||||
gSaveContext.dogIsLost = false;
|
gSaveContext.dogIsLost = false;
|
||||||
gSaveContext.infTable[25] |= 2;
|
Flags_SetInfTable(INFTABLE_191);
|
||||||
break;
|
break;
|
||||||
case GI_RUPEE_BLUE:
|
case GI_RUPEE_BLUE:
|
||||||
Rupees_ChangeBy(5);
|
Rupees_ChangeBy(5);
|
||||||
|
@ -1414,7 +1414,7 @@ void EnIk_Draw(Actor* thisx, PlayState* play) {
|
|||||||
|
|
||||||
void func_80A780D0(EnIk* this, PlayState* play) {
|
void func_80A780D0(EnIk* this, PlayState* play) {
|
||||||
if (this->actor.params == 0) {
|
if (this->actor.params == 0) {
|
||||||
if (!(gSaveContext.eventChkInf[3] & 0x800)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_BEGAN_NABOORU_BATTLE)) {
|
||||||
this->actor.update = EnIk_Update;
|
this->actor.update = EnIk_Update;
|
||||||
this->actor.draw = EnIk_Draw;
|
this->actor.draw = EnIk_Draw;
|
||||||
Actor_SetScale(&this->actor, 0.01f);
|
Actor_SetScale(&this->actor, 0.01f);
|
||||||
@ -1430,7 +1430,7 @@ void func_80A78160(EnIk* this, PlayState* play) {
|
|||||||
this->actor.update = func_80A75FA0;
|
this->actor.update = func_80A75FA0;
|
||||||
this->actor.draw = func_80A76798;
|
this->actor.draw = func_80A76798;
|
||||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE;
|
this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE;
|
||||||
gSaveContext.eventChkInf[3] |= 0x800;
|
Flags_SetEventChkInf(EVENTCHKINF_BEGAN_NABOORU_BATTLE);
|
||||||
Actor_SetScale(&this->actor, 0.012f);
|
Actor_SetScale(&this->actor, 0.012f);
|
||||||
func_80A7489C(this);
|
func_80A7489C(this);
|
||||||
}
|
}
|
||||||
@ -1464,7 +1464,7 @@ void func_80A781CC(Actor* thisx, PlayState* play) {
|
|||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gSaveContext.eventChkInf[3] |= 0x1000;
|
Flags_SetEventChkInf(EVENTCHKINF_FINISHED_NABOORU_BATTLE);
|
||||||
func_80A7735C(this, play);
|
func_80A7735C(this, play);
|
||||||
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_IRON_KNUCKLE_NABOORU]++;
|
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_IRON_KNUCKLE_NABOORU]++;
|
||||||
}
|
}
|
||||||
@ -1474,7 +1474,7 @@ void EnIk_Init(Actor* thisx, PlayState* play) {
|
|||||||
EnIk* this = (EnIk*)thisx;
|
EnIk* this = (EnIk*)thisx;
|
||||||
s32 flag = this->actor.params & 0xFF00;
|
s32 flag = this->actor.params & 0xFF00;
|
||||||
|
|
||||||
if (((this->actor.params & 0xFF) == 0 && (gSaveContext.eventChkInf[3] & 0x1000)) ||
|
if (((this->actor.params & 0xFF) == 0 && (Flags_GetEventChkInf(EVENTCHKINF_FINISHED_NABOORU_BATTLE))) ||
|
||||||
(flag != 0 && Flags_GetSwitch(play, flag >> 8))) {
|
(flag != 0 && Flags_GetSwitch(play, flag >> 8))) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
} else {
|
} else {
|
||||||
|
@ -112,14 +112,14 @@ static Gfx* sAdultEraDLs[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
u16 func_80A78FB0(PlayState* play) {
|
u16 func_80A78FB0(PlayState* play) {
|
||||||
if (gSaveContext.eventChkInf[1] & 0x10) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||||
if (gSaveContext.infTable[9] & 0x80) {
|
if (Flags_GetInfTable(INFTABLE_97)) {
|
||||||
return 0x2046;
|
return 0x2046;
|
||||||
} else {
|
} else {
|
||||||
return 0x2045;
|
return 0x2045;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gSaveContext.infTable[9] & 0x10) {
|
if (Flags_GetInfTable(INFTABLE_94)) {
|
||||||
return 0x2040;
|
return 0x2040;
|
||||||
} else {
|
} else {
|
||||||
return 0x203F;
|
return 0x203F;
|
||||||
@ -133,7 +133,7 @@ u16 func_80A79010(PlayState* play) {
|
|||||||
if (temp_v0 != 0) {
|
if (temp_v0 != 0) {
|
||||||
return temp_v0;
|
return temp_v0;
|
||||||
}
|
}
|
||||||
if (gSaveContext.eventChkInf[1] & 0x100) {
|
if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
|
||||||
if (IS_DAY) {
|
if (IS_DAY) {
|
||||||
return 0x205F;
|
return 0x205F;
|
||||||
} else {
|
} else {
|
||||||
@ -147,8 +147,8 @@ u16 func_80A79010(PlayState* play) {
|
|||||||
case 1:
|
case 1:
|
||||||
if (!(player->stateFlags1 & 0x800000)) {
|
if (!(player->stateFlags1 & 0x800000)) {
|
||||||
return 0x2036;
|
return 0x2036;
|
||||||
} else if (gSaveContext.eventChkInf[1] & 0x800) {
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO)) {
|
||||||
if (gSaveContext.infTable[10] & 4) {
|
if (Flags_GetInfTable(INFTABLE_A2)) {
|
||||||
return 0x2036;
|
return 0x2036;
|
||||||
} else {
|
} else {
|
||||||
return 0x2038;
|
return 0x2038;
|
||||||
@ -171,7 +171,7 @@ u16 func_80A79010(PlayState* play) {
|
|||||||
return 0x205B;
|
return 0x205B;
|
||||||
case 2:
|
case 2:
|
||||||
default:
|
default:
|
||||||
if (gSaveContext.infTable[0x9] & 0x400) {
|
if (Flags_GetInfTable(INFTABLE_SPOKE_TO_INGO_ONCE_AS_ADULT)) {
|
||||||
return 0x2031;
|
return 0x2031;
|
||||||
} else {
|
} else {
|
||||||
return 0x2030;
|
return 0x2030;
|
||||||
@ -197,14 +197,14 @@ s16 func_80A791CC(PlayState* play, Actor* thisx) {
|
|||||||
|
|
||||||
switch (thisx->textId) {
|
switch (thisx->textId) {
|
||||||
case 0x2045:
|
case 0x2045:
|
||||||
gSaveContext.infTable[9] |= 0x80;
|
Flags_SetInfTable(INFTABLE_97);
|
||||||
break;
|
break;
|
||||||
case 0x203E:
|
case 0x203E:
|
||||||
ret = NPC_TALK_STATE_ACTION;
|
ret = NPC_TALK_STATE_ACTION;
|
||||||
break;
|
break;
|
||||||
case 0x203F:
|
case 0x203F:
|
||||||
gSaveContext.eventChkInf[1] |= 2;
|
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_INGO_AT_RANCH_BEFORE_TALON_RETURNS);
|
||||||
gSaveContext.infTable[9] |= 0x10;
|
Flags_SetInfTable(INFTABLE_94);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -225,7 +225,7 @@ s16 func_80A7924C(PlayState* play, Actor* thisx) {
|
|||||||
this->actor.textId = 0x2034;
|
this->actor.textId = 0x2034;
|
||||||
}
|
}
|
||||||
Message_ContinueTextbox(play, this->actor.textId);
|
Message_ContinueTextbox(play, this->actor.textId);
|
||||||
gSaveContext.infTable[9] |= 0x400;
|
Flags_SetInfTable(INFTABLE_SPOKE_TO_INGO_ONCE_AS_ADULT);
|
||||||
break;
|
break;
|
||||||
case 0x2034:
|
case 0x2034:
|
||||||
if (play->msgCtx.choiceIndex == 1) {
|
if (play->msgCtx.choiceIndex == 1) {
|
||||||
@ -251,7 +251,7 @@ s16 func_80A7924C(PlayState* play, Actor* thisx) {
|
|||||||
} else {
|
} else {
|
||||||
this->actor.textId = 0x2039;
|
this->actor.textId = 0x2039;
|
||||||
Message_ContinueTextbox(play, this->actor.textId);
|
Message_ContinueTextbox(play, this->actor.textId);
|
||||||
gSaveContext.infTable[10] |= 4;
|
Flags_SetInfTable(INFTABLE_A2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x205B:
|
case 0x205B:
|
||||||
@ -366,34 +366,34 @@ s32 func_80A7975C(EnIn* this, PlayState* play) {
|
|||||||
|
|
||||||
s32 func_80A79830(EnIn* this, PlayState* play) {
|
s32 func_80A79830(EnIn* this, PlayState* play) {
|
||||||
if (play->sceneNum == SCENE_SPOT20 && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 &&
|
if (play->sceneNum == SCENE_SPOT20 && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 &&
|
||||||
!(gSaveContext.eventChkInf[1] & 0x10)) {
|
!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (play->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 &&
|
if (play->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 &&
|
||||||
(gSaveContext.eventChkInf[1] & 0x10)) {
|
(Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE))) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (play->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_NIGHT) {
|
if (play->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_NIGHT) {
|
||||||
if ((this->actor.shape.rot.z == 2) && !(gSaveContext.eventChkInf[1] & 0x10)) {
|
if ((this->actor.shape.rot.z == 2) && !Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if ((this->actor.shape.rot.z == 4) && (gSaveContext.eventChkInf[1] & 0x10)) {
|
if ((this->actor.shape.rot.z == 4) && (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE))) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (play->sceneNum == SCENE_SPOT20 && LINK_IS_ADULT && IS_DAY) {
|
if (play->sceneNum == SCENE_SPOT20 && LINK_IS_ADULT && IS_DAY) {
|
||||||
if ((this->actor.shape.rot.z == 5) && !(gSaveContext.eventChkInf[1] & 0x100)) {
|
if ((this->actor.shape.rot.z == 5) && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if ((this->actor.shape.rot.z == 7) && (gSaveContext.eventChkInf[1] & 0x100)) {
|
if ((this->actor.shape.rot.z == 7) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) {
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (play->sceneNum == SCENE_SOUKO && LINK_IS_ADULT && IS_NIGHT) {
|
if (play->sceneNum == SCENE_SOUKO && LINK_IS_ADULT && IS_NIGHT) {
|
||||||
if (this->actor.shape.rot.z == 6 && !(gSaveContext.eventChkInf[1] & 0x100)) {
|
if (this->actor.shape.rot.z == 6 && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
if (this->actor.shape.rot.z == 8 && (gSaveContext.eventChkInf[1] & 0x100)) {
|
if (this->actor.shape.rot.z == 8 && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -534,7 +534,7 @@ void func_80A79FB0(EnIn* this, PlayState* play) {
|
|||||||
case 3:
|
case 3:
|
||||||
EnIn_ChangeAnim(this, ENIN_ANIM_7);
|
EnIn_ChangeAnim(this, ENIN_ANIM_7);
|
||||||
this->actionFunc = func_80A7A4BC;
|
this->actionFunc = func_80A7A4BC;
|
||||||
if (!(gSaveContext.eventChkInf[1] & 0x100)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
|
||||||
this->actor.params = 5;
|
this->actor.params = 5;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -644,7 +644,7 @@ void func_80A7A4C8(EnIn* this, PlayState* play) {
|
|||||||
func_80A79BAC(this, play, 1, 0x20);
|
func_80A79BAC(this, play, 1, 0x20);
|
||||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0001;
|
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0001;
|
||||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||||
gSaveContext.infTable[10] &= ~4;
|
Flags_UnsetInfTable(INFTABLE_A2);
|
||||||
Environment_ForcePlaySequence(NA_BGM_HORSE);
|
Environment_ForcePlaySequence(NA_BGM_HORSE);
|
||||||
play->msgCtx.stateTimer = 0;
|
play->msgCtx.stateTimer = 0;
|
||||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||||
@ -657,8 +657,8 @@ void func_80A7A568(EnIn* this, PlayState* play) {
|
|||||||
s32 phi_a2;
|
s32 phi_a2;
|
||||||
s32 phi_a3;
|
s32 phi_a3;
|
||||||
|
|
||||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (player->stateFlags1 & 0x800000)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO) && (player->stateFlags1 & 0x800000)) {
|
||||||
gSaveContext.infTable[10] |= 0x800;
|
Flags_SetInfTable(INFTABLE_AB);
|
||||||
}
|
}
|
||||||
if (gSaveContext.timer1State == 10) {
|
if (gSaveContext.timer1State == 10) {
|
||||||
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||||
@ -680,10 +680,10 @@ void func_80A7A568(EnIn* this, PlayState* play) {
|
|||||||
phi_a3 = 2;
|
phi_a3 = 2;
|
||||||
} else {
|
} else {
|
||||||
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||||
if (!(gSaveContext.eventChkInf[1] & 0x800)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO)) {
|
||||||
if (gSaveContext.infTable[10] & 0x800) {
|
if (Flags_GetInfTable(INFTABLE_AB)) {
|
||||||
gSaveContext.eventChkInf[1] |= 0x800;
|
Flags_SetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO);
|
||||||
gSaveContext.infTable[10] |= 0x800;
|
Flags_SetInfTable(INFTABLE_AB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gSaveContext.eventInf[0] &= ~0xF;
|
gSaveContext.eventInf[0] &= ~0xF;
|
||||||
@ -892,9 +892,9 @@ void func_80A7B024(EnIn* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
player->actor.freezeTimer = 10;
|
player->actor.freezeTimer = 10;
|
||||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (gSaveContext.infTable[10] & 0x800)) {
|
if (!Flags_GetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO) && (Flags_GetInfTable(INFTABLE_AB))) {
|
||||||
gSaveContext.eventChkInf[1] |= 0x800;
|
Flags_SetEventChkInf(EVENTCHKINF_RENTED_HORSE_FROM_INGO);
|
||||||
gSaveContext.infTable[10] |= 0x800;
|
Flags_SetInfTable(INFTABLE_AB);
|
||||||
}
|
}
|
||||||
func_80A79BAC(this, play, 0, 0x26);
|
func_80A79BAC(this, play, 0, 0x26);
|
||||||
gSaveContext.eventInf[0] = gSaveContext.eventInf[0] & ~0xF;
|
gSaveContext.eventInf[0] = gSaveContext.eventInf[0] & ~0xF;
|
||||||
|
@ -97,7 +97,7 @@ void EnJj_Init(Actor* thisx, PlayState* play2) {
|
|||||||
this->extraBlinkCounter = 0;
|
this->extraBlinkCounter = 0;
|
||||||
this->extraBlinkTotal = 0;
|
this->extraBlinkTotal = 0;
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[3] & 0x400) { // Fish given
|
if (Flags_GetEventChkInf(EVENTCHKINF_OFFERED_FISH_TO_JABU_JABU)) { // Fish given
|
||||||
EnJj_SetupAction(this, EnJj_WaitToOpenMouth);
|
EnJj_SetupAction(this, EnJj_WaitToOpenMouth);
|
||||||
} else {
|
} else {
|
||||||
EnJj_SetupAction(this, EnJj_WaitForFish);
|
EnJj_SetupAction(this, EnJj_WaitForFish);
|
||||||
@ -222,7 +222,7 @@ void EnJj_BeginCutscene(EnJj* this, PlayState* play) {
|
|||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
func_8003EBF8(play, &play->colCtx.dyna, bodyCollisionActor->bgId);
|
func_8003EBF8(play, &play->colCtx.dyna, bodyCollisionActor->bgId);
|
||||||
func_8005B1A4(GET_ACTIVE_CAM(play));
|
func_8005B1A4(GET_ACTIVE_CAM(play));
|
||||||
gSaveContext.eventChkInf[3] |= 0x400;
|
Flags_SetEventChkInf(EVENTCHKINF_OFFERED_FISH_TO_JABU_JABU);
|
||||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
|
|||||||
this->actionFunc = func_80A904D8;
|
this->actionFunc = func_80A904D8;
|
||||||
} else if ((this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
|
} else if ((this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
|
||||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y) &&
|
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y) &&
|
||||||
(gSaveContext.eventChkInf[9] & 0x1000)) {
|
(Flags_GetEventChkInf(EVENTCHKINF_PLAYED_SONG_FOR_SCARECROW_AS_ADULT))) {
|
||||||
|
|
||||||
this->unk_194 = 0;
|
this->unk_194 = 0;
|
||||||
if (play->msgCtx.ocarinaMode == OCARINA_MODE_0B) {
|
if (play->msgCtx.ocarinaMode == OCARINA_MODE_0B) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user