Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Majora's Mask (U): Explosives Positions Script
- -- by Jimmie1717
- -- BizHawk 1.11.8.2
- -- Setup for 640x480 Display.
- -- Positions will be shown in the bottle right corner.
- -- Adjust "anchor_x/y" on lines 24/25 if you want it to display somewhere else on screen.
- console.clear();
- gui.defaultTextBackground(0x00000000);
- -- Global
- readDWord = memory.read_u32_be;
- readFloat = memory.readfloat;
- writeDWord = memory.write_u32_be;
- writeFloat = memory.writefloat;
- drawText = gui.drawText;
- -- Explosive Pointer
- local explosive_pointer = 0x3E87F8;
- function explosivesPositionsDisplay()
- local anchor_x = 579;
- local anchor_y = 320;
- local pointer = readDWord(explosive_pointer);
- -- Loop through current explosives out.
- for i = 1, 3, 1 do
- if (pointer ~= 0x00000000 and pointer > 0x80000000) then
- local x = pointer - 0x80000000 + 0x00000024;
- local y = pointer - 0x80000000 + 0x00000028;
- local z = pointer - 0x80000000 + 0x0000002C;
- drawText(anchor_x + 1, anchor_y + 1, string.format("%s %d:", "Bomb ", i), "BLACK");
- drawText(anchor_x + 0, anchor_y + 0, string.format("%s %d:", "Bomb ", i));
- drawText(anchor_x + 6, anchor_y + 13, string.format("% 7.1f", readFloat(x, true)), "BLACK");
- drawText(anchor_x + 5, anchor_y + 12, string.format("% 7.1f", readFloat(x, true)));
- drawText(anchor_x + 6, anchor_y + 25, string.format("% 7.1f", readFloat(y, true)), "BLACK");
- drawText(anchor_x + 5, anchor_y + 24, string.format("% 7.1f", readFloat(y, true)));
- drawText(anchor_x + 6, anchor_y + 37, string.format("% 7.1f", readFloat(z, true)), "BLACK");
- drawText(anchor_x + 5, anchor_y + 36, string.format("% 7.1f", readFloat(z, true)));
- anchor_y = anchor_y + 54;
- pointer = readDWord(pointer - 0x80000000 + 0x0000012C);
- else
- break;
- end
- end
- end
- -- Core Loop
- while true do
- -- Call Display Function if the pointer is not null.
- if (readDWord(explosive_pointer) ~= 0x00000000) then
- explosivesPositionsDisplay();
- end
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement