Refactor overworld analysis documentation:

- Remove comprehensive analysis document for ZScream vs YAZE.
- Add new streamlined analysis document focusing on key findings and differences.
- Consolidate findings on expansion detection, coordinate calculations, and data loading.
- Highlight improvements in error handling and entrance expansion detection in YAZE.
This commit is contained in:
scawful
2025-10-04 03:10:41 -04:00
parent 10a2713465
commit bee1fc3923
5 changed files with 43 additions and 1244 deletions

View File

@@ -0,0 +1,36 @@
# ZScream vs. yaze Overworld Implementation Analysis
## Executive Summary
After conducting a thorough line-by-line analysis of both ZScream (C#) and yaze (C++) overworld implementations, we confirm that the yaze implementation is functionally equivalent and, in some areas, more robust.
## Key Findings
### ✅ **Confirmed Correct Implementations**
#### 1. **Tile32 & Tile16 Expansion Detection**
Both implementations correctly detect expanded map data. yaze's approach is more robust as it checks for both the expansion flag and the ZSCustomOverworld ASM version, while ZScream primarily checks for one or the other.
#### 2. **Entrance & Hole Coordinate Calculation**
The logic for calculating the x,y world coordinates for entrances and holes (including the `+ 0x400` offset for holes) is identical in both implementations, ensuring perfect compatibility.
#### 3. **Data Loading (Exits, Items, Sprites)**
- **Exits**: Data is loaded from the same ROM addresses with equivalent byte ordering.
- **Items**: Both correctly detect the ASM version to decide whether to load items from the original or expanded address pointers.
- **Sprites**: Both correctly handle the three separate game states (rain, pre-Agahnim, post-Agahnim) when loading sprites.
#### 4. **Map Decompression & Sizing**
- Both use equivalent decompression algorithms (`HyruleMagicDecompress` in yaze vs. `ALTTPDecompressOverworld` in ZScream).
- The logic for assigning map sizes (Small, Large, Wide) based on the ROM's size byte is identical.
### ⚠️ **Key Differences Found**
- **Entrance Expansion**: yaze has more robust detection for expanded entrance data, which ZScream appears to lack.
- **Error Handling**: yaze uses `absl::Status` for comprehensive error handling, whereas ZScream uses more basic checks.
- **Threading**: Both use multithreading for performance, with yaze using `std::async` and ZScream using background threads.
### 🎯 **Conclusion**
The analysis confirms that the yaze C++ overworld implementation correctly and successfully mirrors the ZScream C# logic across all critical functionality. Our integration tests and golden data extraction system provide comprehensive validation of this functional equivalence.
**Final Assessment: The yaze overworld implementation is correct, robust, and maintains full compatibility with ZScream's overworld editing capabilities, while offering some improvements in expansion detection and error handling.**