all repos — m12-patcher @ b84de75f35171c4c5072063225f2e8270f9dfa49

Constants.py (view raw)

  1#!/usr/bin/python3
  2import os
  3from sys import platform
  4
  5PATCH_VERSION = '1.1.1'
  6FINAL_ROM_NAME = f'Mother 1+2 [T+Ita{PATCH_VERSION}].gba'
  7
  8STATUS_START = "Benvenutə al patcher per Mother 1+2."
  9STATUS_PRESET = "Preset applicato."
 10STATUS_MD5 = "MD5 verificato."
 11STATUS_COPIED = "File copiati."
 12STATUS_ASSEMBLY = "Codice compilato."
 13STATUS_INJECTED = "Testo inserito."
 14STATUS_PATCHED = "Patch applicate."
 15STATUS_CLEANED = "Pulizia effettuata."
 16
 17VAR_WINDOW_TITLE = "Mother 1+2 Patcher by Earthbound Café"
 18VAR_FILEPICKER = "ROM giapponese di Mother 1+2"
 19
 20WARNING_TITLE = "Attenzione"
 21WARNING_EXTRACT = "È necessario estrarre l'archivio."
 22WARNING_MD5_MISMATCH = "La ROM selezionata non è compatibile con la nostra patch."
 23
 24PATH_TOOLS = os.path.join('.', 'tools')
 25PATH_ALT = os.path.join(PATH_TOOLS, 'alt')
 26
 27PRESETS = {
 28    "Scelte consigliate": {
 29        'font': 1,
 30        'sprites': 3,
 31        'places': 6,
 32        'palette': 8,
 33        'skip_m1': 1
 34        },
 35    "EB Beginnings (US)": {
 36        'font': 1,
 37        'sprites': 4,
 38        'places': 6,
 39        'palette': 8,
 40        'skip_m1': 1
 41        },
 42    "Mother 1 (JP)": {
 43        'font': 1,
 44        'sprites': 5,
 45        'places': 7,
 46        'palette': 8,
 47        'skip_m1': 1
 48        },
 49    "Mother 1+2": {
 50        'font': 1,
 51        'sprites': 4,
 52        'places': 7,
 53        'palette': 9,
 54        'skip_m1': 0
 55        }
 56}
 57
 58DEF_FILENAMES = {
 59    'font': ['m1_gfx_font.bin'],
 60    'sprites': [
 61        'm1_restoration_gfx_sprites.bin',
 62        'm1_restoration_gfx_ending.bin',
 63        'm1_restoration_gfx_enemies.bin',
 64        'm1_restoration_gfx_maptiles.bin'
 65    ],
 66    'places': [
 67        'm1_main_text.txt',
 68        'm1_gfx_map.bin'
 69    ]
 70}
 71
 72ALT_FILENAMES = {
 73    1: ['m1_gfx_font_og.bin'],
 74
 75    2: ['m1_gfx_font_new.bin'],
 76
 77    3: ['m1_restoration_gfx_sprites_mix.bin',
 78        'm1_restoration_gfx_ending_us.bin',
 79        'm1_restoration_gfx_enemies_jp.bin',
 80        'm1_restoration_gfx_maptiles_jp.bin'],
 81
 82    4: ['m1_restoration_gfx_sprites_us.bin',
 83        'm1_restoration_gfx_ending_us.bin',
 84        'm1_restoration_gfx_enemies_us.bin',
 85        'm1_restoration_gfx_maptiles_us.bin'],
 86
 87    5: ['m1_restoration_gfx_sprites_jp.bin',
 88        'm1_restoration_gfx_ending_jp.bin',
 89        'm1_restoration_gfx_enemies_jp.bin',
 90        'm1_restoration_gfx_maptiles_jp.bin'],
 91
 92    6: ['m1_main_text_us.txt',
 93        'm1_gfx_map_us.bin'],
 94
 95    7: ['m1_main_text_jp.txt',
 96        'm1_gfx_map_jp.bin'],
 97    
 98    8: 'nes.ips',
 99    9: None,
100    10: 'ncm.ips',
101    11: 'vc.ips',
102    12: 'skipm1.ips',
103    13: None
104}
105
106OS_SUFFIX = (
107    '.exe' if platform.startswith('win32') else
108    '_mac' if platform.startswith('darwin')
109    else ''
110)
111
112OS_FILENAMES = {
113    'xkas': os.path.join('.', 'xkas' + OS_SUFFIX),
114    'insert': os.path.join('.', 'insert' + OS_SUFFIX),
115    'introconv': os.path.join('.', 'introconv' + OS_SUFFIX)
116}
117
118OS_SHELL = True if os.name == 'nt' else False