Use a const instead of a macro for SPRITE_N.

It's used in 6/8 cases anyway, so it getting calculated outside the
switch isn't a big deal. Simplifies code and reduces generated code
size.