Holy Moly, look at that monster struct at line 125.
So much code for such a simple game.
Now imagine the code base of original Diablo. And yet, it run (still does) on a toaster.
So much code for such a simple game.
Now imagine the code base of original Diablo. And yet, it run (still does) on a toaster.
No need to imagine! https://github.com/diasurgical/devilution
This is >99% binary exact when compiling with the original toolchain.
I think the game code proper starts around line 670, but still, there's quite a lot of emulator code interspersed with the game logic after that point. (Multiple-line functions for something that would've been a single memory read in the original game.)