while not pleasant, it's "good" that you are seeing these things now. we don't know what we don't know, or what we just aren't looking at. i particularly appreciate your insight here:
so the more he texted, the more I texted, as it was a high for me to get every hit of a text from him.
now is a good time to dive into what makes YOU tick. we can all change behaviors and habits, if we are motivated to do so. sometimes life helps out by giving us a little kick to get started.
you've mentioned codependency a few times. have you read Codependency No More? it is highly recommended. Alanon or other support groups can really help round out our path as well.