Ledger Nano X - The secure hardware wallet
SHARE
TWEET

feos X-men 2 script, updated by Truncated

a guest Feb 16th, 2012 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- HUD for X-Men 2 (Genesis)
  2. -- feos, 2012
  3. -- updated by Truncated 2012-02-15
  4.  
  5. xvel_prev = 0
  6. yvel_prev = 0
  7.  
  8. gui.register(function()
  9.  
  10.         x    = memory.readwordunsigned(0xFFEAB1)
  11.         y    = memory.readwordunsigned(0xFFEAB5)
  12.         xvel = memory.readwordsigned  (0xFFEABE)
  13.         yvel = memory.readwordsigned  (0xFFEAC0)
  14.         xsub = memory.readbyteunsigned(0xFFEAB3)
  15.         ysub = memory.readbyteunsigned(0xFFEAB7)
  16.         xcam = memory.readwordunsigned(0xFFCD72)
  17.         ycam = memory.readwordunsigned(0xFFCD70)
  18.         xacc = xvel - xvel_prev
  19.         yacc = yvel - yvel_prev
  20.         xvel_prev = xvel
  21.         yvel_prev = yvel
  22.         xgui = 120
  23.         ygui = 190
  24.         xscr = x-xcam
  25.         yscr = y-ycam
  26.        
  27.         -- Velocities
  28.         if xvel < 0 then
  29.                 xvel_sign = "-"
  30.         else
  31.                 xvel_sign = ""
  32.         end
  33.         xvel_sub = math.abs(xvel) % 256
  34.         xvel_pix = (math.abs(xvel) - xvel_sub)/256
  35.        
  36.         if yvel < 0 then
  37.                 yvel_sign = "-"
  38.         else
  39.                 yvel_sign = ""
  40.         end
  41.         yvel_sub = math.abs(yvel) % 256
  42.         yvel_pix = (math.abs(yvel) - yvel_sub)/256
  43.        
  44.         -- Accelerations
  45.         if xacc < 0 then
  46.                 xacc_sign = "-"
  47.         else
  48.                 xacc_sign = ""
  49.         end
  50.         xacc_sub = math.abs(xacc) % 256
  51.         xacc_pix = (math.abs(xacc) - xacc_sub)/256
  52.        
  53.         if yacc < 0 then
  54.                 yacc_sign = "-"
  55.         else
  56.                 yacc_sign = ""
  57.         end
  58.         yacc_sub = math.abs(yacc) % 256
  59.         yacc_pix = (math.abs(yacc) - yacc_sub)/256
  60.        
  61.        
  62.         gui.text(xgui+30, ygui,    "X        Y",  "magenta")
  63.         gui.text(xgui,    ygui+8,  "Pos:",        "green")
  64.         gui.text(xgui+23, ygui+8,  x..":"..xsub, "green")
  65.         gui.text(xgui+60, ygui+8,  y..":"..ysub, "green")
  66.         gui.text(xgui,    ygui+16, "Vel:",        "yellow")
  67.         gui.text(xgui+23, ygui+16, xvel_sign .. xvel_pix .. ":" .. xvel_sub,         "yellow")
  68.         gui.text(xgui+60, ygui+16, yvel_sign .. yvel_pix .. ":" .. yvel_sub,         "yellow")
  69.         gui.text(xgui,    ygui+24, "Acc:",        "red")
  70.         gui.text(xgui+23, ygui+24, xacc_sign .. xacc_pix .. ":" .. xacc_sub,         "red")
  71.         gui.text(xgui+60, ygui+24, yacc_sign .. yacc_pix .. ":" .. yacc_sub,         "red")
  72.         gui.text(xscr-18,  yscr-7, "I'm here!",   "green")
  73.  
  74. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top