Game Phases (WM_PHASE_*)

Game phases control which screen or mode is active. They are dispatched as Windows messages and handled by CEvent in src/event.cpp. All 67 phases are defined as an enum in include/def.hpp, starting at WM_PHASE_INIT = WM_USER + 500 and ending at WM_PHASE_INTRO2 = WM_USER + 566.

Core Gameplay

PhaseValueDescription
WM_PHASE_INITWM_USER+500Initialization / startup
WM_PHASE_PLAYWM_USER+501Normal gameplay
WM_PHASE_BUILDWM_USER+502Level editor / design mode
WM_PHASE_PLAYTESTWM_USER+506Test play from the level editor
WM_PHASE_1531WM_USER+507Unknown/unnamed phase (decompilation artifact)
WM_PHASE_DOPLAYWM_USER+515Start single-player game
WM_PHASE_DEMOWM_USER+533Demo playback (attract mode)
WM_PHASE_STOPWM_USER+558Escape key pause menu during gameplay (comment in source)
WM_PHASE_QUITPLAYWM_USER+563Exit play back to main menu
WM_PHASE_1588WM_USER+564Unknown/unnamed phase (decompilation artifact)

Win / Lose

PhaseValueDescription
WM_PHASE_WINWM_USER+508Level won
WM_PHASE_LOSTWM_USER+509Level lost
WM_PHASE_WINMOVIEWM_USER+513Win cutscene
WM_PHASE_1539WM_USER+514Unknown/unnamed phase (decompilation artifact)
WM_PHASE_LASTWINWM_USER+516Last win — Planet Blupi vestige (comment in source)
WM_PHASE_LOSTMULTIWM_USER+525Multiplayer: lost
WM_PHASE_WINMULTIWM_USER+526Multiplayer: won
WM_PHASE_WINMOVIEMULTIWM_USER+527Multiplayer: win cutscene
WM_PHASE_WINDESIGNWM_USER+522Editor test: won
WM_PHASE_LOSTDESIGNWM_USER+523Editor test: lost
WM_PHASE_WINMOVIEDESIGNWM_USER+524Editor test: win cutscene
PhaseValueDescription
WM_PHASE_SETUPWM_USER+510Settings screen
WM_PHASE_MUSICWM_USER+511Music selection screen
WM_PHASE_PLAYMOVIEWM_USER+512Play intro movie
WM_PHASE_SETUPpWM_USER+517Settings screen (alternate variant)
WM_PHASE_REGIONWM_USER+518Region selection screen
WM_PHASE_INSERTWM_USER+519Insert CD (CD check screen, requires _CD=TRUE)
WM_PHASE_INFOWM_USER+505Info / statistics screen
WM_PHASE_HELPWM_USER+559Help screen
WM_PHASE_BYEWM_USER+532Exit / goodbye screen (requires _BYE=TRUE)
WM_PHASE_INTRO1WM_USER+565Intro animation 1
WM_PHASE_INTRO2WM_USER+566Intro animation 2
WM_PHASE_TESTCDWM_USER+528CD presence test
WM_PHASE_MANUELWM_USER+529Manual / instructions
WM_PHASE_PRIVATEWM_USER+530Private / cheat mode
WM_PHASE_UNDOWM_USER+531Undo — Planet Blupi vestige (comment in source)

Gamer Profile Management

PhaseValueDescription
WM_PHASE_GAMERWM_USER+521Gamer selection screen
WM_PHASE_NAMEGAMERWM_USER+503Name a new gamer profile
WM_PHASE_CLEARGAMERWM_USER+504Clear a gamer profile (confirmation)
WM_PHASE_DONAMEGAMERWM_USER+538Execute gamer naming
WM_PHASE_DOCLEARGAMERWM_USER+539Execute gamer profile clear

Level Editor I/O

PhaseValueDescription
WM_PHASE_NAMEDESIGNWM_USER+534Name a custom design level
WM_PHASE_WRITEDESIGNWM_USER+535Export design to c:\user (legacy path, comment in source)
WM_PHASE_READDESIGNWM_USER+536Import design from c:\user
WM_PHASE_CLEARDESIGNWM_USER+537Clear the current design
WM_PHASE_DONAMEDESIGNWM_USER+540Execute design naming
WM_PHASE_DOWRITEDESIGNWM_USER+541Execute design write
WM_PHASE_DOREADDESIGNWM_USER+542Execute design read
WM_PHASE_DOCLEARDESIGNWM_USER+543Execute design clear
WM_PHASE_QUITPLAYTESTWM_USER+520Exit test play back to editor

Save / Load

PhaseValueDescription
WM_PHASE_GWRITEWM_USER+560Save game
WM_PHASE_GREADpWM_USER+561Load game (prompt / slot selection)
WM_PHASE_GREADWM_USER+562Load game (execute)

Multiplayer (DirectPlay)

PhaseValueDescription
WM_PHASE_SERVICEWM_USER+544Select DirectPlay transport (IPX, TCP/IP, modem)
WM_PHASE_DP_DOSERVICEWM_USER+545Execute service selection
WM_PHASE_DP_CANCELSERVICEWM_USER+546Cancel service selection
WM_PHASE_SESSIONWM_USER+547Session browser
WM_PHASE_DP_JOINWM_USER+548Join a session
WM_PHASE_DP_CREATELOBBYWM_USER+549Create a lobby session
WM_PHASE_DP_REFRESHWM_USER+550Refresh session list
WM_PHASE_DP_CANCELSESSIONWM_USER+551Cancel session browser
WM_PHASE_MULTIWM_USER+552Multiplayer lobby (waiting for players)
WM_PHASE_DP_STARTMULTIWM_USER+553Start the multiplayer game
WM_PHASE_DP_CANCELMULTIWM_USER+554Cancel multiplayer lobby
WM_PHASE_CREATEWM_USER+555Create a new session
WM_PHASE_DP_DOCREATEWM_USER+556Execute session creation
WM_PHASE_DP_CANCELCREATEWM_USER+557Cancel session creation