Data Structures

Key data structures defined in include/decor.hpp. These are the primary data containers for world state, level files, network packets, and save games.

Cellule

A single world grid cell. The world is a 100×100 grid of these.

typedef struct {
    short icon;  // sprite index into the background/decor sheet
} Cellule;

Used in DescSave::decor[100][100] and DescSave::bigDecor[100][100] as raw short values.

MoveObject

Tracks one of up to 200 (MAXMOVEOBJECT) simultaneously active moving game objects: enemies, bombs, vehicles, collectibles, and visual effects. Managed by CDecor in src/decmove.cpp.

FieldTypeDescription
typeshortObject type (TYPE_* constant)
stepAdvanceshortSteps taken when advancing (moving toward end)
stepRecedeshortSteps taken when receding (moving toward start)
timeStopStartshortTime spent stopped at start position
timeStopEndshortTime spent stopped at end position
unknown1shortUnknown field (decompilation artifact)
posStartPOINTStarting position (world coordinates)
posEndPOINTTarget/end position
posCurrentPOINTCurrent interpolated position
stepshortCurrent animation step index
timeshortTimer for current motion/dwell phase
phaseshortCurrent motion phase (advance, stop, recede)
channelshortSprite render channel (CH*)
iconshortSprite icon index within the channel spritesheet
unknown2shortUnknown field (decompilation artifact)

DescFile

Level file header, stored at the beginning of each worldNNN.blp file. Contains per-level settings that do not change during gameplay.

FieldTypeDescription
majRevshortFile format major revision
minRevshortFile format minor revision
posDecorPOINTInitial camera/scroll position
dimDecorPOINTWorld dimensions (usually 100×100)
worldshortWorld/chapter number
musicshortBackground music track (0–9)
regionshortVisual region/theme (selects decor spritesheet 0–31)
blupiPos[4]POINT[4]Player start positions (up to 4 players)
blupiDir[4]int[4]Player start facing directions
name[100]char[100]Level name string (null-terminated)

DescSave

Complete serialized game state (~56KB). Written to save game slots by src/decio.cpp. Also called DescLevel in some older references.

Format Header

FieldTypeDescription
lgintTotal struct size in bytes
majRevintSave format major revision
minRevintSave format minor revision

World Grid

FieldTypeDescription
decor[100][100]shortMain terrain grid (icon indices)
bigDecor[100][100]shortBackground decor layer (icon indices)
balleTraj[100][13]charGlue ball trajectory data
moveTraj[100][13]charMoving object trajectory data
moveObject[200]MoveObjectAll active moving objects

World State

FieldTypeDescription
posDecorPOINTCurrent camera position
dimDecorPOINTWorld dimensions
phaseintCurrent game phase
termintTerminal/end-of-level flag
musicintCurrent music track index
regionintCurrent visual region
timeintGame timer
missionTitle[100]charCurrent mission/level name

Crate Management

FieldTypeDescription
nbRankCaisseintNumber of ranked crate entries
rankCaisse[200]int[200]Crate ordering/ranking array
nbLinkCaisseintNumber of crate links
linkCaisse[200]int[200]Crate link targets array

Player Position and Motion

FieldTypeDescription
blupiPosPOINTCurrent player position in world pixels
blupiValidPosPOINTLast known safe/valid position
blupiActionintCurrent animation/action code (ACTION_*)
blupiDirintFacing direction
blupiPhaseintCurrent animation frame phase
blupiVitessePOINTCurrent velocity (pixels per tick)
blupiIconintCurrent primary sprite icon index
blupiSecintSecondary sprite icon index (shield, power-up overlay)
blupiChannelintCurrent sprite channel (CH*)
blupiVectorPOINTMovement vector for current action
blupiTransportintVehicle mode: 0=none, 1=helicopter, 2=jeep, 3=tank
blupiStartPos[4]POINT[4]Respawn positions for up to 4 players
blupiStartDir[4]int[4]Respawn facing directions

Player State Flags

FieldTypeDescription
blupiFocusBOOLPlayer has input focus (accepts damage)
blupiAirBOOLPlayer is airborne
blupiHelicoBOOLIn helicopter
blupiOverBOOLIn hovercraft
blupiJeepBOOLIn jeep
blupiTankBOOLIn tank
blupiSkateBOOLOn skateboard
blupiNageBOOLSwimming in deep water
blupiSurfBOOLSwimming at water surface
blupiVentBOOLBeing blown by wind
blupiSuspendBOOLHanging from bar
blupiJumpAieBOOLJump-hurt state active
blupiShieldBOOLShield power-up active
blupiPowerBOOLLollipop power active
blupiCloudBOOLCloud invisibility active
blupiHideBOOLHidden state active
blupiInvertBOOLControls inverted
blupiBalloonBOOLIn balloon
blupiEcraseBOOLBeing crushed
blupiRestartBOOLRestart pending
blupiFrontBOOLPlayer rendered in front of objects

Player Inventory and Timers

FieldTypeDescription
blupiBulletintGlue shots remaining (BIRDLIME cheat gives 10)
blupiCleintKey bitmask: bit 0=red, bit 1=green, bit 2=blue (CLE_* flags)
blupiPersointPersonal bombs remaining (TENBOMBS cheat gives 10)
blupiDynamiteintDynamite sticks carried
blupiNoBarreintBar-hanging timer
blupiTimeShieldintShield remaining ticks (ROUNDSHIELD gives 100)
blupiTimeFireintFire attack cooldown timer
blupiTimeNoAscintElevator-skip timer
blupiTimeOufintOuf reaction timer
blupiActionOufintOuf reaction action
blupiFifoNbintFIFO position queue size
blupiFifoPos[10]POINT[10]FIFO position queue (path following)
blupiPosHelicoPOINTHelicopter position (for vehicle camera tracking)
blupiPosMagicPOINTMagic/shield effect origin position

Vehicle State

FieldTypeDescription
bHelicoMarchBOOLHelicopter is moving
bHelicoStopBOOLHelicopter is stopped/hovering
bJeepMarchBOOLJeep is moving
bJeepStopBOOLJeep is stopped

Level State

FieldTypeDescription
doors[200]charDoor state array (open/closed per door index)
nbViesintRemaining lives
nbTresorintTreasures collected so far
totalTresorintTotal treasures in the level
goalPhaseintCurrent goal/objective phase
scrollPointPOINTCurrent scroll position
scrollAddPOINTScroll velocity
jaugeHide[2]BOOLGauge visibility per slot (JAUGE_AIR=0, JAUGE_POWER=1)
jaugeType[2]BOOLGauge type per slot
jaugeLevel[2]BOOLGauge level per slot
blupiLevelintPlayer level
bFoundCleBOOLKey has been found this level
bPrivateBOOLPrivate/custom level flag
missionintCurrent mission/level number
bCheatDoorsBOOLCheat: all doors open (OPENDOORS)
bSuperBlupiBOOLCheat: invincible player (MEGABLUPI)
bDrawSecretBOOLCheat: show hidden objects (SHOWSECRET)
bJoystickBOOLJoystick mode flag

Voyage / Travel System

FieldTypeDescription
voyageIconintIcon index for travel animation
voyageChannelintChannel for travel animation
voyagePhaseintCurrent phase in the travel sequence
voyageTotalintTotal steps in the travel sequence
voyageStartPOINTTravel start position
voyageEndPOINTTravel end position

Decor Animation

FieldTypeDescription
decorActionintActive decor tile animation action
decorPhaseintDecor animation phase

Unknown / Decompilation Artifacts

FieldTypeDescription
idklolintUnknown field (decompilation artifact — name from source)
d8f8intUnknown field (decompilation artifact — hex address name)

NetPacket

Network synchronization packet sent by each player every game tick. Contains input state, player position, animation, and up to 5 game events.

FieldTypeDescription
sizecharPacket size in bytes
typecharPacket type (PK_*)
keyPressshortCurrent key input bitmask (KEY_*)
timeintSimulation time (game tick)
blupiPosX/YshortPlayer position
blupiIconshortCurrent sprite icon
blupiSecshortSecondary icon
blupiChannelcharSprite channel
blupiTransportcharVehicle transport mode
unk12charUnknown field (decompilation artifact)
nbMessagescharNumber of messages in this packet (max 5)
messages[5]NetMessage[5]Piggy-backed game events

NetMessage

A compact game event, up to 5 of which can be embedded in a NetPacket.

FieldTypeDescription
typecharMessage type (MESS_* constant)
data1charFirst data byte
data2shortSecond data word
data3shortThird data word
data4shortFourth data word