Skip to content

Conversation

@isHarryh
Copy link
Contributor

@isHarryh isHarryh commented May 29, 2025

Summary

This PR refactors the CONV_TABLE and it related code.

  • Before: { TF -> (function, arg1, arg2, ...) }
  • After: { TF -> (function, (arg1, arg2, ...)) }

This PR also:

  1. Fixes a typo (that could cause error) in CONV_TABLE where EAC_R:SIGNED should be EAC_R_SIGNED.
  2. Changes the fmt argument of etc function to maintain consistency with eac.

Rationality

  1. Clearly separate function and its additional arguments.

  2. Resolves typing_extensions import error.
    In 035cb09 , typing_extensions package has been introduced to Texture2DConverter to provide the Unpack type hint. However, this package is not a standard library, so it is not installed in some Python environments, causing ModuleNotFoundError. Adding this package to UnityPy's dependencies explicitly can solve this error, but it is not worth it.

This PR is a part of #318

@isHarryh isHarryh force-pushed the patch-texture-refactor branch from bf4d4a4 to cd72704 Compare May 29, 2025 06:13
@isHarryh isHarryh changed the title Refactor the converter table in Texture2DConverter) Refactor the converter table in Texture2DConverter May 29, 2025
@K0lb3 K0lb3 force-pushed the patch-texture-refactor branch from cd72704 to f02429d Compare May 31, 2025 19:05
@K0lb3 K0lb3 merged commit cfbcea8 into K0lb3:master May 31, 2025
6 checks passed
@isHarryh isHarryh deleted the patch-texture-refactor branch June 1, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants