Skip to Content
The Alchemy Project

include/field

Guide: Field Engine

Files

FileDescription
actor.hActors, the actor snapshot, and the screen transition styles.
actor_script.hActor scripts: one Sint32 command word, then its operands, as ActorScriptCommandTable runs them.
actor_update_arm.hThe unused ARM copy of the actors' update (actor_update_arm.c), and ACTOR_ARM_VIEW, ACTOR as GCC 2.95.2 reads it.
curve.hThe step counts, value shift, and per-pixel tables of the terrain height curves (terrain_tables.c).
emote.hWhat an actor shows over it: the bubbles of fdActorShowEmoteById and the effects fdEffectSetAttached attaches.
encounter_zone.hThe encounter zones.
engine_stubs.hThe field engine module's stub calls: the commands scripts are written in (actors, messages, camera, destinations), field Psynergy, weather and the field's effects.
facing.hThe constant tables of facing.c: which picture of an animation an actor shows for each way it faces, and beside them the sprite dissolve's pixel order, the fixed camera's matrix, a floating actor's bob, the actor scripts' end script and the World Map camera's lean for the direction pad.
field.hThe field engine's shared functions, globals and actor scripts.
field_blend.hFIELD_BLEND_STATE, the field's colour blend state.
field_coordinate.hFIELD_COORDINATE, a position on the field.
field_effect.hField effects, their scripts and the flags that spawn them.
field_effect_scripts.hThe actor scripts field effects give their particles and fragments.
field_engine.hWhat the field engine's object (field_engine.c) defines for the code outside it: encounters, the field's actors, the leader's walking, the scene's cues, treasure spots, screen transitions and the palette fade.
field_engine_functions.hThe field-engine module's functions, declared in the order of its stub table.
field_engine_script.hThe field engine's script functions (field_engine_items.c, script_commands_field_psynergy.c, script_commands_scripts.c and script_commands_messages.c).
field_functions.hThe field module's functions, declared in the order of its stub table, without the tables and types field.h brings in.
field_particle.hThe particles field Psynergy moves and draws, each with a sprite of its own.
field_psynergy_state.hFIELD_EFFECT_STATE, the state of a field Psynergy.
field_state.hFIELD_STATE, the running scene's state, with its treasure spots and the raised cues the field engine handles itself.
ground_mask.hThe ground mask, which hides the parts of an actor that raised ground in front of it should cover.
lucky_dice.hLucky Dice, the dice game in Tolbi (lucky_dice.c), and the small fixed-point helpers it keeps for its 3D camera.
lucky_dice_stubs.hLucky Dice's entry point.
lucky_wheels.hLucky Wheels, Tolbi's game of chance (lucky_wheels.c), and the unused LZ packer kept beside it.
lucky_wheels_lzpack.hThe LZ packer's state: hash chains over a 1024-byte window, one chain per byte value, and the output it is building.
lucky_wheels_stubs.hThe Lucky Wheels entry point.
map_grid.hMap grids: their metatiles, layers, animations and blend scripts, and the map grid state.
particle.hParticle and SCREEN_POINT, the positions animations move through.
perspective.hThe world map's perspective view state.
scene_tables.hThe scene table formats: entrances, exits, actor placements and cues, and the macros that write them.
screen_transition.hWhat the field engine's parts share with the files that define their tables: the item-display and Reveal scripts, the palette fade's colour curves, and the screen transitions' shapes, tables and window values.
script.hThe calls scripts are written in: the constants and small inlines a scene's scripts share, over the main-image functions they call by those functions' own names (fdScriptStart, fdActorJump, fdScriptSetMessageId and the rest), whose declarations it includes.
script_commands.hWhat script_commands.c declares for the files that use it: the commands scripts run, moving on the field, weather and line scrolls, Djinn joining the party, each field Psynergy and its effects, and the map screen.
script_inline.hThe script inlines: one typed inline for each script command a script calls by its own name, passing it on to the main image's import (fdActorFaceEachOther calls fdActorTurnToFaceEachOther).
script_operands.hThe actor script interpreter and the operands its commands read.
speaker.hThe speaker lookup's view of an actor's sprite, the speaker definitions, and the palette fade's heap slot.
sprite.hAnimated sprites: their layers, pictures and colour modes, and the resource slots they draw from.
stubs.hThe field module's stub calls: actors and their sprites, movement, and the map and world map.
weather.hThe ground particles, motes of light and sparkles that the weather state holds.
world_map_affine.hThe world map's scanlines and affine lines.
world_map_encounter_rules.hWhich encounter zone each part of the World Map takes, and the Djinn battles' formations.

On this page