the3dfxdude / 7kaa

Seven Kingdoms: Ancient Adversaries - Go to the main source repository at https://sourceforge.net/projects/skfans/ for source code and builds
https://7kfans.com
Other
255 stars 72 forks source link

Build fixes March 2020 #188

Closed MicroVirus closed 4 years ago

MicroVirus commented 4 years ago

Two patches to SpyProcess. Cleaning up Misc a bit -- isolate the file system stuff.

MicroVirus commented 4 years ago

Actually, ignore the two last commits (Misc->FileSystem and Misc) for now please. These two commits were older and more has changed than I was aware of. I need to review them more in depth first.

the3dfxdude commented 4 years ago

OK. I'm still not seeing why we need a filesystem class. The other two patches are merged.

MicroVirus commented 4 years ago

OK. I'm still not seeing why we need a filesystem class.

Just a bit of good coding practice / separation of concerns. The filesystem stuff in Misc and OSYS requires additional headers and these are different between windows and linux (and if we'll support Mac or so they might yet again be different), so isolating them into their own cpp file localises specific portability concerns and simplifies Misc.

the3dfxdude commented 4 years ago

So maybe a convenience header? Most of what is there is already portable at a C-lib API level, and this includes the Windows CRT, and the file system code has been tested to work on Mac with USE_POSIX. The game used these functions to begin with. What portability concerns are there?

GNU autotools best feature is finding which header file you need to include, across any platform. I decided not to rely on that though, since we have been using Visual Studio periodically, so we have the USE_WINDOWS and USE_POSIX to select the headers. All you need to set is USE_WINDOWS to get started.