File size: 2,141 Bytes
37a275a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python3
"""Complete144766 using original character bindings, tags, surfaces and frame bytes."""
from pathlib import Path
from qvm_research_support import source
from analyze_qvm_complete_model_hit import prepare,complete
from analyze_md3_original_hierarchy import scene,geometry,NODES
from analyze_qvm_model_transforms import TABLES
from analyze_qvm_entity_init import POOL,STRIDE
from analyze_qvm_acceleration import word
from analyze_qvm import write_json
from analyze_md3_original_leaf import aimed_ray

def main():
    q,raw,h,ins=source();rows=[]
    cases=[(character,frame,hit) for character in ['athena','orion'] for frame,hit in [(0,False),(0,True),(22,True)]]
    for character,frame,hit in cases:
        m,bs,args,names=prepare(raw,h,frame);original,original_bs,models,bindings,attachments=scene(raw,h,ins,character,extra_frames=[frame]);m.update(original);bs.update(original_bs);client=m[POOL+65*STRIDE+520];selector=int(character=='orion');m[client+700]=selector
        for o in [6196,6204,6248,6256]:m[client+o]=frame
        for table,p in zip(TABLES,NODES):m[table+16*selector]=p
        start,end=((0,0,100),(0,0,-100)) if hit else ((10000,10000,100),(10000,10000,-100))
        if hit and frame:
            start,direction=aimed_ray(models[NODES[0]],frame);end=[x+200*y for x,y in zip(start,direction)]
        for p,v in [(args[16],start),(args[20],end)]:
            for j,x in enumerate(v):m[p+4*j]=word(x)
        def resolved(i,m,a):return geometry(i,m,bs,models,a)
        m,r=complete(ins,m,bs,args,{},geometry_resolver=resolved);r.update({'character':character,'frame_fixture':frame,'aimed_fixture':hit,'bindings':bindings,'attachments':attachments});rows.append(r)
    write_json(Path('docs/research/md3-original-model-hit.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete144766 with actual pose, original MD3/tag hierarchy, full leaf geometry and sorting/publication. Explicit target/clock/frame/ray fixtures, finite native math and bounded allocation/zero fill models. No original loader/native process/world collision parity.'})
if __name__=='__main__':main()