Project Structure

This page describes the directory layout and purpose of every important file and directory in the Free Eggbert repository.

Root Directory Layout

free-eggbert/ ├── include/ All header files (.hpp) ├── src/ All C++ source files (.cpp) ├── gamefiles/ Game assets (NOT in git — user-supplied) │ ├── DATA/ Level worlds, demos, config │ ├── IMAGE08/ 8-bit palette images │ ├── IMAGE16/ 16-bit true-color images │ └── SOUND/ Music and sound effects ├── third_party/ Vendored dependencies (git submodules) │ ├── SDL/ SDL3 library │ ├── SDL_image/ SDL image support │ └── SDL_mixer/ SDL audio support ├── dxsdk3/ DirectX 3 SDK (git submodule — reference) ├── bass/ BASS audio library binaries ├── cmake/ CMake helper modules ├── android/ Android build support ├── msvc5/ Legacy MSVC 5 project files ├── resource/ Windows resource files (.rc, .cur, .ico) ├── util/ Utility scripts (Python) ├── CMakeLists.txt Main CMake build file ├── Speedy Eggbert 2 Source.sln Visual Studio 2022 solution ├── README.md Quick-start and build guide ├── TODO.md Development checklist ├── ANDROID.md Android build notes └── LICENSE GPLv3

include/ — Header Files

All header files use the .hpp extension (unlike the ancestor Planet Blupi which used .h).

FilePurposeSize (approx)
def.hppGlobal constants, all enums, compile flags (ACTION_*, TYPE_*, SOUND_*, WM_PHASE_*)1,413 lines
decor.hppCDecor class declaration, world/game-state structures (DescSave, MoveObject, etc.)642 lines
pixmap.hppCPixmap — image surface manager class126 lines
sound.hppCSound — audio playback class81 lines
event.hppCEvent — input handling and game phase dispatch320 lines
network.hppCNetwork — DirectPlay networking76 lines
button.hppCButton — UI button rendering67 lines
jauge.hppCJauge — progress/gauge bar rendering43 lines
menu.hppCMenu — menu system50 lines
text.hppText rendering utilities~30 lines
wave.hppWAV file loader11 lines
ddutil.hppDirectDraw utility functions
misc.hppMiscellaneous helper functions
movie.hppAVI/movie video playback
obstacle.hppObstacle/collision data
dectables.hppDecor table declarations238 lines
pixtables.hppPixmap table declarations1,198 lines
texttables.hppText table declarations1,674 lines
web_persistence.hppEmscripten IndexedDB persistence (IDBFS)

src/ — Source Files

The total source is approximately 31,742 lines across 25 files.

Files Tentatively Complete (Need Testing)

ℹ️
"Tentatively complete" means the decompilation appears to be accurate, but testing and verification against the original game behavior is still needed.
FileLinesPurpose
blupi.cpp953WinMain, application entry, window management, message loop
button.cpp393UI button rendering and hit-testing
jauge.cpp147Progress/gauge bar rendering
menu.cpp160Menu rendering and navigation
movie.cpp301AVI/cutscene video playback
network.cpp356DirectPlay session and lobby management
pixmap.cpp1,922DirectDraw surface allocation, blitting, sprite drawing
sound.cpp779DirectSound initialization and playback
wave.cpp272WAV file parsing and loading

Files Requiring the Most Work

PriorityFileLinesIssues
1 event.cpp 5,878 Most complex file; input processing and phase dispatch incomplete
2 decblupi.cpp 4,395 Player physics, movement, all vehicle logic
3 decio.cpp 391 Save/load serialization, file format compatibility
4 decdesign.cpp 662 Level editor interaction; known missing features
5 decblock.cpp 804 Crate, door, block interaction; contains "TODO: rewrite this like a human"
6 decmove.cpp 2,311 Enemy and moving object AI
7 decnet.cpp 467 Network synchronization and event replay
8 decor.cpp 2,044 Core world rendering and initialization
9 misc.cpp Miscellaneous helpers

Other Source Files

FilePurpose
dectables.cppStatic lookup tables for decor (691 lines)
pixtables.cppStatic lookup tables for pixmap
texttables.cppStatic text tables
soundbass.cppBASS library audio backend (720 lines; active when _BASS=TRUE)
text.cppText rendering (334 lines)
obstacle.cppObstacle/collision data
ddutil.cppDirectDraw utilities
web_persistence.cppEmscripten IDBFS persistence (317 lines; empty on non-Emscripten builds)

gamefiles/ — Game Assets

This directory is not tracked by git. Users must supply these files from an original copy of Speedy Eggbert 2. See Assets & Files for the detailed contents of each subdirectory.

third_party/ — Vendored Dependencies

Git submodules for the SDL3 stack. Initialized with:

git submodule update --init --recursive
SubmodulePurpose
third_party/SDLSDL3 core library
third_party/SDL_imageImage loading support
third_party/SDL_mixerAudio mixing and playback

cmake/ — Build Modules

FilePurpose
cmake/ThirdPartySDL.cmakeDefines configure_vendored_sdl() function for the SDL submodule build
cmake/EmscriptenToolchain.mdDocumentation for the Emscripten/WebAssembly build

android/ — Android Build

android/ ├── app/ │ ├── src/main/ │ │ ├── assets/ Symlinks to gamefiles/ │ │ ├── AndroidManifest.xml │ │ └── freeapi_android_assets.txt Asset manifest for FreeApi │ └── build.gradle ├── build.gradle Root Gradle file ├── local.properties.template └── gradlew Gradle wrapper

Legacy and Reference Files

Directory/FilePurpose
dxsdk3/DirectX 3 SDK (git submodule) — reference for original API; needed for native DirectX builds
msvc5/Legacy MSVC 5 project files — historical reference only
bass/BASS and BASSMIDI audio library binaries — used when _BASS=TRUE
resource/Windows resource files (.rc, .cur, .ico) for the Win32 executable
util/Utility scripts (Python) — purpose needs verification