code_8012EC80.c OK and Documented + parameter_static extraction (#534)

* Match remaining functions of code_8012EC80.c

* parameter_static extracted and OK

* Small Progress

* Documentation all over the place

* Finish Documenting

* Cleanup

* Name more textures

* Update knowledge on deku playground player name

* All textures from parameter_static known now

* Finish documenting and validating parameter_static

* More up-to-date SaveContext docs

* More docs

* More cleanup

* Sun -> Star

* Minor touchup

* More cleanup

* pictograph -> pictoBox

* Remove the "unused" part

* More accurate name: hour lines

* It's gsDPLoadTextureBlock, not gsDPSetTextureImage

* Fix parameter_static and merge issues

* More docs from new PRs and Parameter WIP

* Missed a name

* Move parameter_static to interface assets

* Clean up code_8012EC80.c data

* Fix comment

* Add comments to parameter_static

* Oops

* fix merge

* Missed a PR review suggestion

* Fix merge
This commit is contained in:
engineer124
2022-02-05 12:49:21 +11:00
committed by GitHub
parent bcdd99df08
commit 2104c16362
65 changed files with 969 additions and 614 deletions
+405 -235
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "interface/parameter_static/parameter_static.h"
// Bit Flag array in which gBitFlags[n] is literally (1 << n)
// Bit Flag array in which gBitFlags[n] is (1 << n)
u32 gBitFlags[] = {
(1 << 0), (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6), (1 << 7),
(1 << 8), (1 << 9), (1 << 10), (1 << 11), (1 << 12), (1 << 13), (1 << 14), (1 << 15),
@@ -8,164 +9,225 @@ u32 gBitFlags[] = {
(1 << 24), (1 << 25), (1 << 26), (1 << 27), (1 << 28), (1 << 29), (1 << 30), (1 << 31),
};
u16 gEquipMasks[] = { 0x000F, 0x00F0, 0x0F00, 0xF000 };
u16 gEquipNegMasks[] = { 0xFFF0, 0xFF0F, 0xF0FF, 0x0FFF };
// four-bit masks
u16 gEquipMasks[] = {
0xF << 0, // Sword
0xF << 4, // Shield
0xF << 8, // Unused (Tunic)
0xF << 12, // Unused (Boots)
};
// four-bit masks
u16 gEquipNegMasks[] = {
~(0xF << 0), // Sword
~(0xF << 4), // Shield
~(0xF << 8), // Unused (Tunic)
(u16) ~(0xF << 12), // Unused (Boots)
};
// 3 = two bit masks
// 7 = three bit masks
u32 gUpgradeMasks[] = {
0x00000007, 0x00000038, 0x000001C0, 0x00000E00, 0x00003000, 0x0001C000, 0x000E0000, 0x00700000,
7 << 0, // Quivers
7 << 3, // Bomb Bags
7 << 6, // Unused (Strength)
7 << 9, // Unused (Scale)
3 << 12, // Wallets
7 << 14, // Unused (Deku Seed Bullet Bags)
7 << 17, // Unused (Deku Stick)
7 << 20, // Unused (Deku Nut)
};
// 3 = two-bit masks
// 7 = three-bit masks
u32 gUpgradeNegMasks[] = {
0xFFFFFFF8, 0xFFFFFFC7, 0xFFFFFE3F, 0xFFFFF1FF, 0xFFFFCFFF, 0xFFFE3FFF, 0xFFF1FFFF, 0xFF8FFFFF,
~(7 << 0), // Quivers
~(7 << 3), // Bomb Bags
~(7 << 6), // Unused (Strength)
~(7 << 9), // Unused (Scale)
~(3 << 12), // Wallets
~(7 << 14), // Unused (Deku Seed Bullet Bags)
~(7 << 17), // Unused (Deku Stick)
~(7 << 20), // Unused (Deku Nut)
};
u8 gEquipShifts[] = {
0, // Sword
4, // Shield
8, // Unused (Tunic)
12, // Unused (Boots)
};
u8 gUpgradeShifts[] = {
0, // Quivers
3, // Bomb Bags
6, // Unused (Strength)
9, // Unused (Scale)
12, // Wallets
14, // Unused (Deku Seed Bullet Bags)
17, // Unused (Deku Stick)
20, // Unused (Deku Nut)
};
u8 gEquipShifts[] = { 0, 4, 8, 12 };
u8 gUpgradeShifts[] = { 0, 3, 6, 9, 12, 14, 17, 20 };
u16 gUpgradeCapacities[][4] = {
{ 0, 30, 40, 50 }, // Quivers
{ 0, 20, 30, 40 }, // Bomb Bags
{ 0, 0, 0, 0 }, // Unused (Scale)
{ 0, 0, 0, 0 }, // Unused (Strength)
{ 0, 0, 0, 0 }, // Unused (Scale)
{ 99, 200, 500, 500 }, // Wallets
{ 0, 30, 40, 50 }, // Unused (Deku Seed Bullet Bags)
{ 0, 10, 20, 30 }, // Unused (Deku Stick)
{ 0, 20, 30, 40 }, // Unused (Deku Nut)
};
u32 gGsFlagsMask[] = { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 };
u32 gGsFlagsShift[] = { 0, 8, 16, 24 };
// eight-bit masks
u32 gGsFlagsMask[] = {
0xFF << 0,
0xFF << 8,
0xFF << 16,
0xFF << 24,
};
u32 gGsFlagsShift[] = {
0,
8,
16,
24,
};
// TODO: use symbols for these icon textures once textures are properly in C
void* gItemIcons[] = {
0x08000000, // ITEM_OCARINA
0x08001000, // ITEM_BOW
0x08002000, // ITEM_ARROW_FIRE
0x08003000, // ITEM_ARROW_ICE
0x08004000, // ITEM_ARROW_LIGHT
0x08005000, // ITEM_OCARINA_FAIRY
0x08006000, // ITEM_BOMB
0x08007000, // ITEM_BOMBCHU
0x08008000, // ITEM_STICK
0x08009000, // ITEM_NUT
0x0800A000, // ITEM_MAGIC_BEANS
0x0800B000, // ITEM_SLINGSHOT
0x0800C000, // ITEM_POWDER_KEG
0x0800D000, // ITEM_PICTO_BOX
0x0800E000, // ITEM_LENS
0x0800F000, // ITEM_HOOKSHOT
0x08010000, // ITEM_SWORD_GREAT_FAIRY
0x08011000, // ITEM_LONGSHOT
0x08012000, // ITEM_BOTTLE
0x08013000, // ITEM_POTION_RED
0x08014000, // ITEM_POTION_GREEN
0x08015000, // ITEM_POTION_BLUE
0x08016000, // ITEM_FAIRY
0x08017000, // ITEM_DEKU_PRINCESS
0x08018000, // ITEM_MILK_BOTTLE
0x08019000, // ITEM_MILK_HALF
0x0801A000, // ITEM_FISH
0x0801B000, // ITEM_BUG
0x0801C000, // ITEM_BLUE_FIRE
0x0801D000, // ITEM_POE
0x0801E000, // ITEM_BIG_POE
0x0801F000, // ITEM_SPRING_WATER
0x08020000, // ITEM_HOT_SPRING_WATER
0x08021000, // ITEM_ZORA_EGG
0x08022000, // ITEM_GOLD_DUST
0x08023000, // ITEM_MUSHROOM
0x08024000, // ITEM_SEA_HORSE
0x08025000, // ITEM_CHATEAU
0x08026000, // ITEM_HYLIAN_LOACH
0x08027000, // ITEM_OBABA_DRINK
0x08028000, // ITEM_MOON_TEAR
0x08029000, // ITEM_DEED_LAND
0x0802A000, // ITEM_DEED_SWAMP
0x0802B000, // ITEM_DEED_MOUNTAIN
0x0802C000, // ITEM_DEED_OCEAN
0x0802D000, // ITEM_ROOM_KEY
0x0802E000, // ITEM_LETTER_MAMA
0x0802F000, // ITEM_LETTER_TO_KAFEI
0x08030000, // ITEM_PENDANT_MEMORIES
0x08031000, // ITEM_TINGLE_MAP
0x08032000, // ITEM_MASK_DEKU
0x08033000, // ITEM_MASK_GORON
0x08034000, // ITEM_MASK_ZORA
0x08035000, // ITEM_MASK_FIERCE_DEITY
0x08036000, // ITEM_MASK_TRUTH
0x08037000, // ITEM_MASK_KAFEIS_MASK
0x08038000, // ITEM_MASK_ALL_NIGHT
0x08039000, // ITEM_MASK_BUNNY
0x0803A000, // ITEM_MASK_KEATON
0x0803B000, // ITEM_MASK_GARO
0x0803C000, // ITEM_MASK_ROMANI
0x0803D000, // ITEM_MASK_CIRCUS_LEADER
0x0803E000, // ITEM_MASK_POSTMAN
0x0803F000, // ITEM_MASK_COUPLE
0x08040000, // ITEM_MASK_GREAT_FAIRY
0x08041000, // ITEM_MASK_GIBDO
0x08042000, // ITEM_MASK_DON_GERO
0x08043000, // ITEM_MASK_KAMARO
0x08044000, // ITEM_MASK_CAPTAIN
0x08045000, // ITEM_MASK_STONE
0x08046000, // ITEM_MASK_BREMEN
0x08047000, // ITEM_MASK_BLAST
0x08048000, // ITEM_MASK_SCENTS
0x08049000, // ITEM_MASK_GIANT
0x0804A000, // ITEM_BOW_ARROW_FIRE
0x0804B000, // ITEM_BOW_ARROW_ICE
0x0804C000, // ITEM_BOW_ARROW_LIGHT
0x0804D000, // ITEM_SWORD_KOKIRI
0x0804E000, // ITEM_SWORD_RAZOR
0x0804F000, // ITEM_SWORD_GILDED
0x08050000, // ITEM_SWORD_DEITY
0x08051000, // ITEM_SHIELD_HERO
0x08052000, // ITEM_SHIELD_MIRROR
0x08053000, // ITEM_QUIVER_30
0x08054000, // ITEM_QUIVER_40
0x08055000, // ITEM_QUIVER_50
0x08056000, // ITEM_BOMB_BAG_20
0x08057000, // ITEM_BOMB_BAG_30
0x08058000, // ITEM_BOMB_BAG_40
0x08059000, // ITEM_WALLET_DEFAULT
0x0805A000, // ITEM_WALLET_ADULT
0x0805B000, // ITEM_WALLET_GIANT
0x0805C000, // ITEM_FISHING_POLE
0x0805D000, // ITEM_REMAINS_ODOLWA
0x0805E000, // ITEM_REMAINS_GOHT
0x0805F000, // ITEM_REMAINS_GYORG
0x08060000, // ITEM_REMAINS_TWINMOLD
0x08062000, // ITEM_SONG_SONATA
0x08062000, // ITEM_SONG_LULLABY
0x08062000, // ITEM_SONG_NOVA
0x08062000, // ITEM_SONG_ELEGY
0x08062000, // ITEM_SONG_OATH
0x08062000, // ITEM_SONG_SARIA
0x08062000, // ITEM_SONG_TIME
0x08062000, // ITEM_SONG_HEALING
0x08062000, // ITEM_SONG_EPONA
0x08062000, // ITEM_SONG_SOARING
0x08062000, // ITEM_SONG_STORMS
0x08062000, // ITEM_SONG_SUN
0x08061000, // ITEM_BOMBERS_NOTEBOOK
0x09000000, // ITEM_SKULL_TOKEN
0x09000900, // ITEM_HEART_CONTAINER
0x09001200, // ITEM_HEART_PIECE
0x08062000, //
0x08062000, //
0x08062000, // ITEM_SONG_LULLABY_INTRO
0x09003600, // ITEM_KEY_BOSS
0x09004800, // ITEM_COMPASS
0x09003F00, // ITEM_DUNGEON_MAP
0x09005100, // ITEM_STRAY_FAIRIES
0x09005A00, // ITEM_KEY_SMALL
0x09006300, // ITEM_MAGIC_SMALL
0x09006C00, // ITEM_MAGIC_LARGE
0x08062180, // ITEM_HEART_PIECE_2
0x08062A80, // ITEM_INVALID_1
0x08063380, // ITEM_INVALID_2
0x020028A0, // ITEM_INVALID_3
0x020025A0, // ITEM_INVALID_4
0x020027A0, // ITEM_INVALID_5
0x020026A0, // ITEM_INVALID_6
0x020024A0, // ITEM_INVALID_7
0x08000000, // ITEM_OCARINA
0x08001000, // ITEM_BOW
0x08002000, // ITEM_ARROW_FIRE
0x08003000, // ITEM_ARROW_ICE
0x08004000, // ITEM_ARROW_LIGHT
0x08005000, // ITEM_OCARINA_FAIRY
0x08006000, // ITEM_BOMB
0x08007000, // ITEM_BOMBCHU
0x08008000, // ITEM_STICK
0x08009000, // ITEM_NUT
0x0800A000, // ITEM_MAGIC_BEANS
0x0800B000, // ITEM_SLINGSHOT
0x0800C000, // ITEM_POWDER_KEG
0x0800D000, // ITEM_PICTO_BOX
0x0800E000, // ITEM_LENS
0x0800F000, // ITEM_HOOKSHOT
0x08010000, // ITEM_SWORD_GREAT_FAIRY
0x08011000, // ITEM_LONGSHOT
0x08012000, // ITEM_BOTTLE
0x08013000, // ITEM_POTION_RED
0x08014000, // ITEM_POTION_GREEN
0x08015000, // ITEM_POTION_BLUE
0x08016000, // ITEM_FAIRY
0x08017000, // ITEM_DEKU_PRINCESS
0x08018000, // ITEM_MILK_BOTTLE
0x08019000, // ITEM_MILK_HALF
0x0801A000, // ITEM_FISH
0x0801B000, // ITEM_BUG
0x0801C000, // ITEM_BLUE_FIRE
0x0801D000, // ITEM_POE
0x0801E000, // ITEM_BIG_POE
0x0801F000, // ITEM_SPRING_WATER
0x08020000, // ITEM_HOT_SPRING_WATER
0x08021000, // ITEM_ZORA_EGG
0x08022000, // ITEM_GOLD_DUST
0x08023000, // ITEM_MUSHROOM
0x08024000, // ITEM_SEA_HORSE
0x08025000, // ITEM_CHATEAU
0x08026000, // ITEM_HYLIAN_LOACH
0x08027000, // ITEM_OBABA_DRINK
0x08028000, // ITEM_MOON_TEAR
0x08029000, // ITEM_DEED_LAND
0x0802A000, // ITEM_DEED_SWAMP
0x0802B000, // ITEM_DEED_MOUNTAIN
0x0802C000, // ITEM_DEED_OCEAN
0x0802D000, // ITEM_ROOM_KEY
0x0802E000, // ITEM_LETTER_MAMA
0x0802F000, // ITEM_LETTER_TO_KAFEI
0x08030000, // ITEM_PENDANT_MEMORIES
0x08031000, // ITEM_TINGLE_MAP
0x08032000, // ITEM_MASK_DEKU
0x08033000, // ITEM_MASK_GORON
0x08034000, // ITEM_MASK_ZORA
0x08035000, // ITEM_MASK_FIERCE_DEITY
0x08036000, // ITEM_MASK_TRUTH
0x08037000, // ITEM_MASK_KAFEIS_MASK
0x08038000, // ITEM_MASK_ALL_NIGHT
0x08039000, // ITEM_MASK_BUNNY
0x0803A000, // ITEM_MASK_KEATON
0x0803B000, // ITEM_MASK_GARO
0x0803C000, // ITEM_MASK_ROMANI
0x0803D000, // ITEM_MASK_CIRCUS_LEADER
0x0803E000, // ITEM_MASK_POSTMAN
0x0803F000, // ITEM_MASK_COUPLE
0x08040000, // ITEM_MASK_GREAT_FAIRY
0x08041000, // ITEM_MASK_GIBDO
0x08042000, // ITEM_MASK_DON_GERO
0x08043000, // ITEM_MASK_KAMARO
0x08044000, // ITEM_MASK_CAPTAIN
0x08045000, // ITEM_MASK_STONE
0x08046000, // ITEM_MASK_BREMEN
0x08047000, // ITEM_MASK_BLAST
0x08048000, // ITEM_MASK_SCENTS
0x08049000, // ITEM_MASK_GIANT
0x0804A000, // ITEM_BOW_ARROW_FIRE
0x0804B000, // ITEM_BOW_ARROW_ICE
0x0804C000, // ITEM_BOW_ARROW_LIGHT
0x0804D000, // ITEM_SWORD_KOKIRI
0x0804E000, // ITEM_SWORD_RAZOR
0x0804F000, // ITEM_SWORD_GILDED
0x08050000, // ITEM_SWORD_DEITY
0x08051000, // ITEM_SHIELD_HERO
0x08052000, // ITEM_SHIELD_MIRROR
0x08053000, // ITEM_QUIVER_30
0x08054000, // ITEM_QUIVER_40
0x08055000, // ITEM_QUIVER_50
0x08056000, // ITEM_BOMB_BAG_20
0x08057000, // ITEM_BOMB_BAG_30
0x08058000, // ITEM_BOMB_BAG_40
0x08059000, // ITEM_WALLET_DEFAULT
0x0805A000, // ITEM_WALLET_ADULT
0x0805B000, // ITEM_WALLET_GIANT
0x0805C000, // ITEM_FISHING_POLE
0x0805D000, // ITEM_REMAINS_ODOLWA
0x0805E000, // ITEM_REMAINS_GOHT
0x0805F000, // ITEM_REMAINS_GYORG
0x08060000, // ITEM_REMAINS_TWINMOLD
0x08062000, // ITEM_SONG_SONATA
0x08062000, // ITEM_SONG_LULLABY
0x08062000, // ITEM_SONG_NOVA
0x08062000, // ITEM_SONG_ELEGY
0x08062000, // ITEM_SONG_OATH
0x08062000, // ITEM_SONG_SARIA
0x08062000, // ITEM_SONG_TIME
0x08062000, // ITEM_SONG_HEALING
0x08062000, // ITEM_SONG_EPONA
0x08062000, // ITEM_SONG_SOARING
0x08062000, // ITEM_SONG_STORMS
0x08062000, // ITEM_SONG_SUN
0x08061000, // ITEM_BOMBERS_NOTEBOOK
0x09000000, // ITEM_SKULL_TOKEN
0x09000900, // ITEM_HEART_CONTAINER
0x09001200, // ITEM_HEART_PIECE
0x08062000, //
0x08062000, //
0x08062000, // ITEM_SONG_LULLABY_INTRO
0x09003600, // ITEM_KEY_BOSS
0x09004800, // ITEM_COMPASS
0x09003F00, // ITEM_DUNGEON_MAP
0x09005100, // ITEM_STRAY_FAIRIES
0x09005A00, // ITEM_KEY_SMALL
0x09006300, // ITEM_MAGIC_SMALL
0x09006C00, // ITEM_MAGIC_LARGE
0x08062180, // ITEM_HEART_PIECE_2
0x08062A80, // ITEM_INVALID_1
0x08063380, // ITEM_INVALID_2
gOcarinaCUpTex, // ITEM_INVALID_3
gOcarinaCDownTex, // ITEM_INVALID_4
gOcarinaCLeftTex, // ITEM_INVALID_5
gOcarinaCRightTex, // ITEM_INVALID_6
gOcarinaATex, // ITEM_INVALID_7
};
// Used to map item IDs to inventory slots
@@ -412,7 +474,7 @@ u16 gScenesPerRegion[11][27] = {
},
};
s32 func_8012EC80(GlobalContext* globalCtx) {
s32 Inventory_GetBtnBItem(GlobalContext* globalCtx) {
if (gSaveContext.buttonStatus[0] == BTN_DISABLED) {
return ITEM_NONE;
} else if (gSaveContext.unk_1015 == ITEM_NONE) {
@@ -429,129 +491,237 @@ s32 func_8012EC80(GlobalContext* globalCtx) {
}
}
void func_8012ED34(s16 equipment);
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8012EC80/func_8012ED34.s")
/**
* Only changes shield
*/
void Inventory_ChangeEquipment(s16 value) {
SET_EQUIP_VALUE(EQUIP_SHIELD, value);
}
u8 func_8012ED78(GlobalContext* globalCtx, s16 equipment);
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8012EC80/func_8012ED78.s")
/**
* Only deletes shield, equipment argument unused and is a remnant of OoT
*/
u8 Inventory_DeleteEquipment(GlobalContext* globalCtx, s16 equipment) {
Player* player = GET_PLAYER(globalCtx);
void func_8012EDE8(s16 arg0, u32 arg1);
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8012EC80/func_8012EDE8.s")
if (CUR_EQUIP_VALUE_VOID(EQUIP_SHIELD) != 0) {
SET_EQUIP_VALUE(EQUIP_SHIELD, 0);
Player_SetEquipmentData(globalCtx, player);
return true;
}
s32 func_8012EE34(s16 arg0) {
s16 num = 0;
return false;
}
if (arg0 >= 0x20) {
if (arg0 < 0x40) {
num = 1;
} else if (arg0 < 0x60) {
num = 2;
} else if (arg0 < 0x80) {
num = 3;
} else if (arg0 < 0xA0) {
num = 4;
} else if (arg0 < 0xC0) {
num = 5;
} else if (arg0 < 0xE0) {
num = 6;
void Inventory_ChangeUpgrade(s16 upgrade, u32 value) {
u32 upgrades = gSaveContext.inventory.upgrades;
upgrades &= gUpgradeNegMasks[upgrade];
upgrades |= value << gUpgradeShifts[upgrade];
gSaveContext.inventory.upgrades = upgrades;
}
s32 Inventory_IsMapVisible(s16 sceneNum) {
s16 index = 0;
/**
* a single index of scenesVisible can only hold 32 bits. So for every 32 scenes in the scene enum,
* increment to the next index of scenesVisible so that every scene gets a unique flag in scenesVisible,
* 224 bits were allocated to this although there are only 112 scenes
*/
if (sceneNum >= 0x20) {
if (sceneNum < 0x40) {
index = 1;
} else if (sceneNum < 0x60) {
index = 2;
} else if (sceneNum < 0x80) {
index = 3;
} else if (sceneNum < 0xA0) {
index = 4;
} else if (sceneNum < 0xC0) {
index = 5;
} else if (sceneNum < 0xE0) {
index = 6;
}
}
if (gSaveContext.roomInf[125][num] & gBitFlags[arg0 - (num << 5)]) {
return 1;
if (gSaveContext.scenesVisible[index] & gBitFlags[sceneNum - (index << 5)]) {
return true;
}
return 0;
return false;
}
static u16 D_801C2380[6][12] = {
{ SCENE_00KEIKOKU, SCENE_BOTI, SCENE_13HUBUKINOMITI, SCENE_24KEMONOMITI, SCENE_IKANAMAE, SCENE_TOWN, SCENE_ICHIBA,
SCENE_BACKTOWN, SCENE_CLOCKTOWER, SCENE_ALLEY, -1 },
{ SCENE_20SICHITAI, SCENE_20SICHITAI2, SCENE_21MITURINMAE, SCENE_22DEKUCITY, SCENE_DEKU_KING, SCENE_KINSTA1, -1 },
{ SCENE_10YUKIYAMANOMURA, SCENE_10YUKIYAMANOMURA2, SCENE_11GORONNOSATO, SCENE_11GORONNOSATO2, SCENE_16GORON_HOUSE,
SCENE_12HAKUGINMAE, SCENE_14YUKIDAMANOMITI, SCENE_GORONRACE, SCENE_17SETUGEN, SCENE_17SETUGEN2, -1 },
{ SCENE_F01, SCENE_ROMANYMAE, SCENE_OMOYA, SCENE_F01C, SCENE_F01_B, SCENE_KOEPONARACE, -1 },
{ SCENE_30GYOSON, SCENE_SINKAI, SCENE_31MISAKI, SCENE_TORIDE, SCENE_KAIZOKU, SCENE_33ZORACITY, SCENE_35TAKI, -1 },
{ SCENE_F40, SCENE_F41, SCENE_CASTLE, SCENE_IKANA, SCENE_REDEAD, -1 },
static u16 sScenesPerTingleMap[6][12] = {
{
// Clock Town Tingle Map
SCENE_00KEIKOKU,
SCENE_BOTI,
SCENE_13HUBUKINOMITI,
SCENE_24KEMONOMITI,
SCENE_IKANAMAE,
SCENE_TOWN,
SCENE_ICHIBA,
SCENE_BACKTOWN,
SCENE_CLOCKTOWER,
SCENE_ALLEY,
-1,
},
{
// Woodfall Tingle Map
SCENE_20SICHITAI,
SCENE_20SICHITAI2,
SCENE_21MITURINMAE,
SCENE_22DEKUCITY,
SCENE_DEKU_KING,
SCENE_KINSTA1,
-1,
},
{
// Snowhead Tingle Map
SCENE_10YUKIYAMANOMURA,
SCENE_10YUKIYAMANOMURA2,
SCENE_11GORONNOSATO,
SCENE_11GORONNOSATO2,
SCENE_16GORON_HOUSE,
SCENE_12HAKUGINMAE,
SCENE_14YUKIDAMANOMITI,
SCENE_GORONRACE,
SCENE_17SETUGEN,
SCENE_17SETUGEN2,
-1,
},
{
// Romani Ranch Tingle Map
SCENE_F01,
SCENE_ROMANYMAE,
SCENE_OMOYA,
SCENE_F01C,
SCENE_F01_B,
SCENE_KOEPONARACE,
-1,
},
{
// Great Bay Tingle Map
SCENE_30GYOSON,
SCENE_SINKAI,
SCENE_31MISAKI,
SCENE_TORIDE,
SCENE_KAIZOKU,
SCENE_33ZORACITY,
SCENE_35TAKI,
-1,
},
{
// Stone Tower Tingle Map
SCENE_F40,
SCENE_F41,
SCENE_CASTLE,
SCENE_IKANA,
SCENE_REDEAD,
-1,
},
};
void func_8012EF0C(s16 arg0) {
s16 phi_v0 = 0;
s16 phi_v1 = 0;
u16(*new_var)[] = &D_801C2380[arg0];
/**
* Map visibility is achieved by purchasing a tingle map
*/
void Inventory_SetMapVisibility(s16 tingleIndex) {
s16 i = 0;
s16 index = 0;
u16(*tingleMapSceneIndices)[] = &sScenesPerTingleMap[tingleIndex];
if ((arg0 >= 0) && (arg0 < 6)) {
if ((tingleIndex >= 0) && (tingleIndex < 6)) {
while (true) {
if ((*new_var)[phi_v0] == 0xFFFF) {
if ((*tingleMapSceneIndices)[i] == 0xFFFF) {
break;
}
if (((s16)(*new_var)[phi_v0]) < 0x20) {
phi_v1 = 0;
} else if (((s16)(*new_var)[phi_v0]) < 0x40) {
phi_v1 = 1;
} else if (((s16)(*new_var)[phi_v0]) < 0x60) {
phi_v1 = 2;
} else if (((s16)(*new_var)[phi_v0]) < 0x80) {
phi_v1 = 3;
} else if (((s16)(*new_var)[phi_v0]) < 0xA0) {
phi_v1 = 4;
} else if (((s16)(*new_var)[phi_v0]) < 0xC0) {
phi_v1 = 5;
} else if (((s16)(*new_var)[phi_v0]) < 0xE0) {
phi_v1 = 6;
/**
* a single index of scenesVisible can only hold 32 bits. So for every 32 scenes in the scene enum,
* increment to the next index of scenesVisible so that every scene gets a unique flag in scenesVisible,
* 224 bits were allocated to this although there are only 112 scenes
*/
if (((s16)(*tingleMapSceneIndices)[i]) < 0x20) {
index = 0;
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0x40) {
index = 1;
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0x60) {
index = 2;
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0x80) {
index = 3;
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0xA0) {
index = 4;
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0xC0) {
index = 5;
} else if (((s16)(*tingleMapSceneIndices)[i]) < 0xE0) {
index = 6;
}
// Required to match
gSaveContext.roomInf[125][phi_v1] =
gSaveContext.roomInf[125][phi_v1] | gBitFlags[(s16)(*new_var)[phi_v0] - (phi_v1 << 5)];
phi_v0++;
gSaveContext.scenesVisible[index] =
gSaveContext.scenesVisible[index] | gBitFlags[(s16)(*tingleMapSceneIndices)[i] - (index << 5)];
i++;
}
if ((*new_var) == D_801C2380[0]) {
gSaveContext.unk_F60 |= 3;
} else if ((*new_var) == D_801C2380[1]) {
gSaveContext.unk_F60 |= 0x1C;
} else if ((*new_var) == D_801C2380[2]) {
gSaveContext.unk_F60 |= 0xE0;
} else if ((*new_var) == D_801C2380[3]) {
gSaveContext.unk_F60 |= 0x100;
} else if ((*new_var) == D_801C2380[4]) {
gSaveContext.unk_F60 |= 0x1E00;
} else if ((*new_var) == D_801C2380[5]) {
gSaveContext.unk_F60 |= 0x6000;
if ((*tingleMapSceneIndices) == sScenesPerTingleMap[0]) {
gSaveContext.mapsVisible |= 3;
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[1]) {
gSaveContext.mapsVisible |= 0x1C;
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[2]) {
gSaveContext.mapsVisible |= 0xE0;
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[3]) {
gSaveContext.mapsVisible |= 0x100;
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[4]) {
gSaveContext.mapsVisible |= 0x1E00;
} else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[5]) {
gSaveContext.mapsVisible |= 0x6000;
}
}
XREG(95) = 0;
}
void func_8012F0EC(s16 arg0);
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8012EC80/func_8012F0EC.s")
/**
* Also stores the players filename into dekuPlaygroundPlayerName
*/
void Inventory_SaveDekuPlaygroundHighScore(s16 timerId) {
s16 i;
#ifdef NON_MATCHING
// regalloc
void func_8012F1BC(s16 sceneIndex) {
if (sceneIndex == SCENE_KINSTA1) {
gSaveContext.roomInf[126][0] = ((((gSaveContext.roomInf[126][0] & 0xFFFF0000) >> 0x10) + 1) << 0x10) |
(gSaveContext.roomInf[126][0] & 0xFFFF);
} else {
gSaveContext.roomInf[126][0] =
((gSaveContext.roomInf[126][0] + 1) & 0xFFFF) | (gSaveContext.roomInf[126][0] & 0xFFFF0000);
}
}
#else
void func_8012F1BC(s16 arg0);
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8012EC80/func_8012F1BC.s")
#endif
gSaveContext.dekuPlaygroundHighScores[CURRENT_DAY - 1] = gSaveContext.unk_3DE0[timerId];
s16 func_8012F22C(s16 sceneIndex) {
if (sceneIndex == SCENE_KINSTA1) {
return (gSaveContext.roomInf[126][0] & 0xFFFF0000) >> 0x10;
} else {
return gSaveContext.roomInf[126][0] & 0xFFFF;
for (i = 0; i < 8; i++) {
gSaveContext.inventory.dekuPlaygroundPlayerName[CURRENT_DAY - 1][i] = gSaveContext.playerName[i];
}
}
void func_8012F278(GlobalContext* globalCtx);
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8012EC80/func_8012F278.s")
void Inventory_IncrementSkullTokenCount(s16 sceneIndex) {
if (sceneIndex == SCENE_KINSTA1) {
// Swamp Spider House (increment high bits of skullTokenCount)
gSaveContext.skullTokenCount = ((u16)(((gSaveContext.skullTokenCount & 0xFFFF0000) >> 0x10) + 1) << 0x10) |
(gSaveContext.skullTokenCount & 0xFFFF);
} else {
// Ocean Spider House (increment low bits of skullTokenCount)
gSaveContext.skullTokenCount =
(((u16)gSaveContext.skullTokenCount + 1) & 0xFFFF) | (gSaveContext.skullTokenCount & 0xFFFF0000);
}
}
s16 Inventory_GetSkullTokenCount(s16 sceneIndex) {
if (sceneIndex == SCENE_KINSTA1) {
// Swamp Spider House
return (gSaveContext.skullTokenCount & 0xFFFF0000) >> 0x10;
} else {
// Ocean Spider House
return gSaveContext.skullTokenCount & 0xFFFF;
}
}
void Inventory_SaveLotteryCodeGuess(GlobalContext* globalCtx) {
u16 lotteryCodeGuess;
lotteryCodeGuess = ((globalCtx->msgCtx.unk12054 & 0xF) << 8); // First Digit
lotteryCodeGuess |= ((globalCtx->msgCtx.unk12056 & 0xF) << 4); // Second Digit
lotteryCodeGuess |= (globalCtx->msgCtx.unk12058 & 0xF); // Third Digit
gSaveContext.lotteryCodeGuess = (gSaveContext.lotteryCodeGuess & 0xFFFF0000) | (lotteryCodeGuess & 0xFFFF);
}
+8 -8
View File
@@ -2233,11 +2233,11 @@ void func_800B9120(ActorContext* actorCtx) {
void Actor_InitContext(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry* actorEntry) {
ActorOverlay* overlayEntry;
u32* cycleFlags;
CycleSceneFlags* cycleFlags;
s32 i;
gSaveContext.weekEventReg[92] |= 0x80;
cycleFlags = gSaveContext.cycleSceneFlags[convert_scene_number_among_shared_scenes(globalCtx->sceneNum)];
cycleFlags = &gSaveContext.cycleSceneFlags[convert_scene_number_among_shared_scenes(globalCtx->sceneNum)];
bzero(actorCtx, sizeof(ActorContext));
ActorOverlayTable_Init();
@@ -2251,14 +2251,14 @@ void Actor_InitContext(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEn
overlayEntry++;
}
actorCtx->flags.chest = cycleFlags[0];
actorCtx->flags.switches[0] = cycleFlags[1];
actorCtx->flags.switches[1] = cycleFlags[2];
actorCtx->flags.chest = cycleFlags->chest;
actorCtx->flags.switches[0] = cycleFlags->swch0;
actorCtx->flags.switches[1] = cycleFlags->swch1;
if (globalCtx->sceneNum == SCENE_INISIE_R) {
cycleFlags = gSaveContext.cycleSceneFlags[globalCtx->sceneNum];
cycleFlags = &gSaveContext.cycleSceneFlags[globalCtx->sceneNum];
}
actorCtx->flags.collectible[0] = cycleFlags[4];
actorCtx->flags.clearedRoom = cycleFlags[3];
actorCtx->flags.collectible[0] = cycleFlags->collectible;
actorCtx->flags.clearedRoom = cycleFlags->clearedRoom;
TitleCard_ContextInit(&globalCtx->state, &actorCtx->titleCtxt);
func_800B6468(globalCtx);
+19 -21
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "interface/parameter_static/parameter_static.h"
static s16 sHeartsPrimColors[3][3] = { { 255, 70, 50 }, { 255, 190, 0 }, { 100, 100, 255 } };
static s16 sHeartsEnvColors[3][3] = { { 50, 40, 60 }, { 255, 0, 0 }, { 0, 0, 255 } };
@@ -14,24 +15,21 @@ s16 sBeatingHeartsDDEnv[3];
s16 sHeartsDDPrim[2][3];
s16 sHeartsDDEnv[2][3];
extern TexturePtr D_02000000; // Empty heart texture
extern TexturePtr D_02000100; // Quarter Heart Texture
extern TexturePtr D_02000200; // Half Heart Texture
extern TexturePtr D_02000300; // Three Quarter Heart Texture
extern TexturePtr D_02000400; // Full heart texture
extern TexturePtr D_02000500; // Empty Double Defense Heart texture
extern TexturePtr D_02000600; // Quarter Double Defense Heart Texture
extern TexturePtr D_02000700; // Half Double Defense Heart Texture
extern TexturePtr D_02000800; // Three Quarter Double Defense Heart Texture
extern TexturePtr D_02000900; // Full Double Defense Heart texture
TexturePtr HeartTextures[] = {
gHeartFullTex, gHeartQuarterTex, gHeartQuarterTex, gHeartQuarterTex,
gHeartQuarterTex, gHeartQuarterTex, gHeartHalfTex, gHeartHalfTex,
gHeartHalfTex, gHeartHalfTex, gHeartHalfTex, gHeartThreeQuarterTex,
gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex,
};
TexturePtr HeartTextures[] = { &D_02000400, &D_02000100, &D_02000100, &D_02000100, &D_02000100, &D_02000100,
&D_02000200, &D_02000200, &D_02000200, &D_02000200, &D_02000200, &D_02000300,
&D_02000300, &D_02000300, &D_02000300, &D_02000300 };
TexturePtr HeartDDTextures[] = { &D_02000900, &D_02000600, &D_02000600, &D_02000600, &D_02000600, &D_02000600,
&D_02000700, &D_02000700, &D_02000700, &D_02000700, &D_02000700, &D_02000800,
&D_02000800, &D_02000800, &D_02000800, &D_02000800 };
TexturePtr HeartDDTextures[] = {
gDefenseHeartFullTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex,
gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartThreeQuarterTex,
gDefenseHeartThreeQuarterTex, gDefenseHeartThreeQuarterTex, gDefenseHeartThreeQuarterTex,
gDefenseHeartThreeQuarterTex,
};
void LifeMeter_Init(GlobalContext* globalCtx) {
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
@@ -276,11 +274,11 @@ void LifeMeter_Draw(GlobalContext* globalCtx) {
}
if (i < fullHeartCount) {
heartTex = &D_02000400;
heartTex = gHeartFullTex;
} else if (i == fullHeartCount) {
heartTex = HeartTextures[fractionHeartCount];
} else {
heartTex = &D_02000000;
heartTex = gHeartEmptyTex;
}
} else {
if (i < fullHeartCount) {
@@ -316,11 +314,11 @@ void LifeMeter_Draw(GlobalContext* globalCtx) {
gDPSetEnvColor(OVERLAY_DISP++, sHeartsDDEnv[1][0], sHeartsDDEnv[1][1], sHeartsDDEnv[1][2], 255);
}
if (i < fullHeartCount) {
heartTex = &D_02000900;
heartTex = gDefenseHeartFullTex;
} else if (i == fullHeartCount) {
heartTex = HeartDDTextures[fractionHeartCount];
} else {
heartTex = &D_02000500;
heartTex = gDefenseHeartEmptyTex;
}
}
+2 -2
View File
@@ -72,9 +72,9 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80114CA0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80114E90.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_HasEmptyBottle.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80114F2C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_HasItemInBottle.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80114FD0.s")
+1 -1
View File
@@ -68,7 +68,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123C58.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123C90.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/Player_SetEquipmentData.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123D50.s")
+18 -15
View File
@@ -388,17 +388,17 @@ void Scene_HeaderCmdTimeSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
}
if (cmd->timeSettings.unk6 != 0xFF) {
globalCtx->envCtx.unk_2 = cmd->timeSettings.unk6;
globalCtx->envCtx.timeIncrement = cmd->timeSettings.unk6;
} else {
globalCtx->envCtx.unk_2 = 0;
globalCtx->envCtx.timeIncrement = 0;
}
if ((gSaveContext.inventory.items[SLOT_OCARINA] == ITEM_NONE) && (globalCtx->envCtx.unk_2 != 0)) {
globalCtx->envCtx.unk_2 = 5;
if ((gSaveContext.inventory.items[SLOT_OCARINA] == ITEM_NONE) && (globalCtx->envCtx.timeIncrement != 0)) {
globalCtx->envCtx.timeIncrement = 5;
}
if (gSaveContext.unk_3F58 == 0) {
REG(15) = globalCtx->envCtx.unk_2;
if (gSaveContext.sunsSongState == SUNSSONG_INACTIVE) {
REG(15) = globalCtx->envCtx.timeIncrement;
}
dayTime = gSaveContext.time;
@@ -408,17 +408,20 @@ void Scene_HeaderCmdTimeSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
dayTime = gSaveContext.time;
globalCtx->envCtx.unk_C = (Math_CosS(dayTime - 0x8000) * 20.0f) * 25.0f;
if (globalCtx->envCtx.unk_2 == 0 && gSaveContext.cutscene < 0xFFF0) {
if (globalCtx->envCtx.timeIncrement == 0 && gSaveContext.cutscene < 0xFFF0) {
gSaveContext.environmentTime = gSaveContext.time;
if (gSaveContext.environmentTime >= 0x2AAA && gSaveContext.environmentTime < 0x4555) {
gSaveContext.environmentTime = 0x3555;
} else if (gSaveContext.environmentTime >= 0x4555 && gSaveContext.environmentTime < 0x5555) {
gSaveContext.environmentTime = 0x5555;
} else if (gSaveContext.environmentTime >= 0xAAAA && gSaveContext.environmentTime < 0xB555) {
gSaveContext.environmentTime = 0xB555;
} else if (gSaveContext.environmentTime >= 0xC000 && gSaveContext.environmentTime < 0xCAAA) {
gSaveContext.environmentTime = 0xCAAA;
if (gSaveContext.environmentTime >= CLOCK_TIME(4, 0) && gSaveContext.environmentTime < CLOCK_TIME(6, 30)) {
gSaveContext.environmentTime = CLOCK_TIME(5, 0);
} else if (gSaveContext.environmentTime >= CLOCK_TIME(6, 30) &&
gSaveContext.environmentTime < CLOCK_TIME(8, 0)) {
gSaveContext.environmentTime = CLOCK_TIME(8, 0);
} else if (gSaveContext.environmentTime >= CLOCK_TIME(16, 0) &&
gSaveContext.environmentTime < CLOCK_TIME(17, 0)) {
gSaveContext.environmentTime = CLOCK_TIME(17, 0);
} else if (gSaveContext.environmentTime >= CLOCK_TIME(18, 0) &&
gSaveContext.environmentTime < CLOCK_TIME(19, 0)) {
gSaveContext.environmentTime = CLOCK_TIME(19, 0);
}
}
}
+19 -19
View File
@@ -12,8 +12,8 @@ s32 func_8013A240(GlobalContext* globalCtx) {
s32 seen;
s32 count = 0;
gSaveContext.roomInf[123][3] = 0;
gSaveContext.roomInf[123][4] = 0;
gSaveContext.pictoFlags0 = 0;
gSaveContext.pictoFlags1 = 0;
if (globalCtx->sceneNum == SCENE_20SICHITAI) {
func_8013A41C(1);
@@ -76,19 +76,19 @@ s32 func_8013A240(GlobalContext* globalCtx) {
void func_8013A41C(s32 flag) {
if (flag < 0x20) {
gSaveContext.roomInf[123][3] |= (1 << flag);
gSaveContext.pictoFlags0 |= (1 << flag);
} else {
flag &= 0x1F;
gSaveContext.roomInf[123][4] |= (1 << flag);
gSaveContext.pictoFlags1 |= (1 << flag);
}
}
void func_8013A46C(s32 flag) {
if (flag < 0x20) {
gSaveContext.roomInf[123][3] &= ~(1 << flag);
gSaveContext.pictoFlags0 &= ~(1 << flag);
} else {
flag &= 0x1F;
gSaveContext.roomInf[123][4] &= ~(1 << flag);
gSaveContext.pictoFlags1 &= ~(1 << flag);
}
}
@@ -96,10 +96,10 @@ u32 func_8013A4C4(s32 flag) {
SaveContext* saveCtx = &gSaveContext;
if (flag < 0x20) {
return saveCtx->roomInf[123][3] & (1 << flag);
return saveCtx->pictoFlags0 & (1 << flag);
} else {
flag &= 0x1F;
return saveCtx->roomInf[123][4] & (1 << flag);
return saveCtx->pictoFlags1 & (1 << flag);
}
}
@@ -123,36 +123,36 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
distance = OLib_Vec3fDist(pos, &camera->eye);
if ((distance < distanceMin) || (distanceMax < distance)) {
func_8013A41C(0x3f);
ret = 0x3f;
func_8013A41C(0x3F);
ret = 0x3F;
}
x = func_8013A504(func_800DFCB4(camera) + rot->x);
y = func_8013A504(func_800DFCDC(camera) - (s16)(rot->y - 0x7FFF));
if ((0 < angleError) && ((angleError < x) || (angleError < y))) {
func_8013A41C(0x3e);
ret |= 0x3e;
func_8013A41C(0x3E);
ret |= 0x3E;
}
Actor_GetProjectedPos(globalCtx, pos, &screenSpace, &distance);
x = (s16)(screenSpace.x * distance * 160.0f + 160.0f) - 85;
y = (s16)(screenSpace.y * distance * -120.0f + 120.0f) - 67;
if ((x < 0) || (0x96 < x) || (y < 0) || (0x69 < y)) {
func_8013A41C(0x3d);
ret |= 0x3d;
func_8013A41C(0x3D);
ret |= 0x3D;
}
if (BgCheck_ProjectileLineTest(&globalCtx->colCtx, pos, &camera->eye, &screenSpace, &poly, true, true, true, true,
&bgId)) {
func_8013A41C(0x3c);
ret |= 0x3c;
func_8013A41C(0x3C);
ret |= 0x3C;
}
actors[0] = actor;
actors[1] = &GET_PLAYER(globalCtx)->actor;
if (CollisionCheck_LineOCCheck(globalCtx, &globalCtx->colChkCtx, pos, &camera->eye, actors, 2) != 0) {
func_8013A41C(0x3b);
ret |= 0x3b;
if (CollisionCheck_LineOCCheck(globalCtx, &globalCtx->colChkCtx, pos, &camera->eye, actors, 2)) {
func_8013A41C(0x3B);
ret |= 0x3B;
}
if (ret == 0) {
@@ -178,7 +178,7 @@ void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) {
void ArrowIce_Update(Actor* thisx, GlobalContext* globalCtx) {
ArrowIce* this = THIS;
if ((globalCtx->msgCtx.unk11F22 == 0xE) || (globalCtx->msgCtx.unk11F22 == 0x12)) {
if ((globalCtx->msgCtx.msgMode == 0xE) || (globalCtx->msgCtx.msgMode == 0x12)) {
Actor_MarkForDeath(&this->actor);
return;
} else {
+1 -1
View File
@@ -1530,7 +1530,7 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) {
break;
}
if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.unk11F22 != 0) &&
if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.msgMode != 0) &&
(globalCtx->msgCtx.unk11F04 == 0x5E6) && !FrameAdvance_IsEnabled(globalCtx) &&
(globalCtx->sceneLoadFlag == 0) && (ActorCutscene_GetCurrentIndex() == -1) &&
(globalCtx->csCtx.state == 0)) {
@@ -552,28 +552,27 @@ void func_808B9CE8(DoorWarp1* this, GlobalContext* globalCtx) {
switch (globalCtx->sceneNum) {
case SCENE_MITURIN_BS:
gSaveContext.roomInf[126][3] =
(((void)0, gSaveContext.roomInf[126][3]) & 0xFFFFFF00) | (((u8)gSaveContext.roomInf[126][4]) & 0xFF);
gSaveContext.unk_ECC[0] =
(((void)0, gSaveContext.unk_ECC[0]) & 0xFFFFFF00) | (((u8)gSaveContext.unk_ECC[1]) & 0xFF);
break;
case SCENE_HAKUGIN_BS:
gSaveContext.roomInf[126][3] = (((void)0, gSaveContext.roomInf[126][3]) & 0xFFFF00FF) |
((((u8)gSaveContext.roomInf[126][4]) & 0xFF) << 8);
gSaveContext.unk_ECC[0] =
(((void)0, gSaveContext.unk_ECC[0]) & 0xFFFF00FF) | ((((u8)gSaveContext.unk_ECC[1]) & 0xFF) << 8);
break;
case SCENE_INISIE_BS:
gSaveContext.roomInf[126][3] = (((void)0, gSaveContext.roomInf[126][3]) & 0xFF00FFFF) |
((((u8)gSaveContext.roomInf[126][4]) & 0xFF) << 0x10);
gSaveContext.unk_ECC[0] =
(((void)0, gSaveContext.unk_ECC[0]) & 0xFF00FFFF) | ((((u8)gSaveContext.unk_ECC[1]) & 0xFF) << 0x10);
break;
case SCENE_SEA_BS:
gSaveContext.roomInf[126][3] = (((void)0, gSaveContext.roomInf[126][3]) & 0x00FFFFFF) |
((((u8)gSaveContext.roomInf[126][4]) & 0xFF) << 0x18);
gSaveContext.unk_ECC[0] =
(((void)0, gSaveContext.unk_ECC[0]) & 0x00FFFFFF) | ((((u8)gSaveContext.unk_ECC[1]) & 0xFF) << 0x18);
break;
}
gSaveContext.roomInf[126][4] =
(gSaveContext.roomInf[126][4] & 0xFFFFFF00) | ((((u8)gSaveContext.roomInf[126][4]) + 1) & 0xFF);
gSaveContext.unk_ECC[1] = (gSaveContext.unk_ECC[1] & 0xFFFFFF00) | ((((u8)gSaveContext.unk_ECC[1]) + 1) & 0xFF);
Item_Give(globalCtx, func_808B849C(this, globalCtx) + (ITEM_REMAINS_ODOLWA - 1));
DoorWarp1_SetupAction(this, func_808B9E94);
}
@@ -656,19 +655,19 @@ void func_808BA10C(DoorWarp1* this, GlobalContext* globalCtx) {
switch (phi_v0_2) {
case 0:
phi_a0 = gSaveContext.roomInf[126][3] & 0xFF;
phi_a0 = gSaveContext.unk_ECC[0] & 0xFF;
break;
case 1:
phi_a0 = (gSaveContext.roomInf[126][3] & 0xFF00) >> 8;
phi_a0 = (gSaveContext.unk_ECC[0] & 0xFF00) >> 8;
break;
case 2:
phi_a0 = (gSaveContext.roomInf[126][3] & 0xFF0000) >> 0x10;
phi_a0 = (gSaveContext.unk_ECC[0] & 0xFF0000) >> 0x10;
break;
case 3:
phi_a0 = (gSaveContext.roomInf[126][3] & 0xFF000000) >> 0x18;
phi_a0 = (gSaveContext.unk_ECC[0] & 0xFF000000) >> 0x18;
break;
default:
@@ -321,7 +321,7 @@ s32 func_80BED27C(EnAkindonuts* this) {
}
s32 func_80BED2FC(EnAkindonuts* this) {
if (!func_80114E90()) {
if (!Interface_HasEmptyBottle()) {
return 2;
}
@@ -335,7 +335,7 @@ s32 func_80BED2FC(EnAkindonuts* this) {
}
s32 func_80BED35C(EnAkindonuts* this) {
if (!func_80114E90()) {
if (!Interface_HasEmptyBottle()) {
return 2;
}
@@ -414,7 +414,7 @@ void func_80BED3BC(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C &= ~0x1;
this->unk_32C |= 0x40;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
@@ -497,7 +497,7 @@ void func_80BED680(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
@@ -592,7 +592,7 @@ void func_80BED8A4(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
@@ -675,7 +675,7 @@ void func_80BEDB88(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
@@ -765,7 +765,7 @@ void func_80BEDDAC(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
@@ -843,7 +843,7 @@ void func_80BEE070(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x161A;
this->actionFunc = func_80BEF360;
@@ -926,7 +926,7 @@ void func_80BEE274(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x1629;
this->actionFunc = func_80BEF360;
@@ -1004,7 +1004,7 @@ void func_80BEE530(EnAkindonuts* this, GlobalContext* globalCtx) {
func_8019F208();
this->unk_32C |= 0x40;
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0x15EF;
this->actionFunc = func_80BEF360;
@@ -1235,7 +1235,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0;
this->actionFunc = func_80BEEE10;
@@ -1243,7 +1243,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
this->unk_32C &= ~0x20;
this->actor.flags &= ~1;
this->unk_32C &= ~0x4;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_338 = 8;
this->unk_33C = 0;
@@ -1275,7 +1275,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
void func_80BEF18C(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0;
this->actionFunc = func_80BEEE10;
@@ -1302,7 +1302,7 @@ void func_80BEF20C(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((sp27 == 5) && func_80147624(globalCtx)) {
if (this->unk_32C & 1) {
this->unk_32C &= ~0x1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80BEF360;
} else {
@@ -394,7 +394,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 &= ~2;
func_801159EC(-this->unk_434);
func_800B7298(globalCtx, NULL, 7);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_809C1C9C;
return;
@@ -455,7 +455,7 @@ void func_809C1D64(EnAob01* this, GlobalContext* globalCtx) {
}
}
} else if ((temp_v0 == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_210 = 0;
this->actionFunc = func_809C2060;
@@ -578,7 +578,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 &= ~0x40;
if (this->unk_2D2 & 0x10) {
this->unk_2D2 &= ~0x10;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_809C2060;
} else {
@@ -748,7 +748,7 @@ void func_809C2A64(EnAob01* this, GlobalContext* globalCtx) {
if (func_809C15BC(this)) {
if ((sp2F == 5) && func_80147624(globalCtx)) {
this->unk_434 = 0;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
}
@@ -99,7 +99,7 @@ void func_809CCEE8(EnBji01* this, GlobalContext* globalCtx) {
}
}
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.msgMode = 0;
globalCtx->msgCtx.unk11F10 = 0;
func_809CD028(this, globalCtx);
} else {
+3 -3
View File
@@ -235,7 +235,7 @@ void EnCow_GiveMilk(EnCow* this, GlobalContext* globalCtx) {
void EnCow_CheckForEmptyBottle(EnCow* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
func_80151938(globalCtx, 0x32C9); // Text to give milk.
this->actionFunc = EnCow_GiveMilk;
} else {
@@ -264,7 +264,7 @@ void EnCow_Talk(EnCow* this, GlobalContext* globalCtx) {
}
void EnCow_Idle(EnCow* this, GlobalContext* globalCtx) {
if ((globalCtx->msgCtx.unk1202A == 0) || (globalCtx->msgCtx.unk1202A == 4)) {
if ((globalCtx->msgCtx.ocarinaMode == 0) || (globalCtx->msgCtx.ocarinaMode == 4)) {
if (D_801BDAA4 != 0) {
if (this->flags & EN_COW_FLAG_WONT_GIVE_MILK) {
this->flags &= ~EN_COW_FLAG_WONT_GIVE_MILK;
@@ -292,7 +292,7 @@ void EnCow_Idle(EnCow* this, GlobalContext* globalCtx) {
if (func_801A5100() == 4) {
if (!(gSaveContext.weekEventReg[87] & 1)) {
gSaveContext.weekEventReg[87] |= 1;
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
this->actor.textId = 0x32C9; // Text to give milk.
} else {
this->actor.textId = 0x32CA; // Text if you don't have an empty bottle.
+1 -1
View File
@@ -409,7 +409,7 @@ void func_80B3EE8C(EnDai* this, GlobalContext* globalCtx) {
void func_80B3EEDC(EnDai* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if ((player->transformation == PLAYER_FORM_GORON) && (globalCtx->msgCtx.unk1202A == 3) &&
if ((player->transformation == PLAYER_FORM_GORON) && (globalCtx->msgCtx.ocarinaMode == 3) &&
(globalCtx->msgCtx.unk1202E == 1)) {
func_80B3E5DC(this, 1);
this->actionFunc = func_80B3EE8C;
+3 -3
View File
@@ -323,7 +323,7 @@ void func_80A71C3C(EnDno* this, GlobalContext* globalCtx) {
}
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.msgMode = 0;
globalCtx->msgCtx.unk11F10 = 0;
func_80A71E54(this, globalCtx);
} else if (this->actor.xzDistToPlayer < 60.0f) {
@@ -419,7 +419,7 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
case 9:
if (func_80147624(globalCtx)) {
func_8013E1C8(&this->skelAnime, sAnimations, 10, &this->unk_32C);
globalCtx->msgCtx.unk11F22 = 0x44;
globalCtx->msgCtx.msgMode = 0x44;
}
break;
@@ -602,7 +602,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
case 0x800:
case 0x801:
if (func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x44;
globalCtx->msgCtx.msgMode = 0x44;
this->unk_452 = 1;
this->unk_454 = 0.0f;
func_8013E1C8(&this->skelAnime, sAnimations, 8, &this->unk_32C);
+1 -1
View File
@@ -352,7 +352,7 @@ void EnDnp_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.world.rot.x = this->actor.shape.rot.x;
this->actor.cutscene = 0x10;
this->actionFunc = func_80B3D47C;
} else if (((ENDNP_GET_7(&this->actor) == ENDNP_GET_7_0) && !func_80114F2C(0x17) &&
} else if (((ENDNP_GET_7(&this->actor) == ENDNP_GET_7_0) && !Interface_HasItemInBottle(ITEM_DEKU_PRINCESS) &&
!(gSaveContext.weekEventReg[23] & 0x20)) ||
((ENDNP_GET_7(&this->actor) == ENDNP_GET_7_2) && (gSaveContext.weekEventReg[23] & 0x20))) {
Actor_SetScale(&this->actor, 0.0085f);
+1 -1
View File
@@ -332,7 +332,7 @@ void func_80A52DC8(EnDnq* this, GlobalContext* globalCtx) {
if (!(gSaveContext.weekEventReg[23] & 0x20)) {
this->unk_390 = 70.0f;
if (func_80114F2C(ITEM_DEKU_PRINCESS) && !func_801690CC(globalCtx) &&
if (Interface_HasItemInBottle(ITEM_DEKU_PRINCESS) && !func_801690CC(globalCtx) &&
(Message_GetState(&globalCtx->msgCtx) == 0) && (ActorCutscene_GetCurrentIndex() == -1)) {
if ((DECR(this->unk_384) == 0) && (gSaveContext.weekEventReg[29] & 0x40)) {
func_801518B0(globalCtx, 0x969, NULL);
@@ -833,7 +833,7 @@ void EnFishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
if (sLinkAge != 1) {
// HIGH_SCORE(HS_FISHING) from OoT
if (gSaveContext.roomInf[127][2] & 0x1000) {
if (gSaveContext.unk_EE4 & 0x1000) {
D_8090CD08 = 0;
} else {
D_8090CD08 = 1;
@@ -851,18 +851,18 @@ void EnFishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
Audio_QueueSeqCmd(0x100100FF);
if (sLinkAge == 1) {
if (gSaveContext.roomInf[127][2] & 0x7F) {
D_809171CC = gSaveContext.roomInf[127][2] & 0x7F;
if (gSaveContext.unk_EE4 & 0x7F) {
D_809171CC = gSaveContext.unk_EE4 & 0x7F;
} else {
D_809171CC = 40.0f;
}
} else if (gSaveContext.roomInf[127][2] & 0x7F000000) {
D_809171CC = (gSaveContext.roomInf[127][2] & 0x7F000000) >> 0x18;
} else if (gSaveContext.unk_EE4 & 0x7F000000) {
D_809171CC = (gSaveContext.unk_EE4 & 0x7F000000) >> 0x18;
} else {
D_809171CC = 45.0f;
}
D_809171D1 = (gSaveContext.roomInf[127][2] & 0xFF0000) >> 0x10;
D_809171D1 = (gSaveContext.unk_EE4 & 0xFF0000) >> 0x10;
if ((D_809171D1 & 7) == 7) {
globalCtx->roomCtx.unk7A[0] = 90;
D_809171CA = 1;
@@ -2812,8 +2812,8 @@ void func_80903C60(EnFishing* this, u8 arg1) {
void EnFishing_HandleAquariumDialog(EnFishing* this, GlobalContext* globalCtx) {
if (sLinkAge == 1) {
if (gSaveContext.roomInf[127][2] & 0x7F) {
if (gSaveContext.roomInf[127][2] & 0x80) {
if (gSaveContext.unk_EE4 & 0x7F) {
if (gSaveContext.unk_EE4 & 0x80) {
this->actor.textId = 0x40B1;
} else {
this->actor.textId = 0x4089;
@@ -2821,8 +2821,8 @@ void EnFishing_HandleAquariumDialog(EnFishing* this, GlobalContext* globalCtx) {
} else {
this->actor.textId = 0x40AE;
}
} else if (gSaveContext.roomInf[127][2] & 0x7F000000) {
if (gSaveContext.roomInf[127][2] & 0x80000000) {
} else if (gSaveContext.unk_EE4 & 0x7F000000) {
if (gSaveContext.unk_EE4 & 0x80000000) {
this->actor.textId = 0x40B1;
} else {
this->actor.textId = 0x4089;
@@ -3762,8 +3762,8 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
if ((D_80917272 == 0) && (D_80917274 == 0)) {
// Assignment of OoT's D_80B7E086 here removed in MM
if (((sLinkAge == 1) && (gSaveContext.roomInf[127][2] & 0x400)) ||
((sLinkAge != 1) && (gSaveContext.roomInf[127][2] & 0x800))) {
if (((sLinkAge == 1) && (gSaveContext.unk_EE4 & 0x400)) ||
((sLinkAge != 1) && (gSaveContext.unk_EE4 & 0x800))) {
// Assignment of OoT's D_80B7A67C here removed in MM, this is now an empty branch
}
} else {
@@ -4705,7 +4705,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
case 0:
if (D_809171FC == 0) {
if (sLinkAge != 1) {
if ((gSaveContext.roomInf[127][2] & 0x100) && !(gSaveContext.roomInf[127][2] & 0x200)) {
if ((gSaveContext.unk_EE4 & 0x100) && !(gSaveContext.unk_EE4 & 0x200)) {
this->actor.textId = 0x4093;
} else {
this->actor.textId = 0x407B;
@@ -4723,9 +4723,9 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
if (D_809171FC == 0) {
this->unk_154 = 1;
if (sLinkAge != 1) {
gSaveContext.roomInf[127][2] |= 0x200;
gSaveContext.unk_EE4 |= 0x200;
} else {
gSaveContext.roomInf[127][2] |= 0x100;
gSaveContext.unk_EE4 |= 0x100;
}
} else {
this->unk_154 = 10;
@@ -4808,8 +4808,8 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
D_8090CD04 = 20;
this->unk_154 = 0;
if ((gSaveContext.roomInf[127][2] & 0xFF0000) < 0xFF0000) {
gSaveContext.roomInf[127][2] += 0x10000;
if ((gSaveContext.unk_EE4 & 0xFF0000) < 0xFF0000) {
gSaveContext.unk_EE4 += 0x10000;
}
}
break;
@@ -4917,30 +4917,30 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
if (sLinkAge == 1) {
f32 temp;
gSaveContext.roomInf[127][2] &= 0xFFFFFF00;
gSaveContext.roomInf[127][2] |= ((s16)D_809171CC & 0x7F);
gSaveContext.unk_EE4 &= 0xFFFFFF00;
gSaveContext.unk_EE4 |= ((s16)D_809171CC & 0x7F);
temp = (gSaveContext.roomInf[127][2] & 0x7F000000) >> 0x18;
temp = (gSaveContext.unk_EE4 & 0x7F000000) >> 0x18;
if (temp < D_809171CC) {
gSaveContext.roomInf[127][2] &= 0xFFFFFF;
gSaveContext.roomInf[127][2] |= ((s16)D_809171CC & 0x7F) << 0x18;
gSaveContext.unk_EE4 &= 0xFFFFFF;
gSaveContext.unk_EE4 |= ((s16)D_809171CC & 0x7F) << 0x18;
if (D_809171D2 == 2) {
gSaveContext.roomInf[127][2] |= 0x80000000;
gSaveContext.unk_EE4 |= 0x80000000;
}
}
if (D_809171D2 == 2) {
gSaveContext.roomInf[127][2] |= 0x80;
gSaveContext.unk_EE4 |= 0x80;
this->unk_154 = 0;
break;
}
} else {
gSaveContext.roomInf[127][2] &= 0xFFFFFF;
gSaveContext.roomInf[127][2] |= ((s16)D_809171CC & 0x7F) << 0x18;
gSaveContext.unk_EE4 &= 0xFFFFFF;
gSaveContext.unk_EE4 |= ((s16)D_809171CC & 0x7F) << 0x18;
if (D_809171D2 == 2) {
gSaveContext.roomInf[127][2] |= 0x80000000;
gSaveContext.unk_EE4 |= 0x80000000;
this->unk_154 = 0;
break;
}
@@ -4957,14 +4957,14 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
}
if (sLinkAge == 1) {
if ((D_809171CC >= 50.0f) && !(gSaveContext.roomInf[127][2] & 0x400)) {
gSaveContext.roomInf[127][2] |= 0x400;
if ((D_809171CC >= 50.0f) && !(gSaveContext.unk_EE4 & 0x400)) {
gSaveContext.unk_EE4 |= 0x400;
getItemId = GI_HEART_PIECE;
sSinkingLureLocation = Rand_ZeroFloat(3.999f) + 1.0f;
}
} else {
if ((D_809171CC >= 60.0f) && !(gSaveContext.roomInf[127][2] & 0x800)) {
gSaveContext.roomInf[127][2] |= 0x800;
if ((D_809171CC >= 60.0f) && !(gSaveContext.unk_EE4 & 0x800)) {
gSaveContext.unk_EE4 |= 0x800;
getItemId = GI_SCALE_GOLD;
sSinkingLureLocation = Rand_ZeroFloat(3.999f) + 1.0f;
}
@@ -5130,9 +5130,9 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
}
if (D_8090CD08 == 0) {
gSaveContext.roomInf[127][2] |= 0x1000;
gSaveContext.unk_EE4 |= 0x1000;
} else if (D_8090CD08 == 1) {
gSaveContext.roomInf[127][2] &= ~0x1000;
gSaveContext.unk_EE4 &= ~0x1000;
}
if (D_8090CCFC != 0) {
+15 -16
View File
@@ -299,14 +299,13 @@ s16 EnFsn_GetStolenItemId(u32 stolenItem) {
s32 EnFsn_HasItemsToSell(void) {
if (CURRENT_DAY != 3) {
if (((gSaveContext.roomInf[126][5] & 0xFF000000) >> 0x18) ||
((gSaveContext.roomInf[126][5] & 0xFF0000) >> 0x10)) {
if (((gSaveContext.stolenItems & 0xFF000000) >> 0x18) || ((gSaveContext.stolenItems & 0xFF0000) >> 0x10)) {
return true;
}
return false;
} else {
if (((gSaveContext.roomInf[126][5] & 0xFF000000) >> 0x18) ||
((gSaveContext.roomInf[126][5] & 0xFF0000) >> 0x10) || !(gSaveContext.weekEventReg[0x21] & 4)) {
if (((gSaveContext.stolenItems & 0xFF000000) >> 0x18) || ((gSaveContext.stolenItems & 0xFF0000) >> 0x10) ||
!(gSaveContext.weekEventReg[0x21] & 4)) {
return true;
}
return false;
@@ -314,8 +313,8 @@ s32 EnFsn_HasItemsToSell(void) {
}
void EnFsn_GetShopItemIds(EnFsn* this) {
u32 stolenItem1 = (gSaveContext.roomInf[126][5] & 0xFF000000) >> 0x18;
u32 stolenItem2 = (gSaveContext.roomInf[126][5] & 0xFF0000) >> 0x10;
u32 stolenItem1 = (gSaveContext.stolenItems & 0xFF000000) >> 0x18;
u32 stolenItem2 = (gSaveContext.stolenItems & 0xFF0000) >> 0x10;
s16 itemId;
this->stolenItem1 = this->stolenItem2 = 0;
@@ -362,7 +361,7 @@ void EnFsn_EndInteraction(EnFsn* this, GlobalContext* globalCtx) {
this->cutsceneState = 0;
}
Actor_ProcessTalkRequest(&this->actor, &globalCtx->state);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
@@ -934,7 +933,7 @@ void EnFsn_MakeOffer(EnFsn* this, GlobalContext* globalCtx) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0:
func_8019F208();
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (this->cutsceneState == 2) {
ActorCutscene_Stop(this->cutscene);
@@ -1134,7 +1133,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, GlobalContext* globalCtx) {
item = this->items[this->cursorIdx];
item->buyFanfareFunc(globalCtx, item);
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
@@ -1142,9 +1141,9 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, GlobalContext* globalCtx) {
item = this->items[this->cursorIdx];
item->boughtFunc(globalCtx, item);
if (this->stolenItem1 == this->cursorIdx) {
gSaveContext.roomInf[126][5] &= ~0xFF000000;
gSaveContext.stolenItems &= ~0xFF000000;
} else if (this->stolenItem2 == this->cursorIdx) {
gSaveContext.roomInf[126][5] &= ~0xFF0000;
gSaveContext.stolenItems &= ~0xFF0000;
}
this->numSellingItems--;
this->itemIds[this->cursorIdx] = -1;
@@ -1171,7 +1170,7 @@ void EnFsn_SetupEndInteraction(EnFsn* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, globalCtx);
} else {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
}
} else {
@@ -1243,7 +1242,7 @@ void EnFsn_AskCanBuyMore(EnFsn* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, globalCtx);
} else {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
}
} else {
@@ -1290,7 +1289,7 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, GlobalContext* globalCtx)
if (globalCtx->msgCtx.unk120B1 == 0) {
EnFsn_EndInteraction(this, globalCtx);
} else {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
}
} else {
@@ -1344,12 +1343,12 @@ void EnFsn_ConverseBackroom(EnFsn* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (this->flags & ENFSN_END_CONVERSATION) {
this->flags &= ~ENFSN_END_CONVERSATION;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = EnFsn_IdleBackroom;
} else if (this->flags & ENFSN_GIVE_ITEM) {
this->flags &= ~ENFSN_GIVE_ITEM;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = EnFsn_GiveItem;
} else {
+8 -8
View File
@@ -370,8 +370,8 @@ void func_80B0FE7C(GlobalContext* globalCtx) {
}
void func_80B0FEBC(EnGb2* this, GlobalContext* globalCtx) {
if ((globalCtx->msgCtx.unk1202A == 3) && (globalCtx->msgCtx.unk1202E == 7)) {
globalCtx->msgCtx.unk1202A = 4;
if ((globalCtx->msgCtx.ocarinaMode == 3) && (globalCtx->msgCtx.unk1202E == 7)) {
globalCtx->msgCtx.ocarinaMode = 4;
gSaveContext.eventInf[4] |= 0x80;
this->unk_26E = 0x14D1;
this->unk_288 = 10;
@@ -391,7 +391,7 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
if (this->unk_26C & 2) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_26E = 0x14D1;
this->unk_288 = 30;
@@ -431,7 +431,7 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
case 0:
func_8019F208();
func_801159EC(-this->unk_288);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_800B7298(globalCtx, NULL, 7);
this->actionFunc = func_80B11344;
@@ -553,7 +553,7 @@ void func_80B10634(EnGb2* this, GlobalContext* globalCtx) {
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
if (this->unk_26C & 2) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_26C &= ~2;
if (this->unk_26E == 0x14DD) {
@@ -583,7 +583,7 @@ void func_80B10634(EnGb2* this, GlobalContext* globalCtx) {
} else {
func_8019F208();
func_801159EC(-this->unk_288);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_800B7298(globalCtx, NULL, 7);
this->actionFunc = func_80B11344;
@@ -749,7 +749,7 @@ void func_80B10E98(EnGb2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if (this->unk_26C & 2) {
this->unk_26C &= ~2;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if ((this->unk_26E != 0x14E8) && (this->unk_26E != 0x14EA)) {
ActorCutscene_Stop(this->unk_282[this->unk_290]);
@@ -792,7 +792,7 @@ void func_80B11048(EnGb2* this, GlobalContext* globalCtx) {
void func_80B110F8(EnGb2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if (this->unk_26C & 2) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_26C &= ~2;
this->actionFunc = func_80B10A48;
+7 -7
View File
@@ -541,7 +541,7 @@ void func_80BB26EC(EnGeg* this, GlobalContext* globalCtx) {
case 0xD61:
ActorCutscene_Stop(this->unk_498);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_230 &= ~0x10;
this->actionFunc = func_80BB221C;
@@ -557,14 +557,14 @@ void func_80BB27D4(EnGeg* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
switch (this->unk_496) {
case 0xD63:
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80BB221C;
break;
case 0xD69:
this->unk_49A = this->unk_49C[6];
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80BB2520;
break;
@@ -572,7 +572,7 @@ void func_80BB27D4(EnGeg* this, GlobalContext* globalCtx) {
case 0xD6D:
case 0xD6F:
case 0xD8A:
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80BB31B8;
break;
@@ -580,7 +580,7 @@ void func_80BB27D4(EnGeg* this, GlobalContext* globalCtx) {
case 0xD72:
case 0xD75:
case 0xD8B:
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_230 &= ~0x10;
this->unk_49A = this->unk_49C[7];
@@ -607,7 +607,7 @@ void func_80BB2944(EnGeg* this, GlobalContext* globalCtx) {
}
} else if ((sp27 == 5) && func_80147624(globalCtx)) {
if (this->unk_496 == 0xD67) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_49A = this->unk_49C[4];
this->actionFunc = func_80BB2520;
@@ -624,7 +624,7 @@ void func_80BB2A54(EnGeg* this, GlobalContext* globalCtx) {
ActorCutscene_Stop(this->unk_498);
this->unk_230 &= ~0x10;
this->unk_244 = 65;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80BB347C;
} else {
@@ -81,7 +81,7 @@ void EnGinkoMan_Idle(EnGinkoMan* this, GlobalContext* globalCtx) {
EnGinkoMan_SwitchAnimation(this, globalCtx);
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
if ((gSaveContext.roomInf[127][0] & 0xFFFF) == 0) {
if ((gSaveContext.bankRupees & 0xFFFF) == 0) {
Actor_ChangeAnimation(&this->skelAnime, animations, GINKO_FLOORSMACKING);
func_801518B0(globalCtx, 0x44C, &this->actor);
this->curTextId = 0x44C; // would you like to make an account
@@ -145,7 +145,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
Actor_ChangeAnimation(&this->skelAnime, animations, GINKO_FLOORSMACKING);
}
globalCtx->msgCtx.bankRupees = gSaveContext.roomInf[127][0] & 0xFFFF;
globalCtx->msgCtx.bankRupees = gSaveContext.bankRupees & 0xFFFF;
func_801518B0(globalCtx, 0x45A, &this->actor);
this->curTextId = 0x45A; // "All right, little guy, now I've got a total of [rupees] from you!"
}
@@ -156,22 +156,22 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
this->curTextId = 0x44E; //" ...So, what'll it be? Deposit Rupees Don't deposit Rupees"
break;
case 0x45A: // "All right, little guy, now I've got a total of [rupees] from you!"
if (((gSaveContext.roomInf[127][0] & 0xFFFF) >= 200) && (this->previousBankValue < 200) &&
if (((gSaveContext.bankRupees & 0xFFFF) >= 200) && (this->previousBankValue < 200) &&
!(gSaveContext.weekEventReg[59] & 0x40)) {
gSaveContext.weekEventReg[59] |= 0x40;
func_801518B0(globalCtx, 0x45B, &this->actor);
this->curTextId = 0x45B; // "What's this? You've already saved up 200 Rupees!?!
} else if (((gSaveContext.roomInf[127][0] & 0xFFFF) >= 1000) && ((this->previousBankValue) < 1000) &&
} else if (((gSaveContext.bankRupees & 0xFFFF) >= 1000) && ((this->previousBankValue) < 1000) &&
!(gSaveContext.weekEventReg[59] & 0x80)) {
gSaveContext.weekEventReg[59] |= 0x80;
func_801518B0(globalCtx, 0x45C, &this->actor);
this->curTextId = 0x45C; // "What's this? You've already saved up 1000 Rupees!?!
} else if ((gSaveContext.roomInf[127][0] & 0xFFFF) >= 5000) {
} else if ((gSaveContext.bankRupees & 0xFFFF) >= 5000) {
if ((this->previousBankValue < 5000) && !(gSaveContext.weekEventReg[60] & 1)) {
gSaveContext.weekEventReg[60] |= 1;
func_801518B0(globalCtx, 0x45D, &this->actor);
this->curTextId = 0x45D; // "What's this? You've already saved up 5000 Rupees?!
} else if (this->previousBankValue < (s16)(gSaveContext.roomInf[127][0] & 0xFFFF)) {
} else if (this->previousBankValue < (s16)(gSaveContext.bankRupees & 0xFFFF)) {
Actor_ChangeAnimation(&this->skelAnime, animations, GINKO_SITTING);
func_801518B0(globalCtx, 0x45E, &this->actor);
this->curTextId =
@@ -208,12 +208,12 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
this->curTextId = 0x464; // Hey, relax! It doesn't leave any marks
break;
case 0x464: // Hey, relax! It doesn't leave any marks
globalCtx->msgCtx.unk11F22 = 0x44;
globalCtx->msgCtx.msgMode = 0x44;
EnGinkoMan_SetupStamp(this); // stamp player
break;
case 0x465: // "There! Now I'll know you when I see you!"
Actor_ChangeAnimation(&this->skelAnime, animations, GINKO_FLOORSMACKING);
globalCtx->msgCtx.bankRupees = gSaveContext.roomInf[127][0] & 0xFFFF;
globalCtx->msgCtx.bankRupees = gSaveContext.bankRupees & 0xFFFF;
func_801518B0(globalCtx, 0x45A, &this->actor);
this->curTextId = 0x45A; // "All right, little guy, now I've got a total of [rupees] from you!"
break;
@@ -229,7 +229,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x46C: // "Ah, yes...[Link], right? If I remember, you're the little guy who deposited [rupees]."
case 0x47E: // "Your deposits total [rupees]."
if (this->choiceDepositWithdrawl == GINKOMAN_CHOICE_DEPOSIT) {
if ((u32)(gSaveContext.roomInf[127][0] & 0xFFFF) >= 5000) {
if ((u32)(gSaveContext.bankRupees & 0xFFFF) >= 5000) {
func_801518B0(globalCtx, 0x45F, &this->actor);
this->curTextId = 0x45F; // "Excuuuse me! But I can't take anymore deposits!
} else if (gSaveContext.rupees == 0) {
@@ -280,12 +280,12 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x473: // Use it wisely...
case 0x474: // "Aw, you're taking out all that? If you spend it like that, it'll all be gone before you know
// it!"
if ((gSaveContext.roomInf[127][0] & 0xFFFF) == 0) {
if ((gSaveContext.bankRupees & 0xFFFF) == 0) {
func_801518B0(globalCtx, 0x478, &this->actor);
// "Look, little guy, all the Rupees you deposited are gone, so you can't use that stamp anymore."
this->curTextId = 0x478;
} else {
globalCtx->msgCtx.bankRupees = gSaveContext.roomInf[127][0] & 0xFFFF;
globalCtx->msgCtx.bankRupees = gSaveContext.bankRupees & 0xFFFF;
func_801518B0(globalCtx, 0x45A, &this->actor);
this->curTextId = 0x45A; // "All right, little guy, now I've got a total of [rupees] from you!"
}
@@ -311,7 +311,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
switch (this->curTextId) {
case 0x44E: // "...So, what'll it be?
if (globalCtx->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) {
if ((gSaveContext.roomInf[127][0] & 0xFFFF) >= 5000) {
if ((gSaveContext.bankRupees & 0xFFFF) >= 5000) {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x45F, &this->actor);
this->curTextId = 0x45F; // bank full, cannot accept more
@@ -353,21 +353,20 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
this->curTextId = 0x453; // That's it? That aint nothing at all
}
if ((gSaveContext.roomInf[127][0] & 0xFFFF) == 0) {
if ((gSaveContext.bankRupees & 0xFFFF) == 0) {
this->isNewAccount = true;
}
func_801159EC((s16)-globalCtx->msgCtx.bankRupeesSelected);
this->previousBankValue = gSaveContext.roomInf[127][0] & 0xFFFF;
if (1) {} // Needed to match
gSaveContext.roomInf[127][0] =
(gSaveContext.roomInf[127][0] & 0xFFFF0000) |
((gSaveContext.roomInf[127][0] & 0xFFFF) + globalCtx->msgCtx.bankRupeesSelected);
this->previousBankValue = gSaveContext.bankRupees & 0xFFFF;
gSaveContext.bankRupees =
((gSaveContext.bankRupees & 0xFFFF) + globalCtx->msgCtx.bankRupeesSelected) |
(gSaveContext.bankRupees & 0xFFFF0000);
}
} else { // GINKOMAN_CHOICE_NO
func_8019F230();
Actor_ChangeAnimation(&this->skelAnime, animations, GINKO_SITTING);
if ((gSaveContext.roomInf[127][0] & 0xFFFF) == 0) {
if ((gSaveContext.bankRupees & 0xFFFF) == 0) {
func_801518B0(globalCtx, 0x456, &this->actor);
this->curTextId = 0x456; // Is that so? think about it
} else {
@@ -396,7 +395,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
break;
case 0x471: // Are you really withdrawling [selected rupees]?
if (globalCtx->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) {
if ((s32)((gSaveContext.roomInf[127][0] & 0xFFFF)) <
if ((s32)((gSaveContext.bankRupees & 0xFFFF)) <
((s32)(globalCtx->msgCtx.bankRupeesSelected + this->serviceFee))) {
play_sound(NA_SE_SY_ERROR);
Actor_ChangeAnimation(&this->skelAnime, animations, GINKO_FLOORSMACKING);
@@ -420,11 +419,11 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
this->curTextId = 0x472; // It's a waste to take out such a tiny bit
}
this->previousBankValue = (s16)(gSaveContext.roomInf[127][0] & 0xFFFF);
gSaveContext.roomInf[127][0] =
(gSaveContext.roomInf[127][0] & 0xFFFF0000) |
(((gSaveContext.roomInf[127][0] & 0xFFFF) - globalCtx->msgCtx.bankRupeesSelected) -
this->serviceFee);
this->previousBankValue = (s16)(gSaveContext.bankRupees & 0xFFFF);
gSaveContext.bankRupees =
(((gSaveContext.bankRupees & 0xFFFF) - globalCtx->msgCtx.bankRupeesSelected) -
this->serviceFee) |
(gSaveContext.bankRupees & 0xFFFF0000);
func_801159EC(globalCtx->msgCtx.bankRupeesSelected);
}
} else {
@@ -578,7 +577,7 @@ void EnGinkoMan_Stamp(EnGinkoMan* this, GlobalContext* globalCtx) {
break;
case 0x469: // "Excuse me, but let me take a look at you..."
Actor_ChangeAnimation(&this->skelAnime, animations, GINKO_SITTING);
globalCtx->msgCtx.bankRupees = (gSaveContext.roomInf[127][0] & 0xFFFF);
globalCtx->msgCtx.bankRupees = (gSaveContext.bankRupees & 0xFFFF);
if ((CURRENT_DAY == 3) && (gSaveContext.isNight == 1)) {
func_801518B0(globalCtx, 0x46C, &this->actor);
this->curTextId = 0x46C; // "Ah, yes...[Link], right?
@@ -185,7 +185,7 @@ void EnGirlA_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnGirlA_CanBuyPotionRed(GlobalContext* globalCtx, EnGirlA* this) {
if (!func_80114E90()) {
if (!Interface_HasEmptyBottle()) {
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
}
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
@@ -195,7 +195,7 @@ s32 EnGirlA_CanBuyPotionRed(GlobalContext* globalCtx, EnGirlA* this) {
}
s32 EnGirlA_CanBuyPotionGreen(GlobalContext* globalCtx, EnGirlA* this) {
if (!func_80114E90()) {
if (!Interface_HasEmptyBottle()) {
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
}
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
@@ -208,7 +208,7 @@ s32 EnGirlA_CanBuyPotionBlue(GlobalContext* globalCtx, EnGirlA* this) {
if (!(gSaveContext.weekEventReg[53] & 8)) {
return CANBUY_RESULT_CANNOT_GET_NOW;
}
if (!func_80114E90()) {
if (!Interface_HasEmptyBottle()) {
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
}
if (!(gSaveContext.weekEventReg[53] & 0x10)) {
@@ -366,7 +366,7 @@ s32 EnGirlA_CanBuyShieldMirror(GlobalContext* globalCtx, EnGirlA* this) {
}
s32 EnGirlA_CanBuyFairy(GlobalContext* globalCtx, EnGirlA* this) {
if (!func_80114E90()) {
if (!Interface_HasEmptyBottle()) {
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
}
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
+1 -1
View File
@@ -523,7 +523,7 @@ s32 func_80A1222C(EnGo* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
s32 ret = false;
if (((player->transformation == PLAYER_FORM_GORON) && (globalCtx->msgCtx.unk1202A == 3) &&
if (((player->transformation == PLAYER_FORM_GORON) && (globalCtx->msgCtx.ocarinaMode == 3) &&
(globalCtx->msgCtx.unk1202E == 1) && (this->unk_3EC == 0) && (this->actor.xzDistToPlayer < 400.0f)) ||
(!(gSaveContext.weekEventReg[22] & 4) && (globalCtx->sceneNum == SCENE_16GORON_HOUSE) &&
(gSaveContext.sceneSetupIndex == 0) && (this->unk_3EC == 0) && (globalCtx->csCtx.unk_12 == 1))) {
+6 -6
View File
@@ -112,7 +112,7 @@ s8 func_80997A90(s16 arg0, s16 arg1) {
if ((arg0 == 0) || ((arg0 != 1) && (arg0 != 2) && (arg0 == 3))) {
phi_v1 = 0;
} else {
phi_v1 = (gSaveContext.roomInf[126][1] >> (arg1 * 3)) & 7;
phi_v1 = (gSaveContext.unk_EC4 >> (arg1 * 3)) & 7;
}
return phi_v1;
}
@@ -273,7 +273,7 @@ void func_80998040(EnGs* this, GlobalContext* globalCtx) {
}
void func_8099807C(EnGs* this, GlobalContext* globalCtx) {
switch (globalCtx->msgCtx.unk1202A) {
switch (globalCtx->msgCtx.ocarinaMode) {
case 3:
switch (globalCtx->msgCtx.unk1202E) {
case 7:
@@ -388,8 +388,8 @@ void func_809985B8(EnGs* this, GlobalContext* globalCtx) {
Math_Vec3f_Sum(&player->actor.world.pos, &sp38, &player->actor.world.pos);
Math_Vec3f_Copy(&player->actor.prevPos, &player->actor.world.pos);
this->unk_200 = 0.0f;
gSaveContext.roomInf[126][1] =
(gSaveContext.roomInf[126][1] & ~(7 << (this->unk_198 * 3))) | ((this->unk_194 & 7) << (this->unk_198 * 3));
gSaveContext.unk_EC4 =
((u32)gSaveContext.unk_EC4 & ~(7 << (this->unk_198 * 3))) | ((this->unk_194 & 7) << (this->unk_198 * 3));
gossipStone = NULL;
do {
@@ -450,7 +450,7 @@ void func_8099874C(EnGs* this, GlobalContext* globalCtx) {
phi_v0 = 1;
for (i = 0; i < 4; i++) {
if (((gSaveContext.roomInf[126][1] >> (i * 3)) & 7) != (u32)this->unk_194) {
if (((gSaveContext.unk_EC4 >> (i * 3)) & 7) != (u32)this->unk_194) {
phi_v0 = 0;
}
}
@@ -1005,7 +1005,7 @@ void EnGs_Update(Actor* thisx, GlobalContext* globalCtx) {
EnGs* this = THIS;
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.msgMode = 0;
globalCtx->msgCtx.unk11F10 = 0;
this->collider.base.acFlags &= ~AC_HIT;
func_80997DEC(this, globalCtx);
+1 -1
View File
@@ -356,7 +356,7 @@ void func_80BCFC0C(EnHg* this, GlobalContext* globalCtx) {
} else {
D_80BD00C8 = false;
}
if (globalCtx->msgCtx.unk1202A == 3) {
if (globalCtx->msgCtx.ocarinaMode == 3) {
if (globalCtx->msgCtx.unk1202E == 7 && gSaveContext.playerForm == PLAYER_FORM_HUMAN) {
if (INV_CONTENT(ITEM_MASK_GIBDO) == ITEM_MASK_GIBDO) {
this->unk218 = 3;
@@ -392,7 +392,7 @@ void func_80C2077C(EnHintSkb* this, GlobalContext* globalCtx) {
func_801518B0(globalCtx, 0x1147, &this->actor);
this->unk_3E6 = 0x1147;
if (this->skelAnime.animation == &object_skb_Anim_00697C) {
globalCtx->msgCtx.unk11F22 = 0x44;
globalCtx->msgCtx.msgMode = 0x44;
this->actor.speedXZ = 2.4f;
this->actor.gravity = -1.0f;
this->actor.velocity.y = 3.0f;
+4 -4
View File
@@ -748,7 +748,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
if (msgCtx->choiceIndex == 0) {
func_8019F208();
if (gSaveContext.rupees >= globalCtx->msgCtx.unk1206C) {
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
this->actionFunc = func_808F3C40;
Actor_PickUp(&this->actor, globalCtx, 0x92, 500.0f, 100.0f);
func_801159EC(-globalCtx->msgCtx.unk1206C);
@@ -894,7 +894,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
break;
case 0x347E:
func_808F35D8(this, globalCtx);
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
this->actionFunc = func_808F3B40;
Actor_PickUp(&this->actor, globalCtx, 0x92, 500.0f, 100.0f);
ret = true;
@@ -1000,7 +1000,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
if (msgCtx->choiceIndex == 0) {
func_8019F208();
if (gSaveContext.rupees >= globalCtx->msgCtx.unk1206C) {
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
this->actionFunc = func_808F3C40;
Actor_PickUp(&this->actor, globalCtx, 0x92, 500.0f, 100.0f);
func_801159EC(-globalCtx->msgCtx.unk1206C);
@@ -1098,7 +1098,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
break;
case 0x34A1:
func_808F35D8(this, globalCtx);
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
this->actionFunc = func_808F3B40;
Actor_PickUp(&this->actor, globalCtx, 0x92, 500.0f, 100.0f);
ret = true;
@@ -628,10 +628,9 @@ void func_80B439B0(s32 arg0, s32 arg1) {
}
if (!(arg0 & 1)) {
gSaveContext.roomInf[124][arg0 >> 1] = (gSaveContext.roomInf[124][arg0 >> 1] & 0xFFFF0000) | (arg1 & 0xFFFF);
gSaveContext.unk_E88[arg0 >> 1] = (gSaveContext.unk_E88[arg0 >> 1] & 0xFFFF0000) | (arg1 & 0xFFFF);
} else {
gSaveContext.roomInf[124][arg0 >> 1] =
(gSaveContext.roomInf[124][arg0 >> 1] & 0xFFFF) | ((arg1 & 0xFFFF) << 0x10);
gSaveContext.unk_E88[arg0 >> 1] = (gSaveContext.unk_E88[arg0 >> 1] & 0xFFFF) | ((arg1 & 0xFFFF) << 0x10);
}
}
@@ -639,19 +638,19 @@ s32 func_80B43A24(s32 arg0) {
u32 phi_v1;
if ((arg0 & 1) == 0) {
phi_v1 = gSaveContext.roomInf[124][arg0 >> 1] & 0xFFFF;
phi_v1 = gSaveContext.unk_E88[arg0 >> 1] & 0xFFFF;
} else {
phi_v1 = (gSaveContext.roomInf[124][arg0 >> 1] & 0xFFFF0000) >> 0x10;
phi_v1 = (gSaveContext.unk_E88[arg0 >> 1] & 0xFFFF0000) >> 0x10;
}
return phi_v1 + 0x1AAA;
}
void func_80B43A74(s32 arg0) {
gSaveContext.roomInf[124][4] = (gSaveContext.roomInf[124][4] & ~0xFF) | (arg0 & 0xFF);
gSaveContext.unk_E88[4] = (gSaveContext.unk_E88[4] & ~0xFF) | (arg0 & 0xFF);
}
s32 func_80B43A9C(void) {
return (gSaveContext.roomInf[124][4] >> 0) & 0xFF;
return (gSaveContext.unk_E88[4] >> 0) & 0xFF;
}
s32 func_80B43AB0(void) {
@@ -3465,7 +3464,7 @@ void func_80B4B024(EnInvadepoh* this) {
void func_80B4B048(EnInvadepoh* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.unk120B1 == 0) {
if (globalCtx->msgCtx.unk11F22 == 0) {
if (globalCtx->msgCtx.msgMode == 0) {
D_80B4E998 = 1;
} else if ((Message_GetState(&globalCtx->msgCtx) == 6) || (Message_GetState(&globalCtx->msgCtx) == 5)) {
D_80B4E998 = 1;
@@ -619,7 +619,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, GlobalContext* globalCtx) {
func_8096FAAC(this, globalCtx);
func_8096FBB8(this, globalCtx);
if (globalCtx->msgCtx.unk1202A == 4) { // song failed
if (globalCtx->msgCtx.ocarinaMode == 4) { // song failed
this->unk190 = 0;
this->unkCounter1A4 = 0;
ActorCutscene_Stop(this->actorCutscenes[0]);
@@ -633,7 +633,7 @@ void EnKakasi_TeachingSong(EnKakasi* this, GlobalContext* globalCtx) {
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING);
this->actionFunc = EnKakasi_RegularDialogue;
} else if (globalCtx->msgCtx.unk1202A == 3) { // song success
} else if (globalCtx->msgCtx.ocarinaMode == 3) { // song success
this->postTeachTimer = 30;
this->skelanime.playSpeed = 2.0f;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR);
@@ -656,7 +656,7 @@ void EnKakasi_PostSongLearnTwirl(EnKakasi* this, GlobalContext* globalCtx) {
void EnKakasi_SetupPostSongLearnDialogue(EnKakasi* this, GlobalContext* globalCtx) {
ActorCutscene_Stop(this->actorCutscenes[0]);
globalCtx->msgCtx.unk1202A = 4;
globalCtx->msgCtx.ocarinaMode = 4;
this->unk190 = 0;
this->unkCounter1A4 = 0;
EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR);
@@ -1033,9 +1033,9 @@ void EnKakasi_SetupIdleUnderground(EnKakasi* this) {
void EnKakasi_IdleUnderground(EnKakasi* this, GlobalContext* globalCtx) {
if ((gSaveContext.weekEventReg[79] & 0x8) && this->actor.xzDistToPlayer < this->songSummonDist &&
(BREG(1) != 0 || globalCtx->msgCtx.unk1202A == 0xD)) {
(BREG(1) != 0 || globalCtx->msgCtx.ocarinaMode == 0xD)) {
this->actor.flags &= ~0x8000000;
globalCtx->msgCtx.unk1202A = 4;
globalCtx->msgCtx.ocarinaMode = 4;
this->actionFunc = EnKakasi_SetupRiseOutOfGround;
}
}
@@ -825,13 +825,13 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx) {
switch (this->ocarinaFlag) {
case 0:
if (globalCtx->msgCtx.unk1202A == 1) {
if (globalCtx->msgCtx.ocarinaMode == 1) {
this->ocarinaFlag = 1;
}
break;
case 1:
if ((globalCtx->msgCtx.unk1202A == 4) && (globalCtx->msgCtx.unk1202E == 7)) {
if ((globalCtx->msgCtx.ocarinaMode == 4) && (globalCtx->msgCtx.unk1202E == 7)) {
this->actionState = ENKANBAN_REPAIR;
this->bounceX = 1;
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
+10 -9
View File
@@ -153,32 +153,33 @@ ObjIcePoly* EnKgy_FindIceBlock(GlobalContext* globalCtx) {
}
void func_80B40C74(GlobalContext* globalCtx) {
gSaveContext.roomInf[globalCtx->sceneNum][5] |= 1;
gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 |= 1;
if (CURRENT_DAY == 1) {
gSaveContext.roomInf[globalCtx->sceneNum][5] |= 2;
gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 |= 2;
} else {
gSaveContext.roomInf[globalCtx->sceneNum][5] &= ~2;
gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 &= ~2;
}
}
void func_80B40D00(GlobalContext* globalCtx) {
gSaveContext.roomInf[globalCtx->sceneNum][5] |= 4;
gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 |= 4;
}
void func_80B40D30(GlobalContext* globalCtx) {
gSaveContext.roomInf[globalCtx->sceneNum][5] &= ~7;
gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 &= ~7;
}
s32 func_80B40D64(GlobalContext* globalCtx) {
return gSaveContext.roomInf[globalCtx->sceneNum][5] & 1;
return gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 & 1;
}
s32 func_80B40D8C(GlobalContext* globalCtx) {
return gSaveContext.roomInf[globalCtx->sceneNum][5] & 4;
return gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 & 4;
}
s32 func_80B40DB4(GlobalContext* globalCtx) {
if ((CURRENT_DAY == 3) || ((CURRENT_DAY == 2) && (gSaveContext.roomInf[globalCtx->sceneNum][5] & 2))) {
if ((CURRENT_DAY == 3) ||
((CURRENT_DAY == 2) && (gSaveContext.permanentSceneFlags[globalCtx->sceneNum].unk_14 & 2))) {
return true;
}
return false;
@@ -717,7 +718,7 @@ void func_80B41E18(EnKgy* this, GlobalContext* globalCtx) {
func_80B41368(this, globalCtx, 0);
this->actor.textId = 0xC43;
CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_NONE;
TAKE_EQUIPPED_ITEM(EQUIP_SWORD);
SET_EQUIP_VALUE(EQUIP_SWORD, 0);
func_80112B40(globalCtx, 0);
func_80B40C74(globalCtx);
break;
+6 -6
View File
@@ -909,9 +909,9 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
this->textId = 0x336D;
} else {
time = gSaveContext.unk_3DE0[4];
if ((s32)time < (s32)gSaveContext.roomInf[127][4]) {
if ((s32)time < (s32)gSaveContext.horseBackBalloonHighScore) {
// [Score] New record!
gSaveContext.roomInf[127][4] = time;
gSaveContext.horseBackBalloonHighScore = time;
EnMa4_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3350, &this->actor);
this->textId = 0x3350;
@@ -953,8 +953,8 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
this->textId = 0x3356;
} else {
time = gSaveContext.unk_3DE0[4];
if ((s32)time < (s32)gSaveContext.roomInf[127][4]) {
gSaveContext.roomInf[127][4] = time;
if ((s32)time < (s32)gSaveContext.horseBackBalloonHighScore) {
gSaveContext.horseBackBalloonHighScore = time;
EnMa4_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3350, &this->actor);
this->textId = 0x3350;
@@ -980,9 +980,9 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
this->textId = 0x3356;
} else {
time = gSaveContext.unk_3DE0[4];
if ((s32)time < (s32)gSaveContext.roomInf[127][4]) {
if ((s32)time < (s32)gSaveContext.horseBackBalloonHighScore) {
// New record
gSaveContext.roomInf[127][4] = time;
gSaveContext.horseBackBalloonHighScore = time;
func_801518B0(globalCtx, 0x335D, &this->actor);
this->textId = 0x335D;
} else {
@@ -249,7 +249,7 @@ void EnOssan_EndInteraction(GlobalContext* globalCtx, EnOssan* this) {
Player* player = GET_PLAYER(globalCtx);
Actor_ProcessTalkRequest(&this->actor, &globalCtx->state);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
@@ -931,7 +931,7 @@ void EnOssan_SetupBuyItemWithFanfare(GlobalContext* globalCtx, EnOssan* this) {
Player* player = GET_PLAYER(globalCtx);
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->stateFlags2 &= ~0x20000000;
Interface_ChangeAlpha(50);
@@ -1048,7 +1048,7 @@ void EnOssan_BuyItemWithFanfare(EnOssan* this, GlobalContext* globalCtx) {
void EnOssan_SetupItemPurchased(EnOssan* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
EnOssan_SetupAction(this, EnOssan_ItemPurchased);
if (this->cutsceneState == ENOSSAN_CUTSCENESTATE_STOPPED) {
+7 -7
View File
@@ -221,8 +221,8 @@ void EnRd_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnRd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnRd* this = THIS;
if (gSaveContext.unk_3F58 != 0) {
gSaveContext.unk_3F58 = 0;
if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE) {
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
}
Collider_DestroyCylinder(globalCtx, &this->collider);
}
@@ -982,7 +982,7 @@ void func_808D64D0(EnRd* this) {
this->unk_3D6 = 0xA;
this->actor.speedXZ = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y;
if (gSaveContext.unk_3F58 != 0) {
if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE) {
this->unk_3E9 = 1;
this->unk_3E0 = 600;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT);
@@ -1009,7 +1009,7 @@ void func_808D65BC(EnRd* this, GlobalContext* globalCtx) {
if (this->unk_3E0 == 0) {
this->unk_3E9 = 0;
gSaveContext.unk_3F58 = 0;
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
}
}
}
@@ -1048,7 +1048,7 @@ void func_808D6814(EnRd* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = GET_PLAYER(globalCtx);
if ((gSaveContext.unk_3F58 != 0) && (this->actor.shape.rot.x == 0) && (this->unk_3E9 == 0) &&
if ((gSaveContext.sunsSongState != SUNSSONG_INACTIVE) && (this->actor.shape.rot.x == 0) && (this->unk_3E9 == 0) &&
(this->unk_3EF != 11) && (this->unk_3EF != 12) && (this->unk_3EF != 1)) {
func_808D64D0(this);
return;
@@ -1159,8 +1159,8 @@ void EnRd_Update(Actor* thisx, GlobalContext* globalCtx) {
EnRd* this = THIS;
func_808D6814(this, globalCtx);
if ((gSaveContext.unk_3F58 != 0) && (this->unk_3E9 == 0)) {
gSaveContext.unk_3F58 = 0;
if ((gSaveContext.sunsSongState != SUNSSONG_INACTIVE) && (this->unk_3E9 == 0)) {
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
}
if ((this->unk_3F0 != 6) && ((this->unk_3EF != 13) || (this->unk_3F0 != 2))) {
+1 -1
View File
@@ -307,7 +307,7 @@ void func_808FA4F4(EnRr* this, GlobalContext* globalCtx) {
if (((this->unk_1E2 == 0) && (gSaveContext.playerForm == PLAYER_FORM_HUMAN)) &&
(CUR_EQUIP_VALUE_VOID(EQUIP_SHIELD) == EQUIP_SHIELD)) {
sp34 = true;
this->unk_1E2 = func_8012ED78(globalCtx, 1);
this->unk_1E2 = Inventory_DeleteEquipment(globalCtx, 1);
} else {
sp34 = false;
}
@@ -367,7 +367,7 @@ void EnRuppecrow_UpdatePosition(EnRuppecrow* this, GlobalContext* globalCtx) {
s32 EnRuppecrow_CheckPlayedMatchingSong(GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (globalCtx->msgCtx.unk1202A == 0x3) {
if (globalCtx->msgCtx.ocarinaMode == 0x3) {
switch (player->transformation) {
case PLAYER_FORM_DEKU:
if (globalCtx->msgCtx.unk1202E == OCARINA_SONG_SONATA) {
@@ -307,7 +307,7 @@ void func_80BCB6D0(EnScopenuts* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (this->unk_328 & 1) {
this->unk_328 &= ~1;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actor.flags &= ~ACTOR_FLAG_1;
this->unk_328 &= ~4;
@@ -330,7 +330,7 @@ void func_80BCB6D0(EnScopenuts* this, GlobalContext* globalCtx) {
func_801518B0(globalCtx, this->unk_33C, &this->actor);
} else {
func_8019F208();
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_801159EC(this->unk_358 * -1);
this->actionFunc = func_80BCB90C;
@@ -462,7 +462,7 @@ void func_80ADBAB8(EnSellnuts* this, GlobalContext* globalCtx) {
}
if ((sp27 == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = func_80ADBBEC;
func_800B7298(globalCtx, NULL, 0x13);
@@ -508,7 +508,7 @@ void func_80ADBD64(EnSellnuts* this, GlobalContext* globalCtx) {
}
if ((sp27 == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_338 &= ~2;
this->actor.flags &= ~1;
@@ -550,7 +550,7 @@ void func_80ADBE80(EnSellnuts* this, GlobalContext* globalCtx) {
void func_80ADBFA0(EnSellnuts* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (this->unk_34C == 0) {
this->actionFunc = func_80ADB544;
@@ -713,7 +713,7 @@ void func_80ADC6D0(EnSellnuts* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (player->transformation == PLAYER_FORM_DEKU) {
if (gSaveContext.day == 3) {
@@ -743,7 +743,7 @@ void func_80ADC7B4(EnSellnuts* this, GlobalContext* globalCtx) {
ActorCutscene_SetIntentToPlay(this->cutscene);
}
} else if ((this->unk_366 == 1) && (temp == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_366 = 0;
ActorCutscene_Stop(this->cutscene);
+3 -3
View File
@@ -436,7 +436,7 @@ void EnSob1_EndInteraction(GlobalContext* globalCtx, EnSob1* this) {
this->cutsceneState = ENSOB1_CUTSCENESTATE_STOPPED;
}
Actor_ProcessTalkRequest(&this->actor, &globalCtx->state);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
@@ -927,7 +927,7 @@ void EnSob1_SetupBuyItemWithFanfare(GlobalContext* globalCtx, EnSob1* this) {
Player* player = GET_PLAYER(globalCtx);
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->stateFlags2 &= ~0x20000000;
Interface_ChangeAlpha(50);
@@ -1067,7 +1067,7 @@ void EnSob1_BuyItemWithFanfare(EnSob1* this, GlobalContext* globalCtx) {
void EnSob1_SetupItemPurchased(EnSob1* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
EnSob1_SetupAction(this, EnSob1_ItemPurchased);
if (this->cutsceneState == ENSOB1_CUTSCENESTATE_STOPPED) {
+1 -1
View File
@@ -653,7 +653,7 @@ void EnSsh_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.gravity = 0.0f;
this->initialYaw = this->actor.world.rot.y;
EnSsh_SetupAction(this, EnSsh_Start);
if (func_8012F22C(globalCtx->sceneNum) >= 30) {
if (Inventory_GetSkullTokenCount(globalCtx->sceneNum) >= 30) {
Actor_MarkForDeath(&this->actor);
}
}
@@ -1108,7 +1108,7 @@ void func_80BAD130(EnSuttari* this, GlobalContext* globalCtx) {
u8 talkState = Message_GetState(&globalCtx->msgCtx);
if ((talkState == 5 || talkState == 6) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (this->flags1 & 8) {
this->actionFunc = func_80BAD004;
@@ -1145,7 +1145,7 @@ void func_80BAD2B4(EnSuttari* this, GlobalContext* globalCtx) {
this->actionFunc = func_80BAD230;
} else {
ActorCutscene_Stop(this->cutscenes[1]);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->flags1 |= 0x40;
this->actionFunc = func_80BAD380;
@@ -1169,7 +1169,7 @@ void func_80BAD380(EnSuttari* this, GlobalContext* globalCtx) {
player->stateFlags1 &= ~0x10000000;
this->flags1 &= ~0x4000;
ActorCutscene_Stop(this->cutscenes[1]);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->flags1 |= 0x40;
}
@@ -1312,7 +1312,7 @@ void func_80BADA9C(EnSuttari* this, GlobalContext* globalCtx) {
((EnElf*)GET_PLAYER(globalCtx)->tatlActor)->unk_264 |= 0x10;
this->flags2 &= ~1;
}
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->textId = 0;
if (this->flags1 & 1) {
@@ -271,7 +271,7 @@ void func_809C6A04(EnSyatekiMan* this, GlobalContext* globalCtx) {
func_801159EC(-20);
gSaveContext.weekEventReg[63] |= 1;
gSaveContext.weekEventReg[63] &= (u8)~2;
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_26A = 7;
player->stateFlags1 |= 0x20;
@@ -320,7 +320,7 @@ void func_809C6C2C(EnSyatekiMan* this, GlobalContext* globalCtx) {
case 0xA2B:
case 0xA2C:
case 0xA35:
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->actor.freezeTimer = 0;
func_80112AFC(globalCtx);
@@ -353,7 +353,7 @@ void func_809C6C2C(EnSyatekiMan* this, GlobalContext* globalCtx) {
break;
case 0xA34:
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->actor.freezeTimer = 0;
gSaveContext.minigameState = 3;
@@ -388,7 +388,7 @@ void func_809C6E30(EnSyatekiMan* this, GlobalContext* globalCtx) {
case 6:
if (func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->stateFlags1 &= ~0x20;
gSaveContext.weekEventReg[63] &= (u8)~1;
@@ -628,7 +628,7 @@ void func_809C7620(EnSyatekiMan* this, GlobalContext* globalCtx) {
this->unk_284 = 0x400;
}
} else {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->actor.freezeTimer = 0;
this->unk_26A = 7;
@@ -641,7 +641,7 @@ void func_809C7620(EnSyatekiMan* this, GlobalContext* globalCtx) {
case 0x3FE:
case 0x400:
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->actor.freezeTimer = 0;
this->unk_27E = 0;
@@ -688,7 +688,7 @@ void func_809C7620(EnSyatekiMan* this, GlobalContext* globalCtx) {
case 0x405:
case 0x406:
case 0x407:
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->actor.freezeTimer = 0;
gSaveContext.minigameState = 3;
@@ -974,8 +974,8 @@ void func_809C8488(EnSyatekiMan* this, GlobalContext* globalCtx) {
this->unk_274 = 0;
this->unk_276 = 0;
if (this->unk_270 <= 0) {
if ((s32)((gSaveContext.roomInf[127][6] & 0xFFFF0000) >> 0x10) < this->unk_280) {
gSaveContext.roomInf[127][6] = ((gSaveContext.roomInf[127][6]) & 0xFFFF) | ((u16)this->unk_280 << 0x10);
if ((s32)((gSaveContext.unk_EF4 & 0xFFFF0000) >> 0x10) < this->unk_280) {
gSaveContext.unk_EF4 = ((gSaveContext.unk_EF4) & 0xFFFF) | ((u16)this->unk_280 << 0x10);
}
this->unk_270 = 15;
if (this->unk_280 >= 0x848) {
@@ -1164,8 +1164,8 @@ void func_809C8BF0(EnSyatekiMan* this, GlobalContext* globalCtx) {
if ((this->unk_270 <= 0) && (globalCtx->interfaceCtx.unk_286 == 0)) {
Flags_SetAllTreasure(globalCtx, this->unk_280);
this->unk_270 = 15;
if (((s32)(gSaveContext.roomInf[127][6] & 0xFFFF) < this->unk_280) || (this->unk_280 == 50)) {
if ((s32)(gSaveContext.roomInf[127][6] & 0xFFFF) < this->unk_280) {
if (((s32)(gSaveContext.unk_EF4 & 0xFFFF) < this->unk_280) || (this->unk_280 == 50)) {
if ((s32)(gSaveContext.unk_EF4 & 0xFFFF) < this->unk_280) {
if (!(gSaveContext.weekEventReg[59] & 0x20)) {
func_801518B0(globalCtx, 0x407, &this->actor);
this->unk_284 = 0x407;
@@ -1180,7 +1180,7 @@ void func_809C8BF0(EnSyatekiMan* this, GlobalContext* globalCtx) {
func_801518B0(globalCtx, 0x406, &this->actor);
this->unk_284 = 0x406;
}
gSaveContext.roomInf[127][6] = (gSaveContext.roomInf[127][6] & 0xFFFF0000) | (this->unk_280 & 0xFFFF);
gSaveContext.unk_EF4 = (gSaveContext.unk_EF4 & 0xFFFF0000) | (this->unk_280 & 0xFFFF);
this->unk_26A = 6;
} else {
if (CURRENT_DAY != 3) {
@@ -670,7 +670,7 @@ s32 EnTalkGibud_PresentedItemMatchesRequest(EnTalkGibud* this, GlobalContext* gl
return EN_TALK_GIBUD_REQUESTED_ITEM_NOT_ENOUGH_AMMO;
}
}
if (func_80114F2C(requestedItem->item)) {
if (Interface_HasItemInBottle(requestedItem->item)) {
return EN_TALK_GIBUD_REQUESTED_ITEM_MET;
}
}
@@ -168,7 +168,7 @@ void EnThiefbird_Init(Actor* thisx, GlobalContext* globalCtx) {
D_80C1392C = 1;
Math_Vec3f_Copy(&D_80C13920, &this->actor.world.pos);
Actor_MarkForDeath(&this->actor);
} else if ((gSaveContext.roomInf[126][5] & 0xFF000000) >> 0x18) {
} else if ((gSaveContext.stolenItems & 0xFF000000) >> 0x18) {
Actor_MarkForDeath(&this->actor);
} else {
func_80C11538(this);
@@ -260,7 +260,7 @@ s32 func_80C10B0C(EnThiefbird* this, GlobalContext* globalCtx) {
itemId1 = ITEM_SWORD_GREAT_FAIRY;
} else {
CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_NONE;
TAKE_EQUIPPED_ITEM(EQUIP_SWORD);
SET_EQUIP_VALUE(EQUIP_SWORD, 0);
this->unk_3E8 = D_80C13680[phi_a3 - 1];
}
@@ -271,10 +271,10 @@ s32 func_80C10B0C(EnThiefbird* this, GlobalContext* globalCtx) {
return false;
}
if (!((gSaveContext.roomInf[126][5] & 0xFF000000) >> 0x18)) {
gSaveContext.roomInf[126][5] = (gSaveContext.roomInf[126][5] & 0xFFFFFF) | ((itemId1 & 0xFF) << 0x18);
if (!((gSaveContext.stolenItems & 0xFF000000) >> 0x18)) {
gSaveContext.stolenItems = (gSaveContext.stolenItems & 0xFFFFFF) | ((itemId1 & 0xFF) << 0x18);
} else {
gSaveContext.roomInf[126][5] = (gSaveContext.roomInf[126][5] & 0xFF00FFFF) | ((itemId1 & 0xFF) << 0x10);
gSaveContext.stolenItems = (gSaveContext.stolenItems & 0xFF00FFFF) | ((itemId1 & 0xFF) << 0x10);
}
return true;
@@ -570,8 +570,8 @@ void func_80C1193C(EnThiefbird* this, GlobalContext* globalCtx) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_THIEFBIRD_VOICE);
if (!(this->collider.base.atFlags & AT_BOUNCED)) {
if ((D_80C1392C != 0) && CUR_UPG_VALUE(UPG_QUIVER) &&
(!((gSaveContext.roomInf[126][5] & 0xFF000000) >> 0x18) ||
!((gSaveContext.roomInf[126][5] & 0xFF0000) >> 0x10)) &&
(!((gSaveContext.stolenItems & 0xFF000000) >> 0x18) ||
!((gSaveContext.stolenItems & 0xFF0000) >> 0x10)) &&
(Rand_ZeroOne() < 0.5f) && func_80C10B0C(this, globalCtx)) {
func_80C1242C(this);
} else if (func_80C10E98(globalCtx)) {
+4 -4
View File
@@ -291,7 +291,7 @@ void func_80AECA3C(EnTk* this, GlobalContext* globalCtx) {
void func_80AECA90(EnTk* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.msgMode = 0;
globalCtx->msgCtx.unk11F10 = 0;
func_80AEDE10(this, globalCtx);
} else if (this->actor.xzDistToPlayer < 100.0f) {
@@ -318,7 +318,7 @@ void func_80AECB6C(EnTk* this, GlobalContext* globalCtx) {
this->actor.textId = 0;
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.msgMode = 0;
globalCtx->msgCtx.unk11F10 = 0;
func_80AED4F8(this, globalCtx);
return;
@@ -690,7 +690,7 @@ void func_80AED940(EnTk* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2CA &= ~0x80;
this->actor.flags &= ~0x10000;
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.msgMode = 0;
globalCtx->msgCtx.unk11F10 = 0;
func_80AEDE10(this, globalCtx);
} else if (!(this->unk_2CA & 0x80)) {
@@ -871,7 +871,7 @@ void func_80AEDF5C(EnTk* this, GlobalContext* globalCtx) {
this->unk_2CA |= 2;
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
globalCtx->msgCtx.unk11F22 = 0x44;
globalCtx->msgCtx.msgMode = 0x44;
func_80AEE2A8(this, globalCtx);
} else {
func_8019F230();
+1 -1
View File
@@ -547,7 +547,7 @@ s32 func_80BA46D8(EnToto* this, GlobalContext* globalCtx) {
}
s32 func_80BA4740(EnToto* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.unk1202A == 4) {
if (globalCtx->msgCtx.ocarinaMode == 4) {
if (gSaveContext.playerForm == PLAYER_FORM_HUMAN) {
gSaveContext.weekEventReg[56] |= 0x10;
}
+10 -10
View File
@@ -199,7 +199,7 @@ void EnTrt_EndInteraction(GlobalContext* globalCtx, EnTrt* this) {
this->cutsceneState = ENTRT_CUTSCENESTATE_STOPPED;
}
Actor_ProcessTalkRequest(&this->actor, &globalCtx->state);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
Interface_ChangeAlpha(50);
this->drawCursor = 0;
@@ -342,7 +342,7 @@ void EnTrt_GetMushroom(EnTrt* this, GlobalContext* globalCtx) {
ActorCutscene_Stop(this->cutscene);
this->cutsceneState = ENTRT_CUTSCENESTATE_STOPPED;
}
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = EnTrt_PayForMushroom;
break;
@@ -382,12 +382,12 @@ void EnTrt_Goodbye(EnTrt* this, GlobalContext* globalCtx) {
void EnTrt_SetupTryToGiveRedPotion(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (this->textId == 0x88F) {
if (func_80114E90() || !(gSaveContext.weekEventReg[0xC] & 0x10)) {
if (Interface_HasEmptyBottle() || !(gSaveContext.weekEventReg[0xC] & 0x10)) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING) {
ActorCutscene_Stop(this->cutscene);
this->cutsceneState = ENTRT_CUTSCENESTATE_STOPPED;
}
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = EnTrt_GiveRedPotionForKoume;
} else {
@@ -403,7 +403,7 @@ void EnTrt_SetupTryToGiveRedPotion(EnTrt* this, GlobalContext* globalCtx) {
EnTrt_SetupStartShopping(globalCtx, this, 0);
} else if (gSaveContext.weekEventReg[0x54] & 0x40) {
this->textId = 0x83B;
if (func_80114F2C(ITEM_POTION_RED)) {
if (Interface_HasItemInBottle(ITEM_POTION_RED)) {
EnTrt_SetupStartShopping(globalCtx, this, false);
} else {
this->actionFunc = EnTrt_TryToGiveRedPotion;
@@ -632,7 +632,7 @@ void EnTrt_SetupBuyItemWithFanfare(GlobalContext* globalCtx, EnTrt* this) {
Player* player = GET_PLAYER(globalCtx);
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
player->stateFlags2 &= ~0x20000000;
Interface_ChangeAlpha(50);
@@ -715,7 +715,7 @@ void EnTrt_SelectItem(EnTrt* this, GlobalContext* globalCtx) {
}
}
} else if (talkState == 5 && func_80147624(globalCtx)) {
if (!func_80114E90()) {
if (!Interface_HasEmptyBottle()) {
play_sound(NA_SE_SY_ERROR);
EnTrt_SetupCannotBuy(globalCtx, this, 0x846);
} else {
@@ -926,7 +926,7 @@ void EnTrt_TryToGiveRedPotionAfterSurprised(EnTrt* this, GlobalContext* globalCt
this->blinkFunc = EnTrt_Blink;
if (talkState == 6 && func_80147624(globalCtx)) {
if (func_80114E90() || !(gSaveContext.weekEventReg[0xC] & 0x10)) {
if (Interface_HasEmptyBottle() || !(gSaveContext.weekEventReg[0xC] & 0x10)) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING) {
ActorCutscene_Stop(this->cutscene);
this->cutsceneState = ENTRT_CUTSCENESTATE_STOPPED;
@@ -945,12 +945,12 @@ void EnTrt_TryToGiveRedPotionAfterSurprised(EnTrt* this, GlobalContext* globalCt
void EnTrt_TryToGiveRedPotion(EnTrt* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 5 && func_80147624(globalCtx)) {
if (this->textId == 0x83C) {
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING) {
ActorCutscene_Stop(this->cutscene);
this->cutsceneState = ENTRT_CUTSCENESTATE_STOPPED;
}
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->actionFunc = EnTrt_GiveRedPotionForKoume;
} else {
+8 -8
View File
@@ -328,7 +328,7 @@ void func_80AD3CEC(EnTrt2* this, GlobalContext* globalCtx) {
func_801518B0(globalCtx, this->unk_3A8, &this->actor);
this->unk_3D8 = false;
} else if ((sp27 == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_80AD3380(&this->skelAnime, sAnimations, 6);
this->unk_3B2 = 4;
@@ -343,7 +343,7 @@ void func_80AD3DA4(EnTrt2* this, GlobalContext* globalCtx) {
this->unk_3B2 = 11;
return;
} else if (this->unk_3A8 == 0x88F) {
if (func_80114E90()) {
if (Interface_HasEmptyBottle()) {
this->unk_3B2 = 11;
} else {
this->unk_3B2 = 10;
@@ -355,8 +355,8 @@ void func_80AD3DA4(EnTrt2* this, GlobalContext* globalCtx) {
void func_80AD3E34(EnTrt2* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if (func_80114E90()) {
globalCtx->msgCtx.unk11F22 = 0x43;
if (Interface_HasEmptyBottle()) {
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_3B2 = 12;
} else {
@@ -373,7 +373,7 @@ void func_80AD3EF0(EnTrt2* this, GlobalContext* globalCtx) {
if (temp_v0 == 6) {
if (func_80147624(globalCtx)) {
if ((func_80114E90() && !(gSaveContext.weekEventReg[84] & 0x40)) ||
if ((Interface_HasEmptyBottle() && !(gSaveContext.weekEventReg[84] & 0x40)) ||
!(gSaveContext.weekEventReg[12] & 0x10)) {
this->unk_3B2 = 12;
} else {
@@ -384,7 +384,7 @@ void func_80AD3EF0(EnTrt2* this, GlobalContext* globalCtx) {
}
}
} else if ((temp_v0 == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_3B2 = 12;
}
@@ -428,7 +428,7 @@ void func_80AD417C(EnTrt2* this, GlobalContext* globalCtx) {
func_80AD349C(this);
func_80AD3DA4(this, globalCtx);
} else {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
if (this->unk_3A8 == 0x84C) {
func_80AD3380(&this->skelAnime, sAnimations, 6);
@@ -510,7 +510,7 @@ void func_80AD4550(EnTrt2* this, GlobalContext* globalCtx) {
}
if ((sp23 == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
}
}
@@ -484,7 +484,7 @@ void EnWeatherTag_Update(Actor* thisx, GlobalContext* globalCtx) {
u16 oldTime;
this->actionFunc(this, globalCtx);
if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.unk11F22 != 0) && (globalCtx->msgCtx.unk11F04 == 0x5E6) &&
if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.msgMode != 0) && (globalCtx->msgCtx.unk11F04 == 0x5E6) &&
(!FrameAdvance_IsEnabled(globalCtx)) && (globalCtx->sceneLoadFlag == 0) &&
(ActorCutscene_GetCurrentIndex() == -1) && (globalCtx->csCtx.state == 0)) {
+2 -2
View File
@@ -628,7 +628,7 @@ void func_80B9451C(EnZog* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_300 = 2;
this->actionFunc = func_80B94470;
} else if ((globalCtx->msgCtx.unk1202A == 3) && (this->actor.xzDistToPlayer < 120.0f)) {
} else if ((globalCtx->msgCtx.ocarinaMode == 3) && (this->actor.xzDistToPlayer < 120.0f)) {
if ((globalCtx->msgCtx.unk1202E == 7) && (gSaveContext.playerForm == PLAYER_FORM_HUMAN)) {
func_80B93BA8(this, 2);
this->actionFunc = func_80B943C0;
@@ -716,7 +716,7 @@ void func_80B948A8(EnZog* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_300 = 2;
this->actionFunc = func_80B946FC;
} else if ((globalCtx->msgCtx.unk1202A == 3) && (this->actor.xzDistToPlayer < 120.0f)) {
} else if ((globalCtx->msgCtx.ocarinaMode == 3) && (this->actor.xzDistToPlayer < 120.0f)) {
if ((globalCtx->msgCtx.unk1202E == 7) && (gSaveContext.playerForm == PLAYER_FORM_HUMAN)) {
func_80B93BA8(this, 2);
this->actionFunc = func_80B943C0;
+2 -2
View File
@@ -526,8 +526,8 @@ void func_80BBBDE0(EnZos* this, GlobalContext* globalCtx) {
func_80BBB0D4(this, globalCtx);
if (globalCtx->msgCtx.unk1202A == 0x2A) {
globalCtx->msgCtx.unk1202A = 4;
if (globalCtx->msgCtx.ocarinaMode == 0x2A) {
globalCtx->msgCtx.ocarinaMode = 4;
this->actionFunc = func_80BBBB84;
this->actor.flags |= ACTOR_FLAG_10000;
func_800B8614(&this->actor, globalCtx, 120.0f);
+1 -1
View File
@@ -1138,7 +1138,7 @@ void func_80B98BF4(EnZot* this, GlobalContext* globalCtx) {
void func_80B98CA8(EnZot* this, GlobalContext* globalCtx) {
if (func_800B8718(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk1202A = 4;
globalCtx->msgCtx.ocarinaMode = 4;
func_8019B544(0xFFFF);
this->actionFunc = func_80B98BF4;
this->actor.flags |= 0x10000;
@@ -98,7 +98,7 @@ void func_80B3C4E0(ObjGhaka* this, GlobalContext* globalCtx) {
if (talkState == 5) {
if (func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_80B3C260(this);
}
@@ -117,7 +117,7 @@ void func_80B3C4E0(ObjGhaka* this, GlobalContext* globalCtx) {
break;
case 2:
func_8019F230();
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.msgMode = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_80B3C260(this);
}
@@ -141,7 +141,7 @@ void ObjWarpstone_Update(Actor* thisx, GlobalContext* globalCtx) {
} else if ((Message_GetState(&globalCtx->msgCtx) == 4) && (func_80147624(globalCtx))) {
if (globalCtx->msgCtx.choiceIndex != 0) {
func_8019F208();
globalCtx->msgCtx.unk11F22 = 0x4D;
globalCtx->msgCtx.msgMode = 0x4D;
globalCtx->msgCtx.unk120D6 = 0;
globalCtx->msgCtx.unk120D4 = 0;
gSaveContext.owlSaveLocation = OBJ_WARPSTONE_GET_ID(this);