What we have is two sets of enums, neither of which can be changed (i
assume) so we need to map them to each other. We need to common way of
doing this. Should we implement a static EnumConverter class which
takes in XNA enum and returns the corresponding SDL enum, and vice
versa? Should we use giant switch statements to do the conversions? Or
should we use some kind of dictionary like Garuma already used which
maps them to each other?
I think that having a switch statment for each enum would probably be
the highest performing way to do it, especially when doing a lot of
conversions. But would a switch statement with 100 options be slower
than a dictionary lookup? I don't know ;)
Alan.
I heard that the Dictionary of .NET v2 was really fast compared to
prior version but then I think benchmarking will decide everyone :)
Jérémie.