It takes characters and locations from the first 3 books, but its not even a loose adaptation of A Princess of Mars. It has many similar scenes and the tone is very much in tune with the books. However, it's not a close following of the story in A Princess of Mars. The basic premise of him getting to Mars, meeting Dejah, Tars and Sola as well as fighting Zodanga are from the first book but that's about it. The Therns are from the second book, but they are religious hucksters using the ancient Martian religion to prey on the other Martians and aren't techno-gods as in the movie. The third book deals more with the ancient Martan religion and the goddess Issus mentioned in the movie.