//ALTERED
 public bool ClearAchievement(string name, bool state)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
     {
         return(this.Call <bool, NativeClearAchievement>(this.Functions.ClearAchievement, this.ObjectAddress, name));
     }
 }
Ejemplo n.º 2
0
 public bool GetStatValue(string name, out float value)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
     {
         var call = this.GetFunction <NativeGetStatFloat>(this.Functions.GetStatFloat);
         return(call(this.ObjectAddress, nativeName.Handle, out value));
     }
 }
Ejemplo n.º 3
0
 public bool GetAchievementAchievedPercent(string name, out float percent)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
     {
         var call = this.GetFunction <NativeGetAchievementAchievedPercent>(this.Functions.GetAchievementAchievedPercent);
         return(call(this.ObjectAddress, nativeName.Handle, out percent));
     }
 }
Ejemplo n.º 4
0
 public bool GetAchievementAndUnlockTime(string name, out bool isAchieved, out int unlockTime)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
     {
         var call = this.GetFunction <NativeGetAchievementAndUnlockTime>(this.Functions.GetAchievementAndUnlockTime);
         return(call(this.ObjectAddress, nativeName.Handle, out isAchieved, out unlockTime));
     }
 }
        public string GetCurrentGameLanguage()
        {
            var languagePointer = this.Call <IntPtr, NativeGetCurrentGameLanguage>(
                this.Functions.GetCurrentGameLanguage,
                this.ObjectAddress);

            return(NativeStrings.PointerToString(languagePointer));
        }
Ejemplo n.º 6
0
        public string GetAvailableGameLanguages()
        {
            var languagePointer = this.Call <IntPtr, NativeGetAvailableGameLanguages>(
                this.Functions.GetAvailableGameLanguages,
                this.ObjectAddress);

            return(NativeStrings.PointerToString(languagePointer));
        }
Ejemplo n.º 7
0
 public int GetAchievementIcon(string name)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
     {
         return(this.Call <int, NativeGetAchievementIcon>(
                    this.Functions.GetAchievementIcon,
                    this.ObjectAddress,
                    nativeName.Handle));
     }
 }
Ejemplo n.º 8
0
 public bool SetStatValue(string name, int value)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
     {
         return(this.Call <bool, NativeSetStatInt>(
                    this.Functions.SetStatInteger,
                    this.ObjectAddress,
                    nativeName.Handle,
                    value));
     }
 }
 public bool ResetFloatStatValue(string name)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
     {
         return(this.Call <bool, NativeSetStatFloat>(
                    this.Functions.SetStatFloat,
                    this.ObjectAddress,
                    nativeName.Handle,
                    0f));
     }
 }
Ejemplo n.º 10
0
 public string GetAchievementDisplayAttribute(string name, string key)
 {
     using (var nativeName = NativeStrings.StringToStringHandle(name))
         using (var nativeKey = NativeStrings.StringToStringHandle(key))
         {
             var result = this.Call <IntPtr, NativeGetAchievementDisplayAttribute>(
                 this.Functions.GetAchievementDisplayAttribute,
                 this.ObjectAddress,
                 nativeName.Handle,
                 nativeKey.Handle);
             return(NativeStrings.PointerToString(result));
         }
 }
 private TClass GetISteamApps <TClass>(int user, int pipe, string version)
     where TClass : INativeWrapper, new()
 {
     using (var nativeVersion = NativeStrings.StringToStringHandle(version))
     {
         IntPtr address = this.Call <IntPtr, NativeGetISteamApps>(
             this.Functions.GetISteamApps,
             user,
             pipe,
             nativeVersion.Handle);
         var result = new TClass();
         result.SetupFunctions(address);
         return(result);
     }
 }
 public string GetAppData(uint appId, string key)
 {
     using (var nativeHandle = NativeStrings.StringToStringHandle(key))
     {
         const int valueLength  = 1024;
         var       valuePointer = Marshal.AllocHGlobal(valueLength);
         int       result       = this.Call <int, NativeGetAppData>(
             this.Functions.GetAppData,
             this.ObjectAddress,
             appId,
             nativeHandle.Handle,
             valuePointer,
             valueLength);
         var value = result == 0 ? null : NativeStrings.PointerToString(valuePointer, valueLength);
         Marshal.FreeHGlobal(valuePointer);
         return(value);
     }
 }
        public string GetIPCountry()
        {
            var result = this.Call <IntPtr, NativeGetIPCountry>(this.Functions.GetIPCountry, this.ObjectAddress);

            return(NativeStrings.PointerToString(result));
        }
Ejemplo n.º 14
0
/* ------------------------------------------------------------ */
//   PROCEDURE TypeName(typ : NativeType) : CharOpen
//  (* Get the name of the argument type *)
//
    public static char[] TypeName(System.Type t)
    {
        return(NativeStrings.mkArr(t.FullName));
    }