30#include "text/msg_ids.h"
37#define ITEM_DEBUG_DETAILS_WIDTH 28
38#define ITEM_DEBUG_DRAW_ITEM_NAME UiText_DrawCharacterAtOffset
40#define ITEM_DEBUG_DETAILS_WIDTH 13
41#define ITEM_DEBUG_DRAW_ITEM_NAME UiText_DrawResource
45#define ABILITY_COUNT 270
46#define BROWSER_ROW_STEP 10
47#define BROWSER_PAGE_STEP 30
94 remaining = ownerCount;
97 }
while (--remaining != 0);
112 messageId = MsgDebugRaiseEveryonesLevel;
167 s32 messageOrDefinitionId;
187 selectedItemId = (selectedItemId +
ITEM_COUNT) % entryCount;
194 messageOrDefinitionId = selectedItemId & 0x1ff;
254 if (seekDirection == -1) {
255 selectedItemId = (selectedItemId +
ITEM_COUNT) % entryCount;
258 selectedItemId = (selectedItemId +
ITEM_COUNT - 1) % entryCount;
263 if (seekDirection == 1) {
264 selectedItemId = (selectedItemId +
ITEM_COUNT) % entryCount;
267 selectedItemId = (selectedItemId +
ITEM_COUNT + 1) % entryCount;
291 s32 selectedAbilityId;
293 s32 messageOrDefinitionId;
299 selectedAbilityId = 1;
312 selectedAbilityId = (selectedAbilityId +
ABILITY_COUNT) % entryCount;
318 messageOrDefinitionId = selectedAbilityId & 0x3fff;
321 messageOrDefinitionId += MsgAbilityDescription;
366 if (seekDirection == -1) {
367 selectedAbilityId = (selectedAbilityId +
ABILITY_COUNT) % entryCount;
370 selectedAbilityId = (selectedAbilityId +
ABILITY_COUNT - 1) % entryCount;
375 if (seekDirection == 1) {
376 selectedAbilityId = (selectedAbilityId +
ABILITY_COUNT) % entryCount;
379 selectedAbilityId = (selectedAbilityId +
ABILITY_COUNT + 1) % entryCount;
424static void ItemLevel_RunMotionTest(
void) {
471#if (LANGUAGE != LANGUAGE_JAPANESE)
475#if (LANGUAGE != LANGUAGE_JAPANESE)
479#if (LANGUAGE != LANGUAGE_JAPANESE)
483#if (LANGUAGE != LANGUAGE_JAPANESE)
487#if (LANGUAGE != LANGUAGE_JAPANESE)
492 {0,
CONDITION_ALWAYS, 824, 0, 864,
FACING_NORTH, 0, 280, 504, 912, 896, 0},
511#elif TBS_PATCH_1 && !TBS_PATCH_3
void ObjectMotion_WaitForAnimationChange(u32 objectId)
Waits, at most 90 frames, for an actor's animation to change.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
The engine calls the debug menus import, and their palette swatch tiles.
void Engine_DebugClearWindow(struct UiWindow *window)
void Engine_DebugDrawItemDetails(struct UiWindow *window, s32 item)
struct ItemDefinition * Engine_DebugGetItem(s32 item)
u8 * Engine_DebugGetAbility(s32 ability)
DMA channel registers, and the DMA and CPU fills.
static __inline__ void Dma_Set(const volatile void *source, volatile void *destination, u32 control, volatile u32 *channel)
Starts a DMA transfer: stores the source, destination and control words into channel's registers with...
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
static s32 FieldParty_ListActiveOwners(s16 *owners)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
Field objects and actors, and the scene transition styles.
#define SCENE_TRANSITION(style, variant)
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
BattleFxScene, the work of a battle or field Psynergy effect scene, and its arc objects.
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
void * gEffectWork
Slot 56: points to a scene-specific structure.
The screen blend's globals and the graphics routines.
s32 PartyInventory_HasSpace(void)
Returns 1 when the selected character or any party member has a free inventory slot.
s32 PartyInventory_Add(s32 itemId)
Gives the item to the first party member with room.
gOverflowItem, an item slot the spoils code uses when items are handed out.
The hardware's I/O registers and their bits, as pret names them.
#define BG_PLTT_COLOR(palette, color)
Items: their definitions, types, flags and effects.
The keypad state the VBlank interrupt keeps.
volatile u32 gKeysPressed
Keys that went down this frame.
volatile u32 gKeysRepeat
Pressed keys, repeating while held: after 19 frames, then every 6.
static void ItemLevel_SelectItem(void)
Browses nonempty item definitions and gives the selected item to the party.
static int ItemLevel_OpenGlyphBrowser(void)
Returns the entry-glyph browser's status to the event dispatcher.
char gItemLevelItemFull[20]
struct ScenePlacement gItemLevelPlacements[]
static void ItemLevel_EnableEffectChildMode(void)
char gItemLevelPsyHelp[12]
static void ItemLevel_AdjustPartyLevels(s32 amount)
Applies the level change to the owners returned by the active-party service.
struct SceneEntrance gItemLevelEntrances[]
char gItemLevelGlyphsUpper[28]
u8 * ItemLevel_GetPlacements(void)
#define ITEM_DEBUG_DETAILS_WIDTH
#define BROWSER_PAGE_STEP
s32 FieldScene_RunEntrySetup(void)
Starts the window transition and edition-specific actor scale/animation setup.
static void ItemLevel_ShowEmoteThenMessage(void)
Displays the other test emote before setting actor 13's message.
static void ItemLevel_ShowMessageThenEmote(void)
Sets the test message before displaying the first emote on actor 13.
struct SceneEvent gItemLevelEvents[]
static void ItemLevel_ShowGlyphCaptions(void)
Displays the three character-set caption rows in a debug window.
s32 SceneData_ReturnZero(void)
static UNUSED void ItemLevel_SelectAbility(void)
Browses ability names and descriptions, skipping unavailable entries.
u8 * ItemLevel_GetEvents(void)
static int ItemLevel_OpenIconBrowser(void)
Returns the icon browser's status to the event dispatcher.
static void ItemLevel_RunLevelEditor(void)
Displays the selected owner's level and changes all active owners.
char gItemLevelItemHelp[24]
char gItemLevelLvLabel[4]
char gItemLevelItemPrompt[12]
u8 * ItemLevel_GetEntrances(void)
char gItemLevelGlyphsLower[28]
char gItemLevelPsyPrompt[8]
#define ITEM_DEBUG_DRAW_ITEM_NAME
static void ItemLevel_AdjustOwnerLevel(s32 ownerId, s32 amount)
Raises one owner's level by amount, then recalculates that unit.
static UNUSED void ItemLevel_RequestExit(void)
Requests a window-style exit with variant one over 24 frames.
char gItemLevelGlyphsMarks[12]
u8 * ItemLevel_GetExits(void)
void Unit_LevelUpTo(s32 owner, s32 targetLevel)
Levels character owner up one level at a time until targetLevel, then recomputes its stats.
The reel game's title lettering.
Declares nothing of its own: it only includes static_assert.h and game_state.h.
Song and sound effect ids, indices into gSound_SongTable.
#define SE_MENU_CURSOR_MOVE
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_EventSetMessage()
void Engine_EventShowMessage()
The work of a Psynergy effect scene: its caster and target, where it takes place, the map state it re...
s8 childMode
set by some scenes: Frost and Force leave the target be
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
u8 name[0x0f]
The name, one byte a character, ending in 0.
u8 level
1 to 99 for a character
s32 startTransition
SCENE_TRANSITION(style, variant).
s32 transitionFrames
frames
s32 scaleX
16.16 fixed point, 0x10000 full size
s32 scaleY
16.16 fixed point, 0x10000 full size
s32 selectedActor
the leader: its unit and its actor
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
Declares nothing of its own: it only includes edition.h and render_input.h.
void UiText_DrawStringInWindow(const u8 *text, struct UiWindow *window, u32 x, u32 y)
Draws a byte string into a window's tilemap at pixel (x, y) of its interior, rounded down to tiles.
void UiText_DrawResource(s32 message, struct UiWindow *window, s32 x, s32 y)
Decodes a message and draws it into a text canvas window at pixel (x, y).
void UiText_DrawStringAtOffset(const u8 *text, const struct UiWindow *work, s32 offsetX, s32 offsetY)
Draws a byte string as tiles in window work at pixel (offsetX, offsetY) of its interior.
void UiText_DrawNumberInWindow(s32 value, s32 width, struct UiWindow *window, s32 x, s32 y)
Draws a number (width as UiText_FormatNumber) into a window's tilemap at pixel (x,...
void UiText_DrawNumberAtOffset(s32 value, s32 width, const struct UiWindow *window, s32 x, s32 y)
Draws a number (width as UiText_FormatNumber) as tiles in a window at pixel (x, y) of its interior.
void UiText_DrawCharacterAtOffset(s32 message, const struct UiWindow *window, u32 offsetX, u32 offsetY)
Decodes a message and draws it as tiles in a window at pixel (offsetX, offsetY) of its interior.
The integer types, TRUE, UNUSED and the fixed-address macros.
Declares nothing of its own: it only includes edition.h and uiwindow.h.
void UnitCalc(s32 owner)
Recomputes a unit's stats from its base stats, equipment, set Djinn, class and battle stat levels,...
struct BattleUnit * UnitGet(u32 owner)
Returns the unit record of owner: 0 to 7 are the playable characters in the game state,...
s32 DebugMenu_BrowseIcons(void)
Browses pages of item, Psynergy and status-pattern icons, suspending the menu controller while the br...
s32 DebugMenu_BrowseEntryGlyphs(void)
Browses the character and sprite portrait maps as one circular list.
void UiWork_Finalize(struct UiWindow *window, s32 instant)
Closes a window: clears its contents and remembers its last rectangle.
void RenderOutput_RedrawSavedRect(struct UiWindow *window)
Redraws a window's empty frame at its current rectangle.
struct UiWindow * UiWindow_Create(s32 x, s32 y, s32 width, s32 height, s32 attrs)
Opens a window at tile (x, y) of width by height tiles in the first free window slot,...