Refactor and cleanup of the code base.
- Cythonized code has been replaced by a pybind11 wrapper, allowing to split the C++ source into separate files, improving readability and maintainability. The project is now built using CMake.
- Moved the SDL2 wrapper into the submodule
windowed
. Now importing fromcynes
will not automatically crash if SDL2 is not installed, as long as the submodule is not imported. - NES (SDL2 wrapper) is now WindowedNES.
- NESHeadless is now NES.
- Refactored WindowedNES, it can now be used as a context manager to automatically close the window.
- There is now a distinction between
has_crashed
(available for both NES and WindowedNES, set to True when the CPU reads a JAM instruction) andshould_close
(only available for WindowedNES, set to True when the user tries to close the window or whenhas_crashed
is True). Both are now read-only properties instead of functions.