Decompilation Notes
Free Eggbert is a reconstruction of Speedy Eggbert 2 (Speedy Blupi II) from its compiled binary. This page documents where symbol names come from, confirmed decompilation bugs, and how the codebase relates to Planet Blupi.
Source of Symbol Names
Many function and variable names come from the 2013 Windows Phone port of Speedy Blupi, inspected using ILSpy. This port is a C++ to C# transpilation that retained demangled C++ symbol names, making it possible to recover original function and variable names from the compiled binary.
The reconstruction uses three main tools:
| Tool | Purpose |
|---|---|
| Ghidra | Primary decompilation — produces C-like pseudocode from the binary |
| IDA Pro | Cross-reference disassembly — used to verify Ghidra output and resolve ambiguous patterns |
| ILSpy | Symbol name recovery from the Windows Phone 2013 C# port |
Known Decompilation Bugs
Double CPixmap::Create() Call
The decompiled startup code calls CPixmap::Create() twice: once directly
in DoInit() and again inside CacheAll(TRUE, ...).
This is most likely a decompilation artifact — the second call was probably not in
the original source.
Under real DirectDraw 3 this can cause errors such as
DDERR_PRIMARYSURFACEALREADYEXISTS.
Free Direct currently tolerates it. See Known Issues — DirectDraw
for the full investigation checklist.
Parameter Swap Bug
The bTrueColorBack and bTrueColorDecor parameters in
CPixmap::Create() are in the wrong order between the declaration
(pixmap.hpp) and the definition (pixmap.cpp):
// pixmap.hpp — declaration
BOOL Create(HWND, POINT, BOOL bFullScreen, int mouseType,
BOOL bTrueColor, BOOL bTrueColorDecor);
// pixmap.cpp — definition (params SWAPPED)
BOOL CPixmap::Create(HWND, POINT, BOOL bFullScreen, int mouseType,
BOOL bTrueColorDecor, BOOL bTrueColor);
The function then assigns m_bTrueColorDecor = bTrueColorDecor and
m_bTrueColorBack = bTrueColor — so the caller's first extra parameter
ends up controlling decor, not back. This is likely a decompilation artifact from
incorrect calling-convention reconstruction.
Unsafe delete this
Some decompiled code contains delete this patterns copied directly
from the binary. In CPixmap::CacheAll(FALSE), the object is destroyed
with delete this and then its own member variables are immediately read —
which is undefined behavior in C++.
This is either a decompilation artifact or a very unusual pattern from the original
code that requires careful reconstruction. The _LEGACY flag gates this
behavior.
Nonsensical Rectangle Initialization
In CPixmap::CacheAll(TRUE), Ghidra produced this decompiled output:
// Ghidra output — nonsensical
char image[12];
*(char*)image = (LXIMAGE) << 64;
rect.bottom = LYIMAGE;
rect.left = LOWORD(image);
rect.top = HIWORD(image);
rect.right = HIWORD(image);
LXIMAGE << 64 is nonsensical (result is always 0 for a 32-bit int).
LOWORD/HIWORD on a local char array is incorrect.
The original code was almost certainly a simple rectangle initialization like:
SetRect(&rect, 0, 0, LXIMAGE, LYIMAGE);
Uninitialized Variables
The original binary was compiled with aggressive optimizations that reused stack
space and registers. The decompiled pseudocode has many apparently uninitialized
variables that were actually initialized by the original compiler's register
allocation strategy. These produce C4700/C4703 MSVC warnings.
The CMake configuration suppresses these with /wd4700 /wd4703 on MSVC.
They are intentional suppressors for this class of decompilation artifacts.
The _LEGACY Flag
When _LEGACY=TRUE (default: FALSE), the codebase retains
intentionally broken or quirky behaviors from the original decompiled output.
Setting _LEGACY=FALSE enables fixes for confirmed bugs.
The flag is defined in include/def.hpp and gates behaviors like:
- The
delete thispattern inCacheAll(FALSE) - Other confirmed decompilation artifacts once they are identified and fixed
See Compile Flags for all flag defaults and how to change them.
Comparison with Planet Blupi
Where behavior is ambiguous in the decompiled output, the Planet Blupi source code (the official open-source release of Epsitec's original engine) serves as a reference implementation. Planet Blupi is the engine used in Planet Blupi / Blupi à la rescousse, which shares common heritage with Speedy Blupi II.
Blupi[100] array for up to 100 simultaneous
characters. Free Eggbert stores the single player as individual member fields
in CDecor. Despite shared heritage, the player models differ significantly.
See Free Eggbert vs. Speedy Blupi for a full comparison table.