Skip to Content
The Alchemy Project

Structures

Every structure and union of The Broken Seal, with its brief.

A

B

C

  • CAVE_DUST_OPTIONS: The fields of EFFECT_OPTIONS that the dragon's fire sets, up to its scales, passed to scImilFuchinFallsSpawnDust in their place.
  • CHARACTER_DEFINITION: A character's definition: the growth curves of its stats, its element bonus, starting level and starting equipment.
  • CLASS_ABILITY: An ability a class teaches, and the level it is learned at.
  • CLASS_DEFINITION: A class: its series, the element levels it needs, its stat multipliers and the abilities it teaches.
  • COLOSSO_GAUGE_SPR: One sprite of the race gauge's list: a link word, its position and shape attributes, and its tile.
  • COLOSSO_GAUGE_STATE: The Colosso race gauge's state at the start of the race's heap slot (HEAP_SLOT_COLOSSO_RACE): its sprites, how far it has slid down, the racers and the finish.
  • COLOSSO_RACE_STATE: The race's state in HEAP_SLOT_COLOSSO_RACE, allocated whole when the gauge starts: the gauge, then the opponent's path.
  • CREDITS_OAM_ENTRY: One eight-byte OAM entry in the credits' private sprite buffer.
  • CROSSBONE_ISLE_PILLAR_METATILE: A copied map metatile, also read in the two flag pairs the pillar redraw keeps.
  • CUE: A cue: its kind and detail, the subject it answers, its condition and its value (a message or a script).
  • CURSOR_SPR: Unused: MENU_SPR's layout with its OAM fields named directly, for a sprite whose attributes are never written as words; nothing in the game declares one.

D

E

F

  • FIELD_BLEND_STATE: The storm's lightning state: the colours it flashes between and their difference, the countdown to the next flash and whether the thunder is loud.
  • FIELD_COORDINATE: A field coordinate, read whole or as its fraction and its whole pixels.
  • FIELD_EFFECT: A field effect: a small actor on the field that moves at its velocity and grows and spins at its rates, run by its script and update function.
  • FIELD_EFFECT_STATE: The state of a field Psynergy: its caster and target, where it takes place, the map state it restores and its 24 field effect sprites.
  • FIELD_PARTICLE: A particle a field Psynergy moves and draws: its sprite, its position and target, its speed, scale and heading, and its per-tick function.
  • FIELD_POS: A position on the field.
  • FIELD_STATE: A field scene's state: fdEngineRun allocates it in heap slot HEAP_SLOT_FIELD, zeroes it and frees it on the way out, and the field engine, the script commands and the scene overlays all reach it through FieldStateWork.
  • FILE_LIST_STATE: The menus' state (heap slot HEAP_SLOT_MENU) as the file list reads it: the party row and the four Djinn sprites of the file under the cursor.
  • FILE_SCREEN_LOADED_SCENE_STATE: The loaded file's scene state as Continue reads it: the play time it holds must match the file's own, or the data is corrupted.
  • FLOODGATE_LOG: A log's saved record: its sprite, first map metatile and orientation, then its actor once created.
  • FORMATION: An enemy formation: its battle type and up to five kinds of enemy, each with the fewest and most of it that appear.
  • FORMATION_CANDIDATE: A formation that may be chosen for the party's level, with its enemies' average level.

G

  • GLYPH: A character of the text font: its width and its rows of pixels.
  • GLYPH_RECT: A 16-byte rectangle.
  • GROUND_MASK_STATE: The ground mask: where the ground just south of an actor rises above its floor (a ledge, the rim of a sunken floor), a 16-pixel square on each side of it is drawn over what of it the ground should stand in front of: beside a ledge in the Kalay Tunnel's treasure room, Isaac shows from the waist up.
  • GROWING_COLUMN: One growing column, laid over a PARTICLE in state->particles.

H

  • HEAP_STATE: The heap's 64 slots, the first two holding the next free EWRAM and IWRAM addresses.

I

L

M

  • MAIN_ROUTINE_STATE: The main routine's state: the transition data the main routine reads between engines (the scene and entrance it runs next, engineResult, the return point, the after-battle and defeat destinations and the restart point), and what every engine shares (the party, coins, Djinn, play time and options).
  • MAP_EDIT: A map edit, such as a door opening: its steps and the metatile they are copied to (fdMapGridPlayMapEdit, which blocks until the last).
  • MAP_EDIT_STEP: One step of a map edit, such as a door drawn opening a frame at a time: the rectangle of metatiles to copy from, in metatiles, and the ticks to wait after the copy.
  • MAP_GRID_LAYER_SCROLL: One background layer of the field map: its scroll position, origin, parallax against the view, drift and wrap, and its first map metatile.
  • MAP_GRID_METATILE: One metatile of a map layer: its metatile tiles and flags, its metatile behavior and its shape, an index into the shape table.
  • MAP_GRID_SCROLL_STATE: The field map's state: the followed position, screen shake, tileset animations, blend script, view and its bounds, and three scrolling layers.
  • MAP_GRID_TILE_POS: The top left of a layer's visible area, in metatiles.
  • MAP_HEADER: A layout's header: the camera's bounds, the layers' priorities, tile bases and setup, and the offsets from the header's start of its packed tiles, shapes, tilemap, tileset animation, blend script and treasure spots (packed for syDecompressTaggedLZ, except markers which are read in place).
  • MAP_LAYER: One background layer's setup in a layout's header: its origin, its parallax and drift, and where it wraps.
  • MAP_MUSIC_RULE: A rule choosing a scene's field music (SceneMusicRules, music_rules.s), ended by id -1.
  • MAP_RESOURCES: A row of MapsWork: a layout's resources, each counted from ResourceIdEmptyMap.
  • MAP_SCREEN_STATE: The map screen's state while fdMapScreenShow owns MapGridMetatileBuffer.
  • MENU_CURSOR: Cursor that approaches its target, shared by shops, name entry screen and settings menu.
  • MENU_CURSOR_REF: A menu cursor: its window sprite, or the cursor that approaches its target.
  • MENU_POINT: A point on the screen where a menu shows its cursor.
  • MENU_SPR: A menu sprite: a list link and its OAM attributes, as two words or as fields.
  • MERCURY_LIGHTHOUSE_LIGHTS: Published in the scene's slot for the leader's lights while the column is active.
  • MESSAGE: A message, one of three, which types decoded text into a window a few characters a tick and runs its control codes.
  • MESSAGE_READER: A position in a Huffman-coded message: the previous code, which picks the next symbol's tree, and the message's remaining bits.
  • METATILE_COPY: A block of metatiles copied from one place in the map grid to another.
  • MIND_READ_STATE: The HEAP_SLOT_MIND_READ heap slot (MindReadStateWork), 664 bytes.

O

  • OAM_ATTR2_WORD: A sprite's OAM attribute 2 (tile index, priority and palette) and the halfword after it, as one word or as fields.
  • OAM_DATA: Attributes zero through two copied to OAM, plus the halfword after them.
  • OAM_MATRIX: One OAM rotation-scaling matrix: pa, pb, pc and pd in 8.8 fixed point, the inverse of the transform the sprite is drawn with.
  • OAM_WORDS: The oam_words group.
  • OPTION_MENU_ENTRY: One of the seven entries of the settings menu's state (SETTINGS_MENU_STATE.entries); only its state is known, and only the unused mnSettingsMenuResetEntries writes it.
  • ORBITING_MAP_ACTOR: A floating Nut's actor: its position, the spot it sways around and how far through the sway it is, its sprite and its update function.
  • ORBITING_MAP_ACTOR_SPR: A floating Nut's sprite: SPR a byte at a time, with the attribute bits scFloatNut sets.

P

  • PAGED_LIST: A paged list for one party member: their unit, the list's length and pages, and the page and row of the entry chosen last.
  • PALETTE_CYCLE: A palette cycle: a run of up to 16 background palette colours, saved and rotated by one colour every delay + 1 ticks.
  • PALETTE_CYCLE_STATE: The palette cycling queue (HEAP_SLOT_PALETTE_CYCLES): four cycles and how many are in use.
  • PALETTE_FADE: The palette fade (HEAP_SLOT_PALETTE_FADE) that fades the BG and sprite palettes: the source palette, the shown and target colour channels, their per-tick steps, and two pages of packed RGB555 colours queued each tick.
  • PARTICLE: A particle of an animation: its position, its velocity and a value each animation uses its own way (a size, a timer, -1 for idle).
  • PARTICLE_LINK_WORD: A particle's first word, seen as a value or a link.
  • PARTY_HOLDINGS: What the party holds apart from its items: its summons, coins and Djinn, and what Tolbi's shops and games keep for it.
  • PARTY_STAT_WINDOW: The party status window's layout: its window, its place and size, and what it shows (PARTY_STATUS_ flags).
  • PASSWORD_MEMBER: A party member as the password reads them: their level, base stats, inventory and Djinn, a view of UNIT at its offsets.
  • PASSWORD_STATS: A party member's base stats, which the password clamps and packs.
  • PATH_RECORDER: The Colosso opponent's path player, at the start of SceneLocalState: the path in COLOSSO_RACE_STATE is played back or recorded by scColossoUpdatePathOpponent.
  • PILLAR_PLACEMENT: A pillar slot's place and ground metatile, without its flag.
  • PILLAR_SLOT: Where one of the seventh floor's side room's pillars stands, the ground metatile saved under it and its flag of standing under another pillar.
  • PLUNGE_STREAK: One streak of light of the element streak burst, over a particle's entry.
  • POINTER_COORDINATE: The pointer's glide start on one axis, read signed or unsigned.
  • POLAR_OFFSET_POS: A position syVectorAddPolarOffset moves: as a vector, or as its three coordinates.
  • POS: The point group.
  • PREVIEW_SPR: The OAM entry of a window sprite (from WINDOW_SPR.link on), as the Djinn preview places its stat arrows (mnDjinnMenuDrawStatArrow).
  • PROJECTION: The projection group.
  • PSYNERGY_ENTRY: An entry in a unit's action list: the action's id (PSYNERGY_ABILITY_MASK) and marks for an action its class or an equipped item gave.
  • PSYNERGY_MENU_STATE: The Psynergy menu: its windows, icons and cursors, the party members' tabs and the Psynergy listed for the chosen party member.
  • PUSHED_ACTOR_PROBE: Where a pushed actor ahead of the leader would roll to: its rectangle, its actor, that position, and a function run during the leader's follow-through.
  • PUSHED_ACTOR_RECTANGLE: A large thing's edges, a row of PushedActorRectangles.

Q

  • QUEUED_SPR: A sprite as the depth queue takes it: syOAMAddSpriteAtDepth writes the link to the next sprite queued at the same depth, and the OAM attributes follow.

R

S

  • SAVE_LINK_GREETING: A console's link payload as the cable transfer reads it from SerialPeerPayloads.
  • SCENE: A scene's row in ScenesWork: its overlay's resource, its area, its scene type and its map.
  • SCENE_ENCOUNTER_RULE: A scene's encounter zones (SceneEncounterRules, encounter_rules.s; rows of encounter_zones.c), ended by scene -1.
  • SCENE_ENTRANCE: A scene's entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for none).
  • SCENE_ENTRY_POINTS: The entry table at the start of each scene overlay: its initialize function and the functions returning its entrances, exits, actor placements, cues and exit regions, each behind a stub word.
  • SCENE_EXIT_REGION: A scene's exit region: the box that, while its condition holds, takes the party leader out through its exit.
  • SCENE_STATE_VIEW: EWRAM from SceneLocalState on, as a new game clears it: the scene's state, the equipment put aside for the Colosso and the actors kept across a battle.
  • SCREEN_POINT: A point projected onto the screen, with its depth.
  • SCREEN_TRANSITION_DISPLAY: The map grid state as a transition reads it: the display control bits the scene shows, and the two lines where the centre-line transition blanks the screen and shows it again, with the HBlank interrupt's copies of them.
  • SCREEN_TRANSITION_STATE: The screen transition state (HEAP_SLOT_SCREEN_TRANSITION): two pages of window edges for every line, the dissolve's solid tile, and the transition's shape and progress.
  • SCRIPT_OPERANDS: The whole 112-byte slot as SC_SET, SC_ADD and SC_CMP see it: each field is one state value (ACTOR_SCRIPT_VALUE in actor_script.h), reached through ActorScriptOperandHandlerTable, and named for what the field keeps there.
  • SCROLL_PAIR: A background's horizontal and vertical scroll offsets.
  • SEAL_OPENING: The seal being opened.
  • SELECTION_MENU_STATE: The selection screen (heap block 18): the row of icons the player picks from, with arrows at each end and a pointing hand over the chosen target.
  • SELECTION_NODE: An icon of the selection screen: its list links, the entry it shows (kind/base from SELECTION_MENU_STATE.kinds and .bases; for an arrow, kind is TRUE while shown and base is the ticks left of its nudge after a scroll), its place and its slide toward a target, its zoom and its sprite.
  • SELECTION_SPR: A selection screen sprite: a list link and its OAM attributes.
  • SELECTION_STATE: The state block of HEAP_SLOT_SELECTION_STATE (SelectionStateWork): two VRAM cache entries with their flags and a window, among fields nothing here uses.
  • SERIAL_HALFWORD: A halfword in a record of its own, only to hold sySerialStepBlockTransfer's 1 (its FAKEMATCH).
  • SERIAL_PACKET: The serial group.
  • SERIAL_STATE: The link cable's runtime: its mode and phase, the consoles heard from, the send position and the packet buffers the interrupt handler fills.
  • SERIAL_TRANSFER_STATE: A console's block transfer state, exchanged with the partner each VBlank: its block number, its status and flags, and a 20-byte block.
  • SETTINGS_MENU_STATE: The settings menu's state (heap block 20): the settings being edited and how many values each takes, the page, and the cursor, markers and icons.
  • SHOP_STATE: A shop's state: its windows, the party members' icons, the stock, the cursor and its icons, and the field effect sprites.
  • SOL_SANCTUM_LIGHT_ENTRY: One floating light: its actor, its drift and its pulsing scale, and where it is while hidden.
  • SOL_SANCTUM_LIGHT_LIST: The floating lights' state in HEAP_SLOT_SOL_SANCTUM_LIGHTS, one entry per light.
  • SPARK: One of the star field's sparks, drawn inward to the centre.
  • SPARK_STATE: The star field's state, for the 45 ticks of a cast's glow.
  • SPARKLE_PICTURE: One picture of a sparkle: its height offset and tile (field_engine_tables.c).
  • SPEAKER_DEFINITION: A speaker definition, a row of SpeakerDefinitions: a sprite, its voice (SPEAKER_VOICE_NONE for none) and the lines it says while Halted.
  • SPEAKER_SPR: An actor's animated sprite (SPR), as far as the pointer to its sprite id.
  • SPR: An animated sprite: its image and shadow, scale, rotation, size and up to four sprite animations.
  • SPR_ANIMATION: One of a sprite's four sprite animations: its animation id, pictures, running script and timer.
  • SPR_PICTURE_CACHE: A sprite picture cache: the tag of the animation loaded into it (slot number and animation id) and the buffer holding its pictures.
  • SPR_PICTURE_CACHE_SOURCE: A row of SpritePictureCacheSources: the packed resource that holds an animation number's pictures, ending at number 0.
  • SPR_PLACEMENT: A sprite's screen position and its two vertical offsets, in 16.16 pixels.
  • SPR_SCALE: Horizontal and vertical sprite scale; toFIXED(1) is the original size.
  • SPR_VIEWER_LAYER: One sprite animation the sprite viewer edits.
  • SPRING_OBSTACLE: One of the four obstacles moving in the spring during a toss.
  • SPRING_TOSS_MOTION: The tossed coin or medal, as its last four positions for the trail, its velocity and the ticks the prize rings still pull it.
  • STAT_CURSOR: The Status screen's cursor: its place in each group, the help entry it shows and where it points.
  • STAT_STATE: The running totals gmUnitCalculate builds a unit's stats in.
  • STATUS_SCREEN_STATE: The state of the party member chooser and the Status menu, in the HEAP_SLOT_MENU heap slot, which each takes as it opens and frees before it returns.
  • STUB: The stub group.
  • SUMMON_DEFINITION: A summon: its name's message and the Djinn of each element it needs.
  • SWITCH_METATILE: A Venus Lighthouse switch or pillar socket's map metatile.
  • SYSTEM_STUB_TABLE: The start of the system library's stub table, as far as syCos.

T

  • TARGET_TRACK: One of the target cursor's markers: where it stands, its state flags and which listed unit it marks.
  • TILE_MASK: One row's masks for a pair of bar-pattern tiles: a word XORed into each tile's row.
  • TILESET_ANIM: One of the 16 tileset animations, which copy tiles into VRAM by script (fdTilesetAnimationUpdate): groups of four halfwords, the source tile, the count, the destination tile and the ticks to wait.
  • TITLE_PALETTE_FADE: The title intro's palette fade, over every BG and sprite colour: the source palette, the shown and target colour channels, their steps, and two pages of packed colours.
  • TITLE_SPR: One sprite of the logo's lettering, as syOAMAddSpriteAtDepth queues it.
  • TRANSITION_SHAPE: One step of WINDOW_TRANSITION_SHAPE, a row of ScreenTransitionShapes chosen by the progress: the WININ and WINOUT values, swapped as the transition opens or closes, and three runs of lines written one after another from the top of the screen.
  • TRANSITION_SPAN: A run of screen lines in a transition shape: one window edge pair for every line, or, when that is 0, edges moving from left x0 and right y0 to left x1 and right y1 down the run.
  • TREASURE_SPOT: A treasure spot placed as an actor: a chest or a Psynergy Stone.
  • TRIG_STUB: An entry of the system library's table whose one-argument target the world map's tilt calls, the sine or the cosine.

U

  • UNIT: A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and statuses.

V

  • VECTOR2: An {x, y} position or velocity in 16.16 pixels, kept by the summons Nereid, Procne, Tiamat and Ramses and by Dragon Cloud's trail.
  • VECTOR3: The vector3 group.
  • VRAM_CACHE_ENTRY: A sprite slot of the VRAM cache: the size of its block and where the block starts in sprite VRAM.

W

  • WAVE_EFFECT_SPR: Read set on it; each member says which Sprite fields it covers.
  • WEATHER_PARTICLE: One weather particle: depth-slot link and OAM attributes (written whole by start functions as semi-transparent, size 1, priority 1 and palette 13), followed by its world position.
  • WEATHER_STATE: HEAP_SLOT_WEATHER while ground particles, motes or sparkles run.
  • WIN_STATE: The window system's state: the windows' tilemap, the windows, the three text messages, the 64 window sprites, and the decoded message and its arguments.
  • WINDOW: A window: a bordered rectangle of the tilemap with its window sprites, its opening or closing animation and the rectangle it last drew.
  • WINDOW_BUFFER: A page of the screen transition's window edges (SCREEN_TRANSITION_STATE.pages): WININ and WINOUT, then each line's edges.
  • WINDOW_LINE: One line's horizontal window edges, each a WIN_RANGE value.
  • WINDOW_SPR: A window sprite: a sprite in a window's sprite list (a character, an icon or a portrait), with its VRAM cache slot, depth slot (syOAMAddSpriteAtDepth: higher draws in front; glyphs use 254) and OAM attributes.
  • WINDOW_SPR_LIST: A list of window sprites: its first sprite and the link to append after.
  • WINDOW_ZOOM_SCRATCH: Scratch values for a stage of a window's zoom: the scaled part of a side, the scaled duration and their ratio.
  • WORLD_MAP_AFFINE_LINE: One screen line's affine parameters for a background, as the HBlank DMA copies them into the BG2 or BG3 registers, BG2PA to BG2Y.
  • WORLD_MAP_AFFINE_PAIR: One screen line's affine parameters for BG2 and BG3.
  • WORLD_MAP_AFFINE_STATE: The world map's affine state in HEAP_SLOT_WORLD_MAP_AFFINE: the scanline terms and two pages of per-line affine parameters, one built while the other is shown.
  • WORLD_MAP_ENCOUNTER_RULE: The World Map's encounter zone for an encounter region and battle environment.
  • WORLD_MAP_METATILE: One 32-pixel metatile of the world map: its tile, its kind (WORLD_MAP_ENCOUNTER_REGION) and a flag.
  • WORLD_MAP_SCANLINE: One screen line's ground-plane terms on the world map: its width scale and distance, from which its affine parameters are built (fdWorldMapBuildScanlineTable, when the pitch changes).
  • WORLD_MAP_VIEW: The world map's perspective view: the followed position, screen shake, view position, window, pitch and yaw, tile ids and zoom, in HEAP_SLOT_MAP_GRID where a map keeps its MAP_GRID_SCROLL_STATE.
  • WORLD_POS: A position on the world map, as its walkability check reads it.