Advertisement
Guest User

Untitled

a guest
Nov 8th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv
  2.  
  3. PATH_OVERLAY := RelToAbs(A_ScriptDir, "dx9_overlay.dll")
  4.  
  5. hModule := DllCall("LoadLibrary", Str, PATH_OVERLAY)
  6. if(hModule == -1 || hModule == 0)
  7. {
  8.  
  9. }
  10.  
  11.  
  12. Init_func               := DllCall("GetProcAddress", UInt, hModule, Str, "Init")
  13. SetParam_func           := DllCall("GetProcAddress", UInt, hModule, Str, "SetParam")
  14.  
  15. TextCreate_func         := DllCall("GetProcAddress", UInt, hModule, Str, "TextCreate")
  16. TextDestroy_func        := DllCall("GetProcAddress", UInt, hModule, Str, "TextDestroy")
  17. TextSetShadow_func      := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetShadow")
  18. TextSetShown_func       := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetShown")
  19. TextSetColor_func       := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetColor")
  20. TextSetPos_func         := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetPos")
  21. TextSetString_func      := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetString")
  22. TextUpdate_func         := DllCall("GetProcAddress", UInt, hModule, Str, "TextUpdate")
  23.  
  24. BoxCreate_func          := DllCall("GetProcAddress", UInt, hModule, Str, "BoxCreate")
  25. BoxDestroy_func         := DllCall("GetProcAddress", UInt, hModule, Str, "BoxDestroy")
  26. BoxSetShown_func        := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetShown")
  27. BoxSetBorder_func       := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetBorder")
  28. BoxSetBorderColor_func  := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetBorderColor")
  29. BoxSetColor_func        := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetColor")
  30. BoxSetHeight_func       := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetHeight")
  31. BoxSetPos_func          := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetPos")
  32. BoxSetWidth_func        := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetWidth")
  33.  
  34. LineCreate_func         := DllCall("GetProcAddress", UInt, hModule, Str, "LineCreate")
  35. LineDestroy_func        := DllCall("GetProcAddress", UInt, hModule, Str, "LineDestroy")
  36. LineSetShown_func       := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetShown")
  37. LineSetColor_func       := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetColor")
  38. LineSetWidth_func       := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetWidth")
  39. LineSetPos_func         := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetPos")
  40.  
  41. ImageCreate_func        := DllCall("GetProcAddress", UInt, hModule, Str, "ImageCreate")
  42. ImageDestroy_func       := DllCall("GetProcAddress", UInt, hModule, Str, "ImageDestroy")
  43. ImageSetShown_func      := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetShown")
  44. ImageSetAlign_func      := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetAlign")
  45. ImageSetPos_func        := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetPos")
  46. ImageSetRotation_func   := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetRotation")
  47.  
  48. DestroyAllVisual_func   := DllCall("GetProcAddress", UInt, hModule, Str, "DestroyAllVisual")
  49. ShowAllVisual_func      := DllCall("GetProcAddress", UInt, hModule, Str, "ShowAllVisual")
  50. HideAllVisual_func      := DllCall("GetProcAddress", UInt, hModule, Str, "HideAllVisual")
  51.  
  52. GetFrameRate_func       := DllCall("GetProcAddress", UInt, hModule, Str, "GetFrameRate")
  53. GetScreenSpecs_func     := DllCall("GetProcAddress", UInt, hModule, Str, "GetScreenSpecs")
  54.  
  55. SetCalculationRatio_func:= DllCall("GetProcAddress", UInt, hModule, Str, "SetCalculationRatio")
  56.  
  57. SetOverlayPriority_func := DllCall("GetProcAddress", UInt, hModule, Str, "SetOverlayPriority")
  58.  
  59. Init()
  60. {
  61.     global Init_func
  62.     res := DllCall(Init_func)
  63.     return res
  64. }
  65.  
  66. SetParam(str_Name, str_Value)
  67. {
  68.     global SetParam_func
  69.     res := DllCall(SetParam_func, Str, str_Name, Str, str_Value)
  70.     return res
  71. }
  72.  
  73. TextCreate(Font, fontsize, bold, italic, x, y, color, text, shadow, show)
  74. {
  75.     global TextCreate_func
  76.     res := DllCall(TextCreate_func,Str,Font,Int,fontsize,UChar,bold,UChar,italic,Int,x,Int,y,UInt,color,Str,text,UChar,shadow,UChar,show)
  77.     return res
  78. }
  79.  
  80. TextDestroy(id)
  81. {
  82.     global TextDestroy_func
  83.     res := DllCall(TextDestroy_func,Int,id)
  84.     return res
  85. }
  86.  
  87. TextSetShadow(id, shadow)
  88. {
  89.     global TextSetShadow_func
  90.     res := DllCall(TextSetShadow_func,Int,id,UChar,shadow)
  91.     return res
  92. }
  93.  
  94. TextSetShown(id, show)
  95. {
  96.     global TextSetShown_func
  97.     res := DllCall(TextSetShown_func,Int,id,UChar,show)
  98.     return res
  99. }
  100.  
  101. TextSetColor(id,color)
  102. {
  103.     global TextSetColor_func
  104.     res := DllCall(TextSetColor_func,Int,id,UInt,color)
  105.     return res
  106. }
  107.  
  108. TextSetPos(id,x,y)
  109. {
  110.     global TextSetPos_func
  111.     res := DllCall(TextSetPos_func,Int,id,Int,x,Int,y)
  112.     return res
  113. }
  114.  
  115. TextSetString(id,Text)
  116. {
  117.     global TextSetString_func
  118.     res := DllCall(TextSetString_func,Int,id,Str,Text)
  119.     return res
  120. }
  121.  
  122. TextUpdate(id,Font,Fontsize,bold,italic)
  123. {
  124.     global TextUpdate_func
  125.     res := DllCall(TextUpdate_func,Int,id,Str,Font,int,Fontsize,UChar,bold,UChar,italic)
  126.     return res
  127. }
  128.  
  129. BoxCreate(x,y,width,height,Color,show)
  130. {
  131.     global BoxCreate_func
  132.     res := DllCall(BoxCreate_func,Int,x,Int,y,Int,width,Int,height,UInt,Color,UChar,show)
  133.     return res
  134. }
  135.  
  136. BoxDestroy(id)
  137. {
  138.     global BoxDestroy_func
  139.     res := DllCall(BoxDestroy_func,Int,id)
  140.     return res
  141. }
  142.  
  143. BoxSetShown(id,Show)
  144. {
  145.     global BoxSetShown_func
  146.     res := DllCall(BoxSetShown_func,Int,id,UChar,Show)
  147.     return res
  148. }
  149.    
  150. BoxSetBorder(id,height,Show)
  151. {
  152.     global BoxSetBorder_func
  153.     res := DllCall(BoxSetBorder_func,Int,id,Int,height,Int,Show)
  154.     return res
  155. }
  156.  
  157.  
  158. BoxSetBorderColor(id,Color)
  159. {
  160.     global BoxSetBorderColor_func
  161.     res := DllCall(BoxSetBorderColor_func,Int,id,UInt,Color)
  162.     return res
  163. }
  164.  
  165. BoxSetColor(id,Color)
  166. {
  167.     global BoxSetColor_func
  168.     res := DllCall(BoxSetColor_func,Int,id,UInt,Color)
  169.     return res
  170. }
  171.  
  172. BoxSetHeight(id,height)
  173. {
  174.     global BoxSetHeight_func
  175.     res := DllCall(BoxSetHeight_func,Int,id,Int,height)
  176.     return res
  177. }
  178.  
  179. BoxSetPos(id,x,y)
  180. {
  181.     global BoxSetPos_func  
  182.     res := DllCall(BoxSetPos_func,Int,id,Int,x,Int,y)
  183.     return res
  184. }
  185.  
  186. BoxSetWidth(id,width)
  187. {
  188.     global BoxSetWidth_func
  189.     res := DllCall(BoxSetWidth_func,Int,id,Int,width)
  190.     return res
  191. }
  192.  
  193. LineCreate(x1,y1,x2,y2,width,color,show)
  194. {
  195.     global LineCreate_func
  196.     res := DllCall(LineCreate_func,Int,x1,Int,y1,Int,x2,Int,y2,Int,Width,UInt,color,UChar,show)
  197.     return res
  198. }
  199.  
  200. LineDestroy(id)
  201. {
  202.     global LineDestroy_func
  203.     res := DllCall(LineDestroy_func,Int,id)
  204.     return res
  205. }
  206.  
  207. LineSetShown(id,show)
  208. {
  209.     global LineSetShown_func
  210.     res := DllCall(LineSetShown_func,Int,id,UChar,show)
  211.     return res
  212. }
  213.  
  214. LineSetColor(id,color)
  215. {
  216.     global LineSetColor_func
  217.     res := DllCall(LineSetColor_func,Int,id,UInt,color)
  218.     return res
  219. }
  220.  
  221. LineSetWidth(id, width)
  222. {
  223.     global LineSetWidth_func
  224.     res := DllCall(LineSetWidth_func,Int,id,Int,width)
  225.     return res
  226. }
  227.  
  228. LineSetPos(id,x1,y1,x2,y2)
  229. {
  230.     global LineSetPos_func
  231.     res := DllCall(LineSetPos_func,Int,id,Int,x1,Int,y1,Int,x2,Int,y2)
  232.     return res
  233. }
  234.  
  235. ImageCreate(path, x, y, rotation, align, show)
  236. {
  237.     global ImageCreate_func
  238.     res := DllCall(ImageCreate_func, Str, path, Int, x, Int, y, Int, rotation, Int, align, UChar, show)
  239.     return res
  240. }
  241.  
  242. ImageDestroy(id)
  243. {
  244.     global ImageDestroy_func
  245.     res := DllCall(ImageDestroy_func,Int,id)
  246.     return res
  247. }
  248.  
  249. ImageSetShown(id,show)
  250. {
  251.     global ImageSetShown_func
  252.     res := DllCall(ImageSetShown_func,Int,id,UChar,show)
  253.     return res
  254. }
  255.  
  256. ImageSetAlign(id,align)
  257. {
  258.     global ImageSetAlign_func
  259.     res := DllCall(ImageSetAlign_func,Int,id,Int,align)
  260.     return res
  261. }
  262.  
  263. ImageSetPos(id, x, y)
  264. {
  265.     global ImageSetPos_func
  266.     res := DllCall(ImageSetPos_func,Int,id,Int,x, Int, y)
  267.     return res
  268. }
  269.  
  270. ImageSetRotation(id, rotation)
  271. {
  272.     global ImageSetRotation_func
  273.     res := DllCall(ImageSetRotation_func,Int,id,Int, rotation)
  274.     return res
  275. }
  276.  
  277. DestroyAllVisual()
  278. {
  279.     global DestroyAllVisual_func
  280.     res := DllCall(DestroyAllVisual_func)
  281.     return res
  282. }
  283.  
  284. ShowAllVisual()
  285. {
  286.     global ShowAllVisual_func
  287.     res := DllCall(ShowAllVisual_func)
  288.     return res
  289. }
  290.  
  291. HideAllVisual()
  292. {
  293.     global HideAllVisual_func
  294.     res := DllCall(HideAllVisual_func )
  295.     return res
  296. }
  297.  
  298. GetFrameRate()
  299. {
  300.     global GetFrameRate_func
  301.     res := DllCall(GetFrameRate_func )
  302.     return res
  303. }
  304.  
  305. GetScreenSpecs(ByRef width, ByRef height)
  306. {
  307.     global GetScreenSpecs_func
  308.     res := DllCall(GetScreenSpecs_func, IntP, width, IntP, height)
  309.     return res
  310. }
  311.  
  312. SetCalculationRatio(width, height)
  313. {
  314.     global SetCalculationRatio_func
  315.     res := DllCall(SetCalculationRatio_func, Int, width, Int, height)
  316.     return res
  317. }
  318.  
  319. SetOverlayPriority(id, priority)
  320. {
  321.     global SetOverlayPriority_func
  322.     res := DllCall(SetOverlayPriority_func, Int, id, Int, priority)
  323.     return res
  324. }
  325.  
  326. RelToAbs(root, dir, s = "\") {
  327.     pr := SubStr(root, 1, len := InStr(root, s, "", InStr(root, s . s) + 2) - 1)
  328.         , root := SubStr(root, len + 1), sk := 0
  329.     If InStr(root, s, "", 0) = StrLen(root)
  330.         StringTrimRight, root, root, 1
  331.     If InStr(dir, s, "", 0) = StrLen(dir)
  332.         StringTrimRight, dir, dir, 1
  333.     Loop, Parse, dir, %s%
  334.     {
  335.         If A_LoopField = ..
  336.             StringLeft, root, root, InStr(root, s, "", 0) - 1
  337.         Else If A_LoopField =
  338.             root =
  339.         Else If A_LoopField != .
  340.             Continue
  341.         StringReplace, dir, dir, %A_LoopField%%s%
  342.     }
  343.     Return, pr . root . s . dir
  344. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement