[Scummvm-devel] GF_AFTER is evil

Max Horn max at quendi.de
Fri Jun 6 04:15:08 CEST 2003


[accidentally sent this to scummvm-cvs-logs last night, reposting to 
the proper list now :-)]

I would like to propose that we abolish the GF_AFTER flags and replace 
them by a pseudoVersion field in the versionsettings.

Justification: they are completely defying logic and common sense. E.g. 
a V7 game is marked as GF_AFTER_V7, yet clearly it is not *after* V7, 
it is V7. Furthermore, although a V7 game is after V2, it is not marked 
GF_AFTER_V2. V3 games are not marked as AFTER_V2 or AFTER_V2, and V2 
games are not marked as AFTER_V1 either. Yet the best (most stupid) 
thing of them all is that we actually classify V1 games as GF_AFTER_V2 
- WTF ???

By introducing the pseudoVersion field, we can use clean and logical 
tests. E.g.

if (pseudoVersion == 3)
or
if (pseudoVersion >= 6)
etc. -> i.e. we can precisely express what we need, in a fashion the 
people understand even w/o having worked with the code for 
weeks/months/years. Heck even I find out GF_AFTER_V? system confusing 
and I think I can claim to know our code pretty well...

So, anyway, I plan to change that the coming weekend. Begone, mess!


Cheers,

Max





More information about the Scummvm-devel mailing list