# re-plants-vs-zombies: decompiling and modernizing Plants vs. Zombies GOTY

> Reconstructs C++ source for Plants vs. Zombies on PopCap’s open-source SexyAppFramework, starting from an earlier community decompilation of version 0.9.9 and adding functionality reversed from the Game of the Year edition, with functions annotated by GOTY addresses. The project also modernizes the engine with current C++ and is replacing the DirectDraw and Direct3D 7 renderers with GLFW. It builds a fan executable that runs from an original game folder, aiming at a modernized, extensible game rather than an identical binary.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-19
- Added to the catalog: 2026-10-28
- Original resource: <https://github.com/Patoke/re-plants-vs-zombies>
- Primary source: <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/README.md>
- Catalog page: <https://awesomerea.org/resources/re-plants-vs-zombies-decomp-case/>
- Record JSON: <https://awesomerea.org/resources/re-plants-vs-zombies-decomp-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/re-plants-vs-zombies-decomp-case/index.md)

## Requirements & limits

- README describes decompiling the latest functionality of the first PvZ title and expanding the game and its engine, building on a since-deleted 0.9.9 decompilation by Miya (rspforhp) that it credits ruslan831 with archiving. Its roadmap marks x64 support and achievements as partial, the GLFW renderer and cross-platform replacements as in progress, and Zombatar and a modding API as not done. There are no releases; the last commit is dated 2026-07-11.
- Playing needs the original game files from a purchased copy; README links the Steam Game of the Year Edition but names no exact executable version. The built executable is run from that game folder, and the audio code loads bass.dll or fmod.dll at runtime instead of linking a committed copy. README says the repository includes no PopCap IP beyond the open-source engine; Resources.cpp/.h reconstruct the game’s generated resource-ID tables, data derived from the game as is usual for such projects.
- Builds use CMake 3.16+ and C++23. README documents Visual Studio Community, whose CMakeSettings.json has x86 and x64 MSVC configurations, or CMake with Ninja; toolchain.cmake cross-compiles with x86_64-w64-mingw32 Clang and windres. The reviewed build produces a Windows executable, and the repository has no CI workflow.
- The sources document no tests, CI or comparison with the original executable; contributors annotate reversed functions and class members with their GOTY addresses. Fidelity to the original game is not measured.
- LICENSE dedicates the repository under CC0 1.0. The SexyAppFramework code derives from the engine PopCap made public, but PopCap’s license text is not included; the ogg code keeps Xiph.org’s BSD-style notice, and the FMOD 3 (Firelight, 1999–2002) and BASS 2.4 (Un4seen, 1999–2022) API headers keep their vendors’ copyrights. The original game and its files keep their rights holders’ terms. README says the project does not condone piracy.

## Primary sources

1. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/README.md>
2. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/CMakeLists.txt>
3. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/CMakeLists.txt>
4. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/CMakeSettings.json>
5. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/toolchain.cmake>
6. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/LawnApp.cpp>
7. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/Resources.cpp>
8. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/sound/BassLoader.cpp>
9. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/sound/fmod.h>
10. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/sound/bass.h>
11. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/ogg/COPYING>
12. <https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/LICENSE>

## More in Games

- [REDRIVER2: reconstructing Driver 2 through a PlayStation compatibility layer](https://awesomerea.org/resources/redriver2-case/index.md) · Case study
- [RSDKv3 Decompilation: Sonic CD (2011) on a reconstructed Retro Engine v3](https://awesomerea.org/resources/rsdkv3-sonic-cd-decomp-case/index.md) · Case study
- [RSDKv4 Decompilation: Retro Engine v4 and the Sonic 1 & 2 (2013) menus](https://awesomerea.org/resources/rsdkv4-sonic-1-2-decomp-case/index.md) · Case study
- [RSDKv5 Decompilation: reconstructing Retro Engine v5 and v5U](https://awesomerea.org/resources/rsdkv5-engine-decomp-case/index.md) · Case study
- [Sonic Mania: a game-code decompilation for the RSDKv5 engine](https://awesomerea.org/resources/sonic-mania-decomp-case/index.md) · Case study
- [SpaceCadetPinball: decompiled game logic adapted to SDL2](https://awesomerea.org/resources/space-cadet-pinball-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
