mirror of
https://github.com/zeldaret/oot.git
synced 2025-06-08 17:41:56 +00:00
Defines for SaveContext
flags (eventChkInf
, itemGetInf
, infTable
, eventInf
) (#1094)
* script-assisted `itemGetInf` flags * comment near non-trivial `itemGetInf` usage * Run formatter * Try something with the itemgetinf flags that can't use the packed value * Add defines for `eventChkInf` (direct access) * Add defines for `eventChkInf` (access through `Flags_GetEventChkInf`) * Add defines for `eventChkInf` (access through `Flags_SetEventChkInf`) * Add defines for `infTable` (direct access) * Add defines for `infTable` (used by `Flags_GetInfTable`) * Add defines for `infTable` (used by `Flags_SetInfTable`) * Add defines for `eventInf` * parenthesis cleanup near `GET_EVENTCHKINF` usage * parenthesis cleanup near `GET_ITEMGETINF` usage * parenthesis cleanup near `GET_INFTABLE` usage * fixup one `eventInf` usage * parenthesis cleanup near `GET_EVENTINF` usage * parenthesis cleanup near `Flags_GetEventChkInf` usage * slight `z64save.h` formatting improvement * Improve itemGetInf flags in z_bg_dy_yoseizo * Questionable improvement in z_en_ge2 * Questionable improvement in z_en_daiku * Questionable improvement in z_en_mu * Run formatter * Parentheses around `gSaveContext` macros arguments * Move individual flags define to the end of z64save.h, and improve comments separating the groups
This commit is contained in:
parent
16790bc253
commit
6336df5fcd
146 changed files with 1931 additions and 1315 deletions
|
@ -57,6 +57,21 @@
|
|||
|
||||
#define HIGH_SCORE(score) (gSaveContext.highScores[score])
|
||||
|
||||
#define GET_EVENTCHKINF(flag) (gSaveContext.eventChkInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
||||
#define SET_EVENTCHKINF(flag) (gSaveContext.eventChkInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
||||
#define CLEAR_EVENTCHKINF(flag) (gSaveContext.eventChkInf[(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 GET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
||||
#define SET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
||||
#define CLEAR_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
|
||||
|
||||
#define GET_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
||||
#define SET_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
||||
#define CLEAR_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
|
||||
|
||||
#define B_BTN_ITEM ((gSaveContext.buttonStatus[0] == ITEM_NONE) \
|
||||
? ITEM_NONE \
|
||||
: (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) \
|
||||
|
|
|
@ -217,4 +217,471 @@ typedef enum {
|
|||
/* 1 */ LINK_AGE_CHILD
|
||||
} LinkAge;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* SaveContext flags
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* SaveContext.eventChkInf
|
||||
*/
|
||||
|
||||
#define EVENTCHKINF_02 0x02
|
||||
#define EVENTCHKINF_03 0x03
|
||||
#define EVENTCHKINF_04 0x04
|
||||
#define EVENTCHKINF_05 0x05
|
||||
#define EVENTCHKINF_07 0x07
|
||||
#define EVENTCHKINF_09 0x09
|
||||
#define EVENTCHKINF_0A 0x0A
|
||||
#define EVENTCHKINF_0B 0x0B
|
||||
#define EVENTCHKINF_0C 0x0C
|
||||
#define EVENTCHKINF_0F 0x0F
|
||||
#define EVENTCHKINF_10 0x10
|
||||
#define EVENTCHKINF_11 0x11
|
||||
#define EVENTCHKINF_12 0x12
|
||||
#define EVENTCHKINF_13 0x13
|
||||
#define EVENTCHKINF_14 0x14
|
||||
#define EVENTCHKINF_15 0x15
|
||||
#define EVENTCHKINF_16 0x16
|
||||
#define EVENTCHKINF_18 0x18
|
||||
#define EVENTCHKINF_1B 0x1B
|
||||
#define EVENTCHKINF_1C 0x1C
|
||||
#define EVENTCHKINF_1D 0x1D
|
||||
#define EVENTCHKINF_1E 0x1E
|
||||
#define EVENTCHKINF_20 0x20
|
||||
#define EVENTCHKINF_21 0x21
|
||||
#define EVENTCHKINF_22 0x22
|
||||
#define EVENTCHKINF_23 0x23
|
||||
#define EVENTCHKINF_25 0x25
|
||||
#define EVENTCHKINF_2A 0x2A
|
||||
#define EVENTCHKINF_2B 0x2B
|
||||
#define EVENTCHKINF_2C 0x2C
|
||||
#define EVENTCHKINF_2D 0x2D
|
||||
#define EVENTCHKINF_2F 0x2F
|
||||
#define EVENTCHKINF_30 0x30
|
||||
#define EVENTCHKINF_31 0x31
|
||||
#define EVENTCHKINF_32 0x32
|
||||
#define EVENTCHKINF_33 0x33
|
||||
#define EVENTCHKINF_37 0x37
|
||||
#define EVENTCHKINF_38 0x38
|
||||
#define EVENTCHKINF_39 0x39
|
||||
#define EVENTCHKINF_3A 0x3A
|
||||
#define EVENTCHKINF_3B 0x3B
|
||||
#define EVENTCHKINF_3C 0x3C
|
||||
|
||||
// 0x40
|
||||
#define EVENTCHKINF_40_INDEX 4
|
||||
#define EVENTCHKINF_40_SHIFT 0
|
||||
#define EVENTCHKINF_40_MASK (1 << EVENTCHKINF_40_SHIFT)
|
||||
#define EVENTCHKINF_40 ((EVENTCHKINF_40_INDEX << 4) | EVENTCHKINF_40_SHIFT)
|
||||
|
||||
#define EVENTCHKINF_41 0x41
|
||||
#define EVENTCHKINF_42 0x42
|
||||
#define EVENTCHKINF_43 0x43
|
||||
#define EVENTCHKINF_45 0x45
|
||||
#define EVENTCHKINF_48 0x48
|
||||
#define EVENTCHKINF_49 0x49
|
||||
#define EVENTCHKINF_4A 0x4A
|
||||
#define EVENTCHKINF_4B 0x4B
|
||||
#define EVENTCHKINF_4C 0x4C
|
||||
#define EVENTCHKINF_4D 0x4D
|
||||
#define EVENTCHKINF_4E 0x4E
|
||||
#define EVENTCHKINF_4F 0x4F
|
||||
#define EVENTCHKINF_50 0x50
|
||||
#define EVENTCHKINF_51 0x51
|
||||
#define EVENTCHKINF_52 0x52
|
||||
#define EVENTCHKINF_54 0x54
|
||||
#define EVENTCHKINF_55 0x55
|
||||
#define EVENTCHKINF_59 0x59
|
||||
#define EVENTCHKINF_5A 0x5A
|
||||
#define EVENTCHKINF_5B 0x5B
|
||||
#define EVENTCHKINF_5C 0x5C
|
||||
#define EVENTCHKINF_65 0x65
|
||||
#define EVENTCHKINF_67 0x67
|
||||
#define EVENTCHKINF_68 0x68
|
||||
#define EVENTCHKINF_69 0x69
|
||||
#define EVENTCHKINF_6A 0x6A
|
||||
|
||||
// 0x6B
|
||||
#define EVENTCHKINF_6B_INDEX 6
|
||||
#define EVENTCHKINF_6B_SHIFT 11
|
||||
#define EVENTCHKINF_6B_MASK (1 << EVENTCHKINF_6B_SHIFT)
|
||||
#define EVENTCHKINF_6B ((EVENTCHKINF_6B_INDEX << 4) | EVENTCHKINF_6B_SHIFT)
|
||||
|
||||
#define EVENTCHKINF_6E 0x6E
|
||||
#define EVENTCHKINF_6F 0x6F
|
||||
#define EVENTCHKINF_70 0x70
|
||||
#define EVENTCHKINF_71 0x71
|
||||
#define EVENTCHKINF_72 0x72
|
||||
#define EVENTCHKINF_73 0x73
|
||||
#define EVENTCHKINF_74 0x74
|
||||
#define EVENTCHKINF_75 0x75
|
||||
#define EVENTCHKINF_76 0x76
|
||||
#define EVENTCHKINF_77 0x77
|
||||
#define EVENTCHKINF_78 0x78
|
||||
#define EVENTCHKINF_80 0x80
|
||||
#define EVENTCHKINF_82 0x82
|
||||
#define EVENTCHKINF_8C 0x8C
|
||||
#define EVENTCHKINF_8D 0x8D
|
||||
#define EVENTCHKINF_8E 0x8E
|
||||
#define EVENTCHKINF_8F 0x8F
|
||||
|
||||
// 0x90-0x93
|
||||
#define EVENTCHKINF_90_91_92_93_INDEX 9
|
||||
#define EVENTCHKINF_90_SHIFT 0
|
||||
#define EVENTCHKINF_91_SHIFT 1
|
||||
#define EVENTCHKINF_92_SHIFT 2
|
||||
#define EVENTCHKINF_93_SHIFT 3
|
||||
#define EVENTCHKINF_90_MASK (1 << EVENTCHKINF_90_SHIFT)
|
||||
#define EVENTCHKINF_91_MASK (1 << EVENTCHKINF_91_SHIFT)
|
||||
#define EVENTCHKINF_92_MASK (1 << EVENTCHKINF_92_SHIFT)
|
||||
#define EVENTCHKINF_93_MASK (1 << EVENTCHKINF_93_SHIFT)
|
||||
#define EVENTCHKINF_90 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_90_SHIFT)
|
||||
#define EVENTCHKINF_91 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_91_SHIFT)
|
||||
#define EVENTCHKINF_92 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_92_SHIFT)
|
||||
#define EVENTCHKINF_93 ((EVENTCHKINF_90_91_92_93_INDEX << 4) | EVENTCHKINF_93_SHIFT)
|
||||
|
||||
#define EVENTCHKINF_94 0x94
|
||||
#define EVENTCHKINF_95 0x95
|
||||
#define EVENTCHKINF_96 0x96
|
||||
#define EVENTCHKINF_9C 0x9C
|
||||
#define EVENTCHKINF_A0 0xA0
|
||||
#define EVENTCHKINF_A1 0xA1
|
||||
#define EVENTCHKINF_A3 0xA3
|
||||
#define EVENTCHKINF_A4 0xA4
|
||||
#define EVENTCHKINF_A5 0xA5
|
||||
#define EVENTCHKINF_A6 0xA6
|
||||
#define EVENTCHKINF_A7 0xA7
|
||||
#define EVENTCHKINF_A8 0xA8
|
||||
#define EVENTCHKINF_A9 0xA9
|
||||
#define EVENTCHKINF_AA 0xAA
|
||||
#define EVENTCHKINF_AC 0xAC
|
||||
#define EVENTCHKINF_AD 0xAD
|
||||
#define EVENTCHKINF_B0 0xB0
|
||||
#define EVENTCHKINF_B1 0xB1
|
||||
#define EVENTCHKINF_B2 0xB2
|
||||
#define EVENTCHKINF_B3 0xB3
|
||||
#define EVENTCHKINF_B4 0xB4
|
||||
#define EVENTCHKINF_B5 0xB5
|
||||
#define EVENTCHKINF_B6 0xB6
|
||||
#define EVENTCHKINF_B7 0xB7
|
||||
#define EVENTCHKINF_B8 0xB8
|
||||
#define EVENTCHKINF_B9 0xB9
|
||||
#define EVENTCHKINF_BA 0xBA
|
||||
#define EVENTCHKINF_BB 0xBB
|
||||
#define EVENTCHKINF_BC 0xBC
|
||||
#define EVENTCHKINF_BD 0xBD
|
||||
#define EVENTCHKINF_BE 0xBE
|
||||
#define EVENTCHKINF_BF 0xBF
|
||||
#define EVENTCHKINF_C0 0xC0
|
||||
#define EVENTCHKINF_C1 0xC1
|
||||
#define EVENTCHKINF_C3 0xC3
|
||||
#define EVENTCHKINF_C4 0xC4
|
||||
#define EVENTCHKINF_C5 0xC5
|
||||
#define EVENTCHKINF_C6 0xC6
|
||||
#define EVENTCHKINF_C7 0xC7
|
||||
#define EVENTCHKINF_C8 0xC8
|
||||
#define EVENTCHKINF_C9 0xC9
|
||||
|
||||
// 0xD0-0xD6
|
||||
#define EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX 13
|
||||
#define EVENTCHKINF_D0_SHIFT 0
|
||||
#define EVENTCHKINF_D1_SHIFT 1
|
||||
#define EVENTCHKINF_D2_SHIFT 2
|
||||
#define EVENTCHKINF_D3_SHIFT 3
|
||||
#define EVENTCHKINF_D4_SHIFT 4
|
||||
#define EVENTCHKINF_D5_SHIFT 5
|
||||
#define EVENTCHKINF_D6_SHIFT 6
|
||||
#define EVENTCHKINF_D0_MASK (1 << EVENTCHKINF_D0_SHIFT)
|
||||
#define EVENTCHKINF_D1_MASK (1 << EVENTCHKINF_D1_SHIFT)
|
||||
#define EVENTCHKINF_D2_MASK (1 << EVENTCHKINF_D2_SHIFT)
|
||||
#define EVENTCHKINF_D3_MASK (1 << EVENTCHKINF_D3_SHIFT)
|
||||
#define EVENTCHKINF_D4_MASK (1 << EVENTCHKINF_D4_SHIFT)
|
||||
#define EVENTCHKINF_D5_MASK (1 << EVENTCHKINF_D5_SHIFT)
|
||||
#define EVENTCHKINF_D6_MASK (1 << EVENTCHKINF_D6_SHIFT)
|
||||
#define EVENTCHKINF_D0 ((EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX << 4) | EVENTCHKINF_D0_SHIFT)
|
||||
#define EVENTCHKINF_D1 ((EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX << 4) | EVENTCHKINF_D1_SHIFT)
|
||||
#define EVENTCHKINF_D2 ((EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX << 4) | EVENTCHKINF_D2_SHIFT)
|
||||
#define EVENTCHKINF_D3 ((EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX << 4) | EVENTCHKINF_D3_SHIFT)
|
||||
#define EVENTCHKINF_D4 ((EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX << 4) | EVENTCHKINF_D4_SHIFT)
|
||||
#define EVENTCHKINF_D5 ((EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX << 4) | EVENTCHKINF_D5_SHIFT)
|
||||
#define EVENTCHKINF_D6 ((EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX << 4) | EVENTCHKINF_D6_SHIFT)
|
||||
|
||||
// 0xDA-0xDE
|
||||
#define EVENTCHKINF_DA_DB_DC_DD_DE_INDEX 13
|
||||
#define EVENTCHKINF_DA_MASK (1 << 10)
|
||||
#define EVENTCHKINF_DB_MASK (1 << 11)
|
||||
#define EVENTCHKINF_DC_MASK (1 << 12)
|
||||
#define EVENTCHKINF_DD_MASK (1 << 13)
|
||||
#define EVENTCHKINF_DE_MASK (1 << 14)
|
||||
|
||||
|
||||
/*
|
||||
* SaveContext.itemGetInf
|
||||
*/
|
||||
|
||||
#define ITEMGETINF_02 0x02
|
||||
#define ITEMGETINF_03 0x03
|
||||
#define ITEMGETINF_04 0x04
|
||||
#define ITEMGETINF_05 0x05
|
||||
#define ITEMGETINF_06 0x06
|
||||
#define ITEMGETINF_07 0x07
|
||||
#define ITEMGETINF_08 0x08
|
||||
#define ITEMGETINF_09 0x09
|
||||
#define ITEMGETINF_0A 0x0A
|
||||
#define ITEMGETINF_0B 0x0B
|
||||
#define ITEMGETINF_0C 0x0C
|
||||
#define ITEMGETINF_0D 0x0D
|
||||
#define ITEMGETINF_0E 0x0E
|
||||
#define ITEMGETINF_0F 0x0F
|
||||
#define ITEMGETINF_10 0x10
|
||||
#define ITEMGETINF_11 0x11
|
||||
#define ITEMGETINF_12 0x12
|
||||
#define ITEMGETINF_13 0x13
|
||||
#define ITEMGETINF_15 0x15
|
||||
#define ITEMGETINF_16 0x16
|
||||
#define ITEMGETINF_17 0x17
|
||||
|
||||
// 0x18-0x1A
|
||||
#define ITEMGETINF_18_19_1A_INDEX 1
|
||||
#define ITEMGETINF_18_SHIFT 8
|
||||
#define ITEMGETINF_19_SHIFT 9
|
||||
#define ITEMGETINF_1A_SHIFT 10
|
||||
#define ITEMGETINF_18_MASK (1 << ITEMGETINF_18_SHIFT)
|
||||
#define ITEMGETINF_19_MASK (1 << ITEMGETINF_19_SHIFT)
|
||||
#define ITEMGETINF_1A_MASK (1 << ITEMGETINF_1A_SHIFT)
|
||||
#define ITEMGETINF_18 ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_18_SHIFT)
|
||||
#define ITEMGETINF_19 ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_19_SHIFT)
|
||||
#define ITEMGETINF_1A ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_1A_SHIFT)
|
||||
|
||||
#define ITEMGETINF_1B 0x1B
|
||||
#define ITEMGETINF_1C 0x1C
|
||||
#define ITEMGETINF_1D 0x1D
|
||||
#define ITEMGETINF_1E 0x1E
|
||||
#define ITEMGETINF_1F 0x1F
|
||||
#define ITEMGETINF_23 0x23
|
||||
#define ITEMGETINF_24 0x24
|
||||
#define ITEMGETINF_25 0x25
|
||||
#define ITEMGETINF_26 0x26
|
||||
#define ITEMGETINF_2A 0x2A
|
||||
#define ITEMGETINF_2C 0x2C
|
||||
#define ITEMGETINF_2E 0x2E
|
||||
#define ITEMGETINF_30 0x30
|
||||
#define ITEMGETINF_31 0x31
|
||||
#define ITEMGETINF_38 0x38
|
||||
#define ITEMGETINF_39 0x39
|
||||
#define ITEMGETINF_3A 0x3A
|
||||
#define ITEMGETINF_3B 0x3B
|
||||
#define ITEMGETINF_3F 0x3F
|
||||
|
||||
|
||||
/*
|
||||
* SaveContext.infTable
|
||||
*/
|
||||
|
||||
#define INFTABLE_00 0x00
|
||||
#define INFTABLE_01 0x01
|
||||
#define INFTABLE_03 0x03
|
||||
#define INFTABLE_05 0x05
|
||||
#define INFTABLE_0C 0x0C
|
||||
#define INFTABLE_0E 0x0E
|
||||
#define INFTABLE_10 0x10
|
||||
#define INFTABLE_15 0x15
|
||||
#define INFTABLE_17 0x17
|
||||
#define INFTABLE_19 0x19
|
||||
#define INFTABLE_1E 0x1E
|
||||
#define INFTABLE_22 0x22
|
||||
#define INFTABLE_24 0x24
|
||||
#define INFTABLE_26 0x26
|
||||
#define INFTABLE_28 0x28
|
||||
#define INFTABLE_2A 0x2A
|
||||
#define INFTABLE_2B 0x2B
|
||||
#define INFTABLE_2E 0x2E
|
||||
#define INFTABLE_2F 0x2F
|
||||
#define INFTABLE_30 0x30
|
||||
#define INFTABLE_41 0x41
|
||||
#define INFTABLE_47 0x47
|
||||
#define INFTABLE_51 0x51
|
||||
#define INFTABLE_59 0x59
|
||||
#define INFTABLE_61 0x61
|
||||
#define INFTABLE_66 0x66
|
||||
#define INFTABLE_6A 0x6A
|
||||
#define INFTABLE_6C 0x6C
|
||||
#define INFTABLE_71 0x71
|
||||
#define INFTABLE_76 0x76
|
||||
#define INFTABLE_77 0x77
|
||||
#define INFTABLE_7E 0x7E
|
||||
#define INFTABLE_84 0x84
|
||||
#define INFTABLE_85 0x85
|
||||
#define INFTABLE_8B 0x8B
|
||||
#define INFTABLE_8C 0x8C
|
||||
#define INFTABLE_8D 0x8D
|
||||
#define INFTABLE_8E 0x8E
|
||||
#define INFTABLE_94 0x94
|
||||
#define INFTABLE_97 0x97
|
||||
#define INFTABLE_9A 0x9A
|
||||
#define INFTABLE_A2 0xA2
|
||||
#define INFTABLE_AB 0xAB
|
||||
#define INFTABLE_B0 0xB0
|
||||
#define INFTABLE_B1 0xB1
|
||||
#define INFTABLE_B4 0xB4
|
||||
#define INFTABLE_B6 0xB6
|
||||
#define INFTABLE_B7 0xB7
|
||||
#define INFTABLE_B8 0xB8
|
||||
#define INFTABLE_B9 0xB9
|
||||
#define INFTABLE_BC 0xBC
|
||||
#define INFTABLE_C0 0xC0
|
||||
#define INFTABLE_C1 0xC1
|
||||
#define INFTABLE_C2 0xC2
|
||||
#define INFTABLE_C3 0xC3
|
||||
#define INFTABLE_C4 0xC4
|
||||
#define INFTABLE_C5 0xC5
|
||||
#define INFTABLE_C6 0xC6
|
||||
#define INFTABLE_C7 0xC7
|
||||
#define INFTABLE_C8 0xC8
|
||||
#define INFTABLE_C9 0xC9
|
||||
#define INFTABLE_CA 0xCA
|
||||
#define INFTABLE_CB 0xCB
|
||||
#define INFTABLE_CC 0xCC
|
||||
#define INFTABLE_CD 0xCD
|
||||
#define INFTABLE_CE 0xCE
|
||||
#define INFTABLE_D0 0xD0
|
||||
#define INFTABLE_D2 0xD2
|
||||
#define INFTABLE_D4 0xD4
|
||||
#define INFTABLE_D6 0xD6
|
||||
#define INFTABLE_D8 0xD8
|
||||
#define INFTABLE_D9 0xD9
|
||||
#define INFTABLE_E0 0xE0
|
||||
#define INFTABLE_E3 0xE3
|
||||
#define INFTABLE_E6 0xE6
|
||||
#define INFTABLE_EB 0xEB
|
||||
#define INFTABLE_F0 0xF0
|
||||
#define INFTABLE_F4 0xF4
|
||||
#define INFTABLE_F8 0xF8
|
||||
#define INFTABLE_FC 0xFC
|
||||
#define INFTABLE_109 0x109
|
||||
#define INFTABLE_10A 0x10A
|
||||
#define INFTABLE_10B 0x10B
|
||||
#define INFTABLE_10C 0x10C
|
||||
#define INFTABLE_10D 0x10D
|
||||
#define INFTABLE_10E 0x10E
|
||||
#define INFTABLE_10F 0x10F
|
||||
#define INFTABLE_113 0x113
|
||||
#define INFTABLE_11A 0x11A
|
||||
#define INFTABLE_11E 0x11E
|
||||
#define INFTABLE_124 0x124
|
||||
#define INFTABLE_129 0x129
|
||||
#define INFTABLE_12A 0x12A
|
||||
#define INFTABLE_138 0x138
|
||||
#define INFTABLE_139 0x139
|
||||
#define INFTABLE_140 0x140
|
||||
#define INFTABLE_141 0x141
|
||||
#define INFTABLE_142 0x142
|
||||
#define INFTABLE_143 0x143
|
||||
#define INFTABLE_144 0x144
|
||||
#define INFTABLE_145 0x145
|
||||
#define INFTABLE_146 0x146
|
||||
#define INFTABLE_147 0x147
|
||||
#define INFTABLE_160 0x160
|
||||
#define INFTABLE_161 0x161
|
||||
#define INFTABLE_162 0x162
|
||||
#define INFTABLE_163 0x163
|
||||
#define INFTABLE_164 0x164
|
||||
#define INFTABLE_166 0x166
|
||||
#define INFTABLE_16A 0x16A
|
||||
#define INFTABLE_16C 0x16C
|
||||
#define INFTABLE_170 0x170
|
||||
#define INFTABLE_171 0x171
|
||||
#define INFTABLE_172 0x172
|
||||
#define INFTABLE_176 0x176
|
||||
#define INFTABLE_178 0x178
|
||||
#define INFTABLE_17C 0x17C
|
||||
#define INFTABLE_17F 0x17F
|
||||
#define INFTABLE_190 0x190
|
||||
#define INFTABLE_191 0x191
|
||||
#define INFTABLE_192 0x192
|
||||
#define INFTABLE_193 0x193
|
||||
#define INFTABLE_195 0x195
|
||||
#define INFTABLE_196 0x196
|
||||
#define INFTABLE_197 0x197
|
||||
#define INFTABLE_198 0x198
|
||||
|
||||
// 0x199-0x19F
|
||||
#define INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX 25
|
||||
#define INFTABLE_199_MASK (1 << 9)
|
||||
#define INFTABLE_19A_MASK (1 << 10)
|
||||
#define INFTABLE_19B_MASK (1 << 11)
|
||||
#define INFTABLE_19C_MASK (1 << 12)
|
||||
#define INFTABLE_19D_MASK (1 << 13)
|
||||
#define INFTABLE_19E_MASK (1 << 14)
|
||||
#define INFTABLE_19F_MASK (1 << 15)
|
||||
|
||||
// 0x1A0-0x1AF
|
||||
#define INFTABLE_1AX_INDEX 26
|
||||
#define INFTABLE_1A0_SHIFT 0
|
||||
#define INFTABLE_1A1_SHIFT 1
|
||||
#define INFTABLE_1A2_SHIFT 2
|
||||
#define INFTABLE_1A3_SHIFT 3
|
||||
#define INFTABLE_1A4_SHIFT 4
|
||||
#define INFTABLE_1A5_SHIFT 5
|
||||
#define INFTABLE_1A6_SHIFT 6
|
||||
#define INFTABLE_1A7_SHIFT 7
|
||||
#define INFTABLE_1A8_SHIFT 8
|
||||
#define INFTABLE_1A9_SHIFT 9
|
||||
#define INFTABLE_1AB_SHIFT 11
|
||||
#define INFTABLE_1AD_SHIFT 13
|
||||
|
||||
// 0x1D0-0x1DF
|
||||
#define INFTABLE_1DX_INDEX 29
|
||||
|
||||
|
||||
/*
|
||||
* SaveContext.eventInf
|
||||
*/
|
||||
|
||||
// 0x00-0x0F
|
||||
#define EVENTINF_0X_INDEX 0
|
||||
#define EVENTINF_00_SHIFT 0
|
||||
#define EVENTINF_01_SHIFT 1
|
||||
#define EVENTINF_02_SHIFT 2
|
||||
#define EVENTINF_03_SHIFT 3
|
||||
#define EVENTINF_04_SHIFT 4
|
||||
#define EVENTINF_05_SHIFT 5
|
||||
#define EVENTINF_06_SHIFT 6
|
||||
#define EVENTINF_08_SHIFT 8
|
||||
#define EVENTINF_0A_SHIFT 10
|
||||
#define EVENTINF_0F_SHIFT 15
|
||||
#define EVENTINF_00_MASK (1 << EVENTINF_00_SHIFT)
|
||||
#define EVENTINF_01_MASK (1 << EVENTINF_01_SHIFT)
|
||||
#define EVENTINF_02_MASK (1 << EVENTINF_02_SHIFT)
|
||||
#define EVENTINF_03_MASK (1 << EVENTINF_03_SHIFT)
|
||||
#define EVENTINF_04_MASK (1 << EVENTINF_04_SHIFT)
|
||||
#define EVENTINF_05_MASK (1 << EVENTINF_05_SHIFT)
|
||||
#define EVENTINF_06_MASK (1 << EVENTINF_06_SHIFT)
|
||||
#define EVENTINF_0F_MASK (1 << EVENTINF_0F_SHIFT)
|
||||
#define EVENTINF_04 ((EVENTINF_0X_INDEX << 4) | EVENTINF_04_SHIFT)
|
||||
#define EVENTINF_05 ((EVENTINF_0X_INDEX << 4) | EVENTINF_05_SHIFT)
|
||||
#define EVENTINF_06 ((EVENTINF_0X_INDEX << 4) | EVENTINF_06_SHIFT)
|
||||
#define EVENTINF_08 ((EVENTINF_0X_INDEX << 4) | EVENTINF_08_SHIFT)
|
||||
#define EVENTINF_0A ((EVENTINF_0X_INDEX << 4) | EVENTINF_0A_SHIFT)
|
||||
#define EVENTINF_0F ((EVENTINF_0X_INDEX << 4) | EVENTINF_0F_SHIFT)
|
||||
|
||||
#define EVENTINF_10 0x10
|
||||
|
||||
// 0x20-0x24
|
||||
#define EVENTINF_20_21_22_23_24_INDEX 2
|
||||
#define EVENTINF_20_MASK (1 << 0)
|
||||
#define EVENTINF_21_MASK (1 << 1)
|
||||
#define EVENTINF_22_MASK (1 << 2)
|
||||
#define EVENTINF_23_MASK (1 << 3)
|
||||
#define EVENTINF_24_MASK (1 << 4)
|
||||
|
||||
#define EVENTINF_30 0x30
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -208,7 +208,7 @@ u8 Inventory_DeleteEquipment(GlobalContext* globalCtx, s16 equipment) {
|
|||
|
||||
if (equipment == EQUIP_SWORD) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_NONE;
|
||||
gSaveContext.infTable[29] = 1;
|
||||
gSaveContext.infTable[INFTABLE_1DX_INDEX] = 1;
|
||||
}
|
||||
|
||||
Player_SetEquipmentData(globalCtx, player);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -52,40 +52,40 @@ CutsceneStateHandler sCsStateHandlers2[] = {
|
|||
u8 sTitleCsState = 0;
|
||||
|
||||
EntranceCutscene sEntranceCutsceneTable[] = {
|
||||
{ 0x0185, 2, 0xA0, gHyruleFieldIntroCs },
|
||||
{ 0x013D, 2, 0xA1, gDMTIntroCs },
|
||||
{ 0x00DB, 2, 0xA3, gKakarikoVillageIntroCs },
|
||||
{ 0x0108, 2, 0xA4, gZorasDomainIntroCs },
|
||||
{ 0x0138, 1, 0xA5, gHyruleCastleIntroCs },
|
||||
{ 0x014D, 2, 0xA6, gGoronCityIntroCs },
|
||||
{ 0x0053, 2, 0xA7, gTempleOfTimeIntroCs },
|
||||
{ 0x0000, 2, 0xA8, gDekuTreeIntroCs },
|
||||
{ 0x028A, 0, 0x18, gHyruleFieldSouthEponaJumpCs },
|
||||
{ 0x0292, 0, 0x18, gHyruleFieldEastEponaJumpCs },
|
||||
{ 0x028E, 0, 0x18, gHyruleFieldWestEponaJumpCs },
|
||||
{ 0x0476, 0, 0x18, gHyruleFieldGateEponaJumpCs },
|
||||
{ 0x050F, 1, 0xA9, gHyruleFieldGetOoTCs },
|
||||
{ 0x0102, 2, 0xB1, gLakeHyliaIntroCs },
|
||||
{ 0x0117, 2, 0xB2, gGerudoValleyIntroCs },
|
||||
{ 0x0129, 2, 0xB3, gGerudoFortressIntroCs },
|
||||
{ 0x0157, 2, 0xB4, gLonLonRanchIntroCs },
|
||||
{ 0x0028, 2, 0xB5, gJabuJabuIntroCs },
|
||||
{ 0x00E4, 2, 0xB6, gGraveyardIntroCs },
|
||||
{ 0x0225, 2, 0xB7, gZorasFountainIntroCs },
|
||||
{ 0x0123, 2, 0xB8, gDesertColossusIntroCs },
|
||||
{ 0x0147, 2, 0xB9, gDeathMountainCraterIntroCs },
|
||||
{ 0x0138, 0, 0xBA, gGanonsCastleIntroCs },
|
||||
{ 0x0574, 2, 0x5A, gSunSongGraveSunSongTeachPart2Cs },
|
||||
{ 0x0538, 2, 0xBB, gForestBarrierCs },
|
||||
{ 0x053C, 2, 0xBC, gWaterBarrierCs },
|
||||
{ 0x0540, 2, 0xBD, gShadowBarrierCs },
|
||||
{ 0x0544, 2, 0xBE, gFireBarrierCs },
|
||||
{ 0x0548, 2, 0xBF, gLightBarrierCs },
|
||||
{ 0x054C, 2, 0xAD, gSpiritBarrierCs },
|
||||
{ 0x008D, 0, 0xC0, gSpiritBossNabooruKnuckleIntroCs },
|
||||
{ 0x03B4, 0, 0xC7, gGerudoFortressFirstCaptureCs },
|
||||
{ 0x0246, 2, 0xB9, gDeathMountainCraterIntroCs },
|
||||
{ 0x05E8, 2, 0xC6, gKokiriForestDekuSproutCs },
|
||||
{ 0x0185, 2, EVENTCHKINF_A0, gHyruleFieldIntroCs },
|
||||
{ 0x013D, 2, EVENTCHKINF_A1, gDMTIntroCs },
|
||||
{ 0x00DB, 2, EVENTCHKINF_A3, gKakarikoVillageIntroCs },
|
||||
{ 0x0108, 2, EVENTCHKINF_A4, gZorasDomainIntroCs },
|
||||
{ 0x0138, 1, EVENTCHKINF_A5, gHyruleCastleIntroCs },
|
||||
{ 0x014D, 2, EVENTCHKINF_A6, gGoronCityIntroCs },
|
||||
{ 0x0053, 2, EVENTCHKINF_A7, gTempleOfTimeIntroCs },
|
||||
{ 0x0000, 2, EVENTCHKINF_A8, gDekuTreeIntroCs },
|
||||
{ 0x028A, 0, EVENTCHKINF_18, gHyruleFieldSouthEponaJumpCs },
|
||||
{ 0x0292, 0, EVENTCHKINF_18, gHyruleFieldEastEponaJumpCs },
|
||||
{ 0x028E, 0, EVENTCHKINF_18, gHyruleFieldWestEponaJumpCs },
|
||||
{ 0x0476, 0, EVENTCHKINF_18, gHyruleFieldGateEponaJumpCs },
|
||||
{ 0x050F, 1, EVENTCHKINF_A9, gHyruleFieldGetOoTCs },
|
||||
{ 0x0102, 2, EVENTCHKINF_B1, gLakeHyliaIntroCs },
|
||||
{ 0x0117, 2, EVENTCHKINF_B2, gGerudoValleyIntroCs },
|
||||
{ 0x0129, 2, EVENTCHKINF_B3, gGerudoFortressIntroCs },
|
||||
{ 0x0157, 2, EVENTCHKINF_B4, gLonLonRanchIntroCs },
|
||||
{ 0x0028, 2, EVENTCHKINF_B5, gJabuJabuIntroCs },
|
||||
{ 0x00E4, 2, EVENTCHKINF_B6, gGraveyardIntroCs },
|
||||
{ 0x0225, 2, EVENTCHKINF_B7, gZorasFountainIntroCs },
|
||||
{ 0x0123, 2, EVENTCHKINF_B8, gDesertColossusIntroCs },
|
||||
{ 0x0147, 2, EVENTCHKINF_B9, gDeathMountainCraterIntroCs },
|
||||
{ 0x0138, 0, EVENTCHKINF_BA, gGanonsCastleIntroCs },
|
||||
{ 0x0574, 2, EVENTCHKINF_5A, gSunSongGraveSunSongTeachPart2Cs },
|
||||
{ 0x0538, 2, EVENTCHKINF_BB, gForestBarrierCs },
|
||||
{ 0x053C, 2, EVENTCHKINF_BC, gWaterBarrierCs },
|
||||
{ 0x0540, 2, EVENTCHKINF_BD, gShadowBarrierCs },
|
||||
{ 0x0544, 2, EVENTCHKINF_BE, gFireBarrierCs },
|
||||
{ 0x0548, 2, EVENTCHKINF_BF, gLightBarrierCs },
|
||||
{ 0x054C, 2, EVENTCHKINF_AD, gSpiritBarrierCs },
|
||||
{ 0x008D, 0, EVENTCHKINF_C0, gSpiritBossNabooruKnuckleIntroCs },
|
||||
{ 0x03B4, 0, EVENTCHKINF_C7, gGerudoFortressFirstCaptureCs },
|
||||
{ 0x0246, 2, EVENTCHKINF_B9, gDeathMountainCraterIntroCs },
|
||||
{ 0x05E8, 2, EVENTCHKINF_C6, gKokiriForestDekuSproutCs },
|
||||
};
|
||||
|
||||
// Unused, seems to be an early list of dungeon entrance cutscene locations
|
||||
|
@ -336,13 +336,13 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
}
|
||||
break;
|
||||
case 19:
|
||||
gSaveContext.eventChkInf[6] |= 0x0020;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_65);
|
||||
break;
|
||||
case 20:
|
||||
gSaveContext.eventChkInf[6] |= 0x0080;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_67);
|
||||
break;
|
||||
case 21:
|
||||
gSaveContext.eventChkInf[6] |= 0x0200;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_69);
|
||||
break;
|
||||
case 22:
|
||||
D_801614B0.r = 255;
|
||||
|
@ -561,8 +561,8 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
case 8:
|
||||
gSaveContext.fw.set = 0;
|
||||
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x20)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x20;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_45);
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
|
@ -634,7 +634,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 18:
|
||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4F);
|
||||
globalCtx->nextEntranceIndex = 0x0324;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
|
@ -779,14 +779,14 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_INSTANT;
|
||||
break;
|
||||
case 46:
|
||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4F);
|
||||
globalCtx->nextEntranceIndex = 0x0324;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 47:
|
||||
Item_Give(globalCtx, ITEM_SONG_NOCTURNE);
|
||||
gSaveContext.eventChkInf[5] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_54);
|
||||
globalCtx->nextEntranceIndex = 0x00DB;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
|
@ -1014,8 +1014,8 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 95:
|
||||
if ((gSaveContext.eventChkInf[4] & 0x100) && (gSaveContext.eventChkInf[4] & 0x200) &&
|
||||
(gSaveContext.eventChkInf[4] & 0x400)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_48) && GET_EVENTCHKINF(EVENTCHKINF_49) &&
|
||||
GET_EVENTCHKINF(EVENTCHKINF_4A)) {
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
|
@ -1048,7 +1048,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
} else {
|
||||
gSaveContext.eventChkInf[12] |= 0x100;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_C8);
|
||||
globalCtx->nextEntranceIndex = 0x0610;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
|
@ -1170,8 +1170,9 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 113:
|
||||
if (Flags_GetEventChkInf(0xBB) && Flags_GetEventChkInf(0xBC) && Flags_GetEventChkInf(0xBD) &&
|
||||
Flags_GetEventChkInf(0xBE) && Flags_GetEventChkInf(0xBF) && Flags_GetEventChkInf(0xAD)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_BB) && Flags_GetEventChkInf(EVENTCHKINF_BC) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_BD) && Flags_GetEventChkInf(EVENTCHKINF_BE) &&
|
||||
Flags_GetEventChkInf(EVENTCHKINF_BF) && Flags_GetEventChkInf(EVENTCHKINF_AD)) {
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTowerBarrierCs);
|
||||
globalCtx->csCtx.frames = 0;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
|
@ -1194,7 +1195,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 116:
|
||||
if (gSaveContext.eventChkInf[12] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_C8)) {
|
||||
globalCtx->nextEntranceIndex = 0x0580;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
|
@ -2060,7 +2061,7 @@ void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if ((gSaveContext.entranceIndex == entranceCutscene->entrance) &&
|
||||
(!Flags_GetEventChkInf(entranceCutscene->flag) || (entranceCutscene->flag == 0x18)) &&
|
||||
(!Flags_GetEventChkInf(entranceCutscene->flag) || (entranceCutscene->flag == EVENTCHKINF_18)) &&
|
||||
(gSaveContext.cutsceneIndex < 0xFFF0) && ((u8)gSaveContext.linkAge == requiredAge) &&
|
||||
(gSaveContext.respawnFlag <= 0)) {
|
||||
Flags_SetEventChkInf(entranceCutscene->flag);
|
||||
|
@ -2076,29 +2077,29 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
|
|||
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", ((void)0, gSaveContext.respawnFlag));
|
||||
|
||||
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC)) {
|
||||
Flags_SetEventChkInf(0xAC);
|
||||
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(EVENTCHKINF_AC)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_AC);
|
||||
gSaveContext.entranceIndex = 0x0123;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} else if ((gSaveContext.entranceIndex == 0x00DB) && LINK_IS_ADULT && (gSaveContext.eventChkInf[4] & 0x0100) &&
|
||||
(gSaveContext.eventChkInf[4] & 0x0200) && (gSaveContext.eventChkInf[4] & 0x0400) &&
|
||||
!Flags_GetEventChkInf(0xAA)) {
|
||||
Flags_SetEventChkInf(0xAA);
|
||||
} else if ((gSaveContext.entranceIndex == 0x00DB) && LINK_IS_ADULT && GET_EVENTCHKINF(EVENTCHKINF_48) &&
|
||||
GET_EVENTCHKINF(EVENTCHKINF_49) && GET_EVENTCHKINF(EVENTCHKINF_4A) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_AA)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_AA);
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} else if ((gSaveContext.entranceIndex == 0x05E0) && !Flags_GetEventChkInf(0xC1)) {
|
||||
Flags_SetEventChkInf(0xC1);
|
||||
} else if ((gSaveContext.entranceIndex == 0x05E0) && !Flags_GetEventChkInf(EVENTCHKINF_C1)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_C1);
|
||||
Item_Give(globalCtx, ITEM_OCARINA_FAIRY);
|
||||
gSaveContext.entranceIndex = 0x011E;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
} 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_C4) &&
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA)) {
|
||||
Flags_SetEventChkInf(0xC4);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_C4);
|
||||
gSaveContext.entranceIndex = 0x0053;
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
} else if (!Flags_GetEventChkInf(0xC7) &&
|
||||
} else if (!Flags_GetEventChkInf(EVENTCHKINF_C7) &&
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_DEMO)) {
|
||||
Flags_SetEventChkInf(0xC7);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_C7);
|
||||
gSaveContext.entranceIndex = 0x0517;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
}
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
ElfMessage sChildSariaMsgs[] = {
|
||||
ELF_MSG_STRENGTH_UPG(SKIP, 3, false, 0),
|
||||
ELF_MSG_FLAG(CHECK, 0x61, false, 0x37), /* eventChkInf[3] & 0x80 */
|
||||
ELF_MSG_FLAG(CHECK, 0x61, false, EVENTCHKINF_37),
|
||||
ELF_MSG_END(0x64),
|
||||
ELF_MSG_FLAG(CHECK, 0x62, false, 0x25), /* eventChkInf[2] & 0x20 */
|
||||
ELF_MSG_FLAG(CHECK, 0x63, false, 0x37), /* eventChkInf[3] & 0x80 */
|
||||
ELF_MSG_FLAG(CHECK, 0x65, false, 0x43), /* eventChkInf[4] & 0x8 */
|
||||
ELF_MSG_FLAG(CHECK, 0x62, false, EVENTCHKINF_25),
|
||||
ELF_MSG_FLAG(CHECK, 0x63, false, EVENTCHKINF_37),
|
||||
ELF_MSG_FLAG(CHECK, 0x65, false, EVENTCHKINF_43),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x66, false, ITEM_MEDALLION_FOREST),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x66, false, ITEM_MEDALLION_FIRE),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x66, false, ITEM_MEDALLION_WATER),
|
||||
|
|
|
@ -30,7 +30,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
|
||||
gSaveContext.timer1State = 0;
|
||||
gSaveContext.timer2State = 0;
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
|
||||
// search inventory for spoiling items and revert if necessary
|
||||
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
|
||||
|
|
|
@ -47,7 +47,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
|||
{ SCENE_SPOT20, 928, 0, -2280, 0, 2 },
|
||||
};
|
||||
|
||||
if ((AREG(6) != 0) && (Flags_GetEventChkInf(0x18) || (DREG(1) != 0))) {
|
||||
if ((AREG(6) != 0) && (Flags_GetEventChkInf(EVENTCHKINF_18) || (DREG(1) != 0))) {
|
||||
player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, player->actor.world.pos.x,
|
||||
player->actor.world.pos.y, player->actor.world.pos.z, player->actor.shape.rot.x,
|
||||
player->actor.shape.rot.y, player->actor.shape.rot.z, 9);
|
||||
|
@ -67,15 +67,15 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
|||
horseActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1);
|
||||
horseActor->room = -1;
|
||||
} else if ((gSaveContext.entranceIndex == 1230) && (gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
} else if ((gSaveContext.entranceIndex == 1230) && GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
Actor* horseActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1);
|
||||
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 389);
|
||||
} else if ((globalCtx->sceneNum == gSaveContext.horseData.scene) &&
|
||||
(Flags_GetEventChkInf(0x18) != 0 || DREG(1) != 0)) {
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1) != 0)) {
|
||||
// "Set by existence of horse %d %d %d"
|
||||
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(0x18),
|
||||
DREG(1));
|
||||
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene,
|
||||
Flags_GetEventChkInf(EVENTCHKINF_18), DREG(1));
|
||||
|
||||
if (func_8006CFC0(gSaveContext.horseData.scene)) {
|
||||
Actor* horseActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE,
|
||||
|
@ -92,11 +92,11 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
|||
osSyncPrintf(VT_RST);
|
||||
func_8006D074(globalCtx);
|
||||
}
|
||||
} else if ((globalCtx->sceneNum == SCENE_SPOT20) && !Flags_GetEventChkInf(0x18) && (DREG(1) == 0)) {
|
||||
} else if ((globalCtx->sceneNum == SCENE_SPOT20) && !Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0)) {
|
||||
Actor* horseActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1);
|
||||
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 443);
|
||||
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) {
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_18) || (DREG(1) != 0)) {
|
||||
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
|
||||
HorseSpawn* horseSpawn = &horseSpawns[i];
|
||||
if (horseSpawn->scene == globalCtx->sceneNum) {
|
||||
|
@ -111,7 +111,7 @@ void func_8006D0EC(GlobalContext* globalCtx, Player* player) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (!Flags_GetEventChkInf(0x18)) {
|
||||
} else if (!Flags_GetEventChkInf(EVENTCHKINF_18)) {
|
||||
if ((DREG(1) == 0) && (globalCtx->sceneNum == SCENE_SOUKO) && !IS_DAY) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1);
|
||||
}
|
||||
|
@ -158,8 +158,11 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
|||
Actor_MountHorse(globalCtx, player, player->rideActor);
|
||||
func_8002DE74(globalCtx, player);
|
||||
gSaveContext.horseData.scene = globalCtx->sceneNum;
|
||||
} else if ((globalCtx->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
|
||||
(Flags_GetEventChkInf(0x18) == 0) && (DREG(1) == 0)) {
|
||||
} else if ((globalCtx->sceneNum == SCENE_SPOT20) &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) ==
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK)) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0)) {
|
||||
player->rideActor =
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5);
|
||||
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 582);
|
||||
|
@ -200,7 +203,7 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
|
|||
Vec3f sp54;
|
||||
s32 temp = 0;
|
||||
|
||||
if (((gSaveContext.eventInf[0] & 0x10) >> 4) && D_8011F9B8[i].type == 6) {
|
||||
if ((GET_EVENTINF(EVENTINF_04) >> EVENTINF_04_SHIFT) && D_8011F9B8[i].type == 6) {
|
||||
temp = 0x8000;
|
||||
}
|
||||
|
||||
|
@ -249,8 +252,11 @@ void func_8006DC68(GlobalContext* globalCtx, Player* player) {
|
|||
((gSaveContext.entranceIndex == 0x028A || gSaveContext.entranceIndex == 0x028E ||
|
||||
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
|
||||
(gSaveContext.respawnFlag == 0)) ||
|
||||
((globalCtx->sceneNum == SCENE_SPOT20) && ((gSaveContext.eventInf[0] & 0xF) == 6) &&
|
||||
!Flags_GetEventChkInf(0x18) && (DREG(1) == 0))) {
|
||||
((globalCtx->sceneNum == SCENE_SPOT20) &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) ==
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK)) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0))) {
|
||||
func_8006D684(globalCtx, player);
|
||||
} else {
|
||||
func_8006D0EC(globalCtx, player);
|
||||
|
|
|
@ -2443,19 +2443,19 @@ void Environment_WarpSongLeave(GlobalContext* globalCtx) {
|
|||
|
||||
switch (globalCtx->nextEntranceIndex) {
|
||||
case 0x147:
|
||||
Flags_SetEventChkInf(0xB9);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_B9);
|
||||
break;
|
||||
case 0x0102:
|
||||
Flags_SetEventChkInf(0xB1);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_B1);
|
||||
break;
|
||||
case 0x0123:
|
||||
Flags_SetEventChkInf(0xB8);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_B8);
|
||||
break;
|
||||
case 0x00E4:
|
||||
Flags_SetEventChkInf(0xB6);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_B6);
|
||||
break;
|
||||
case 0x0053:
|
||||
Flags_SetEventChkInf(0xA7);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_A7);
|
||||
break;
|
||||
case 0x00FC:
|
||||
break;
|
||||
|
|
|
@ -239,8 +239,26 @@ static s16 sOwEntranceIconPosY[24] = {
|
|||
};
|
||||
|
||||
static u16 sOwEntranceFlag[20] = {
|
||||
0xFFFF, 0x0008, 0x0007, 0xFFFF, 0x0000, 0x0003, 0x0005, 0xFFFF, 0x0002, 0xFFFF,
|
||||
0xFFFF, 0x0006, 0x000B, 0xFFFF, 0xFFFF, 0x0001, 0x0004, 0xFFFF, 0xFFFF, 0x000D,
|
||||
0xFFFF,
|
||||
INFTABLE_1A8_SHIFT,
|
||||
INFTABLE_1A7_SHIFT,
|
||||
0xFFFF,
|
||||
INFTABLE_1A0_SHIFT,
|
||||
INFTABLE_1A3_SHIFT,
|
||||
INFTABLE_1A5_SHIFT,
|
||||
0xFFFF,
|
||||
INFTABLE_1A2_SHIFT,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
INFTABLE_1A6_SHIFT,
|
||||
INFTABLE_1AB_SHIFT,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
INFTABLE_1A1_SHIFT,
|
||||
INFTABLE_1A4_SHIFT,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
INFTABLE_1AD_SHIFT,
|
||||
};
|
||||
|
||||
static f32 sFloorCoordY[10][8] = {
|
||||
|
|
|
@ -118,11 +118,16 @@ void Map_InitData(GlobalContext* globalCtx, s16 room) {
|
|||
extendedMapIndex = 0x15;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT09) {
|
||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !((gSaveContext.eventChkInf[9] & 0xF) == 0xF)) {
|
||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) &&
|
||||
!CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK |
|
||||
EVENTCHKINF_93_MASK)) {
|
||||
extendedMapIndex = 0x16;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT12) {
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK |
|
||||
EVENTCHKINF_93_MASK)) {
|
||||
extendedMapIndex = 0x17;
|
||||
}
|
||||
}
|
||||
|
@ -455,7 +460,8 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
|||
(LINK_AGE_IN_YEARS != YEARS_ADULT)) {
|
||||
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
|
||||
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
|
||||
(gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
|
||||
(gSaveContext.infTable[INFTABLE_1AX_INDEX] &
|
||||
gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||
8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
|
@ -470,7 +476,8 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT08) && (gSaveContext.infTable[26] & gBitFlags[9])) {
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT08) &&
|
||||
(gSaveContext.infTable[INFTABLE_1AX_INDEX] & gBitFlags[INFTABLE_1A9_SHIFT])) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8,
|
||||
8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
|
|
@ -1605,7 +1605,7 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
|
|||
textId += (gSaveContext.inventory.questItems & 0xF0000000 & 0xF0000000) >> QUEST_HEART_PIECE_COUNT;
|
||||
} else if (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2)) {
|
||||
textId = 0xB; // Traded Giant's Knife for Biggoron Sword
|
||||
} else if (msgCtx->textId == 0xB4 && (gSaveContext.eventChkInf[9] & 0x40)) {
|
||||
} else if (msgCtx->textId == 0xB4 && GET_EVENTCHKINF(EVENTCHKINF_96)) {
|
||||
textId = 0xB5; // Destroyed Gold Skulltula
|
||||
}
|
||||
// Ocarina Staff + Dialog
|
||||
|
@ -2456,7 +2456,9 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
if (msgCtx->disableWarpSongs || interfaceCtx->restrictions.warpSongs == 3) {
|
||||
Message_StartTextbox(globalCtx, 0x88C, NULL); // "You can't warp here!"
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else if ((gSaveContext.eventInf[0] & 0xF) != 1) {
|
||||
} else if ((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) !=
|
||||
EVENTINF_00_MASK) {
|
||||
Message_StartTextbox(globalCtx, msgCtx->lastPlayedSong + 0x88D,
|
||||
NULL); // "Warp to [place name]?"
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_01;
|
||||
|
@ -3217,8 +3219,10 @@ void Message_Update(GlobalContext* globalCtx) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
osSyncPrintf("OCARINA_MODE=%d -> ", globalCtx->msgCtx.ocarinaMode);
|
||||
globalCtx->msgCtx.ocarinaMode = (msgCtx->choiceIndex == 0) ? OCARINA_MODE_02 : OCARINA_MODE_04;
|
||||
osSyncPrintf("InRaceSeq=%d(%d) OCARINA_MODE=%d --> ", gSaveContext.eventInf[0] & 0xF, 1,
|
||||
globalCtx->msgCtx.ocarinaMode);
|
||||
osSyncPrintf("InRaceSeq=%d(%d) OCARINA_MODE=%d --> ",
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK),
|
||||
1, globalCtx->msgCtx.ocarinaMode);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
osSyncPrintf("OCARINA_MODE=%d\n", globalCtx->msgCtx.ocarinaMode);
|
||||
}
|
||||
|
|
|
@ -768,7 +768,9 @@ void func_80083108(GlobalContext* globalCtx) {
|
|||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
}
|
||||
} else if ((gSaveContext.eventInf[0] & 0xF) == 1) {
|
||||
} else if ((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) ==
|
||||
EVENTINF_00_MASK) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_BOW)) {
|
||||
|
@ -828,7 +830,8 @@ void func_80083108(GlobalContext* globalCtx) {
|
|||
(gSaveContext.equips.buttonItems[0] == ITEM_BOW) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_BOMBCHU) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_NONE)) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) || (gSaveContext.infTable[29] == 0)) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) ||
|
||||
(gSaveContext.infTable[INFTABLE_1DX_INDEX] == 0)) {
|
||||
gSaveContext.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
|
||||
sp28 = true;
|
||||
|
||||
|
@ -851,7 +854,8 @@ void func_80083108(GlobalContext* globalCtx) {
|
|||
(gSaveContext.equips.buttonItems[0] == ITEM_BOW) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_BOMBCHU) ||
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_NONE)) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) || (gSaveContext.infTable[29] == 0)) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) ||
|
||||
(gSaveContext.infTable[INFTABLE_1DX_INDEX] == 0)) {
|
||||
gSaveContext.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
|
||||
sp28 = true;
|
||||
|
||||
|
@ -1303,7 +1307,7 @@ void func_80084BF4(GlobalContext* globalCtx, u16 flag) {
|
|||
Interface_LoadItemIcon1(globalCtx, 0);
|
||||
}
|
||||
} else if (gSaveContext.equips.buttonItems[0] == ITEM_NONE) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) || (gSaveContext.infTable[29] == 0)) {
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_NONE) || (gSaveContext.infTable[INFTABLE_1DX_INDEX] == 0)) {
|
||||
gSaveContext.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
|
||||
Interface_LoadItemIcon1(globalCtx, 0);
|
||||
}
|
||||
|
@ -1636,8 +1640,8 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG);
|
||||
}
|
||||
|
||||
if (!(gSaveContext.itemGetInf[1] & 8)) {
|
||||
gSaveContext.itemGetInf[1] |= 8;
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_13)) {
|
||||
SET_ITEMGETINF(ITEMGETINF_13);
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
|
@ -1649,8 +1653,8 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG);
|
||||
}
|
||||
|
||||
if (!(gSaveContext.itemGetInf[1] & 8)) {
|
||||
gSaveContext.itemGetInf[1] |= 8;
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_13)) {
|
||||
SET_ITEMGETINF(ITEMGETINF_13);
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
|
@ -1695,8 +1699,8 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
|
||||
func_80087708(globalCtx, 12, 5);
|
||||
|
||||
if (!(gSaveContext.infTable[25] & 0x100)) {
|
||||
gSaveContext.infTable[25] |= 0x100;
|
||||
if (!GET_INFTABLE(INFTABLE_198)) {
|
||||
SET_INFTABLE(INFTABLE_198);
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
|
@ -1708,8 +1712,8 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
|
||||
func_80087708(globalCtx, 24, 5);
|
||||
|
||||
if (!(gSaveContext.infTable[25] & 0x100)) {
|
||||
gSaveContext.infTable[25] |= 0x100;
|
||||
if (!GET_INFTABLE(INFTABLE_198)) {
|
||||
SET_INFTABLE(INFTABLE_198);
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
|
@ -1770,7 +1774,7 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
}
|
||||
} else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) {
|
||||
if (item == ITEM_SAW) {
|
||||
gSaveContext.itemGetInf[1] |= 0x8000;
|
||||
SET_ITEMGETINF(ITEMGETINF_1F);
|
||||
}
|
||||
|
||||
temp = INV_CONTENT(item);
|
||||
|
@ -1875,7 +1879,7 @@ u8 Item_CheckObtainability(u8 item) {
|
|||
} else if (item == ITEM_LONGSHOT) {
|
||||
return ITEM_NONE;
|
||||
} else if ((item == ITEM_SEEDS) || (item == ITEM_SEEDS_30)) {
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x8)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_13)) {
|
||||
return ITEM_NONE;
|
||||
} else {
|
||||
return ITEM_SEEDS;
|
||||
|
@ -1890,8 +1894,8 @@ u8 Item_CheckObtainability(u8 item) {
|
|||
return ITEM_HEART;
|
||||
} else if ((item == ITEM_MAGIC_SMALL) || (item == ITEM_MAGIC_LARGE)) {
|
||||
// "Magic Pot Get_Inf_Table( 25, 0x0100)=%d"
|
||||
osSyncPrintf("魔法の壷 Get_Inf_Table( 25, 0x0100)=%d\n", gSaveContext.infTable[25] & 0x100);
|
||||
if (!(gSaveContext.infTable[25] & 0x100)) {
|
||||
osSyncPrintf("魔法の壷 Get_Inf_Table( 25, 0x0100)=%d\n", GET_INFTABLE(INFTABLE_198));
|
||||
if (!GET_INFTABLE(INFTABLE_198)) {
|
||||
return ITEM_NONE;
|
||||
} else {
|
||||
return item;
|
||||
|
@ -2639,7 +2643,7 @@ void func_80088AA0(s16 arg0) {
|
|||
|
||||
void func_80088AF0(GlobalContext* globalCtx) {
|
||||
if (gSaveContext.timer2State != 0) {
|
||||
if (gSaveContext.eventInf[1] & 1) {
|
||||
if (GET_EVENTINF(EVENTINF_10)) {
|
||||
gSaveContext.timer2Value = 239;
|
||||
} else {
|
||||
gSaveContext.timer2Value = 1;
|
||||
|
@ -3408,8 +3412,10 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
// Revert any spoiling trade quest items
|
||||
for (svar1 = 0; svar1 < ARRAY_COUNT(gSpoilingItems); svar1++) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[svar1]) {
|
||||
gSaveContext.eventInf[0] &= 0x7F80;
|
||||
osSyncPrintf("EVENT_INF=%x\n", gSaveContext.eventInf[0]);
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &=
|
||||
(u16) ~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK |
|
||||
EVENTINF_04_MASK | EVENTINF_05_MASK | EVENTINF_06_MASK | EVENTINF_0F_MASK);
|
||||
osSyncPrintf("EVENT_INF=%x\n", gSaveContext.eventInf[EVENTINF_0X_INDEX]);
|
||||
globalCtx->nextEntranceIndex = spoilingItemEntrances[svar1];
|
||||
INV_CONTENT(gSpoilingItemReverts[svar1]) = gSpoilingItemReverts[svar1];
|
||||
|
||||
|
@ -3719,10 +3725,10 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
gSaveContext.timer2Value++;
|
||||
if (gSaveContext.eventInf[1] & 1) {
|
||||
if (GET_EVENTINF(EVENTINF_10)) {
|
||||
if (gSaveContext.timer2Value == 240) {
|
||||
Message_StartTextbox(globalCtx, 0x6083, NULL);
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
gSaveContext.timer2State = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -292,7 +292,7 @@ void Gameplay_Init(GameState* thisx) {
|
|||
}
|
||||
} else if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT04) && LINK_IS_ADULT &&
|
||||
gSaveContext.sceneSetupIndex < 4) {
|
||||
gSaveContext.sceneSetupIndex = (gSaveContext.eventChkInf[4] & 0x100) ? 3 : 2;
|
||||
gSaveContext.sceneSetupIndex = GET_EVENTCHKINF(EVENTCHKINF_48) ? 3 : 2;
|
||||
}
|
||||
|
||||
Gameplay_SpawnScene(
|
||||
|
|
|
@ -2846,7 +2846,7 @@ void func_8009E0B8(GlobalContext* globalCtx) {
|
|||
spA3 = 255 - (u8)globalCtx->roomCtx.unk_74[0];
|
||||
} else if (gSaveContext.sceneSetupIndex == 6) {
|
||||
spA0 = globalCtx->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) && GET_EVENTCHKINF(EVENTCHKINF_07)) {
|
||||
spA0 = 2150;
|
||||
}
|
||||
|
||||
|
@ -2874,7 +2874,7 @@ void func_8009E54C(GlobalContext* globalCtx) {
|
|||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7058);
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200))) {
|
||||
if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_69))) {
|
||||
globalCtx->roomCtx.unk_74[0] = 87;
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ void Sram_InitNewSave(void) {
|
|||
gSaveContext.horseData.pos.z = 5497;
|
||||
gSaveContext.horseData.angle = -0x6AD9;
|
||||
gSaveContext.magicLevel = 0;
|
||||
gSaveContext.infTable[29] = 1;
|
||||
gSaveContext.infTable[INFTABLE_1DX_INDEX] = 1;
|
||||
gSaveContext.sceneFlags[5].swch = 0x40000000;
|
||||
}
|
||||
|
||||
|
@ -265,8 +265,8 @@ void Sram_InitDebugSave(void) {
|
|||
gSaveContext.horseData.angle = -0x6AD9;
|
||||
gSaveContext.infTable[0] |= 0x5009;
|
||||
gSaveContext.eventChkInf[0] |= 0x123F;
|
||||
gSaveContext.eventChkInf[8] |= 1;
|
||||
gSaveContext.eventChkInf[12] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_80);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_C4);
|
||||
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KOKIRI;
|
||||
|
@ -408,9 +408,9 @@ void Sram_OpenSave(SramContext* sramCtx) {
|
|||
}
|
||||
|
||||
// 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)) {
|
||||
i = gSaveContext.eventChkInf[4] & ~1;
|
||||
gSaveContext.eventChkInf[4] = i;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)) {
|
||||
i = gSaveContext.eventChkInf[EVENTCHKINF_40_INDEX] & ~EVENTCHKINF_40_MASK;
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_40_INDEX] = i;
|
||||
|
||||
INV_CONTENT(ITEM_LETTER_ZELDA) = ITEM_CHICKEN;
|
||||
|
||||
|
|
|
@ -2,32 +2,32 @@
|
|||
#include "z64elf_message.h"
|
||||
|
||||
ElfMessage gOverworldNaviMsgs[] = {
|
||||
ELF_MSG_FLAG(CHECK, 0x40, false, 0x05), /* eventChkInf[0] & 0x20 */
|
||||
ELF_MSG_FLAG(CHECK, 0x41, false, 0x09), /* eventChkInf[0] & 0x200 */
|
||||
ELF_MSG_FLAG(CHECK, 0x42, false, 0x12), /* eventChkInf[1] & 0x4 */
|
||||
ELF_MSG_FLAG(CHECK, 0x43, false, 0x14), /* eventChkInf[1] & 0x10 */
|
||||
ELF_MSG_FLAG(CHECK, 0x44, false, 0x40), /* eventChkInf[4] & 0x1 */
|
||||
ELF_MSG_FLAG(CHECK, 0x40, false, EVENTCHKINF_05),
|
||||
ELF_MSG_FLAG(CHECK, 0x41, false, EVENTCHKINF_09),
|
||||
ELF_MSG_FLAG(CHECK, 0x42, false, EVENTCHKINF_12),
|
||||
ELF_MSG_FLAG(CHECK, 0x43, false, EVENTCHKINF_14),
|
||||
ELF_MSG_FLAG(CHECK, 0x44, false, EVENTCHKINF_40),
|
||||
ELF_MSG_SONG(CHECK, 0x45, false, ITEM_SONG_SARIA),
|
||||
ELF_MSG_STRENGTH_UPG(CHECK, 0x46, true, 0),
|
||||
ELF_MSG_FLAG(CHECK, 0x47, false, 0x25), /* eventChkInf[2] & 0x20 */
|
||||
ELF_MSG_FLAG(CHECK, 0x47, false, EVENTCHKINF_25),
|
||||
ELF_MSG_MAGIC(CHECK, 0x48, false),
|
||||
ELF_MSG_FLAG(CHECK, 0x49, false, 0x33), /* eventChkInf[3] & 0x8 */
|
||||
ELF_MSG_FLAG(CHECK, 0x4A, false, 0x37), /* eventChkInf[3] & 0x80 */
|
||||
ELF_MSG_FLAG(CHECK, 0x4B, false, 0x80), /* eventChkInf[8] & 0x1 */
|
||||
ELF_MSG_FLAG(CHECK, 0x4C, false, 0x43), /* eventChkInf[4] & 0x8 */
|
||||
ELF_MSG_FLAG(CHECK, 0x4D, false, 0x45), /* eventChkInf[4] & 0x20 */
|
||||
ELF_MSG_FLAG(CHECK, 0x49, false, EVENTCHKINF_33),
|
||||
ELF_MSG_FLAG(CHECK, 0x4A, false, EVENTCHKINF_37),
|
||||
ELF_MSG_FLAG(CHECK, 0x4B, false, EVENTCHKINF_80),
|
||||
ELF_MSG_FLAG(CHECK, 0x4C, false, EVENTCHKINF_43),
|
||||
ELF_MSG_FLAG(CHECK, 0x4D, false, EVENTCHKINF_45),
|
||||
ELF_MSG_ITEM(CHECK, 0x4E, true, ITEM_HOOKSHOT, ITEM_NONE),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x50, false, ITEM_MEDALLION_FOREST),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x51, false, ITEM_MEDALLION_FIRE),
|
||||
ELF_MSG_BOOTS(CHECK, 0x52, false, ITEM_BOOTS_IRON),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x53, false, ITEM_MEDALLION_WATER),
|
||||
ELF_MSG_FLAG(CHECK, 0x54, false, 0xAA), /* eventChkInf[10] & 0x400 */
|
||||
ELF_MSG_FLAG(CHECK, 0x54, false, EVENTCHKINF_AA),
|
||||
ELF_MSG_ITEM(CHECK, 0x55, true, ITEM_LENS, ITEM_NONE),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x57, false, ITEM_MEDALLION_SHADOW),
|
||||
ELF_MSG_SONG(CHECK, 0x58, false, ITEM_SONG_REQUIEM),
|
||||
ELF_MSG_STRENGTH_UPG(CHECK, 0x56, true, 1),
|
||||
ELF_MSG_MEDALLION(CHECK, 0x5A, false, ITEM_MEDALLION_SPIRIT),
|
||||
ELF_MSG_ITEM(CHECK, 0x5B, true, ITEM_ARROW_LIGHT, ITEM_NONE),
|
||||
ELF_MSG_FLAG(CHECK, 0x5C, false, 0xC3), /* eventChkInf[12] & 0x8 */
|
||||
ELF_MSG_FLAG(CHECK, 0x5C, false, EVENTCHKINF_C3),
|
||||
ELF_MSG_END(0x5F),
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@ s32 BgBdanObjects_GetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||
case 0:
|
||||
return this->cameraSetting == CAM_SET_NORMAL0;
|
||||
case 4:
|
||||
return gSaveContext.infTable[20] & 0x40;
|
||||
return GET_INFTABLE(INFTABLE_146);
|
||||
case 3:
|
||||
return this->cameraSetting == CAM_SET_DUNGEON1;
|
||||
default:
|
||||
|
@ -97,7 +97,7 @@ void BgBdanObjects_SetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||
this->cameraSetting = CAM_SET_DUNGEON0;
|
||||
break;
|
||||
case 4:
|
||||
gSaveContext.infTable[20] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_146);
|
||||
break;
|
||||
default:
|
||||
osSyncPrintf("Bg_Bdan_Objects_Set_Contact_Ru1\nそんな送信モードは無い%d!!!!!!!!\n");
|
||||
|
|
|
@ -249,8 +249,8 @@ void BgBreakwall_Wait(BgBreakwall* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
|
||||
}
|
||||
|
||||
if ((wallType == BWALL_DC_ENTRANCE) && (!(Flags_GetEventChkInf(0xB0)))) {
|
||||
Flags_SetEventChkInf(0xB0);
|
||||
if ((wallType == BWALL_DC_ENTRANCE) && !Flags_GetEventChkInf(EVENTCHKINF_B0)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_B0);
|
||||
Cutscene_SetSegment(globalCtx, gDcOpeningCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
|
|
@ -182,7 +182,7 @@ void BgDodoago_WaitExplosives(BgDodoago* this, GlobalContext* globalCtx) {
|
|||
sFirstExplosiveFlag = true;
|
||||
sTimer = 50;
|
||||
}
|
||||
} else if (Flags_GetEventChkInf(0xB0)) {
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_B0)) {
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderMain);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderLeft);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderRight);
|
||||
|
@ -312,7 +312,7 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgDodoago_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 672);
|
||||
|
||||
if (Flags_GetEventChkInf(0xB0)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_B0)) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 677),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -207,17 +207,17 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->sceneNum != SCENE_DAIYOUSEI_IZUMI) {
|
||||
switch (this->fountainType) {
|
||||
case FAIRY_SPELL_FARORES_WIND:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x100)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_18)) {
|
||||
givingReward = true;
|
||||
}
|
||||
break;
|
||||
case FAIRY_SPELL_DINS_FIRE:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x200)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_19)) {
|
||||
givingReward = true;
|
||||
}
|
||||
break;
|
||||
case FAIRY_SPELL_NAYRUS_LOVE:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x400)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1A)) {
|
||||
givingReward = true;
|
||||
}
|
||||
break;
|
||||
|
@ -651,7 +651,7 @@ static s16 sDemoEffectLightColors[] = { DEMO_EFFECT_LIGHT_GREEN, DEMO_EFFECT_LIG
|
|||
|
||||
static s16 sExItemTypes[] = { EXITEM_MAGIC_WIND, EXITEM_MAGIC_FIRE, EXITEM_MAGIC_DARK };
|
||||
|
||||
static s16 sItemGetFlags[] = { 0x100, 0x200, 0x400 };
|
||||
static s16 sItemGetFlags[] = { ITEMGETINF_18_MASK, ITEMGETINF_19_MASK, ITEMGETINF_1A_MASK };
|
||||
|
||||
static u8 sItemIds[] = { ITEM_FARORES_WIND, ITEM_DINS_FIRE, ITEM_NAYRUS_LOVE };
|
||||
|
||||
|
@ -761,7 +761,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
this->itemSpawned = true;
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
Interface_ChangeAlpha(9);
|
||||
gSaveContext.itemGetInf[1] |= sItemGetFlags[actionIndex];
|
||||
gSaveContext.itemGetInf[ITEMGETINF_18_19_1A_INDEX] |= sItemGetFlags[actionIndex];
|
||||
Item_Give(globalCtx, sItemIds[actionIndex]);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -43,8 +43,7 @@ void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->somePos.x = thisx->world.pos.x;
|
||||
this->somePos.y = thisx->world.pos.y;
|
||||
this->somePos.z = thisx->world.pos.z;
|
||||
if (((gSaveContext.infTable[7] & 0x40) || (gSaveContext.eventChkInf[4] & 0x20)) &&
|
||||
(globalCtx->sceneNum == SCENE_SPOT01)) {
|
||||
if ((GET_INFTABLE(INFTABLE_76) || GET_EVENTCHKINF(EVENTCHKINF_45)) && (globalCtx->sceneNum == SCENE_SPOT01)) {
|
||||
thisx->world.pos.x = -89.0f;
|
||||
thisx->world.pos.z = -1375.0f;
|
||||
}
|
||||
|
@ -63,7 +62,7 @@ void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8087828C(BgGateShutter* this, GlobalContext* globalCtx) {
|
||||
if (this->openingState == 1 && !(gSaveContext.infTable[7] & 0x40)) {
|
||||
if (this->openingState == 1 && !GET_INFTABLE(INFTABLE_76)) {
|
||||
this->unk_178 = 2;
|
||||
this->actionFunc = func_80878300;
|
||||
} else if (this->openingState == 2) {
|
||||
|
|
|
@ -49,7 +49,7 @@ void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x2000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_4D)) {
|
||||
this->actionFunc = func_808787A4;
|
||||
} else {
|
||||
this->dyna.actor.draw = NULL;
|
||||
|
@ -86,7 +86,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) {
|
|||
(globalCtx->csCtx.npcActions[2]->action == 2)) {
|
||||
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
gSaveContext.eventChkInf[4] |= 0x2000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4D);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,13 +45,15 @@ void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if ((globalCtx->sceneNum != SCENE_SPOT20 || !LINK_IS_ADULT) ||
|
||||
(((gSaveContext.eventChkInf[1] & 0x100)) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
||||
(GET_EVENTCHKINF(EVENTCHKINF_18) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
Actor_SetScale(&this->dyna.actor, 0.1f);
|
||||
if (((this->dyna.actor.params & 1) != 0) && ((gSaveContext.eventInf[0] & 0xF) == 6)) {
|
||||
if (((this->dyna.actor.params & 1) != 0) &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] & (EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK |
|
||||
EVENTINF_03_MASK)) == (EVENTINF_01_MASK | EVENTINF_02_MASK))) {
|
||||
globalCtx->csCtx.frames = 0;
|
||||
BgInGate_SetupAction(this, func_80892890);
|
||||
} else {
|
||||
|
|
|
@ -55,7 +55,7 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
DynaPolyActor_Init(&this->dyna, 3);
|
||||
if (thisx->params == WINDMILL_ROTATING_GEAR) {
|
||||
CollisionHeader_GetVirtual(&gWindmillRotatingPlatformCol, &colHeader);
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_65)) {
|
||||
thisx->world.rot.y = 0x400;
|
||||
} else {
|
||||
thisx->world.rot.y = 0x80;
|
||||
|
@ -109,7 +109,7 @@ void BgRelayObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if ((this->dyna.actor.params == WINDMILL_ROTATING_GEAR) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
gSaveContext.eventChkInf[6] &= ~0x20;
|
||||
CLEAR_EVENTCHKINF(EVENTCHKINF_65);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,9 +180,9 @@ void func_808A932C(BgRelayObjects* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_808A939C(BgRelayObjects* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetEnv(globalCtx, 5)) {
|
||||
gSaveContext.eventChkInf[6] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_65);
|
||||
}
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_65)) {
|
||||
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x400, 8);
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x80, 8);
|
||||
|
|
|
@ -79,7 +79,7 @@ void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (gSaveContext.sceneSetupIndex != 6) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !(gSaveContext.eventChkInf[8] & 1)) {
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void BgSpot00Hanebasi_DrawbridgeWait(BgSpot00Hanebasi* this, GlobalContext* glob
|
|||
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
|
||||
!CHECK_QUEST_ITEM(QUEST_GORON_RUBY) || !CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) ||
|
||||
(gSaveContext.eventChkInf[8] & 1)) {
|
||||
GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
if (this->dyna.actor.shape.rot.x != 0) {
|
||||
if (Flags_GetEnv(globalCtx, 0) || ((gSaveContext.sceneSetupIndex < 4) && IS_DAY)) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||
|
@ -211,14 +211,14 @@ void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT00) {
|
||||
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) && !GET_EVENTCHKINF(EVENTCHKINF_80) && LINK_IS_CHILD) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
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) &&
|
||||
(!(Gameplay_InCsMode(globalCtx)))) {
|
||||
gSaveContext.eventChkInf[8] |= 1;
|
||||
Flags_SetEventChkInf(0x82);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_80);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_82);
|
||||
this->actionFunc = BgSpot00Hanebasi_DoNothing;
|
||||
func_8002DF54(globalCtx, &player->actor, 8);
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
|
|
|
@ -47,7 +47,7 @@ void BgSpot01Fusya_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->unk_158 = 100.0f;
|
||||
this->unk_15C = 0.5f;
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
gSaveContext.eventChkInf[6] &= 0xFFDF;
|
||||
CLEAR_EVENTCHKINF(EVENTCHKINF_65);
|
||||
}
|
||||
BgSpot01Fusya_SetupAction(this, func_808AAA50);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ void func_808AAA50(BgSpot01Fusya* this, GlobalContext* globalCtx) {
|
|||
f32 temp;
|
||||
Actor* thisx = &this->actor;
|
||||
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_65)) {
|
||||
this->unk_158 = 1800.0f;
|
||||
}
|
||||
thisx->shape.rot.z += this->unk_154;
|
||||
|
|
|
@ -302,7 +302,7 @@ void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
if ((gSaveContext.eventChkInf[5] & 0x10) && LINK_IS_ADULT) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_54) && LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else {
|
||||
this->action = 0;
|
||||
|
|
|
@ -36,7 +36,7 @@ void BgSpot01Idomizu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgSpot01Idomizu* this = (BgSpot01Idomizu*)thisx;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
if (gSaveContext.eventChkInf[6] & 0x80 || LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_67) || LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
this->waterHeight = -550.0f;
|
||||
} else {
|
||||
this->waterHeight = 52.0f;
|
||||
|
@ -49,7 +49,7 @@ void BgSpot01Idomizu_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808ABB84(BgSpot01Idomizu* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[6] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_67)) {
|
||||
this->waterHeight = -550.0f;
|
||||
}
|
||||
globalCtx->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
|
||||
|
|
|
@ -87,8 +87,7 @@ void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
if (((gSaveContext.eventChkInf[1] & 0x2000) && (globalCtx->sceneNum == SCENE_SPOT02) &&
|
||||
(thisx->params == 2)) ||
|
||||
if ((GET_EVENTCHKINF(EVENTCHKINF_1D) && (globalCtx->sceneNum == SCENE_SPOT02) && (thisx->params == 2)) ||
|
||||
(LINK_IS_ADULT && (thisx->params == 1))) {
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
|
@ -100,7 +99,7 @@ void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_808ACC34;
|
||||
thisx->draw = func_808ACCB8;
|
||||
|
||||
if (gSaveContext.eventChkInf[1] & 0x2000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_1D)) {
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
break;
|
||||
|
@ -131,7 +130,7 @@ void func_808AC908(BgSpot02Objects* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->csCtx.state != 0) {
|
||||
if (globalCtx->csCtx.npcActions[3] != NULL && globalCtx->csCtx.npcActions[3]->action == 2) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
|
||||
gSaveContext.eventChkInf[1] |= 0x2000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1D);
|
||||
this->timer = 25;
|
||||
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;
|
||||
|
|
|
@ -123,7 +123,7 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_SetJntSph(globalCtx, &this->collider, thisx, &sJntSphInit, this->colliderItem);
|
||||
|
||||
if (LINK_IS_ADULT && Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
if (!(gSaveContext.eventChkInf[6] & 0x200)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_69)) {
|
||||
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_LOWERED;
|
||||
} else {
|
||||
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_RAISED;
|
||||
|
@ -149,7 +149,7 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_ProcessInitChain(thisx, sInitChainWaterPlane);
|
||||
thisx->flags = ACTOR_FLAG_4 | ACTOR_FLAG_5;
|
||||
|
||||
if (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200)) {
|
||||
if (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_69)) {
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
this->lakeHyliaWaterLevel = -681.0f;
|
||||
globalCtx->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface =
|
||||
|
@ -483,7 +483,7 @@ void BgSpot06Objects_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
* cleared.
|
||||
*/
|
||||
void BgSpot06Objects_WaterPlaneCutsceneWait(BgSpot06Objects* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[6] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_69)) {
|
||||
this->actionFunc = BgSpot06Objects_WaterPlaneCutsceneRise;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,9 @@ s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
|||
return this->dyna.actor.params == 0;
|
||||
}
|
||||
|
||||
carpentersRescued = (gSaveContext.eventChkInf[9] & 0xF) == 0xF;
|
||||
carpentersRescued =
|
||||
CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK);
|
||||
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
switch (this->dyna.actor.params) {
|
||||
|
@ -138,7 +140,8 @@ void BgSpot09Obj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgSpot09Obj* this = (BgSpot09Obj*)thisx;
|
||||
|
||||
osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", this->dyna.actor.params,
|
||||
gSaveContext.eventChkInf[9] & 0xF);
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] &
|
||||
(EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK));
|
||||
this->dyna.actor.params &= 0xFF;
|
||||
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",
|
||||
|
|
|
@ -109,7 +109,7 @@ s32 func_808B3AAC(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (rotY < 0x2000 && rotY > -0x6000) {
|
||||
return gSaveContext.eventChkInf[1] & 0x10;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_14);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->unk_170.x = this->dyna.actor.world.pos.x;
|
||||
this->unk_170.y = this->dyna.actor.world.pos.y;
|
||||
this->unk_170.z = this->dyna.actor.world.pos.z;
|
||||
if (gSaveContext.infTable[7] & 2) {
|
||||
if (GET_INFTABLE(INFTABLE_71)) {
|
||||
this->dyna.actor.world.pos.z = 2659.0f;
|
||||
}
|
||||
this->actionFunc = func_808B4930;
|
||||
|
@ -58,7 +58,7 @@ void BgSpot15Saku_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808B4930(BgSpot15Saku* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_168 && !(gSaveContext.infTable[7] & 2)) {
|
||||
if (this->unk_168 && !GET_INFTABLE(INFTABLE_71)) {
|
||||
this->timer = 2;
|
||||
this->actionFunc = func_808B4978;
|
||||
}
|
||||
|
|
|
@ -443,7 +443,7 @@ void func_808B5950(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
|
|||
OnePointCutscene_Init(globalCtx, 4180, 50, NULL, MAIN_CAM);
|
||||
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
gSaveContext.eventChkInf[2] |= 8;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_23);
|
||||
|
||||
func_808B5A78(this);
|
||||
} else {
|
||||
|
|
|
@ -70,7 +70,7 @@ void BgSpot16Doughnut_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "%f" VT_RST "\n", this->actor.scale.x);
|
||||
if (!LINK_IS_ADULT || gSaveContext.eventChkInf[2] & 0x8000) {
|
||||
if (!LINK_IS_ADULT || GET_EVENTCHKINF(EVENTCHKINF_2F)) {
|
||||
this->fireFlag &= ~1;
|
||||
} else {
|
||||
this->fireFlag |= 1;
|
||||
|
|
|
@ -47,7 +47,7 @@ void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (param == 0) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
this->actionFunc = func_808B95AC;
|
||||
this->dyna.actor.world.pos.y += 180.0f;
|
||||
} else {
|
||||
|
@ -62,7 +62,7 @@ void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
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->actionFunc = func_808B95AC;
|
||||
|
@ -93,7 +93,7 @@ void func_808B95B8(BgSpot18Shutter* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808B9618(BgSpot18Shutter* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
Actor_SetFocus(&this->dyna.actor, 70.0f);
|
||||
if (((this->dyna.actor.params >> 8) & 1) == 0) {
|
||||
this->actionFunc = func_808B9698;
|
||||
|
|
|
@ -46,7 +46,7 @@ void BgTokiHikari_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BgTokiHikari_DoNothing;
|
||||
break;
|
||||
case 1:
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
this->actionFunc = func_808BA204;
|
||||
this->unk_14C = 0.0f;
|
||||
} else {
|
||||
|
|
|
@ -93,13 +93,13 @@ void BgTokiSwd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
|
||||
if (((gSaveContext.eventChkInf[4] & 0x8000) == 0) && (gSaveContext.sceneSetupIndex < 4) &&
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4F) && (gSaveContext.sceneSetupIndex < 4) &&
|
||||
Actor_IsFacingAndNearPlayer(&this->actor, 800.0f, 0x7530) && !Gameplay_InCsMode(globalCtx)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4F);
|
||||
globalCtx->csCtx.segment = D_808BBD90;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
if (!LINK_IS_ADULT || ((gSaveContext.eventChkInf[5] & 0x20))) {
|
||||
if (!LINK_IS_ADULT || GET_EVENTCHKINF(EVENTCHKINF_55)) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Item_Give(globalCtx, ITEM_SWORD_MASTER);
|
||||
|
|
|
@ -139,9 +139,9 @@ void func_808BC864(BgTreemouth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
|
||||
if ((!(Flags_GetEventChkInf(5))) || LINK_IS_ADULT) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_05) || LINK_IS_ADULT) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0xC)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_0C)) {
|
||||
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_0;
|
||||
if (this->dyna.actor.isTargeted) {
|
||||
|
@ -152,7 +152,7 @@ void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x4E20)) {
|
||||
Flags_SetEventChkInf(0xC);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_0C);
|
||||
globalCtx->csCtx.segment = D_808BCE20;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
BgTreemouth_SetupAction(this, func_808BC9EC);
|
||||
|
@ -184,7 +184,7 @@ void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
globalCtx->csCtx.segment = D_808BD520;
|
||||
Flags_SetEventChkInf(5);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_05);
|
||||
BgTreemouth_SetupAction(this, func_808BCAF0);
|
||||
} else {
|
||||
globalCtx->csCtx.segment = D_808BD790;
|
||||
|
@ -234,7 +234,7 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) {
|
||||
if (gSaveContext.eventChkInf[0] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_07)) {
|
||||
alpha = 2150;
|
||||
}
|
||||
} else { // neeeded to match
|
||||
|
|
|
@ -41,7 +41,7 @@ void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.actor.params == 1) {
|
||||
if (!Flags_GetEventChkInf(0x18) && (DREG(1) == 0)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -333,7 +333,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
this->cameraAt.z = player->actor.world.pos.z;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 2) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
|
||||
if (this->unk_198 == 100) {
|
||||
this->actor.world.pos.x = -1114.0f;
|
||||
this->actor.world.pos.z = -2804.0f;
|
||||
|
@ -374,7 +374,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
case 4:
|
||||
Math_SmoothStepToF(&this->unk_20C, 0.0f, 1.0f, 0.01f, 0.0f);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 2) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
|
||||
phi_f0 = -50.0f;
|
||||
} else {
|
||||
phi_f0 = 0.0f;
|
||||
|
@ -402,7 +402,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_198 == 0x5A) {
|
||||
if (!(gSaveContext.eventChkInf[7] & 2)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_71)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(&object_kingdodongo_Blob_017410), 0xA0, 0xB4, 0x80,
|
||||
0x28);
|
||||
|
@ -422,7 +422,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
this->unk_1DA = 50;
|
||||
this->unk_1BC = 0;
|
||||
player->actor.shape.rot.y = -0x4002;
|
||||
gSaveContext.eventChkInf[7] |= 2;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_71);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -342,7 +342,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
this->timers[0] = 0;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.accel = 0.0f;
|
||||
if (gSaveContext.eventChkInf[7] & 8) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
this->introState = BFD_CS_EMERGE;
|
||||
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;
|
||||
|
@ -464,7 +464,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("WAY_SPD X = %f\n", this->camData.atVel.x);
|
||||
osSyncPrintf("WAY_SPD Y = %f\n", this->camData.atVel.y);
|
||||
osSyncPrintf("WAY_SPD Z = %f\n", this->camData.atVel.z);
|
||||
if ((this->timers[3] > 190) && !(gSaveContext.eventChkInf[7] & 8)) {
|
||||
if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
@ -492,7 +492,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
if (this->timers[3] == 160) {
|
||||
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) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
@ -543,7 +543,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->actionFunc = BossFd_Wait;
|
||||
this->handoffSignal = FD2_SIGNAL_GROUND;
|
||||
gSaveContext.eventChkInf[7] |= 8;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_73);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -564,7 +564,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamIndex, CAM_STAT_ACTIVE);
|
||||
this->csCamFov = 60.0f;
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_78)) {
|
||||
// watched cutscene already, skip most of it
|
||||
this->csState = 17;
|
||||
this->csTimer = 0;
|
||||
|
@ -1083,12 +1083,12 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) {
|
|||
gSegments[6] = VIRTUAL_TO_PHYSICAL(
|
||||
globalCtx->objectCtx.status[Object_GetIndex(&globalCtx->objectCtx, OBJECT_GANON)].segment);
|
||||
|
||||
if (!(gSaveContext.eventChkInf[7] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_78)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gDorfTitleCardTex), 160, 180, 128, 40);
|
||||
}
|
||||
|
||||
gSaveContext.eventChkInf[7] |= 0x100;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_78);
|
||||
}
|
||||
|
||||
if (this->csTimer >= 20) {
|
||||
|
|
|
@ -680,7 +680,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
// entrance of the boss room
|
||||
if (fabsf(player->actor.world.pos.x - 150.0f) < 60.0f &&
|
||||
fabsf(player->actor.world.pos.z - 350.0f) < 60.0f) {
|
||||
if (gSaveContext.eventChkInf[7] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_70)) {
|
||||
BossGoma_SetupEncounterState4(this, globalCtx);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_SHUTTER, 164.72f,
|
||||
-480.0f, 397.68002f, 0, -0x705C, 0, 0x180);
|
||||
|
@ -919,13 +919,13 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
if (Animation_OnFrame(&this->skelanime, 40.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_CRY1);
|
||||
|
||||
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
gSaveContext.eventChkInf[7] |= 1;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_70);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelanime, this->currentAnimFrameCount)) {
|
||||
|
|
|
@ -359,7 +359,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
MO_WATER_LEVEL(globalCtx) = -500;
|
||||
return;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[7] & 0x10) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_74)) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
this->tentMaxAngle = 5.0f;
|
||||
this->timers[0] = 50;
|
||||
|
@ -1424,7 +1424,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
if (this->timers[2] == 130) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
gSaveContext.eventChkInf[7] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_74);
|
||||
}
|
||||
break;
|
||||
case MO_INTRO_FINISH:
|
||||
|
|
|
@ -378,7 +378,7 @@ void BossSst_HeadSetupIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_ACTIVE);
|
||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||
if (gSaveContext.eventChkInf[7] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
sCameraEye.z = ROOM_CENTER_Z - 100.0f;
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, sCutsceneCamera);
|
||||
gSaveContext.eventChkInf[7] |= 0x80;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_77);
|
||||
BossSst_HeadSetupNeutral(this);
|
||||
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||
sHands[LEFT]->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||
|
@ -437,7 +437,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
this->ready = true;
|
||||
func_800AA000(this->actor.xyzDistToPlayerSq, 0xFF, 0x14, 0x96);
|
||||
Audio_PlayActorSound2(&sFloor->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH);
|
||||
} else if (gSaveContext.eventChkInf[7] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
sHands[RIGHT]->actor.draw = BossSst_DrawHand;
|
||||
sHands[LEFT]->actor.draw = BossSst_DrawHand;
|
||||
this->actor.draw = BossSst_DrawHead;
|
||||
|
@ -564,7 +564,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->timer <= 198) {
|
||||
revealStateTimer = 198 - this->timer;
|
||||
if ((gSaveContext.eventChkInf[7] & 0x80) && (revealStateTimer <= 44)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_77) && (revealStateTimer <= 44)) {
|
||||
sCameraAt.x += 492.0f * 0.01f;
|
||||
sCameraAt.y += 200.0f * 0.01f;
|
||||
sCameraEye.x -= 80.0f * 0.01f;
|
||||
|
@ -593,7 +593,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
sCameraEye.y += 125.0f * 0.01f;
|
||||
sCameraEye.z -= 350.0f * 0.01f;
|
||||
} else if (revealStateTimer == 85) {
|
||||
if (!(gSaveContext.eventChkInf[7] & 0x80)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex), 160, 180, 128, 40);
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOTAKE;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_tw_Skel_0070E0, &object_tw_Anim_006F28, NULL, NULL, 0);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
|
||||
// began twinrova battle
|
||||
BossTw_SetupFlyTo(this, globalCtx);
|
||||
this->actor.world.pos.x = -600.0f;
|
||||
|
@ -532,7 +532,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOUME;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_tw_Skel_01F888, &object_tw_Anim_006F28, NULL, NULL, 0);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
|
||||
// began twinrova battle
|
||||
BossTw_SetupFlyTo(this, globalCtx);
|
||||
this->actor.world.pos.x = 600.0f;
|
||||
|
@ -554,7 +554,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_tw_Skel_032020, &object_tw_Anim_0244B4, NULL, NULL, 0);
|
||||
Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_0244B4, -3.0f);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
|
||||
// began twinrova battle
|
||||
BossTw_SetupWait(this, globalCtx);
|
||||
} else {
|
||||
|
@ -2227,7 +2227,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(object_tw_Blob_02E170), 0xA0, 0xB4, 0x80, 0x28);
|
||||
gSaveContext.eventChkInf[7] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_75);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
|
||||
|
|
|
@ -627,7 +627,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
0, BOSSVA_DOOR);
|
||||
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
|
||||
warpId = ACTOR_EN_RU1;
|
||||
if (gSaveContext.eventChkInf[3] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_37)) {
|
||||
warpId = ACTOR_DOOR_WARP1;
|
||||
}
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, warpId, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
|
@ -640,7 +640,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
} else {
|
||||
this->actor.colChkInfo.damageTable = sDamageTable;
|
||||
sPhase2Timer = 0xFFFF;
|
||||
if (gSaveContext.eventChkInf[7] & 0x40) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_76)) {
|
||||
sCsState = INTRO_CALL_BARI;
|
||||
sDoorState = 100;
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
|
@ -975,7 +975,7 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
sCameraNextAt.y = 140.0f;
|
||||
sCameraNextAt.z = -200.0f;
|
||||
|
||||
if (!(gSaveContext.eventChkInf[7] & 0x40)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_76)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
@ -1017,7 +1017,7 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
sCsState++;
|
||||
gSaveContext.eventChkInf[7] |= 0x40;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_76);
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -491,7 +491,7 @@ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->jewel.isPositionInit = 0;
|
||||
DemoEffect_InitJewel(globalCtx, this);
|
||||
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTOR_EN_DOOR);
|
||||
if ((globalCtx->sceneNum == SCENE_BDAN) && (gSaveContext.infTable[20] & 0x20)) {
|
||||
if ((globalCtx->sceneNum == SCENE_BDAN) && GET_INFTABLE(INFTABLE_145)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -696,7 +696,7 @@ void DemoEffect_InitTimeWarp(DemoEffect* this, GlobalContext* globalCtx) {
|
|||
Actor_SetScale(&this->actor, 84 * 0.001f);
|
||||
}
|
||||
} else if (gSaveContext.sceneSetupIndex == 5 || gSaveContext.sceneSetupIndex == 4 ||
|
||||
(gSaveContext.entranceIndex == 0x0324 && !((gSaveContext.eventChkInf[12] & 0x200)))) {
|
||||
(gSaveContext.entranceIndex == 0x0324 && !GET_EVENTCHKINF(EVENTCHKINF_C9))) {
|
||||
SkelCurve_SetAnim(&this->skelCurve, &gTimeWarpAnim, 1.0f, 59.0f, 59.0f, 0.0f);
|
||||
SkelCurve_Update(globalCtx, &this->skelCurve);
|
||||
this->updateFunc = DemoEffect_UpdateTimeWarpReturnFromChamberOfSages;
|
||||
|
@ -760,7 +760,7 @@ void DemoEffect_UpdateTimeWarpReturnFromChamberOfSages(DemoEffect* this, GlobalC
|
|||
|
||||
if (this->timeWarp.shrinkTimer > 250) {
|
||||
if (gSaveContext.entranceIndex == 0x0324) {
|
||||
gSaveContext.eventChkInf[12] |= 0x200;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_C9);
|
||||
}
|
||||
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -1560,8 +1560,8 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->csCtx.state && globalCtx->csCtx.npcActions[this->csActionId]) {
|
||||
switch (globalCtx->csCtx.npcActions[this->csActionId]->action) {
|
||||
case 3:
|
||||
if (gSaveContext.eventChkInf[4] & 0x800) {
|
||||
gSaveContext.eventChkInf[4] |= 0x800;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4B);
|
||||
}
|
||||
DemoEffect_MoveJewelActivateDoorOfTime(this, globalCtx);
|
||||
if ((globalCtx->gameplayFrames & 1) == 0) {
|
||||
|
@ -1594,7 +1594,7 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (gSaveContext.entranceIndex == 0x0053) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
hasCmdAction = globalCtx->csCtx.state && globalCtx->csCtx.npcActions[this->csActionId];
|
||||
if (!hasCmdAction) {
|
||||
this->effectFlags |= 0x1;
|
||||
|
|
|
@ -890,7 +890,7 @@ void func_80986BE4(DemoIm* this, s32 arg1) {
|
|||
}
|
||||
|
||||
void func_80986BF8(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
this->action = 24;
|
||||
this->drawConfig = 1;
|
||||
this->unk_280 = 1;
|
||||
|
@ -902,14 +902,14 @@ void func_80986C30(DemoIm* this, GlobalContext* globalCtx) {
|
|||
if (func_80986A5C(this, globalCtx)) {
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardLullabyCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
gSaveContext.eventChkInf[5] |= 0x200;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_59);
|
||||
Item_Give(globalCtx, ITEM_SONG_LULLABY);
|
||||
func_80985F54(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80986CC8(DemoIm* this) {
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
this->action = 26;
|
||||
this->drawConfig = 1;
|
||||
this->unk_280 = 1;
|
||||
|
@ -919,7 +919,7 @@ void func_80986CC8(DemoIm* this) {
|
|||
|
||||
void func_80986CFC(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if (func_80986A5C(this, globalCtx)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x1000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4C);
|
||||
this->action = 19;
|
||||
}
|
||||
}
|
||||
|
@ -928,9 +928,9 @@ void func_80986D40(DemoIm* this, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.sceneSetupIndex == 6) {
|
||||
this->action = 19;
|
||||
this->drawConfig = 1;
|
||||
} else if (gSaveContext.eventChkInf[8] & 1) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (!(gSaveContext.eventChkInf[5] & 0x200)) {
|
||||
} else if (!GET_EVENTCHKINF(EVENTCHKINF_59)) {
|
||||
this->action = 23;
|
||||
} else {
|
||||
this->action = 20;
|
||||
|
|
|
@ -232,7 +232,7 @@ void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case DEMOKANKYO_DOOR_OF_TIME:
|
||||
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f;
|
||||
this->unk_150[0].unk_18 = 0.0f;
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_TOKI,
|
||||
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
|
||||
0x0000);
|
||||
|
@ -411,7 +411,7 @@ void DemoKankyo_UpdateDoorOfTime(DemoKankyo* this, GlobalContext* globalCtx) {
|
|||
this->unk_150[0].unk_18 += 1.0f;
|
||||
if (this->unk_150[0].unk_18 >= 102.0f) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_STONEDOOR_STOP);
|
||||
gSaveContext.eventChkInf[4] |= 0x800;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4B);
|
||||
Actor_Kill(this->actor.child);
|
||||
DemoKankyo_SetupAction(this, DemoKankyo_KillDoorOfTimeCollision);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,9 @@ static u8 sEnergyColors[] = {
|
|||
};
|
||||
|
||||
s32 DemoKekkai_CheckEventFlag(s32 params) {
|
||||
static s32 eventFlags[] = { 0xC3, 0xBC, 0xBF, 0xBE, 0xBD, 0xAD, 0xBB };
|
||||
static s32 eventFlags[] = {
|
||||
EVENTCHKINF_C3, EVENTCHKINF_BC, EVENTCHKINF_BF, EVENTCHKINF_BE, EVENTCHKINF_BD, EVENTCHKINF_AD, EVENTCHKINF_BB,
|
||||
};
|
||||
|
||||
if ((params < KEKKAI_TOWER) || (params > KEKKAI_FOREST)) {
|
||||
return true;
|
||||
|
@ -167,7 +169,7 @@ void DemoKekkai_TowerBarrier(DemoKekkai* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->timer++;
|
||||
if (this->timer > 100) {
|
||||
Flags_SetEventChkInf(0xC3);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_C3);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
} else if (this->timer > 40) {
|
||||
|
|
|
@ -598,7 +598,7 @@ void func_809975C0(DoorShutter* this, GlobalContext* globalCtx) {
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
if (this->dyna.actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
DoorShutter_SetupAction(this, func_809976B8);
|
||||
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
|
||||
BossGoma* parent = (BossGoma*)this->dyna.actor.parent;
|
||||
|
||||
this->unk_164 = 10;
|
||||
|
|
|
@ -49,7 +49,7 @@ void DoorToki_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void DoorToki_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DoorToki* this = (DoorToki*)thisx;
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x800) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
|
|
@ -498,8 +498,8 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
TRANS_TRIGGER_START);
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_DDAN_BOSS) {
|
||||
if (!Flags_GetEventChkInf(0x25)) {
|
||||
Flags_SetEventChkInf(0x25);
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_25)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_25);
|
||||
Item_Give(globalCtx, ITEM_GORON_RUBY);
|
||||
globalCtx->nextEntranceIndex = 0x13D;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
|
@ -508,9 +508,9 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_YDAN_BOSS) {
|
||||
if (!Flags_GetEventChkInf(7)) {
|
||||
Flags_SetEventChkInf(7);
|
||||
Flags_SetEventChkInf(9);
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_07)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_07);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_09);
|
||||
Item_Give(globalCtx, ITEM_KOKIRI_EMERALD);
|
||||
globalCtx->nextEntranceIndex = 0xEE;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
|
@ -605,7 +605,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
this->warpTimer++;
|
||||
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
|
||||
gSaveContext.eventChkInf[3] |= 0x80;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_37);
|
||||
Item_Give(globalCtx, ITEM_ZORA_SAPPHIRE);
|
||||
globalCtx->nextEntranceIndex = 0x10E;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
|
@ -706,8 +706,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
|
||||
if (globalCtx->sceneNum == SCENE_MORIBOSSROOM) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x100)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x100;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_48)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_48);
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_FOREST);
|
||||
globalCtx->nextEntranceIndex = 0x6B;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
|
@ -721,8 +721,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_FIRE_BS) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x200)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x200;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_49)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_49);
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_FIRE);
|
||||
globalCtx->nextEntranceIndex = 0xDB;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF3;
|
||||
|
@ -735,8 +735,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_MIZUSIN_BS) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x400)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x400;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4A)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4A);
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_WATER);
|
||||
globalCtx->nextEntranceIndex = 0x6B;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
|
|
|
@ -79,7 +79,7 @@ void EfcErupc_UpdateAction(EfcErupc* this, GlobalContext* globalCtx) {
|
|||
case 2:
|
||||
if (this->unk_14E == 0) {
|
||||
func_800F3F3C(6);
|
||||
gSaveContext.eventChkInf[2] |= 0x8000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_2F);
|
||||
}
|
||||
this->unk_14E++;
|
||||
break;
|
||||
|
|
|
@ -123,7 +123,7 @@ void func_809B0558(EnAni* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
}
|
||||
gSaveContext.itemGetInf[1] |= 0x20;
|
||||
SET_ITEMGETINF(ITEMGETINF_15);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_15)) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056);
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055);
|
||||
|
@ -187,16 +187,16 @@ void func_809B07F8(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (yawDiff > -0x36B0 && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_15)) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056);
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055);
|
||||
}
|
||||
} else if (yawDiff > -0x3E8 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
||||
if (!(gSaveContext.eventChkInf[2] & 0x8000)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_2F)) {
|
||||
textId = 0x5052;
|
||||
} else {
|
||||
textId = (gSaveContext.itemGetInf[1] & 0x20) ? 0x5054 : 0x5053;
|
||||
textId = GET_ITEMGETINF(ITEMGETINF_15) ? 0x5054 : 0x5053;
|
||||
}
|
||||
EnAni_SetText(this, globalCtx, textId);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->dialogState = TEXT_STATE_EVENT;
|
||||
|
||||
// Check for beaten Dodongo's Cavern
|
||||
if ((gSaveContext.eventChkInf[2] & 0x20) || BREG(2)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_25) || BREG(2)) {
|
||||
this->actor.textId = 0xBF;
|
||||
} else {
|
||||
this->actor.textId = 0x7058;
|
||||
|
@ -164,7 +164,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
|
||||
|
||||
// Check for beaten Dodongo's Cavern
|
||||
if (!((gSaveContext.eventChkInf[2] & 0x20) || BREG(2))) {
|
||||
if (!(GET_EVENTCHKINF(EVENTCHKINF_25) || BREG(2))) {
|
||||
this->actionFunc = EnBomBowMan_WaitNotBeatenDC;
|
||||
} else {
|
||||
this->actor.textId = 0x18;
|
||||
|
@ -389,7 +389,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
switch (this->prizeSelect) {
|
||||
case 0:
|
||||
prizeTemp = EXITEM_BOMB_BAG_BOWLING;
|
||||
if (gSaveContext.itemGetInf[1] & 2) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_11)) {
|
||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||
}
|
||||
break;
|
||||
|
@ -401,7 +401,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 3:
|
||||
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
||||
if (gSaveContext.itemGetInf[1] & 4) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_12)) {
|
||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -157,10 +157,10 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
if (this->exItemDone != 0) {
|
||||
switch (this->prizeIndex) {
|
||||
case EXITEM_BOMB_BAG_BOWLING:
|
||||
gSaveContext.itemGetInf[1] |= 2;
|
||||
SET_ITEMGETINF(ITEMGETINF_11);
|
||||
break;
|
||||
case EXITEM_HEART_PIECE_BOWLING:
|
||||
gSaveContext.itemGetInf[1] |= 4;
|
||||
SET_ITEMGETINF(ITEMGETINF_12);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void EnChanger_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
minigameRoomNum *= 2;
|
||||
// Spawn Heart Piece in chest (or Purple Rupee if won Heart Piece)
|
||||
if (globalCtx->roomCtx.curRoom.num >= 6) {
|
||||
rewardChestParams = ((gSaveContext.itemGetInf[1] & 0x800) ? (0x4EA0) : (0x4EC0));
|
||||
rewardChestParams = GET_ITEMGETINF(ITEMGETINF_1B) ? 0x4EA0 : 0x4EC0;
|
||||
rewardChestParams = sTreasureFlags[5] | rewardChestParams;
|
||||
this->finalChest = (EnBox*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_BOX,
|
||||
20.0f, 20.0f, -2500.0f, 0, 0x7FFF, 0, rewardChestParams);
|
||||
|
@ -111,8 +111,8 @@ void EnChanger_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
} else {
|
||||
rewardParams = ((gSaveContext.itemGetInf[1] & 0x800) ? (ITEM_ETC_RUPEE_PURPLE_CHEST_GAME)
|
||||
: (ITEM_ETC_HEART_PIECE_CHEST_GAME)) &
|
||||
rewardParams = (GET_ITEMGETINF(ITEMGETINF_1B) ? ITEM_ETC_RUPEE_PURPLE_CHEST_GAME
|
||||
: ITEM_ETC_HEART_PIECE_CHEST_GAME) &
|
||||
0xFF;
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_ETCETERA, 20.0f, 20.0f, -2500.0f, 0, 0, 0,
|
||||
((sTreasureFlags[5] & 0x1F) << 8) + rewardParams);
|
||||
|
@ -276,8 +276,8 @@ void EnChanger_OpenChests(EnChanger* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnChanger_SetHeartPieceFlag(EnChanger* this, GlobalContext* globalCtx) {
|
||||
if (this->finalChest->unk_1F4 != 0) {
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x800)) {
|
||||
gSaveContext.itemGetInf[1] |= 0x800;
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1B)) {
|
||||
SET_ITEMGETINF(ITEMGETINF_1B);
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x4000)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1E)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ s32 EnCs_GetTalkState(EnCs* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.textId == 0x2026) {
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
gSaveContext.itemGetInf[3] |= 0x400;
|
||||
SET_ITEMGETINF(ITEMGETINF_3A);
|
||||
Rupees_ChangeBy(30);
|
||||
this->actor.textId = 0x2027;
|
||||
talkState = 2;
|
||||
|
@ -210,7 +210,7 @@ s32 EnCs_GetTextID(EnCs* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 textId = Text_GetFaceReaction(globalCtx, 15);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
if (textId == 0) {
|
||||
textId = 0x2028;
|
||||
}
|
||||
|
@ -333,14 +333,14 @@ void EnCs_Walk(EnCs* this, GlobalContext* globalCtx) {
|
|||
animIndex = this->currentAnimIndex;
|
||||
|
||||
if (this->talkState == 0) {
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
rnd = Rand_ZeroOne() * 10.0f;
|
||||
} else {
|
||||
rnd = Rand_ZeroOne() * 5.0f;
|
||||
}
|
||||
|
||||
if (rnd == 0) {
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
animIndex = 2.0f * Rand_ZeroOne();
|
||||
animIndex = (animIndex == 0) ? ENCS_ANIM_2 : ENCS_ANIM_1;
|
||||
} else {
|
||||
|
@ -469,7 +469,7 @@ void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
s32 childLinkObjectIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
|
||||
// Handle attaching the Spooky Mask to the boy's face
|
||||
|
|
|
@ -152,13 +152,13 @@ void EnDaiku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 noKill = true;
|
||||
s32 isFree = false;
|
||||
|
||||
if ((this->actor.params & 3) == 0 && (gSaveContext.eventChkInf[9] & 1)) {
|
||||
if ((this->actor.params & 3) == 0 && GET_EVENTCHKINF(EVENTCHKINF_90)) {
|
||||
isFree = true;
|
||||
} else if ((this->actor.params & 3) == 1 && (gSaveContext.eventChkInf[9] & 2)) {
|
||||
} else if ((this->actor.params & 3) == 1 && GET_EVENTCHKINF(EVENTCHKINF_91)) {
|
||||
isFree = true;
|
||||
} else if ((this->actor.params & 3) == 2 && (gSaveContext.eventChkInf[9] & 4)) {
|
||||
} else if ((this->actor.params & 3) == 2 && GET_EVENTCHKINF(EVENTCHKINF_92)) {
|
||||
isFree = true;
|
||||
} else if ((this->actor.params & 3) == 3 && (gSaveContext.eventChkInf[9] & 8)) {
|
||||
} else if ((this->actor.params & 3) == 3 && GET_EVENTCHKINF(EVENTCHKINF_93)) {
|
||||
isFree = true;
|
||||
}
|
||||
|
||||
|
@ -238,10 +238,10 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x6061:
|
||||
gSaveContext.infTable[23] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_176);
|
||||
break;
|
||||
case 0x6064:
|
||||
gSaveContext.infTable[23] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_178);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,8 @@ void EnDaiku_UpdateText(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) {
|
||||
freedCount = 0;
|
||||
for (carpenterType = 0; carpenterType < 4; carpenterType++) {
|
||||
if (gSaveContext.eventChkInf[9] & (1 << carpenterType)) {
|
||||
if (gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] &
|
||||
(1 << (carpenterType + EVENTCHKINF_90_SHIFT))) {
|
||||
freedCount++;
|
||||
}
|
||||
}
|
||||
|
@ -307,7 +308,7 @@ void EnDaiku_UpdateText(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||
this->actor.textId = 0x6063;
|
||||
} else {
|
||||
if (!(gSaveContext.infTable[23] & 0x40)) {
|
||||
if (!GET_INFTABLE(INFTABLE_176)) {
|
||||
this->actor.textId = 0x6061;
|
||||
} else {
|
||||
this->actor.textId = 0x6062;
|
||||
|
@ -318,7 +319,7 @@ void EnDaiku_UpdateText(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||
this->actor.textId = 0x6066;
|
||||
} else {
|
||||
if (!(gSaveContext.infTable[23] & 0x100)) {
|
||||
if (!GET_INFTABLE(INFTABLE_178)) {
|
||||
this->actor.textId = 0x6064;
|
||||
} else {
|
||||
this->actor.textId = 0x6065;
|
||||
|
@ -399,7 +400,7 @@ void EnDaiku_InitEscape(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_RUN, &this->currentAnimIndex);
|
||||
this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
|
||||
|
||||
gSaveContext.eventChkInf[9] |= 1 << (this->actor.params & 3);
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] |= 1 << ((this->actor.params & 3) + EVENTCHKINF_90_SHIFT);
|
||||
|
||||
this->actor.gravity = -1.0f;
|
||||
this->escapeSubCamTimer = sEscapeSubCamParams[this->actor.params & 3].maxFramesActive;
|
||||
|
@ -494,7 +495,8 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
this->subCamActive = false;
|
||||
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->initRot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&D_809E4148, &vec);
|
||||
gerudoGuard =
|
||||
|
|
|
@ -215,10 +215,10 @@ s32 EnDaikuKakariko_GetTalkState(EnDaikuKakariko* this, GlobalContext* globalCtx
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x6061:
|
||||
gSaveContext.infTable[23] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_176);
|
||||
break;
|
||||
case 0x6064:
|
||||
gSaveContext.infTable[23] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_178);
|
||||
break;
|
||||
}
|
||||
talkState = 0;
|
||||
|
|
|
@ -140,14 +140,14 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt
|
|||
} else {
|
||||
s32 rupeesNeeded = 5;
|
||||
|
||||
if (gSaveContext.eventChkInf[3] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
rupeesNeeded = 10;
|
||||
}
|
||||
if (this->grabbedRupeesCounter >= rupeesNeeded) {
|
||||
// Won.
|
||||
gSaveContext.timer1State = 0;
|
||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->actor.textId = 0x4055;
|
||||
} else {
|
||||
this->actor.textId = 0x405D;
|
||||
|
@ -160,7 +160,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt
|
|||
func_800F5B58();
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->actionFunc = func_809EE96C;
|
||||
} else {
|
||||
this->actionFunc = func_809EE048;
|
||||
|
@ -206,7 +206,7 @@ void EnDivingGame_Talk(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
switch (this->state) {
|
||||
case ENDIVINGGAME_STATE_NOTPLAYING:
|
||||
this->unk_292 = TEXT_STATE_CHOICE;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->actor.textId = 0x4053;
|
||||
this->phase = ENDIVINGGAME_PHASE_1;
|
||||
} else {
|
||||
|
@ -248,7 +248,7 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, GlobalContext* globalCtx)
|
|||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
break;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100) || this->actor.textId == 0x85 || this->actor.textId == 0x2D) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38) || this->actor.textId == 0x85 || this->actor.textId == 0x2D) {
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_809EE048;
|
||||
|
@ -307,7 +307,7 @@ void EnDivingGame_SetupRupeeThrow(EnDivingGame* this, GlobalContext* globalCtx)
|
|||
this->unk_2D0.x = -280.0f;
|
||||
this->unk_2D0.y = -20.0f;
|
||||
this->unk_2D0.z = -240.0f;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->rupeesLeftToThrow = 5;
|
||||
} else {
|
||||
this->rupeesLeftToThrow = 10;
|
||||
|
@ -351,7 +351,7 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
this->spawnRuppyTimer = 5;
|
||||
EnDivingGame_SpawnRuppy(this, globalCtx);
|
||||
this->rupeesLeftToThrow--;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->unk_296 = 30;
|
||||
} else {
|
||||
this->unk_296 = 5;
|
||||
|
@ -409,7 +409,7 @@ void func_809EE800(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
func_80088B34(BREG(2) + 50);
|
||||
} else {
|
||||
func_80088B34(BREG(2) + 50);
|
||||
|
@ -472,7 +472,7 @@ void func_809EEAF8(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
gSaveContext.eventChkInf[3] |= 0x100;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_38);
|
||||
this->actionFunc = func_809EDCB0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ void func_809EFA28(EnDns* this) {
|
|||
}
|
||||
|
||||
void func_809EFA58(EnDns* this) {
|
||||
gSaveContext.itemGetInf[0] |= 0x800;
|
||||
SET_ITEMGETINF(ITEMGETINF_0B);
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
}
|
||||
|
||||
|
@ -303,12 +303,12 @@ void func_809EFACC(EnDns* this) {
|
|||
}
|
||||
|
||||
void func_809EFAFC(EnDns* this) {
|
||||
gSaveContext.infTable[25] |= 0x4;
|
||||
SET_INFTABLE(INFTABLE_192);
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
}
|
||||
|
||||
void func_809EFB40(EnDns* this) {
|
||||
gSaveContext.infTable[25] |= 0x8;
|
||||
SET_INFTABLE(INFTABLE_193);
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,14 +156,14 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
delay = 0;
|
||||
switch (Player_GetMask(globalCtx)) {
|
||||
case PLAYER_MASK_SKULL:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x4000)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1E)) {
|
||||
reaction = DNT_SIGNAL_CELEBRATE;
|
||||
this->prize = DNT_PRIZE_STICK;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SARIA_THEME);
|
||||
break;
|
||||
}
|
||||
case PLAYER_MASK_TRUTH:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x8000) && (Player_GetMask(globalCtx) != PLAYER_MASK_SKULL)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1F) && (Player_GetMask(globalCtx) != PLAYER_MASK_SKULL)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->prize = DNT_PRIZE_NUTS;
|
||||
|
|
|
@ -283,7 +283,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("実 \n");
|
||||
osSyncPrintf("実 \n");
|
||||
osSyncPrintf("実 \n");
|
||||
gSaveContext.itemGetInf[1] |= 0x8000;
|
||||
SET_ITEMGETINF(ITEMGETINF_1F);
|
||||
} else {
|
||||
// "stick"
|
||||
osSyncPrintf("棒 \n");
|
||||
|
@ -292,7 +292,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("棒 \n");
|
||||
osSyncPrintf("棒 \n");
|
||||
osSyncPrintf("棒 \n");
|
||||
gSaveContext.itemGetInf[1] |= 0x4000;
|
||||
SET_ITEMGETINF(ITEMGETINF_1E);
|
||||
}
|
||||
this->actor.textId = 0;
|
||||
if ((this->stage != NULL) && (this->stage->actor.update != NULL)) {
|
||||
|
|
|
@ -246,7 +246,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, GlobalContext* globalCtx) {
|
|||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
// "Big hit"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n" VT_RST, this->hitCounter);
|
||||
if (!LINK_IS_ADULT && !(gSaveContext.itemGetInf[1] & 0x2000)) {
|
||||
if (!LINK_IS_ADULT && !GET_ITEMGETINF(ITEMGETINF_1D)) {
|
||||
this->hitCounter++;
|
||||
if (this->hitCounter >= 3) {
|
||||
OnePointCutscene_Init(globalCtx, 4140, -99, &this->actor, MAIN_CAM);
|
||||
|
|
|
@ -325,10 +325,10 @@ void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx) {
|
|||
// depending on where he is on his path. En_Hy checks these event flags.
|
||||
if (this->waypoint < 9) {
|
||||
// Richard is close to her, text says something about his coat
|
||||
gSaveContext.eventInf[3] |= 1;
|
||||
SET_EVENTINF(EVENTINF_30);
|
||||
} else {
|
||||
// Richard is far, text says something about running fast
|
||||
gSaveContext.eventInf[3] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_30);
|
||||
}
|
||||
} else {
|
||||
frame = globalCtx->state.frames % 3;
|
||||
|
|
|
@ -165,7 +165,7 @@ void EnDoor_SetupType(EnDoor* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (doorType == DOOR_CHECKABLE) {
|
||||
this->actor.textId = (this->actor.params & 0x3F) + 0x0200;
|
||||
if (this->actor.textId == 0x0229 && !(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if (this->actor.textId == 0x0229 && !GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
// 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
|
||||
// check for time of day as the scene setup for Lon Lon merely initializes
|
||||
|
|
|
@ -80,7 +80,7 @@ void EnDs_DisplayOddPotionText(EnDs* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x504F;
|
||||
this->actionFunc = EnDs_TalkAfterGiveOddPotion;
|
||||
this->actor.flags &= ~ACTOR_FLAG_8;
|
||||
gSaveContext.itemGetInf[3] |= 1;
|
||||
SET_ITEMGETINF(ITEMGETINF_30);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ void EnDs_Wait(EnDs* this, GlobalContext* globalCtx) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
player->actor.textId = 0x504A;
|
||||
this->actionFunc = EnDs_OfferOddPotion;
|
||||
} else if (gSaveContext.itemGetInf[3] & 1) {
|
||||
} else if (GET_ITEMGETINF(ITEMGETINF_30)) {
|
||||
player->actor.textId = 0x500C;
|
||||
this->actionFunc = EnDs_OfferBluePotion;
|
||||
} else {
|
||||
|
|
|
@ -111,7 +111,7 @@ u16 func_809FDC38(GlobalContext* globalCtx, Actor* actor) {
|
|||
return 0x301D;
|
||||
}
|
||||
}
|
||||
if (gSaveContext.infTable[0x11] & 8) {
|
||||
if (GET_INFTABLE(INFTABLE_113)) {
|
||||
return 0x301B;
|
||||
} else {
|
||||
return 0x301A;
|
||||
|
@ -126,13 +126,13 @@ s16 func_809FDCDC(GlobalContext* globalCtx, Actor* actor) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (actor->textId) {
|
||||
case 0x301A:
|
||||
gSaveContext.infTable[0x11] |= 8;
|
||||
SET_INFTABLE(INFTABLE_113);
|
||||
break;
|
||||
case 0x301C:
|
||||
case 0x301F:
|
||||
return 2;
|
||||
case 0x3020:
|
||||
gSaveContext.eventChkInf[0x2] |= 4;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_22);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -156,7 +156,7 @@ s16 func_809FDCDC(GlobalContext* globalCtx, Actor* actor) {
|
|||
s32 func_809FDDB4(EnDu* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD) {
|
||||
return 1;
|
||||
} else if (globalCtx->sceneNum == SCENE_HIDAN && !(gSaveContext.infTable[0x11] & 0x400) && LINK_IS_ADULT) {
|
||||
} else if (globalCtx->sceneNum == SCENE_HIDAN && !GET_INFTABLE(INFTABLE_11A) && LINK_IS_ADULT) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -411,7 +411,7 @@ void func_809FE798(EnDu* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
gSaveContext.infTable[0x11] |= 0x400;
|
||||
SET_INFTABLE(INFTABLE_11A);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ void EnEncount2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "☆☆☆☆☆ Death Mountain Encount2 set ☆☆☆☆☆"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ デスマウンテンエンカウント2セットされました ☆☆☆☆☆ %d\n" VT_RST,
|
||||
this->actor.params);
|
||||
if (LINK_IS_ADULT && (gSaveContext.eventChkInf[4] & 0x200)) { // flag for having used fire temple blue warp
|
||||
if (LINK_IS_ADULT && GET_EVENTCHKINF(EVENTCHKINF_49)) { // flag for having used fire temple blue warp
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -411,7 +411,7 @@ void EnExItem_TargetPrizeFinish(EnExItem* this, GlobalContext* globalCtx) {
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
gSaveContext.itemGetInf[1] |= 0x2000;
|
||||
SET_ITEMGETINF(ITEMGETINF_1D);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.gravity = 0.0f;
|
||||
|
||||
// If you haven't won the diving game before, you will always get 5 rupees
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->rupeeValue = 5;
|
||||
this->colorIdx = 1;
|
||||
} else {
|
||||
|
@ -232,7 +232,7 @@ void EnExRuppy_EnterWater(EnExRuppy* this, GlobalContext* globalCtx) {
|
|||
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;
|
||||
temp_f2 = this->unk_15A * -50.0f;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
temp_f2 += -500.0f;
|
||||
this->actor.world.pos.z = ((Rand_ZeroOne() - 0.5f) * 80.0f) + temp_f2;
|
||||
} else {
|
||||
|
|
|
@ -105,9 +105,9 @@ static EnFrPointers sEnFrPointers = {
|
|||
},
|
||||
};
|
||||
|
||||
// Flags for gSaveContext.eventChkInf[13]
|
||||
static u16 sSongIndex[] = {
|
||||
0x0002, 0x0004, 0x0010, 0x0008, 0x0020, 0x0040, 0x0001, 0x0000,
|
||||
EVENTCHKINF_D1_MASK, EVENTCHKINF_D2_MASK, EVENTCHKINF_D4_MASK, EVENTCHKINF_D3_MASK,
|
||||
EVENTCHKINF_D5_MASK, EVENTCHKINF_D6_MASK, EVENTCHKINF_D0_MASK, 0,
|
||||
};
|
||||
|
||||
// Frog to Index for Song Flag (sSongIndex) Mapping
|
||||
|
@ -281,7 +281,10 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.home.pos.z, 255, 255, 255, -1);
|
||||
// Check to see if the song for a particular frog has been played.
|
||||
// If it has, the frog is larger. If not, the frog is smaller
|
||||
this->scale = gSaveContext.eventChkInf[13] & sSongIndex[sFrogToSongIndex[frogIndex]] ? 270.0f : 150.0f;
|
||||
this->scale =
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[sFrogToSongIndex[frogIndex]]
|
||||
? 270.0f
|
||||
: 150.0f;
|
||||
// When the frogs are not active (link doesn't have his ocarina out),
|
||||
// Then shrink the frogs down by a factor of 10,000
|
||||
Actor_SetScale(&this->actor, this->scale * 0.0001f);
|
||||
|
@ -629,12 +632,12 @@ void EnFr_Activate(EnFr* this, GlobalContext* globalCtx) {
|
|||
void EnFr_ActivateCheckFrogSong(EnFr* this, GlobalContext* globalCtx) {
|
||||
if (sEnFrPointers.flags == 11) {
|
||||
// Check if all 6 child songs have been played for the frogs
|
||||
if ((gSaveContext.eventChkInf[13] & 0x2) // ZL
|
||||
&& (gSaveContext.eventChkInf[13] & 0x4) // Epona
|
||||
&& (gSaveContext.eventChkInf[13] & 0x10) // Saria
|
||||
&& (gSaveContext.eventChkInf[13] & 0x8) // Suns
|
||||
&& (gSaveContext.eventChkInf[13] & 0x20) // SoT
|
||||
&& (gSaveContext.eventChkInf[13] & 0x40)) { // SoS
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_D1) // ZL
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D2) // Epona
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D4) // Saria
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D3) // Suns
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D5) // SoT
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D6)) { // SoS
|
||||
this->actionFunc = EnFr_TalkBeforeFrogSong;
|
||||
this->songIndex = FROG_CHOIR_SONG;
|
||||
Message_StartTextbox(globalCtx, 0x40AB, &this->actor);
|
||||
|
@ -724,7 +727,7 @@ void EnFr_ChildSong(EnFr* this, GlobalContext* globalCtx) {
|
|||
if (songIndex == FROG_STORMS) {
|
||||
this->actor.textId = 0x40AA;
|
||||
EnFr_SetupReward(this, globalCtx, false);
|
||||
} else if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
} else if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
frog = sEnFrPointers.frogs[sSongToFrog[songIndex]];
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
if (frog->actionFunc == EnFr_ChooseJumpFromLogSpot) {
|
||||
|
@ -798,7 +801,7 @@ void EnFr_DeactivateButterfly() {
|
|||
}
|
||||
|
||||
u8 EnFr_GetNextNoteFrogSong(u8 ocarinaNoteIndex) {
|
||||
if (!(gSaveContext.eventChkInf[13] & 1)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_D0)) {
|
||||
return gFrogsSongPtr[ocarinaNoteIndex];
|
||||
} else {
|
||||
return sOcarinaNotes[(s32)Rand_ZeroFloat(60.0f) % 5];
|
||||
|
@ -937,22 +940,22 @@ void EnFr_SetReward(EnFr* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnFr_Deactivate;
|
||||
this->reward = GI_NONE;
|
||||
if ((songIndex >= FROG_ZL) && (songIndex <= FROG_SOT)) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] |= sSongIndex[songIndex];
|
||||
this->reward = GI_RUPEE_PURPLE;
|
||||
} else {
|
||||
this->reward = GI_RUPEE_BLUE;
|
||||
}
|
||||
} else if (songIndex == FROG_STORMS) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] |= sSongIndex[songIndex];
|
||||
this->reward = GI_HEART_PIECE;
|
||||
} else {
|
||||
this->reward = GI_RUPEE_BLUE;
|
||||
}
|
||||
} else if (songIndex == FROG_CHOIR_SONG) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] |= sSongIndex[songIndex];
|
||||
this->reward = GI_HEART_PIECE;
|
||||
} else {
|
||||
this->reward = GI_RUPEE_PURPLE;
|
||||
|
|
|
@ -134,7 +134,7 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) {
|
|||
u16 textID = Text_GetFaceReaction(globalCtx, 0xB);
|
||||
|
||||
if (textID == 0) {
|
||||
textID = (gSaveContext.eventChkInf[6] & 0x80) ? 0x5033 : 0x5032;
|
||||
textID = GET_EVENTCHKINF(EVENTCHKINF_67) ? 0x5033 : 0x5032;
|
||||
}
|
||||
|
||||
// if ACTOR_FLAG_8 is set and textID is 0x5033, change animation
|
||||
|
@ -150,7 +150,7 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) {
|
|||
void func_80A1DB60(EnFu* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->csCtx.state == CS_STATE_IDLE) {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
gSaveContext.eventChkInf[5] |= 0x800;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_5B);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ void func_80A1DBD4(EnFu* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.cutsceneTrigger = 1;
|
||||
Item_Give(globalCtx, ITEM_SONG_STORMS);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
gSaveContext.eventChkInf[6] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_65);
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_24;
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
|
@ -214,7 +214,7 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((gSaveContext.eventChkInf[5] & 0x800)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_5B)) {
|
||||
func_80A1D94C(this, globalCtx, 0x508E, func_80A1DBA0);
|
||||
} else if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
this->actor.textId = 0x5035;
|
||||
|
|
|
@ -141,7 +141,7 @@ static Vec3f sBottlesPositions[] = {
|
|||
};
|
||||
|
||||
void func_80A2F180(EnGb* this) {
|
||||
if (gSaveContext.infTable[0xB] & 0x40) {
|
||||
if (GET_INFTABLE(INFTABLE_B6)) {
|
||||
this->textId = 0x70F5;
|
||||
} else {
|
||||
this->textId = 0x70F4;
|
||||
|
@ -303,8 +303,8 @@ void func_80A2F83C(EnGb* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A2F94C(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
if (!GET_INFTABLE(INFTABLE_B6)) {
|
||||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
this->actionFunc = func_80A2F83C;
|
||||
|
@ -313,8 +313,8 @@ void func_80A2F94C(EnGb* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A2F9C0(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
if (!GET_INFTABLE(INFTABLE_B6)) {
|
||||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
Player_UpdateBottleHeld(globalCtx, GET_PLAYER(globalCtx), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
|
@ -325,8 +325,8 @@ void func_80A2F9C0(EnGb* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A2FA50(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
if (!GET_INFTABLE(INFTABLE_B6)) {
|
||||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
Player_UpdateBottleHeld(globalCtx, GET_PLAYER(globalCtx), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
|
|
|
@ -152,7 +152,7 @@ void EnGe1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "Horseback archery Gerudo EVENT_INF(0) ="
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "やぶさめ ゲルド EVENT_INF(0) = %x\n" VT_RST, gSaveContext.eventInf[0]);
|
||||
|
||||
if (gSaveContext.eventInf[0] & 0x100) {
|
||||
if (GET_EVENTINF(EVENTINF_08)) {
|
||||
this->actionFunc = EnGe1_TalkAfterGame_Archery;
|
||||
} else if (EnGe1_CheckCarpentersFreed()) {
|
||||
this->actionFunc = EnGe1_Wait_Archery;
|
||||
|
@ -209,9 +209,10 @@ void EnGe1_SetAnimationIdle(EnGe1* this) {
|
|||
}
|
||||
|
||||
s32 EnGe1_CheckCarpentersFreed(void) {
|
||||
u16 carpenterFlags = gSaveContext.eventChkInf[9];
|
||||
u16 carpenterFlags = gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX];
|
||||
|
||||
if (!((carpenterFlags & 1) && (carpenterFlags & 2) && (carpenterFlags & 4) && (carpenterFlags & 8))) {
|
||||
if (!((carpenterFlags & EVENTCHKINF_90_MASK) && (carpenterFlags & EVENTCHKINF_91_MASK) &&
|
||||
(carpenterFlags & EVENTCHKINF_92_MASK) && (carpenterFlags & EVENTCHKINF_93_MASK))) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
@ -230,7 +231,7 @@ void EnGe1_KickPlayer(EnGe1* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) { // Caught previously
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) { // Caught previously
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
@ -496,9 +497,9 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_SetupWait_Archery;
|
||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||
gSaveContext.itemGetInf[0] |= 0x8000;
|
||||
SET_ITEMGETINF(ITEMGETINF_0F);
|
||||
} else {
|
||||
gSaveContext.infTable[25] |= 1;
|
||||
SET_INFTABLE(INFTABLE_190);
|
||||
}
|
||||
} else {
|
||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||
|
@ -584,8 +585,8 @@ void EnGe1_BeginGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.eventInf[0] |= 0x100;
|
||||
gSaveContext.eventChkInf[6] |= 0x100;
|
||||
SET_EVENTINF(EVENTINF_08);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_68);
|
||||
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
|
@ -626,7 +627,7 @@ void EnGe1_TalkNoPrize_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe1_TalkAfterGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
gSaveContext.eventInf[0] &= ~0x100;
|
||||
CLEAR_EVENTINF(EVENTINF_08);
|
||||
LOG_NUM("z_common_data.yabusame_total", gSaveContext.minigameScore, "../z_en_ge1.c", 1110);
|
||||
LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA), "../z_en_ge1.c", 1111);
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
|
@ -638,14 +639,14 @@ void EnGe1_TalkAfterGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.minigameScore < 1000) {
|
||||
this->actor.textId = 0x6045;
|
||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||
} else if (!(gSaveContext.infTable[25] & 1)) {
|
||||
} else if (!GET_INFTABLE(INFTABLE_190)) {
|
||||
this->actor.textId = 0x6046;
|
||||
this->actionFunc = EnGe1_TalkWinPrize_Archery;
|
||||
this->stateFlags &= ~GE1_STATE_GIVE_QUIVER;
|
||||
} else if (gSaveContext.minigameScore < 1500) {
|
||||
this->actor.textId = 0x6047;
|
||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||
} else if (gSaveContext.itemGetInf[0] & 0x8000) {
|
||||
} else if (GET_ITEMGETINF(ITEMGETINF_0F)) {
|
||||
this->actor.textId = 0x6047;
|
||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||
} else {
|
||||
|
@ -670,8 +671,8 @@ void EnGe1_Wait_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
EnGe1_SetTalkAction(this, globalCtx, 0x603F, 100.0f, EnGe1_TalkNoHorse_Archery);
|
||||
} else {
|
||||
if (gSaveContext.eventChkInf[6] & 0x100) {
|
||||
if (gSaveContext.infTable[25] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_68)) {
|
||||
if (GET_INFTABLE(INFTABLE_190)) {
|
||||
textId = 0x6042;
|
||||
} else {
|
||||
textId = 0x6043;
|
||||
|
|
|
@ -223,7 +223,10 @@ s32 Ge2_DetectPlayerInUpdate(GlobalContext* globalCtx, EnGe2* this, Vec3f* pos,
|
|||
}
|
||||
|
||||
s32 EnGe2_CheckCarpentersFreed(void) {
|
||||
if ((u8)(gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] &
|
||||
(EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK | 0xF0),
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -239,7 +242,7 @@ void EnGe2_CaptureClose(EnGe2* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) {
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
@ -265,7 +268,7 @@ void EnGe2_CaptureCharge(EnGe2* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) {
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
|
|
@ -1577,7 +1577,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->timer == 0) {
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) {
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
|
|
@ -316,55 +316,55 @@ void EnGirlA_SetupAction(EnGirlA* this, EnGirlAActionFunc func) {
|
|||
s32 EnGirlA_TryChangeShopItem(EnGirlA* this) {
|
||||
switch (this->actor.params) {
|
||||
case SI_MILK_BOTTLE:
|
||||
if (gSaveContext.itemGetInf[0] & 0x4) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_02)) {
|
||||
this->actor.params = SI_HEART;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_2:
|
||||
if (gSaveContext.itemGetInf[0] & 0x40) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_06)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_3:
|
||||
if (gSaveContext.itemGetInf[0] & 0x80) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_07)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_3:
|
||||
if (gSaveContext.itemGetInf[0] & 0x100) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_08)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_4:
|
||||
if (gSaveContext.itemGetInf[0] & 0x200) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_09)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_4:
|
||||
if (gSaveContext.itemGetInf[0] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_0A)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_1:
|
||||
if (gSaveContext.itemGetInf[0] & 0x8) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_03)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_1:
|
||||
if (gSaveContext.itemGetInf[0] & 0x10) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_04)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_2:
|
||||
if (gSaveContext.itemGetInf[0] & 0x20) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_05)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
|
@ -842,7 +842,7 @@ void EnGirlA_ItemGive_BottledItem(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
|
||||
void EnGirlA_BuyEvent_ShieldDiscount(GlobalContext* globalCtx, EnGirlA* this) {
|
||||
if (this->actor.params == SI_HYLIAN_SHIELD) {
|
||||
if (gSaveContext.infTable[7] & 0x40) {
|
||||
if (GET_INFTABLE(INFTABLE_76)) {
|
||||
Rupees_ChangeBy(-(this->basePrice - sShieldDiscounts[(s32)Rand_ZeroFloat(7.9f)]));
|
||||
return;
|
||||
}
|
||||
|
@ -861,28 +861,28 @@ void EnGirlA_BuyEvent_ZoraTunic(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
void EnGirlA_BuyEvent_ObtainBombchuPack(GlobalContext* globalCtx, EnGirlA* this) {
|
||||
switch (this->actor.params) {
|
||||
case SI_BOMBCHU_10_2:
|
||||
gSaveContext.itemGetInf[0] |= 0x40;
|
||||
SET_ITEMGETINF(ITEMGETINF_06);
|
||||
break;
|
||||
case SI_BOMBCHU_10_3:
|
||||
gSaveContext.itemGetInf[0] |= 0x80;
|
||||
SET_ITEMGETINF(ITEMGETINF_07);
|
||||
break;
|
||||
case SI_BOMBCHU_20_3:
|
||||
gSaveContext.itemGetInf[0] |= 0x100;
|
||||
SET_ITEMGETINF(ITEMGETINF_08);
|
||||
break;
|
||||
case SI_BOMBCHU_20_4:
|
||||
gSaveContext.itemGetInf[0] |= 0x200;
|
||||
SET_ITEMGETINF(ITEMGETINF_09);
|
||||
break;
|
||||
case SI_BOMBCHU_10_4:
|
||||
gSaveContext.itemGetInf[0] |= 0x400;
|
||||
SET_ITEMGETINF(ITEMGETINF_0A);
|
||||
break;
|
||||
case SI_BOMBCHU_10_1:
|
||||
gSaveContext.itemGetInf[0] |= 0x8;
|
||||
SET_ITEMGETINF(ITEMGETINF_03);
|
||||
break;
|
||||
case SI_BOMBCHU_20_1:
|
||||
gSaveContext.itemGetInf[0] |= 0x10;
|
||||
SET_ITEMGETINF(ITEMGETINF_04);
|
||||
break;
|
||||
case SI_BOMBCHU_20_2:
|
||||
gSaveContext.itemGetInf[0] |= 0x20;
|
||||
SET_ITEMGETINF(ITEMGETINF_05);
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-this->basePrice);
|
||||
|
@ -902,27 +902,27 @@ void EnGirlA_SetItemDescription(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
isMaskFreeToBorrow = false;
|
||||
switch (this->actor.params) {
|
||||
case SI_KEATON_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x100) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_38)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_SPOOKY_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_SKULL_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x200) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_39)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_BUNNY_HOOD:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_MASK_OF_TRUTH:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
|
@ -984,7 +984,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->actor.objBankIndex = this->objBankIndex;
|
||||
switch (this->actor.params) {
|
||||
case SI_KEATON_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x100) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_38)) {
|
||||
this->actor.textId = 0x70B6;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -992,7 +992,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_SPOOKY_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
this->actor.textId = 0x70B5;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -1000,7 +1000,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_SKULL_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x200) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_39)) {
|
||||
this->actor.textId = 0x70B4;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -1008,7 +1008,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_BUNNY_HOOD:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
this->actor.textId = 0x70B7;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -1016,7 +1016,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_MASK_OF_TRUTH:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
this->actor.textId = 0x70BB;
|
||||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
} else {
|
||||
|
|
|
@ -141,14 +141,14 @@ void EnGm_UpdateEye(EnGm* this) {
|
|||
void EnGm_SetTextID(EnGm* this) {
|
||||
switch (func_80A3D7C8()) {
|
||||
case 0:
|
||||
if (gSaveContext.infTable[11] & 1) {
|
||||
if (GET_INFTABLE(INFTABLE_B0)) {
|
||||
this->actor.textId = 0x304B;
|
||||
} else {
|
||||
this->actor.textId = 0x304A;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gSaveContext.infTable[11] & 2) {
|
||||
if (GET_INFTABLE(INFTABLE_B1)) {
|
||||
this->actor.textId = 0x304F;
|
||||
} else {
|
||||
this->actor.textId = 0x304C;
|
||||
|
@ -202,12 +202,12 @@ void func_80A3DC44(EnGm* this, GlobalContext* globalCtx) {
|
|||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
switch (func_80A3D7C8()) {
|
||||
case 0:
|
||||
gSaveContext.infTable[11] |= 1;
|
||||
SET_INFTABLE(INFTABLE_B0);
|
||||
case 3:
|
||||
this->actionFunc = func_80A3DD7C;
|
||||
return;
|
||||
case 1:
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
SET_INFTABLE(INFTABLE_B1);
|
||||
case 2:
|
||||
this->actionFunc = EnGm_ProcessChoiceIndex;
|
||||
default:
|
||||
|
|
|
@ -112,20 +112,20 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
case 0x00:
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
||||
if (gSaveContext.infTable[16] & 0x8000) {
|
||||
if (GET_INFTABLE(INFTABLE_10F)) {
|
||||
return 0x3042;
|
||||
} else {
|
||||
return 0x3041;
|
||||
}
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1) || (gSaveContext.infTable[16] & 0x2000)) {
|
||||
if (gSaveContext.infTable[16] & 0x4000) {
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1) || GET_INFTABLE(INFTABLE_10D)) {
|
||||
if (GET_INFTABLE(INFTABLE_10E)) {
|
||||
return 0x3038;
|
||||
} else {
|
||||
return 0x3037;
|
||||
}
|
||||
} else {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (gSaveContext.infTable[16] & 0x400) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
if (GET_INFTABLE(INFTABLE_10A)) {
|
||||
return 0x3033;
|
||||
} else {
|
||||
return 0x3032;
|
||||
|
@ -143,9 +143,9 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x20:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_23)) {
|
||||
return 0x3021;
|
||||
} else if (gSaveContext.infTable[14] & 0x1) {
|
||||
} else if (GET_INFTABLE(INFTABLE_E0)) {
|
||||
return 0x302A;
|
||||
} else {
|
||||
return 0x3008;
|
||||
|
@ -153,7 +153,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x30:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_23)) {
|
||||
return 0x3026;
|
||||
} else {
|
||||
return 0x3009;
|
||||
|
@ -161,7 +161,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x40:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_23)) {
|
||||
return 0x3026;
|
||||
} else {
|
||||
return 0x300A;
|
||||
|
@ -169,7 +169,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x50:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.infTable[15] & 1) {
|
||||
} else if (GET_INFTABLE(INFTABLE_F0)) {
|
||||
return 0x3015;
|
||||
} else {
|
||||
return 0x3014;
|
||||
|
@ -177,7 +177,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x60:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.infTable[15] & 0x10) {
|
||||
} else if (GET_INFTABLE(INFTABLE_F4)) {
|
||||
return 0x3017;
|
||||
} else {
|
||||
return 0x3016;
|
||||
|
@ -185,7 +185,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x70:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.infTable[15] & 0x100) {
|
||||
} else if (GET_INFTABLE(INFTABLE_F8)) {
|
||||
return 0x3019;
|
||||
} else {
|
||||
return 0x3018;
|
||||
|
@ -206,36 +206,36 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x3008:
|
||||
gSaveContext.infTable[14] |= 1;
|
||||
SET_INFTABLE(INFTABLE_E0);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x300B:
|
||||
gSaveContext.infTable[14] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_EB);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3014:
|
||||
gSaveContext.infTable[15] |= 1;
|
||||
SET_INFTABLE(INFTABLE_F0);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3016:
|
||||
gSaveContext.infTable[15] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_F4);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3018:
|
||||
gSaveContext.infTable[15] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_F8);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3036:
|
||||
func_8002F434(thisx, globalCtx, GI_TUNIC_GORON, xzRange, yRange);
|
||||
gSaveContext.infTable[16] |= 0x2000; // EnGo exclusive flag
|
||||
SET_INFTABLE(INFTABLE_10D); // EnGo exclusive flag
|
||||
unkState = 2;
|
||||
break;
|
||||
case 0x3037:
|
||||
gSaveContext.infTable[16] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_10E);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3041:
|
||||
gSaveContext.infTable[16] |= 0x8000;
|
||||
SET_INFTABLE(INFTABLE_10F);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3059:
|
||||
|
@ -260,7 +260,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
switch (thisx->textId) {
|
||||
case 0x300A:
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (CUR_UPG_VALUE(UPG_STRENGTH) != 0 || (gSaveContext.infTable[14] & 0x800)) {
|
||||
if (CUR_UPG_VALUE(UPG_STRENGTH) != 0 || GET_INFTABLE(INFTABLE_EB)) {
|
||||
thisx->textId = 0x300B;
|
||||
} else {
|
||||
thisx->textId = 0x300C;
|
||||
|
@ -273,12 +273,12 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
break;
|
||||
case 0x3034:
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.infTable[16] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_10B)) {
|
||||
thisx->textId = 0x3033;
|
||||
} else {
|
||||
thisx->textId = 0x3035;
|
||||
}
|
||||
} else if (gSaveContext.infTable[16] & 0x800) {
|
||||
} else if (GET_INFTABLE(INFTABLE_10B)) {
|
||||
thisx->textId = 0x3036;
|
||||
} else {
|
||||
thisx->textId = 0x3033;
|
||||
|
@ -295,7 +295,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
Message_ContinueTextbox(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
}
|
||||
gSaveContext.infTable[11] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_B4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (thisx->textId) {
|
||||
case 0x3035:
|
||||
gSaveContext.infTable[16] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_10B);
|
||||
case 0x3032:
|
||||
case 0x3033:
|
||||
thisx->textId = 0x3034;
|
||||
|
@ -595,7 +595,7 @@ void func_80A3F908(EnGo* this, GlobalContext* globalCtx) {
|
|||
if (((this->actor.params & 0xF0) == 0x90) && (isUnkCondition == true)) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_SWORD_BROKEN) {
|
||||
if (func_8002F368(globalCtx) == EXCH_ITEM_SWORD_BROKEN) {
|
||||
if (gSaveContext.infTable[11] & 0x10) {
|
||||
if (GET_INFTABLE(INFTABLE_B4)) {
|
||||
this->actor.textId = 0x3055;
|
||||
} else {
|
||||
this->actor.textId = 0x3054;
|
||||
|
@ -663,7 +663,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGo_SetupAction(this, EnGo_FireGenericActionFunc);
|
||||
break;
|
||||
case 0x40:
|
||||
if (gSaveContext.infTable[14] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_EB)) {
|
||||
EnGo_SetMovedPos(this, globalCtx);
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
|
@ -751,7 +751,7 @@ void EnGo_GoronLinkRolling(EnGo* this, GlobalContext* globalCtx) {
|
|||
(this->unk_218 == 0)) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnGo_SetupAction(this, func_80A4008C);
|
||||
gSaveContext.infTable[16] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_109);
|
||||
}
|
||||
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
|
@ -846,7 +846,7 @@ void func_80A405CC(EnGo* this, GlobalContext* globalCtx) {
|
|||
this->skelAnime.curFrame = lastFrame;
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
this->unk_212 = Rand_S16Offset(30, 30);
|
||||
if (((this->actor.params & 0xF0) == 0x40) && ((gSaveContext.infTable[14] & 0x800) == 0)) {
|
||||
if (((this->actor.params & 0xF0) == 0x40) && !GET_INFTABLE(INFTABLE_EB)) {
|
||||
EnGo_SetupAction(this, func_80A40B1C);
|
||||
} else {
|
||||
EnGo_SetupAction(this, EnGo_BiggoronActionFunc);
|
||||
|
@ -933,7 +933,7 @@ void func_80A40A54(EnGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A40B1C(EnGo* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.infTable[14] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_EB)) {
|
||||
EnGo_ChangeAnim(this, ENGO_ANIM_3);
|
||||
EnGo_SetupAction(this, func_80A40A54);
|
||||
} else {
|
||||
|
|
|
@ -8,27 +8,28 @@
|
|||
/*
|
||||
FLAGS
|
||||
|
||||
gSaveContext.eventChkInf[2] & 0x8 - DC entrance boulder blown up as child
|
||||
EVENTCHKINF_23 - DC entrance boulder blown up as child
|
||||
|
||||
InfTable
|
||||
|
||||
gSaveContext.infTable[11] & 0x10
|
||||
gSaveContext.infTable[14] & 0x1 - 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
|
||||
gSaveContext.infTable[14] & 0x40 - 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
|
||||
gSaveContext.infTable[15] & 0x1 - 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)
|
||||
gSaveContext.infTable[15] & 0x100 - (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
|
||||
gSaveContext.infTable[16] & 0x400 - (not on cloud modding)
|
||||
gSaveContext.infTable[16] & 0x800 - Spoke to Goron Link About Volvagia
|
||||
gSaveContext.infTable[16] & 0x1000 - Stopped Goron Link's Rolling
|
||||
gSaveContext.infTable[16] & 0x2000 - EnGo Exclusive
|
||||
gSaveContext.infTable[16] & 0x4000 - Spoke to Goron Link
|
||||
gSaveContext.infTable[16] & 0x8000 - (not on cloud modding)
|
||||
INFTABLE_B4
|
||||
INFTABLE_E0 - Talked to DMT Goron at DC entrance (Before DC is opened as child)
|
||||
INFTABLE_E3 - Talked to GC Goron in bottom level stairwell
|
||||
INFTABLE_E6 - Talked to GC Goron at LW entrance (Before LW shortcut is opened)
|
||||
INFTABLE_EB - Talked to DMT Goron at Bomb Flower with goron bracelet
|
||||
INFTABLE_F0 - Talked to Goron at GC Entrance (Before goron ruby is obtained)
|
||||
INFTABLE_F4 - Talked to Goron at GC Island (Before goron ruby is obtained)
|
||||
INFTABLE_F8 - (not on cloud modding) Talked to GC Goron outside Darunias door (after opening door,
|
||||
before getting goron bracelet)
|
||||
INFTABLE_109 - Obtained Fire Tunic from Goron Link
|
||||
INFTABLE_10A - (not on cloud modding)
|
||||
INFTABLE_10B - Spoke to Goron Link About Volvagia
|
||||
INFTABLE_10C - Stopped Goron Link's Rolling
|
||||
INFTABLE_10D - EnGo Exclusive
|
||||
INFTABLE_10E - Spoke to Goron Link
|
||||
INFTABLE_10F - (not on cloud modding)
|
||||
|
||||
gSaveContext.infTable[17] & 0x4000 - Bomb bag upgrade obtained from rolling Goron
|
||||
INFTABLE_11E - Bomb bag upgrade obtained from rolling Goron
|
||||
|
||||
EnGo
|
||||
pathIndex: this->actor.params & 0xF
|
||||
|
@ -322,7 +323,7 @@ u16 EnGo2_GoronFireGenericGetTextId(EnGo2* this) {
|
|||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityRollingBig(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (gSaveContext.infTable[17] & 0x4000) {
|
||||
if (GET_INFTABLE(INFTABLE_11E)) {
|
||||
return 0x3013;
|
||||
} else if (CUR_CAPACITY(UPG_BOMB_BAG) >= 20 && this->waypoint > 7 && this->waypoint < 12) {
|
||||
return 0x3012;
|
||||
|
@ -344,7 +345,7 @@ s16 EnGo2_GetStateGoronCityRollingBig(GlobalContext* globalCtx, EnGo2* this) {
|
|||
bombBagUpgrade = CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30;
|
||||
EnGo2_GetItem(this, globalCtx, bombBagUpgrade);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[17] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_11E);
|
||||
return 2;
|
||||
} else {
|
||||
return 2;
|
||||
|
@ -363,8 +364,8 @@ u16 EnGo2_GetTextIdGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
|
|||
s16 EnGo2_GetStateGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
if ((this->actor.textId == 0x300B) && (gSaveContext.infTable[14] & 0x800) == 0) {
|
||||
gSaveContext.infTable[14] |= 0x800;
|
||||
if ((this->actor.textId == 0x300B) && !GET_INFTABLE(INFTABLE_EB)) {
|
||||
SET_INFTABLE(INFTABLE_EB);
|
||||
return 2;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -391,7 +392,7 @@ u16 EnGo2_GetTextIdGoronDmtRollingSmall(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[2] & 0x8) ? 0x3026 : 0x3009;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_23) ? 0x3026 : 0x3009;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -409,14 +410,14 @@ u16 EnGo2_GetTextIdGoronDmtDcEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return gSaveContext.eventChkInf[2] & 0x8 ? 0x3021 : gSaveContext.infTable[14] & 0x1 ? 0x302A : 0x3008;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_23) ? 0x3021 : GET_INFTABLE(INFTABLE_E0) ? 0x302A : 0x3008;
|
||||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtDcEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3008) {
|
||||
gSaveContext.infTable[14] |= 0x1;
|
||||
SET_INFTABLE(INFTABLE_E0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -430,14 +431,14 @@ u16 EnGo2_GetTextIdGoronCityEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return gSaveContext.infTable[15] & 0x1 ? 0x3015 : 0x3014;
|
||||
return GET_INFTABLE(INFTABLE_F0) ? 0x3015 : 0x3014;
|
||||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3014) {
|
||||
gSaveContext.infTable[15] |= 0x1;
|
||||
SET_INFTABLE(INFTABLE_F0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -451,14 +452,14 @@ u16 EnGo2_GetTextIdGoronCityIsland(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3067;
|
||||
} else {
|
||||
return gSaveContext.infTable[15] & 0x10 ? 0x3017 : 0x3016;
|
||||
return GET_INFTABLE(INFTABLE_F4) ? 0x3017 : 0x3016;
|
||||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityIsland(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3016) {
|
||||
gSaveContext.infTable[15] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_F4);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -474,7 +475,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else {
|
||||
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
|
||||
: !Flags_GetSwitch(globalCtx, 0x1B) ? 0x3017
|
||||
: gSaveContext.infTable[15] & 0x100 ? 0x3019
|
||||
: GET_INFTABLE(INFTABLE_F8) ? 0x3019
|
||||
: 0x3018;
|
||||
}
|
||||
}
|
||||
|
@ -482,7 +483,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
s16 EnGo2_GetStateGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3018) {
|
||||
gSaveContext.infTable[15] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_F8);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -492,13 +493,13 @@ s16 EnGo2_GetStateGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
|
||||
u16 EnGo2_GetTextIdGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
||||
return gSaveContext.infTable[16] & 0x8000 ? 0x3042 : 0x3041;
|
||||
return GET_INFTABLE(INFTABLE_10F) ? 0x3042 : 0x3041;
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
return gSaveContext.infTable[16] & 0x4000 ? 0x3038 : 0x3037;
|
||||
} else if (gSaveContext.infTable[16] & 0x1000) {
|
||||
return GET_INFTABLE(INFTABLE_10E) ? 0x3038 : 0x3037;
|
||||
} else if (GET_INFTABLE(INFTABLE_10C)) {
|
||||
this->unk_20C = 0;
|
||||
this->dialogState = TEXT_STATE_NONE;
|
||||
return gSaveContext.infTable[16] & 0x400 ? 0x3033 : 0x3032;
|
||||
return GET_INFTABLE(INFTABLE_10A) ? 0x3033 : 0x3032;
|
||||
} else {
|
||||
return 0x3030;
|
||||
}
|
||||
|
@ -513,7 +514,7 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
return 2;
|
||||
case 0x3037:
|
||||
gSaveContext.infTable[16] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_10E);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -521,12 +522,12 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x3034) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3033 : 0x3035;
|
||||
this->actor.textId = GET_INFTABLE(INFTABLE_10B) ? 0x3033 : 0x3035;
|
||||
if (this->actor.textId == 0x3035) {
|
||||
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
||||
}
|
||||
} else {
|
||||
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3036 : 0x3033;
|
||||
this->actor.textId = GET_INFTABLE(INFTABLE_10B) ? 0x3036 : 0x3033;
|
||||
if (this->actor.textId == 0x3036) {
|
||||
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
||||
}
|
||||
|
@ -542,7 +543,7 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x3035:
|
||||
gSaveContext.infTable[16] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_10B);
|
||||
case 0x3032:
|
||||
case 0x3033:
|
||||
this->actor.textId = 0x3034;
|
||||
|
@ -660,13 +661,13 @@ s16 EnGo2_GetStateGoronFireGeneric(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
||||
return !LINK_IS_ADULT ? gSaveContext.infTable[14] & 0x8 ? 0x3022 : 0x300E : 0x3043;
|
||||
return !LINK_IS_ADULT ? GET_INFTABLE(INFTABLE_E3) ? 0x3022 : 0x300E : 0x3043;
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x300E) {
|
||||
gSaveContext.infTable[14] |= 0x8;
|
||||
SET_INFTABLE(INFTABLE_E3);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -692,7 +693,7 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (Flags_GetSwitch(globalCtx, 0x1C)) {
|
||||
return 0x302F;
|
||||
} else {
|
||||
return gSaveContext.infTable[14] & 0x40 ? 0x3025 : 0x3024;
|
||||
return GET_INFTABLE(INFTABLE_E6) ? 0x3025 : 0x3024;
|
||||
}
|
||||
} else {
|
||||
return 0x3043;
|
||||
|
@ -702,7 +703,7 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
|||
s16 EnGo2_GetStateGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3024) {
|
||||
gSaveContext.infTable[14] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_E6);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -1052,7 +1053,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, GlobalContext* globalCtx, Player* play
|
|||
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_SWORD_BROKEN) {
|
||||
if (func_8002F368(globalCtx) == EXCH_ITEM_SWORD_BROKEN) {
|
||||
if (gSaveContext.infTable[11] & 0x10) {
|
||||
if (GET_INFTABLE(INFTABLE_B4)) {
|
||||
textId = 0x3055;
|
||||
} else {
|
||||
textId = 0x3054;
|
||||
|
@ -1327,7 +1328,7 @@ void EnGo2_GetItemAnimation(EnGo2* this, GlobalContext* globalCtx) {
|
|||
void EnGo2_SetupRolling(EnGo2* this, GlobalContext* globalCtx) {
|
||||
if ((this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG || (this->actor.params & 0x1F) == GORON_CITY_LINK) {
|
||||
this->collider.info.bumperFlags = 1;
|
||||
this->actor.speedXZ = gSaveContext.infTable[17] & 0x4000 ? 6.0f : 3.6000001f;
|
||||
this->actor.speedXZ = GET_INFTABLE(INFTABLE_11E) ? 6.0f : 3.6000001f;
|
||||
} else {
|
||||
this->actor.speedXZ = 6.0f;
|
||||
}
|
||||
|
@ -1548,7 +1549,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
break;
|
||||
case GORON_CITY_LINK:
|
||||
if ((gSaveContext.infTable[16] & 0x200)) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
|
@ -1557,7 +1558,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGo2_CurledUp;
|
||||
}
|
||||
} else {
|
||||
gSaveContext.infTable[16] &= ~0x1000;
|
||||
CLEAR_INFTABLE(INFTABLE_10C);
|
||||
this->collider.dim.height = (D_80A4816C[this->actor.params & 0x1F].height * 0.6f);
|
||||
EnGo2_SetupRolling(this, globalCtx);
|
||||
this->isAwake = true;
|
||||
|
@ -1588,7 +1589,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGo2_CurledUp;
|
||||
break;
|
||||
case GORON_DMT_BOMB_FLOWER:
|
||||
if (gSaveContext.infTable[14] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_EB)) {
|
||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
}
|
||||
|
@ -1782,7 +1783,7 @@ void EnGo2_SetGetItem(EnGo2* this, GlobalContext* globalCtx) {
|
|||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
return;
|
||||
case GI_TUNIC_GORON:
|
||||
gSaveContext.infTable[16] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_109);
|
||||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
return;
|
||||
case GI_SWORD_BGS:
|
||||
|
@ -1866,7 +1867,7 @@ void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx) {
|
|||
if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_CLOSING) {
|
||||
player->actor.freezeTimer = 10;
|
||||
} else {
|
||||
gSaveContext.infTable[16] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_10C);
|
||||
this->unk_26E = 1;
|
||||
this->unk_211 = false;
|
||||
this->isAwake = false;
|
||||
|
|
|
@ -52,7 +52,7 @@ static InitChainEntry sInitChain[] = {
|
|||
void EnGuest_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGuest* this = (EnGuest*)thisx;
|
||||
|
||||
if (gSaveContext.infTable[7] & 0x40) {
|
||||
if (GET_INFTABLE(INFTABLE_76)) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
this->osAnimeBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_OS_ANIME);
|
||||
|
|
|
@ -112,13 +112,13 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->type != 5) {
|
||||
if (((gSaveContext.dayTime < 0xB888) || IS_DAY) && !(gSaveContext.eventChkInf[8] & 1)) {
|
||||
if (((gSaveContext.dayTime < 0xB888) || IS_DAY) && !GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->actionFunc = EnHeishi1_SetupWalk;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY || (gSaveContext.eventChkInf[8] & 1)) {
|
||||
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY || GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->actionFunc = EnHeishi1_SetupWaitNight;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -347,7 +347,7 @@ void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx) {
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (!this->loadStarted) {
|
||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4E);
|
||||
globalCtx->nextEntranceIndex = 0x4FA;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
this->loadStarted = true;
|
||||
|
|
|
@ -189,8 +189,7 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->unk_30B = 1;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if ((gSaveContext.eventChkInf[0] & 0x200) && (gSaveContext.eventChkInf[2] & 0x20) &&
|
||||
(gSaveContext.eventChkInf[3] & 0x80)) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_09) && GET_EVENTCHKINF(EVENTCHKINF_25) && GET_EVENTCHKINF(EVENTCHKINF_37)) {
|
||||
// "Get all spiritual stones!"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
|
@ -209,7 +208,7 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actor.textId = 0x7099;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if (gSaveContext.eventChkInf[1] & 4) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_12)) {
|
||||
if (this->unk_30E == 0) {
|
||||
// "Start under the first sleeve!"
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
|
@ -352,8 +351,8 @@ void func_80A5399C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->unk_30B = 0;
|
||||
var = 0;
|
||||
if (gSaveContext.infTable[7] & 0x40) {
|
||||
if (!(gSaveContext.infTable[7] & 0x80)) {
|
||||
if (GET_INFTABLE(INFTABLE_76)) {
|
||||
if (!GET_INFTABLE(INFTABLE_77)) {
|
||||
if (Player_GetMask(globalCtx) == PLAYER_MASK_KEATON) {
|
||||
if (this->unk_309 == 0) {
|
||||
this->actor.textId = 0x200A;
|
||||
|
@ -524,7 +523,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
void func_80A54038(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.infTable[7] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_76);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, 0, 7);
|
||||
this->actionFunc = func_80A53908;
|
||||
|
@ -539,8 +538,8 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x2020;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
Player_UnsetMask(globalCtx);
|
||||
gSaveContext.infTable[7] |= 0x80;
|
||||
gSaveContext.itemGetInf[3] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_77);
|
||||
SET_ITEMGETINF(ITEMGETINF_38);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
if (this->unk_30A != 0) {
|
||||
this->unk_30A = 2;
|
||||
|
@ -848,7 +847,7 @@ void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi2_OverrideLimbDraw,
|
||||
EnHeishi2_PostLimbDraw, this);
|
||||
if ((this->type == 5) && (gSaveContext.infTable[7] & 0x80)) {
|
||||
if ((this->type == 5) && GET_INFTABLE(INFTABLE_77)) {
|
||||
linkObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
if (linkObjBankIndex >= 0) {
|
||||
Matrix_Put(&this->mtxf_330);
|
||||
|
|
|
@ -202,7 +202,7 @@ void func_80A55D00(EnHeishi3* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx) &&
|
||||
(this->respawnFlag == 0)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4E);
|
||||
globalCtx->nextEntranceIndex = 0x47E; // Hyrule Castle from Guard Capture (outside)
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
this->respawnFlag = 1;
|
||||
|
|
|
@ -130,12 +130,12 @@ void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
this->unk_2B4 = 1;
|
||||
this->actionFunc = func_80A56B40;
|
||||
} else {
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->actor.textId = 0x5065;
|
||||
this->actionFunc = func_80A56B40;
|
||||
return;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
this->actor.textId = 0x5068;
|
||||
this->actionFunc = func_80A56B40;
|
||||
return;
|
||||
|
@ -211,14 +211,14 @@ void func_80A56614(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A5673C(EnHeishi4* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ マスターソード祝入手! ☆☆☆☆☆ \n" VT_RST);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
this->unk_284 = 0;
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
if (!(gSaveContext.infTable[6] & 0x1000)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
if (!GET_INFTABLE(INFTABLE_6C)) {
|
||||
f32 frames = Animation_GetLastFrame(&gEnHeishiDyingGuardAnim_00C444);
|
||||
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardAnim_00C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
|
@ -265,7 +265,7 @@ void func_80A56994(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
func_80038290(globalCtx, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos);
|
||||
if ((this->unk_282 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[6] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_6C);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_80A56A50;
|
||||
}
|
||||
|
|
|
@ -461,7 +461,8 @@ s32 EnHorse_BgCheckBridgeJumpPoint(EnHorse* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.speedXZ < 12.8f) {
|
||||
return false;
|
||||
}
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -682,7 +683,11 @@ s32 EnHorse_Spawn(EnHorse* this, GlobalContext* globalCtx) {
|
|||
player = GET_PLAYER(globalCtx);
|
||||
if (globalCtx->sceneNum != SCENE_SPOT20 ||
|
||||
//! Same flag checked twice
|
||||
(Flags_GetEventChkInf(0x18) && ((gSaveContext.eventInf[0] & 0xF) != 6 || Flags_GetEventChkInf(0x18))) ||
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_18) &&
|
||||
(!((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) ==
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK)) ||
|
||||
Flags_GetEventChkInf(EVENTCHKINF_18))) ||
|
||||
// always load two spawns inside lon lon
|
||||
((sHorseSpawns[i].pos.x == 856 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -918) ||
|
||||
(sHorseSpawns[i].pos.x == -1003 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -755))) {
|
||||
|
@ -793,10 +798,10 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
|
||||
} else if (this->actor.params == 6) {
|
||||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP;
|
||||
if (Flags_GetEventChkInf(0x18) || DREG(1) != 0) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1) != 0) {
|
||||
this->stateFlags &= ~ENHORSE_CANT_JUMP;
|
||||
this->stateFlags |= ENHORSE_FLAG_26;
|
||||
} else if (gSaveContext.eventInf[0] & 0x40 && this->type == HORSE_HNI) {
|
||||
} else if (GET_EVENTINF(EVENTINF_06) && this->type == HORSE_HNI) {
|
||||
this->stateFlags |= ENHORSE_FLAG_21 | ENHORSE_FLAG_20;
|
||||
}
|
||||
} else if (this->actor.params == 1) {
|
||||
|
@ -806,8 +811,10 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
}
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT20 && (gSaveContext.eventInf[0] & 0xF) == 6 &&
|
||||
Flags_GetEventChkInf(0x18) == 0 && !DREG(1)) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT20 &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] & (EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK |
|
||||
EVENTINF_03_MASK)) == (EVENTINF_01_MASK | EVENTINF_02_MASK)) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1)) {
|
||||
this->stateFlags |= ENHORSE_FLAG_25;
|
||||
}
|
||||
|
||||
|
@ -833,7 +840,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
if (Flags_GetEventChkInf(0x18)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_18)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -841,12 +848,12 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (!Flags_GetEventChkInf(0x18) && !DREG(1) && !IS_DAY) {
|
||||
} else if (!Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1) && !IS_DAY) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_MALON_STABLE) {
|
||||
if (IS_DAY || Flags_GetEventChkInf(0x18) || DREG(1) != 0 || !LINK_IS_ADULT) {
|
||||
if (IS_DAY || Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1) != 0 || !LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -872,7 +879,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
if (this->rider == NULL) {
|
||||
__assert("this->race.rider != NULL", "../z_en_horse.c", 3077);
|
||||
}
|
||||
if (!(gSaveContext.eventInf[0] & 0x40)) {
|
||||
if (!GET_EVENTINF(EVENTINF_06)) {
|
||||
this->ingoHorseMaxSpeed = 12.07f;
|
||||
} else {
|
||||
this->ingoHorseMaxSpeed = 12.625f;
|
||||
|
@ -882,7 +889,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
} else if (this->actor.params == 8) {
|
||||
EnHorse_InitHorsebackArchery(this);
|
||||
Interface_InitHorsebackArchery(globalCtx);
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(0x18) && !DREG(1)) {
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1)) {
|
||||
EnHorse_InitFleePlayer(this);
|
||||
} else {
|
||||
if (globalCtx->sceneNum == SCENE_SOUKO) {
|
||||
|
@ -2534,7 +2541,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (globalCtx->interfaceCtx.hbaAmmo != 0) {
|
||||
if (!(this->hbaFlags & 2)) {
|
||||
if (gSaveContext.infTable[25] & 1) {
|
||||
if (GET_INFTABLE(INFTABLE_190)) {
|
||||
if ((s32)gSaveContext.minigameScore >= 1500) {
|
||||
this->hbaFlags |= 4;
|
||||
}
|
||||
|
@ -3578,7 +3585,9 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->stateFlags &= ~ENHORSE_FLAG_24;
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT09 && (gSaveContext.eventChkInf[9] & 0xF) != 0xF) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT09 &&
|
||||
!CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
EnHorse_CheckBridgeJumps(this, globalCtx);
|
||||
}
|
||||
|
||||
|
|
|
@ -110,22 +110,34 @@ void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, GlobalConte
|
|||
gSaveContext.cutsceneIndex = 0;
|
||||
if (this->result == INGORACE_PLAYER_WIN) {
|
||||
globalCtx->nextEntranceIndex = 0x4CE;
|
||||
if (gSaveContext.eventInf[0] & 0x40) {
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 6;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
if (GET_EVENTINF(EVENTINF_06)) {
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK);
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
Environment_ForcePlaySequence(NA_BGM_INGO);
|
||||
} else {
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 4;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_02_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
Environment_ForcePlaySequence(NA_BGM_INGO);
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
|
||||
}
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x558;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 3;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK);
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
}
|
||||
DREG(25) = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
@ -445,7 +457,7 @@ void EnHorseGameCheck_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx;
|
||||
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(0x18) || DREG(1))) {
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1))) {
|
||||
this->actor.params = HORSEGAME_MALON_RACE;
|
||||
}
|
||||
if (sInitFuncs[this->actor.params] != NULL) {
|
||||
|
|
|
@ -165,11 +165,11 @@ void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.sceneSetupIndex > 3) {
|
||||
func_80A69EC0(this);
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT20) {
|
||||
if (!Flags_GetEventChkInf(0x14)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_14)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
this->unk_2A0 = gSaveContext.eventChkInf[1] & 0x40;
|
||||
this->unk_2A0 = GET_EVENTCHKINF(EVENTCHKINF_16);
|
||||
func_80A69EC0(this);
|
||||
} else {
|
||||
func_80A69EC0(this);
|
||||
|
@ -358,17 +358,17 @@ void func_80A6A068(EnHorseLinkChild* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (((gSaveContext.eventChkInf[1] & 0x40) && (DREG(53) != 0)) ||
|
||||
if ((GET_EVENTCHKINF(EVENTCHKINF_16) && (DREG(53) != 0)) ||
|
||||
((globalCtx->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF1))) {
|
||||
func_80A6A4DC(this);
|
||||
} else {
|
||||
this->unk_2A0 = gSaveContext.eventChkInf[1] & 0x40;
|
||||
this->unk_2A0 = GET_EVENTCHKINF(EVENTCHKINF_16);
|
||||
}
|
||||
|
||||
newAnimationIdx = this->animationIdx;
|
||||
animationEnded = SkelAnime_Update(&this->skin.skelAnime);
|
||||
if (animationEnded || (this->animationIdx == 1) || (this->animationIdx == 0)) {
|
||||
if (gSaveContext.eventChkInf[1] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_15)) {
|
||||
distFromHome = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos);
|
||||
distLinkFromHome = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos);
|
||||
if (distLinkFromHome > 250.0f) {
|
||||
|
|
|
@ -207,7 +207,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x14)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_14)) {
|
||||
if (this->actor.world.rot.z != 3) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -216,7 +216,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) {
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_18) || (DREG(1) != 0)) {
|
||||
if (this->actor.world.rot.z != 7) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -77,7 +77,7 @@ void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "chicken shop (adult era)"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコの店(大人の時) \n" VT_RST);
|
||||
func_80A6E3A0(this, func_80A6E9AC);
|
||||
if (gSaveContext.itemGetInf[3] & 1) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_30)) {
|
||||
// "chicken shop closed"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコ屋閉店 \n" VT_RST);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -128,7 +128,7 @@ void func_80A6E630(EnHs* this, GlobalContext* globalCtx) {
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_80088AA0(180);
|
||||
func_80A6E3A0(this, func_80A6E6B0);
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
}
|
||||
|
||||
this->unk_2A8 |= 1;
|
||||
|
|
|
@ -429,9 +429,9 @@ u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) {
|
|||
switch (this->actor.params & 0x7F) {
|
||||
case ENHY_TYPE_AOB:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return (this->unk_330 & 0x800) ? 0x508D : ((gSaveContext.infTable[12] & 0x800) ? 0x508C : 0x508B);
|
||||
return (this->unk_330 & EVENTCHKINF_6B_MASK) ? 0x508D : (GET_INFTABLE(INFTABLE_CB) ? 0x508C : 0x508B);
|
||||
} else if (globalCtx->sceneNum == SCENE_MARKET_DAY) {
|
||||
return (gSaveContext.eventInf[3] & 1) ? 0x709B : 0x709C;
|
||||
return GET_EVENTINF(EVENTINF_30) ? 0x709B : 0x709C;
|
||||
} else if (gSaveContext.dogIsLost) {
|
||||
s16 followingDog = (gSaveContext.dogParams & 0xF00) >> 8;
|
||||
|
||||
|
@ -445,77 +445,73 @@ u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) {
|
|||
return 0x70A0;
|
||||
}
|
||||
case ENHY_TYPE_COB:
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
return (gSaveContext.infTable[12] & 2) ? 0x7017 : 0x7045;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
return GET_INFTABLE(INFTABLE_C1) ? 0x7017 : 0x7045;
|
||||
} else {
|
||||
return (gSaveContext.infTable[12] & 1) ? 0x7017 : 0x7016;
|
||||
return GET_INFTABLE(INFTABLE_C0) ? 0x7017 : 0x7016;
|
||||
}
|
||||
case ENHY_TYPE_AHG_2:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return 0x5086;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return 0x5085;
|
||||
} else if (gSaveContext.eventChkInf[8] & 1) {
|
||||
return (gSaveContext.infTable[12] & 8) ? 0x701A : 0x7047;
|
||||
} else if (gSaveContext.eventChkInf[1] & 0x10) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
return GET_INFTABLE(INFTABLE_C3) ? 0x701A : 0x7047;
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 0x701A;
|
||||
} else if (gSaveContext.eventChkInf[1] & 1) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_10)) {
|
||||
return 0x701B;
|
||||
} else if (gSaveContext.infTable[12] & 4) {
|
||||
} else if (GET_INFTABLE(INFTABLE_C2)) {
|
||||
return 0x701C;
|
||||
} else {
|
||||
return 0x701A;
|
||||
}
|
||||
case ENHY_TYPE_BOJ_3:
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? ((gSaveContext.infTable[12] & 0x10) ? 0x7001 : 0x70EB) : 0x7001;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? (GET_INFTABLE(INFTABLE_C4) ? 0x7001 : 0x70EB) : 0x7001;
|
||||
case ENHY_TYPE_AHG_4:
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704B : ((gSaveContext.infTable[12] & 0x20) ? 0x7024 : 0x7023);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704B : (GET_INFTABLE(INFTABLE_C5) ? 0x7024 : 0x7023);
|
||||
case ENHY_TYPE_BOJ_5:
|
||||
player->exchangeItemId = EXCH_ITEM_BLUE_FIRE;
|
||||
return 0x700C;
|
||||
case ENHY_TYPE_BBA:
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704A : ((gSaveContext.infTable[12] & 0x40) ? 0x7022 : 0x7021);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704A : (GET_INFTABLE(INFTABLE_C6) ? 0x7022 : 0x7021);
|
||||
case ENHY_TYPE_BJI_7:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return 0x5088;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return 0x5087;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704D
|
||||
: ((gSaveContext.infTable[12] & 0x80) ? 0x7028 : 0x7027);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704D : (GET_INFTABLE(INFTABLE_C7) ? 0x7028 : 0x7027);
|
||||
}
|
||||
case ENHY_TYPE_CNE_8:
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
return (gSaveContext.infTable[12] & 0x200) ? 0x701E : 0x7048;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
return GET_INFTABLE(INFTABLE_C9) ? 0x701E : 0x7048;
|
||||
} else {
|
||||
return (gSaveContext.infTable[12] & 0x100) ? 0x701E : 0x701D;
|
||||
return GET_INFTABLE(INFTABLE_C8) ? 0x701E : 0x701D;
|
||||
}
|
||||
case ENHY_TYPE_BOJ_9:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return (gSaveContext.eventChkInf[10] & 0x400) ? 0x5082 : 0x5081;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x5082 : 0x5081;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x5080 : 0x507F;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7049
|
||||
: ((gSaveContext.infTable[12] & 0x400) ? 0x7020 : 0x701F);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7049 : (GET_INFTABLE(INFTABLE_CA) ? 0x7020 : 0x701F);
|
||||
}
|
||||
case ENHY_TYPE_BOJ_10:
|
||||
if (globalCtx->sceneNum == SCENE_LABO) {
|
||||
return (gSaveContext.eventChkInf[10] & 0x400) ? 0x507E : 0x507D;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x507E : 0x507D;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x507C : 0x507B;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7046
|
||||
: ((gSaveContext.infTable[12] & 0x2000) ? 0x7019 : 0x7018);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7046 : (GET_INFTABLE(INFTABLE_CD) ? 0x7019 : 0x7018);
|
||||
}
|
||||
case ENHY_TYPE_CNE_11:
|
||||
return (gSaveContext.infTable[8] & 0x800) ? ((gSaveContext.infTable[12] & 0x1000) ? 0x7014 : 0x70A4)
|
||||
: 0x7014;
|
||||
return GET_INFTABLE(INFTABLE_8B) ? (GET_INFTABLE(INFTABLE_CC) ? 0x7014 : 0x70A4) : 0x7014;
|
||||
case ENHY_TYPE_BOJ_12:
|
||||
if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return !IS_DAY ? 0x5084 : 0x5083;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7044 : 0x7015;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7044 : 0x7015;
|
||||
}
|
||||
case ENHY_TYPE_AHG_13:
|
||||
return 0x7055;
|
||||
|
@ -528,20 +524,20 @@ u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case ENHY_TYPE_AHG_17:
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (IS_DAY) {
|
||||
return (gSaveContext.infTable[22] & 1) ? 0x5058 : 0x5057;
|
||||
return GET_INFTABLE(INFTABLE_160) ? 0x5058 : 0x5057;
|
||||
} else {
|
||||
return (gSaveContext.infTable[22] & 2) ? 0x505A : 0x5059;
|
||||
return GET_INFTABLE(INFTABLE_161) ? 0x505A : 0x5059;
|
||||
}
|
||||
} else if (IS_DAY) {
|
||||
return (gSaveContext.infTable[22] & 4) ? 0x505C : 0x505B;
|
||||
return GET_INFTABLE(INFTABLE_162) ? 0x505C : 0x505B;
|
||||
} else {
|
||||
return 0x5058;
|
||||
}
|
||||
case ENHY_TYPE_BOB_18:
|
||||
if (!LINK_IS_ADULT) {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x505F : ((gSaveContext.infTable[22] & 8) ? 0x505E : 0x505D);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x505F : (GET_INFTABLE(INFTABLE_163) ? 0x505E : 0x505D);
|
||||
} else {
|
||||
return (this->unk_330 & 0x800) ? 0x5062 : ((gSaveContext.infTable[22] & 0x10) ? 0x5061 : 0x5060);
|
||||
return (this->unk_330 & EVENTCHKINF_6B_MASK) ? 0x5062 : (GET_INFTABLE(INFTABLE_164) ? 0x5061 : 0x5060);
|
||||
}
|
||||
case ENHY_TYPE_BJI_19:
|
||||
return 0x7120;
|
||||
|
@ -599,67 +595,67 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
|
|||
Player_UpdateBottleHeld(globalCtx, GET_PLAYER(globalCtx), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
break;
|
||||
case 0x7016:
|
||||
gSaveContext.infTable[12] |= 1;
|
||||
SET_INFTABLE(INFTABLE_C0);
|
||||
break;
|
||||
case 0x7045:
|
||||
gSaveContext.infTable[12] |= 2;
|
||||
SET_INFTABLE(INFTABLE_C1);
|
||||
break;
|
||||
case 0x701B:
|
||||
gSaveContext.infTable[12] |= 4;
|
||||
SET_INFTABLE(INFTABLE_C2);
|
||||
break;
|
||||
case 0x7047:
|
||||
gSaveContext.infTable[12] |= 8;
|
||||
SET_INFTABLE(INFTABLE_C3);
|
||||
break;
|
||||
case 0x70EB:
|
||||
gSaveContext.infTable[12] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_C4);
|
||||
break;
|
||||
case 0x7023:
|
||||
gSaveContext.infTable[12] |= 0x20;
|
||||
SET_INFTABLE(INFTABLE_C5);
|
||||
break;
|
||||
case 0x7021:
|
||||
gSaveContext.infTable[12] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_C6);
|
||||
break;
|
||||
case 0x7027:
|
||||
gSaveContext.infTable[12] |= 0x80;
|
||||
SET_INFTABLE(INFTABLE_C7);
|
||||
break;
|
||||
case 0x701D:
|
||||
gSaveContext.infTable[12] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_C8);
|
||||
break;
|
||||
case 0x7048:
|
||||
gSaveContext.infTable[12] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_C9);
|
||||
break;
|
||||
case 0x701F:
|
||||
gSaveContext.infTable[12] |= 0x400;
|
||||
SET_INFTABLE(INFTABLE_CA);
|
||||
break;
|
||||
case 0x7018:
|
||||
gSaveContext.infTable[12] |= 0x2000;
|
||||
SET_INFTABLE(INFTABLE_CD);
|
||||
break;
|
||||
case 0x70A4:
|
||||
gSaveContext.infTable[12] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_CC);
|
||||
break;
|
||||
case 0x5057:
|
||||
gSaveContext.infTable[22] |= 1;
|
||||
SET_INFTABLE(INFTABLE_160);
|
||||
break;
|
||||
case 0x5059:
|
||||
gSaveContext.infTable[22] |= 2;
|
||||
SET_INFTABLE(INFTABLE_161);
|
||||
break;
|
||||
case 0x505B:
|
||||
gSaveContext.infTable[22] |= 4;
|
||||
SET_INFTABLE(INFTABLE_162);
|
||||
break;
|
||||
case 0x505D:
|
||||
gSaveContext.infTable[22] |= 8;
|
||||
SET_INFTABLE(INFTABLE_163);
|
||||
break;
|
||||
case 0x5060:
|
||||
gSaveContext.infTable[22] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_164);
|
||||
break;
|
||||
case 0x508B:
|
||||
gSaveContext.infTable[12] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_CB);
|
||||
break;
|
||||
case 0x709E:
|
||||
gSaveContext.dogParams = 0;
|
||||
break;
|
||||
case 0x709F:
|
||||
func_80A6F7CC(this, globalCtx, (gSaveContext.infTable[25] & 2) ? GI_RUPEE_BLUE : GI_HEART_PIECE);
|
||||
func_80A6F7CC(this, globalCtx, GET_INFTABLE(INFTABLE_191) ? GI_RUPEE_BLUE : GI_HEART_PIECE);
|
||||
this->actionFunc = func_80A714C4;
|
||||
break;
|
||||
}
|
||||
|
@ -854,7 +850,7 @@ s32 EnHy_ShouldSpawn(EnHy* this, GlobalContext* globalCtx) {
|
|||
return true;
|
||||
} else if (IS_NIGHT) {
|
||||
return false;
|
||||
} else if ((gSaveContext.eventChkInf[8] & 1) && !(gSaveContext.eventChkInf[4] & 0x20)) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_80) && !GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
@ -913,7 +909,7 @@ void EnHy_InitImpl(EnHy* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
this->unk_330 = gSaveContext.eventChkInf[6];
|
||||
this->unk_330 = gSaveContext.eventChkInf[EVENTCHKINF_6B_INDEX];
|
||||
}
|
||||
|
||||
EnHy_InitSetProperties(this);
|
||||
|
@ -970,7 +966,7 @@ void func_80A710F8(EnHy* this, GlobalContext* globalCtx) {
|
|||
if (this->skelAnime.animation != &gObjOsAnim_0BFC) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_26);
|
||||
}
|
||||
} else if (gSaveContext.eventInf[3] & 1) {
|
||||
} else if (GET_EVENTINF(EVENTINF_30)) {
|
||||
if (this->skelAnime.animation != &gObjOsAnim_0FE4) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_25);
|
||||
}
|
||||
|
@ -1061,7 +1057,7 @@ void func_80A71530(EnHy* this, GlobalContext* globalCtx) {
|
|||
case GI_HEART_PIECE:
|
||||
gSaveContext.dogParams = 0;
|
||||
gSaveContext.dogIsLost = false;
|
||||
gSaveContext.infTable[25] |= 2;
|
||||
SET_INFTABLE(INFTABLE_191);
|
||||
break;
|
||||
case GI_RUPEE_BLUE:
|
||||
Rupees_ChangeBy(5);
|
||||
|
|
|
@ -1400,7 +1400,7 @@ void EnIk_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A780D0(EnIk* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.params == 0) {
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_3B)) {
|
||||
this->actor.update = EnIk_Update;
|
||||
this->actor.draw = EnIk_Draw;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
@ -1416,7 +1416,7 @@ void func_80A78160(EnIk* this, GlobalContext* globalCtx) {
|
|||
this->actor.update = func_80A75FA0;
|
||||
this->actor.draw = func_80A76798;
|
||||
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2;
|
||||
gSaveContext.eventChkInf[3] |= 0x800;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_3B);
|
||||
Actor_SetScale(&this->actor, 0.012f);
|
||||
func_80A7489C(this);
|
||||
}
|
||||
|
@ -1430,7 +1430,7 @@ void func_80A781CC(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Cutscene_SetSegment(globalCtx, gSpiritBossNabooruKnuckleDefeatCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
gSaveContext.eventChkInf[3] |= 0x1000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_3C);
|
||||
func_80A7735C(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
@ -1439,7 +1439,7 @@ void EnIk_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnIk* this = (EnIk*)thisx;
|
||||
s32 flag = this->actor.params & 0xFF00;
|
||||
|
||||
if (((this->actor.params & 0xFF) == 0 && (gSaveContext.eventChkInf[3] & 0x1000)) ||
|
||||
if (((this->actor.params & 0xFF) == 0 && GET_EVENTCHKINF(EVENTCHKINF_3C)) ||
|
||||
(flag != 0 && Flags_GetSwitch(globalCtx, flag >> 8))) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
|
|
|
@ -110,14 +110,14 @@ static Gfx* sAdultEraDLs[] = {
|
|||
};
|
||||
|
||||
u16 func_80A78FB0(GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[1] & 0x10) {
|
||||
if (gSaveContext.infTable[9] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
if (GET_INFTABLE(INFTABLE_97)) {
|
||||
return 0x2046;
|
||||
} else {
|
||||
return 0x2045;
|
||||
}
|
||||
}
|
||||
if (gSaveContext.infTable[9] & 0x10) {
|
||||
if (GET_INFTABLE(INFTABLE_94)) {
|
||||
return 0x2040;
|
||||
} else {
|
||||
return 0x203F;
|
||||
|
@ -131,7 +131,7 @@ u16 func_80A79010(GlobalContext* globalCtx) {
|
|||
if (temp_v0 != 0) {
|
||||
return temp_v0;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[1] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
if (IS_DAY) {
|
||||
return 0x205F;
|
||||
} else {
|
||||
|
@ -141,12 +141,13 @@ u16 func_80A79010(GlobalContext* globalCtx) {
|
|||
if (IS_NIGHT) {
|
||||
return 0x204E;
|
||||
}
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
case 1:
|
||||
switch (gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) {
|
||||
case EVENTINF_00_MASK:
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
return 0x2036;
|
||||
} else if (gSaveContext.eventChkInf[1] & 0x800) {
|
||||
if (gSaveContext.infTable[10] & 4) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_1B)) {
|
||||
if (GET_INFTABLE(INFTABLE_A2)) {
|
||||
return 0x2036;
|
||||
} else {
|
||||
return 0x2038;
|
||||
|
@ -154,22 +155,22 @@ u16 func_80A79010(GlobalContext* globalCtx) {
|
|||
} else {
|
||||
return 0x2037;
|
||||
}
|
||||
case 3:
|
||||
if ((gSaveContext.eventInf[0] & 0x40) || (gSaveContext.eventInf[0] & 0x20)) {
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK:
|
||||
if (GET_EVENTINF(EVENTINF_06) || GET_EVENTINF(EVENTINF_05)) {
|
||||
return 0x203E;
|
||||
} else {
|
||||
return 0x203D;
|
||||
}
|
||||
case 4:
|
||||
case EVENTINF_02_MASK:
|
||||
return 0x203A;
|
||||
case 5:
|
||||
case 6:
|
||||
case EVENTINF_00_MASK | EVENTINF_02_MASK:
|
||||
case EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
return 0x203C;
|
||||
case 7:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
return 0x205B;
|
||||
case 2:
|
||||
case EVENTINF_01_MASK:
|
||||
default:
|
||||
if (gSaveContext.infTable[0x9] & 0x400) {
|
||||
if (GET_INFTABLE(INFTABLE_9A)) {
|
||||
return 0x2031;
|
||||
} else {
|
||||
return 0x2030;
|
||||
|
@ -195,14 +196,14 @@ s16 func_80A791CC(GlobalContext* globalCtx, Actor* thisx) {
|
|||
|
||||
switch (thisx->textId) {
|
||||
case 0x2045:
|
||||
gSaveContext.infTable[9] |= 0x80;
|
||||
SET_INFTABLE(INFTABLE_97);
|
||||
break;
|
||||
case 0x203E:
|
||||
ret = 2;
|
||||
break;
|
||||
case 0x203F:
|
||||
gSaveContext.eventChkInf[1] |= 2;
|
||||
gSaveContext.infTable[9] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_11);
|
||||
SET_INFTABLE(INFTABLE_94);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -223,7 +224,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
this->actor.textId = 0x2034;
|
||||
}
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
gSaveContext.infTable[9] |= 0x400;
|
||||
SET_INFTABLE(INFTABLE_9A);
|
||||
break;
|
||||
case 0x2034:
|
||||
if (globalCtx->msgCtx.choiceIndex == 1) {
|
||||
|
@ -249,7 +250,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
} else {
|
||||
this->actor.textId = 0x2039;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
gSaveContext.infTable[10] |= 4;
|
||||
SET_INFTABLE(INFTABLE_A2);
|
||||
}
|
||||
break;
|
||||
case 0x205B:
|
||||
|
@ -257,9 +258,10 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
sp18 = 2;
|
||||
} else {
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId = 0x2039);
|
||||
gSaveContext.eventInf[0] &= ~0xF;
|
||||
gSaveContext.eventInf[0] &= ~0x20;
|
||||
gSaveContext.eventInf[0] &= ~0x40;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &=
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
CLEAR_EVENTINF(EVENTINF_05);
|
||||
CLEAR_EVENTINF(EVENTINF_06);
|
||||
this->actionFunc = func_80A7A4C8;
|
||||
}
|
||||
break;
|
||||
|
@ -364,34 +366,34 @@ s32 func_80A7975C(EnIn* this, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_80A79830(EnIn* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT20 && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 &&
|
||||
!(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
!GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 &&
|
||||
(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
if (globalCtx->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) && !GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
if ((this->actor.shape.rot.z == 4) && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if ((this->actor.shape.rot.z == 4) && GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (globalCtx->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) && !GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 2;
|
||||
}
|
||||
if ((this->actor.shape.rot.z == 7) && (gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if ((this->actor.shape.rot.z == 7) && GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
if (globalCtx->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 && !GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 3;
|
||||
}
|
||||
if (this->actor.shape.rot.z == 8 && (gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if (this->actor.shape.rot.z == 8 && GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +492,7 @@ void EnIn_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
respawnPos = respawn->pos;
|
||||
// hardcoded coords for lon lon entrance
|
||||
if (D_80A7B998 == 0 && respawnPos.x == 1107.0f && respawnPos.y == 0.0f && respawnPos.z == -3740.0f) {
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] = 0;
|
||||
D_80A7B998 = 1;
|
||||
}
|
||||
this->actionFunc = func_80A79FB0;
|
||||
|
@ -514,7 +516,7 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
if (func_80A7975C(this, globalCtx)) {
|
||||
gSaveContext.eventInf[0] &= ~0x8000;
|
||||
CLEAR_EVENTINF(EVENTINF_0F);
|
||||
return;
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
@ -530,7 +532,7 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
case 3:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_7);
|
||||
this->actionFunc = func_80A7A4BC;
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
this->actor.params = 5;
|
||||
}
|
||||
break;
|
||||
|
@ -543,23 +545,24 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
default:
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
switch (gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) {
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 7:
|
||||
case EVENTINF_01_MASK:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK:
|
||||
case EVENTINF_02_MASK:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
if (this->actor.params == 2) {
|
||||
sp3C = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case EVENTINF_00_MASK:
|
||||
if (this->actor.params == 3) {
|
||||
sp3C = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
case EVENTINF_00_MASK | EVENTINF_02_MASK:
|
||||
case EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
if (this->actor.params == 4) {
|
||||
sp3C = 1;
|
||||
}
|
||||
|
@ -569,36 +572,37 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
switch (gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) {
|
||||
case 0:
|
||||
case 2:
|
||||
case EVENTINF_01_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_2);
|
||||
this->actionFunc = func_80A7A4C8;
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case EVENTINF_00_MASK:
|
||||
this->actor.targetMode = 3;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_2);
|
||||
this->actionFunc = func_80A7A568;
|
||||
func_80088B34(0x3C);
|
||||
break;
|
||||
case 3:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_4);
|
||||
this->actionFunc = func_80A7A770;
|
||||
break;
|
||||
case 4:
|
||||
case EVENTINF_02_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_6);
|
||||
this->unk_1EC = 8;
|
||||
this->actionFunc = func_80A7A940;
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
case EVENTINF_00_MASK | EVENTINF_02_MASK:
|
||||
case EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
this->actor.targetMode = 3;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_6);
|
||||
this->unk_1EC = 8;
|
||||
this->actionFunc = func_80A7AA40;
|
||||
break;
|
||||
case 7:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_2);
|
||||
this->actionFunc = func_80A7A848;
|
||||
break;
|
||||
|
@ -639,9 +643,13 @@ void func_80A7A4BC(EnIn* this, GlobalContext* globalCtx) {
|
|||
void func_80A7A4C8(EnIn* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
func_80A79BAC(this, globalCtx, 1, TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0001;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.infTable[10] &= ~4;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_00_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
CLEAR_INFTABLE(INFTABLE_A2);
|
||||
Environment_ForcePlaySequence(NA_BGM_HORSE);
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
|
@ -654,8 +662,8 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
|
|||
s32 phi_a2;
|
||||
s32 transitionType;
|
||||
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
gSaveContext.infTable[10] |= 0x800;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1B) && (player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
SET_INFTABLE(INFTABLE_AB);
|
||||
}
|
||||
if (gSaveContext.timer1State == 10) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
@ -671,27 +679,33 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
|
|||
this->unk_308.unk_00 = 0;
|
||||
return;
|
||||
}
|
||||
gSaveContext.eventInf[0] =
|
||||
(gSaveContext.eventInf[0] & ~0x10) | (((EnHorse*)GET_PLAYER(globalCtx)->rideActor)->type << 4);
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_04_MASK) |
|
||||
(((EnHorse*)GET_PLAYER(globalCtx)->rideActor)->type << EVENTINF_04_SHIFT);
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_01_MASK;
|
||||
phi_a2 = 2;
|
||||
transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800)) {
|
||||
if (gSaveContext.infTable[10] & 0x800) {
|
||||
gSaveContext.eventChkInf[1] |= 0x800;
|
||||
gSaveContext.infTable[10] |= 0x800;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1B)) {
|
||||
if (GET_INFTABLE(INFTABLE_AB)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1B);
|
||||
SET_INFTABLE(INFTABLE_AB);
|
||||
}
|
||||
}
|
||||
gSaveContext.eventInf[0] &= ~0xF;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &=
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
phi_a2 = 0;
|
||||
transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
|
||||
}
|
||||
func_80A79BAC(this, globalCtx, phi_a2, transitionType);
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
}
|
||||
|
@ -705,10 +719,14 @@ void func_80A7A770(EnIn* this, GlobalContext* globalCtx) {
|
|||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_3);
|
||||
this->actionFunc = func_80A7A848;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x0F) | 7;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK);
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & 0xFFFF) | 0x20;
|
||||
if (!(gSaveContext.eventInf[0] & 0x40)) {
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & 0xFFFF) | EVENTINF_05_MASK;
|
||||
if (!GET_EVENTINF(EVENTINF_06)) {
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
|
@ -718,18 +736,23 @@ void func_80A7A770(EnIn* this, GlobalContext* globalCtx) {
|
|||
void func_80A7A848(EnIn* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if ((globalCtx->msgCtx.choiceIndex == 0 && gSaveContext.rupees < 50) || globalCtx->msgCtx.choiceIndex == 1) {
|
||||
gSaveContext.eventInf[0] &= ~0xF;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &=
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
this->actionFunc = func_80A7A4C8;
|
||||
} else {
|
||||
func_80A79BAC(this, globalCtx, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_01_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] &= ~0x20;
|
||||
gSaveContext.eventInf[0] &= ~0x40;
|
||||
CLEAR_EVENTINF(EVENTINF_05);
|
||||
CLEAR_EVENTINF(EVENTINF_06);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -747,12 +770,17 @@ void func_80A7A940(EnIn* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_308.unk_00 == 2) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
func_80A79BAC(this, globalCtx, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0002;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_01_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & 0xFFFF) | 0x40;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & 0xFFFF) | EVENTINF_06_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -892,13 +920,16 @@ void func_80A7B024(EnIn* this, GlobalContext* globalCtx) {
|
|||
player->actor.freezeTimer = 10;
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if (1) {}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (gSaveContext.infTable[10] & 0x800)) {
|
||||
gSaveContext.eventChkInf[1] |= 0x800;
|
||||
gSaveContext.infTable[10] |= 0x800;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1B) && GET_INFTABLE(INFTABLE_AB)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1B);
|
||||
SET_INFTABLE(INFTABLE_AB);
|
||||
}
|
||||
func_80A79BAC(this, globalCtx, 0, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = gSaveContext.eventInf[0] & ~0xF;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
|
@ -918,7 +949,10 @@ void EnIn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &collider->base);
|
||||
if (this->actionFunc != func_80A7A304) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->skelAnime.animation == &object_in_Anim_001BE0 && ((gSaveContext.eventInf[0] & 0xF) != 6)) {
|
||||
if (this->skelAnime.animation == &object_in_Anim_001BE0 &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) !=
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK))) {
|
||||
func_80A79690(&this->skelAnime, this, globalCtx);
|
||||
}
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue