Classes and/or functions with different contents depending on GZDoom version. Something like this:
Code: Select all
class A {...} // default implementation.
class A [[version < 6.6.6]] {...} // implementation for GZDoom before version 6.6.6.
class B
{
void do() {...} // for all versions, except the following:
[[version == 4.2.0]] void do() {...} // specific implementation for GZDoom v4.2.0.
}
Why?
- for graceful degradation for mods that require most recent features of the engine to, but can function in some way without them.
- for workarounds for engine behavior that changed, so a mod can behave in the same way even if underlying functions work differently between GZDoom versions.
I wish that all users would use the latest GZDoom all the time, but in real world it doesn't happen. Somebody is always stuck on an older version because
- it can be a fork of GZDoom with a specific feature, and that fork is no longer updated;
- some versions of GZDoom don't support their hardware/OS.
- in rare cases, GZDoom API changes so a mod no longer works properly or doesn't load, and the user cannot fix it. The user has to use older engine version to play that mod.