Alchemy

graphics

games/tbs/include/graphics on GitHub

display_transition.h

games/tbs/include/graphics/display_transition.h

Structures

DisplayTransitionFrame

struct DisplayTransitionFrame

The display transition state as the centre-line transition and the dissolve read it: the dissolve's tile pixels and the transition's progress.

FieldDeclared as
unk000u8 unk000[0x508]DisplayTransitionState's pages; not named here
paletteNibblesu8 paletteNibbles[0x22]DisplayTransitionState's solidTile, as 4-bit pixels two a byte: the dissolve sets two more each frame and copies the tile to BG character block 0.
valueu16 valueThe progress, moved from start to end over duration frames: bit 5 says whether the dissolve fills or clears, the low 5 bits how far it is.
unk52cu8 unk52c[13]DisplayTransitionState's centreX to unk538; not named here.
ditherToggleu8 ditherToggleDisplayTransitionState's page: the dissolve flips it each frame and never reads it.
starts8 startthe value's first step
ends8 endthe value's last step
durations8 durationframes; 0 when the value is not moving
steps8 stepframes

Used by DisplayTransition_Update, DisplayTransition_UpdateFrame, DisplayTransition_UpdateFromCentre.

Line 13

DisplayTransitionWindow

struct DisplayTransitionWindow

The map work's display fields that transitions use: its display control bits and the lines where the centre-line transition shows and hides the screen, with the VCount interrupt's copies and phase.

FieldDeclared as
unk000u32 unk000[5]map work fields no transition names
dispcntu16 dispcntDisplay control bits ORed into DISPCNT; DisplayState_ClearFlags clears those of backgrounds 1 to 3.
unk016u8 unk016[0xea]map work fields no transition names
firstLineu16 firstLinescanlines: where the screen is hidden, 200 when it is not
secondLineu16 secondLinescanlines: where the screen is shown again, 250 when it is not hidden
irqFirstLineu16 irqFirstLinescanlines; firstLine as the VCount interrupt reads it
irqSecondLineu16 irqSecondLinescanlines; secondLine as the VCount interrupt reads it
irqPhaseu16 irqPhaseThe VCount interrupt's phase: 0 waiting for a line above 159, 1 neither line passed, 2 the first passed, 3 the second passed first, 9 done.

Used by DisplayState_ClearFlags, DisplayTransition_Start, DisplayTransition_Update, DisplayTransition_UpdateFromCentre, DisplayTransition_UpdateScanline.

Line 36

DisplayTransitionState

struct DisplayTransitionState

The display transition state (heap block 31): two pages of window edges for every line, the dissolve's solid tile, and the transition's mode and progress.

FieldDeclared as
pagesu16 pages[2][322]Window edges, two pages: WININ and WINOUT, then a WIN0H and WIN1H pair, each (left << 8 | right), for each of the 160 lines.
solidTileu32 solidTile[8]The dissolve's solid tile, one 8 by 8 tile of 4-bit pixels.
modeu16 modeThe window transition's shape: modes are listed at DisplayTransition_UpdateScanlineTable.
valueu16 valueThe progress, moved from start to end over duration frames: bit 5 says whether the transition opens or closes, the low 5 bits how far it is.
centreXs32 centreX16.16 fixed-point pixels: the centre of the ellipse around a point (mode 8), set by the Reveal effect.
centreYs32 centreYas centreX: the target's z less its y
masks16 maskWINOUT, or WININ by mode: 0x3f3f or 63 when a transition starts.
actives16 activeWININ, or WINOUT by mode: 1 when a transition starts.
unk538u8 unk538not named by TBS code
pageu8 pagethe pages entry shown; the next is built in the other
starts8 startthe value's first step
ends8 endthe value's last step; 64 hides BG1 to BG3 and sprites
durations8 durationframes; 0 when the value is not moving
steps8 stepframes
nextModes8 nextModeThe mode taken when the value reaches its end; 0 ends the transition.

Used by AffineEffect_UpdateFrame, AltmillerCave_InitializeDarkness, AltmillerCave_RestoreBabiAndInviteParty, BabiPalace_WakeAfterFinals, BattleFx_StartWindowHBlankDma, DisplayTransition_AllocateAndClearState, DisplayTransition_FillTilemapAndSolidTile, DisplayTransition_Finish, DisplayTransition_InitializeBattleEffectState, DisplayTransition_InitializeState, DisplayTransition_Start, DisplayTransition_UpdateScanlineTable, Event_CastReveal, FieldFx_RunReveal, Fuchin_EndRevealLighting, ResetSceneTransitionEffect, TretTreeBranch_Initialize, TretTreeBranch_SetRevealWindow, WorldMap_BeginEvent, gDisplayTransition.

Line 56

glyph.h

games/tbs/include/graphics/glyph.h

Structures

GlyphPalette

struct GlyphPalette

A compact palette shared by a selection's command icons: the slot each icon colour was given, or 255 for none yet, and how many slots are taken.

FieldDeclared as
slotu8 slot[256]
counts32 count

Line 19

FontGlyph

struct FontGlyph

A character of the text font: its width and its rows of pixels.

FieldDeclared as
widthu16 widthpixels
rowsu16 rows[FONT_GLYPH_ROWS]

Used by gUiText_Glyphs.

Line 28

Also, structures without a comment: GlyphTransfer.

Globals, without a comment: gUiText_Glyphs.

graphics.h

games/tbs/include/graphics/graphics.h

Structures

TileMask

struct TileMask

One row's masks for a pair of bar-pattern tiles: a word XORed into each tile's row.

FieldDeclared as
word0u32 word0
word1u32 word1

Used by gMenu_BarPatternRows, gMenu_PatternRowMasks.

Line 82

Macros, without a comment: GRAPHICS_H.

Globals, without a comment: gBlendBrighten, gBlendDuration, gBlendFramesLeft, gBlendLayers, gBlendStartLevel, gBlendTargetLevel, gRomShiftedTilePair, RelocatedQ16DotProduct, Resource_Decode2CodeSize, Resource_DecodeByteLzCodeSize, gUi_PpRowString, gUi_FixedTileBlocks, gUi_HpRowString, gUi_HpString, gUi_PpString, gUi_SlashString, gUiIcon_ItemIconPointers, gUiIcon_ItemIconPointersEnd, gUiIcon_MiscIconPointers, gUiIcon_PsynergyIconPointers, gUiIcon_PsynergyIconPointersEnd, ColorBuffer_BackupAndBrightenCodeSize, ColorBuffer_BackupAndBrightenPartialCodeSize, ColorBuffer_BackupAndDarkenCodeSize, ColorBuffer_BackupAndDarkenPartialCodeSize, ColorBuffer_BackupAndHalveCodeSize, ColorBuffer_BackupAndHalveNonzeroCodeSize, ColorBuffer_BackupAndScaleNonzeroThreeQuartersCodeSize, ColorBuffer_BackupAndScaleThreeQuartersCodeSize, ColorBuffer_BrightenKernel, ColorBuffer_BrightenPartialKernel, ColorBuffer_DarkenKernel, ColorBuffer_DarkenPartialKernel, ColorBuffer_HalveKernel, ColorBuffer_HalveNonzeroKernel, ColorBuffer_ScaleNonzeroThreeQuartersKernel, ColorBuffer_ScaleThreeQuartersKernel, gRenderSlotHeads, gPartyStatusWork, gSelectionWorkspace, gUiText_ArticleTable, gMenu_BarPatternRows, gDisplayScroll_Font, gDisplayTransition_DitherTable, gDisplayTransition_EdgeOffsets, gDisplayTransition_NoiseWidths, FarCall_ResourceTable, gDecodeFillByte, gPaletteWork, gGraphics_ExpandNibbleTable, gSpriteObjects, gMenu_CursorObjectTiles, gNameEntry_AlternateKeyboardTilemap, gNameEntry_CaretWave, gNameEntry_VoicedMarkRanges, gNameEntry_DeleteKeyLabel, gNameEntry_EndKeyLabel, gNameEntry_SemivoicedMarkRanges, gNameEntry_KeyboardTilemap, gRender_DecodeFrameBuffer, Resource_Decode2, Resource_DecodeByteLzArm, Resource_DecodeHalfwordLz, Resource_DecodeType01Arm, Resource_DecodeType01CodeSize, Resource_DecompressHalfwordsCodeSize, gResource_FixedBlockBTiles, gResource_FixedBlockATiles, BattleEffect_Expand, BattleEffect_ExpandCodeSize, Text_DecodeSymbol, Text_DecodeSymbolCodeSize, Tile_BuildMetatilesCodeSize, Tile_ConvertMap, Tile_ConvertMapCodeSize, Tile_Decompress4bpp, Tile_Decompress4bppCodeSize, Tile_ExpandMasked, Tile_ExpandMaskedCodeSize, Tile_ExpandOpaque, Tile_ExpandOpaqueCodeSize, gTitle_PromptTiles, gUi_ObjectPulseScales, gUi_PairBobOffsets, gUiIcon_DigitPointers, gUiIcon_FramePointerTable, gUiIcon_MarkPointers, gUiIcon_OverlayPointerTable, gUiIcon_ResourceTiles, gUiSprite_BounceOffsets, gUiSprite_CursorFrameTiles, gUiSprite_WobbleOffsets, gUiText_ColourPens, UiText_DrawGlyphCodeSize, gUiText_GlyphWidths, gUiText_IndefiniteArticles, UiText_LookupMessageArm, UiText_LookupMessageCodeSize, gUiWindow_PartyColumnOffsets.

Declarations, without a comment: FarCall_EffectTable.

oam.h

games/tbs/include/graphics/oam.h

Structures

OamUsage

struct OamUsage

How many OAM entries are in use, and the most that may be.

FieldDeclared as
usedu16 usednot named by TBS code
limitu16 limitnot named by TBS code

Used by gOamUsage.

Line 12

Globals, without a comment: gOamUsage.

output.h

games/tbs/include/graphics/output.h

palbuf.h

games/tbs/include/graphics/palbuf.h

Structures

PaletteFade

struct PaletteFade

A colour buffer for all 512 palette colours: the source palette, the shown and target colour channels, their steps, and two pages of packed colours.

FieldDeclared as
paletteu16 palette[512]The source palette, RGB555: 256 BG colours, then 256 OBJ colours.
currentu16 current[0x600]The shown colours, as B, G and R channels shifted up 10 bits, three a colour.
targetu16 target[0x600]the colours current moves toward, as current
deltau16 delta[0x600]added to each current channel each frame
packedu16 packed[2][512]Two pages of RGB555 colours: one is built while the other is queued.
pageu8 pagethe packed page queued this frame
durations8 durationframes; 0 when the colours are not moving
stepu8 stepframes
padding3003u8 padding3003never named

Used by PaletteFade_Init, PaletteFade_SetBackdrop, PaletteFade_SetCurrent, PaletteFade_SetTarget, PaletteFade_Start, PaletteFade_Update.

Line 14

BattleEffectBuffers

struct BattleEffectBuffers

The colour buffer (HEAP_SLOT_PALETTE_BUFFER) that fades the BG and OBJ palettes: the source palette, the shown and target colour channels, their per-frame steps, and two pages of packed RGB555 colours queued each frame.

FieldDeclared as
paletteu16 palette[0x1c0]The source palette, RGB555: 224 BG colours, then 224 OBJ colours; palette[0] is the backdrop.
currentu16 current[0x540]The shown colours, as B, G and R channels shifted up 10 bits, three a colour.
targetu16 target[0x540]the colours current moves toward, as current
deltau16 delta[0x540]added to each current channel each frame
packedu16 packed[2][0x1c0]Two pages of RGB555 colours: one is built while the other is queued.
pageu8 pagethe packed page queued this frame
durations8 durationframes; 0 when the colours are not moving
steps8 stepframes
padding2a03u8 padding2a03never named

Used by BattleEffect_InitializeBuffers, BattleEffect_InitializeSharedScene, BattleFx_ApplyColorToSourceBuffer, BattleFx_ApplyColorToTargetBuffer, BattleFx_SetPrimaryBufferValue, BattleFx_StartBufferBlend, BattleFx_StartBufferInterpolation, BattlePalette_UpdateBlend, FieldFx_StartLightning, FieldFx_UpdateLightning, Shop_SaveAndTintFieldPalette, SolSanctumLunaSolRooms_ShowFloatingEye, TretPalette_UpdateSceneTint, gPaletteBufferWork.

Line 40

Enumerations

PaletteTransform

enum PaletteTransform

A colour buffer's build mode: below 0x8000 one RGB555 colour for all.

Value=
PALETTE_TRANSFORM_FROM_SOURCE0x8000The backdrop colour (palette RAM's first colour) for all.
PALETTE_TRANSFORM_PLAIN0x10000each colour unchanged
PALETTE_TRANSFORM_GREY0x10001grey of brightness (2R + 4G + B) / 7
PALETTE_TRANSFORM_SEPIA0x10002
PALETTE_TRANSFORM_WARM0x10003
PALETTE_TRANSFORM_MUTED0x10004
PALETTE_TRANSFORM_PALE0x10005
PALETTE_TRANSFORM_RED0x10006
PALETTE_TRANSFORM_WARM20x10007half R + 6, two thirds G + 4, B - 6
PALETTE_TRANSFORM_FLAGS0x100000From here the TINT, BLEND and SPLIT bits are tested, TINT and BLEND carrying an RGB555 colour in the low 15 bits; any other value is the address of a ready buffer to copy.
PALETTE_TRANSFORM_TINT0x200000The brightness (2R + 4G + B) times the colour carried.
PALETTE_TRANSFORM_BLEND0x400000The brightness R + G + B shared out in the proportions of the colour carried.
PALETTE_TRANSFORM_SPLIT0x800000each colour unchanged

Line 69

Globals, without a comment: gPalette_ChannelCurve, gPalette_ChannelCurveLight, gPalette_ChannelCurveContrast.

palqueue.h

games/tbs/include/graphics/palqueue.h

Structures

PaletteSnapshot

struct PaletteSnapshot

A palette cycle: a run of up to 16 background palette colours, saved and rotated by one colour every delay + 1 frames.

FieldDeclared as
sourceu16 *sourcethe first colour of the run, in BG palette RAM
positionu16 positioncolours rotated so far, 0 to count - 1
timeru16 timerframes until the next rotation
delays16 delayframes; the timer restarts from it
countu16 countcolours in the run
colorsu16 colors[16]the run's colours as saved when the cycle was added

Used by PaletteQueue_Add, PaletteQueue_Initialize, PaletteQueue_StepCycles.

Line 13

PaletteSnapshotWork

struct PaletteSnapshotWork

The palette cycling queue (heap slot 28): four cycles and how many are in use.

FieldDeclared as
entriesstruct PaletteSnapshot entries[4]
countu16 countCycles in use, 0 to 4; PaletteQueue_StepCycles masks four to none.

Used by PaletteQueue_Add, PaletteQueue_Initialize, PaletteQueue_StepCycles, gPaletteWork.

Line 24

render_input.h

games/tbs/include/graphics/render_input.h

Structures

RenderInput

struct RenderInput

A 16-byte record of a rectangle. In TBS it only reserves stack space in tbs-ja's glyph renderer; no TBS code reads its fields.

FieldDeclared as
unk00u8 unk00[8]not named by TBS code
widthu16 widthnot named by TBS code
heightu16 heightnot named by TBS code
xu16 xnot named by TBS code
yu16 ynot named by TBS code

Used by UiText_DrawGlyphArm.

Line 15

RenderOam

struct RenderOam

Attributes zero through two copied to OAM, plus one unused word.

FieldDeclared as
yu16 y : 8
affineModeu16 affineMode : 2
objectModeu16 objectMode : 2
mosaicu16 mosaic : 1
palette256u16 palette256 : 1
shapeu16 shape : 2
xu16 x : 9
matrixu16 matrix : 5
sizeu16 size : 2
indexu16 index : 10
priorityu16 priority : 2
paletteu16 palette : 4
highu16 high

Line 44

RenderOutput

struct RenderOutput

A render output: a sprite in a window's output list (a character, an icon or a portrait), with its VRAM cache slot and OAM attributes.

FieldDeclared as
nextstruct RenderOutput *nextthe next output in its list
kinds8 kind0 for a glyph; otherwise it owns VRAM cache slot index, freed with it, and 2 (a portrait) also its palette slot.
actives8 activeits UI_SPRITE_ motion; 0 while free
xu16 xscreen pixels
yu16 yscreen pixels
unk0au16 unk0anot named by TBS code
animStepu16 animStepstep of its motion's animation
indexs8 indexVRAM cache slot, or a glyph's tile after glyphTiles
sentinelu8 sentineldepth slot it is drawn at (254 for glyphs)
unk10u8 unk10[4]The depth queue's link: with oam it is the sprite entry queued each frame, read as struct CursorSprite.
oamstruct RenderOam oam

Used by CharacterMenu_SelectOwner, CreateSideObject, Debug_SelectAbilityPair, DjinnMenu_RunScreen, ItemMenu_ApplyFlags, ItemMenu_ArrangeCategoryItemIcons, ItemMenu_Close, ItemMenu_DrawIcons, ItemMenu_HideAllIcons, ItemMenu_HidePageIcons, ItemMenu_PlaceIcon, ItemMenu_PosCategory, ItemMenu_RefreshEntry, ItemMenu_ResetCategory, ItemMenu_RunList, ItemMenu_SelectGiveQuantity, ItemMenu_SelectItem, ItemMenu_SelectTarget, Menu_CreateEightEntryObjects, Menu_CreateWindowAndEntryObjects, Menu_PlaceEntryObjectInGrid, Menu_PlaceEntryObjectsInGrid, Menu_RunWorkspaceOptions, Menu_RunWorkspaceSelectionLoop, Menu_SelectQuantity, Menu_SetPageIcons, Menu_SpawnIconEntries, NameEntry_EditOwnerName, OptionMenu_Open, PsynergyMenu_CreateEntryGrid, PsynergyMenu_DrawPsynergyIcons, PsynergyMenu_PositionOwnerEntry, PsynergyMenu_RefreshOwnerEntries, PsynergyMenu_RunList, PsynergyMenu_SelectAction, PsynergyMenu_SelectPartySlot, PsynergyMenu_SelectTarget, RenderOutputList_UpdateTail, RenderOutput_AcquireFree, RenderOutput_AppendToList and 42 more.

Line 62

RenderOutputList

struct RenderOutputList

A list of render outputs: its first output and the link to append after.

FieldDeclared as
headstruct RenderOutput *head
tailLinkstruct RenderOutput **tailLink

Used by RenderOutputList_UpdateTail, RenderOutput_AppendToList, RenderOutput_ClearList.

Line 81

Unions

RenderTableValue

union RenderTableValue

A sprite's OAM attribute 2 (tile index, priority and palette) and the halfword after it, as one word or as fields.

FieldDeclared as
valueu32 value
index, priority, palette, high, bitsstruct { unsigned short index : 10; unsigned short priority : 2; unsigned short palette : 4; u16 high; } bits
low, high, halfstruct { u16 low; u16 high; } half

Line 29

render_placement.h

games/tbs/include/graphics/render_placement.h

Functions

SpritePlacement_Values

static inline s32 *SpritePlacement_Values(struct SpritePlacement *placement)

Returns the placement's values as a writable array.

Used by Map_BuildProbeRing.

Line 43

Also, functions without a comment: SpritePlacement_ReadValues.

Structures

SpritePlacement

struct SpritePlacement

A sprite's screen position and its two vertical offsets, in 16.16 pixels.

FieldDeclared as
x, height, y, groundHeight, valuesunion { struct { s32 x; ///< screen x of the sprite's centre s32 height; ///< how far the image is raised above y s32 y; ///< screen y at the ground; sets the depth slot s32 groundHeight; ///< how far the shadow is raised above y }; s32 values[4]; }
xs32 xscreen x of the sprite's centre
heights32 heighthow far the image is raised above y
ys32 yscreen y at the ground; sets the depth slot
groundHeights32 groundHeight

Used by BattleFx_DrawScaledObject, BattleFx_PlaceFormationObjects, BattleFx_RunAtalanta, BattleFx_RunBoreas, BattleFx_RunGaia, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunNeptune, BattleFx_RunParticleStreams, BattleFx_RunProcne, BattleFx_RunRamses, Battle_PlaceActorsByFormationKind, FourObjectMotion_UpdateAllPositions, FourObjectMotion_UpdateBottomRow, Map_BuildProbeRing, Menu_UpdateEntryObjectTransforms, ObjectSystem_UpdateCamera, Render_ApplyProjectedPlacement, SaveMenu_PlaceDjinnSprites, SaveMenu_PlacePartySprites, SpritePlacement_ReadValues, SpritePlacement_Values, Ui_RunIconMonitor.

Line 11

SpriteScale

struct SpriteScale

Horizontal and vertical sprite scale; 0x10000 is the original size.

FieldDeclared as
x, y, valuesunion { struct { s32 x; ///< 16.16 s32 y; ///< 16.16 }; s32 values[2]; }

Used by BattleFx_DrawScaledObject, BattleFx_PlaceFormationObjects, BattleFx_RunBoreas, BattleFx_RunGaia, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunNeptune, BattleFx_RunParticleStreams, BattleFx_RunProcne, BattleFx_RunRamses, Battle_PlaceActorsByFormationKind, FourObjectMotion_UpdateAllPositions, FourObjectMotion_UpdateBottomRow, Menu_UpdateEntryObjectTransforms, ObjectSystem_UpdateCamera, Render_ApplyProjectedPlacement, SaveMenu_PlaceDjinnSprites, SaveMenu_PlacePartySprites, gAtalanta_UnitScale, gBattle_FormationPlacementScale.

Line 52

resource.h

games/tbs/include/graphics/resource.h

Macros

SPRITE_ID_MASK

#define SPRITE_ID_MASK 0xfff

A battle sprite id's low twelve bits; the two-part sprites' second part is their id + 0x2001.

Used by BattleActor_SpawnObjectsForList.

Line 13

Also, macros without a comment: SPRITE_SECOND_PART.

text_font.h

games/tbs/include/graphics/text_font.h

Enumerations

TextMarkGlyph

enum TextMarkGlyph

Value=
TEXT_MARK_NONE0
TEXT_MARK_VOICED0xDEthe voiced mark (dakuten)
TEXT_MARK_SEMIVOICED0xDFthe semi-voiced mark (handakuten)

Line 12

Macros, without a comment: GUARD_TEXT_FONT_H.

Globals, without a comment: gUiText_KanjiGlyphs.

text_reader.h

games/tbs/include/graphics/text_reader.h

Structures

TextReader

struct TextReader

A position in a Huffman-coded message: the previous code, which picks the next symbol's tree, and the message's remaining bits.

FieldDeclared as
previousCodeu32 previousCode
wordsconst u32 *words
bitsu32 bits

Used by UiText_DecodeMessage, UiText_DecodeSymbol, UiText_LookupMessage.

Line 13

text_render_runtime.h

games/tbs/include/graphics/text_render_runtime.h

transform.h

games/tbs/include/graphics/transform.h

Functions

Transform_ResetCurrent

static __inline__ void Transform_ResetCurrent(void)

Resets the current matrix to identity.

Used by Render_ResetTransformState, SceneTransform_ResetMatrix.

Line 36

Also, functions without a comment: Transform_SetIdentity.

Macros

TRANSFORM_IDENTITY_REGISTER_SETUP

#define TRANSFORM_IDENTITY_REGISTER_SETUP

The games order the identity-register setup differently before the same stores.

Used by Transform_ResetCurrent.

Line 31

Globals, without a comment: gTransform, gTransformStackDepth, gTransformStackTop.

Declarations, without a comment: SceneTransform_RewindStack.

uiflow.h

games/tbs/include/graphics/uiflow.h

uiwindow.h

games/tbs/include/graphics/uiwindow.h

Structures

UiWindow

struct UiWindow

A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation and the rectangle it last drew.

FieldDeclared as
outputstruct RenderOutputList outputthe sprites the window carries
widthu16 widthtiles
heightu16 heighttiles
xu16 xtiles
yu16 ytiles
unk10u16 unk101 once opened, 0 once freed; not read by name in TBS
effectu16 effectThe effect a message's TEXT_WINDOW_STATE code sets. Only UI_WINDOW_EFFECT_SWELL (4) is acted on; its channel types nothing more until the swell ends and clears it.
stateu16 state0 while a message channel is typing into the window; 1 once its text has ended or closed the window, which frees the channel for the next text.
flagsu16 flagsUI_WINDOW_ flags; 0 once closing or free
frameu16 frameThe zoom's step: counts down from 7 to 0 while opening, and up from 0 to duration while closing.
durations16 durationframes of the zoom under way; 0 when none
previousXu16 previousXtiles
previousYu16 previousYtiles
previousWidthu16 previousWidthtiles
previousHeightu16 previousHeighttiles

Used by BattleEvent_Playback, BattleMenu_RunActionSelection, BattlePresentation_WaitForAdvance, BattleTarget_RunSelection, Battle_CollectPartyCommands, Battle_RunEncounter, Battle_SelectAbility, Battle_ShowPairedUnitWorkAndWait, CharacterMenu_DrawSelectionLabels, CharacterMenu_DrawStatusAilments, CreateSideObject, DebugBattle_ViewMessages, DebugMenu_BrowseMessageRange, DebugMenu_SelectItem, Debug_SelectAbilityPair, DjinnMenu_DrawStatPreview, DjinnMenu_SelectDjinn, DjinnMenu_ShowCurrentList, DjinnMenu_ShowHelp, DjinnMenu_ShowOwnerStatus, Djinn_ShowJoinedMessage, Event_AskYesNoWithActorAnimation, Event_ShowMessageAtPosition, Event_ShowSpeakerMessage, FieldEvent_ShowMessageAndWait, Inn_CheckIn, InventoryMenu_ShowModalMessage, ItemLevel_RunLevelEditor, ItemLevel_SelectAbility, ItemLevel_SelectItem, ItemLevel_ShowGlyphCaptions, ItemList_SelectEntry, ItemMenu_ChooseCommand, ItemMenu_ConfirmDrop, ItemMenu_DrawCategory, ItemMenu_DrawCommands, ItemMenu_DrawEquipPage, ItemMenu_DrawEquippedItemNames, ItemMenu_DrawItemDetailPage, ItemMenu_DrawItemDetails and 162 more.

Line 11

UiChannelSlot

struct UiChannelSlot

A text channel, one of three, which types decoded text into a window a few characters a frame and runs its control codes.

FieldDeclared as
workstruct UiWindow *workthe window typed into; NULL when free
xu16 xpen, 8.8 fixed-point pixels
yu16 ypen, 8.8 fixed-point pixels
spacingu16 spacing[4]Extra advance per line, in 1/256 pixels: after every character in Japanese, after a space in the other editions.
lineu16 lineline of the page, indexes spacing; at most 3
entryu16 entrynext code in UiRenderWork.entries
countdownu16 countdownframes left of a pause, a page wait or a swell
colouru16 colourtext colour; 15 by default
outlineu16 outlineoutline colour; 0 for none
lineSpacingu16 lineSpacing10 by default
transitionu16 transitionframes left of the canvas scrolling up a line
startXu16 startXpen x each new line returns to, 8.8 fixed-point pixels
endedu16 ended1 once a TEXT_END code is reached
glyphDelayu16 glyphDelayframes to wait after a glyph while no button is held
flagsu16 flagsnonzero keeps the window's size from page to page
unk26u16 unk26not named by TBS code

Used by DjinnMenu_ShowHelp, UiText_ApplyChannelStyle, UiText_CheckPauseSkipped, UiText_CheckTextDismissed, UiText_PrepareMessageWork, UiText_QueueRenderEntries, UiText_StartBattleMessage, UiText_StartCanvasScroll, UiWindow_StepSwellEffect, UiWork_DrainPending, UiWork_FinalizePendingCore, UiWork_IsComplete, UiWork_ProcessRenderChannels, UiWork_ResetFreeChannel, UiWork_StepChannelScript.

Line 43

Macros, without a comment: UiRender_MarkRow.

vram_tab.h

games/tbs/include/graphics/vram_tab.h

Structures

VramBlockCacheEntry

struct VramBlockCacheEntry

A sprite slot of the VRAM cache: the size of its block and where the block starts in OBJ VRAM.

FieldDeclared as
sizeu16 sizebytes
offsetu16 offsetbytes from the start of OBJ VRAM

Used by RenderOutput_Create, Resource_FindFreeEntry, Resource_ResetEntry, Ui_RunOwnerStatusScreen, VramCache_Load, VramCache_ReleaseVram, VramCache_Reset, gVramBlockCache.

Line 23

Enumerations, without a comment: VramBlockLimits.

Globals, without a comment: gResourceBlockOwners, gVramBlockCache.

On this page