Skip to Content
The Alchemy Project

src/debug/psynergy_test.c

The debug room Psynergy test: the shops, an inn and a Sanctum to try, the party's levels, items and Djinn to set, and spots for the field Psynergy The Lost Age adds, each answered by a small script: Scoop digs up a hole, a puddle, a Wicked Mace and a statue before a battle; Cyclone clears leaves and sends the leader away and back in a ring of light; Pound lights a torch and Parch dries a pool; Blaze startles Kraden; Sand drops Felix to the sand layer.

Macros

NameDescription
#defineFLAG_HOLE_DUG FLAG_AREA_TEMP(0x00)The room's flags: the four Scoop spots dug, the Wicked Mace picked up, and whether Blaze has sent Kraden to his second spot.
#defineFLAG_PUDDLE_DUG FLAG_AREA_TEMP(0x01)
#defineFLAG_WICKED_MACE_DUG FLAG_AREA_TEMP(0x02)
#defineFLAG_STATUE_DUG FLAG_AREA_TEMP(0x03)
#defineFLAG_WICKED_MACE_TAKEN FLAG_AREA_TEMP(0x10)
#defineFLAG_KRADEN_MOVED FLAG_SCENE_TEMP(0x00)

Enumerations

NameDescription
enumPSYNERGY_TEST_METATILE_BEHAVIOR { METATILE_BEHAVIOR_OUCH_TILE, METATILE_BEHAVIOR_LV_TILE, META … }The room's own metatiles, as map.txt has them.
enumanonymous enum { ENTRANCE_DEPART_IN_RING, ENTRANCE_ARRIVE_IN_RING }The entrances Cyclone's spots bring the party back in by: there the leader leaves in a ring of light, or arrives in one (scInit).
enumPSYNERGY_TEST_ACTOR_ID { ACTOR_SHOPKEEPER, ACTOR_FALLEN_MAN, ACTOR_INNKEEPER, ACTOR_M … }The room's actors that run its tests, numbered in the order of ActorPlacements after the party's four rows.

Functions

NameDescription
voidsyImportDebugMadPlantLeap (Sint32 sprite, Sint32 x, Sint32 z)A Mad Plant leaps at the leader (fdMadPlantLeapAtLeader, through the room's own import).
voiddbPsynergyTestDigMetatiles (Sint32 stage, Sint32 srcX, Sint32 srcY, Sint32 width, Sint32 height, Sint32 destX, Sint32 destY)As the ground opens, copies the metatiles of the hole in.
voiddbPsynergyTestGrowActor (Sint32 stage, Sint32 id, Sint32 x, Sint32 z)As the ground opens, places the actor at (x, z) in pixels with no size; twenty ticks later, grows it to full size.
voiddbPsynergyTestDropActor (Sint32 stage, Sint32 id, Sint32 x, Sint32 z)Twenty ticks after the ground opens, drops the actor onto (x, z) in pixels from 32 pixels up.
voiddbPsynergyTestRaiseStatue ( Sint32 stage, Sint32 x, Sint32 z, Sint32 row, Sint32 column)As the ground opens, places a brown boulder at (x, z) in pixels; twenty ticks later, grows a winged statue there from two fifths to full size while it turns, turns it opposite the leader's facing and starts a battle with the formation at column of encounter zone row.
voiddbPsynergyTestStartRings (ACTOR *actor, SPARKLE_STATE *state)Starts an actor's rings, kept in state: loads their tiles and hooks dbPsynergyTestUpdateRings to the actor.
voiddbPsynergyTestStopRings (ACTOR *actor)Lets an actor's rings climb out.
BSS_DATAALIGNED (16)The blend of one turn of the two maps' alternation in the throne room, a step every four ticks: the first map fades up and down, then the second.
const SCENE_ENTRANCE *scGetEntrances (void)Where the party can enter: the cave under the spring has its own entrances.
const SCENE_REGION *scGetExitRegions (void)The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room.
const Uint32 *scGetExits (void)The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN.
const ACTOR_PLACE *scGetActorPlacements (void)The scene's actor placements: a room of names for its entrance, else the debug room's.
voiddbPsynergyTestNoOperation (void)The script for actors and Psynergy the room leaves alone.
voiddbPsynergyTestOpenItemPicker (void)Opens the picker a full party drops an item with, and discards the choice.
voiddbPsynergyTestEditIsaacName (void)The name entry screen for Isaac.
voiddbPsynergyTestIgnorePsynergy (void)The script for Force, Whirlwind and Catch cast at the ice pillar.
voiddbPsynergyTestShowMessageAndWait (Sint32 msg)Closes the finished message windows, opens the message in the window a shopkeeper's lines open (mnShopShowKeeperMessage) and waits until it is typed out, then a tick more.
voiddbPsynergyTestBrowseMessageRange (Sint32 msg, Sint32 count)Browses count messages from msg: A or Down for the next, Up for the one before, B to close.
voiddbPsynergyTestBrowseWeaponShopMessages (void)The shop and sanctum message browsers: talking to ACTOR_MESSAGE_BROWSER from each side.
voiddbPsynergyTestBrowseArmorShopMessages (void)Browses the armor shop's messages.
voiddbPsynergyTestBrowseItemShopMessages (void)Browses the item shop's messages.
voiddbPsynergyTestBrowseSanctumMessages (void)Browses the Sanctum's messages.
voiddbPsynergyTestOpenWeaponShop (Sint32 keeper)The shops: talking to ACTOR_SHOPKEEPER from each side opens Daila's weapon, armor or item shop or Izumo's general store.
voiddbPsynergyTestOpenArmorShop (Sint32 keeper)Opens Daila's armor shop.
voiddbPsynergyTestOpenItemShop (Sint32 keeper)Opens Daila's item shop.
voiddbPsynergyTestOpenGeneralStore (Sint32 keeper)Opens Izumo's general store.
voiddbPsynergyTestOpenInn (Sint32 keeper)Opens Daila's inn.
voiddbPsynergyTestIgnoreTalk (void)The script for talking to ACTOR_FALLEN_MAN, which does nothing.
voiddbPsynergyTestRaisePartyLevels (void)Raises Felix, Jenna and Sheba ten levels: examining METATILE_BEHAVIOR_LV_TILE.
voiddbPsynergyTestGiveTreasureTestStock (void)Gives 777,777 coins and ten each of Game Tickets and Lucky Medals: examining METATILE_BEHAVIOR_TREASURE_TILE.
voiddbPsynergyTestDamageAndAfflictParty (void)Takes HP and PP from Felix, Jenna and Sheba, then poisons and haunts Felix and binds Jenna and gives her deadly poison: examining METATILE_BEHAVIOR_OUCH_TILE.
voiddbPsynergyTestGiveDjinni (Sint32 owner, Sint32 element, Sint32 djinn, Sint32 activate)Gives owner the Djinni djinn of element (its DJINNI_INDEX) and sets its flag; with activate 1 the Djinni is also set.
voiddbPsynergyTestGivePartyDjinn (void)Gives and sets Djinn: Felix seven of Venus, Jenna seven of Mars and Sheba six of Mercury: examining METATILE_BEHAVIOR_RED_CROSS_TILE.
voiddbPsynergyTestSetSandLayer (void)While Felix is Sand he reads his ground height from layer 2, and from layer 0 again once Sand fades.
voiddbPsynergyTestClearSandLayer (void)Puts Felix back on layer 0 as Sand fades.
voiddbPsynergyTestPracticeShout (Sint32 unused, Sint32 actor)As Blaze reaches him, Kraden shouts and jumps to the other of his two spots, as Daila's practising man would (scDailaRoomsPracticeShout, which Daila never runs).
voiddbPsynergyTestStartleAfterBlaze (Sint32 unused, Sint32 actor)Once Blaze has ended, Kraden turns to Felix, startled, as Daila's practising man would (scDailaRoomsStartleAtTheLeader).
voiddbPsynergyTestStartleAgain (Sint32 unused, Sint32 actor)The same, once A??
voiddbPsynergyTestLightTorch (void)Once A?? has ended at the torch, it lights, and the 4 by 6 block of metatiles at (57, 16) is copied over the one at (25, 0).
voiddbPsynergyTestPoundTorch (Sint32 stage)Pound on the torch does the same as its fist lands, without the wait.
voiddbPsynergyTestBlowAwayLeaves (void)Cyclone at the patch of leaves blows them away: each metatile of the patch it touched takes its picture from the same place of the bare block at (34, 26).
voiddbPsynergyTestDepartInRing (void)Cyclone at METATILE_BEHAVIOR_RING_LEAF blows the leaves away too, then brings the party back in by ENTRANCE_DEPART_IN_RING.
voiddbPsynergyTestArriveInRing (void)Cyclone at METATILE_BEHAVIOR_RED_CROSS_TILE brings the party back in by ENTRANCE_ARRIVE_IN_RING.
voiddbPsynergyTestFightMadPlant (void)Cyclone at METATILE_BEHAVIOR_MAD_PLANT_LEAF: a Mad Plant leaps at the leader, and a battle with no escape starts, ENCOUNTER_ZONE_WORLD_MAP_BEACH_AND_GRASSLAND's first formation, one or two Giant Bats.
voiddbPsynergyTestDigUpHole (Sint32 stage)The four Scoop spots, the grass patches set corner to corner east of the leaves, each run while its flag is clear.
voiddbPsynergyTestDigUpPuddle (Sint32 stage)The Scoop spot that digs up a puddle, which grows out of the ground.
voiddbPsynergyTestDigUpWickedMace (Sint32 stage)The Scoop spot that digs up a Wicked Mace, which drops onto it.
voiddbPsynergyTestDigUpStatue (Sint32 stage)The Scoop spot that raises a statue, then a battle.
voiddbPsynergyTestPickUpItem (void)Talking to the Wicked Mace picks it up.
voiddbPsynergyTestParchMetatiles (void)Parch at the pool dries it, copying in the dry metatiles at (48, 26).
voiddbPsynergyTestIgnoreTremor (void)Tremor's script, which does nothing.
voiddbPsynergyTestIgnoreGrind (void)Grind's script, which does nothing.
voiddbPsynergyTestShowRings (Sint32 actor)Talking to Mia: rings of light rise around her and the leader for 100 ticks.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
Sint32scInit (void)Sets the shops' rare stock, freezes the puddle, lays the fallen actors down, puts back what the Scoop spots and the Wicked Mace have already done, and sends the leader away or brings it in by ring at the entrances for them.
Sint32scPrepareMap (void)Once Briggs is caught the pool has dried up: its colours take the dry ground's.
voiddbPsynergyTestOpenIconBrowser (void)Opens the icon browser.
voiddbPsynergyTestOpenSanctum (Sint32 keeper)Opens the Sanctum.
voiddbPsynergyTestUpdateRings (ACTOR *actor)Each tick of an actor's rings: a ring climbs RING_CLIMB pixels up the actor, swelling and shrinking as it goes, and the next starts with a chime RING_INTERVAL ticks later, two at a time, while the actor's colours cycle.

Variables

NameDescription
extern Uint32LightRingTiles []The light rings' tiles, and the rings Mia raises about herself and the leader.
SPARKLE_STATEPsynergyTestLeaderRings
SPARKLE_STATEPsynergyTestTargetRings
SCENE_ENTRANCESceneEntrances []Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole.
ACTOR_PLACEActorPlacements []The room's people: the party's four rows, then PSYNERGY_TEST_ACTOR_ID's.
CUESceneCues []The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers.

Description

The debug room Psynergy test: the shops, an inn and a Sanctum to try, the party's levels, items and Djinn to set, and spots for the field Psynergy The Lost Age adds, each answered by a small script: Scoop digs up a hole, a puddle, a Wicked Mace and a statue before a battle; Cyclone clears leaves and sends the leader away and back in a ring of light; Pound lights a torch and Parch dries a pool; Blaze startles Kraden; Sand drops Felix to the sand layer.

Macros in detail

FLAG_HOLE_DUG

#define FLAG_HOLE_DUG FLAG_AREA_TEMP(0x00)

The room's flags: the four Scoop spots dug, the Wicked Mace picked up, and whether Blaze has sent Kraden to his second spot.

Referenced by dbPsynergyTestDigUpHole(), SceneCues and scInit().

Definition at line 30 of file psynergy_test.c.

FLAG_PUDDLE_DUG

#define FLAG_PUDDLE_DUG FLAG_AREA_TEMP(0x01)

Referenced by dbPsynergyTestDigUpPuddle(), SceneCues and scInit().

Definition at line 31 of file psynergy_test.c.

FLAG_WICKED_MACE_DUG

#define FLAG_WICKED_MACE_DUG FLAG_AREA_TEMP(0x02)

Referenced by dbPsynergyTestDigUpWickedMace(), SceneCues and scInit().

Definition at line 32 of file psynergy_test.c.

FLAG_STATUE_DUG

#define FLAG_STATUE_DUG FLAG_AREA_TEMP(0x03)

Referenced by dbPsynergyTestDigUpStatue() and SceneCues.

Definition at line 33 of file psynergy_test.c.

FLAG_WICKED_MACE_TAKEN

#define FLAG_WICKED_MACE_TAKEN FLAG_AREA_TEMP(0x10)

Referenced by dbPsynergyTestPickUpItem() and scInit().

Definition at line 34 of file psynergy_test.c.

FLAG_KRADEN_MOVED

#define FLAG_KRADEN_MOVED FLAG_SCENE_TEMP(0x00)

Referenced by dbPsynergyTestPracticeShout().

Definition at line 35 of file psynergy_test.c.

Enumerations in detail

PSYNERGY_TEST_METATILE_BEHAVIOR

enum PSYNERGY_TEST_METATILE_BEHAVIOR

The room's own metatiles, as map.txt has them.

EnumeratorValueDescription
METATILE_BEHAVIOR_OUCH_TILE10The tile marked "Ouch!" in Japanese, metatile (11, 2).
METATILE_BEHAVIOR_LV_TILEThe tile marked LV, metatile (11, 4).
METATILE_BEHAVIOR_TREASURE_TILEMarked with the kanji for treasure, metatile (11, 6).
METATILE_BEHAVIOR_RED_CROSS_TILEThe tile marked with a red cross, metatile (11, 8).
METATILE_BEHAVIOR_HOLE_EXIT20The floor of a dug hole, copied in from metatile (36, 28): its number is the exit it leaves by (psynergy_test_exits.c), back to entrance 2.
METATILE_BEHAVIOR_HOLE_SPOT50The four Scoop spots, corner to corner from (10, 10) to (13, 13).
METATILE_BEHAVIOR_PUDDLE_SPOT
METATILE_BEHAVIOR_WICKED_MACE_SPOT
METATILE_BEHAVIOR_STATUE_SPOT
METATILE_BEHAVIOR_LEAVES55The patch of leaves at (2, 10), 5 by 4 metatiles.
METATILE_BEHAVIOR_RING_LEAFOne of its leaves, metatile (5, 11).
METATILE_BEHAVIOR_MAD_PLANT_LEAFIts top left leaf, metatile (2, 10).
METATILE_BEHAVIOR_POOL60The pool of water, 2 by 4 metatiles at (16, 10).
METATILE_BEHAVIOR_CHEST100The chest, metatile (14, 9).

Definition at line 38 of file psynergy_test.c.

anonymous enum

enum { ENTRANCE_DEPART_IN_RING, ENTRANCE_ARRIVE_IN_RING }

The entrances Cyclone's spots bring the party back in by: there the leader leaves in a ring of light, or arrives in one (scInit).

EnumeratorValueDescription
ENTRANCE_DEPART_IN_RING6
ENTRANCE_ARRIVE_IN_RING8

Definition at line 69 of file psynergy_test.c.

PSYNERGY_TEST_ACTOR_ID

enum PSYNERGY_TEST_ACTOR_ID

The room's actors that run its tests, numbered in the order of ActorPlacements after the party's four rows.

EnumeratorValueDescription
ACTOR_SHOPKEEPERACTOR_FIRST_PLACEDThe four shops, one for each side he is talked to from.
ACTOR_FALLEN_MANLies on the floor; talking to him does nothing.
ACTOR_INNKEEPERLies on the floor too: the inn from the south, the Sanctum otherwise.
ACTOR_MESSAGE_BROWSERThe shops' and the Sanctum's lines, one set for each side.
ACTOR_MARS_DJINNILies on its side; Mind Read hears it.
ACTOR_WEEDSThe icon browser.
ACTOR_SPROUTIgnores Force.
ACTOR_ICE_PILLARA puddle frozen as the room starts: Isaac's name entry from the north, the item picker from elsewhere; it ignores Force, Whirlwind, Catch, Tremor and Grind.
ACTOR_FLAMEBurns; Blaze at it does nothing.
ACTOR_KRADENIn Kraden's sprite, he answers Blaze as Daila's practising man.
ACTOR_PUDDLEGrows out of the second Scoop spot.
ACTOR_WICKED_MACEThe item's icon, which drops onto the third.
ACTOR_WINGED_STATUEPlaced off the map; nothing moves it.
ACTOR_TORCHPound or A?? lights it.

Definition at line 77 of file psynergy_test.c.

Functions in detail

syImportDebugMadPlantLeap

void syImportDebugMadPlantLeap(Sint32 sprite, Sint32 x, Sint32 z)

A Mad Plant leaps at the leader (fdMadPlantLeapAtLeader, through the room's own import).

Referenced by dbPsynergyTestFightMadPlant().

Definition at line 26 of file psynergy_test.c.

dbPsynergyTestDigMetatiles

void dbPsynergyTestDigMetatiles(Sint32 stage, Sint32 srcX, Sint32 srcY, Sint32 width, Sint32 height, Sint32 destX, Sint32 destY)

As the ground opens, copies the metatiles of the hole in.

References fdMapGridCopyMetatiles() and Sint32.

Referenced by dbPsynergyTestDigUpHole().

Definition at lines 110 and 705 of file psynergy_test.c.

dbPsynergyTestGrowActor

void dbPsynergyTestGrowActor(Sint32 stage, Sint32 id, Sint32 x, Sint32 z)

As the ground opens, places the actor at (x, z) in pixels with no size; twenty ticks later, grows it to full size.

References fdActorGet(), Sint32 and sySynch().

Referenced by dbPsynergyTestDigUpPuddle().

Definition at lines 117 and 719 of file psynergy_test.c.

dbPsynergyTestDropActor

void dbPsynergyTestDropActor(Sint32 stage, Sint32 id, Sint32 x, Sint32 z)

Twenty ticks after the ground opens, drops the actor onto (x, z) in pixels from 32 pixels up.

References fdActorGet(), Sint32 and sySynch().

Referenced by dbPsynergyTestDigUpWickedMace().

Definition at lines 118 and 748 of file psynergy_test.c.

dbPsynergyTestRaiseStatue

void dbPsynergyTestRaiseStatue( Sint32 stage, Sint32 x, Sint32 z, Sint32 row, Sint32 column)

As the ground opens, places a brown boulder at (x, z) in pixels; twenty ticks later, grows a winged statue there from two fifths to full size while it turns, turns it opposite the leader's facing and starts a battle with the formation at column of encounter zone row.

References fdActorGet(), fdActorSetSpriteFlags(), fdRequestBattleFromEncounterTable(), MainRoutineStateWork, scFieldActorCreate(), Sint32 and sySynch().

Referenced by dbPsynergyTestDigUpStatue().

Definition at lines 119 and 767 of file psynergy_test.c.

dbPsynergyTestStartRings

void dbPsynergyTestStartRings(ACTOR *actor, SPARKLE_STATE *state)

Starts an actor's rings, kept in state: loads their tiles and hooks dbPsynergyTestUpdateRings to the actor.

References dbPsynergyTestUpdateRings(), fdActorGetSpritePriority(), fdEffectSpriteInit(), LightRingTiles, mnVRAMLoad(), Sint32, syVRAMCacheFindFreeEntry() and VramCacheEntries.

Referenced by dbPsynergyTestShowRings().

Definition at lines 121 and 1275 of file psynergy_test.c.

dbPsynergyTestStopRings

void dbPsynergyTestStopRings(ACTOR *actor)

Lets an actor's rings climb out.

Referenced by dbPsynergyTestShowRings().

Definition at lines 122 and 1311 of file psynergy_test.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 132 of file psynergy_test.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

Definition at line 137 of file psynergy_test.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 142 of file psynergy_test.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References ActorPlacements.

Definition at line 147 of file psynergy_test.c.

dbPsynergyTestNoOperation

void dbPsynergyTestNoOperation(void)

The script for actors and Psynergy the room leaves alone.

Referenced by SceneCues.

Definition at line 153 of file psynergy_test.c.

dbPsynergyTestOpenItemPicker

void dbPsynergyTestOpenItemPicker(void)

Opens the picker a full party drops an item with, and discards the choice.

References mnItemPickerRunToDrop() and Sint32.

Referenced by SceneCues.

Definition at line 158 of file psynergy_test.c.

dbPsynergyTestEditIsaacName

void dbPsynergyTestEditIsaacName(void)

The name entry screen for Isaac.

References mnNameEntryEditMemberName().

Referenced by SceneCues.

Definition at line 167 of file psynergy_test.c.

dbPsynergyTestIgnorePsynergy

void dbPsynergyTestIgnorePsynergy(void)

The script for Force, Whirlwind and Catch cast at the ice pillar.

Referenced by SceneCues.

Definition at line 173 of file psynergy_test.c.

dbPsynergyTestShowMessageAndWait

void dbPsynergyTestShowMessageAndWait(Sint32 msg)

Closes the finished message windows, opens the message in the window a shopkeeper's lines open (mnShopShowKeeperMessage) and waits until it is typed out, then a tick more.

References mnMessageAllTyped(), mnMessageCloseFinishedWindows(), mnMessageOpenWindow(), Sint32 and sySynch().

Referenced by dbPsynergyTestBrowseMessageRange().

Definition at line 180 of file psynergy_test.c.

dbPsynergyTestBrowseMessageRange

void dbPsynergyTestBrowseMessageRange(Sint32 msg, Sint32 count)

Browses count messages from msg: A or Down for the next, Up for the one before, B to close.

References dbPsynergyTestShowMessageAndWait(), mnMessageArgumentPush(), mnMessageCloseFinishedWindows(), mnPortraitOpenWindow(), mnWindowClose(), PerWork, Sint32 and sySynch().

Referenced by dbPsynergyTestBrowseArmorShopMessages(), dbPsynergyTestBrowseItemShopMessages(), dbPsynergyTestBrowseSanctumMessages() and dbPsynergyTestBrowseWeaponShopMessages().

Definition at line 192 of file psynergy_test.c.

dbPsynergyTestBrowseWeaponShopMessages

void dbPsynergyTestBrowseWeaponShopMessages(void)

The shop and sanctum message browsers: talking to ACTOR_MESSAGE_BROWSER from each side.

References dbPsynergyTestBrowseMessageRange() and Sint32.

Referenced by SceneCues.

Definition at line 233 of file psynergy_test.c.

dbPsynergyTestBrowseArmorShopMessages

void dbPsynergyTestBrowseArmorShopMessages(void)

Browses the armor shop's messages.

References dbPsynergyTestBrowseMessageRange() and Sint32.

Referenced by SceneCues.

Definition at line 240 of file psynergy_test.c.

dbPsynergyTestBrowseItemShopMessages

void dbPsynergyTestBrowseItemShopMessages(void)

Browses the item shop's messages.

References dbPsynergyTestBrowseMessageRange() and Sint32.

Referenced by SceneCues.

Definition at line 247 of file psynergy_test.c.

dbPsynergyTestBrowseSanctumMessages

void dbPsynergyTestBrowseSanctumMessages(void)

Browses the Sanctum's messages.

References dbPsynergyTestBrowseMessageRange() and Sint32.

Referenced by SceneCues.

Definition at line 253 of file psynergy_test.c.

dbPsynergyTestOpenWeaponShop

void dbPsynergyTestOpenWeaponShop(Sint32 keeper)

The shops: talking to ACTOR_SHOPKEEPER from each side opens Daila's weapon, armor or item shop or Izumo's general store. Each passes on the keeper's actor id.

References mnShopRun() and Sint32.

Referenced by SceneCues.

Definition at line 262 of file psynergy_test.c.

dbPsynergyTestOpenArmorShop

void dbPsynergyTestOpenArmorShop(Sint32 keeper)

Opens Daila's armor shop.

References mnShopRun() and Sint32.

Referenced by SceneCues.

Definition at line 268 of file psynergy_test.c.

dbPsynergyTestOpenItemShop

void dbPsynergyTestOpenItemShop(Sint32 keeper)

Opens Daila's item shop.

References mnShopRun() and Sint32.

Referenced by SceneCues.

Definition at line 274 of file psynergy_test.c.

dbPsynergyTestOpenGeneralStore

void dbPsynergyTestOpenGeneralStore(Sint32 keeper)

Opens Izumo's general store.

References mnShopRun() and Sint32.

Referenced by SceneCues.

Definition at line 280 of file psynergy_test.c.

dbPsynergyTestOpenInn

void dbPsynergyTestOpenInn(Sint32 keeper)

Opens Daila's inn.

References mnInnCheckIn() and Sint32.

Referenced by SceneCues.

Definition at line 286 of file psynergy_test.c.

dbPsynergyTestIgnoreTalk

void dbPsynergyTestIgnoreTalk(void)

The script for talking to ACTOR_FALLEN_MAN, which does nothing.

Referenced by SceneCues.

Definition at line 292 of file psynergy_test.c.

dbPsynergyTestRaisePartyLevels

void dbPsynergyTestRaisePartyLevels(void)

Raises Felix, Jenna and Sheba ten levels: examining METATILE_BEHAVIOR_LV_TILE.

References gmUnitGet(), gmUnitLevelUpTo(), mnMessageShowCentered() and Sint32.

Referenced by SceneCues.

Definition at line 298 of file psynergy_test.c.

dbPsynergyTestGiveTreasureTestStock

void dbPsynergyTestGiveTreasureTestStock(void)

Gives 777,777 coins and ten each of Game Tickets and Lucky Medals: examining METATILE_BEHAVIOR_TREASURE_TILE.

References gmInventoryAddItem(), gmUnitCalculate(), MainRoutineStateWork, mnMessageShowCentered() and Sint32.

Referenced by SceneCues.

Definition at line 309 of file psynergy_test.c.

dbPsynergyTestDamageAndAfflictParty

void dbPsynergyTestDamageAndAfflictParty(void)

Takes HP and PP from Felix, Jenna and Sheba, then poisons and haunts Felix and binds Jenna and gives her deadly poison: examining METATILE_BEHAVIOR_OUCH_TILE.

References gmUnitAddPp(), gmUnitCalculate(), gmUnitGet(), mnMessageShowCentered(), scFieldUnitAddHp() and Sint32.

Referenced by SceneCues.

Definition at line 329 of file psynergy_test.c.

dbPsynergyTestGiveDjinni

void dbPsynergyTestGiveDjinni(Sint32 owner, Sint32 element, Sint32 djinn, Sint32 activate)

Gives owner the Djinni djinn of element (its DJINNI_INDEX) and sets its flag; with activate 1 the Djinni is also set.

References fdScriptSetFlag(), gmDjinnGive(), gmDjinnSet() and Sint32.

Referenced by dbPsynergyTestGivePartyDjinn().

Definition at line 355 of file psynergy_test.c.

dbPsynergyTestGivePartyDjinn

void dbPsynergyTestGivePartyDjinn(void)

Gives and sets Djinn: Felix seven of Venus, Jenna seven of Mars and Sheba six of Mercury: examining METATILE_BEHAVIOR_RED_CROSS_TILE.

References dbPsynergyTestGiveDjinni(), gmUnitCalculate(), mnMessageShowCentered() and Sint32.

Referenced by SceneCues.

Definition at line 368 of file psynergy_test.c.

dbPsynergyTestSetSandLayer

void dbPsynergyTestSetSandLayer(void)

While Felix is Sand he reads his ground height from layer 2, and from layer 0 again once Sand fades.

References fdActorGetById().

Referenced by SceneCues.

Definition at line 418 of file psynergy_test.c.

dbPsynergyTestClearSandLayer

void dbPsynergyTestClearSandLayer(void)

Puts Felix back on layer 0 as Sand fades.

References fdActorGetById().

Referenced by SceneCues.

Definition at line 424 of file psynergy_test.c.

dbPsynergyTestPracticeShout

void dbPsynergyTestPracticeShout(Sint32 unused, Sint32 actor)

As Blaze reaches him, Kraden shouts and jumps to the other of his two spots, as Daila's practising man would (scDailaRoomsPracticeShout, which Daila never runs).

References fdActorFaceDirection(), fdActorWalkToAndWait(), fdScriptClearFlag(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptShowMessage(), scFieldActorJump(), scFieldActorShowEmote(), scFieldScriptSetMessageId(), scFieldScriptWait() and Sint32.

Referenced by SceneCues.

Definition at line 432 of file psynergy_test.c.

dbPsynergyTestStartleAfterBlaze

void dbPsynergyTestStartleAfterBlaze(Sint32 unused, Sint32 actor)

Once Blaze has ended, Kraden turns to Felix, startled, as Daila's practising man would (scDailaRoomsStartleAtTheLeader).

References fdActorFaceActor(), fdScriptShowMessage(), scFieldActorJump(), scFieldActorShowEmote(), scFieldScriptSetMessageId(), scFieldScriptWait() and Sint32.

Referenced by SceneCues.

Definition at line 461 of file psynergy_test.c.

dbPsynergyTestStartleAgain

void dbPsynergyTestStartleAgain(Sint32 unused, Sint32 actor)

The same, once A?? (ABILITY_ARROW, "A??" in the game's text) has ended.

References fdActorFaceActor(), fdScriptShowMessage(), scFieldActorJump(), scFieldActorShowEmote(), scFieldScriptSetMessageId(), scFieldScriptWait() and Sint32.

Referenced by SceneCues.

Definition at line 476 of file psynergy_test.c.

dbPsynergyTestLightTorch

void dbPsynergyTestLightTorch(void)

Once A?? has ended at the torch, it lights, and the 4 by 6 block of metatiles at (57, 16) is copied over the one at (25, 0).

References fdActorSetAnimation(), fdMapGridCopyMetatiles(), scFieldScriptWait() and Sint32.

Referenced by SceneCues.

Definition at line 492 of file psynergy_test.c.

dbPsynergyTestPoundTorch

void dbPsynergyTestPoundTorch(Sint32 stage)

Pound on the torch does the same as its fist lands, without the wait.

References fdActorSetAnimation(), fdMapGridCopyMetatiles() and Sint32.

Referenced by SceneCues.

Definition at line 505 of file psynergy_test.c.

dbPsynergyTestBlowAwayLeaves

void dbPsynergyTestBlowAwayLeaves(void)

Cyclone at the patch of leaves blows them away: each metatile of the patch it touched takes its picture from the same place of the bare block at (34, 26).

References scFieldTileCopiesCopyTouchedMetatiles() and Sint32.

Referenced by SceneCues.

Definition at line 521 of file psynergy_test.c.

dbPsynergyTestDepartInRing

void dbPsynergyTestDepartInRing(void)

Cyclone at METATILE_BEHAVIOR_RING_LEAF blows the leaves away too, then brings the party back in by ENTRANCE_DEPART_IN_RING.

References fdScriptSetDestination() and scFieldTileCopiesCopyTouchedMetatiles().

Referenced by SceneCues.

Definition at line 536 of file psynergy_test.c.

dbPsynergyTestArriveInRing

void dbPsynergyTestArriveInRing(void)

Cyclone at METATILE_BEHAVIOR_RED_CROSS_TILE brings the party back in by ENTRANCE_ARRIVE_IN_RING.

References fdScriptSetDestination().

Referenced by SceneCues.

Definition at line 544 of file psynergy_test.c.

dbPsynergyTestFightMadPlant

void dbPsynergyTestFightMadPlant(void)

Cyclone at METATILE_BEHAVIOR_MAD_PLANT_LEAF: a Mad Plant leaps at the leader, and a battle with no escape starts, ENCOUNTER_ZONE_WORLD_MAP_BEACH_AND_GRASSLAND's first formation, one or two Giant Bats.

References fdRequestBattleFromEncounterTable(), MainRoutineStateWork and syImportDebugMadPlantLeap().

Referenced by SceneCues.

Definition at line 553 of file psynergy_test.c.

dbPsynergyTestDigUpHole

void dbPsynergyTestDigUpHole(Sint32 stage)

The four Scoop spots, the grass patches set corner to corner east of the leaves, each run while its flag is clear. This one opens a hole, whose floor is METATILE_BEHAVIOR_HOLE_EXIT.

References dbPsynergyTestDigMetatiles(), fdScriptSetFlag() and Sint32.

Referenced by SceneCues.

Definition at line 564 of file psynergy_test.c.

dbPsynergyTestDigUpPuddle

void dbPsynergyTestDigUpPuddle(Sint32 stage)

The Scoop spot that digs up a puddle, which grows out of the ground.

References dbPsynergyTestGrowActor(), fdScriptSetFlag() and Sint32.

Referenced by SceneCues.

Definition at line 571 of file psynergy_test.c.

dbPsynergyTestDigUpWickedMace

void dbPsynergyTestDigUpWickedMace(Sint32 stage)

The Scoop spot that digs up a Wicked Mace, which drops onto it.

References dbPsynergyTestDropActor(), fdScriptSetFlag() and Sint32.

Referenced by SceneCues.

Definition at line 578 of file psynergy_test.c.

dbPsynergyTestDigUpStatue

void dbPsynergyTestDigUpStatue(Sint32 stage)

The Scoop spot that raises a statue, then a battle.

References dbPsynergyTestRaiseStatue(), fdScriptSetFlag() and Sint32.

Referenced by SceneCues.

Definition at line 585 of file psynergy_test.c.

dbPsynergyTestPickUpItem

void dbPsynergyTestPickUpItem(void)

Talking to the Wicked Mace picks it up.

References fdActorGet() and fdScriptPickUpItem().

Referenced by SceneCues.

Definition at line 593 of file psynergy_test.c.

dbPsynergyTestParchMetatiles

void dbPsynergyTestParchMetatiles(void)

Parch at the pool dries it, copying in the dry metatiles at (48, 26).

References fdMapGridCopyMetatiles() and Sint32.

Referenced by SceneCues.

Definition at line 601 of file psynergy_test.c.

dbPsynergyTestIgnoreTremor

void dbPsynergyTestIgnoreTremor(void)

Tremor's script, which does nothing.

Referenced by SceneCues.

Definition at line 612 of file psynergy_test.c.

dbPsynergyTestIgnoreGrind

void dbPsynergyTestIgnoreGrind(void)

Grind's script, which does nothing.

Referenced by SceneCues.

Definition at line 617 of file psynergy_test.c.

dbPsynergyTestShowRings

void dbPsynergyTestShowRings(Sint32 actor)

Talking to Mia: rings of light rise around her and the leader for 100 ticks.

References dbPsynergyTestStartRings(), dbPsynergyTestStopRings(), fdActorGet(), MainRoutineStateWork, PsynergyTestLeaderRings, PsynergyTestTargetRings, Sint32 and sySynch().

Referenced by SceneCues.

Definition at line 622 of file psynergy_test.c.

scGetCues

const CUE *scGetCues(void)

References SceneCues.

Definition at line 632 of file psynergy_test.c.

scInit

Sint32 scInit(void)

Sets the shops' rare stock, freezes the puddle, lays the fallen actors down, puts back what the Scoop spots and the Wicked Mace have already done, and sends the leader away or brings it in by ring at the entrances for them.

References Call2(), Call3(), fdActorAppearInWhirlwind(), fdActorDescendInWhirlwind(), fdActorFallOverById(), fdActorFallOverWithAnimationById(), fdActorGet(), fdActorSetAnimation(), fdActorSetItemIcon(), fdMapGridCopyMetatiles(), fdScriptGetFlag(), gmItemAdjustRareItemStock(), MainRoutineStateWork and Sint32.

Definition at line 640 of file psynergy_test.c.

scPrepareMap

Sint32 scPrepareMap(void)

References Sint32.

Definition at line 687 of file psynergy_test.c.

dbPsynergyTestOpenIconBrowser

void dbPsynergyTestOpenIconBrowser(void)

Opens the icon browser.

References mnDebugBrowserIcons().

Referenced by SceneCues.

Definition at line 693 of file psynergy_test.c.

dbPsynergyTestOpenSanctum

void dbPsynergyTestOpenSanctum(Sint32 keeper)

Opens the Sanctum.

References mnSanctumRun() and Sint32.

Referenced by SceneCues.

Definition at line 699 of file psynergy_test.c.

dbPsynergyTestUpdateRings

void dbPsynergyTestUpdateRings(ACTOR *actor)

Each tick of an actor's rings: a ring climbs RING_CLIMB pixels up the actor, swelling and shrinking as it goes, and the next starts with a chime RING_INTERVAL ticks later, two at a time, while the actor's colours cycle. Once stopped, the rings climb out and the actor's colours come back.

References fdActorGetSpriteDepth(), fdActorSetSpriteColorMode(), fdCameraWorldToScreen(), fdEffectSpriteDraw(), fdScriptPlaySound(), Sint32, sySin() and syVRAMCacheFreeEntry().

Referenced by dbPsynergyTestStartRings().

Definition at line 816 of file psynergy_test.c.

Variables in detail

PsynergyTestLeaderRings

SPARKLE_STATE PsynergyTestLeaderRings

Referenced by dbPsynergyTestShowRings().

Definition at line 128 of file psynergy_test.c.

PsynergyTestTargetRings

SPARKLE_STATE PsynergyTestTargetRings

Referenced by dbPsynergyTestShowRings().

Definition at line 129 of file psynergy_test.c.

SceneEntrances

SCENE_ENTRANCE SceneEntrances[]

Referenced by scGetEntrances().

Definition at line 897 of file psynergy_test.c.

ActorPlacements

ACTOR_PLACE ActorPlacements[]

The room's people: the party's four rows, then PSYNERGY_TEST_ACTOR_ID's.

Referenced by scGetActorPlacements().

Definition at line 915 of file psynergy_test.c.

SceneCues

CUE SceneCues[]

The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers.

References dbPsynergyTestArriveInRing(), dbPsynergyTestBlowAwayLeaves(), dbPsynergyTestBrowseArmorShopMessages(), dbPsynergyTestBrowseItemShopMessages(), dbPsynergyTestBrowseSanctumMessages(), dbPsynergyTestBrowseWeaponShopMessages(), dbPsynergyTestClearSandLayer(), dbPsynergyTestDamageAndAfflictParty(), dbPsynergyTestDepartInRing(), dbPsynergyTestDigUpHole(), dbPsynergyTestDigUpPuddle(), dbPsynergyTestDigUpStatue(), dbPsynergyTestDigUpWickedMace(), dbPsynergyTestEditIsaacName(), dbPsynergyTestFightMadPlant(), dbPsynergyTestGivePartyDjinn(), dbPsynergyTestGiveTreasureTestStock(), dbPsynergyTestIgnoreGrind(), dbPsynergyTestIgnorePsynergy(), dbPsynergyTestIgnoreTalk(), dbPsynergyTestIgnoreTremor(), dbPsynergyTestLightTorch(), dbPsynergyTestNoOperation(), dbPsynergyTestOpenArmorShop(), dbPsynergyTestOpenGeneralStore(), dbPsynergyTestOpenIconBrowser(), dbPsynergyTestOpenInn(), dbPsynergyTestOpenItemPicker(), dbPsynergyTestOpenItemShop(), dbPsynergyTestOpenSanctum(), dbPsynergyTestOpenWeaponShop(), dbPsynergyTestParchMetatiles(), dbPsynergyTestPickUpItem(), dbPsynergyTestPoundTorch(), dbPsynergyTestPracticeShout(), dbPsynergyTestRaisePartyLevels(), dbPsynergyTestSetSandLayer(), dbPsynergyTestShowRings(), dbPsynergyTestStartleAfterBlaze() and dbPsynergyTestStartleAgain().

Referenced by scGetCues().

Definition at line 1092 of file psynergy_test.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailFLAG_HOLE_DUGFLAG_PUDDLE_DUGFLAG_WICKED_MACE_DUGFLAG_STATUE_DUGFLAG_WICKED_MACE_TAKENFLAG_KRADEN_MOVEDEnumerations in detailPSYNERGY_TEST_METATILE_BEHAVIORanonymous enumPSYNERGY_TEST_ACTOR_IDFunctions in detailsyImportDebugMadPlantLeapdbPsynergyTestDigMetatilesdbPsynergyTestGrowActordbPsynergyTestDropActordbPsynergyTestRaiseStatuedbPsynergyTestStartRingsdbPsynergyTestStopRingsscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsdbPsynergyTestNoOperationdbPsynergyTestOpenItemPickerdbPsynergyTestEditIsaacNamedbPsynergyTestIgnorePsynergydbPsynergyTestShowMessageAndWaitdbPsynergyTestBrowseMessageRangedbPsynergyTestBrowseWeaponShopMessagesdbPsynergyTestBrowseArmorShopMessagesdbPsynergyTestBrowseItemShopMessagesdbPsynergyTestBrowseSanctumMessagesdbPsynergyTestOpenWeaponShopdbPsynergyTestOpenArmorShopdbPsynergyTestOpenItemShopdbPsynergyTestOpenGeneralStoredbPsynergyTestOpenInndbPsynergyTestIgnoreTalkdbPsynergyTestRaisePartyLevelsdbPsynergyTestGiveTreasureTestStockdbPsynergyTestDamageAndAfflictPartydbPsynergyTestGiveDjinnidbPsynergyTestGivePartyDjinndbPsynergyTestSetSandLayerdbPsynergyTestClearSandLayerdbPsynergyTestPracticeShoutdbPsynergyTestStartleAfterBlazedbPsynergyTestStartleAgaindbPsynergyTestLightTorchdbPsynergyTestPoundTorchdbPsynergyTestBlowAwayLeavesdbPsynergyTestDepartInRingdbPsynergyTestArriveInRingdbPsynergyTestFightMadPlantdbPsynergyTestDigUpHoledbPsynergyTestDigUpPuddledbPsynergyTestDigUpWickedMacedbPsynergyTestDigUpStatuedbPsynergyTestPickUpItemdbPsynergyTestParchMetatilesdbPsynergyTestIgnoreTremordbPsynergyTestIgnoreGrinddbPsynergyTestShowRingsscGetCuesscInitscPrepareMapdbPsynergyTestOpenIconBrowserdbPsynergyTestOpenSanctumdbPsynergyTestUpdateRingsVariables in detailPsynergyTestLeaderRingsPsynergyTestTargetRingsSceneEntrancesActorPlacementsSceneCues