Finish sprite encoder - palette matching is still bad though...