{
  "added_at": "2026-10-28",
  "additional_evidence_urls": [
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/CMakeLists.txt",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/CMakeLists.txt",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/CMakeSettings.json",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/toolchain.cmake",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/LawnApp.cpp",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/Resources.cpp",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/sound/BassLoader.cpp",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/sound/fmod.h",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/sound/bass.h",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/SexyAppFramework/ogg/COPYING",
    "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/LICENSE"
  ],
  "category": "reconstruction-cases",
  "description_en": "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.",
  "description_zh": "以 PopCap 开源的 SexyAppFramework 为基础重建 Plants vs. Zombies 的 C++ 源码：起点是社区早先对 0.9.9 版的反编译，再补入从年度版（GOTY）逆向得到的功能，并以 GOTY 版地址标注函数。项目同时以现代 C++ 改造引擎，并正将 DirectDraw 与 Direct3D 7 渲染器替换为 GLFW。它构建出在原版游戏目录中运行的同人可执行文件，目标是现代化、可扩展的游戏，而不是完全一致的二进制。",
  "entry_url": "https://awesomerea.org/resources/re-plants-vs-zombies-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/re-plants-vs-zombies-decomp-case/",
  "evidence_url": "https://github.com/Patoke/re-plants-vs-zombies/blob/c4692036c5e11d227c8fb7c593b734dac96da028/README.md",
  "group": "cases",
  "id": "re-plants-vs-zombies-decomp-case",
  "json_url": "https://awesomerea.org/resources/re-plants-vs-zombies-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/re-plants-vs-zombies-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/re-plants-vs-zombies-decomp-case/index.md",
  "name": "re-plants-vs-zombies: decompiling and modernizing Plants vs. Zombies GOTY",
  "name_zh": "re-plants-vs-zombies：反编译并现代化改造 Plants vs. Zombies 年度版",
  "reconstruction_method": "decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirements": [
    "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."
  ],
  "requirements_zh": [
    "README 介绍项目旨在反编译初代 PvZ 的最新功能，并扩展游戏及其引擎；它建立在 Miya（rspforhp）已删除的 0.9.9 版反编译之上，并感谢 ruslan831 将其存档。路线图将 x64 支持和成就标为部分完成，GLFW 渲染器与跨平台替换标为进行中，Zombatar 和模组 API 尚未完成。项目没有发布版；最后一次提交日期为 2026-07-11。",
    "游玩需要购买所得副本中的原版游戏文件；README 链接 Steam 年度版，但未注明确切的可执行文件版本。构建出的可执行文件在该游戏目录中运行，音频代码在运行时加载 bass.dll 或 fmod.dll，而不是链接仓库内提交的副本。README 称仓库除开源引擎外不含 PopCap 的任何 IP；Resources.cpp/.h 重建了游戏生成的资源 ID 表，属于从游戏导出的数据，这在此类项目中很常见。",
    "构建需要 CMake 3.16 及以上和 C++23。README 介绍了 Visual Studio Community（CMakeSettings.json 提供 x86 与 x64 的 MSVC 配置）或 CMake 搭配 Ninja 两种方式；toolchain.cmake 使用 x86_64-w64-mingw32 Clang 和 windres 交叉编译。所审构建产出 Windows 可执行文件，仓库没有 CI 工作流。",
    "来源未记录测试、CI 或与原版可执行文件的比较；贡献者会为逆向出的函数和类成员标注其 GOTY 版地址。与原游戏的一致程度未经衡量。",
    "LICENSE 以 CC0 1.0 释出仓库。SexyAppFramework 代码源自 PopCap 公开的引擎，但仓库未附 PopCap 的许可证文本；ogg 代码保留 Xiph.org 的 BSD 式声明，FMOD 3（Firelight，1999–2002）与 BASS 2.4（Un4seen，1999–2022）的 API 头文件仍归各自厂商所有。原版游戏及其文件仍受其权利人的条款约束。README 表示项目不纵容盗版。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/Patoke/re-plants-vs-zombies",
  "verification": "source-reviewed",
  "verified_at": "2026-10-19"
}
