Alchemy
Loading...
Searching...
No Matches

window.c

Go to the documentation of this file.
1/// @file
2/// The window object: the UI windows drawn into a shared BG tilemap, the
3/// message channels that type text into them, the message decoder and the
4/// formatting behind it, the sprites (render outputs) that windows carry,
5/// icons, the selection screen and the option and system menus.
6///
7/// Everything lives in one work block, struct UiRenderWork (heap slot
8/// HEAP_SLOT_WINDOW, reached as UI_WORK): the tilemap, the window slots, three
9/// message channels, a pool of 64 render outputs and the decoded text.
10///
11/// window_internal.h holds what every part shares (includes, edition values
12/// and macros); the code is in the files under window/, included here in the
13/// order it has in the ROM. Camelot's own files are not recoverable: the ROM
14/// shows one object, and these parts are ours, cut where one family ends and
15/// the next begins. README.md in this folder gives the words, prefixes and
16/// spellings the parts use. Where to start:
17///
18/// Windows windows.c: UiWindow_Create, UiWork_Finalize;
19/// frames.c: UiWindow_DrawFrame, UiWork_ProcessDirectWork
20/// Messages frames.c: UiText_OpenMessageWindow,
21/// UiText_ShowPositionedMessageAndWait; typing.c:
22/// UiWork_StepChannelScript; decode.c:
23/// UiText_BuildRenderEntries
24/// Text drawing sprites.c: UiText_DrawGlyph; text_tiles.c:
25/// UiText_RenderStringTiles, UiText_DrawString
26/// Screens selection.c: Menu_SelectionLoop, Menu_RunTopSelection;
27/// options.c: Menu_RunWorkspaceOptions,
28/// Menu_RunWorkspaceSelectionLoop
29
30#include "window_internal.h"
31
32// The window object's code, in ROM order. Each part is compiled here, as part
33// of this one object, never on its own: the order of these includes is the
34// order of the code in the ROM.
35#include "window/windows.c"
36#include "window/typing.c"
37#include "window/frames.c"
38#include "window/glyphs.c"
39#include "window/decode.c"
40#include "window/measure.c"
41#include "window/sprites.c"
42#include "window/messages.c"
43#include "window/icons.c"
44#include "window/selection.c"
45#include "window/shortcuts.c"
46#include "window/options.c"
47#include "window/text_tiles.c"
The message decoder: articles, names and numbers written out.
Window zoom and frames, and opening and waiting on message windows.
Characters rendered into tiles, string widths and number formatting.
Sizing windows to their text and fitting them on the screen.
Window colours, the option screen and the system menu.
The selection screen's row of icons, and the field menu.
The area name notice, the Psynergy shortcut picker and heap block 19.
Text drawn as tiles, text tile ownership and divider lines.
The per-frame message update: typing text and running its control codes.
Item, Psynergy and command icons.
Message strings and arguments, symbol decoding and portrait windows.
Characters drawn into windows, and the per-frame sprite update.
What every part of the window object shares: its includes, edition values, macros and the codes of de...
The render output pool, opening and closing windows, starting messages.