#!/usr/bin/env python3 """Native wall/secret-cave pixels, including submenu and persistent reload.""" import json from PIL import Image from extract_graphics import ROOT from nes_object_graphics import item from validate_octorok_graphics import native_image out=ROOT/'extracted/real_secret';caps=out/'validation';checks=[] def validate(name,ref,ignore=(),offset=0,rupee=False): actual=Image.open(caps/(name+'.png')).convert('RGBA');assert actual.getpixel((0,0))==(0,255,0,255),name expected=Image.open(ref).convert('RGBA') if rupee: # Fixture clock is zero: the existing item animator selects blue palette 1. info=item(22);info=dict(info,attributes=[(a&252)|1 for a in info['attributes']]);expected.paste((0,0,0,255),(120,153,136,169));expected.alpha_composite(native_image(info),(120,153)) bad=[] for y in range(64+offset,240): for x in range(256): if any(x0<=x