Skip to Content
The Alchemy Project

src/field/field_engine_internal.h

What every part of field_engine.c shares: its includes and the macros and types more than one part uses. More…

Included by actor_placement.c, field_engine.c, field_engine_actors.c, field_engine_cues.c, field_engine_encounter.c, field_engine_ground_mask.c, field_engine_item_display.c, field_engine_items.c, field_engine_palette_editor.c, field_engine_palette_fade.c, field_engine_psynergy.c, field_engine_run.c, field_engine_screen_transition.c, field_engine_speakers.c, field_engine_targets.c, field_engine_treasure_spots.c, field_engine_walking.c and screen_transition_shapes.c.

Structures

NameDescription
unionPOLAR_OFFSET_POSA position syVectorAddPolarOffset moves: as a vector, or as its three coordinates.
structSCENE_ENCOUNTER_RULEA scene's encounter zones (SceneEncounterRules, encounter_rules.s; rows of encounter_zones.c), ended by scene -1.
structMAP_MUSIC_RULEA rule choosing a scene's field music (SceneMusicRules, music_rules.s), ended by id -1.
structAREA_NAME_RULEA rule naming the area a scene is in (AreaNameRules, area_name_rules.s), ended by id -1.

Macros

NameDescription
#defineUNIT_NONE 15No user named: fdUsePsynergy takes ISAAC, and fdUseItem whoever holds the item in the most inventory slots.
#definePSYNERGY_MESSAGE (who, act, m)Shows message m with the user's and the Psynergy's names, and waits.

Variables

NameDescription
extern const SPEAKER_DEFINITIONSpeakerDefinitions []The speakers' definitions (field_engine_tables.c), read by fdSpeakerFindDefinition.
extern const SCENE_ENCOUNTER_RULESceneEncounterRules []The scenes' encounter rules; the first that matches the scene and entrance, with its flag unset, gives the encounter zones.
extern const MAP_MUSIC_RULESceneMusicRules []The field music rules; the first that matches the scene or its area, the entrance and the flag gives the music.
extern const AREA_NAME_RULEAreaNameRules []The area name rules; the first that matches the scene or its area and the entrance gives the name.
extern const Uint16EncounterBattleMusic [35]The battles that play music of their own (battle_music.c): each song as ENCOUNTER_BATTLE_MUSIC(song), followed by ENCOUNTER_KEY(zone, slot) rows.
extern const ACTOR_PLACEFieldDefaultActorPlacements [2]The party leader's actor placement table (actor_placement.c), which fdActorResetForLeader copies into the field state.
extern Uint16ColorBufferChannelCurve []Curves mapping a 5-bit colour channel to the colour buffer's channel, shifted up 10 bits: plain, lightened and with more contrast (declared non-const to match GCC 2.9's aliasing in field_engine_palette_fade.c).
extern Uint16ColorBufferChannelCurveLight []
extern Uint16ColorBufferChannelCurveContrast []

Description

What every part of field_engine.c shares: its includes and the macros and types more than one part uses. field_engine.c includes it before the parts, and each part includes it too, so that a part read on its own resolves. It places no bytes.

Macros in detail

UNIT_NONE

#define UNIT_NONE 15

No user named: fdUsePsynergy takes ISAAC, and fdUseItem whoever holds the item in the most inventory slots.

Referenced by fdUseItem() and fdUsePsynergy().

Definition at line 47 of file field_engine_internal.h.

PSYNERGY_MESSAGE

#define PSYNERGY_MESSAGE(who, act, m)

Shows message m with the user's and the Psynergy's names, and waits.

Referenced by fdUsePsynergy().

Definition at line 50 of file field_engine_internal.h.

Variables in detail

SceneEncounterRules

extern const SCENE_ENCOUNTER_RULE SceneEncounterRules[]

The scenes' encounter rules; the first that matches the scene and entrance, with its flag unset, gives the encounter zones.

Referenced by fdEncounterSelectMapZones().

Definition at line 70 of file field_engine_internal.h.

SceneMusicRules

extern const MAP_MUSIC_RULE SceneMusicRules[]

The field music rules; the first that matches the scene or its area, the entrance and the flag gives the music.

Referenced by fdChooseMusic().

Definition at line 85 of file field_engine_internal.h.

AreaNameRules

extern const AREA_NAME_RULE AreaNameRules[]

The area name rules; the first that matches the scene or its area and the entrance gives the name.

Referenced by fdAreaGetNameIndex().

Definition at line 101 of file field_engine_internal.h.