123456abcdef/cr-sc-dump

Decoding does not work for CoC v15.0.3 apk

anno73 opened this issue · 1 comments

Hi!

I tried to extract *_tex.sc files from CoC v15.0.3 apk.
Many times an image can be extracted but I also get error

background_cc_gamearea_tex.sc
SystemError PY_SSIZE_T_CLEAN macro must be defined for '#' formats

or

background_gamearea_tex.sc
file_type: 28, file_size: 4686189, sub_type: 4, width: 1286, height: 1822
with a totally messed up image.
Especially buildings_cc_tex_0.png and some more look more like art wall papers :-)

When extracting *.sc files with option --old I get "empty" images (at least irfanview decodes but shows nothing) and lots of errors:

background_cc_gamearea.sc
SystemError PY_SSIZE_T_CLEAN macro must be defined for '#' formats

background_player.sc
file_type: 1, file_size: 5, sub_type: 0, width: 1930, height: 3072
ValueError not enough image data

Any idea?

background_cc_gamearea_tex.sc
SystemError PY_SSIZE_T_CLEAN macro must be defined for '#' formats

CoC uses LZHAM for compression on some assets. The Python module pylzham has to be fixed to support Python >= 3.10. See the corresponding issue. For now please use Python < 3.10.

background_gamearea_tex.sc
file_type: 28, file_size: 4686189, sub_type: 4, width: 1286, height: 1822
with a totally messed up image.
Especially buildings_cc_tex_0.png and some more look more like art wall papers :-)

The PNG looks as expected. What you see is the raw asset. The game cuts and rotates the assets as needed.

background_player.sc
file_type: 1, file_size: 5, sub_type: 0, width: 1930, height: 3072
ValueError not enough image data

None of the *.sc from CoC contain additional images. This repo tries to read the *.sc files.