fork/m-overlay
git clone https://git.julia.blue/fork/m-overlay
3df8e17
settings-overhaul
1-- Metal Gear Solid - The Twin Snakes (NTSC v1.0) 2 3local core =require ( "games.core" ) 4 5local game ={ 6memorymap ={} 7} 8 9core . loadGenericControllerMap ( 0x801E9388 , game ) 10 11local abs =math . abs 12 13-- These functions seem to apply to many games 14 15function game . translateAxis ( x , y ) 16x =x / 100 17y =y / 100 18 19local near =1 - ( abs ( abs ( x ) - abs ( y ))) * 0.100 20 21local angle =math . atan2 ( x , y ) 22local mag =math . sqrt ( x * x + y * y ) 23 24-- Reduce the magnitute when x,y values are headed towards a diagonal 25return x + math . sin ( angle ) * mag * near * 0.25 , y + math . cos ( angle ) * mag * near * 0.25 26end 27 28return game