For starters, bring both the old passport (do you still have it, even if it's void?) and the new one, along the visa (sticker or PDF print). They'll sort it out either at the airport or at an Immigration office.
they surely will know you're living abroad by seeing the transactions. I don't think they care whether is Spain, Thailand or America, but it's easy for them to determine you don't live in the country anymore.