
    |Lj4                        d Z ddlmZ ddlZddlZddlmZ ddlmZ  ee	      j                         j                  d   Zedz  Zedz  Zdd	Zdd
ZddZddZddZddZedk(  r e        yy)aJ  Consolidate the remaining static frontier for field map visible animation.

The map animation evidence is intentionally split across many focused reports.
This page keeps the decision boundary clear:

* layer1 bit 0x40 is a redraw/animated-cell consumer signal;
* the draw path uses ordinary tile-id -> source-rect conversion;
* resource roots for animated maps do not contain animation commands;
* active-object +0xec scripts and runtime +0x64 frame scripts do not contain
  command-boundary live tile writes;
* the offset-shift hypothesis is a visual/manual aid, not an EXE producer.
    )annotationsN)Path)Any   outwebc                    	 t        j                  t        | z  j                  d            }t        |t              r|S i S # t        $ r i cY S w xY w)Nutf-8encoding)jsonloadsOUT	read_textFileNotFoundError
isinstancedict)namedatas     3tools/build_map_animation_static_frontier_review.py	load_jsonr      sS    zz3:00'0BC dD)41r1  	s   ,A AAc                ^    t        |       j                  d      }t        |t              r|S i S )Nsummary)r   getr   r   )r   values     r   r   r   #   s*    dO	*Eud+533    c                V    t        j                  | dd      S t        |       d      S )N T)quote)htmlescapestr)r   s    r   hr#   (   s%    ;;U]r$GGE
$GGr   c                 *   t        d      } t        d      }t        d      }t        d      }t        d      }t        d      }t        d      }t        d      }t        d	      }t        d
      }	t        d      }
t        d      }t        d      }t        d      }dddd| j                  d       d| j                  d       d|j                  d       d|j                  d       dddddd|j                  d        d!|j                  d"       d#|j                  d$       d%|j                  d&       d'dd(d)dd*|j                  d+       d,|j                  d       d-|j                  d.       d/|j                  d0       d1dd2d3d4d5|j                  d6       d7|j                  d8       d9|j                  d:       d;dd<d=dd>|j                  d?       d@|j                  dA       dB|j                  dC       dDddEd=ddF|	j                  dG       dH|	j                  dI       dJ|	j                  dK       dLddMdNdOdP|
j                  dQ       dR|
j                  dS       dT|
j                  dU       dV|
j                  dW       dXddYddOdZ|j                  d[       d\|j                  d]       d^|j                  d_       d`ddadbdcdd|j                  de       df|j                  dg       dhdg	}g di}|D cg c]  }|dj   j                  dk      s| }}dldmg dn| j                  d      | j                  d      t        |      t	        |j                  d            t	        |j                  d&            t	        |j                  do            t	        |j                  dp            t	        |	j                  dK            t	        |j                  dq            t	        |j                  dr            t        |      dsdt||duS c c}w )vNzmap_animation_tile_review.jsonz%map_animation_exe_pattern_review.jsonz)map_animation_resource_binding_probe.jsonz,map_animation_live_buffer_writer_review.jsonz4map_animation_object_relative_tile_write_review.jsonz)map_animation_redraw_consumer_review.jsonz-map_animation_draw_tile_transform_review.jsonz$map_animation_tick_route_review.jsonz9map_animation_active_object_script_tile_write_review.jsonz1map_animation_frame_script_tile_write_review.jsonz4map_animation_non_object_tile_write_root_review.jsonz3map_animation_specialized_loop_boundary_review.jsonz*map_animation_shift_hypothesis_review.jsonz,map_animation_execution_boundary_review.jsonzlayer1 0x40 flagged cellszconsumer-groundedhighzanimated maps=animatedMapCountz; cells=animatedCellCountz; redraw path=redrawPathGroundedz; flag consumer="layer1AnimatedFlagConsumerGroundedzh0x40 marks cells that participate in redraw/animation handling, but it is not itself the frame sequence.)surfacestatus
confidenceevidencedecisionzdraw-time tile source transformz	not-foundzhigh-negativeztile rect formula=tileGridFormulaz; uses 0x40=usesLayer1AnimatedFlag0x40z; uses frame counter=usesFrameCounterz; visible motion transform=#drawTimeVisibleMotionTransformFoundzsThe inspected renderer draws the current live layer0 tile id normally; it does not shift source rects at draw time.zanimated map resource rootsz+resource-grounded-animation-command-unboundzmaps with exact root=mapsWithExactResourceRoot/z; palette inside roots=*paletteCommandInsideExactResourceRootCountz; tile-write inside roots=,tileWriteCommandInsideExactResourceRootCountzDMap resource package roots are not the visible animation loop roots.z&live layer0/layer1 tile write handlersz!handler-grounded-producer-unboundzmedium-highzcandidate VM write refs=candidateVmTileWriteRefCountz!; inside animated resource roots=3candidateVmTileWriteRefsInsideAnimatedResourceRootsz; handler opcodes=handlerOpcodeCountz`Tile-write handlers exist, but the static pass has not connected them to animated-map execution.zactive-object +0xec scriptsznegative-command-boundaryzstrict scripts=strictObjectEcScriptCountz; command-boundary tile writes=commandBoundaryTileWriteCountz; raw candidates=rawTileWriteCandidateCountznRaw byte coincidences exist but no strict active-object script decodes to a promoted live tile-write producer.zruntime +0x64 frame scriptszopcode20 targets=opcode20AttachTargetCountz; opcode18 state entries=opcode18StateEntryTargetCountz; tile-write producer found=!frameScriptTileWriteProducerFoundzmRuntime-installed frame scripts are grounded, but they do not contain promoted tile-write animation commands.z#non-object aligned tile-write roots
unpromotedzmedium-high-negativezaligned commands=alignedTileWriteCommandCountz; roots=uniqueRootCountz; direct animated evidence="directAnimatedEvidenceCommandCountz; promoted=$promotedAnimatedProducerCommandCountzpAligned VM-shaped tile writes exist, but none both binds to an animated map and writes the animated cells/tiles.zspecialized tick/draw loopzinspected windows=inspectedWindowCountz; direct callees=directCalleeCountz; strong candidates=strongSpecializedCandidateCountz_No separate specialized visible-motion producer was exposed in the inspected tick/draw windows.z"offset/row shift visual hypothesiszvisual-aid-not-producerzmanual-review-onlyzclasses=classesz; components=componentCountzOThis helps inspect how frames might look, but it is not EXE execution evidence.)z{Search for an animated-map-specific state counter or tile-substitution table outside object +0xec/+0x64 script inventories.zIf continuing statically, prioritize functions that reference both map layer buffers and a small frame counter/state byte, not resource roots alone.zvDo not promote palette commands, offset-shift visuals, or raw tile-write byte coincidences without an execution route.zRuntime observation would be useful only as a narrow watch on live layer0 writes/palette writes for map1_01a/map1_02b; static evidence remains preferred.r+   zproducer-groundedr   z+hwanse-map-animation-static-frontier-review)z"out/map_animation_tile_review.jsonz-out/map_animation_redraw_consumer_review.jsonz1out/map_animation_draw_tile_transform_review.jsonz-out/map_animation_resource_binding_probe.jsonz0out/map_animation_live_buffer_writer_review.jsonz=out/map_animation_active_object_script_tile_write_review.jsonz5out/map_animation_frame_script_tile_write_review.jsonz8out/map_animation_non_object_tile_write_root_review.jsonz7out/map_animation_specialized_loop_boundary_review.jsonz.out/map_animation_shift_hypothesis_review.jsonz0out/map_animation_execution_boundary_review.jsonallExactResourceRootsUnbound(activeObjectScriptTileWriteProducerFound%specializedVisibleMotionProducerFound#visibleMotionExecutionBindingProvenaH  The 0x40 redraw consumer is grounded, but no static producer has been promoted for visible fire/waterfall motion. Current evidence excludes draw-time source transform, animated resource roots, active-object scripts, frame scripts, non-object roots, specialized tick/draw loops, and pure offset-shift visuals as sufficient proof.)r&   r'   surfaceCountconsumerGroundeddrawTimeTransformFoundresourceRootsUnboundactiveObjectProducerFoundframeScriptProducerFoundspecializedProducerFoundrM   promotedProducerCountr.   )versionkindsourceArtifactsr   surfacesnextFrontier)r   r   endswithlenbool)tileexe_patternresourceliveobject_relativeredrawdraw_transformtickactive_scriptframe_script
non_objectspecializedshiftboundaryrY   next_frontierrowpromoteds                     r   buildro   ,   s"   34DABKBCHABDTUO@AFLMN9:DWXMNOLOPJOPK@AEEFH 3)  *<!= >htxxPcGdFe f%zz*>?@@PQWQ[Q[  ]A  RB  QCD C		
 9!)$^%7%78I%J$K L+//0LMN O&&4&8&89K&L%M N,,:,>,>?d,e+fh
 N	
 5C '5P(Q'RRS<< 2344K<< LMNNh<< NOPR
 _	
 @9'*4884R+S*T U226((;p2q1r s##'88,@#A"BD {
	
 51)!-"3"34O"P!Q R00=0A0ABa0b/c d""/"3"34P"Q!RT I
	
 51)#L$4$45P$Q#R S**6*:*:;Z*[)\ ]--9-=-=>a-b,ce H
	
 ="0#JNN3Q$R#SS[\f\j\jk|\}[~ ,,6NN;_,`+a b&NN+QRSU K
	
 4!0$[__5K%L$M N""-//2E"F!G H%%0__5V%W$XZ z
	
 </."599Y#7"8eiiP`FaEbci	
uaHFM  (W3x=+A+ABU+VWHW=
 !%); <!%*=!>M $VZZ0D%E F&*>+=+=>c+d&e$(6T)U$V)-m.?.?@j.k)l(,\-=-=>a-b(c(,[__=d-e(f37Ej8k3l%(]t
$ %G$ $ Xs    PPc                    dj                  d | d   j                         D              }dj                  d | d   D              }dj                  d | d   D              }d| d	| d
| dS )Nr   c              3  X   K   | ]"  \  }}d t        |       dt        |       d $ yw)z<div class='card'><b>z
</b><span>z</span></div>Nr#   ).0kvs      r   	<genexpr>zrender_html.<locals>.<genexpr>   s3      Aq  !vZ!v]Cs   (*r   c              3     K   | ]R  }d t        |d          dt        |d          dt        |d          dt        |d          dt        |d	          d
 T yw)z<tr><td><b>r*   z</b></td><td>r+   z<br><small>r,   z</small></td><td>r-   z	</td><td>r.   z
</td></tr>Nrr   )rs   rm   s     r   rv   zrender_html.<locals>.<genexpr>   s       	C	N#$ %X Ac,.?,@+A BZ!" #Z!" #		s   AArY   c              3  :   K   | ]  }d t        |       d  yw)z<li>z</li>Nrr   )rs   items     r   rv   zrender_html.<locals>.<genexpr>   s     NagYe,Ns   rZ   u  <!doctype html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Map Animation Static Frontier</title>
<style>
  :root { color-scheme: light dark; }
  body { margin:24px; font-family:system-ui,-apple-system,Segoe UI,sans-serif; line-height:1.45; }
  h1 { margin:0 0 8px; font-size:24px; }
  .muted { color:#667085; }
  .cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; margin:16px 0; }
  .card { border:1px solid #d0d5dd; border-radius:8px; padding:10px 12px; background:rgba(127,127,127,.05); }
  .card b { display:block; color:#667085; font-size:12px; }
  .card span { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap:anywhere; }
  .scroll { overflow-x:auto; }
  table { width:100%; border-collapse:collapse; }
  th,td { border:1px solid #d0d5dd; padding:7px 8px; vertical-align:top; }
  th { text-align:left; background:rgba(127,127,127,.08); }
  small { color:#667085; }
</style>
<h1>Map Animation Static Frontier</h1>
<p class="muted">필드 맵 애니메이션의 소비/후보/배제 표면을 통합합니다.</p>
<div class="cards">z</div>
<div class="scroll"><table>
<thead><tr><th>surface</th><th>status</th><th>evidence</th><th>decision</th></tr></thead>
<tbody>z3</tbody>
</table></div>
<h2>Next Frontier</h2>
<ul>z</ul>
)joinitems)r   cardsrowsfrontiers       r   render_htmlr      s    GG O))+ E 77  
# D wwNn9MNNH* 7  	v  J 7 r   c                 X   t               } t        j                  d       t        j                  d       t        dz  j	                  t        j                  | dd      dz   d	       t        d
z  j	                  t        |       d	       t        d| d   d    d| d   d    d       y )NT)exist_okz)map_animation_static_frontier_review.jsonF   )ensure_asciiindent
r
   r   z)map_animation_static_frontier_review.htmlz.wrote map animation static frontier (consumer=r   rO   z, producer=rU   ))	ro   r   mkdirWEB
write_textr   dumpsr   print)r   s    r   mainr      s    7DIItIIItI66BB

4eA6= C  	66BBD C  
	)_%789T)_UlEmDnno	qr   __main__)r   r"   returndict[str, Any])r   r   r   r"   )r   r   )r   r   r   r"   )r   None)__doc__
__future__r   r    r   pathlibr   typingr   __file__resolveparentsROOTr   r   r   r   r#   ro   r   r   __name__ r   r   <module>r      s    #     H~''*
Ul
Ul24
H_D+\$ zF r   