Alchemy

debug

games/tbs/src/debug on GitHub

The Debug rooms guide explains this folder.

level.c

games/tbs/src/debug/level.c

Functions

ItemLevel_ShowMessageThenEmote

static void ItemLevel_ShowMessageThenEmote(void)

Sets the test message before displaying the first emote on actor 13. The emote's actual type remains unnamed.

Used by gItemLevelEvents.

Line 60

ItemLevel_ShowEmoteThenMessage

static void ItemLevel_ShowEmoteThenMessage(void)

Displays the other test emote before setting actor 13's message.

Used by gItemLevelEvents.

Line 67

ItemLevel_AdjustOwnerLevel

static void ItemLevel_AdjustOwnerLevel(s32 ownerId, s32 amount)

Raises one owner's level by amount, then recalculates that unit.

Used by ItemLevel_AdjustPartyLevels.

Line 77

ItemLevel_AdjustPartyLevels

static void ItemLevel_AdjustPartyLevels(s32 amount)

Applies the level change to the owners returned by the active-party service.

Used by ItemLevel_RunLevelEditor.

Line 85

ItemLevel_RunLevelEditor

static void ItemLevel_RunLevelEditor(void)

Displays the selected owner's level and changes all active owners. B closes the window and recalculates the original four heroes.

Used by gItemLevelEvents.

Line 103

ItemLevel_SelectItem

static void ItemLevel_SelectItem(void)

Browses nonempty item definitions and gives the selected item to the party.

Used by gItemLevelEvents.

Line 159

ItemLevel_SelectAbility

UNUSED static void ItemLevel_SelectAbility(void)

Browses ability names and descriptions, skipping unavailable entries. B closes the sole window created by this browser.

Used by gItemLevelEvents.

Line 284

ItemLevel_RequestExit

UNUSED static void ItemLevel_RequestExit(void)

Requests a window-style exit with variant one over 24 frames.

Line 399

FieldScene_RunEntrySetup

s32 FieldScene_RunEntrySetup(void)

Starts the window transition and edition-specific actor scale/animation setup. Returns zero through the exported scene entry.

Line 407

ItemLevel_RunMotionTest

static void ItemLevel_RunMotionTest(void)

Runs the Japanese animation test, then moves actor 11 to its test position.

Used by gItemLevelEvents.

Line 424

ItemLevel_ShowGlyphCaptions

static void ItemLevel_ShowGlyphCaptions(void)

Displays the three character-set caption rows in a debug window.

Used by gItemLevelEvents.

Line 436

ItemLevel_OpenIconBrowser

static int ItemLevel_OpenIconBrowser(void)

Returns the icon browser's status to the event dispatcher.

Used by gItemLevelEvents.

Line 456

ItemLevel_OpenGlyphBrowser

static int ItemLevel_OpenGlyphBrowser(void)

Returns the entry-glyph browser's status to the event dispatcher.

Used by gItemLevelEvents.

Line 459

Also, functions without a comment: ItemLevel_GetEntrances, SceneData_ReturnZero, ItemLevel_GetExits, ItemLevel_GetPlacements, ItemLevel_GetEvents, ItemLevel_EnableEffectChildMode.

Macros, without a comment: ITEM_DEBUG_DETAILS_WIDTH, ITEM_DEBUG_DRAW_ITEM_NAME, ITEM_DEBUG_DETAILS_WIDTH, ITEM_DEBUG_DRAW_ITEM_NAME, ITEM_COUNT, ABILITY_COUNT, BROWSER_ROW_STEP, BROWSER_PAGE_STEP.

Globals, without a comment: gItemLevelLvLabel, gItemLevelItemPrompt, gItemLevelItemHelp, gItemLevelItemFull, gItemLevelPsyPrompt, gItemLevelPsyHelp, gItemLevelGlyphsUpper, gItemLevelGlyphsLower, gItemLevelGlyphsMarks, gItemLevelEntrances, gItemLevelExits, gItemLevelPlacements, gItemLevelEvents.

level.h

games/tbs/src/debug/level.h

Globals, without a comment: gEventWork.

Declarations, without a comment: Engine_ActorSetAnimation, Engine_ActorShowEmote, Engine_EventBegin, Engine_EventEnd, Engine_ActorSetPosition, Engine_EventSetMessage, Engine_EventShowMessage, Engine_EventRequestExit, Engine_AudioPlayCue, Engine_TaskWait.

games/tbs/src/debug/menu_test.h

rooms.c

games/tbs/src/debug/rooms.c

Functions

TestRooms_GetPlacements

u8 *TestRooms_GetPlacements(void)

Places one Djinni of each element in the test room.

Line 27

TestRooms_GiveDjinniForTesting

static __inline__ void TestRooms_GiveDjinniForTesting(s32 actorId, s32 element)

Grants the first Djinni of an element, then clears its found flag for testing.

Used by TestRooms_ReceiveFizz, TestRooms_ReceiveFlint, TestRooms_ReceiveForge, TestRooms_ReceiveGust.

Line 31

TestRooms_GetEvents

u8 *TestRooms_GetEvents(void)

Bind each Djinni actor to its test grant callback.

Line 54

Also, functions without a comment: TestRooms_GetEntrances, SceneData_ReturnZero, TestRooms_GetExits, TestRooms_ReceiveFlint, TestRooms_ReceiveFizz, TestRooms_ReceiveForge, TestRooms_ReceiveGust, Scene_RunEmptyScene.

Globals, without a comment: gTestRooms_EntrancesHead, gTestRooms_Entrances, gTestRooms_Exits, gTestRooms_Placements, gTestRooms_Events.

test.c

games/tbs/src/debug/test.c

Functions

DebugMenu_RecalculateParty

static __inline__ void DebugMenu_RecalculateParty(void)

Recalculates the four heroes after a debug inventory or stat change. Preserve the original Isaac, Garet, Mia, Ivan order.

Used by CommandTable_ConfigureCommandList, DebugMenu_DamageAndAfflictParty, DebugMenu_GiveConsumableTestStock, DebugMenu_GiveEquipmentTestStock, DebugMenu_GivePartyDjinn, DebugMenu_GiveTreasureTestStock, DebugMenu_RaisePartyLevels.

Line 49

SceneDialogue_ShowMessageAndWait

static void SceneDialogue_ShowMessageAndWait(s32 messageId)

Finishes pending UI work, displays a message, and waits one final frame.

Used by DebugMenu_BrowseMessageRange.

Line 66

DebugMenu_BrowseMessageRange

static void DebugMenu_BrowseMessageRange(s32 messageId, s32 messageCount)

Browses sample dialogue with A/Down and Up; B closes the window. Other held keys finish the current iteration without a wait.

Used by DebugMenu_BrowseArmorShopMessages, DebugMenu_BrowseItemShopMessages, DebugMenu_BrowseSanctumMessages, DebugMenu_BrowseWarriorArmorShopMessages, DebugMenu_BrowseWarriorItemShopMessages, DebugMenu_BrowseWarriorShopMessages, DebugMenu_BrowseWeaponShopMessages.

Line 77

DebugMenu_RunMessageTest

static void DebugMenu_RunMessageTest(void)

Submits two sample messages, then waits for the battle message service.

Used by gMenuTest_Events.

Line 151

DebugMenu_RunPresetShop

static void DebugMenu_RunPresetShop(void)

Runs the shop test's preset inventory, money and ailment setup.

Used by gMenuTest_Events.

Line 159

DebugMenu_TestItemSelection

static void DebugMenu_TestItemSelection(void)

Opens the shop inventory selector and discards its selected owner and slot.

Used by gMenuTest_Events.

Line 166

DebugMenu_IgnorePsynergy

static void DebugMenu_IgnorePsynergy(void)

Leaves the test actor unchanged when targeted by Psynergy.

Used by gMenuTest_Events.

Line 175

DebugMenu_GiveItemToParty

UNUSED static void DebugMenu_GiveItemToParty(void)

Gives a Nut through the ordinary party gift and full-inventory dialogue.

Used by gMenuTest_Events.

Line 183

DebugMenu_RaisePartyLevels

static void DebugMenu_RaisePartyLevels(void)

Levels the four heroes to the current debug target, then raises it by ten.

Used by gMenuTest_Events.

Line 191

DebugMenu_GiveConsumableTestStock

static void DebugMenu_GiveConsumableTestStock(void)

Attempts each consumable grant in order, including calls after a bag fills.

Used by gMenuTest_Events.

Line 205

DebugMenu_GivePartyDjinn

static void DebugMenu_GivePartyDjinn(void)

Runs the Japanese text-buffer benchmark, then grants and sets test Djinn. Ivan receives six Jupiter Djinn; the other heroes receive seven.

Used by gMenuTest_Events.

Line 405

DebugMenu_DamageAndAfflictParty

static void DebugMenu_DamageAndAfflictParty(void)

Reduces HP and PP, then poisons and haunts Isaac and binds and venoms Garet.

Used by gMenuTest_Events.

Line 487

DebugMenu_GiveEquipmentTestStock

static void DebugMenu_GiveEquipmentTestStock(void)

Adds the test equipment in each owner's original inventory order.

Used by gMenuTest_Events.

Line 513

DebugMenu_SelectItem

static void DebugMenu_SelectItem(void)

Browses item definitions and gives the selected item while party bags allow it.

Used by DebugMenu_OpenItemBrowser.

Line 554

DebugMenu_GiveTreasureTestStock

static void DebugMenu_GiveTreasureTestStock(void)

Adds the original treasure test stock, retaining duplicate tickets and medals.

Used by gMenuTest_Events.

Line 649

CommandTable_ConfigureCommandList

s32 CommandTable_ConfigureCommandList(void)

Sets the debug party, stock counters and levels; returns zero.

Line 701

DebugMenu_OpenIconBrowser

static s32 DebugMenu_OpenIconBrowser(void)

Returns the icon browser's status to the event dispatcher.

Used by gMenuTest_Events.

Line 738

DebugMenu_SelectCharacter

static s32 DebugMenu_SelectCharacter(void)

Returns the Japanese character selector's status.

Used by gMenuTest_Events.

Line 742

DebugMenu_ConfirmShopAction

static s32 DebugMenu_ConfirmShopAction(s32 unitId)

Forwards the selected owner and shop confirmation status.

Used by gMenuTest_Events.

Line 749

Also, functions without a comment: MenuTest_GetEntrances, SceneData_ReturnZero, MenuTest_GetExits, MenuTest_GetPlacements, DebugMenu_BrowseWeaponShopMessages, DebugMenu_BrowseArmorShopMessages, DebugMenu_BrowseItemShopMessages, DebugMenu_BrowseSanctumMessages, DebugMenu_BrowseWarriorShopMessages, DebugMenu_BrowseWarriorArmorShopMessages, DebugMenu_BrowseWarriorItemShopMessages, DebugMenu_NoOp, DebugMenu_EditIsaacName, DebugMenu_EnableEffectChildMode, MenuTest_GetEvents, DebugMenu_OpenItemBrowser.

Macros

DEBUG_ITEM_COUNT

#define DEBUG_ITEM_COUNT 270

The debug item browser covers IDs 0 through 269.

Used by DebugMenu_SelectItem.

Line 43

Also, macros without a comment: DEBUG_ITEM_ROW_STEP, DEBUG_ITEM_PAGE_STEP.

Globals, without a comment: gDebugItemPromptHead, gDebugItemPrompt, gDebugItemCapacityLabel, gDebugItemFullLabel, gMenuTest_Entrances, gMenuTest_Exits, gMenuTest_Placements, gMenuTest_Events, gMenuTest_SlotOffsets, gMenuTest_BenchmarkCharacter.

On this page