This is a clan for HL1 for people who play HL1 DM and those who like HL DMC, and HL2DM.

Post news Report RSS Developer's headache: VALVe's SDK update

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?

Posted by on

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

ft guy

Oh well, It's just a little fix+library update! We all know how to use diff/WinDiff, right? Nothing to worry abou...

Merging with WinDiff

Wait, what?

FFFUUU- updated version

And then, after 48 hours of merging, updating, debugging we get what?

development process

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...

development process

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. :)

I got brother in my game
PS: looks like I've fixed more bugs and hacks than VALVe did 8)
Post comment Comments
DNR3
DNR3 - - 274 comments

Funny thing is, the SDK changelog says "Added support for mods" lol

Reply Good karma Bad karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: