Skip to Content
The Alchemy Project

include/field

Guide: Field Engine

Files

FileDescription
actor.hActors, their flags and the screen transition styles.
actor_script.hActor scripts: one Sint32 command word, then its operands, as ActorScriptCommandTable runs them.
arc_effect.hThe swelling arcs a field Psynergy shows over its target.
call.hUntyped calls for the scene scripts: Call1 to Call11 call a function with that many Sint32 arguments and drop its result, and Value0 to Value4 return it.
canvas_sprite.hThe canvas sprite of a field Psynergy: a 64 by 64 sprite whose pixels an effect draws into a 4 KB canvas.
curve.hThe ground height of a map metatile from its shape's height samples, one function for each kind of slope, and the tables they read.
effect_sprite.hThe sprites a field effect draws itself, placed, scaled and turned.
emote.hWhat an actor shows over it: the bubbles of fdActorShowEmoteById and the effects fdEffectSetAttached attaches.
encounter_zone.hA row of the encounter zone table, EncounterZones (encounter_zones.c).
engine_stubs.hThe stub calls into the field engine module, as the other modules' code calls them.
facing.hThe constant tables of facing.c: which picture of an animation an actor shows for each way it faces, the fixed camera's matrix, the actor scripts for footprints, splashes, ripples, wakes and sand grains, the World Map camera's lean for the direction pad, and the World Map's graphics sets.
field.hThe field engine's routines, tables and types that other files share: the actors and their scripts, the sprites, the map grid and the World Map, entering and leaving a scene, field Psynergy and its effects, the ropes and tightropes, and the other modules' routines the field calls.
field_blend.hThe field's colour blend state.
field_coordinate.hFIELD_COORDINATE, a position on the field.
field_effect.hField effects, the small objects on the field that move, grow and spin by their scripts, the flags of a scene's effect spawner, and the tints a field Psynergy washes the screen in.
field_effect_scripts.hThe actor scripts field effects give their particles and fragments.
field_engine.hWhat the field_engine object defines for the code outside it.
field_engine_functions.hThe field-engine module's functions, declared once each in the order of its stub table, without the inlines field_engine.h brings in with field.h and its other headers.
field_engine_script.hThe field engine's script functions (field_engine_script.c, field_engine_items.c and field_engine_psynergy.c).
field_functions.hThe field module's functions, declared once each in the order of its stub table, without the inlines field.h brings in with its other headers.
field_particle.hThe field effect sprites the field Psynergy keeps (FIELD_PARTICLE).
field_psynergy.hThe states of the field Psynergy's effects: the scatter, Whirlwind's orb, the Arrow's bow, and Avoid's falling arcs.
field_psynergy_state.hThe field Psynergy's state (FIELD_EFFECT_STATE) and its particle.
field_script.hCreating actors and starting their scripts and animations from a scene.
field_sprite.hAn actor's sprite as the field's scenes read it.
field_state.hFIELD_STATE, the running scene's state, with the field Psynergy's state at its end.
flag_call.hThe game flag tests and changes that Izumo's stone and its guards and the World Map's placed actors (scWorldMapUpdatePlacedActors) make through small inlines of their own; the other scenes call script.h's fdScriptGetFlag, fdScriptSetFlag and fdScriptClearFlag.
ground_mask.hThe ground mask, sprites kept beside an actor where the ground before it rises (field_engine_ground_mask.c): its state and the view of the actor it follows.
hanging_vine.hThe hanging vines the leader swings from: their links and their swing.
lucky_dice.hLucky Dice, the dice game (lucky_dice.c), and the dice types and constants shared with Super Lucky Dice.
lucky_dice_stubs.hThe stub calls into the lucky dice module, as the other modules' code calls them.
lucky_wheels.hLucky Wheels, Contigo's game of chance (lucky_wheels.c): its reels, its effect state and its saved prizes.
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 stub calls into the Lucky Wheels module, as the other modules' code calls them.
map.hThe map's shapes and tile sets, the World Map's blocks, and the map routines the scenes call.
map_grid.hThe map grid: its layers and metatiles, the metatile behaviors and attributes the field reads, its tile animations and blend script, and the world map's collision and battle environments.
metatile_target.hThe cracked floor metatiles that Jupiter Lighthouse, Mars Lighthouse and Anemos Inner Sanctum watch (scene/shared/cracked_tile_*.c), and the sprite scene/shared/cracked_tile_mask.c draws over the one the leader stands on.
particle.hA particle's position and the screen points the effects draw at.
perspective.hThe world map's perspective view state.
scene_tables.hThe scene table formats: the scene table, entrances, exits, actor placements and cues.
screen_transition.hWhat the field engine's parts share with the files that define their tables: the field effects' scripts and colour curves, and the screen transitions' shapes and window values.
script.hThe calls scripts are written in: the small inlines a scene's scripts share, over the main-image functions they call by those functions' own names (fdActorFaceDirectionById, fdScriptShowMessageAndWait, fdActorSetSpeedParams and the rest), whose declarations it holds.
script_commands.hWhat the script commands share with the field and the scenes: the field Psynergy's casts and their states, the Djinn's join effects, the map screen's state, and the encounter zones of the story's battles.
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.hSpeaker bits, above the actor id in the low 12 bits of a message command's speaker, as fdMessageShowAtActor reads them, and each sprite's voice and Halted lines.
sprite.hAnimated sprites: their layers, the sprite picture caches and the actor system's state.
stubs.hThe stub calls into the field module, as the other modules' code calls them.
super_lucky_dice.hSuper Lucky Dice, Contigo's four-dice game (super_lucky_dice.c): its sprite state and its camera.
super_lucky_dice_stubs.hThe stub calls into the Super Lucky Dice module, as the other modules' code calls them.
view_move.hThe view's swing as Tremor and Grind shake the ground.
weather.hThe ground particles and the rain that the weather state holds.
world_map.hThe destinations the map screen marks.
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.

On this page