Merge pull request #457 from zladx/hex-location

tools: allow specifying --location as an hex address
This commit is contained in:
Pierre de La Morinerie 2022-10-15 15:07:58 +02:00 committed by GitHub
commit 1bfd05a8ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ if __name__ == "__main__":
encoding_parser = operations_subparser.add_parser('encode', parents=[options_parser], help='convert a raw tilemap to the encoded ZLADX format')
encoding_parser.add_argument('infile', type=str, help='raw tilemap file to encode')
encoding_parser.add_argument('--location', type=int, metavar="VRAM_address", default=0x9800, action='store', help='start address of the tilemap in VRAM')
encoding_parser.add_argument('--location', type=lambda x: int(x, 0), metavar="VRAM_address", default=0x9800, action='store', help='start address of the tilemap in VRAM')
args = arg_parser.parse_args()