hacktools 0.32.9__tar.gz → 0.33.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {hacktools-0.32.9/hacktools.egg-info → hacktools-0.33.0}/PKG-INFO +25 -2
  2. hacktools-0.33.0/hacktools/__init__.py +1 -0
  3. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/common.py +3 -3
  4. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/wii.py +3 -3
  5. {hacktools-0.32.9 → hacktools-0.33.0/hacktools.egg-info}/PKG-INFO +25 -2
  6. {hacktools-0.32.9 → hacktools-0.33.0}/setup.py +1 -0
  7. hacktools-0.32.9/hacktools/__init__.py +0 -1
  8. {hacktools-0.32.9 → hacktools-0.33.0}/LICENSE +0 -0
  9. {hacktools-0.32.9 → hacktools-0.33.0}/MANIFEST.in +0 -0
  10. {hacktools-0.32.9 → hacktools-0.33.0}/README.md +0 -0
  11. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/arch.py +0 -0
  12. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/assets/icon.png +0 -0
  13. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/c_ext/cmp_cri.c +0 -0
  14. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/c_ext/cmp_lzss.c +0 -0
  15. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/c_ext/cmp_misc.c +0 -0
  16. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/c_ext/inc.h +0 -0
  17. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/compression.py +0 -0
  18. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/cpk.py +0 -0
  19. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/gb.py +0 -0
  20. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/gui.py +0 -0
  21. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/nasm.py +0 -0
  22. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/nds.py +0 -0
  23. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/nitro.py +0 -0
  24. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/psp.py +0 -0
  25. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/psx.py +0 -0
  26. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools/ws.py +0 -0
  27. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools.egg-info/SOURCES.txt +0 -0
  28. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools.egg-info/dependency_links.txt +0 -0
  29. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools.egg-info/requires.txt +0 -0
  30. {hacktools-0.32.9 → hacktools-0.33.0}/hacktools.egg-info/top_level.txt +0 -0
  31. {hacktools-0.32.9 → hacktools-0.33.0}/setup.cfg +0 -0
  32. {hacktools-0.32.9 → hacktools-0.33.0}/tests/test_cmp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hacktools
3
- Version: 0.32.9
3
+ Version: 0.33.0
4
4
  Summary: A set of utilities and tools for rom hacking and translations.
5
5
  Home-page: https://github.com/Illidanz/hacktools
6
6
  Author: Illidan
@@ -9,20 +9,43 @@ Classifier: Programming Language :: Python :: 3.8
9
9
  Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
12
13
  Classifier: License :: OSI Approved :: MIT License
13
14
  Classifier: Operating System :: OS Independent
14
15
  Requires-Python: >=3.7
15
16
  Description-Content-Type: text/markdown
17
+ License-File: LICENSE
16
18
  Provides-Extra: nds
19
+ Requires-Dist: ndspy; extra == "nds"
17
20
  Provides-Extra: armips
21
+ Requires-Dist: pyarmips; extra == "armips"
18
22
  Provides-Extra: xdelta
23
+ Requires-Dist: pyxdelta; extra == "xdelta"
19
24
  Provides-Extra: iso
25
+ Requires-Dist: pymkpsxiso; extra == "iso"
20
26
  Provides-Extra: psp
27
+ Requires-Dist: pycdlib; extra == "psp"
28
+ Requires-Dist: pyeboot; extra == "psp"
21
29
  Provides-Extra: ips
30
+ Requires-Dist: ips_util; extra == "ips"
22
31
  Provides-Extra: graphics
32
+ Requires-Dist: Pillow; extra == "graphics"
23
33
  Provides-Extra: cli
34
+ Requires-Dist: click; extra == "cli"
35
+ Requires-Dist: tqdm; extra == "cli"
36
+ Requires-Dist: customtkinter; extra == "cli"
24
37
  Provides-Extra: all
25
- License-File: LICENSE
38
+ Requires-Dist: ndspy; extra == "all"
39
+ Requires-Dist: pyarmips; extra == "all"
40
+ Requires-Dist: pyxdelta; extra == "all"
41
+ Requires-Dist: pymkpsxiso; extra == "all"
42
+ Requires-Dist: pycdlib; extra == "all"
43
+ Requires-Dist: pyeboot; extra == "all"
44
+ Requires-Dist: ips_util; extra == "all"
45
+ Requires-Dist: Pillow; extra == "all"
46
+ Requires-Dist: click; extra == "all"
47
+ Requires-Dist: tqdm; extra == "all"
48
+ Requires-Dist: customtkinter; extra == "all"
26
49
 
27
50
  # hacktools
28
51
  A set of utilities and tools for rom hacking and translations.
@@ -0,0 +1 @@
1
+ __version__ = "0.33.0"
@@ -555,11 +555,11 @@ def isAscii(s):
555
555
  return True
556
556
 
557
557
 
558
- def codeToChar(code, encoding="shift_jis"):
558
+ def codeToChar(code, encoding="shift_jis", little=True):
559
559
  try:
560
- if code < 256:
560
+ if code < 128:
561
561
  return struct.pack("B", code).decode("ascii")
562
- return struct.pack(">H", code).decode(encoding)
562
+ return struct.pack(("<" if little else ">") + "H", code).decode(encoding)
563
563
  except UnicodeDecodeError:
564
564
  return ""
565
565
 
@@ -191,7 +191,7 @@ def writeTPL(file, tpl, infile):
191
191
 
192
192
 
193
193
  # Font files
194
- def getFontGlyphs(file):
194
+ def getFontGlyphs(file, encoding="shift_jis"):
195
195
  glyphs = {}
196
196
  with common.Stream(file, "rb", False) as f:
197
197
  # Header
@@ -226,14 +226,14 @@ def getFontGlyphs(file):
226
226
  if sectiontype == 0:
227
227
  firstcode = f.readUShort()
228
228
  for i in range(lastchar - firstchar + 1):
229
- c = common.codeToChar(firstchar + i)
229
+ c = common.codeToChar(firstchar + i, encoding, little=False)
230
230
  glyphs[c] = common.FontGlyph(hdwc[firstcode + i][0], hdwc[firstcode + i][1], hdwc[firstcode + i][2], c, firstchar + i, firstcode + i)
231
231
  elif sectiontype == 1:
232
232
  for i in range(lastchar - firstchar + 1):
233
233
  charcode = f.readUShort()
234
234
  if charcode == 0xffff or charcode >= len(hdwc):
235
235
  continue
236
- c = common.codeToChar(firstchar + i)
236
+ c = common.codeToChar(firstchar + i, encoding, little=False)
237
237
  glyphs[c] = common.FontGlyph(hdwc[charcode][0], hdwc[charcode][1], hdwc[charcode][2], c, firstchar + i, charcode)
238
238
  else:
239
239
  common.logWarning("Unknown section type", sectiontype)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hacktools
3
- Version: 0.32.9
3
+ Version: 0.33.0
4
4
  Summary: A set of utilities and tools for rom hacking and translations.
5
5
  Home-page: https://github.com/Illidanz/hacktools
6
6
  Author: Illidan
@@ -9,20 +9,43 @@ Classifier: Programming Language :: Python :: 3.8
9
9
  Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
12
13
  Classifier: License :: OSI Approved :: MIT License
13
14
  Classifier: Operating System :: OS Independent
14
15
  Requires-Python: >=3.7
15
16
  Description-Content-Type: text/markdown
17
+ License-File: LICENSE
16
18
  Provides-Extra: nds
19
+ Requires-Dist: ndspy; extra == "nds"
17
20
  Provides-Extra: armips
21
+ Requires-Dist: pyarmips; extra == "armips"
18
22
  Provides-Extra: xdelta
23
+ Requires-Dist: pyxdelta; extra == "xdelta"
19
24
  Provides-Extra: iso
25
+ Requires-Dist: pymkpsxiso; extra == "iso"
20
26
  Provides-Extra: psp
27
+ Requires-Dist: pycdlib; extra == "psp"
28
+ Requires-Dist: pyeboot; extra == "psp"
21
29
  Provides-Extra: ips
30
+ Requires-Dist: ips_util; extra == "ips"
22
31
  Provides-Extra: graphics
32
+ Requires-Dist: Pillow; extra == "graphics"
23
33
  Provides-Extra: cli
34
+ Requires-Dist: click; extra == "cli"
35
+ Requires-Dist: tqdm; extra == "cli"
36
+ Requires-Dist: customtkinter; extra == "cli"
24
37
  Provides-Extra: all
25
- License-File: LICENSE
38
+ Requires-Dist: ndspy; extra == "all"
39
+ Requires-Dist: pyarmips; extra == "all"
40
+ Requires-Dist: pyxdelta; extra == "all"
41
+ Requires-Dist: pymkpsxiso; extra == "all"
42
+ Requires-Dist: pycdlib; extra == "all"
43
+ Requires-Dist: pyeboot; extra == "all"
44
+ Requires-Dist: ips_util; extra == "all"
45
+ Requires-Dist: Pillow; extra == "all"
46
+ Requires-Dist: click; extra == "all"
47
+ Requires-Dist: tqdm; extra == "all"
48
+ Requires-Dist: customtkinter; extra == "all"
26
49
 
27
50
  # hacktools
28
51
  A set of utilities and tools for rom hacking and translations.
@@ -48,6 +48,7 @@ setup(
48
48
  "Programming Language :: Python :: 3.9",
49
49
  "Programming Language :: Python :: 3.10",
50
50
  "Programming Language :: Python :: 3.11",
51
+ "Programming Language :: Python :: 3.12",
51
52
  "License :: OSI Approved :: MIT License",
52
53
  "Operating System :: OS Independent",
53
54
  ],
@@ -1 +0,0 @@
1
- __version__ = "0.32.9"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes