src/field
Guide: Field Engine
Files
| File | Description |
|---|---|
actor_placement.c | The idle script, and the placement table the field starts with. |
actor_scripts.c | The actor scripts the field and its scenes run. |
actor_step_angle.c | An actor script call that turns an actor toward an angle a step at a time. |
battle_background_rules.c | The battle background of each scene (fdBattleBackgroundSelectForMap). |
battle_music.c | The battle music of the story's and the hidden bosses' battles (fdEncounterSelectBattleMusic). |
encounter_zones.c | The 110 encounter zones, by zone number: each zone's rate, level, formations and their weights. |
facing.c | Which picture a sprite shows for the way it faces, and the small tables and scripts the actors read as they move: the direction pad's headings, the World Map camera's lean, a floating actor's bob, how long a footprint lasts, the order a sprite dissolves in and the World Map's graphics sets. |
field.c | The field object, the field module's C as The Broken Seal's field.c is: resource metadata and LZ decompression, composing sprite pictures and placing projected sprites, the resource slots (sprite animations, actors and their motion and scripts, the player's control, the map grid and layers and the World Map), the tile animation, the view (screen shake and the ground plane) and the debug sprite viewer. |
field_actor_camera.c | The actor camera: placing every actor's sprites on screen each tick under the scrolling or the fixed camera. |
field_actor_motion.c | Actors' motion each tick: their scripts, steering toward a target, falling, floating and riding a platform, and being sent somewhere. |
field_actors.c | Actors: a sprite dissolving pixel by pixel, the actor system, creating and releasing actors, their animations and scripts, and placing their sprites each tick under the scrolling or the fixed camera. |
field_decompress.c | Resource metadata records and LZ decompression. |
field_effect_advance_motion.c | A field effect's motion each tick. |
field_effect_data.c | The ropes' phases, the tints a field Psynergy fades toward, and the scripts that hold and release a field effect. |
field_effect_move.c | A field effect's motion, growth and spin each tick, with no drag. |
field_effect_scripts.c | Four effect scripts of the field engine module, the found item's picture growing in and pulsing, a sinking particle and a Reveal marker, then the screen transitions' tables and the palette tints' channel curves, as The Broken Seal's field_engine_tables.c has them. |
field_effect_spawn_resident.c | The main image's copy of the overlays' effect spawner (field_effect_spawn.c), an object of its own between the script commands: Carry's ring of dust (fdEffectSpawnRadialParticleRing) spawns through it. |
field_effect_tables.c | Tables of the field Psynergy, in the order of The Broken Seal's field_engine_tables.c: the pad's eight headings, Move's hand poses, the scripts of Growth's leaves, Force's fist and the three effect lengths, a halted actor's flicker, the Arrow's wobble, the metatiles Cyclone looks at and Blaze's tints. |
field_engine.c | The field engine's object, as The Broken Seal's field_engine.c begins: random encounters, a field scene's actors, the leader's walking and the requests it raises, fdEngineRun, the debug palette editor, the scene's cues, the actor a field Psynergy or item aims at, using items and Psynergy on the field, and the map's treasure spots. |
field_engine_actor_commands.c | Script commands on actors: placing, moving and animating them. |
field_engine_actors.c | The party's sprites, placing a scene's actors, and the actor table. |
field_engine_cues.c | Finding and running a scene's cues: talking, step cues, examine cues. |
field_engine_encounter.c | Random encounters, and each scene's music, area name and battle background. |
field_engine_ground_mask.c | The ground mask: 16-pixel sprites kept beside an actor where the ground before it rises, in a fade form nothing starts and a blank form Aqua Rock starts, which draws no visible pixel; and the effect sprites that borrow their tiles. |
field_engine_heading.c | A heading picture shown in a window that opens from the centre, and wiped away from the left. |
field_engine_internal.h | What every part of field_engine.c shares: its includes, and the declarations its parts call before their definitions or once declared differently. |
field_engine_item_display.c | Showing a found item, and Reveal's sparkles on hidden things. |
field_engine_items.c | Using an item on the field. |
field_engine_palette_editor.c | The debug palette editor. |
field_engine_palette_fade.c | The palette fades: a fade between two built palettes over a number of ticks, and the palettes it builds from the shown one. |
field_engine_psynergy.c | Using Psynergy on the field. |
field_engine_requests.c | Battles and destinations a script requests, and the queued sound. |
field_engine_run.c | The field engine: running a scene until the party leaves it, and its entrance. |
field_engine_screen_transition.c | The screen transitions: windows that close over the screen or open it, line by line, and the dissolve. |
field_engine_script.c | Script commands: waits, received items, questions and destinations. |
field_engine_speakers.c | Who speaks: each sprite's speaker definition, its voice and its halted lines, and the pair table. |
field_engine_sprite_color_tables.c | A second copy of the ten sprite colour tables in field/sprite_color_tables.c, the five conversion tables then the five byte remap tables, in the field engine module: the picture decoder's data (picture_decode.s) points at this copy. |
field_engine_tables.c | The search command's messages. |
field_engine_targets.c | The actor a field Psynergy or item aims at, and the helpers that follow it. |
field_engine_treasure_spots.c | The map's treasure spots: chests and Psynergy Stones. |
field_engine_walking.c | Field requests and each tick of the leader's walking: exits, encounters, damage. |
field_internal.h | What every part of the field object shares: its includes and the names two or more parts use. |
field_map_grid.c | Layered maps: decoding their tilemaps and palette, loading, drawing and scrolling, copying metatiles, and the edits flags apply. |
field_move_by_keys.c | Moving actors by the direction pad: the party's keys, crossing a rope or a tightrope, and moving as Sand, on a map and on the world map. |
field_pad_movement.c | Script commands that move the leader by the pad, on the map and the world map, and the configured keys checked from a script. |
field_player_control.c | Player control: the configured keys, and SC_PLAYER, the leader moved by the pad (fdActorUpdatePlayerControl). |
field_psynergy.c | The field_psynergy object: the field Psynergy that spread effects around their target, then in ROM order the tile copies, the field Psynergy The Lost Age adds, from Cyclone to Hover (each part named for the Psynergy it runs, its kind in fdPsynergyRun), the summon tablets, the actors' metatiles, the canvas, sparks and field particles, and the world and map screen and its image. |
field_psynergy_actor_metatiles.c | Actors standing as blocks in the map: their metatiles tagged and the tags cleared, the actor at a position, and effect sprites filled and queued. |
field_psynergy_arcs.c | |
field_psynergy_arrow.c | Arrow: the unused "A??" field Psynergy's bow and flaming arrow. |
field_psynergy_avoid.c | |
field_psynergy_blaze.c | Blaze, and the check whether an actor stands where the map or another actor blocks it. |
field_psynergy_burst.c | Burst: its glow and sparks, and its explosions on the target. |
field_psynergy_canvas.c | The canvas a field effect draws into and its darkening, an actor appearing in a whirl of sparks, and the field particles that fly to their targets. |
field_psynergy_catch.c | Catch: throwing a hand at a distant item to pull it back. |
field_psynergy_cyclone.c | Cyclone and the whirlwinds: Cyclone's 96 leaves, the leader carried or lifted to a Cyclone metatile, Cyclone itself, an actor arriving in a whirlwind, spinning down from above (fdActorDescendInWhirlwind) or appearing in it (fdActorAppearInWhirlwind), then Blaze's jet of flame and the smoke it leaves. |
field_psynergy_grind.c | Grind: the screen shakes up and down while spray rises round the target, a sea rock is ground away, and the plain sway Grind makes at nothing. |
field_psynergy_growing_sprite.c | The dust Scoop throws up, each grain growing as it flies. |
field_psynergy_halt.c | |
field_psynergy_hover.c | Hover: its glow, the cast and its end. |
field_psynergy_internal.h | What every part of the field_psynergy object shares: its includes. |
field_psynergy_lash.c | |
field_psynergy_lookups.c | Lookup tables of field Psynergy after Burst's glow: the Ring's picture map, the sprite shapes' sizes and the darkening maps of the colour ramp. |
field_psynergy_map_screen.c | The map screen: its markers and cursor (The Broken Seal's script_commands_map_screen.c), and where the leader stands on it. |
field_psynergy_map_screen_image.c | The map screen's image: drawing it, scrolling it with the cursor, its area markers, and zooming the view out while L is held. |
field_psynergy_parch.c | Parch, then two drawing helpers of the Ring's: a canvas pixel on a circle, and its 16 by 16-tile picture copied to BG0 clipped to the screen. |
field_psynergy_pound.c | Pound: its shine, the object it drives into the ground, and a picture's columns shifted by a wave. |
field_psynergy_retreat.c | |
field_psynergy_ring.c | The Ring, the field Psynergy of the unused ability "Ma????" (named here for the ring of light it draws): its event, its burst of sparkles, and moving the view (opening the whole map to it, swinging it and giving the bounds back). |
field_psynergy_sand.c | Sand: the leader sinking into the ground and moving as sand, the grains it throws up, the event that ends it off sand, and the dust puff it ends with. |
field_psynergy_scoop.c | Scoop: the giant hand digging, the actor dropped from it and the item dug up. |
field_psynergy_shape_entries.c | The map's shape entries and the flag blocks: the puddles Frost freezes into pillars of ice, each with the flag that says it is frozen. |
field_psynergy_summon_tablet.c | A summon tablet read: its pictures cycling, its pebbles and runes flying, and placing the flag blocks. |
field_psynergy_tables.c | Tables of field Psynergy after Burst's palette: what Scoop digs up, Hover's glow, the Summon tablet's squash and the World Map markers' blend. |
field_psynergy_teleport.c | Teleport: the leader leaving in a burst of sparks and arriving in a whirl of them, and the cast that opens the picture of the world. |
field_psynergy_tile_copies.c | |
field_psynergy_tremor.c | Tremor: the view swayed from side to side. |
field_psynergy_whirlwind.c | Whirlwind: radial particle rings, circling and wandering leaves and the Whirlwind orb. |
field_script_commands.c | Actor script commands: waits, jumps, flags, moves and work values. |
field_sprite_animation.c | Sprites, their animations and the picture caches they draw from. |
field_sprite_draw.c | Drawing sprites: composing their animations' pictures and placing projected sprites on screen. |
field_sprite_viewer.c | The debug sprite viewer: one sprite shown once for each way it can face, in a ring, with up to four sprite animations laid over it and the keys to change each one's sprite, animation, priority and colour mode. |
field_terrain.c | The ground heights and the collision of metatiles and the World Map. |
field_tile_animation.c | World map tile preloading and still image, and timed map changes: the map animations, the blend script, the palette cycle and the World Map region tint. |
field_view.c | Screen shake, the copied BG row drawer and the ground plane scanlines. |
field_world_map.c | The world map: its perspective view, its tiles, and drawing its metatiles into a BG map. |
grid_outline.c | The grid outliner, compiled as ARM code and copied to RAM to run, entered in Thumb through fdGridDrawOutlineCode (field_arm_entries.s). |
lucky_dice.c | The Lucky Dice minigame: its tables, its start, its helpers and its run. |
lucky_wheels.c | Lucky Wheels, Contigo's game of chance: the player trades game tickets for lines, pulls the lever up to five times and locks wheels to line up matching icons. |
map_grid_data.c | Map ground: the height function of each metatile kind, the world map's battle environments and the sprite viewer's small tables after them; then the actor scripts the field starts by itself, the actor script command table and the work value handlers. |
palette_cycle_add.c | Adding a palette cycle. |
palette_cycle_initialize.c | Allocating the palette cycles' queue. |
psynergy_reach.c | How far each field Psynergy reaches. |
screen_transition_shapes.c | The window shapes of WINDOW_TRANSITION_SHAPE, one for each step of its progress (fdScreenTransitionUpdateScanlineTable): a hand sweeping clockwise from twelve o'clock round the centre of the screen, as The Broken Seal has them. |
script_commands.c | The script_commands object, its parts in script_commands/ in ROM order, ending with the script commands that follow it: the effect scene, Mind Read to Cloak, the rest of Cloak and Carry. |
script_commands_actor_commands.c | Script commands on actors: their callbacks, sprite priority and still pictures. |
script_commands_camera.c | The script commands that move the camera and wait for it. |
script_commands_carry.c | Carry: two hands lift the target, move it with the d-pad and drop it, or crash together when cast at nothing. |
script_commands_climbing.c | Jumping, climbing and stepping onto and off ropes and tightropes. |
script_commands_cloak.c | Cloak, Douse, falling particles and steering a lifted target. |
script_commands_djinni.c | A Djinni's battle start and its joining the party, the field effect sprites' slots, and a Jupiter Djinni's light. |
script_commands_douse.c | |
script_commands_exit_animations.c | An actor's screen position, the encounter transition, and the context effects of leaving through an exit and arriving. |
script_commands_field_psynergy.c | Helpers the field Psynergy kinds share: map metatiles, spawned actors and particles, and the field's tint. |
script_commands_field_psynergy_state.c | The effect scene a field Psynergy runs in: fading to and from its cast colour, its effect slots and resources, the actor pair it works on, and Mind Read's wave and palettes. |
script_commands_force.c | |
script_commands_frost.c | |
script_commands_ground_particles.c | The ground particles, the rising particles and the floating motes. |
script_commands_growth.c | Growth: growing plants, hanging vines and scattering leaves. |
script_commands_internal.h | What every part of script_commands.c shares: its includes and the macros and types more than one part uses. |
script_commands_jupiter.c | A Jupiter Djinni joining the party, and per-tick updates the field effects share: a pulse, a quickening spin, a slow shrink, and a Mars Djinni's sparks. |
script_commands_lift.c | Lift: lifting a target with two hands and the heavy impact burst. |
script_commands_line_scroll.c | The line scroll: per-line scroll offsets fed by HBlank DMA. |
script_commands_mars.c | A Mars Djinni joining the party, the fast shrink that ends a spin, and a Venus Djinni's motes and particles. |
script_commands_mercury.c | A Mercury Djinni joining the party. |
script_commands_messages.c | Messages shown at an actor, and the speaker's voice. |
script_commands_mind_read.c | Mind Read: its wave, ripple, tint, crescents and caster colour cycle. |
script_commands_motes.c | Weather drawn in sprites on the field, and the storm's lightning: floating motes, rain, rising sparkles, and the flashes of the palettes. |
script_commands_move.c | Move: steering a pushed target with the +Control Pad and the Move hand. |
script_commands_movement_types.c | |
script_commands_ply.c | Ply: swaying particles, shrinking orbits and sparks. |
script_commands_psynergy_dispatch.c | Running a field Psynergy by its kind, and the priority and depth its sprites take to be drawn with an actor. |
script_commands_reveal.c | |
script_commands_ropes.c | Ropes, tightropes and hanging vines: chains of nodes laid between two points or round one, drawn and updated each tick, and the leader crossing them. |
script_commands_scripts.c | The particle scripts of the field commands after the rope and vine pictures, Mind Read's colour cycle and the pad's headings, in the order of The Broken Seal's field_engine_tables.c. |
script_commands_tables.c | Tables of the field commands, in the order of The Broken Seal's field_engine_tables.c: the rope's headings, the line scroll's sine, the rain's frames and offsets, the sparkles and the leader's pulse as a Mars Djinni joins. |
script_commands_venus.c | A Venus Djinni joining the party, and a Mercury Djinni's droplets. |
script_commands_view.c | The view bounds, zoom transitions and actors that ride another. |
script_commands_weather.c | The weather on the field: The Broken Seal's rain kept whole, this game's rain, and the storm's lightning. |
speaker_voices.c | The voice each sprite speaks in, and a few small actor scripts and tables: an actor's bounce, the dust puffs' lives and a blinking actor's colours. |
sprite_color_tables.c | The sprite colour tables, 256 bytes each, that recolour a sprite picture by turning each colour of the basic sprite palette into another: five channel swaps, a greyscale, three tints and a negative. |
super_lucky_dice.c | Super Lucky Dice, Contigo's four-dice game with its hi-lo game to double the winnings. |
terrain_tables.c | The ground's shape inside a metatile for two of its height kinds (enum TERRAIN_KIND): where a raised or sunken square rounds off at its corners, and which of three heights each pixel takes, split along two slants. |
world_map_cursor_angles.c | Which way the cursor of the map screen moves for the +Control Pad (fdMapScreenUpdateMarkers). |
world_map_encounter_rules.c | Where the World Map's random battles come from: each region of the map, on foot and aboard the ship, takes its own encounter zone, and each Djinni battle its zone and slot. |
world_map_lines.c | The World Map's tilt: each line of the screen draws the flat map at its own scale and turn, so the ground seems to stretch away to a horizon. |