daily pastebin goal
41%
SHARE
TWEET

DeSmuME 0.9.8-gfx3dhack sample script

gocha Jan 13th, 2013 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- desmume 0.9.8-gfx3dHack sample script
  2.  
  3. local gfx3dMin, gfx3dMax = 0.000000, 1.000000
  4. function modifyVisibility()
  5.         gui.text(0, 0, string.format("%f %f", gfx3dMin, gfx3dMax))
  6.         gui.setgfx3dvisibility(gfx3dMin, gfx3dMax)
  7. end
  8.  
  9. local keys = { {}, {} }
  10. gui.register(function()
  11.         keys[1] = input.get()
  12.  
  13.         if keys[1]["6"] then
  14.                 gfx3dMin = math.min(math.max(gfx3dMin - 0.001, 0.0), 1.0)
  15.         end
  16.         if keys[1]["7"] then
  17.                 gfx3dMin = math.min(math.max(gfx3dMin + 0.001, 0.0), 1.0)
  18.         end
  19.         if keys[1]["8"] then
  20.                 gfx3dMax = math.min(math.max(gfx3dMax - 0.001, 0.0), 1.0)
  21.         end
  22.         if keys[1]["9"] then
  23.                 gfx3dMax = math.min(math.max(gfx3dMax + 0.001, 0.0), 1.0)
  24.         end
  25.  
  26.         modifyVisibility()
  27.  
  28.         keys[2] = keys[1]
  29. end)
  30.  
  31. emu.registerexit(function()
  32.         gui.setgfx3dvisibility(0.0, 1.0)
  33. end)
RAW Paste Data
Top