I really dont understand the question, posting some code might help clarify things. But from what I think I understand, passing the string through a hash function might do the trick.
Code:
void Draw(char sprite[40])
{
long hashval = crc32(sprite); // or whatever funtion you want
switch(hashval)
case HASHVAL_SPRITE1: // calc the hash vals ahead of time
.
.
case HASHVAL_SPRITE9:
}
or instead of using a string, use an enumerated type:
Code:
enum SPRITE {SPRITE1, SPRITE2...};
.
.
void Draw(SPRITE sprite)
{
switch(sprite)
case SPRITE1:
.
.
.
}
again, im not sure I understood your question. So if I'm is way off, just ignore me