Actually it is the other way around:
There is a shadow bitmap, which is the bitdepth of the game (16 bit).
There is the unit bitmap, which is the bitdepth of 8.
Using the player palette the unit will be drawn, the unit itself is from the datafile, copied the right part of it (facing) and blitted to TEMP. This will do the proper color conversion. From there on, i draw_sprite it at the screen.
The shadow is 16 bit, which is thus also blitted, and then draw_trans_ sprited to the screen directly (bmp_screen).
SHADOW bitmap in my game is 16 bit (also in datafile)
UNIT bitmap in my game is 8 bit (also in datafile)
therefor i use for UNIT the 8 bit mask color index 0. And for SHADOW the 16/32 bit mask color rgb (255,0,255).