rename common.asm -> main.asm

hg-commit-id: adec8319c54b
This commit is contained in:
Bryan Bishop 2012-01-25 22:33:42 -06:00
parent 8cf4620deb
commit 4f7a07efa9
9 changed files with 19 additions and 19 deletions

View file

@ -8,10 +8,10 @@ TEXTFILES = text/oakspeech.tx text/pokedex.tx text/mapRedsHouse1F.tx \
all: pokered.gbc
pokered.o: pokered.asm common.tx constants.asm ${TEXTFILES}
pokered.o: pokered.asm main.tx constants.asm ${TEXTFILES}
rgbasm -o pokered.o pokered.asm
pokeblue.o: pokeblue.asm common.tx constants.asm ${TEXTFILES}
pokeblue.o: pokeblue.asm main.tx constants.asm ${TEXTFILES}
rgbasm -o pokeblue.o pokeblue.asm
redrle: extras/redrle.c
@ -30,6 +30,6 @@ pokeblue.gbc: pokeblue.o
rgbfix -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE" $@
clean:
rm -f common.tx pokered.o pokered.gbc pokeblue.o pokeblue.gbc redrle ${TEXTFILES}
rm -f main.tx pokered.o pokered.gbc pokeblue.o pokeblue.gbc redrle ${TEXTFILES}
more: pokered.gbc pokeblue.gbc

View file

@ -27,7 +27,7 @@ def offset_to_pointer(offset):
if type(offset) == str: offset = int(offset, base)
return int(offset) % 0x4000 + 0x4000
def load_asm(filename="../common.asm"):
def load_asm(filename="../main.asm"):
"loads the asm source code into memory"
global asm
asm = open(filename, "r").read().split("\n")
@ -86,7 +86,7 @@ def process_incbins():
def find_incbin_to_replace_for(address):
"""returns a line number for which incbin to edit
if you were to insert bytes into common.asm"""
if you were to insert bytes into main.asm"""
if type(address) == str: address = int(address, 16)
for incbin_key in processed_incbins.keys():
@ -155,7 +155,7 @@ def generate_diff_insert(line_number, newline):
newfile_fh.close()
try:
diffcontent = subprocess.check_output("diff -u ../common.asm " + newfile_filename, shell=True)
diffcontent = subprocess.check_output("diff -u ../main.asm " + newfile_filename, shell=True)
except AttributeError, exc:
raise exc
except Exception, exc:
@ -195,7 +195,7 @@ def insert_map_header_asm(map_id):
fh.close()
#apply the patch
os.system("patch ../common.asm temp.patch")
os.system("patch ../main.asm temp.patch")
#remove the patch
os.system("rm temp.patch")
@ -230,8 +230,8 @@ def apply_diff(diff, try_fixing=True):
fh.close()
#apply the patch
os.system("cp ../common.asm ../common1.asm")
os.system("patch ../common.asm temp.patch")
os.system("cp ../main.asm ../main1.asm")
os.system("patch ../main.asm temp.patch")
#remove the patch
os.system("rm temp.patch")
@ -242,7 +242,7 @@ def apply_diff(diff, try_fixing=True):
return True
except Exception, exc:
if try_fixing:
os.system("mv ../common1.asm ../common.asm")
os.system("mv ../main1.asm ../main.asm")
return False
def index(seq, f):

View file

@ -610,7 +610,7 @@ def scan_for_map_scripts_pointer():
def scan_rom_for_tx_fars_and_insert():
"""calls analyze_texts.scan_rom_for_tx_fars()
looks through INCBIN'd addresses from common.asm,
looks through INCBIN'd addresses from main.asm,
finds TX_FARs that aren't included yet.
"""
x = 0

View file

@ -23,8 +23,8 @@ def get_map_size_constants(do_sed=False):
output += constant_name + "_WIDTH EQU $%.2x\n" % (width)
output += "\n"
sed_lines += "sed -i 's/" + base_name + "Height/" + constant_name + "_HEIGHT" + "/g' common.asm" + "\n"
sed_lines += "sed -i 's/" + base_name + "Width/" + constant_name + "_WIDTH" + "/g' common.asm" + "\n"
sed_lines += "sed -i 's/" + base_name + "Height/" + constant_name + "_HEIGHT" + "/g' main.asm" + "\n"
sed_lines += "sed -i 's/" + base_name + "Width/" + constant_name + "_WIDTH" + "/g' main.asm" + "\n"
if do_sed:
return sed_lines

View file

@ -39,7 +39,7 @@ asm = None
asm_lines = None
def load_asm():
global asm, asm_lines
asm = open("../common.asm", "r").read()
asm = open("../main.asm", "r").read()
asm_lines = asm.split("\n")
def get_xy_movement_of_connection_strip(map_id, connection_id):

View file

@ -6,12 +6,12 @@ import os
changeset_numbers = range(266, 635)
def take_snapshot_image(changeset_number):
"turn common.asm into an image at a certain version"
"turn main.asm into an image at a certain version"
print "reverting common.asm to r" + str(changeset_number)
print "reverting main.asm to r" + str(changeset_number)
#revert the file
os.system("hg revert ../common.asm -r" + str(changeset_number))
os.system("hg revert ../main.asm -r" + str(changeset_number))
print "generating the image.."

View file

@ -1,3 +1,3 @@
_RED EQU 0
_BLUE EQU 1
INCLUDE "common.tx"
INCLUDE "main.tx"

View file

@ -1,3 +1,3 @@
_RED EQU 1
_BLUE EQU 0
INCLUDE "common.tx"
INCLUDE "main.tx"