Gold Kinstone Fusion names

This commit is contained in:
Catobat 2023-04-27 02:29:50 +02:00
parent a822374f76
commit aa477e7ad0
8 changed files with 30 additions and 24 deletions

View File

@ -27,7 +27,7 @@ SCRIPT_START script_08016384
FacePlayerAndCheckDist FacePlayerAndCheckDist
HasRupees 200 HasRupees 200
CheckTextboxResult CheckTextboxResult
CheckKinstoneFused KINSTONE_1 CheckKinstoneFused KINSTONE_MYSTERIOUS_CLOUD_TOP_RIGHT
BuyItem ITEM_BOMBS10, 0x0000 BuyItem ITEM_BOMBS10, 0x0000
CheckBottleContaining ITEM_BOTTLE_EMPTY CheckBottleContaining ITEM_BOTTLE_EMPTY
VariableBitSet 0x00000000 VariableBitSet 0x00000000

View File

@ -28,7 +28,7 @@ SCRIPT_START script_08016482
_0807E9D4 _0807E9D4
_0807E9DC _0807E9DC
_0807E9E4 0x0000 _0807E9E4 0x0000
_0807EA88 0x0001 _0807EA88 KINSTONE_MYSTERIOUS_CLOUD_TOP_RIGHT
WaitUntilTextboxCloses WaitUntilTextboxCloses
MessageFromTarget TEXT_LOCATIONS, 0x01 MessageFromTarget TEXT_LOCATIONS, 0x01
MessageNoOverlap 0x0601 MessageNoOverlap 0x0601

View File

@ -1,7 +1,7 @@
@ Waterfalls MINISH_VILLAGE_OBJECT during kinstone cutscene? @ Waterfalls MINISH_VILLAGE_OBJECT during kinstone cutscene?
SCRIPT_START script_MinishVillageObjectLeftStoneOpening SCRIPT_START script_MinishVillageObjectLeftStoneOpening
BeginBlock BeginBlock
CheckKinstoneFused KINSTONE_9 CheckKinstoneFused KINSTONE_SOURCE_FLOW
JumpIf script_MinishVillageObjectLeftStone JumpIf script_MinishVillageObjectLeftStone
EndBlock EndBlock
WaitForSyncFlagAndClear 0x00000001 WaitForSyncFlagAndClear 0x00000001

View File

@ -1,7 +1,7 @@
@ Waterfalls MINISH_VILLAGE_OBJECT during kinstone cutscene? @ Waterfalls MINISH_VILLAGE_OBJECT during kinstone cutscene?
SCRIPT_START script_MinishVillageObjectRightStoneOpening SCRIPT_START script_MinishVillageObjectRightStoneOpening
BeginBlock BeginBlock
CheckKinstoneFused KINSTONE_9 CheckKinstoneFused KINSTONE_SOURCE_FLOW
JumpIf script_MinishVillageObjectRightStone JumpIf script_MinishVillageObjectRightStone
EndBlock EndBlock
WaitForSyncFlagAndClear 0x00000002 WaitForSyncFlagAndClear 0x00000002

View File

@ -2,9 +2,9 @@
SCRIPT_START script_NPC4ESourceOfTheFlow SCRIPT_START script_NPC4ESourceOfTheFlow
BeginBlock BeginBlock
Call sub_0806DB84 Call sub_0806DB84
CheckKinstoneFused KINSTONE_9 CheckKinstoneFused KINSTONE_SOURCE_FLOW
JumpIf script_08016028 JumpIf script_08016028
_0807EA88 0x0009 _0807EA88 KINSTONE_SOURCE_FLOW
CallWithArg sub_0806DA04, 0x00000007 CallWithArg sub_0806DA04, 0x00000007
DoPostScriptAction 0x000a DoPostScriptAction 0x000a
EndBlock EndBlock
@ -12,7 +12,7 @@ script_08015FE4:
_0807EA4C _0807EA4C
_0807E9F0 _0807E9F0
SetPlayerIdle SetPlayerIdle
CheckKinstoneFused KINSTONE_9 CheckKinstoneFused KINSTONE_SOURCE_FLOW
JumpIf script_08015FFE JumpIf script_08015FFE
Call EnablePauseMenu Call EnablePauseMenu
EnablePlayerControl EnablePlayerControl

View File

@ -36,15 +36,15 @@ extern const KinstoneWorldEvent gKinstoneWorldEvents[];
typedef enum { typedef enum {
KINSTONE_0, KINSTONE_0,
KINSTONE_1, KINSTONE_MYSTERIOUS_CLOUD_TOP_RIGHT,
KINSTONE_2, KINSTONE_MYSTERIOUS_CLOUD_BOTTOM_LEFT,
KINSTONE_3, KINSTONE_MYSTERIOUS_CLOUD_TOP_LEFT,
KINSTONE_4, KINSTONE_MYSTERIOUS_CLOUD_MIDDLE,
KINSTONE_5, KINSTONE_MYSTERIOUS_CLOUD_BOTTOM_RIGHT,
KINSTONE_CASTOR_WILDS_STATUE_LEFT, KINSTONE_CASTOR_WILDS_STATUE_LEFT,
KINSTONE_CASTOR_WILDS_STATUE_MIDDLE, KINSTONE_CASTOR_WILDS_STATUE_MIDDLE,
KINSTONE_CASTOR_WILDS_STATUE_RIGHT, KINSTONE_CASTOR_WILDS_STATUE_RIGHT,
KINSTONE_9, KINSTONE_SOURCE_FLOW,
KINSTONE_A, KINSTONE_A,
KINSTONE_B, KINSTONE_B,
KINSTONE_C, KINSTONE_C,
@ -131,6 +131,11 @@ typedef enum {
KINSTONE_5D, KINSTONE_5D,
KINSTONE_5E, KINSTONE_5E,
KINSTONE_5F, KINSTONE_5F,
KINSTONE_60,
KINSTONE_61,
KINSTONE_62,
KINSTONE_63,
KINSTONE_64,
} KinstoneId; } KinstoneId;
typedef struct { typedef struct {

View File

@ -110,7 +110,7 @@ const struct_gUnk_080B3D20 gUnk_080B3D20[] = {
{ CHECK_ITEM, ITEM_BLUE_SWORD, 4, 1 }, { CHECK_ITEM, ITEM_BLUE_SWORD, 4, 1 },
{ LOCAL_BANK_3, LV4_HAKA_08_CAP_0, 4, 2 }, { LOCAL_BANK_3, LV4_HAKA_08_CAP_0, 4, 2 },
{ LOCAL_BANK_3, OUBO_KAKERA, 4, 3 }, { LOCAL_BANK_3, OUBO_KAKERA, 4, 3 },
{ CHECK_KINSTONE, KINSTONE_9, 4, 4 }, { CHECK_KINSTONE, KINSTONE_SOURCE_FLOW, 4, 4 },
{ LOCAL_BANK_0, TATSUMAKI, 4, 5 }, { LOCAL_BANK_0, TATSUMAKI, 4, 5 },
{ LOCAL_BANK_2, SORA_YAKATA_ENTER, 4, 6 }, { LOCAL_BANK_2, SORA_YAKATA_ENTER, 4, 6 },
{ LOCAL_BANK_2, SORA_CHIEF_TALK, 4, 7 }, { LOCAL_BANK_2, SORA_CHIEF_TALK, 4, 7 },

View File

@ -4,6 +4,7 @@
#include "game.h" #include "game.h"
#include "hitbox.h" #include "hitbox.h"
#include "item.h" #include "item.h"
#include "kinstone.h"
#include "npc.h" #include "npc.h"
#include "object.h" #include "object.h"
#include "save.h" #include "save.h"
@ -53,30 +54,30 @@ void NPC4E_DoScreenTransition(Entity* this, ScriptExecutionContext* context) {
} }
// Returns the kinstone id? // Returns the kinstone id?
u8 sub_0806DA3C(Entity* this) { u8 NPC4E_GetKinstoneId(Entity* this) {
u32 result; u32 result;
switch (this->type) { switch (this->type) {
default: default:
result = 0; result = KINSTONE_0;
break; break;
case 1: case 1:
result = 1; result = KINSTONE_MYSTERIOUS_CLOUD_TOP_RIGHT;
break; break;
case 2: case 2:
result = 2; result = KINSTONE_MYSTERIOUS_CLOUD_BOTTOM_LEFT;
break; break;
case 3: case 3:
result = 3; result = KINSTONE_MYSTERIOUS_CLOUD_TOP_LEFT;
break; break;
case 4: case 4:
result = 4; result = KINSTONE_MYSTERIOUS_CLOUD_MIDDLE;
break; break;
case 5: case 5:
result = 5; result = KINSTONE_MYSTERIOUS_CLOUD_BOTTOM_RIGHT;
break; break;
case 11: case 11:
result = 9; result = KINSTONE_SOURCE_FLOW;
break; break;
case 6: case 6:
case 7: case 7:
@ -91,13 +92,13 @@ u8 sub_0806DA3C(Entity* this) {
// Check whether a kinstone fusion is possible and store the result somewhere in param_2? // Check whether a kinstone fusion is possible and store the result somewhere in param_2?
void sub_0806DAAC(Entity* this, ScriptExecutionContext* context) { void sub_0806DAAC(Entity* this, ScriptExecutionContext* context) {
context->condition = CheckKinstoneFused(sub_0806DA3C(this)); context->condition = CheckKinstoneFused(NPC4E_GetKinstoneId(this));
gActiveScriptInfo.flags |= 1; gActiveScriptInfo.flags |= 1;
} }
// maybe actually execute the kinstone fusion? // maybe actually execute the kinstone fusion?
void sub_0806DAD0(Entity* this) { void sub_0806DAD0(Entity* this) {
sub_08078790(this, sub_0806DA3C(this)); sub_08078790(this, NPC4E_GetKinstoneId(this));
} }
void sub_0806DAE8(Entity* this) { void sub_0806DAE8(Entity* this) {