$ show zeldaret/tp
This repository is a work-in-progress decompilation of The Legend of Zelda: Twilight Princess for GameCube and Wii. It reconstructs the original game's source code from its compiled binary, aiming for byte-perfect reproducibility. The codebase is a hybrid of reversed-engineered game logic, reimplemented Nintendo SDK libraries (JSystem, Dolphin, Revolution), and a massive collection of asset resource headers that define model, animation, and collision IDs for every in-game object. The architecture follows the original game's custom actor framework (f_op/f_pc) combined with middleware from JSystem and the Nintendo SDK. The project supports multiple region and platform variants (GameCube, Wii, Nvidia Shield), with resource headers duplicated across version-specific directories. The decompilation is incomplete; many source files are stubs or placeholders (marked NONMATCHING), and the asset headers are auto-generated or manually copied from the original game's data. The code is written in C++ with Metrowerks compiler conventions, and the build system uses Python and Ninja. While not a runnable application on its own (requires a copy of the game), it represents a comprehensive reverse-engineering effort with active development and community engagement.
The LLM identified 2 files worth highlighting for reuse:
Implements a generic node tree structure (node_class, node_list_class) with parent, child, sibling links, and operations like insertion, removal, and iteration. This is a self-contained, reusable data structure that can be extracted and used in any project requiring tree hierarchy management. It demonstrates clean encapsulation and separation of concerns.
Provides a generic doubly linked list implementation (cList, cListElem) with methods for add, remove, and iteration. The list is parameterized by element type via macros and is fully self-contained. It can be reused in any C++ project needing a lightweight, intrusive linked list, and showcases a solid understanding of low-level data structure design.