diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-06-05 02:00:10 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-06-05 02:00:10 -0300 |
| commit | 3c8bcba6b540f5cb84572994d9ec2426dd348a93 (patch) | |
| tree | 54af53f02d549951446d5a87845b42d4ee777559 /TODO.md | |
| parent | 2c91caa1dd4ea53dfeb63751d04170d9a9a61474 (diff) | |
| download | game-3c8bcba6b540f5cb84572994d9ec2426dd348a93.tar.gz game-3c8bcba6b540f5cb84572994d9ec2426dd348a93.zip | |
finish `magic.cc`
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -8,6 +8,9 @@ ## Stack allocations Any functions that use `alloca` or some other form of dynamic stack allocations will cause decompiled functions to be an absolute mess. It usually shows up in the decompiled code as both a size computation like `-(VAR + CONST & 0xfffffff0)`, followed by some assignment. It doesn't make total sense without looking at the disassembly. I've encountered ~30 such computations and expect the functions containing them to be amongt the most challenging/annoying to be properly decompiled. +## Exceptions +I didn't dive into how exceptions are handled, but it seems that the ones related to creature actions have the outter most endpoint at `TCreature::Execute`. There can also be some checkpoints in between to modify a `RESULT` value or handle a failure. + ## Estimate The decompiled file has ~115K lines of C. If we take ~15K lines to be rubbish, this can be round to ~100K. Considering a low estimate of 200 lines per day, the whole process could take up to 500 days which is quite a bit but not impossible. Now considering a high estimate of 1K lines per day, it could take 100 days which is also quite a bit. |
