IniFile: New class to parse INI files.

Based on the code originally found in dllmain.cpp, rewritten to use
C stdio instead of C++ ifstream.

TODO: Verify that all mods work properly with IniFile.

SADXModLoader.h: Added an snprintf() macro for MSVC.

dllmain.cpp: Use snprintf() instead of sprintf_s().
Remove unused variable "IniGroup settings".

This is a leftover from early debugging versions that had to
rescan all directories on each file access.
Mark _ReplaceFile() as static and clean it up a bit.
CodeParser: New class to parse codes.

This is basically ProcessCodeList() and ReadCodes() split out from
dllmain.cpp.

Use the "do { } while (0)" idiom in macros to make them act like
regular functions.

Use const iterators and pass the lists by const ref.

TODO:
- Convert to a regular class and store the codes as a class variable.
- Use standard C stdio instead of istream.
CodeParser::ReadCodes(): Initialize Code to { }.

I removed this when splitting the function out, but it's actually needed
in order to ensure that all variables are initialized properly.
CodeParser::CodeType: New enum value codeeof.

codeeof == 0xFF.

This replaces hardcoded 0xFF values in ReadCodes().
CodeParser: Call ProcessCodeList_int() in the opcode macros.

Calling ProcessCodeList() restarts the regnum counter, which will
break anything that uses registers.
CodeParser: Convert to a regular class.

CodeParser now contains both the code list and register vector.
The list can be fully reloaded at any time via filename or istream.

New clear() function to clear the code list and register vector.
The register vector wasn't actually properly deleted before, since
it has new'd memory buffers. This usually isn't a problem, since
the code list is typically loaded once and kept in memory until
the program exits.

dllmain.cpp: Updated to use CodeParser as a regular class,
and eliminated a goto.
CodeParser::clear(): Use delete[] on the registers.

Spotted by MainMemory.

Also, readCodes() can return _else and endif in addition to 0 and codeeof.
stdafx.h: Added a bunch of C/C++ headers.
Use CMake instead of Visual Studio projects.

This will make it easier to maintain the build system in general,
including switching to newer versions of Visual Studio and possibly
using gcc (MinGW).
Actually commit the root and src CMakeLists.txt files.
CMakeLists.txt: Append common flags to CMake debug/release flags.

This is needed for e.g. -GR- -EHsc.
cmake/: Somehow forgot to add this, too.
include/: Split SADXModLoader.h into several headers.

ModLoader/MemAccess.h: Memory access functions and macros.
Also has data and function pointer creation macros.

SADXModLoader/: Enums, structs, functions, and vars.

Added header guards to all files.
Added MSVC PCH support.

CMake macro from http://stackoverflow.com/questions/148570/using-pre-compiled-headers-with-cmake
CMakeLists.txt: Remove extra "+" from VERSION_STRING if VERSION_PATCH is set.
SADXModLoader: Added project version and git version.

Project versoin is set in CMakeLists.txt.

git version will only be added if POSIX sh is available.
CodeParser::readCodes_int(): Append codes to clist, not m_codes.

Appending to m_codes breaks if/else, since the codes should be added
to the code's trueCodes or falseCodes, not the main codes list.

This broke pretty much every code that used if/else, including the
gravity-switching code.

This bug was reported by SonicFreak94 in #x-hax.

This is a regression from commit fdadad6f4e233954abd1d11a04b11d1475aac39c.
(CodeParser: Convert to a regular class.)
README.md: Quick and dirty rewrite.

Needs more stuff, but this is good enough for now.