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 = "Patcher pronto all'uso."
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
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': 1,
33 'sprites': 3,
34 'places': 6,
35 'palette': 8,
36 'skip_m1': 12
37 },
38 "EB Beginnings (US)": {
39 'font': 1,
40 'sprites': 4,
41 'places': 6,
42 'palette': 8,
43 'skip_m1': 12
44 },
45 "Mother 1 (JP)": {
46 'font': 1,
47 'sprites': 5,
48 'places': 7,
49 'palette': 8,
50 'skip_m1': 12
51 },
52 "Mother 1+2": {
53 'font': 1,
54 'sprites': 4,
55 'places': 7,
56 'palette': 9,
57 'skip_m1': 13
58 }
59}
60
61DEF_FILENAMES = {
62 'font': ['m1_gfx_font.bin'],
63 'sprites': [
64 'm1_restoration_gfx_sprites.bin',
65 'm1_restoration_gfx_ending.bin',
66 'm1_restoration_gfx_enemies.bin',
67 'm1_restoration_gfx_maptiles.bin'
68 ],
69 'places': [
70 'm1_main_text.txt',
71 'm1_gfx_map.bin'
72 ]
73}
74
75ALT_FILENAMES = {
76 1: ['m1_gfx_font_og.bin'],
77
78 2: ['m1_gfx_font_new.bin'],
79
80 3: ['m1_restoration_gfx_sprites_mix.bin',
81 'm1_restoration_gfx_ending_us.bin',
82 'm1_restoration_gfx_enemies_jp.bin',
83 'm1_restoration_gfx_maptiles_jp.bin'],
84
85 4: ['m1_restoration_gfx_sprites_us.bin',
86 'm1_restoration_gfx_ending_us.bin',
87 'm1_restoration_gfx_enemies_us.bin',
88 'm1_restoration_gfx_maptiles_us.bin'],
89
90 5: ['m1_restoration_gfx_sprites_jp.bin',
91 'm1_restoration_gfx_ending_jp.bin',
92 'm1_restoration_gfx_enemies_jp.bin',
93 'm1_restoration_gfx_maptiles_jp.bin'],
94
95 6: ['m1_main_text_us.txt',
96 'm1_gfx_map_us.bin'],
97
98 7: ['m1_main_text_jp.txt',
99 'm1_gfx_map_jp.bin'],
100
101 8: 'nes.ips',
102 9: None,
103 10: 'ncm.ips',
104 11: 'vc.ips',
105 12: 'skipm1.ips',
106 13: None
107}
108
109OS_SUFFIX = (
110 '.exe' if platform.startswith('win32') else
111 '_mac' if platform.startswith('darwin')
112 else ''
113)
114
115OS_FILENAMES = {
116 'xkas': os.path.join('.', 'xkas' + OS_SUFFIX),
117 'insert': os.path.join('.', 'insert' + OS_SUFFIX),
118 'introconv': os.path.join('.', 'introconv' + OS_SUFFIX)
119}
120
121OS_SHELL = True if os.name == 'nt' else False