Advertisement
exodus122

OoT Dynapoly bgId viewer lua script

Apr 6th, 2023 (edited)
686
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 66.70 KB | None | 0 0
  1. -- this is a modified version of https://github.com/MrCheeze/zelda64-heapviz
  2. -- this script prints out the bgId for all currently loaded dynapoly actors
  3.  
  4. actor_defs = {
  5.     MM={
  6.         [0]="Player",
  7.         [1]="En_Test",
  8.         [2]="En_GirlA",
  9.         [3]="En_Part",
  10.         [4]="En_Light",
  11.         [5]="En_Door",
  12.         [6]="En_Box",
  13.         [7]="En_Pametfrog",
  14.         [8]="En_Okuta",
  15.         [9]="En_Bom",
  16.         [10]="En_Wallmas",
  17.         [11]="En_Dodongo",
  18.         [12]="En_Firefly",
  19.         [13]="En_Horse",
  20.         [14]="En_Item00",
  21.         [15]="En_Arrow",
  22.         [16]="En_Elf",
  23.         [17]="En_Niw",
  24.         [18]="En_Tite",
  25.         [19]="_filler_En_Reeba_filler_",
  26.         [20]="En_Peehat",
  27.         [21]="En_Butte",
  28.         [22]="En_Insect",
  29.         [23]="En_Fish",
  30.         [24]="En_Holl",
  31.         [25]="En_Dinofos",
  32.         [26]="En_Hata",
  33.         [27]="En_Zl1",
  34.         [28]="En_Viewer",
  35.         [29]="En_Bubble",
  36.         [30]="Door_Shutter",
  37.         [31]="_filler_En_Dodojr_filler_",
  38.         [32]="En_Boom",
  39.         [33]="En_Torch2",
  40.         [34]="En_Minifrog",
  41.         [35]="_filler_En_Tp_filler_",
  42.         [36]="En_St",
  43.         [37]="_filler_En_Bw_filler_",
  44.         [38]="En_A_Obj",
  45.         [39]="Obj_Wturn",
  46.         [40]="En_River_Sound",
  47.         [41]="_filler_En_Horse_Normal_filler_",
  48.         [42]="En_Ossan",
  49.         [43]="_filler_En_Horse_Ganon_filler_",
  50.         [44]="_filler_En_Xc_filler_",
  51.         [45]="En_Famos",
  52.         [46]="_filler_En_Mb_filler_",
  53.         [47]="En_Bombf",
  54.         [48]="_filler_En_Zl2_filler_",
  55.         [49]="_filler_En_OE2_filler_",
  56.         [50]="En_Am",
  57.         [51]="En_Dekubaba",
  58.         [52]="En_M_Fire1",
  59.         [53]="En_M_Thunder",
  60.         [54]="Bg_Breakwall",
  61.         [55]="_filler_En_Horse_Zelda_filler_",
  62.         [56]="Door_Warp1",
  63.         [57]="Obj_Syokudai",
  64.         [58]="Item_B_Heart",
  65.         [59]="En_Dekunuts",
  66.         [60]="En_Bbfall",
  67.         [61]="Arms_Hook",
  68.         [62]="En_Bb",
  69.         [63]="Bg_Keikoku_Spr",
  70.         [64]="_filler_Bg_Mjin_filler_",
  71.         [65]="En_Wood02",
  72.         [66]="_filler_En_Lightbox_filler_",
  73.         [67]="En_Death",
  74.         [68]="En_Minideath",
  75.         [69]="_filler_En_Ta_filler_",
  76.         [70]="_filler_En_Tk_filler_",
  77.         [71]="En_Vm",
  78.         [72]="Demo_Effect",
  79.         [73]="Demo_Kankyo",
  80.         [74]="En_Floormas",
  81.         [75]="_filler_En_Heishi1_filler_",
  82.         [76]="En_Rd",
  83.         [77]="Bg_F40_Flift",
  84.         [78]="_filler_Bg_Heavy_Block_filler_",
  85.         [79]="Obj_Mure",
  86.         [80]="En_Sw",
  87.         [81]="Object_Kankyo",
  88.         [82]="_filler_En_Du_filler_",
  89.         [83]="_filler_En_Fd_filler_",
  90.         [84]="En_Horse_Link_Child",
  91.         [85]="Door_Ana",
  92.         [86]="_filler_Magic_Wind_filler_",
  93.         [87]="_filler_Magic_Fire_filler_",
  94.         [88]="_filler_En_Fd_Fire_filler_",
  95.         [89]="_filler_En_Dh_filler_",
  96.         [90]="_filler_En_Dha_filler_",
  97.         [91]="En_Encount1",
  98.         [92]="Demo_Tre_Lgt",
  99.         [93]="_filler_En_Fw_filler_",
  100.         [94]="_filler_En_Heishi2_filler_",
  101.         [95]="En_Encount2",
  102.         [96]="En_Fire_Rock",
  103.         [97]="Bg_Ctower_Rot",
  104.         [98]="Mir_Ray",
  105.         [99]="_filler_En_Tana_filler_",
  106.         [100]="En_Sb",
  107.         [101]="En_Bigslime",
  108.         [102]="En_Karebaba",
  109.         [103]="En_In",
  110.         [104]="_filler_En_Tr_filler_",
  111.         [105]="En_Ru",
  112.         [106]="En_Bom_Chu",
  113.         [107]="En_Horse_Game_Check",
  114.         [108]="En_Rr",
  115.         [109]="_filler_En_Ba_filler_",
  116.         [110]="_filler_En_Bx_filler_",
  117.         [111]="_filler_En_Anubice_filler_",
  118.         [112]="_filler_En_Anubice_Fire_filler_",
  119.         [113]="_filler_En_Ma_filler_",
  120.         [114]="_filler_En_Ny_filler_",
  121.         [115]="En_Fr",
  122.         [116]="_filler_Item_Shield_filler_",
  123.         [117]="_filler_En_Ice_Hono_filler_",
  124.         [118]="_filler_Item_Ocarina_filler_",
  125.         [119]="_filler_Magic_Dark_filler_",
  126.         [120]="_filler_En_Anubice_Tag_filler_",
  127.         [121]="_filler_Fishing_filler_",
  128.         [122]="Obj_Oshihiki",
  129.         [123]="Eff_Dust",
  130.         [124]="Bg_Umajump",
  131.         [125]="Arrow_Fire",
  132.         [126]="Arrow_Ice",
  133.         [127]="Arrow_Light",
  134.         [128]="Item_Etcetera",
  135.         [129]="Obj_Kibako",
  136.         [130]="Obj_Tsubo",
  137.         [131]="_filler_En_Wonder_Item_filler_",
  138.         [132]="En_Ik",
  139.         [133]="_filler_En_Skj_filler_",
  140.         [134]="_filler_En_Skjneedle_filler_",
  141.         [135]="_filler_En_G_Switch_filler_",
  142.         [136]="_filler_Demo_Ext_filler_",
  143.         [137]="Demo_Shd",
  144.         [138]="En_Dns",
  145.         [139]="Elf_Msg",
  146.         [140]="En_Honotrap",
  147.         [141]="En_Tubo_Trap",
  148.         [142]="Obj_Ice_Poly",
  149.         [143]="En_Fz",
  150.         [144]="En_Kusa",
  151.         [145]="Obj_Bean",
  152.         [146]="Obj_Bombiwa",
  153.         [147]="Obj_Switch",
  154.         [148]="_filler_Obj_Elevator_filler_",
  155.         [149]="Obj_Lift",
  156.         [150]="Obj_Hsblock",
  157.         [151]="En_Okarina_Tag",
  158.         [152]="_filler_En_Yabusame_Mark_filler_",
  159.         [153]="En_Goroiwa",
  160.         [154]="_filler_En_Ex_Ruppy_filler_",
  161.         [155]="_filler_En_Toryo_filler_",
  162.         [156]="En_Daiku",
  163.         [157]="En_Nwc",
  164.         [158]="Item_Inbox",
  165.         [159]="En_Ge1",
  166.         [160]="Obj_Blockstop",
  167.         [161]="En_Sda",
  168.         [162]="En_Clear_Tag",
  169.         [163]="_filler_En_Niw_Lady_filler_",
  170.         [164]="En_Gm",
  171.         [165]="En_Ms",
  172.         [166]="En_Hs",
  173.         [167]="Bg_Ingate",
  174.         [168]="En_Kanban",
  175.         [169]="_filler_En_Heishi3_filler_",
  176.         [170]="En_Attack_Niw",
  177.         [171]="_filler_En_Sa_filler_",
  178.         [172]="_filler_En_Wonder_Talk_filler_",
  179.         [173]="_filler_En_Ds_filler_",
  180.         [174]="En_Mk",
  181.         [175]="En_Owl",
  182.         [176]="En_Ishi",
  183.         [177]="Obj_Hana",
  184.         [178]="Obj_Lightswitch",
  185.         [179]="Obj_Mure2",
  186.         [180]="_filler_En_Dnc_filler_",
  187.         [181]="En_Fu",
  188.         [182]="_filler_En_Changer_filler_",
  189.         [183]="_filler_En_Siofuki_filler_",
  190.         [184]="En_Stream",
  191.         [185]="En_Mm",
  192.         [186]="_filler_En_Ko_filler_",
  193.         [187]="_filler_En_Kz_filler_",
  194.         [188]="En_Weather_Tag",
  195.         [189]="En_Ani",
  196.         [190]="_filler_En_Ex_Item_filler_",
  197.         [191]="En_Js",
  198.         [192]="_filler_En_Jsjutan_filler_",
  199.         [193]="_filler_En_Cs_filler_",
  200.         [194]="_filler_En_Md_filler_",
  201.         [195]="_filler_En_Hy_filler_",
  202.         [196]="En_Okarina_Effect",
  203.         [197]="En_Mag",
  204.         [198]="Elf_Msg2",
  205.         [199]="Bg_F40_Swlift",
  206.         [200]="_filler_Bg_Zg_filler_",
  207.         [201]="_filler_En_Heishi4_filler_",
  208.         [202]="En_Kakasi",
  209.         [203]="Obj_Makeoshihiki",
  210.         [204]="Oceff_Spot",
  211.         [205]="_filler_End_Title_filler_",
  212.         [206]="En_Torch",
  213.         [207]="_filler_Demo_Ec_filler_",
  214.         [208]="Shot_Sun",
  215.         [209]="_filler_En_Wonder_Talk2_filler_",
  216.         [210]="_filler_En_Ge2_filler_",
  217.         [211]="Obj_Roomtimer",
  218.         [212]="En_Ssh",
  219.         [213]="_filler_En_Sth_filler_",
  220.         [214]="Oceff_Wipe",
  221.         [215]="Oceff_Storm",
  222.         [216]="Obj_Demo",
  223.         [217]="En_Minislime",
  224.         [218]="En_Nutsball",
  225.         [219]="_filler_Bg_Spot00_Break_filler_",
  226.         [220]="_filler_En_Shopnuts_filler_",
  227.         [221]="_filler_En_It_filler_",
  228.         [222]="_filler_En_GeldB_filler_",
  229.         [223]="Oceff_Wipe2",
  230.         [224]="Oceff_Wipe3",
  231.         [225]="_filler_En_Niw_Girl_filler_",
  232.         [226]="En_Dg",
  233.         [227]="En_Si",
  234.         [228]="Obj_Comb",
  235.         [229]="Obj_Kibako2",
  236.         [230]="_filler_En_Guest_filler_",
  237.         [231]="En_Hs2",
  238.         [232]="Obj_Mure3",
  239.         [233]="En_Tg",
  240.         [234]="_filler_En_Mu_filler_",
  241.         [235]="_filler_En_Go2_filler_",
  242.         [236]="En_Wf",
  243.         [237]="En_Skb",
  244.         [238]="_filler_En_Gb_filler_",
  245.         [239]="En_Gs",
  246.         [240]="Obj_Sound",
  247.         [241]="En_Crow",
  248.         [242]="_filler_En_Ma3_filler_",
  249.         [243]="En_Cow",
  250.         [244]="_filler_En_Kakasi2_filler_",
  251.         [245]="_filler_En_Kakasi3_filler_",
  252.         [246]="Oceff_Wipe4",
  253.         [247]="_filler_En_Eg_filler_",
  254.         [248]="En_Zo",
  255.         [249]="Obj_Makekinsuta",
  256.         [250]="En_Ge3",
  257.         [251]="_filler_Obj_Timeblock_filler_",
  258.         [252]="Obj_Hamishi",
  259.         [253]="En_Zl4",
  260.         [254]="En_Mm2",
  261.         [255]="_filler_Obj_Warp2block_filler_",
  262.         [256]="Door_Spiral",
  263.         [257]="_filler_Obj_Fence_filler_",
  264.         [258]="Obj_Pzlblock",
  265.         [259]="Obj_Toge",
  266.         [260]="_filler_Obj_Hampost_filler_",
  267.         [261]="Obj_Armos",
  268.         [262]="Obj_Boyo",
  269.         [263]="_filler_Boss_Dodongo_filler_",
  270.         [264]="_filler_Boss_Goma_filler_",
  271.         [265]="En_Grasshopper",
  272.         [266]="_filler_Obj_Swfl_filler_",
  273.         [267]="Obj_Grass",
  274.         [268]="Obj_Grass_Carry",
  275.         [269]="Obj_Grass_Unit",
  276.         [270]="_filler_En_Gl1_filler_",
  277.         [271]="_filler_En_Gl2_filler_",
  278.         [272]="Bg_Fire_Wall",
  279.         [273]="En_Bu",
  280.         [274]="En_Encount3",
  281.         [275]="En_Jso",
  282.         [276]="Obj_Chikuwa",
  283.         [277]="En_Knight",
  284.         [278]="En_Warp_tag",
  285.         [279]="En_Aob_01",
  286.         [280]="En_Boj_01",
  287.         [281]="En_Boj_02",
  288.         [282]="En_Boj_03",
  289.         [283]="En_Encount4",
  290.         [284]="En_Bom_Bowl_Man",
  291.         [285]="En_Syateki_Man",
  292.         [286]="_filler_En_Takara_Man_filler_",
  293.         [287]="Bg_Icicle",
  294.         [288]="En_Syateki_Crow",
  295.         [289]="En_Boj_04",
  296.         [290]="En_Cne_01",
  297.         [291]="En_Bba_01",
  298.         [292]="En_Bji_01",
  299.         [293]="Bg_Spdweb",
  300.         [294]="_filler_En_Yh_filler_",
  301.         [295]="_filler_En_Mt_filler_",
  302.         [296]="En_Mt_tag",
  303.         [297]="Boss_01",
  304.         [298]="Boss_02",
  305.         [299]="Boss_03",
  306.         [300]="Boss_04",
  307.         [301]="Boss_05",
  308.         [302]="Boss_06",
  309.         [303]="Boss_07",
  310.         [304]="Bg_Dy_Yoseizo",
  311.         [305]="_filler_En_Stay_filler_",
  312.         [306]="En_Boj_05",
  313.         [307]="_filler_En_Of1_01_filler_",
  314.         [308]="_filler_En_Gskb_filler_",
  315.         [309]="En_Sob1",
  316.         [310]="_filler_En_Of1_02_filler_",
  317.         [311]="_filler_En_Of1_03_filler_",
  318.         [312]="En_Go",
  319.         [313]="_filler_En_Of1_05_filler_",
  320.         [314]="En_Raf",
  321.         [315]="Obj_Funen",
  322.         [316]="Obj_Raillift",
  323.         [317]="Bg_Numa_Hana",
  324.         [318]="Obj_Flowerpot",
  325.         [319]="Obj_Spinyroll",
  326.         [320]="Dm_Hina",
  327.         [321]="En_Syateki_Wf",
  328.         [322]="Obj_Skateblock",
  329.         [323]="Obj_Iceblock",
  330.         [324]="En_Bigpamet",
  331.         [325]="En_Syateki_Dekunuts",
  332.         [326]="Elf_Msg3",
  333.         [327]="En_Fg",
  334.         [328]="Dm_Ravine",
  335.         [329]="Dm_Sa",
  336.         [330]="En_Slime",
  337.         [331]="En_Pr",
  338.         [332]="Obj_Toudai",
  339.         [333]="Obj_Entotu",
  340.         [334]="Obj_Bell",
  341.         [335]="En_Syateki_Okuta",
  342.         [336]="_filler_En_Colociam_filler_",
  343.         [337]="Obj_Shutter",
  344.         [338]="Dm_Zl",
  345.         [339]="En_Elfgrp",
  346.         [340]="Dm_Tsg",
  347.         [341]="En_Baguo",
  348.         [342]="Obj_Vspinyroll",
  349.         [343]="Obj_Smork",
  350.         [344]="En_Test2",
  351.         [345]="En_Test3",
  352.         [346]="En_Test4",
  353.         [347]="En_Bat",
  354.         [348]="En_Sekihi",
  355.         [349]="En_Wiz",
  356.         [350]="En_Wiz_Brock",
  357.         [351]="En_Wiz_Fire",
  358.         [352]="Eff_Change",
  359.         [353]="Dm_Statue",
  360.         [354]="Obj_Fireshield",
  361.         [355]="Bg_Ladder",
  362.         [356]="En_Mkk",
  363.         [357]="Demo_Getitem",
  364.         [358]="_filler_Obj_Stain_filler_",
  365.         [359]="En_Dnb",
  366.         [360]="En_Dnh",
  367.         [361]="En_Dnk",
  368.         [362]="En_Dnq",
  369.         [363]="_filler_En_Dnc_Tag_filler_",
  370.         [364]="Bg_Keikoku_Saku",
  371.         [365]="Obj_Hugebombiwa",
  372.         [366]="En_Firefly2",
  373.         [367]="En_Rat",
  374.         [368]="En_Water_Effect",
  375.         [369]="En_Kusa2",
  376.         [370]="Bg_Spout_Fire",
  377.         [371]="_filler_En_TimeTime_filler_",
  378.         [372]="Bg_Dblue_Movebg",
  379.         [373]="En_Dy_Extra",
  380.         [374]="En_Bal",
  381.         [375]="En_Ginko_Man",
  382.         [376]="En_Warp_Uzu",
  383.         [377]="Obj_Driftice",
  384.         [378]="En_Look_Nuts",
  385.         [379]="En_Mushi2",
  386.         [380]="En_Fall",
  387.         [381]="En_Mm3",
  388.         [382]="Bg_Crace_Movebg",
  389.         [383]="En_Dno",
  390.         [384]="En_Pr2",
  391.         [385]="En_Prz",
  392.         [386]="En_Jso2",
  393.         [387]="Obj_Etcetera",
  394.         [388]="En_Egol",
  395.         [389]="Obj_Mine",
  396.         [390]="Obj_Purify",
  397.         [391]="En_Tru",
  398.         [392]="En_Trt",
  399.         [393]="_filler_En_Egrock_filler_",
  400.         [394]="_filler_En_Sd_filler_",
  401.         [395]="En_Test5",
  402.         [396]="En_Test6",
  403.         [397]="En_Az",
  404.         [398]="En_Estone",
  405.         [399]="Bg_Hakugin_Post",
  406.         [400]="Dm_Opstage",
  407.         [401]="Dm_Stk",
  408.         [402]="Dm_Char00",
  409.         [403]="Dm_Char01",
  410.         [404]="Dm_Char02",
  411.         [405]="Dm_Char03",
  412.         [406]="Dm_Char04",
  413.         [407]="Dm_Char05",
  414.         [408]="Dm_Char06",
  415.         [409]="Dm_Char07",
  416.         [410]="Dm_Char08",
  417.         [411]="Dm_Char09",
  418.         [412]="Obj_Tokeidai",
  419.         [413]="_filler_En_Goron_game_check_filler_",
  420.         [414]="En_Mnk",
  421.         [415]="En_Egblock",
  422.         [416]="En_Guard_Nuts",
  423.         [417]="Bg_Hakugin_Bombwall",
  424.         [418]="Obj_Tokei_Tobira",
  425.         [419]="Bg_Hakugin_Elvpole",
  426.         [420]="En_Ma4",
  427.         [421]="En_Twig",
  428.         [422]="En_Po_Fusen",
  429.         [423]="En_Door_Etc",
  430.         [424]="En_Bigokuta",
  431.         [425]="Bg_Icefloe",
  432.         [426]="Obj_Ocarinalift",
  433.         [427]="En_Time_Tag",
  434.         [428]="Bg_Open_Shutter",
  435.         [429]="Bg_Open_Spot",
  436.         [430]="Bg_Fu_Kaiten",
  437.         [431]="Obj_Aqua",
  438.         [432]="En_Elforg",
  439.         [433]="En_Elfbub",
  440.         [434]="_filler_En_Ton_filler_",
  441.         [435]="En_Fu_Mato",
  442.         [436]="En_Fu_Kago",
  443.         [437]="En_Osn",
  444.         [438]="Bg_Ctower_Gear",
  445.         [439]="En_Trt2",
  446.         [440]="Obj_Tokei_Step",
  447.         [441]="Bg_Lotus",
  448.         [442]="En_Kame",
  449.         [443]="Obj_Takaraya_Wall",
  450.         [444]="Bg_Fu_Mizu",
  451.         [445]="En_Sellnuts",
  452.         [446]="Bg_Dkjail_Ivy",
  453.         [447]="_filler_En_Ton2_filler_",
  454.         [448]="Obj_Visiblock",
  455.         [449]="En_Takaraya",
  456.         [450]="En_Tsn",
  457.         [451]="En_Ds2n",
  458.         [452]="En_Fsn",
  459.         [453]="En_Shn",
  460.         [454]="_filler_En_Ton_bal_filler_",
  461.         [455]="En_Stop_heishi",
  462.         [456]="Obj_Bigicicle",
  463.         [457]="En_Lift_Nuts",
  464.         [458]="En_Tk",
  465.         [459]="_filler_En_Ton3_filler_",
  466.         [460]="Bg_Market_Step",
  467.         [461]="Obj_Lupygamelift",
  468.         [462]="En_Test7",
  469.         [463]="Obj_Lightblock",
  470.         [464]="Mir_Ray2",
  471.         [465]="En_Wdhand",
  472.         [466]="En_Gamelupy",
  473.         [467]="Bg_Danpei_Movebg",
  474.         [468]="En_Snowwd",
  475.         [469]="En_Pm",
  476.         [470]="En_Gakufu",
  477.         [471]="Elf_Msg4",
  478.         [472]="Elf_Msg5",
  479.         [473]="En_Col_Man",
  480.         [474]="En_Talk_Gibud",
  481.         [475]="En_Giant",
  482.         [476]="Obj_Snowball",
  483.         [477]="Boss_Hakugin",
  484.         [478]="En_Gb2",
  485.         [479]="En_Onpuman",
  486.         [480]="Bg_Tobira01",
  487.         [481]="En_Tag_Obj",
  488.         [482]="Obj_Dhouse",
  489.         [483]="Obj_Hakaisi",
  490.         [484]="Bg_Hakugin_Switch",
  491.         [485]="_filler_En_Btlpoh_filler_",
  492.         [486]="En_Snowman",
  493.         [487]="TG_Sw",
  494.         [488]="En_Po_Sisters",
  495.         [489]="En_Pp",
  496.         [490]="En_Hakurock",
  497.         [491]="En_Hanabi",
  498.         [492]="Obj_Dowsing",
  499.         [493]="Obj_Wind",
  500.         [494]="En_Racedog",
  501.         [495]="En_Kendo_Js",
  502.         [496]="Bg_Botihasira",
  503.         [497]="En_Fish2",
  504.         [498]="En_Pst",
  505.         [499]="En_Poh",
  506.         [500]="Obj_Spidertent",
  507.         [501]="En_Zoraegg",
  508.         [502]="En_Kbt",
  509.         [503]="En_Gg",
  510.         [504]="En_Maruta",
  511.         [505]="Obj_Snowball2",
  512.         [506]="En_Gg2",
  513.         [507]="Obj_Ghaka",
  514.         [508]="En_Dnp",
  515.         [509]="En_Dai",
  516.         [510]="Bg_Goron_Oyu",
  517.         [511]="En_Kgy",
  518.         [512]="En_Invadepoh",
  519.         [513]="En_Gk",
  520.         [514]="En_An",
  521.         [515]="_filler_En_Sellnuts2_filler_",
  522.         [516]="En_Bee",
  523.         [517]="En_Ot",
  524.         [518]="En_Dragon",
  525.         [519]="Obj_Dora",
  526.         [520]="En_Bigpo",
  527.         [521]="Obj_Kendo_Kanban",
  528.         [522]="Obj_Hariko",
  529.         [523]="En_Sth",
  530.         [524]="Bg_Sinkai_Kabe",
  531.         [525]="Bg_Haka_Curtain",
  532.         [526]="Bg_Kin2_Bombwall",
  533.         [527]="Bg_Kin2_Fence",
  534.         [528]="Bg_Kin2_Picture",
  535.         [529]="Bg_Kin2_Shelf",
  536.         [530]="En_Rail_Skb",
  537.         [531]="En_Jg",
  538.         [532]="En_Tru_Mt",
  539.         [533]="Obj_Um",
  540.         [534]="En_Neo_Reeba",
  541.         [535]="Bg_Mbar_Chair",
  542.         [536]="Bg_Ikana_Block",
  543.         [537]="Bg_Ikana_Mirror",
  544.         [538]="Bg_Ikana_Rotaryroom",
  545.         [539]="Bg_Dblue_Balance",
  546.         [540]="Bg_Dblue_Waterfall",
  547.         [541]="En_Kaizoku",
  548.         [542]="En_Ge2",
  549.         [543]="En_Ma_Yts",
  550.         [544]="En_Ma_Yto",
  551.         [545]="Obj_Tokei_Turret",
  552.         [546]="Bg_Dblue_Elevator",
  553.         [547]="Obj_Warpstone",
  554.         [548]="En_Zog",
  555.         [549]="Obj_Rotlift",
  556.         [550]="Obj_Jg_Gakki",
  557.         [551]="Bg_Inibs_Movebg",
  558.         [552]="En_Zot",
  559.         [553]="Obj_Tree",
  560.         [554]="Obj_Y2lift",
  561.         [555]="Obj_Y2shutter",
  562.         [556]="Obj_Boat",
  563.         [557]="Obj_Taru",
  564.         [558]="Obj_Hunsui",
  565.         [559]="En_Jc_Mato",
  566.         [560]="Mir_Ray3",
  567.         [561]="En_Zob",
  568.         [562]="Elf_Msg6",
  569.         [563]="Obj_Nozoki",
  570.         [564]="En_Toto",
  571.         [565]="En_Railgibud",
  572.         [566]="En_Baba",
  573.         [567]="En_Suttari",
  574.         [568]="En_Zod",
  575.         [569]="En_Kujiya",
  576.         [570]="En_Geg",
  577.         [571]="Obj_Kinoko",
  578.         [572]="Obj_Yasi",
  579.         [573]="En_Tanron1",
  580.         [574]="En_Tanron2",
  581.         [575]="En_Tanron3",
  582.         [576]="Obj_Chan",
  583.         [577]="En_Zos",
  584.         [578]="En_S_Goro",
  585.         [579]="En_Nb",
  586.         [580]="En_Ja",
  587.         [581]="Bg_F40_Block",
  588.         [582]="Bg_F40_Switch",
  589.         [583]="En_Po_Composer",
  590.         [584]="En_Guruguru",
  591.         [585]="Oceff_Wipe5",
  592.         [586]="En_Stone_heishi",
  593.         [587]="Oceff_Wipe6",
  594.         [588]="En_Scopenuts",
  595.         [589]="En_Scopecrow",
  596.         [590]="Oceff_Wipe7",
  597.         [591]="Eff_Kamejima_Wave",
  598.         [592]="En_Hg",
  599.         [593]="En_Hgo",
  600.         [594]="En_Zov",
  601.         [595]="En_Ah",
  602.         [596]="Obj_Hgdoor",
  603.         [597]="Bg_Ikana_Bombwall",
  604.         [598]="Bg_Ikana_Ray",
  605.         [599]="Bg_Ikana_Shutter",
  606.         [600]="Bg_Haka_Bombwall",
  607.         [601]="Bg_Haka_Tomb",
  608.         [602]="En_Sc_Ruppe",
  609.         [603]="Bg_Iknv_Doukutu",
  610.         [604]="Bg_Iknv_Obj",
  611.         [605]="En_Pamera",
  612.         [606]="Obj_HsStump",
  613.         [607]="En_Hidden_Nuts",
  614.         [608]="En_Zow",
  615.         [609]="En_Talk",
  616.         [610]="En_Al",
  617.         [611]="En_Tab",
  618.         [612]="En_Nimotsu",
  619.         [613]="En_Hit_Tag",
  620.         [614]="En_Ruppecrow",
  621.         [615]="En_Tanron4",
  622.         [616]="En_Tanron5",
  623.         [617]="En_Tanron6",
  624.         [618]="En_Daiku2",
  625.         [619]="En_Muto",
  626.         [620]="En_Baisen",
  627.         [621]="En_Heishi",
  628.         [622]="En_Demo_heishi",
  629.         [623]="En_Dt",
  630.         [624]="En_Cha",
  631.         [625]="Obj_Dinner",
  632.         [626]="Eff_Lastday",
  633.         [627]="Bg_Ikana_Dharma",
  634.         [628]="En_Akindonuts",
  635.         [629]="Eff_Stk",
  636.         [630]="En_Ig",
  637.         [631]="En_Rg",
  638.         [632]="En_Osk",
  639.         [633]="En_Sth2",
  640.         [634]="En_Yb",
  641.         [635]="En_Rz",
  642.         [636]="En_Scopecoin",
  643.         [637]="En_Bjt",
  644.         [638]="En_Bomjima",
  645.         [639]="En_Bomjimb",
  646.         [640]="En_Bombers",
  647.         [641]="En_Bombers2",
  648.         [642]="En_Bombal",
  649.         [643]="Obj_Moon_Stone",
  650.         [644]="Obj_Mu_Pict",
  651.         [645]="Bg_Ikninside",
  652.         [646]="Eff_Zoraband",
  653.         [647]="Obj_Kepn_Koya",
  654.         [648]="Obj_Usiyane",
  655.         [649]="En_Nnh",
  656.         [650]="Obj_Kzsaku",
  657.         [651]="Obj_Milk_Bin",
  658.         [652]="En_Kitan",
  659.         [653]="Bg_Astr_Bombwall",
  660.         [654]="Bg_Iknin_Susceil",
  661.         [655]="En_Bsb",
  662.         [656]="En_Recepgirl",
  663.         [657]="En_Thiefbird",
  664.         [658]="En_Jgame_Tsn",
  665.         [659]="Obj_Jgame_Light",
  666.         [660]="Obj_Yado",
  667.         [661]="Demo_Syoten",
  668.         [662]="Demo_Moonend",
  669.         [663]="Bg_Lbfshot",
  670.         [664]="Bg_Last_Bwall",
  671.         [665]="En_And",
  672.         [666]="En_Invadepoh_Demo",
  673.         [667]="Obj_Danpeilift",
  674.         [668]="En_Fall2",
  675.         [669]="Dm_Al",
  676.         [670]="Dm_An",
  677.         [671]="Dm_Ah",
  678.         [672]="Dm_Nb",
  679.         [673]="En_Drs",
  680.         [674]="En_Ending_Hero",
  681.         [675]="Dm_Bal",
  682.         [676]="En_Paper",
  683.         [677]="En_Hint_Skb",
  684.         [678]="Dm_Tag",
  685.         [679]="En_Bh",
  686.         [680]="En_Ending_Hero2",
  687.         [681]="En_Ending_Hero3",
  688.         [682]="En_Ending_Hero4",
  689.         [683]="En_Ending_Hero5",
  690.         [684]="En_Ending_Hero6",
  691.         [685]="Dm_Gm",
  692.         [686]="Obj_Swprize",
  693.         [687]="En_Invisible_Ruppe",
  694.         [688]="Obj_Ending",
  695.         [689]="En_Rsn"
  696.     },
  697.     OoT={
  698.         [0]="Player",
  699.         [1]="_filler_En_Skeleton_filler_",
  700.         [2]="En_Test",
  701.         [3]="_filler_En_Iron_filler_",
  702.         [4]="En_GirlA",
  703.         [5]="_filler_En_Slim_filler_",
  704.         [6]="_filler_En_Bskel_filler_",
  705.         [7]="En_Part",
  706.         [8]="En_Light",
  707.         [9]="En_Door",
  708.         [10]="En_Box",
  709.         [11]="Bg_Dy_Yoseizo",
  710.         [12]="Bg_Hidan_Firewall",
  711.         [13]="En_Poh",
  712.         [14]="En_Okuta",
  713.         [15]="Bg_Ydan_Sp",
  714.         [16]="En_Bom",
  715.         [17]="En_Wallmas",
  716.         [18]="En_Dodongo",
  717.         [19]="En_Firefly",
  718.         [20]="En_Horse",
  719.         [21]="En_Item00",
  720.         [22]="En_Arrow",
  721.         [23]="_filler_Dummy_player_filler_",
  722.         [24]="En_Elf",
  723.         [25]="En_Niw",
  724.         [26]="_filler_En_Bee_filler_",
  725.         [27]="En_Tite",
  726.         [28]="En_Reeba",
  727.         [29]="En_Peehat",
  728.         [30]="En_Butte",
  729.         [31]="_filler_En_F_Obj_filler_",
  730.         [32]="En_Insect",
  731.         [33]="En_Fish",
  732.         [34]="_filler_En_D_Obj_filler_",
  733.         [35]="En_Holl",
  734.         [36]="En_Scene_Change",
  735.         [37]="En_Zf",
  736.         [38]="En_Hata",
  737.         [39]="Boss_Dodongo",
  738.         [40]="Boss_Goma",
  739.         [41]="En_Zl1",
  740.         [42]="En_Viewer",
  741.         [43]="En_Goma",
  742.         [44]="Bg_Pushbox",
  743.         [45]="En_Bubble",
  744.         [46]="Door_Shutter",
  745.         [47]="En_Dodojr",
  746.         [48]="En_Bdfire",
  747.         [49]="_filler_Magic_filler_",
  748.         [50]="En_Boom",
  749.         [51]="En_Torch2",
  750.         [52]="En_Bili",
  751.         [53]="En_Tp",
  752.         [54]="_filler_En_OA1_filler_",
  753.         [55]="En_St",
  754.         [56]="En_Bw",
  755.         [57]="En_A_Obj",
  756.         [58]="En_Eiyer",
  757.         [59]="En_River_Sound",
  758.         [60]="En_Horse_Normal",
  759.         [61]="En_Ossan",
  760.         [62]="Bg_Treemouth",
  761.         [63]="Bg_Dodoago",
  762.         [64]="Bg_Hidan_Dalm",
  763.         [65]="Bg_Hidan_Hrock",
  764.         [66]="En_Horse_Ganon",
  765.         [67]="Bg_Hidan_Rock",
  766.         [68]="Bg_Hidan_Rsekizou",
  767.         [69]="Bg_Hidan_Sekizou",
  768.         [70]="Bg_Hidan_Sima",
  769.         [71]="Bg_Hidan_Syoku",
  770.         [72]="En_Xc",
  771.         [73]="Bg_Hidan_Curtain",
  772.         [74]="Bg_Spot00_Hanebasi",
  773.         [75]="En_Mb",
  774.         [76]="En_Bombf",
  775.         [77]="En_Zl2",
  776.         [78]="Bg_Hidan_Fslift",
  777.         [79]="En_OE2",
  778.         [80]="Bg_Ydan_Hasi",
  779.         [81]="Bg_Ydan_Maruta",
  780.         [82]="Boss_Ganondrof",
  781.         [83]="_filler_En_Npc_filler_",
  782.         [84]="En_Am",
  783.         [85]="En_Dekubaba",
  784.         [86]="En_M_Fire1",
  785.         [87]="En_M_Thunder",
  786.         [88]="Bg_Ddan_Jd",
  787.         [89]="Bg_Breakwall",
  788.         [90]="En_Jj",
  789.         [91]="En_Horse_Zelda",
  790.         [92]="Bg_Ddan_Kd",
  791.         [93]="Door_Warp1",
  792.         [94]="Obj_Syokudai",
  793.         [95]="Item_B_Heart",
  794.         [96]="En_Dekunuts",
  795.         [97]="Bg_Menkuri_Kaiten",
  796.         [98]="Bg_Menkuri_Eye",
  797.         [99]="En_Vali",
  798.         [100]="Bg_Mizu_Movebg",
  799.         [101]="Bg_Mizu_Water",
  800.         [102]="Arms_Hook",
  801.         [103]="En_fHG",
  802.         [104]="Bg_Mori_Hineri",
  803.         [105]="En_Bb",
  804.         [106]="Bg_Toki_Hikari",
  805.         [107]="En_Yukabyun",
  806.         [108]="Bg_Toki_Swd",
  807.         [109]="En_Fhg_Fire",
  808.         [110]="Bg_Mjin",
  809.         [111]="Bg_Hidan_Kousi",
  810.         [112]="Door_Toki",
  811.         [113]="Bg_Hidan_Hamstep",
  812.         [114]="En_Bird",
  813.         [115]="_filler_En_Stree_filler_",
  814.         [116]="_filler_En_Kui_filler_",
  815.         [117]="_filler_En_Maruta_filler_",
  816.         [118]="_filler_En_Saku_filler_",
  817.         [119]="En_Wood02",
  818.         [120]="_filler_En_Twood01_filler_",
  819.         [121]="_filler_En_Kabu02_filler_",
  820.         [122]="_filler_En_Board_filler_",
  821.         [123]="_filler_En_Floater_filler_",
  822.         [124]="En_Lightbox",
  823.         [125]="En_Pu_box",
  824.         [126]="_filler_En_Spia_filler_",
  825.         [127]="_filler_En_Stoneb_filler_",
  826.         [128]="En_Trap",
  827.         [129]="En_Arow_Trap",
  828.         [130]="En_Vase",
  829.         [131]="_filler_Bg_Hidan_Pompfly_filler_",
  830.         [132]="En_Ta",
  831.         [133]="En_Tk",
  832.         [134]="Bg_Mori_Bigst",
  833.         [135]="Bg_Mori_Elevator",
  834.         [136]="Bg_Mori_Kaitenkabe",
  835.         [137]="Bg_Mori_Rakkatenjo",
  836.         [138]="En_Vm",
  837.         [139]="Demo_Effect",
  838.         [140]="Demo_Kankyo",
  839.         [141]="Bg_Hidan_Fwbig",
  840.         [142]="En_Floormas",
  841.         [143]="En_Heishi1",
  842.         [144]="En_Rd",
  843.         [145]="En_Po_Sisters",
  844.         [146]="Bg_Heavy_Block",
  845.         [147]="Bg_Po_Event",
  846.         [148]="Obj_Mure",
  847.         [149]="En_Sw",
  848.         [150]="Boss_Fd",
  849.         [151]="Object_Kankyo",
  850.         [152]="En_Du",
  851.         [153]="En_Fd",
  852.         [154]="En_Horse_Link_Child",
  853.         [155]="Door_Ana",
  854.         [156]="Bg_Spot02_Objects",
  855.         [157]="Bg_Haka",
  856.         [158]="Magic_Wind",
  857.         [159]="Magic_Fire",
  858.         [160]="_filler_Magic_Ice_filler_",
  859.         [161]="En_Ru1",
  860.         [162]="Boss_Fd2",
  861.         [163]="En_Fd_Fire",
  862.         [164]="En_Dh",
  863.         [165]="En_Dha",
  864.         [166]="En_Rl",
  865.         [167]="En_Encount1",
  866.         [168]="Demo_Du",
  867.         [169]="Demo_Im",
  868.         [170]="Demo_Tre_Lgt",
  869.         [171]="En_Fw",
  870.         [172]="Bg_Vb_Sima",
  871.         [173]="En_Vb_Ball",
  872.         [174]="Bg_Haka_Megane",
  873.         [175]="Bg_Haka_MeganeBG",
  874.         [176]="Bg_Haka_Ship",
  875.         [177]="Bg_Haka_Sgami",
  876.         [178]="_filler_Bg_Haka_Kumo_filler_",
  877.         [179]="En_Heishi2",
  878.         [180]="En_Encount2",
  879.         [181]="En_Fire_Rock",
  880.         [182]="En_Brob",
  881.         [183]="Mir_Ray",
  882.         [184]="Bg_Spot09_Obj",
  883.         [185]="Bg_Spot18_Obj",
  884.         [186]="Boss_Va",
  885.         [187]="Bg_Haka_Tubo",
  886.         [188]="Bg_Haka_Trap",
  887.         [189]="Bg_Haka_Huta",
  888.         [190]="Bg_Haka_Zou",
  889.         [191]="Bg_Spot17_Funen",
  890.         [192]="En_Syateki_Itm",
  891.         [193]="En_Syateki_Man",
  892.         [194]="En_Tana",
  893.         [195]="En_Nb",
  894.         [196]="Boss_Mo",
  895.         [197]="En_Sb",
  896.         [198]="En_Bigokuta",
  897.         [199]="En_Karebaba",
  898.         [200]="Bg_Bdan_Objects",
  899.         [201]="Demo_Sa",
  900.         [202]="Demo_Go",
  901.         [203]="En_In",
  902.         [204]="En_Tr",
  903.         [205]="Bg_Spot16_Bombstone",
  904.         [206]="_filler_En_Npc2_filler_",
  905.         [207]="Bg_Hidan_Kowarerukabe",
  906.         [208]="Bg_Bombwall",
  907.         [209]="Bg_Spot08_Iceblock",
  908.         [210]="En_Ru2",
  909.         [211]="Obj_Dekujr",
  910.         [212]="Bg_Mizu_Uzu",
  911.         [213]="Bg_Spot06_Objects",
  912.         [214]="Bg_Ice_Objects",
  913.         [215]="Bg_Haka_Water",
  914.         [216]="_filler_En_Npc3_filler_",
  915.         [217]="En_Ma2",
  916.         [218]="En_Bom_Chu",
  917.         [219]="En_Horse_Game_Check",
  918.         [220]="Boss_Tw",
  919.         [221]="En_Rr",
  920.         [222]="En_Ba",
  921.         [223]="En_Bx",
  922.         [224]="En_Anubice",
  923.         [225]="En_Anubice_Fire",
  924.         [226]="Bg_Mori_Hashigo",
  925.         [227]="Bg_Mori_Hashira4",
  926.         [228]="Bg_Mori_Idomizu",
  927.         [229]="Bg_Spot16_Doughnut",
  928.         [230]="Bg_Bdan_Switch",
  929.         [231]="En_Ma1",
  930.         [232]="Boss_Ganon",
  931.         [233]="Boss_Sst",
  932.         [234]="_filler_Boss_Goma2_filler_",
  933.         [235]="_filler_En_Stk_filler_",
  934.         [236]="En_Ny",
  935.         [237]="En_Fr",
  936.         [238]="Item_Shield",
  937.         [239]="Bg_Ice_Shelter",
  938.         [240]="En_Ice_Hono",
  939.         [241]="Item_Ocarina",
  940.         [242]="_filler_Magic_Light_filler_",
  941.         [243]="_filler_Magic_Soul_filler_",
  942.         [244]="Magic_Dark",
  943.         [245]="Demo_6K",
  944.         [246]="En_Anubice_Tag",
  945.         [247]="Bg_Haka_Gate",
  946.         [248]="Bg_Spot15_Saku",
  947.         [249]="Bg_Jya_Goroiwa",
  948.         [250]="Bg_Jya_Zurerukabe",
  949.         [251]="_filler_Bg_Jya_Sutarukage_filler_",
  950.         [252]="Bg_Jya_Cobra",
  951.         [253]="Bg_Jya_Kanaami",
  952.         [254]="Fishing",
  953.         [255]="Obj_Oshihiki",
  954.         [256]="Bg_Gate_Shutter",
  955.         [257]="Eff_Dust",
  956.         [258]="Bg_Spot01_Fusya",
  957.         [259]="Bg_Spot01_Idohashira",
  958.         [260]="Bg_Spot01_Idomizu",
  959.         [261]="Bg_Po_Syokudai",
  960.         [262]="Bg_Ganon_Otyuka",
  961.         [263]="Bg_Spot15_Rrbox",
  962.         [264]="Bg_Umajump",
  963.         [265]="_filler_Arrow_Dark_filler_",
  964.         [266]="Arrow_Fire",
  965.         [267]="Arrow_Ice",
  966.         [268]="Arrow_Light",
  967.         [269]="_filler_Arrow_Soul_filler_",
  968.         [270]="_filler_Arrow_Wind_filler_",
  969.         [271]="Item_Etcetera",
  970.         [272]="Obj_Kibako",
  971.         [273]="Obj_Tsubo",
  972.         [274]="En_Wonder_Item",
  973.         [275]="En_Ik",
  974.         [276]="Demo_Ik",
  975.         [277]="En_Skj",
  976.         [278]="En_Skjneedle",
  977.         [279]="En_G_Switch",
  978.         [280]="Demo_Ext",
  979.         [281]="Demo_Shd",
  980.         [282]="En_Dns",
  981.         [283]="Elf_Msg",
  982.         [284]="En_Honotrap",
  983.         [285]="En_Tubo_Trap",
  984.         [286]="Obj_Ice_Poly",
  985.         [287]="Bg_Spot03_Taki",
  986.         [288]="Bg_Spot07_Taki",
  987.         [289]="En_Fz",
  988.         [290]="En_Po_Relay",
  989.         [291]="Bg_Relay_Objects",
  990.         [292]="En_Diving_Game",
  991.         [293]="En_Kusa",
  992.         [294]="Obj_Bean",
  993.         [295]="Obj_Bombiwa",
  994.         [296]="_filler_Obj_Breakbox_filler_",
  995.         [297]="_filler_Obj_Hahen_filler_",
  996.         [298]="Obj_Switch",
  997.         [299]="Obj_Elevator",
  998.         [300]="Obj_Lift",
  999.         [301]="Obj_Hsblock",
  1000.         [302]="En_Okarina_Tag",
  1001.         [303]="En_Yabusame_Mark",
  1002.         [304]="En_Goroiwa",
  1003.         [305]="En_Ex_Ruppy",
  1004.         [306]="En_Toryo",
  1005.         [307]="En_Daiku",
  1006.         [308]="_filler_En_Stopge_filler_",
  1007.         [309]="En_Nwc",
  1008.         [310]="En_Blkobj",
  1009.         [311]="Item_Inbox",
  1010.         [312]="En_Ge1",
  1011.         [313]="Obj_Blockstop",
  1012.         [314]="En_Sda",
  1013.         [315]="En_Clear_Tag",
  1014.         [316]="En_Niw_Lady",
  1015.         [317]="En_Gm",
  1016.         [318]="En_Ms",
  1017.         [319]="En_Hs",
  1018.         [320]="Bg_Ingate",
  1019.         [321]="En_Kanban",
  1020.         [322]="En_Heishi3",
  1021.         [323]="En_Syateki_Niw",
  1022.         [324]="En_Attack_Niw",
  1023.         [325]="Bg_Spot01_Idosoko",
  1024.         [326]="En_Sa",
  1025.         [327]="En_Wonder_Talk",
  1026.         [328]="Bg_Gjyo_Bridge",
  1027.         [329]="En_Ds",
  1028.         [330]="En_Mk",
  1029.         [331]="En_Bom_Bowl_Man",
  1030.         [332]="En_Bom_Bowl_Pit",
  1031.         [333]="En_Owl",
  1032.         [334]="En_Ishi",
  1033.         [335]="Obj_Hana",
  1034.         [336]="Obj_Lightswitch",
  1035.         [337]="Obj_Mure2",
  1036.         [338]="En_Go",
  1037.         [339]="En_Fu",
  1038.         [340]="_filler_En_Nc_filler_",
  1039.         [341]="En_Changer",
  1040.         [342]="Bg_Jya_Megami",
  1041.         [343]="Bg_Jya_Lift",
  1042.         [344]="Bg_Jya_Bigmirror",
  1043.         [345]="Bg_Jya_Bombchuiwa",
  1044.         [346]="Bg_Jya_Amishutter",
  1045.         [347]="Bg_Jya_Bombiwa",
  1046.         [348]="Bg_Spot18_Basket",
  1047.         [349]="_filler_En_Warp_Box_filler_",
  1048.         [350]="En_Ganon_Organ",
  1049.         [351]="En_Siofuki",
  1050.         [352]="En_Stream",
  1051.         [353]="_filler_En_Zl22_filler_",
  1052.         [354]="En_Mm",
  1053.         [355]="En_Ko",
  1054.         [356]="En_Kz",
  1055.         [357]="En_Weather_Tag",
  1056.         [358]="Bg_Sst_Floor",
  1057.         [359]="En_Ani",
  1058.         [360]="En_Ex_Item",
  1059.         [361]="Bg_Jya_Ironobj",
  1060.         [362]="En_Js",
  1061.         [363]="En_Jsjutan",
  1062.         [364]="En_Cs",
  1063.         [365]="En_Md",
  1064.         [366]="En_Hy",
  1065.         [367]="En_Ganon_Mant",
  1066.         [368]="En_Okarina_Effect",
  1067.         [369]="En_Mag",
  1068.         [370]="Door_Gerudo",
  1069.         [371]="Elf_Msg2",
  1070.         [372]="Demo_Gt",
  1071.         [373]="En_Po_Field",
  1072.         [374]="Efc_Erupc",
  1073.         [375]="Bg_Zg",
  1074.         [376]="En_Heishi4",
  1075.         [377]="En_Zl3",
  1076.         [378]="Boss_Ganon2",
  1077.         [379]="En_Kakasi",
  1078.         [380]="En_Takara_Man",
  1079.         [381]="Obj_Makeoshihiki",
  1080.         [382]="Oceff_Spot",
  1081.         [383]="End_Title",
  1082.         [384]="_filler_En_Mother_filler_",
  1083.         [385]="En_Torch",
  1084.         [386]="Demo_Ec",
  1085.         [387]="Shot_Sun",
  1086.         [388]="En_Dy_Extra",
  1087.         [389]="En_Wonder_Talk2",
  1088.         [390]="En_Ge2",
  1089.         [391]="Obj_Roomtimer",
  1090.         [392]="En_Ssh",
  1091.         [393]="En_Sth",
  1092.         [394]="Oceff_Wipe",
  1093.         [395]="Oceff_Storm",
  1094.         [396]="En_Weiyer",
  1095.         [397]="Bg_Spot05_Soko",
  1096.         [398]="Bg_Jya_1flift",
  1097.         [399]="Bg_Jya_Haheniron",
  1098.         [400]="Bg_Spot12_Gate",
  1099.         [401]="Bg_Spot12_Saku",
  1100.         [402]="En_Hintnuts",
  1101.         [403]="En_Nutsball",
  1102.         [404]="Bg_Spot00_Break",
  1103.         [405]="En_Shopnuts",
  1104.         [406]="En_It",
  1105.         [407]="En_GeldB",
  1106.         [408]="Oceff_Wipe2",
  1107.         [409]="Oceff_Wipe3",
  1108.         [410]="En_Niw_Girl",
  1109.         [411]="En_Dog",
  1110.         [412]="En_Si",
  1111.         [413]="Bg_Spot01_Objects2",
  1112.         [414]="Obj_Comb",
  1113.         [415]="Bg_Spot11_Bakudankabe",
  1114.         [416]="Obj_Kibako2",
  1115.         [417]="En_Dnt_Demo",
  1116.         [418]="En_Dnt_Jiji",
  1117.         [419]="En_Dnt_Nomal",
  1118.         [420]="En_Guest",
  1119.         [421]="Bg_Bom_Guard",
  1120.         [422]="En_Hs2",
  1121.         [423]="Demo_Kekkai",
  1122.         [424]="Bg_Spot08_Bakudankabe",
  1123.         [425]="Bg_Spot17_Bakudankabe",
  1124.         [426]="_filler_Bg_Mizu_Switch_filler_",
  1125.         [427]="Obj_Mure3",
  1126.         [428]="En_Tg",
  1127.         [429]="En_Mu",
  1128.         [430]="En_Go2",
  1129.         [431]="En_Wf",
  1130.         [432]="En_Skb",
  1131.         [433]="Demo_Gj",
  1132.         [434]="Demo_Geff",
  1133.         [435]="Bg_Gnd_Firemeiro",
  1134.         [436]="Bg_Gnd_Darkmeiro",
  1135.         [437]="Bg_Gnd_Soulmeiro",
  1136.         [438]="Bg_Gnd_Nisekabe",
  1137.         [439]="Bg_Gnd_Iceblock",
  1138.         [440]="En_Gb",
  1139.         [441]="En_Gs",
  1140.         [442]="Bg_Mizu_Bwall",
  1141.         [443]="Bg_Mizu_Shutter",
  1142.         [444]="En_Daiku_Kakariko",
  1143.         [445]="Bg_Bowl_Wall",
  1144.         [446]="En_Wall_Tubo",
  1145.         [447]="En_Po_Desert",
  1146.         [448]="En_Crow",
  1147.         [449]="Door_Killer",
  1148.         [450]="Bg_Spot11_Oasis",
  1149.         [451]="Bg_Spot18_Futa",
  1150.         [452]="Bg_Spot18_Shutter",
  1151.         [453]="En_Ma3",
  1152.         [454]="En_Cow",
  1153.         [455]="Bg_Ice_Turara",
  1154.         [456]="Bg_Ice_Shutter",
  1155.         [457]="En_Kakasi2",
  1156.         [458]="En_Kakasi3",
  1157.         [459]="Oceff_Wipe4",
  1158.         [460]="En_Eg",
  1159.         [461]="Bg_Menkuri_Nisekabe",
  1160.         [462]="En_Zo",
  1161.         [463]="Obj_Makekinsuta",
  1162.         [464]="En_Ge3",
  1163.         [465]="Obj_Timeblock",
  1164.         [466]="Obj_Hamishi",
  1165.         [467]="En_Zl4",
  1166.         [468]="En_Mm2",
  1167.         [469]="Bg_Jya_Block",
  1168.         [470]="Obj_Warp2block"
  1169.     },
  1170.     AF={
  1171.         [0]="Player",
  1172.         [1]="BgItem",
  1173.         [2]="Sample",
  1174.         [3]="Fieldm_Draw",
  1175.         [4]="Field_Draw",
  1176.         [5]="Airplane",
  1177.         [6]="Room_Sunshine",
  1178.         [7]="Lamp_Light",
  1179.         [8]="Ev_Angler",
  1180.         [9]="Ball",
  1181.         [10]="Haniwa",
  1182.         [11]="My_Room",
  1183.         [12]="Mbg",
  1184.         [13]="T_Tama",
  1185.         [14]="BoxManager",
  1186.         [15]="BoxMove",
  1187.         [16]="BoxTrick01",
  1188.         [17]="Arrange_Room",
  1189.         [18]="Arrange_Furniture",
  1190.         [19]="TrainDoor",
  1191.         [20]="T_Keitai",
  1192.         [21]="Halloween_Npc",
  1193.         [22]="Ev_Pumpkin",
  1194.         [23]="Ride_Off_Demo",
  1195.         [24]="Npc_Mamedanuki",
  1196.         [25]="Hanabi_Npc0",
  1197.         [26]="Hanabi_Npc1",
  1198.         [27]="Snowman",
  1199.         [28]="Npc_Post_Girl",
  1200.         [29]="Npc_Engineer",
  1201.         [30]="Npc_Majin3",
  1202.         [31]="Npc_Sleep_Obaba",
  1203.         [32]="Npc",
  1204.         [33]="Effect_Control",
  1205.         [34]="Npc2",
  1206.         [35]="Kamakura_Npc0",
  1207.         [36]="Npc_Post_Man",
  1208.         [37]="Shop_Design",
  1209.         [38]="Quest_Manager",
  1210.         [39]="MailBox",
  1211.         [40]="House",
  1212.         [41]="Shop_Level",
  1213.         [42]="Shop",
  1214.         [43]="MyHouse",
  1215.         [44]="Ev_Artist",
  1216.         [45]="Ev_Broker",
  1217.         [46]="Ev_Designer",
  1218.         [47]="T_Umbrella",
  1219.         [48]="Npc_Shop_Master",
  1220.         [49]="Birth_Control",
  1221.         [50]="Shop_Manekin",
  1222.         [51]="Shop_Indoor",
  1223.         [52]="Event_Manager",
  1224.         [53]="Shop_Goods",
  1225.         [54]="BrShop",
  1226.         [55]="Weather",
  1227.         [56]="Post_Office",
  1228.         [57]="Npc_Guide",
  1229.         [58]="Npc_Guide2",
  1230.         [59]="Insect",
  1231.         [60]="Station",
  1232.         [61]="Ev_CarpetPeddler",
  1233.         [62]="Ev_KabuPeddler",
  1234.         [63]="Reserve",
  1235.         [64]="HandOverItem",
  1236.         [65]="Npc_Conv_Master",
  1237.         [66]="Npc_Super_Master",
  1238.         [67]="Npc_Depart_Master",
  1239.         [68]="Tools",
  1240.         [69]="Structure",
  1241.         [70]="Ev_Gypsy",
  1242.         [71]="Npc_Police",
  1243.         [72]="Train0",
  1244.         [73]="Train1",
  1245.         [74]="Npc_Station_Master",
  1246.         [75]="Ev_Santa",
  1247.         [76]="Npc_Police2",
  1248.         [77]="Police_Box",
  1249.         [78]="BgPoliceItem",
  1250.         [79]="BgCherryItem",
  1251.         [80]="BgWinterItem",
  1252.         [81]="BgXmasItem",
  1253.         [82]="BgPostItem",
  1254.         [83]="FallS",
  1255.         [84]="FallSESW",
  1256.         [85]="Ev_Broker2",
  1257.         [86]="Broker_Design",
  1258.         [87]="T_Utiwa",
  1259.         [88]="Psnowman",
  1260.         [89]="My_Indoor",
  1261.         [90]="Npc_Rcn_Guide",
  1262.         [91]="Intro_Demo",
  1263.         [92]="Shrine",
  1264.         [93]="Buggy",
  1265.         [94]="T_Hanabi",
  1266.         [95]="Conveni",
  1267.         [96]="Super",
  1268.         [97]="Depart",
  1269.         [98]="Hanami_Npc0",
  1270.         [99]="S_Car",
  1271.         [100]="Hanami_Npc1",
  1272.         [101]="Npc_P_Sel",
  1273.         [102]="Npc_P_Sel2",
  1274.         [103]="Npc_Rcn_Guide2",
  1275.         [104]="Train_Window",
  1276.         [105]="Npc_Majin4",
  1277.         [106]="Kamakura",
  1278.         [107]="Gyoei",
  1279.         [108]="Npc_Majin",
  1280.         [109]="T_NpcSao",
  1281.         [110]="_filler_Train_Control_filler_",
  1282.         [111]="Uki",
  1283.         [112]="Npc_Majin2",
  1284.         [113]="Normal_Npc",
  1285.         [114]="Set_Manager",
  1286.         [115]="Set_Npc_Manager",
  1287.         [116]="Npc_Shop_Mastersp",
  1288.         [117]="Room_Sunshine_Posthouse",
  1289.         [118]="Room_Sunshine_Police",
  1290.         [119]="Effectbg",
  1291.         [120]="Ev_Cherry_Manager",
  1292.         [121]="Ev_Yomise",
  1293.         [122]="Tokyoso_Npc0",
  1294.         [123]="Tokyoso_Npc1",
  1295.         [124]="Goza",
  1296.         [125]="Radio",
  1297.         [126]="Yatai",
  1298.         [127]="Tokyoso_Control",
  1299.         [128]="Shop_Umbrella",
  1300.         [129]="Gyo_Release",
  1301.         [130]="Tukimi",
  1302.         [131]="Kamakura_Indoor",
  1303.         [132]="Ev_Miko",
  1304.         [133]="Gyo_Kage",
  1305.         [134]="Mikuji",
  1306.         [135]="House_Goki",
  1307.         [136]="T_Cracker",
  1308.         [137]="_filler_T_Sensu_filler_",
  1309.         [138]="T_Pistol",
  1310.         [139]="T_Flag",
  1311.         [140]="T_Tumbler",
  1312.         [141]="Tukimi_Npc0",
  1313.         [142]="Tukimi_Npc1",
  1314.         [143]="_filler_Tukimi_Npc2_filler_",
  1315.         [144]="Countdown_Npc0",
  1316.         [145]="Countdown_Npc1",
  1317.         [146]="Turi_Npc0",
  1318.         [147]="Taisou_Npc0",
  1319.         [148]="Count",
  1320.         [149]="Garagara",
  1321.         [150]="Tamaire_Npc0",
  1322.         [151]="Tamaire_Npc1",
  1323.         [152]="Hatumode_Npc0",
  1324.         [153]="Npc_Totakeke",
  1325.         [154]="Count02",
  1326.         [155]="Hatumode_Control",
  1327.         [156]="Tama",
  1328.         [157]="Kago",
  1329.         [158]="Turi",
  1330.         [159]="House_Clock",
  1331.         [160]="Tunahiki_Control",
  1332.         [161]="Tunahiki_Npc0",
  1333.         [162]="Tunahiki_Npc1",
  1334.         [163]="Koinobori",
  1335.         [164]="Bee",
  1336.         [165]="Nameplate",
  1337.         [166]="Dump",
  1338.         [167]="Rope",
  1339.         [168]="Ev_Dozaemon",
  1340.         [169]="Windmill",
  1341.         [170]="Lotus",
  1342.         [171]="Animal_Logo",
  1343.         [172]="Mikanbox",
  1344.         [173]="Douzou",
  1345.         [174]="Npc_Rtc",
  1346.         [175]="Toudai",
  1347.         [176]="Npc_Restart",
  1348.         [177]="Npc_Majin5",
  1349.         [178]="Fuusen",
  1350.         [179]="Ev_Dokutu",
  1351.         [180]="Dummy",
  1352.         [181]="_filler_Dummy2C_filler_",
  1353.         [182]="_filler_Dummy2D_filler_",
  1354.         [183]="_filler_Dummy2E_filler_",
  1355.         [184]="_filler_Dummy2F_filler_",
  1356.         [185]="_filler_Dummy30_filler_",
  1357.         [186]="_filler_Dummy31_filler_",
  1358.         [187]="_filler_Dummy32_filler_",
  1359.         [188]="_filler_Dummy33_filler_",
  1360.         [189]="_filler_Dummy34_filler_",
  1361.         [190]="_filler_Dummy35_filler_",
  1362.         [191]="_filler_Dummy36_filler_",
  1363.         [192]="_filler_Dummy37_filler_",
  1364.         [193]="_filler_Dummy38_filler_",
  1365.         [194]="_filler_Dummy39_filler_",
  1366.         [195]="_filler_Dummy3A_filler_",
  1367.         [196]="_filler_Dummy3B_filler_",
  1368.         [197]="_filler_Dummy3C_filler_",
  1369.         [198]="_filler_Dummy3D_filler_",
  1370.         [199]="_filler_Dummy3E_filler_",
  1371.         [200]="_filler_Dummy3F_filler_"
  1372.     },
  1373.     OoT_Names={
  1374.         [0x0000]="Player",
  1375.         [0x0002]="Stalfos",
  1376.         [0x0004]="Shop Inventory Data",
  1377.         [0x0007]="?: En_Part",
  1378.         [0x0008]="Flame",
  1379.         [0x0009]="Wooden Door",
  1380.         [0x000A]="Treasure Chest",
  1381.         [0x000B]="Great Fairy",
  1382.         [0x000C]="Proximity-Activated Firewall",
  1383.         [0x000D]="Graveyard Poe & Composer Brothers",
  1384.         [0x000E]="Octorok",
  1385.         [0x000F]="Spiderweb",
  1386.         [0x0010]="Bomb Field Model",
  1387.         [0x0011]="Wallmaster",
  1388.         [0x0012]="Dodongo",
  1389.         [0x0013]="Keese",
  1390.         [0x0014]="Adult Epona",
  1391.         [0x0015]="Collectible Items (Visible)",
  1392.         [0x0016]="?: En_Arrow",
  1393.         [0x0018]="Navi & Healing Fairy",
  1394.         [0x0019]="Cucco (Friendly)",
  1395.         [0x001B]="Tektite",
  1396.         [0x001C]="Leever",
  1397.         [0x001D]="Peahat",
  1398.         [0x001E]="Butterfly",
  1399.         [0x0020]="Bug",
  1400.         [0x0021]="Fish",
  1401.         [0x0023]="Room Transition Plane",
  1402.         [0x0024]="?: En_Scene_Change",
  1403.         [0x0025]="Lizalfos & Dinalfos",
  1404.         [0x0026]="Flagpole",
  1405.         [0x0027]="King Dodongo",
  1406.         [0x0028]="Gohma",
  1407.         [0x0029]="Child Zelda (Cutscene 05 & 06)",
  1408.         [0x002A]="?: En_Viewer",
  1409.         [0x002B]="Gohma Larva",
  1410.         [0x002D]="Shabom",
  1411.         [0x002E]="Door Shutter",
  1412.         [0x002F]="Baby Dodongo",
  1413.         [0x0030]="King Dodongo's Fire",
  1414.         [0x0032]="Boomerang Field Model",
  1415.         [0x0033]="Dark Link",
  1416.         [0x0034]="Biri",
  1417.         [0x0035]="Tailpasaran",
  1418.         [0x0037]="Skulltula",
  1419.         [0x0038]="Torch Slug",
  1420.         [0x0039]="Sign (Directional)",
  1421.         [0x003A]="Land Stinger",
  1422.         [0x003B]="Sound Effects I",
  1423.         [0x003C]="Generic Horse",
  1424.         [0x003D]="?: En_Ossan",
  1425.         [0x003E]="Deku Tree's Jaw",
  1426.         [0x003F]="Dead Dodongo's Jaw",
  1427.         [0x0040]="Fire Temple Breakable Hammer Block",
  1428.         [0x0041]="Fire Temple Hammer-Activated Elevator Pillar",
  1429.         [0x0042]="Ganondorf's Horse",
  1430.         [0x0043]="Fire Temple Fire-Powered Elevator Block",
  1431.         [0x0044]="Fire Temple Rotating Fire Spinner",
  1432.         [0x0045]="Fire Temple Flame-Spouting Statue",
  1433.         [0x0046]="Fire Temple Clover Platform",
  1434.         [0x0047]="Fire Temple Fire-Powered Mini-Boss Room Face Elevator",
  1435.         [0x0048]="Sheik",
  1436.         [0x0049]="Circle of Flames",
  1437.         [0x004A]="Drawbridge",
  1438.         [0x004B]="Moblin",
  1439.         [0x004C]="Bomb Flower",
  1440.         [0x004D]="Adult Zelda (Cutscenes)",
  1441.         [0x004E]="Hookshot Elevator",
  1442.         [0x004F]="Kokiri Girl [Early]",
  1443.         [0x0050]="?: Bg_Ydan_Hasi",
  1444.         [0x0051]="Deku Tree Spiked Log & Dropdown Ladder",
  1445.         [0x0052]="Phantom Ganon",
  1446.         [0x0054]="Armos",
  1447.         [0x0055]="Deku Baba",
  1448.         [0x0056]="Deku Nut Effect",
  1449.         [0x0057]="Spin Attack Effects",
  1450.         [0x0058]="Dodongo's Cavern Elevator Platform",
  1451.         [0x0059]="Bombable Wall",
  1452.         [0x005A]="Jabu-Jabu",
  1453.         [0x005B]="Zelda's Horse",
  1454.         [0x005C]="Dodongo's Cavern Bombable Stairs",
  1455.         [0x005D]="Blue Warp & Rupee-Shaped Prism",
  1456.         [0x005E]="Torch Stand (Generic)",
  1457.         [0x005F]="Heart Container",
  1458.         [0x0060]="Mad Scrub",
  1459.         [0x0061]="Rotating Ring",
  1460.         [0x0062]="Statue Eye Targets",
  1461.         [0x0063]="Bari",
  1462.         [0x0064]="?: Bg_Mizu_Movebg",
  1463.         [0x0065]="Water Temple Water",
  1464.         [0x0066]="Hookshot Field Model",
  1465.         [0x0067]="Phantom Ganon's Horse",
  1466.         [0x0068]="Forest Temple Twisting Corridor",
  1467.         [0x0069]="Bubble",
  1468.         [0x006A]="Temple of Time Window Light Rays",
  1469.         [0x006B]="Flying Floor Tile",
  1470.         [0x006C]="Master Sword",
  1471.         [0x006D]="Phantom Ganon's Lightning",
  1472.         [0x006E]="Warp Pad & Ocarina Pedestal",
  1473.         [0x006F]="Metal Bars",
  1474.         [0x0070]="Door of Time Collision Model",
  1475.         [0x0071]="Hammer-Activated Steps",
  1476.         [0x0072]="Brown Bird",
  1477.         [0x0077]="Trees & Bushes",
  1478.         [0x007C]="Grey Rectangular Block",
  1479.         [0x007D]="Grey Rectangular Stone Block",
  1480.         [0x0080]="Blade Trap",
  1481.         [0x0081]="Arrow-Deflecting Trap",
  1482.         [0x0082]="Orange Pot",
  1483.         [0x0084]="Talon",
  1484.         [0x0085]="Dampé",
  1485.         [0x0086]="Forest Temple Bow Room Platform",
  1486.         [0x0087]="Forest Temple Sun Elevator",
  1487.         [0x0088]="Forest Temple Rotating Pre-Boss Room",
  1488.         [0x0089]="Forest Temple Collapsing Checkerboard Ceiling",
  1489.         [0x008A]="Beamos",
  1490.         [0x008B]="?: Demo_Effect",
  1491.         [0x008C]="?: Demo_Kankyo",
  1492.         [0x008D]="Fire Temple Big Fire Wall",
  1493.         [0x008E]="Floormaster",
  1494.         [0x008F]="Soldier (Castle Hedge Maze)",
  1495.         [0x0090]="Redead & Gibdo",
  1496.         [0x0091]="?: En_Po_Sisters",
  1497.         [0x0092]="Golden Gauntlets Rock",
  1498.         [0x0093]="?: Bg_Po_Event",
  1499.         [0x0094]="Group of Bugs / Fish / Butterflies",
  1500.         [0x0095]="Skullwalltula",
  1501.         [0x0096]="Volvagia (Flying)",
  1502.         [0x0097]="?: Object_Kankyo",
  1503.         [0x0098]="Darunia",
  1504.         [0x0099]="Flare Dancer",
  1505.         [0x009A]="Child Epona",
  1506.         [0x009B]="Grotto Hole",
  1507.         [0x009C]="Graveyard Objects",
  1508.         [0x009D]="Gravestone",
  1509.         [0x009E]="Farore's Wind Effect",
  1510.         [0x009F]="Din's Fire Effect",
  1511.         [0x00A1]="Child Ruto",
  1512.         [0x00A2]="Volvagia (Whack-a-Mole)",
  1513.         [0x00A3]="Flare Dancer's Fireball",
  1514.         [0x00A4]="Dead Hand",
  1515.         [0x00A5]="Dead Hand's Hands",
  1516.         [0x00A6]="Rauru",
  1517.         [0x00A7]="Enemy Spawner",
  1518.         [0x00A8]="Darunia",
  1519.         [0x00A9]="Impa",
  1520.         [0x00AA]="Treasure Chest Glow",
  1521.         [0x00AB]="Flare Dancer Core",
  1522.         [0x00AC]="Volvagia's Sinking Platform",
  1523.         [0x00AD]="Volvagia's Rock Attack",
  1524.         [0x00AE]="?: Bg_Haka_Megane",
  1525.         [0x00AF]="Invisible Wall",
  1526.         [0x00B0]="Charon's Boat",
  1527.         [0x00B1]="Spinning Scythes",
  1528.         [0x00B3]="Soldier (Castle Gate / Courtyard / Kakariko)",
  1529.         [0x00B4]="Falling Boulder Spawner",
  1530.         [0x00B5]="Flaming Debris",
  1531.         [0x00B6]="Stunnable Jelly Platform",
  1532.         [0x00B7]="Reflectable Ray of Light",
  1533.         [0x00B8]="Gerudo Valley Objects",
  1534.         [0x00B9]="Goron City Objects",
  1535.         [0x00BA]="Barinade",
  1536.         [0x00BB]="Shadow Temple Flaming Skull Vase",
  1537.         [0x00BC]="Shadow Temple Guillotine",
  1538.         [0x00BD]="Shadow Temple Coffin Lid",
  1539.         [0x00BE]="?: Bg_Haka_Zou",
  1540.         [0x00BF]="Death Mountain Crater Smoke Plume",
  1541.         [0x00C0]="Shooting Gallery Items",
  1542.         [0x00C1]="Shooting Gallery Proprietor",
  1543.         [0x00C2]="Shop Shelves",
  1544.         [0x00C3]="Nabooru",
  1545.         [0x00C4]="Morpha",
  1546.         [0x00C5]="Shellblade",
  1547.         [0x00C6]="Big Octorok",
  1548.         [0x00C7]="Wilted Deku Baba",
  1549.         [0x00C8]="Inside Jabu-Jabu's Belly Objects",
  1550.         [0x00C9]="Saria (Cutscenes)",
  1551.         [0x00CA]="Generic Goron (Cutscenes)",
  1552.         [0x00CB]="Ingo",
  1553.         [0x00CC]="Kotake & Koume",
  1554.         [0x00CD]="Dodongo's Cavern Boulder Blockade",
  1555.         [0x00CF]="Bombable Wall & Cracked Floor (Fire Temple)",
  1556.         [0x00D0]="Bombable Wall (Death Mountain Trail)",
  1557.         [0x00D1]="Drifting Ice Platform",
  1558.         [0x00D2]="Adult Ruto",
  1559.         [0x00D3]="Deku Tree Sprout",
  1560.         [0x00D4]="Water Current",
  1561.         [0x00D5]="Lake Hylia Objects",
  1562.         [0x00D6]="Ice Cavern Objects",
  1563.         [0x00D7]="Bottom of the Well Moat Water",
  1564.         [0x00D9]="Adult Malon (Stable & Lon Lon Ranch)",
  1565.         [0x00DA]="Bombchu Field Model",
  1566.         [0x00DB]="?: En_Horse_Game_Check",
  1567.         [0x00DC]="Twinrova",
  1568.         [0x00DD]="Like Like",
  1569.         [0x00DE]="Parasitic Tentacle",
  1570.         [0x00DF]="Tentacle Obstruction",
  1571.         [0x00E0]="Anubis",
  1572.         [0x00E1]="Anubis-Killing Fire Trap",
  1573.         [0x00E2]="Forest Temple Dropdown Ladder",
  1574.         [0x00E3]="Forest Temple Rotating Lava Room Platforms",
  1575.         [0x00E4]="Forest Temple Well Path Water",
  1576.         [0x00E5]="Death Mountain Cloud Ring",
  1577.         [0x00E6]="Jabu-Jabu's Belly Switch",
  1578.         [0x00E7]="Child Malon",
  1579.         [0x00E8]="Ganondorf",
  1580.         [0x00E9]="Bongo Bongo",
  1581.         [0x00EC]="Spike Trap",
  1582.         [0x00ED]="Frog",
  1583.         [0x00EE]="Collectible Deku Shield",
  1584.         [0x00EF]="Meltable Ice Covering",
  1585.         [0x00F0]="Blue Fire",
  1586.         [0x00F1]="Collectible Ocarina of Time",
  1587.         [0x00F4]="Nayru's Love Effect",
  1588.         [0x00F5]="Sage Light Orbs",
  1589.         [0x00F6]="Anubis Spawner",
  1590.         [0x00F7]="?: Bg_Haka_Gate",
  1591.         [0x00F8]="Hyrule Castle Gate",
  1592.         [0x00F9]="Rolling Boulder (Spirit Temple)",
  1593.         [0x00FA]="Spirit Temple Shifting Wall",
  1594.         [0x00FC]="Snake Statue",
  1595.         [0x00FD]="Mesh Bridge",
  1596.         [0x00FE]="Fishing Pond & Proprietor",
  1597.         [0x00FF]="Pushblock",
  1598.         [0x0100]="Gate to Death Mountain Trail",
  1599.         [0x0101]="Dust Particles",
  1600.         [0x0102]="Kakariko Village Windmill Blades",
  1601.         [0x0103]="Kakariko Village Well Crossbeam",
  1602.         [0x0104]="Kakariko Village Well Water",
  1603.         [0x0105]="Torch Stand (Poe Sisters)",
  1604.         [0x0106]="Ganondorf's Lair Floor Tile",
  1605.         [0x0107]="Lon Lon Milk Crate",
  1606.         [0x0108]="Horse Jumping Fence",
  1607.         [0x010A]="Collectible Fire Arrows",
  1608.         [0x010B]="Collectible Ice Arrows",
  1609.         [0x010C]="Collectible Light Arrows",
  1610.         [0x010F]="Collectible Quest Items",
  1611.         [0x0110]="Small Wooden Crate",
  1612.         [0x0111]="Pot",
  1613.         [0x0112]="Collectible Field Items (Invisible)",
  1614.         [0x0113]="Iron Knuckle (Field Enemy)",
  1615.         [0x0114]="Iron Knuckle (Cutscenes)",
  1616.         [0x0115]="Skullkid",
  1617.         [0x0116]="Skullkid's Needle",
  1618.         [0x0117]="Silver Rupee",
  1619.         [0x0118]="Kotake & Koume's Portal",
  1620.         [0x0119]="Bongo Bongo's Shadow",
  1621.         [0x011A]="Business Scrub (Surrendered)",
  1622.         [0x011B]="Navi Message (Automatically Triggered)",
  1623.         [0x011C]="Flame-Shooting Eye Switch",
  1624.         [0x011D]="Flying Pot",
  1625.         [0x011E]="?: Obj_Ice_Poly",
  1626.         [0x011F]="Zora's River Waterfall",
  1627.         [0x0120]="Zora's Domain Waterfall",
  1628.         [0x0121]="Freezard",
  1629.         [0x0122]="Dampé's Ghost",
  1630.         [0x0123]="Dampé's Relay Objects",
  1631.         [0x0124]="Diving Game Zora",
  1632.         [0x0125]="Grass Clump & Regenerating Grass",
  1633.         [0x0126]="Bean Planting Spot",
  1634.         [0x0127]="Bombable Boulder",
  1635.         [0x012A]="Bronze / Diamond / Eye Switch",
  1636.         [0x012B]="Stone Elevator",
  1637.         [0x012C]="Deku Tree Elevator",
  1638.         [0x012D]="Hookshot Target Pillar",
  1639.         [0x012E]="Ocarina Spot",
  1640.         [0x012F]="?: En_Yabusame_Mark",
  1641.         [0x0130]="Rolling Boulder (Generic)",
  1642.         [0x0131]="Deku Target Game Rupee",
  1643.         [0x0132]="Carpenter Boss",
  1644.         [0x0133]="Carpenter (Thieves' Hideout & Tent)",
  1645.         [0x0135]="Cucco Chick",
  1646.         [0x0136]="Dark Link's Illusion Room",
  1647.         [0x0137]="?: Item_Inbox",
  1648.         [0x0138]="Gerudo in White",
  1649.         [0x0139]="?: Obj_Blockstop",
  1650.         [0x013A]="Dynamic Shadow",
  1651.         [0x013B]="Arwing",
  1652.         [0x013C]="Cucco Lady",
  1653.         [0x013D]="Medigoron",
  1654.         [0x013E]="Magic Bean Seller",
  1655.         [0x013F]="Carpenter Boss's Son (Lost Woods)",
  1656.         [0x0140]="Gate to Ingo's Ranch",
  1657.         [0x0141]="Sign (Square)",
  1658.         [0x0142]="Soldier (Hyrule Castle)",
  1659.         [0x0143]="?: En_Syateki_Niw",
  1660.         [0x0144]="Cucco (Attacking)",
  1661.         [0x0145]="Well Stopper",
  1662.         [0x0146]="Saria (Gameplay)",
  1663.         [0x0147]="Checkable Green Navi Spot",
  1664.         [0x0148]="Rainbow Bridge",
  1665.         [0x0149]="Potion Shop Granny",
  1666.         [0x014A]="Lake Scientist",
  1667.         [0x014B]="Bombchu Bowling Alley Employee",
  1668.         [0x014C]="?: En_Bom_Bowl_Pit",
  1669.         [0x014D]="Kaepora Gaebora",
  1670.         [0x014E]="Rock & Silver Gauntlets Boulder",
  1671.         [0x014F]="Graveyard Flower / Rock & Grass Pulled by Kokiri",
  1672.         [0x0150]="Sun Switch",
  1673.         [0x0151]="Groups of Rocks & Grass Clumps",
  1674.         [0x0153]="Windmill Man",
  1675.         [0x0155]="Treasure Chest (Treasure Chest Shop)",
  1676.         [0x0156]="Goddess Statue",
  1677.         [0x0157]="Ceiling Elevator",
  1678.         [0x0158]="Ceiling Mirror",
  1679.         [0x0159]="Bombable Bombchu Boulder",
  1680.         [0x015A]="Hookshot Grate",
  1681.         [0x015B]="?: Bg_Jya_Bombiwa",
  1682.         [0x015C]="Spinning Goron Vase",
  1683.         [0x015E]="Ganondorf's Organ",
  1684.         [0x015F]="Small Water Spout",
  1685.         [0x0160]="Big Water Spout",
  1686.         [0x0162]="Running Man (Hyrule Field & Ending)",
  1687.         [0x0163]="Kokiri Spawner",
  1688.         [0x0164]="King Zora",
  1689.         [0x0165]="Weather-Changing Tag",
  1690.         [0x0166]="Bongo Bongo's Drum Head",
  1691.         [0x0167]="Man on Kakariko Rooftop",
  1692.         [0x0168]="Bombchu Bowling Prizes",
  1693.         [0x0169]="Iron Knuckle Throne & Columns",
  1694.         [0x016A]="Carpet Merchant",
  1695.         [0x016B]="Carpet Merchant's Magic Carpet",
  1696.         [0x016C]="Graveyard Boy",
  1697.         [0x016D]="Mido",
  1698.         [0x016E]="Hylian Spawner",
  1699.         [0x016F]="Ganondorf's Cape",
  1700.         [0x0170]="Song of Storms Effect",
  1701.         [0x0171]="Title Screen",
  1702.         [0x0172]="Thieves' Hideout Cell Door",
  1703.         [0x0173]="Navi Message (Targetable)",
  1704.         [0x0174]="Ganon's Tower Exterior (Collapsing) Objects",
  1705.         [0x0175]="Big Poe",
  1706.         [0x0176]="Death Mountain Eruption Effects",
  1707.         [0x0177]="Gate Barring Escape From Ganon's Tower",
  1708.         [0x0178]="Soldier (Hyrule Castle Town / Kakariko Village)",
  1709.         [0x0179]="Adult Zelda (Normal Gameplay)",
  1710.         [0x017A]="Ganon",
  1711.         [0x017B]="Pierre (Lake Hylia)",
  1712.         [0x017C]="Treasure Chest Shop Proprietor",
  1713.         [0x017D]="Make Pushblock",
  1714.         [0x017E]="Sun's Song Effect",
  1715.         [0x017F]="Ending",
  1716.         [0x0181]="Grotto Treasure Chest",
  1717.         [0x0182]="Ending Cutscene NPCs",
  1718.         [0x0183]="Fire Arrow Trigger & Big Fairy",
  1719.         [0x0184]="Great Fairy's Healing Beam",
  1720.         [0x0185]="Checkable Spot",
  1721.         [0x0186]="Patrolling Gerudo in Purple",
  1722.         [0x0187]="Room Timer",
  1723.         [0x0188]="Skulltula House Resident (Cursed)",
  1724.         [0x0189]="Skulltula House Resident (Curse Lifted)",
  1725.         [0x018A]="Song of Time Effect",
  1726.         [0x018B]="Song of Storms Effect",
  1727.         [0x018C]="Stinger (Water)",
  1728.         [0x018D]="Sacred Forest Meadow Pond Bottom",
  1729.         [0x018E]="Spirit Temple Entrance Room Elevator",
  1730.         [0x018F]="Iron Knuckle Debris",
  1731.         [0x0190]="Gate to the Haunted Wasteland",
  1732.         [0x0191]="Gate to the Gerudo Training Ground",
  1733.         [0x0192]="Deku Scrub (Inside the Deku Tree)",
  1734.         [0x0193]="Deku Scrub Projectile",
  1735.         [0x0194]="Broken Drawbridge",
  1736.         [0x0195]="Business Scrub (Attacking)",
  1737.         [0x0196]="Collectable Grave-Digging Game Items",
  1738.         [0x0197]="Gerudo Fighter",
  1739.         [0x0198]="Epona's Song Effect",
  1740.         [0x0199]="Saria's Song Effect",
  1741.         [0x019A]="Cucco-Chasing Girl",
  1742.         [0x019B]="Dog",
  1743.         [0x019C]="Gold Skulltula Token",
  1744.         [0x019D]="Kakariko Village Objects",
  1745.         [0x019E]="Beehive",
  1746.         [0x019F]="Bombable Wall (Desert Colossus)",
  1747.         [0x01A0]="Large Wooden Crate",
  1748.         [0x01A1]="Forest Stage Actor Spawner",
  1749.         [0x01A2]="Forest Stage Judge",
  1750.         [0x01A3]="Deku Scrub (Deku Target Game)",
  1751.         [0x01A4]="Happy Mask Shop Customer",
  1752.         [0x01A5]="Bombchu Bowling Alley Walls",
  1753.         [0x01A6]="Carpenter Boss's Son (Kakariko Village)",
  1754.         [0x01A7]="Ganon's Castle Barrier",
  1755.         [0x01A8]="Bombable Wall (Zora's Fountain)",
  1756.         [0x01A9]="Bombable Wall (Death Mountain Crater)",
  1757.         [0x01AB]="Group of Rupees",
  1758.         [0x01AC]="Honey & Darling",
  1759.         [0x01AD]="Haggling Shoppers",
  1760.         [0x01AE]="Generic Goron & Biggoron",
  1761.         [0x01AF]="Wolfos",
  1762.         [0x01B0]="Stalchild",
  1763.         [0x01B1]="Ganon's Lair Rubble",
  1764.         [0x01B2]="Ganon's Lair Rubble Fragment",
  1765.         [0x01B3]="Fire Trial Sinking Zig-Zag Platform",
  1766.         [0x01B4]="Shadow Trial Invisible Path",
  1767.         [0x01B5]="?: Bg_Gnd_Soulmeiro",
  1768.         [0x01B6]="Ganon's Castle Fake Wall",
  1769.         [0x01B7]="Water Trial Ice Pushblock",
  1770.         [0x01B8]="Poe Collector",
  1771.         [0x01B9]="Gossip Stone",
  1772.         [0x01BA]="Bombable Wall (Water Temple)",
  1773.         [0x01BB]="Water Temple Gate",
  1774.         [0x01BC]="Carpenter (Kakariko Village)",
  1775.         [0x01BD]="Bombchu Bowling Alley Walls",
  1776.         [0x01BE]="?: En_Wall_Tubo",
  1777.         [0x01BF]="Poe Guide",
  1778.         [0x01C0]="Guay",
  1779.         [0x01C1]="Door Mimic",
  1780.         [0x01C2]="Oasis Water",
  1781.         [0x01C3]="Spinning Goron Vase Lid",
  1782.         [0x01C4]="Door to Darunia's Room",
  1783.         [0x01C5]="Adult Malon (Day)",
  1784.         [0x01C6]="Cow",
  1785.         [0x01C7]="Icicle",
  1786.         [0x01C8]="Ice Cavern Bars",
  1787.         [0x01C9]="Pierre (Wandering)",
  1788.         [0x01CA]="Bonooru",
  1789.         [0x01CB]="Scarecrow's Song Effect",
  1790.         [0x01CC]="?: En_Eg",
  1791.         [0x01CD]="Gerudo Training Ground Fake Wall",
  1792.         [0x01CE]="Zora",
  1793.         [0x01CF]="Gold Skulltula Spawner",
  1794.         [0x01D0]="Nabooru's Second-in-Command",
  1795.         [0x01D1]="Time Block",
  1796.         [0x01D2]="Breakable Bronze Boulder",
  1797.         [0x01D3]="Child Zelda (Gameplay & Cutscene 04)",
  1798.         [0x01D4]="Running Man (Carpenters' Tent & Race)",
  1799.         [0x01D5]="Silver Gauntlets Pushblock [?]",
  1800.         [0x01D6]="Time Block"
  1801.     }
  1802. }
  1803.  
  1804. dynaPolyActors = {
  1805.     "bg_bdan_objects",
  1806.     "bg_bdan_switch",
  1807.     "bg_bom_guard",
  1808.     "bg_bombwall",
  1809.     "bg_bowl_wall",
  1810.     "bg_breakwall",
  1811.     "bg_ddan_jd",
  1812.     "bg_ddan_kd",
  1813.     "bg_dodoago",
  1814.     "bg_ganon_otyuka",
  1815.     "bg_gate_shutter",
  1816.     "bg_gjyo_bridge",
  1817.     "bg_gnd_darkmeiro",
  1818.     "bg_gnd_firemeiro",
  1819.     "bg_gnd_iceblock",
  1820.     "bg_haka",
  1821.     "bg_haka_gate",
  1822.     "bg_haka_huta",
  1823.     "bg_haka_megane",
  1824.     "bg_haka_meganebg",
  1825.     "bg_haka_ship",
  1826.     "bg_haka_trap",
  1827.     "bg_haka_tubo",
  1828.     "bg_haka_zou",
  1829.     "bg_heavy_block",
  1830.     "bg_hidan_dalm",
  1831.     "bg_hidan_fslift",
  1832.     "bg_hidan_hamstep",
  1833.     "bg_hidan_hrock",
  1834.     "bg_hidan_kousi",
  1835.     "bg_hidan_kowarerukabe",
  1836.     "bg_hidan_rock",
  1837.     "bg_hidan_rsekizou",
  1838.     "bg_hidan_sekizou",
  1839.     "bg_hidan_sima",
  1840.     "bg_hidan_syoku",
  1841.     "bg_ice_objects",
  1842.     "bg_ice_shelter",
  1843.     "bg_ice_shutter",
  1844.     "bg_ice_turara",
  1845.     "bg_ingate",
  1846.     "bg_jya_1flift",
  1847.     "bg_jya_amishutter",
  1848.     "bg_jya_block",
  1849.     "bg_jya_bombiwa",
  1850.     "bg_jya_cobra",
  1851.     "bg_jya_ironobj",
  1852.     "bg_jya_kanaami",
  1853.     "bg_jya_lift",
  1854.     "bg_jya_megami",
  1855.     "bg_jya_zurerukabe",
  1856.     "bg_menkuri_kaiten",
  1857.     "bg_mizu_bwall",
  1858.     "bg_mizu_movebg",
  1859.     "bg_mizu_shutter",
  1860.     "bg_mizu_uzu",
  1861.     "bg_mjin",
  1862.     "bg_mori_bigst",
  1863.     "bg_mori_elevator",
  1864.     "bg_mori_hashigo",
  1865.     "bg_mori_hashira4",
  1866.     "bg_mori_hineri",
  1867.     "bg_mori_kaitenkabe",
  1868.     "bg_mori_rakkatenjo",
  1869.     "bg_po_event",
  1870.     "bg_pushbox",
  1871.     "bg_relay_objects",
  1872.     "bg_spot00_break",
  1873.     "bg_spot00_hanebasi",
  1874.     "bg_spot01_idohashira",
  1875.     "bg_spot01_idosoko",
  1876.     "bg_spot01_objects2",
  1877.     "bg_spot02_objects",
  1878.     "bg_spot03_taki",
  1879.     "bg_spot05_soko",
  1880.     "bg_spot06_objects",
  1881.     "bg_spot07_taki",
  1882.     "bg_spot08_bakudankabe",
  1883.     "bg_spot08_iceblock",
  1884.     "bg_spot09_obj",
  1885.     "bg_spot11_bakudankabe",
  1886.     "bg_spot12_gate",
  1887.     "bg_spot12_saku",
  1888.     "bg_spot15_rrbox",
  1889.     "bg_spot15_saku",
  1890.     "bg_spot17_bakudankabe",
  1891.     "bg_spot18_basket",
  1892.     "bg_spot18_futa",
  1893.     "bg_spot18_obj",
  1894.     "bg_spot18_shutter",
  1895.     "bg_sst_floor",
  1896.     "bg_treemouth",
  1897.     "bg_umajump",
  1898.     "bg_vb_sima",
  1899.     "bg_ydan_hasi",
  1900.     "bg_ydan_maruta",
  1901.     "bg_ydan_sp",
  1902.     "bg_zg",
  1903.     "demo_gj",
  1904.     "demo_gt",
  1905.     "door_gerudo",
  1906.     "door_shutter",
  1907.     "door_toki",
  1908.     "en_am",
  1909.     "en_blkobj",
  1910.     "en_box",
  1911.     "en_brob",
  1912.     "en_gb",
  1913.     "en_hata",
  1914.     "en_jj",
  1915.     "en_jsjutan",
  1916.     "en_lightbox",
  1917.     "en_pu_box",
  1918.     "en_siofuki",
  1919.     "obj_bean",
  1920.     "obj_elevator",
  1921.     "obj_hsblock",
  1922.     "obj_kibako2",
  1923.     "obj_lift",
  1924.     "obj_oshihiki",
  1925.     "obj_switch",
  1926.     "obj_timeblock",
  1927.     "obj_warp2block"
  1928. }
  1929.  
  1930. local actor_pos_offset = {
  1931.     OoT=0x24,
  1932.     MM=0x24,
  1933.     AF=0x5C,
  1934. }
  1935. local actor_codeentry_offset = {
  1936.     OoT=0x138,
  1937.     MM=0x140,
  1938.     AF=0x170,
  1939. }
  1940.  
  1941. -- Heap node structure
  1942. function node_valid(addr)
  1943.     return mainmemory.read_u16_be(addr-0x80000000) == 0x7373
  1944. end
  1945. function node_isfree(addr)
  1946.     return mainmemory.read_u16_be(addr-0x80000000+2)
  1947. end
  1948. function node_blocksize(addr)
  1949.     return mainmemory.read_u32_be(addr-0x80000000+4)
  1950. end
  1951. function node_next(addr)
  1952.     return mainmemory.read_u32_be(addr-0x80000000+8)
  1953. end
  1954. function node_prev(addr)
  1955.     return mainmemory.read_u32_be(addr-0x80000000+0xC)
  1956. end
  1957.  
  1958.  
  1959. heap_start = nil
  1960. overlay_table = nil
  1961.  
  1962. --find the heap
  1963. while true do
  1964.     for i=0,0x7FFFF0,0x10 do
  1965.         if mainmemory.read_u32_be(i) == 0x73730000 and
  1966.            mainmemory.read_u32_be(i+0x4) > 0 and
  1967.            mainmemory.read_u32_be(i+0x4) < 0x1000 and
  1968.            mainmemory.read_u32_be(i+0x8) > 0x80000000 and
  1969.            mainmemory.read_u32_be(i+0x8) < 0x80800000 and
  1970.            mainmemory.read_u32_be(i+0xC) == 0 then
  1971.            
  1972.             heap_start = 0x80000000 + i
  1973.            
  1974.             arena_ptr = mainmemory.read_u32_be(i+0x1C)
  1975.             if 0x80000000 <= arena_ptr and arena_ptr < 0x80800000 and mainmemory.read_u32_be(arena_ptr-0x80000000) == heap_start then
  1976.                 header_size = 0x30
  1977.             else
  1978.                 header_size = 0x10
  1979.             end
  1980.             first_alloc_size = mainmemory.read_u32_be(i+0x4)
  1981.             game="OoT"
  1982.             if first_alloc_size < 0x600 then
  1983.                 game = "AF"
  1984.             elseif first_alloc_size < 0xC00 then
  1985.                 game = "OoT"
  1986.             else
  1987.                 game = "MM"
  1988.             end
  1989.             local node = heap_start
  1990.             while overlay_table == nil and node_valid(node) and node_next(node) ~= 0 do
  1991.                 local possibly_overlay_table = mainmemory.read_u32_be(node+header_size+actor_codeentry_offset[game]-0x80000000)
  1992.                 if possibly_overlay_table > 0x80000000 and possibly_overlay_table < 0x80800000 then
  1993.                     overlay_table = possibly_overlay_table
  1994.                 end
  1995.                 node = node_next(node)
  1996.             end
  1997.             print(string.format("Heap found at %X (header_size=%X, game=%s), overlay table found at %X",heap_start,header_size,game,overlay_table))
  1998.             break
  1999.         end
  2000.     end
  2001.    
  2002.     if heap_start ~= nil then
  2003.         break -- Zelda heap found!
  2004.     else
  2005.         for i=1,100 do
  2006.             emu.frameadvance()
  2007.         end
  2008.     end
  2009. end
  2010.  
  2011. function probably_a_float(val)
  2012.     return val == 0 or val == 0x80000000 or (val >= 0x38000000 and val <= 0x4c000000) or (val >= 0xb8000000 and val <= 0xcc000000)
  2013. end
  2014.  
  2015. function summarize_node(header_addr)
  2016.     -- Heuristically try to figure out what this node actually is.
  2017.     local data_addr = header_addr + header_size
  2018.     local first_u16 = mainmemory.read_u16_be(data_addr-0x80000000)
  2019.     local first_u32 = mainmemory.read_u32_be(data_addr-0x80000000)
  2020.    
  2021.     local maybe_xpos = mainmemory.read_u32_be(data_addr-0x80000000+actor_pos_offset[game])
  2022.     local maybe_ypos = mainmemory.read_u32_be(data_addr-0x80000000+actor_pos_offset[game]+4)
  2023.     local maybe_zpos = mainmemory.read_u32_be(data_addr-0x80000000+actor_pos_offset[game]+8)
  2024.     if probably_a_float(maybe_xpos) and probably_a_float(maybe_ypos) and probably_a_float(maybe_zpos) and first_u16 <= #actor_defs[game] and first_u32 > 0 then
  2025.         return string.format("Actor %04X", first_u16)
  2026.     end
  2027.     if overlay_map[data_addr] then
  2028.         --return string.format("Overlay %04X %s", overlay_map[data_addr], actor_defs[game][overlay_map[data_addr]])
  2029.         return string.format("Overlay %04X", overlay_map[data_addr])
  2030.     end
  2031.     if first_u16 == 0x27BD or (first_u16 >= 0xAFA4 and first_u16 <= 0xAFA7) then
  2032.         return "Unknown Code"
  2033.     end
  2034.     if game == "OoT" and node_blocksize(header_addr) == 0x2010 then
  2035.         return "Get Item Object"
  2036.     end
  2037.     if game == "MM" and node_blocksize(header_addr) == 0x2000 then
  2038.         return "Get Item Object"
  2039.     end
  2040.     if game == "MM" and node_blocksize(header_addr) == 0x3800 then
  2041.         return "Worn Mask Object"
  2042.     end
  2043.    
  2044.     --No idea what it is
  2045.     if node_isfree(header_addr) > 0 then
  2046.         return "Nothing"
  2047.     else
  2048.         return "??? Unknown ???"
  2049.     end
  2050. end
  2051.  
  2052. function node_is_dynaPoly(header_addr)
  2053.     local summary = summarize_node(header_addr)
  2054.     local description = summary
  2055.     local data_addr = header_addr + header_size
  2056.     local actorId = tonumber(string.sub(description, -4), 16)
  2057.     local val = ""
  2058.     if actorId ~= nil and string.find(summary, "Actor") then
  2059.         local actor_name = actor_defs[game][actorId]
  2060.         if actor_name ~= "Door_Shutter" then
  2061.             local actor_desc = actor_defs[game.."_Names"][actorId]
  2062.             for _,v in pairs(dynaPolyActors) do
  2063.                 if v == string.lower(actor_name) then
  2064.                     --print(string.lower(actor_name))
  2065.                     bgId = mainmemory.read_u32_be(data_addr+0x13C-0x80000000)
  2066.                     params = mainmemory.read_u16_be(data_addr+0x1C-0x80000000)
  2067.                     if bgId == 4294967295 then
  2068.                         bgId = -1
  2069.                     end
  2070.                     if actor_name == "Bg_Spot18_Obj" and params == 1 then
  2071.                         actor_desc = "Goron Spear"
  2072.                     elseif actor_name == "Bg_Spot18_Obj" and params == 0xFF00 then
  2073.                         actor_desc = "Goron Statue"
  2074.                     end
  2075.                     val = actor_desc.." "..bgId.." "..string.format("0x%X", data_addr) --.." "..string.format("0x%X", params)
  2076.                     break
  2077.                 end
  2078.             end
  2079.         end
  2080.     end
  2081.    
  2082.     return val
  2083. end
  2084.  
  2085. function describe_node(header_addr)
  2086.     local summary = summarize_node(header_addr)
  2087.     local description = summary
  2088.     local data_addr = header_addr + header_size
  2089.    
  2090.     local actorId = tonumber(string.sub(description, -4), 16)
  2091.     if actorId ~= nil then
  2092.         if game == "OoT" then
  2093.             description = description.." "..actor_defs[game][actorId].." - "..actor_defs[game.."_Names"][actorId]
  2094.         else
  2095.             description = description.." "..actor_defs[game][actorId]
  2096.         end
  2097.     end
  2098.     if node_tracking[summary] ~= nil and next(node_tracking[summary]) ~= nil then
  2099.         description = description.." -"
  2100.         for k,v in pairs(node_tracking[summary]) do
  2101.             local varValue
  2102.             if v%4 == 0 then
  2103.                 varValue = mainmemory.read_u32_be(data_addr+v-0x80000000)
  2104.                 description = description..string.format(" 0x%X(%X)=%08X", v, data_addr+v, varValue)
  2105.             elseif v%2 == 0 then
  2106.                 varValue = mainmemory.read_u16_be(data_addr+v-0x80000000)
  2107.                 description = description..string.format(" 0x%X(%X)=%04X", v, data_addr+v, varValue)
  2108.             else
  2109.                 varValue = mainmemory.readbyte(data_addr+v-0x80000000)
  2110.                 description = description..string.format(" 0x%X(%X)=%X", v, data_addr+v, varValue)
  2111.             end
  2112.         end
  2113.     end
  2114.     return description
  2115. end
  2116.  
  2117. function track(node_summary, vars)
  2118.     if vars == nil then vars = {} end
  2119.     node_tracking[node_summary] = vars
  2120.     return nil
  2121. end
  2122.  
  2123. function trackaddr(addr, val)
  2124.     if addr < 0x80000000 then addr = addr + 0x80000000 end
  2125.     if val == nil then val = true end
  2126.     address_tracking[addr] = val
  2127.     return nil
  2128. end
  2129.  
  2130. client.SetGameExtraPadding(300,120,0,0)
  2131.  
  2132. event.onexit(function()
  2133.     client.SetGameExtraPadding(0,0,0,0)
  2134.     gui.clearGraphics()
  2135. end)
  2136.  
  2137. print("Usage: Click and drag to zoom. Use scroll wheel, middle-click, or X button to unzoom.\n"..
  2138.     "Click an actor in the heap to track actors of that type.\n"..
  2139.     "To track custom node offsets, type e.g. track('Overlay 009B',{0x5E6}) in console.\n"..
  2140.     "To track arbitrary addresses, type e.g. trackaddr(0x80000000, true) in console.\n")
  2141.  
  2142. local scrollbar_size = 20
  2143. local heapviz_size = 50
  2144. local reset_box_size = 20
  2145.  
  2146. local dragging_mouse = false
  2147. local dragging_mouse_for_scrollbar = false
  2148. local dragstart_x
  2149. if zoom_begin == nil then zoom_begin = 0 end
  2150. if zoom_end == nil then zoom_end = 1 end
  2151. if node_tracking == nil then node_tracking = {} end --global
  2152. if address_tracking == nil then address_tracking = {} end --global
  2153. local oldmouse = input.getmouse()
  2154. local inputs
  2155. local prev_inputs = input.get()
  2156. overlay_map = {}
  2157. while true do
  2158.    
  2159.     if emu.framecount() % 3 == 0 or client.ispaused() then
  2160.  
  2161.         --run through the current values of the game's overlay table
  2162.         for actorId=0,#actor_defs[game] do
  2163.             local loaded_ovl_pointer = mainmemory.read_u32_be(overlay_table-0x80000000+(0x20*actorId)+0x10)
  2164.             if loaded_ovl_pointer > 0 then
  2165.                 overlay_map[loaded_ovl_pointer] = actorId
  2166.             end
  2167.         end
  2168.        
  2169.         --locate size and end of heap
  2170.         local node = heap_start
  2171.         while node_valid(node) and node_next(node) ~= 0 do
  2172.             node = node_next(node)
  2173.         end
  2174.         local heap_end = node + header_size + node_blocksize(node) -- varies per scene
  2175.         local heapsize = heap_end - heap_start
  2176.        
  2177.         -- Draw the heap
  2178.         local scale = 1/heapsize*client.screenwidth()/(zoom_end-zoom_begin)
  2179.         local offset = zoom_begin / (zoom_end-zoom_begin) * client.screenwidth()
  2180.         prev_inputs = inputs
  2181.         inputs = input.get()
  2182.        
  2183.         gui.use_surface("client")
  2184.        
  2185.         if node_valid(heap_start) then
  2186.            
  2187.             local mouse = input.getmouse() -- get mouse info (position, buttons pressed)
  2188.             local x_native = client.borderwidth()+mouse.X*(client.screenwidth()-2*client.borderwidth())/client.bufferwidth()
  2189.             local y_native = client.borderheight()+mouse.Y*(client.screenheight()-2*client.borderheight())/client.bufferheight()
  2190.             local y_dyna = 140
  2191.            
  2192.             local mouse_in_range = x_native >= 0 and x_native <= client.screenwidth() and y_native >= 0 and y_native <= client.screenheight()
  2193.            
  2194.             local just_released_drag = false
  2195.             if dragging_mouse and not mouse.Left then
  2196.                 dragging_mouse = false
  2197.                 local scale = zoom_end-zoom_begin
  2198.                 if y_native > scrollbar_size and dragstart_x + 10 < x_native then
  2199.                     zoom_end = zoom_begin + x_native / client.screenwidth() * scale
  2200.                     zoom_begin = zoom_begin + dragstart_x / client.screenwidth() * scale
  2201.                     just_released_drag = true
  2202.                 elseif y_native > scrollbar_size and x_native + 10 < dragstart_x then
  2203.                     local scale = zoom_end-zoom_begin
  2204.                     zoom_end = zoom_begin + dragstart_x / client.screenwidth() * scale
  2205.                     zoom_begin = zoom_begin + x_native / client.screenwidth() * scale
  2206.                     just_released_drag = true
  2207.                 elseif y_native > scrollbar_size+heapviz_size and y_native < scrollbar_size+heapviz_size+reset_box_size and x_native > client.screenwidth()-reset_box_size and x_native < client.screenwidth() then
  2208.                     zoom_begin = 0
  2209.                     zoom_end = 1
  2210.                     just_released_drag = true
  2211.                 end
  2212.                 if zoom_begin < 0 then zoom_begin = 0 end
  2213.                 if zoom_end > 1 then zoom_end = 1 end
  2214.             end
  2215.            
  2216.             gui.drawBox(0,0,client.screenwidth(),scrollbar_size, 0x80000000, 0x80E0E0E0) -- draw the scroll bar
  2217.             gui.drawBox(client.screenwidth()*zoom_begin,0,client.screenwidth()*zoom_end,scrollbar_size, 0x80000000, 0x80E0E0E0) -- draw the scoll bar backgorund?
  2218.            
  2219.             gui.drawBox(client.screenwidth()-reset_box_size,scrollbar_size+heapviz_size,client.screenwidth(),scrollbar_size+heapviz_size+reset_box_size,0x80000000,0x80C0C0C0)
  2220.             gui.drawLine(client.screenwidth()-reset_box_size,scrollbar_size+heapviz_size,client.screenwidth(),scrollbar_size+heapviz_size+reset_box_size,0x80000000)
  2221.             gui.drawLine(client.screenwidth()-reset_box_size,scrollbar_size+heapviz_size+reset_box_size,client.screenwidth(),scrollbar_size+heapviz_size,0x80000000)
  2222.            
  2223.             gui.drawBox(-offset, scrollbar_size, heapsize*scale - offset, scrollbar_size+heapviz_size, 0x80000000, 0xFF00FF00)
  2224.             node = heap_start
  2225.             local node_to_show = nil
  2226.             local printed_lines_count = 0
  2227.             local lines_to_print = ""
  2228.            
  2229.             -- Loop through the heap nodes
  2230.             while node ~= 0 and node_valid(node) do
  2231.                 local x = (node-heap_start)*scale - offset
  2232.                 local x2 = (node+header_size+node_blocksize(node)-heap_start)*scale - offset
  2233.                 local node_summary = summarize_node(node)
  2234.                 if node_isfree(node) > 0 then
  2235.                     gui.drawBox(x, scrollbar_size, x2, scrollbar_size+heapviz_size, 0x80000000, 0xFFFF0000)
  2236.                 elseif node_tracking[node_summary] ~= nil then
  2237.                     gui.drawBox(x, scrollbar_size, x2, scrollbar_size+heapviz_size, 0x80000000, 0xFF00FFFF)
  2238.                     gui.drawText(0,scrollbar_size+heapviz_size+45+15*printed_lines_count, string.format("%X - %s", node+header_size, describe_node(node)))
  2239.                     printed_lines_count = printed_lines_count + 1
  2240.                    
  2241.                 else
  2242.                     gui.drawLine(x, scrollbar_size, x, scrollbar_size+heapviz_size, 0x80000000)
  2243.                     dynaDesc = node_is_dynaPoly(node)
  2244.                     if dynaDesc ~= "" then
  2245.                         gui.drawText(0, y_dyna, dynaDesc, nil, nil, 12)
  2246.                         y_dyna = y_dyna + 20
  2247.                     end
  2248.                 end
  2249.                
  2250.                 -- Pressing "g" key will print the whole heap
  2251.                 if inputs.G and not prev_inputs.G then
  2252.                     lines_to_print=lines_to_print..string.format("header:%X data:%X free:%X blocksize:%X next_addr:%X prev_addr:%X - %s\n", node, node+header_size, node_isfree(node), node_blocksize(node), node_next(node), node_prev(node), describe_node(node))
  2253.                 end
  2254.                
  2255.                 -- Pressing "h" key will print info for the currently selected actor
  2256.                 if inputs.H and not prev_inputs.H then
  2257.                     local actorid = mainmemory.read_u16_be(node+header_size-0x80000000)
  2258.                     if node_tracking[node_summary] ~= nil and node_isfree(node) == 0 then
  2259.                         lines_to_print=lines_to_print..string.format("header:%X data:%X free:%X blocksize:%X next_addr:%X prev_addr:%X - %s\n", node, node+header_size, node_isfree(node), node_blocksize(node), node_next(node), node_prev(node), describe_node(node))
  2260.                     end
  2261.                 end
  2262.                
  2263.                
  2264.                 if mouse_in_range and y_native > scrollbar_size and y_native < scrollbar_size+heapviz_size and x <= x_native and x_native <= x2 then
  2265.                     node_to_show = node
  2266.                     if not mouse.Left and oldmouse.Left and not just_released_drag then
  2267.                         local actorid = mainmemory.read_u16_be(node+header_size-0x80000000)
  2268.                         if node_tracking[node_summary] ~= nil then
  2269.                             node_tracking[node_summary] = nil
  2270.                         elseif node_isfree(node) == 0 then
  2271.                             node_tracking[node_summary] = {}
  2272.                             print(string.format("To track custom node offsets, type e.g. track('%s', {0x32,0xBE}) in console",node_summary))
  2273.                         end
  2274.                     end
  2275.                 end
  2276.                
  2277.                 node = node_next(node)
  2278.             end
  2279.             -- End loop through the heap nodes
  2280.            
  2281.             if lines_to_print ~= "" then
  2282.                 print(lines_to_print)
  2283.             end
  2284.            
  2285.            
  2286.             if not dragging_mouse and mouse_in_range then
  2287.                 if mouse.Left then
  2288.                     if y_native < scrollbar_size or dragging_mouse_for_scrollbar then
  2289.                         dragging_mouse_for_scrollbar = true
  2290.                         local new_centerpoint = x_native/client.screenwidth()
  2291.                         local distance = (zoom_end-zoom_begin)/2
  2292.                         if new_centerpoint < distance then new_centerpoint = distance end
  2293.                         if new_centerpoint > 1-distance then new_centerpoint = 1-distance end
  2294.                         zoom_begin = new_centerpoint - distance
  2295.                         zoom_end = new_centerpoint + distance
  2296.                     else
  2297.                         dragging_mouse = true
  2298.                         dragstart_x = x_native
  2299.                     end
  2300.                 elseif mouse.Middle then
  2301.                     zoom_begin = 0
  2302.                     zoom_end = 1
  2303.                 else
  2304.                     dragging_mouse_for_scrollbar = false
  2305.                 end
  2306.             end
  2307.             if dragging_mouse then
  2308.                 if x_native < 0 then x_native = 0 end
  2309.                 if x_native > client.screenwidth() then x_native = client.screenwidth() end
  2310.                 gui.drawBox(dragstart_x,scrollbar_size,x_native,scrollbar_size+heapviz_size, 0xC00000FF, 0xC000FFFF)
  2311.             end
  2312.            
  2313.             if mouse.Wheel ~= oldmouse.Wheel then
  2314.                 if mouse.Wheel < oldmouse.Wheel then -- zoom out
  2315.                     zoom_begin = zoom_begin - 0.1
  2316.                     zoom_end = zoom_end + 0.1
  2317.                 elseif mouse.Wheel > oldmouse.Wheel then -- zoom in
  2318.                     local newzoom_center = x_native / client.screenwidth()
  2319.                     if newzoom_center < zoom_begin then newzoom_center = zoom_begin end
  2320.                     if newzoom_center > zoom_end then newzoom_center = zoom_end end
  2321.                     zoom_begin = newzoom_center-(newzoom_center-zoom_begin)/1.5
  2322.                     zoom_end = newzoom_center+(zoom_end-newzoom_center)/1.5
  2323.                 end
  2324.                 if zoom_begin < 0 then zoom_begin = 0 end
  2325.                 if zoom_end > 1 then zoom_end = 1 end
  2326.             end
  2327.            
  2328.             if next(node_tracking) ~= nil then
  2329.                 local tracked_str = "Tracked nodes:"
  2330.                 for k,v in pairs(node_tracking) do
  2331.                     if v then
  2332.                         tracked_str = tracked_str..string.format(' %s,',k)
  2333.                     end
  2334.                 end
  2335.                 tracked_str = tracked_str:sub(1, -2) --remove trailing comma
  2336.                 gui.drawText(0,scrollbar_size+heapviz_size+15, tracked_str)
  2337.             end
  2338.            
  2339.             if node_to_show then
  2340.                 local coord = x_native
  2341.                 local str_to_draw = string.format("header: %X\ndata: %X\nfree: %X\nblocksize: %X\nnext_addr: %X\nprev_addr: %X\n\n%s", node_to_show, node_to_show+header_size, node_isfree(node_to_show), node_blocksize(node_to_show), node_next(node_to_show), node_prev(node_to_show), describe_node(node_to_show))
  2342.                 local dir = "left"
  2343.                 if x_native > client.screenwidth()*0.6 then
  2344.                     dir = "right"
  2345.                 end
  2346.                 gui.drawText(x_native, y_native+25, str_to_draw, nil, nil, 12, nil, nil, dir)
  2347.             end
  2348.            
  2349.             for addr,v in pairs(address_tracking) do
  2350.                 if v then
  2351.                     local varValue
  2352.                     if addr%4 == 0 then
  2353.                         varValue = mainmemory.read_u32_be(addr-0x80000000)
  2354.                         gui.drawText(0,scrollbar_size+heapviz_size+60+15*printed_lines_count, string.format("Tracked addr %X - %08X", addr, varValue))
  2355.                     elseif addr%2 == 0 then
  2356.                         varValue = mainmemory.read_u16_be(addr-0x80000000)
  2357.                         gui.drawText(0,scrollbar_size+heapviz_size+60+15*printed_lines_count, string.format("Tracked addr %X - %04X", addr, varValue))
  2358.                     else
  2359.                         varValue = mainmemory.readbyte(addr-0x80000000)
  2360.                         gui.drawText(0,scrollbar_size+heapviz_size+60+15*printed_lines_count, string.format("Tracked addr %X - %02X", addr, varValue))
  2361.                     end
  2362.                     printed_lines_count = printed_lines_count + 1
  2363.                 end
  2364.             end
  2365.            
  2366.             oldmouse = mouse
  2367.         end
  2368.    
  2369.     end
  2370.    
  2371.     emu.frameadvance()
  2372. end
  2373.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement