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).
| File | Purpose | Size (approx) |
|---|---|---|
def.hpp | Global constants, all enums, compile flags (ACTION_*, TYPE_*, SOUND_*, WM_PHASE_*) | 1,413 lines |
decor.hpp | CDecor class declaration, world/game-state structures (DescSave, MoveObject, etc.) | 642 lines |
pixmap.hpp | CPixmap — image surface manager class | 126 lines |
sound.hpp | CSound — audio playback class | 81 lines |
event.hpp | CEvent — input handling and game phase dispatch | 320 lines |
network.hpp | CNetwork — DirectPlay networking | 76 lines |
button.hpp | CButton — UI button rendering | 67 lines |
jauge.hpp | CJauge — progress/gauge bar rendering | 43 lines |
menu.hpp | CMenu — menu system | 50 lines |
text.hpp | Text rendering utilities | ~30 lines |
wave.hpp | WAV file loader | 11 lines |
ddutil.hpp | DirectDraw utility functions | — |
misc.hpp | Miscellaneous helper functions | — |
movie.hpp | AVI/movie video playback | — |
obstacle.hpp | Obstacle/collision data | — |
dectables.hpp | Decor table declarations | 238 lines |
pixtables.hpp | Pixmap table declarations | 1,198 lines |
texttables.hpp | Text table declarations | 1,674 lines |
web_persistence.hpp | Emscripten 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.
| File | Lines | Purpose |
|---|---|---|
blupi.cpp | 953 | WinMain, application entry, window management, message loop |
button.cpp | 393 | UI button rendering and hit-testing |
jauge.cpp | 147 | Progress/gauge bar rendering |
menu.cpp | 160 | Menu rendering and navigation |
movie.cpp | 301 | AVI/cutscene video playback |
network.cpp | 356 | DirectPlay session and lobby management |
pixmap.cpp | 1,922 | DirectDraw surface allocation, blitting, sprite drawing |
sound.cpp | 779 | DirectSound initialization and playback |
wave.cpp | 272 | WAV file parsing and loading |
Files Requiring the Most Work
| Priority | File | Lines | Issues |
|---|---|---|---|
| 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
| File | Purpose |
|---|---|
dectables.cpp | Static lookup tables for decor (691 lines) |
pixtables.cpp | Static lookup tables for pixmap |
texttables.cpp | Static text tables |
soundbass.cpp | BASS library audio backend (720 lines; active when _BASS=TRUE) |
text.cpp | Text rendering (334 lines) |
obstacle.cpp | Obstacle/collision data |
ddutil.cpp | DirectDraw utilities |
web_persistence.cpp | Emscripten 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
| Submodule | Purpose |
|---|---|
third_party/SDL | SDL3 core library |
third_party/SDL_image | Image loading support |
third_party/SDL_mixer | Audio mixing and playback |
cmake/ — Build Modules
| File | Purpose |
|---|---|
cmake/ThirdPartySDL.cmake | Defines configure_vendored_sdl() function for the SDL submodule build |
cmake/EmscriptenToolchain.md | Documentation 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/File | Purpose |
|---|---|
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 |