Source tree cleanup #5418
Replies: 6 comments
-
Copies of the external libraries will still be in-tree for Visual Studio, but only for Visual Studio. |
Beta Was this translation helpful? Give feedback.
-
I don't intend to break anything, just clean up the source code. |
Beta Was this translation helpful? Give feedback.
-
Another thing that might be interesting is to access the host filesystem through C++ classes representing files and folders, which might eliminate some of the #ifdef WIN32 crap, and it would also allow some abstraction of files. Reading from inside ZIP archives, for example. |
Beta Was this translation helpful? Give feedback.
-
The save state code. Oh, God, the save state code. I just realized two weeks ago that the code was compressing the data twice AND was appending lengths to the end of the data using size_t (which changes size between 32-bit and 64-bit by the way!!!). The save state code opens and closes the ZIP archive multiple times per file! Why? Uses temporary files on disk! Why? The ZIP file support code clearly allows you to read/add multiple files and then close the ZIP! It also gives you basically read/write type I/O to the ZIP archive so there's no need to make a temporary copy on disk at all! Any idea why the CPU state saved to ZIP is 1MB or more? Maybe we shouldn't be saving the TLB lookaside buffer in the state (or that could be an option). There's also additional code in the ZIP support library that we don't need, like full extraction to sub-directories. |
Beta Was this translation helpful? Give feedback.
-
If any easy non-breaking fixes can be done to silence compiler warnings, that also helps. |
Beta Was this translation helpful? Give feedback.
-
In case that helps: "single file audio decoding libraries for C and C++" (FLAC, MP3, WAV) |
Beta Was this translation helpful? Give feedback.
-
2025/01/20: I am cleaning up the source code and source tree. There's a lot of copy pasta, messy code, and extern and defines strewn about. I feel it would be good to stop feature development for a bit (at least on my end) by doing this.
I may split up large CPP files into smaller ones as well.
It might be nice to consider replacing all the various libraries providing MP3, FLAC, etc. in-header libraries with the standard libflac, libogg, libvorbis, etc. library dependencies.
Anyone who wants to help cleanup is free to do so.
Bug fixes are welcome during this stage.
Notice I've already cleaned up the vga_memory.cpp code.
Beta Was this translation helpful? Give feedback.
All reactions