Alchemy
Loading...
Searching...
No Matches

xian_interiors.c File Reference

Xian's houses, shops and inn, and the room behind Master Feh's school, where Master Feh, Feizhi and Hsu wait once Hsu is back. More...

Go to the source code of this file.

Enumerations

enum  {
  ACTOR_XIAN_WEAPON_MERCHANT = 14 , ACTOR_XIAN_ARMOR_MERCHANT = 15 , ACTOR_XIAN_ITEM_MERCHANT = 16 , ACTOR_XIAN_INNKEEPER = 17 ,
  XIAN_WEAPON_STOCK = 16 , XIAN_ARMOR_STOCK = 17 , XIAN_ITEM_STOCK = 18 , XIAN_INN = 5
}
enum  { XIAN_INTERIORS_ENTRANCE_FROM_SCHOOL = 8 }
 The room reached from Master Feh's school (scene 61's exit 4), where Master Feh, Feizhi and Hsu wait once Hsu is back: its own actors and events. More...
enum  { ACTOR_FEH = ACTOR_FIRST_PLACED , ACTOR_FEIZHI , ACTOR_HSU }
 The actors placed in that room, as its dialogue shows them: Master Feh says Feizhi's prediction came true, Feizhi welcomes the party, and Hsu was injured on his way from Lama Temple. More...

Functions

const struct SceneEntrance * XianInteriors_GetEntrances (void)
const struct SceneRegion * XianInteriors_GetRegions (void)
const u32 * XianInteriors_GetExits (void)
const struct ScenePlacement * XianInteriors_GetPlacements (void)
 The room behind the school places only Master Feh, Feizhi and Hsu.
static u32 XianInteriors_GetLeaderFacing (void)
 Reads the leader's facing before a conversation changes actor state.
static void XianInteriors_TalkToWeaponMerchant (void)
 Opens the weapon shop from its counter side, or discusses martial arts.
static void XianInteriors_TalkToArmorMerchant (void)
 Opens the armor shop from its counter side, or discusses armor and kung fu.
static void XianInteriors_TalkToItemMerchant (void)
 Opens the item shop or asks whether the party will cross the desert.
static void XianInteriors_TalkToInnkeeper (void)
 Offers a room from the counter side, or discusses travel through Xian.
static void XianInteriors_AskAboutSilkRoad (void)
 Asks the resident whether something is wrong on the Silk Road.
static void XianInteriors_AskAboutAltinMonsters (void)
 Asks what the party knows about the monsters in Altin.
static void XianInteriors_FeizhiThanksParty (void)
 Feizhi, when the party helped free Hsu, welcomes the party, looks at Hsu, then thanks the party and Master Hama.
const struct SceneEvent * XianInteriors_GetEvents (void)
 The room behind the school has its own events.
s32 XianInteriors_Initialize (void)
 Places the interiors' effect objects; in the room behind the school, Hsu takes his pose.

Variables

s32 gEffectScript0 []
s32 gEffectScript1 []
s32 gEffectScript2 []
const s32 * gEffectScripts []
struct SceneEntrance gXianInteriors_Entrances []
u32 gXianInteriors_Exits []
struct ScenePlacement gXianInteriors_Placements []
struct ScenePlacement gXianInteriors_SchoolRoomPlacements []
struct SceneEvent gXianInteriors_Events []
struct SceneEvent gXianInteriors_SchoolRoomEvents []

Detailed Description

Xian's houses, shops and inn, and the room behind Master Feh's school, where Master Feh, Feizhi and Hsu wait once Hsu is back.

Definition in file xian_interiors.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ACTOR_XIAN_WEAPON_MERCHANT 
ACTOR_XIAN_ARMOR_MERCHANT 
ACTOR_XIAN_ITEM_MERCHANT 
ACTOR_XIAN_INNKEEPER 
XIAN_WEAPON_STOCK 
XIAN_ARMOR_STOCK 
XIAN_ITEM_STOCK 
XIAN_INN 

Definition at line 27 of file xian_interiors.c.

◆ anonymous enum

anonymous enum

The room reached from Master Feh's school (scene 61's exit 4), where Master Feh, Feizhi and Hsu wait once Hsu is back: its own actors and events.

Enumerator
XIAN_INTERIORS_ENTRANCE_FROM_SCHOOL 

Definition at line 40 of file xian_interiors.c.

◆ anonymous enum

anonymous enum

The actors placed in that room, as its dialogue shows them: Master Feh says Feizhi's prediction came true, Feizhi welcomes the party, and Hsu was injured on his way from Lama Temple.

Enumerator
ACTOR_FEH 
ACTOR_FEIZHI 
ACTOR_HSU 

Definition at line 45 of file xian_interiors.c.

Function Documentation

◆ XianInteriors_GetEntrances()

const struct SceneEntrance * XianInteriors_GetEntrances ( void )

Definition at line 53 of file xian_interiors.c.

Referenced by XianInteriors_GetEntrances().

◆ XianInteriors_GetRegions()

const struct SceneRegion * XianInteriors_GetRegions ( void )

Definition at line 57 of file xian_interiors.c.

Referenced by XianInteriors_GetRegions().

◆ XianInteriors_GetExits()

const u32 * XianInteriors_GetExits ( void )

Definition at line 59 of file xian_interiors.c.

Referenced by XianInteriors_GetExits().

◆ XianInteriors_GetPlacements()

const struct ScenePlacement * XianInteriors_GetPlacements ( void )

The room behind the school places only Master Feh, Feizhi and Hsu.

Definition at line 62 of file xian_interiors.c.

Referenced by XianInteriors_GetPlacements().

◆ XianInteriors_GetLeaderFacing()

u32 XianInteriors_GetLeaderFacing ( void )
inlinestatic

Reads the leader's facing before a conversation changes actor state.

Definition at line 71 of file xian_interiors.c.

Referenced by XianInteriors_GetLeaderFacing(), XianInteriors_TalkToArmorMerchant(), XianInteriors_TalkToInnkeeper(), XianInteriors_TalkToItemMerchant(), and XianInteriors_TalkToWeaponMerchant().

◆ XianInteriors_TalkToWeaponMerchant()

void XianInteriors_TalkToWeaponMerchant ( void )
static

Opens the weapon shop from its counter side, or discusses martial arts.

Definition at line 77 of file xian_interiors.c.

Referenced by XianInteriors_TalkToWeaponMerchant().

◆ XianInteriors_TalkToArmorMerchant()

void XianInteriors_TalkToArmorMerchant ( void )
static

Opens the armor shop from its counter side, or discusses armor and kung fu.

Definition at line 96 of file xian_interiors.c.

Referenced by XianInteriors_TalkToArmorMerchant().

◆ XianInteriors_TalkToItemMerchant()

void XianInteriors_TalkToItemMerchant ( void )
static

Opens the item shop or asks whether the party will cross the desert.

Definition at line 115 of file xian_interiors.c.

Referenced by XianInteriors_TalkToItemMerchant().

◆ XianInteriors_TalkToInnkeeper()

void XianInteriors_TalkToInnkeeper ( void )
static

Offers a room from the counter side, or discusses travel through Xian.

Definition at line 134 of file xian_interiors.c.

Referenced by XianInteriors_TalkToInnkeeper().

◆ XianInteriors_AskAboutSilkRoad()

void XianInteriors_AskAboutSilkRoad ( void )
static

Asks the resident whether something is wrong on the Silk Road.

Definition at line 153 of file xian_interiors.c.

Referenced by XianInteriors_AskAboutSilkRoad().

◆ XianInteriors_AskAboutAltinMonsters()

void XianInteriors_AskAboutAltinMonsters ( void )
static

Asks what the party knows about the monsters in Altin.

Definition at line 161 of file xian_interiors.c.

Referenced by XianInteriors_AskAboutAltinMonsters().

◆ XianInteriors_FeizhiThanksParty()

void XianInteriors_FeizhiThanksParty ( void )
static

Feizhi, when the party helped free Hsu, welcomes the party, looks at Hsu, then thanks the party and Master Hama.

"Oh, warrior! Welcome!"

Definition at line 170 of file xian_interiors.c.

Referenced by XianInteriors_FeizhiThanksParty().

◆ XianInteriors_GetEvents()

const struct SceneEvent * XianInteriors_GetEvents ( void )

The room behind the school has its own events.

Definition at line 183 of file xian_interiors.c.

Referenced by XianInteriors_GetEvents().

◆ XianInteriors_Initialize()

s32 XianInteriors_Initialize ( void )

Places the interiors' effect objects; in the room behind the school, Hsu takes his pose.

Definition at line 192 of file xian_interiors.c.

Referenced by XianInteriors_Initialize().

Variable Documentation

◆ gEffectScript0

s32 gEffectScript0[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(22, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18
#define SC_FREE
Release.
Definition objcmd.h:43
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13

Definition at line 210 of file xian_interiors.c.

◆ gEffectScript1

s32 gEffectScript1[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(44, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}

Definition at line 215 of file xian_interiors.c.

◆ gEffectScript2

s32 gEffectScript2[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(126, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}

Definition at line 220 of file xian_interiors.c.

◆ gEffectScripts

const s32* gEffectScripts[]
Initial value:
= {
}
s32 gEffectScript0[]
s32 gEffectScript1[]
s32 gEffectScript2[]

Definition at line 225 of file xian_interiors.c.

◆ gXianInteriors_Entrances

struct SceneEntrance gXianInteriors_Entrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 172, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 128, 0, 184, FACING_NORTH, 0, 24, 8, 248, 208, 0},
{2, CONDITION_ALWAYS, 448, 0, 200, FACING_NORTH, 0, 288, 8, 592, 224, 0},
{3, CONDITION_ALWAYS, 736, 0, 200, FACING_NORTH, 0, 608, 8, 848, 224, 0},
{4, CONDITION_ALWAYS, 160, 0, 472, FACING_NORTH, 0, 48, 288, 336, 496, 0},
{5, CONDITION_ALWAYS, 472, 0, 360, FACING_EAST, 0, 384, 288, 672, 496, 0},
{6, CONDITION_ALWAYS, 512, 0, 696, FACING_NORTH, 0, 352, 496, 656, 720, 0},
{7, CONDITION_ALWAYS, 120, 0, 360, FACING_EAST, 0, 48, 288, 336, 496, 0},
{8, CONDITION_ALWAYS, 120, 0, 696, FACING_NORTH, 0, 64, 544, 304, 744, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_EAST
Definition field_scene.h:26
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 231 of file xian_interiors.c.

Referenced by XianInteriors_GetEntrances().

◆ gXianInteriors_Exits

u32 gXianInteriors_Exits[]
Initial value:
= {
SCENE_EXITS(73), SCENE_EXIT(1, 72, 5), SCENE_EXIT(2, 72, 6),
SCENE_EXIT(3, 72, 7), SCENE_EXIT(4, 72, 8), SCENE_EXIT(5, 73, 7),
SCENE_EXIT(6, 72, 9), SCENE_EXIT(7, 73, 5), SCENE_EXIT(8, 61, 4),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 244 of file xian_interiors.c.

Referenced by XianInteriors_GetExits().

◆ gXianInteriors_Placements

struct ScenePlacement gXianInteriors_Placements[]
Initial value:
= {
{ 0xa0, 0x0, ACTOR_STAND,
PIXELS(144), 0, PIXELS(152), FACING_SOUTH, TALK_FACE_PARTY, 0 },
{ 0xa2, 0x0, ACTOR_STAND,
{ 0x9c, 0x0, ACTOR_STAND,
{ 0x9f, 0x0, ACTOR_WANDER,
PIXELS(368), 0, PIXELS(128), FACING_SOUTH, TALK_FACE_PARTY, 0 },
{ 0xa4, 0x0, ACTOR_STAND,
PIXELS(760), 0, PIXELS(184), FACING_EAST, TALK_FACE_PARTY, 0 },
{ 0xa6, 0x0, ACTOR_STAND,
{ 0x7c, 0x0, ACTOR_STAND,
{ 0x7d, 0x0, ACTOR_STAND,
{ 0x76, 0x0, ACTOR_STAND,
{ 0x77, 0x0, ACTOR_STAND,
{ 0x80, 0x0, ACTOR_WANDER,
PIXELS(568), 0, PIXELS(416), FACING_SOUTH, TALK_FACE_PARTY, 0 },
{ 0x7b, 0x0, ACTOR_STAND,
}
@ TALK_FACE_PARTY
@ TALK_FACE_PARTY_AND_BACK
@ ACTOR_WANDER
@ ACTOR_STAND
@ FACING_WEST
Definition field_scene.h:30
#define PIXELS(value)

Definition at line 252 of file xian_interiors.c.

Referenced by XianInteriors_GetPlacements().

◆ gXianInteriors_SchoolRoomPlacements

struct ScenePlacement gXianInteriors_SchoolRoomPlacements[]
Initial value:

Definition at line 280 of file xian_interiors.c.

Referenced by XianInteriors_GetPlacements().

◆ gXianInteriors_Events

struct SceneEvent gXianInteriors_Events[]

Definition at line 290 of file xian_interiors.c.

Referenced by XianInteriors_GetEvents().

◆ gXianInteriors_SchoolRoomEvents

struct SceneEvent gXianInteriors_SchoolRoomEvents[]
Initial value:
= {
{ EVENT_TALK, ACTOR_FEH, 0x8b3, MSGNO(MsgXianInteriorsFeizhisPredictionCameTrueNowI) },
{ EVENT_TALK, ACTOR_HSU, 0x8b3, MSGNO(MsgXianInteriorsIWasInjuredByRocksOn) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FEH, 0x8b3, MSGNO(MsgXianInteriorsFeizhisAbilityToSenseTroubleIs) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FEIZHI, 0x8b3, MSGNO(MsgXianInteriorsMasterHamaHasGreatPowerYou) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_HSU, 0x8b3, MSGNO(MsgXianInteriorsIKnewHelpWouldComeWhen) },
{ EVENT_TALK, ACTOR_FEH, CONDITION_ALWAYS, MSGNO(MsgXianInteriorsFeizhisPredictionCameTrueNowIBelieve) },
{ EVENT_TALK, ACTOR_FEIZHI, CONDITION_ALWAYS, MSGNO(MsgXianInteriorsHsuWasTrappedUnderTheRocks) },
{ EVENT_TALK, ACTOR_HSU, CONDITION_ALWAYS, MSGNO(MsgXianInteriorsIWasInjuredByBouldersOn) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FEH, CONDITION_ALWAYS, MSGNO(MsgXianInteriorsFeizhisAbilityToForeseeIsReal) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FEIZHI, CONDITION_ALWAYS, MSGNO(MsgXianInteriorsMasterHamaHasGreatPowerSome) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_HSU, CONDITION_ALWAYS, MSGNO(MsgXianInteriorsIKnewHelpWouldComeWhenI) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
#define SCENE_EVENTS_END
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
@ ACTOR_FEH
static void XianInteriors_FeizhiThanksParty(void)
Feizhi, when the party helped free Hsu, welcomes the party, looks at Hsu, then thanks the party and M...

Definition at line 360 of file xian_interiors.c.

Referenced by XianInteriors_GetEvents().