Most modders already know that VALVe have recently updated their Half-Life SDK (after ~10 years!) due to recent expansion onto GNU/Linux platforms. What does it mean to us? Well, quite a lot.
So, when I got to Github.com I was like
Oh well, It's just a little fix+library update! We all know how to use diff/WinDiff, right? Nothing to worry abou...
And then, after 48 hours of merging, updating, debugging we get what?
Technical details: VALVe updated their engine API, added some steam-related stuff, updated VGUI library, updated network code, replaced Win32 API input with SDL library for cross-platform support...
So, it appears, that the new VGUI static lib is not supported by my testing HL version, so - BAM! - I have to revert to old library. Everything compiles fine, and - BAM! - SDL DLL is missing, and no way to get it, and I have to embed old code into #ifdefs like this:
#ifdef NOSDL #ifdef _WIN32 #include <mmsystem.h> #endif #else #include <SDL2/SDL_mouse.h> #include <SDL2/SDL_gamecontroller.h> #endif
Now I'm testing my mod with NOSDL, old VGUI and - PWASH! - all GUI controls are messed up! WHY?! (T_T) Almost hour of debugging, and finally I remembered these updated lines:
// Use this to set any co-ords in 640x480 space #define XRES(x) ((int)(float(x) * ((float)ScreenWidth / 640.0f) + 0.5f)) #define YRES(y) ((int)(float(y) * ((float)ScreenHeight / 480.0f) + 0.5f)) // HL20130901 from bad to worse //#define XRES(x) (x * ((float)ScreenWidth / 640)) //#define YRES(y) (y * ((float)ScreenHeight / 480))
So really, now I hope more people understand how tough life is for us, programmers. Especially, when int comes to updates and merging. /(T_T)\
Now I'm going to sleep, and you may prepare yourselves for unforeseen conseque... I mean, next release of XDM. :)