XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEEDToolBox

【WinUI】XFE精英危险工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
"""Freeze actual Activities colour/default-size inputs; offline only."""
import hashlib
import json
from pathlib import Path

source=Path('research/Extract-OriginalGalaxyAppearance.py')
scope={}
exec(compile(source.read_text(encoding='utf8').split('result=dict(')[0],str(source),'exec'),scope)
if hashlib.sha256(scope['b']).hexdigest()!='5135b3d55e5239b3d11f79a76adeda954eb78be5101b6a516fd25df257affa77':
    raise ValueError('Original frozen appearance resource changed')
defaults=[dict(field=hex(field),linearRgb=scope['floats']((286,6144+field),3)) for field in (0xF8,0x104,0x110)]
if [r['linearRgb'] for r in defaults]!=[[.4000000059604645]*3,[1.0]*3,[1.0]*3]:raise ValueError('Original Activities fallback colours changed')
compat=json.loads(Path('artifacts/galaxy-query-research/power-outer-sources/compatibility.json').read_text())
if len(compat['outerStyleLeaves'])!=2 or any(not r['fullBytesIdentical'] for r in compat['outerStyleLeaves']):raise ValueError('Missing full leaf proof')
result=dict(runtimeNeutral=True,gameCalls=0,networkRequests=0,runtimeValidated=False,canInstallHooks=False,
    sourceResource=scope['key'],frozenSha256=hashlib.sha256(scope['b']).hexdigest(),configuration=dict(pool=286,offset=6144),
    defaults=defaults,size=scope['floats']((286,6144+0x1C),1)[0],opacityWhenDebugDisabled=1,
    selector=dict(source='3B2F080',controlled='actual owner index selects original Power definition raw RGB',
        unoccupied='contest flags+4C: popcount>1 selects130; any bit selects118; zero selects100',invalidOwner='fallback100'),
    transfer=dict(source='3AC40B0(mode0) ->6CCBE0',gamma=2.4,offset=.055,
        formula='pivot=(offset*gamma/((gamma-1)*(1+offset)))^gamma; slope=(gamma-1)/offset*pivot; linear<pivot ? linear/slope : (1+offset)*linear^(1/gamma)-offset'),
    compatibility=compat['outerStyleLeaves'],limits=['No original game process was invoked.',
        'Style is unknown with debug colour alpha enabled, missing metadata/definitions, or an unstable source.',
        'Original range-shell/connection geometry and frame fade are independent and remain pending.'])
path=Path('artifacts/galaxy-query-research/power-outer-sources/original-outer-style.json')
path.write_text(json.dumps(result,indent=2)+'\n',encoding='utf8')
print(json.dumps(dict(report=str(path),defaults=defaults,size=result['size'],runtimeValidated=False),indent=2))