Renamed various var_# variables to better describe their purpose.
Moved a lot of variable declarations to where they're first used to improve readability (and might slightly improve optimization during compilation as a lot of variables got reduced scope).
Removed the "vsync" argument for set_pal() (and related functions) as it wasn't used.
Removed references to __pascal, near, and far as they're obsolete when compiling for 32-bit or 64-bit.