Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- RNG_ColorsBold = {0xFFba0000, 0xFFff7979, 0xFF009318, 0xFF47e778 ,0xFF0036ff ,0xFF00c4ff , 0xFF666666 ,0xFFcccccc ,0xFF9432ff , 0xFFc436ff, 0xFFffa536, 0xFFe9ff36,0xFF38a0ab, 0xFF4cd8e7,0xFFb185af, 0xFFffc0fd }
- RNG_ColorsTrans = {}
- for i = 1, 16 do
- RNG_ColorsTrans[i] = RNG_ColorsBold[i]-0xAA000000
- end
- RNG_Colors = {RNG_ColorsBold, RNG_ColorsTrans}
- --Determination of which RNG address to check, depending on whether or not a battle is taking place.
- if mainmemory.read_u8(0x0117)==01 then
- RNG = mainmemory.read_u8(0x0026)
- else
- RNG = mainmemory.read_u8(0x29AD)
- end
- RNG_Windows = {-1,8,12,28,45,54,61,87,96,135,151,170,184,219,224,250,255}
- Windows = {}
- for a = 1,16 do
- if a*0.5 == math.floor(a*0.5) then
- neg = "+" else neg = "-"
- end
- Windows[a] = "[".. math.ceil(a*0.5) .. neg .. "]"
- end
- --Drawing the overlayed boxes
- for n = 1,16 do
- gui.drawBox(RNG_Windows[n]+1,218,RNG_Windows[n+1],225,RNG_ColorsTrans[n],RNG_ColorsTrans[n])
- end
- --Drawing the active box
- for g = 1,16 do
- if RNG <= RNG_Windows[g] then
- Window_Color = RNG_ColorsBold[g]
- Current_Window = Windows[g]
- break end
- end
- gui.drawBox(0,218,RNG,225,Window_Color,Window_Color)
- gui.drawText(RNG-8,203,bizstring.hex(RNG),0xFFFFFFFF,10)
- if RNG < 127 then
- gui.drawText(RNG+8,202,Current_Window,Window_Color,8) else
- gui.drawText(RNG-26,202,Current_Window,Window_Color,8)
- end
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement