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_PRESET = "Preset applicato" # Niente punto qui
9STATUS_START = "Patcher pronto all'uso."
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
24SUCCESS_TITLE = "Finito!"
25SUCCESS_CONTENT = f"La ROM {FINAL_ROM_NAME} è stata creata con successo!"
26
27PATH_TOOLS = os.path.join('.', 'tools')
28PATH_ALT = os.path.join(PATH_TOOLS, 'alt')
29
30PRESETS = {
31 "Scelte consigliate": {
32 'font': 'fonts_og',
33 'sprites': 'sprites_mix',
34 'places': 'places_us',
35 'palette': 'palette_nes',
36 'skip_m1': 'skip_m1_yes'
37 },
38 "EB Beginnings (US)": {
39 'font': 'fonts_og',
40 'sprites': 'sprites_us',
41 'places': 'places_us',
42 'palette': 'palette_nes',
43 'skip_m1': 'skip_m1_yes'
44 },
45 "Mother 1 (JP)": {
46 'font': 'fonts_og',
47 'sprites': 'sprites_jp',
48 'places': 'places_jp',
49 'palette': 'palette_nes',
50 'skip_m1': 'skip_m1_yes'
51 },
52 "Mother 1+2": {
53 'font': 'fonts_og',
54 'sprites': 'sprites_us',
55 'places': 'places_jp',
56 'palette': 'palette_gba',
57 'skip_m1': 'skip_m1_no'
58 }
59}
60
61ALT_FILENAMES = {
62 'fonts_og':
63 ['m1_gfx_font_og.bin'],
64 'fonts_new':
65 ['m1_gfx_font_new.bin'],
66 'sprites_mix':
67 ['m1_restoration_gfx_sprites_mix.bin',
68 'm1_restoration_gfx_ending_us.bin',
69 'm1_restoration_gfx_enemies_jp.bin',
70 'm1_restoration_gfx_maptiles_jp.bin'],
71 'sprites_us':
72 ['m1_restoration_gfx_sprites_us.bin',
73 'm1_restoration_gfx_ending_us.bin',
74 'm1_restoration_gfx_enemies_us.bin',
75 'm1_restoration_gfx_maptiles_us.bin'],
76 'sprites_jp':
77 ['m1_restoration_gfx_sprites_jp.bin',
78 'm1_restoration_gfx_ending_jp.bin',
79 'm1_restoration_gfx_enemies_jp.bin',
80 'm1_restoration_gfx_maptiles_jp.bin'],
81 'places_us':
82 ['m1_main_text_us.txt',
83 'm1_gfx_map_us.bin'],
84 'places_jp':
85 ['m1_main_text_jp.txt',
86 'm1_gfx_map_jp.bin'],
87
88 'palette_nes': 'nes.ips',
89 'palette_gba': None,
90 'palette_ncm': 'ncm.ips',
91 'palette_vc': 'vc.ips',
92 'skip_m1_yes': 'skipm1.ips',
93 'skip_m1_no': None
94}
95
96DEF_FILENAMES = {
97 'font': [
98 'm1_gfx_font.bin'
99 ],
100 'sprites': [
101 'm1_restoration_gfx_sprites.bin',
102 'm1_restoration_gfx_ending.bin',
103 'm1_restoration_gfx_enemies.bin',
104 'm1_restoration_gfx_maptiles.bin'
105 ],
106 'places': [
107 'm1_main_text.txt',
108 'm1_gfx_map.bin'
109 ]
110}
111
112OS_SUFFIX = (
113 '.exe' if platform.startswith('win32') else
114 '_mac' if platform.startswith('darwin')
115 else ''
116)
117
118OS_FILENAMES = {
119 'xkas': os.path.join('.', 'xkas' + OS_SUFFIX),
120 'insert': os.path.join('.', 'insert' + OS_SUFFIX),
121 'introconv': os.path.join('.', 'introconv' + OS_SUFFIX)
122}
123
124OS_SHELL = True if os.name == 'nt' else False