This is getting somewhat before my time, but IIRC the idea is to put the current light direction and strength into the vertex colour, then DOT3 that with a normal map texture. The output of that gives you a bumpmapped light intensity, which you then need further texenv shenanigans to multiply by an additional base texture to give your final lit output.
Things get even fruitier when you’re dealing with proper 3d and have to deal with object space or tangent space normal maps, or if you want to do specular as well, but for the basic 2d effect that should be all you need.