summaryrefslogtreecommitdiff
path: root/extras/romvisualizer.py
blob: 7e80f78612ca2bcf09781d1459e004293ac7eed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/python
#author: Bryan Bishop <kanzure@gmail.com>
#date: 2012-01-13
import os

changeset_numbers = range(266, 635)

def take_snapshot_image(changeset_number):
    "turn common.asm into an image at a certain version"

    print "reverting common.asm to r" + str(changeset_number)

    #revert the file
    os.system("hg revert ../common.asm -r" + str(changeset_number))

    print "generating the image.."

    #draw the image
    os.system("python romviz.py")

    #move the file
    os.system("mv test.png versions/" + str(changeset_number) + ".png")

for changeset_number in changeset_numbers:
    take_snapshot_image(changeset_number)