diff --git a/ShadowrunMouse.lua b/ShadowrunMouse.lua index 2ef80bf..7e5e353 100644 --- a/ShadowrunMouse.lua +++ b/ShadowrunMouse.lua @@ -19,17 +19,32 @@ It is suggested you set movement (Input->Input Configuration) to WASD. I set start to E and Select to left CTRL. +Shadowrun has a large following in Germany and it was brought to my attention that the German version of the rom was incompatible with the original script. This will now work on either the US or German version with the alternate memory locations set below. + ]] + +-- US Rom -- + +mouseOn = 0x0001F5 +mouseX = 0x0001F1 +mouseY = 0x0001F3 + +-- DE Rom -- + +--mouseOn = 0x0001D9 +--mouseX = 0x0001D5 +--mouseY = 0x0001D7 + function ShadowrunMouse() inp = input.get() - if(memory.readbyte(0x0001F5) == 255) then - --keep in range and adjust for offset + if(memory.readbyte(mouseOn) == 255) then + --keep in range and adjust for offset. (This version of LUA does not feature clamp) x = math.max(3,math.min(inp.xmouse - 5,255)) y = math.max(3,math.min(inp.ymouse - 4,223)) - memory.writebyte(0x0001F1,x) - memory.writebyte(0x0001F3,y) + memory.writebyte(mouseX,x) + memory.writebyte(mouseY,y) end if(inp.leftclick) then joypad.set(1, {B=true}) --Select diff --git a/ShadowrunMouseGerman.lua b/ShadowrunMouseGerman.lua index 1e3caef..3980680 100644 --- a/ShadowrunMouseGerman.lua +++ b/ShadowrunMouseGerman.lua @@ -40,7 +40,7 @@ function ShadowrunMouse() inp = input.get() if(memory.readbyte(mouseOn) == 255) then - --keep in range and adjust for offset + --keep in range and adjust for offset. (This version of LUA does not feature clamp) x = math.max(3,math.min(inp.xmouse - 5,255)) y = math.max(3,math.min(inp.ymouse - 4,223)) memory.writebyte(mouseX,x)