Engine glossary

May 8, 2026 ยท View on GitHub

Domain terms for the LBA2 engine. Each entry links to the source file where the concept is defined or primarily implemented.

Truth hierarchy: code > this document > external sources.

World

TermAlso known asDefinitionCode locationReference
CubeScene, RoomA single game level or room. The world has 223 cubes (0-222). NumCube holds the current index. See SCENES.md for the full index with location names.SOURCES/OBJECT.CPP (ChangeCube)--
CubeMode--0 = interior (isometric grid), 1 = exterior (3D heightmap).SOURCES/COMMON.H (CUBE_INTERIEUR, CUBE_EXTERIEUR)--
BufCubeCollision grid64x64x25 cell grid loaded per interior scene. Each cell holds a collision value.SOURCES/GRILLE.CPP--
ZoneTrigger zoneAxis-aligned bounding box that triggers an action when the hero enters it.SOURCES/COMMON.H (T_ZONE), SOURCES/OBJECT.CPP (CheckZoneSce)--
Zone type--Numeric 0-9 (MAX_TYPES_ZONE=10). Type 0 = cube change, type 1 = camera, type 6 = ladder. No named constants in source.SOURCES/COMMON.H, SOURCES/OBJECT.CPP--
HQR--Archive file format used for all game resources.SOURCES/COMMON.H (file name constants)LBA File Info (incomplete; missing video.hqr)

HQR resource files

Purposes sourced from LBA File Info, verified against #define constants in SOURCES/COMMON.H (lines 66-80). LBA File Info omits video.hqr; the list below is complete per the source code.

FilePurpose
lba2.hqrEnding credits data
scene.hqrScripts defining active scene content
body.hqr3D models of characters
anim.hqrAnimations for 3D models
anim3ds.hqr3DS-format animations
objfix.hqr3D models of fixed objects
samples.hqrSound samples (excluding voices)
text.hqrIn-game dialogue text
screen.hqrFull-screen images
sprites.hqrCompressed sprites; see MENU.md for SPRITE_CURSOR (173) and the menu pointer
spriraw.hqrRaw-format sprites
ress.hqrMiscellaneous resources
lba_bkg.hqrIsometric background maps, bricks, objects
holomap.hqrHolomap data and textures
video.hqrVideo/cinematic data
scrshot.hqrDemo screenshot images

ILE/OBL pairs (exterior island surfaces)

Each island has a .ile (3D surface + textures) and .obl (3D objects) file. Loaded dynamically by SOURCES/3DEXT/LOADISLE.CPP; island base names (for index) in SOURCES/EXTFUNC.CPP (lines 202-213). Table below shows asset filenames.

FilesIsland
Citabau.ile/oblCitadel Island (good weather)
Citadel.ile/oblCitadel Island (rain)
Desert.ile/oblWhite Leaf Desert
Emeraude.ile/oblEmerald Moon
Celebrat.ile/oblCelebration Island (no statue)
Celebra2.ile/oblCelebration Island (statue emerged)
Otringal.ile/oblOtringal
Platform.ile/oblIsland of the Wannies
Mosquibe.ile/oblIsland of the Mosquibees
Knartas.ile/oblFrancos Island
Ilotcx.ile/oblIsland CX
Ascence.ile/oblElevator to the Undergas
Souscelb.ile/oblVolcano Island
Moon.ile/oblEmerald Moon (second visit)

VOX files (voice packs)

xx_NNN.vox where xx is the language code. See LBA File Info for per-island mapping.

Objects

TermAlso known asDefinitionCode locationReference
T_OBJET--Full game object: position, body, anim, scripts, collision, flags, stats. Up to MAX_OBJETS (100) per scene. Hero is always object 0.SOURCES/DEFINES.H--
T_OBJ_3DObj3D sub-struct within T_OBJET: X/Y/Z position, Alpha/Beta/Gamma rotation, Body/Anim indices, frame state.LIB386/H/OBJECT/AFF_OBJ.H--
ListObjet--Array of T_OBJET[MAX_OBJETS]. Populated by ChangeCube() on scene load.SOURCES/OBJECT.CPP--
GenBodyBody indexWhich 3D model the object currently uses. See enum table below.SOURCES/DEFINES.H (GEN_BODY_*)--
GenAnimAnimation IDWhich animation is currently playing. See enum table below.SOURCES/DEFINES.H (GEN_ANIM_*)--
ZVZone de Vie, Bounding volumeAxis-aligned bounding box of an object: XMin/XMax, YMin/YMax, ZMin/ZMax. Hero ZV is ~500 units wide, nearly filling a 512-unit grid cell.SOURCES/DEFINES.H (T_OBJET fields)--

Scripts

TermAlso known asDefinitionCode locationReference
Life ScriptBehavior script, LM_*Bytecode controlling object behavior (AI decisions, dialogue triggers, state changes). Executed per-frame by DoLife(). 131 LM_* opcodes in SOURCES/COMMON.H; often cited as 155 total (parameter variants or external count).SOURCES/GERELIFE.CPP, SOURCES/COMMON.H--
Track ScriptMovement script, TM_*Bytecode controlling object movement paths (go-to-point, wait, loop). Executed per-frame by DoTrack(). 53 macros total.SOURCES/GERETRAK.CPP, SOURCES/COMMON.H--
PtrLife / OffsetLife--Pointer to life script bytecode and current execution offset within it.SOURCES/DEFINES.H (T_OBJET fields)--
PtrTrack / OffsetTrack--Pointer to track script bytecode and current execution offset.SOURCES/DEFINES.H (T_OBJET fields)--

Hero

TermAlso known asDefinitionCode locationReference
ComportementBehavior modeHero's current play style, affecting movement, combat, and abilities.SOURCES/COMMON.H, SOURCES/PERSO.CPP--
ListVarGameGame variablesArray of 256 quest/story state variables (MAX_VARS_GAME). Set by LM_SET_VAR_GAME, read by life scripts.SOURCES/GLOBAL.CPP--
DemoSlideDemo modeBuilt-in non-playable mode. Player input is ignored, dialogues auto-advance.SOURCES/GLOBAL.CPP, SOURCES/C_EXTERN.H--
InputInput bitmaskBitfield of currently pressed actions. See input names table below.SOURCES/PERSO.CPP (MyGetInput)--
BetaFacing angleObject orientation, 0-4095 (4096 = 360 degrees). 0 = +Z (north), 1024 = +X (east), 2048 = -Z (south), 3072 = -X (west).SOURCES/DEFINES.H (MAX_ANGLE=4096)--

Collision grid (interior scenes)

Interior scenes use an isometric grid-based collision system.

PropertyValueSource
Grid cells X/Z64 x 64SIZE_CUBE_X=64, SIZE_CUBE_Z=64 in SOURCES/DEFINES.H
Y levels25SIZE_CUBE_Y=25 in SOURCES/DEFINES.H
Cell size (XZ)512 world unitsSIZE_BRICK_XZ=512 in SOURCES/DEFINES.H
Y level height256 world unitsSIZE_BRICK_Y=256 in SOURCES/DEFINES.H
Full rotation4096 unitsMAX_ANGLE=4096 in SOURCES/DEFINES.H

Collision values

ValueMeaning
0Empty (passable if floor below)
1Solid wall
2-5Simple slopes (connect adjacent Y levels)
6-13Composite slopes

Walkability rules

A cell is walkable when:

  • col=0 with solid floor below (col=1 at Y-1, or Y=0 for implicit ground), OR
  • col=2-13 (slope provides its own floor)
  • Head clearance: 5 Y-levels above must be empty

The hero ZV is ~500 units wide (+-250), leaving only ~6 units clearance per side in a 512-unit cell. Off-center positions cause corner clipping.

Movement (approximate at 25 FPS)

ParameterValueNotes
Walk speed48 units/frameAfter 8-frame startup delay
Turn rate (in-place)~61 beta/frame avg6-frame startup, accelerates 58 to 90
Turn rate (walking)~41 beta/frameUP+LEFT or UP+RIGHT composite input
Beta range0-4095 (4096 = 360 degrees)0=north, 1024=east, 2048=south, 3072=west

Enum reference tables

GenAnim (animation IDs)

ValueConstantMeaning
0GEN_ANIM_RIENIdle
1GEN_ANIM_MARCHEWalk
2GEN_ANIM_RECULEBack up
3GEN_ANIM_GAUCHETurn left
4GEN_ANIM_DROITETurn right
5GEN_ANIM_ENCAISSEHit (take damage)
6GEN_ANIM_CHOCShock/collision
7GEN_ANIM_TOMBEFall
8GEN_ANIM_RECEPTIONLanding
9GEN_ANIM_RECEPTION_2Landing (alt)
10GEN_ANIM_MORTDeath
11GEN_ANIM_ACTIONAction
12GEN_ANIM_MONTEClimb up
13GEN_ANIM_ECHELLELadder
14GEN_ANIM_SAUTEJump
15GEN_ANIM_LANCEThrow
16GEN_ANIM_CACHEHide
17GEN_ANIM_COUP_1Melee hit 1
18GEN_ANIM_COUP_2Melee hit 2
19GEN_ANIM_COUP_3Melee hit 3
20GEN_ANIM_TROUVEFind/discover
21GEN_ANIM_NOYADEDrowning
22GEN_ANIM_CHOC2Shock 2
23GEN_ANIM_SABRESword swing
24GEN_ANIM_DEGAINEDraw weapon
25GEN_ANIM_SAUTE_GAUCHEJump left
26GEN_ANIM_SAUTE_DROITJump right
27GEN_ANIM_POUSSEPush
28GEN_ANIM_PARLETalk
29GEN_ANIM_DARTDart
30GEN_ANIM_DESCENDClimb down
31GEN_ANIM_ECHDESCLadder descend
32GEN_ANIM_ARRIMAGEDock/attach
33GEN_ANIM_SKATESkate
34GEN_ANIM_SKATEGSkate left
35GEN_ANIM_SARBACANEBlowgun
36GEN_ANIM_GANT_DROITRight glove
37GEN_ANIM_GANT_GAUCHELeft glove
38GEN_ANIM_PISTOLASERLaser pistol
39GEN_ANIM_FOUDRELightning
40GEN_ANIM_ESQUIVE_DROITEDodge right
41GEN_ANIM_ESQUIVE_GAUCHEDodge left
42GEN_ANIM_ESQUIVE_AVANTDodge forward
43GEN_ANIM_ESQUIVE_ARRIEREDodge backward
44GEN_ANIM_FEUFire
45GEN_ANIM_SARBATRONSarbatron
46GEN_ANIM_GAZGas
47GEN_ANIM_LABYRINTHELabyrinth

GenBody (body/model IDs)

ValueConstantMeaning
0GEN_BODY_NORMALDefault body
1GEN_BODY_TUNIQUETunic
2GEN_BODY_SABREWith sword
3GEN_BODY_SARBACANEWith blowgun
4GEN_BODY_SARBATRONWith sarbatron
5GEN_BODY_GANTWith glove
6GEN_BODY_PISTOLASERWith laser pistol
7GEN_BODY_MAGEWizard robe
8GEN_BODY_MAGE_SARBACANEWizard + blowgun
9GEN_BODY_FEUFire
10GEN_BODY_TUNIQUE_TIRTunic (firing)
11GEN_BODY_MAGE_TIRWizard (firing)
12GEN_BODY_LABYRINTHELabyrinth

Move types

ValueConstantMeaning
0NO_MOVEStationary
1MOVE_MANUALPlayer-controlled
2MOVE_FOLLOWFollow target
3MOVE_TRACKFollowing track script
4MOVE_FOLLOW_2Follow (variant)
5MOVE_TRACK_ATTACKTrack + attack
6MOVE_SAME_XZMatch target XZ
7MOVE_PINGOUINPenguin slide
8MOVE_WAGONWagon/rail
9MOVE_CIRCLECircular
10MOVE_CIRCLE2Circular (variant)
11MOVE_SAME_XZ_BETAMatch XZ + facing
12MOVE_BUGGYVehicle (buggy)
13MOVE_BUGGY_MANUALVehicle (manual)

Comportement (hero behavior modes)

ValueConstantMeaning
0C_NORMALNormal mode
1C_SPORTIFAthletic mode
2C_AGRESSIFAggressive/combat mode
3C_DISCRETStealth mode
4C_PROTOPACKProtopack (jetpack predecessor)
5C_DOUBLEDouble
6C_CONQUEConch horn
7C_SCAPH_INT_NORMDiving suit interior (normal)
8C_JETPACKJetpack
9C_SCAPH_INT_SPORDiving suit interior (athletic)
10C_SCAPH_EXT_NORMDiving suit exterior (normal)
11C_SCAPH_EXT_SPORDiving suit exterior (athletic)
12C_BUGGYBuggy vehicle
13C_SKELETONSkeleton disguise

Object flags (bit positions)

BitConstantMeaning
0CHECK_OBJ_COLCheck object-to-object collision
1CHECK_BRICK_COLCheck wall/brick collision
2CHECK_ZONECheck zone triggers
3SPRITE_CLIPSprite clipping
4PUSHABLECan be pushed
5COL_BASSELow collision
6CHECK_CODE_JEUCheck game code triggers
7CHECK_ONLY_FLOORFloor collision only
9INVISIBLENot rendered
10SPRITE_3D3D sprite
11OBJ_FALLABLECan fall
12NO_SHADOWShadow disabled
13OBJ_BACKGROUNDBackground object
14OBJ_CARRIERCan carry other objects
15MINI_ZVReduced bounding volume
16POS_INVALIDEInvalid position
17NO_CHOCNo shock/impact
18ANIM_3DSUses 3DS animation
19NO_PRE_CLIPSkip pre-clipping
20OBJ_ZBUFFERZ-buffer enabled
21OBJ_IN_WATERIn water

WorkFlags (bit positions)

BitConstantMeaning
0WAIT_HIT_FRAMEWaiting for hit frame
1OK_HITHit registered
2ANIM_ENDAnimation finished
3NEW_FRAMENew animation frame this tick
4WAS_DRAWNObject was rendered this frame
5OBJ_DEADObject is dead
6AUTO_STOP_DOORAuto-closing door
7ANIM_MASTER_ROTMaster rotation animation
8FALLINGObject is falling
9OK_SUPER_HITSuper hit registered
10FRAME_SHIELDShield frame active
11DRAW_SHADOWShadow drawn
12ANIM_MASTER_GRAVITYMaster gravity animation
13SKATINGSkating movement
14OK_RENVOIEDeflection OK
15LEFT_JUMPJumping left
16RIGHT_JUMPJumping right
17WAIT_SUPER_HITWaiting for super hit
18TRACK_MASTER_ROTTrack master rotation
19FLY_JETPACKFlying with jetpack
20DONT_PICK_CODE_JEUDon't pick up game code items
21MANUAL_INTER_FRAMEManual inter-frame
22WAIT_COORDWaiting for coordinates
23CHECK_FALLINGChecking fall state

Input names

Available in the Input bitmask (see MyGetInput):

UP, DOWN, LEFT, RIGHT, THROW, COMPORTEMENT, INVENTORY, ACTION, TALK, RETURN, MENUS, HOLOMAP, PAUSE, DODGE, NORMAL, SPORTIF, AGRESSIF, DISCRET, CAMERA