Add license header to all files and update to latest version.

This commit is contained in:
Michael Dirks
2015-06-06 18:46:10 +02:00
parent 355aae6a6f
commit 7418113032
13 changed files with 462 additions and 262 deletions
+6 -2
View File
@@ -151,11 +151,15 @@
<ClInclude Include="Libraries\BlitzPointer.h" /> <ClInclude Include="Libraries\BlitzPointer.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="BlitzSteam.bb"> <None Include="Blitz\BlitzSteam.bb">
<Link>BlitzSteam.bb</Link> <Link>BlitzSteam.bb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="BlitzSteam.decls"> <None Include="Blitz\BlitzSteamUtility.bb">
<Link>BlitzSteamUtility.bb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Blitz\BlitzSteam.decls">
<Link>BlitzSteam.decls</Link> <Link>BlitzSteam.decls</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
+14 -5
View File
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Blitz Files">
<UniqueIdentifier>{3072c53c-2be5-4712-b853-1bc1438cdc6e}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files"> <Filter Include="Source Files">
<UniqueIdentifier>{5016ba8f-d781-40f4-9904-56cc2ce9a588}</UniqueIdentifier> <UniqueIdentifier>{5016ba8f-d781-40f4-9904-56cc2ce9a588}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
@@ -14,6 +11,12 @@
<Filter Include="Source Files\Libraries"> <Filter Include="Source Files\Libraries">
<UniqueIdentifier>{1b813d7f-3558-4f10-b237-1bcf7d5f0b60}</UniqueIdentifier> <UniqueIdentifier>{1b813d7f-3558-4f10-b237-1bcf7d5f0b60}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="SteamworksSDK">
<UniqueIdentifier>{14616756-e67f-4b1c-ac90-776c00a0271d}</UniqueIdentifier>
</Filter>
<Filter Include="Blitz Files">
<UniqueIdentifier>{3072c53c-2be5-4712-b853-1bc1438cdc6e}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
@@ -53,10 +56,16 @@
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="BlitzSteam.bb"> <None Include="SteamworksSDK\redistributable_bin\steam_api.dll">
<Filter>SteamworksSDK</Filter>
</None>
<None Include="Blitz\BlitzSteam.bb">
<Filter>Blitz Files</Filter> <Filter>Blitz Files</Filter>
</None> </None>
<None Include="BlitzSteam.decls"> <None Include="Blitz\BlitzSteam.decls">
<Filter>Blitz Files</Filter>
</None>
<None Include="Blitz\BlitzSteamUtility.bb">
<Filter>Blitz Files</Filter> <Filter>Blitz Files</Filter>
</None> </None>
</ItemGroup> </ItemGroup>
+31 -4
View File
@@ -1,5 +1,22 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
#include "Libraries/BlitzPointer.h" #include "Libraries/BlitzPointer.h"
#include <time.h>
// Callbacks // Callbacks
class BlitzSteamCallback : CCallbackBase { class BlitzSteamCallback : CCallbackBase {
@@ -19,17 +36,27 @@ class BlitzSteamCallback : CCallbackBase {
} }
}; };
DLL_EXPORT void* BlitzSteam_CreateCallback(uint32_t fpFunctionPointer) { DLL_EXPORT void* BlitzSteamHelper_CreateCallback(uint32_t fpFunctionPointer) {
BlitzSteamCallback* lpBSCallback = new BlitzSteamCallback(); BlitzSteamCallback* lpBSCallback = new BlitzSteamCallback();
lpBSCallback->blitzFunctionPointer = fpFunctionPointer; lpBSCallback->blitzFunctionPointer = fpFunctionPointer;
return lpBSCallback; return lpBSCallback;
} }
#pragma comment(linker, "/EXPORT:BlitzSteam_CreateCallback=_BlitzSteam_CreateCallback@4") #pragma comment(linker, "/EXPORT:BlitzSteamHelper_CreateCallback=_BlitzSteamHelper_CreateCallback@4")
DLL_EXPORT void BlitzSteam_DestroyCallback(uint32_t lpCallback) { DLL_EXPORT void BlitzSteamHelper_DestroyCallback(uint32_t lpCallback) {
BlitzSteamCallback* lpBSCallback = (BlitzSteamCallback*)lpCallback; BlitzSteamCallback* lpBSCallback = (BlitzSteamCallback*)lpCallback;
if (lpBSCallback != nullptr) { if (lpBSCallback != nullptr) {
delete lpBSCallback; delete lpBSCallback;
} }
} }
#pragma comment(linker, "/EXPORT:BlitzSteam_DestroyCallback=_BlitzSteam_DestroyCallback@4") #pragma comment(linker, "/EXPORT:BlitzSteamHelper_DestroyCallback=_BlitzSteamHelper_DestroyCallback@4")
DLL_EXPORT const char* BlitzSteamHelper_FormatUnixTime(uint32_t unTime, const char* pchFormat) {
char* output = new char[strlen(pchFormat) * 4];
time_t t = unTime;
struct tm *tm = localtime(&t);
strftime(output, sizeof(output), pchFormat, tm);
delete tm;
return output;
}
#pragma comment(linker, "/EXPORT:BlitzSteamHelper_FormatUnixTime=_BlitzSteamHelper_FormatUnixTime@8")
+16
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once #pragma once
#include "BlitzPointer.h" #include "BlitzPointer.h"
+16
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
typedef uint32_t(__cdecl *BlitzPointer_CallFunction0_t)(uint32_t); typedef uint32_t(__cdecl *BlitzPointer_CallFunction0_t)(uint32_t);
+42 -26
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
DLL_EXPORT uint32_t BlitzSteam_Init() { DLL_EXPORT uint32_t BlitzSteam_Init() {
@@ -30,32 +46,6 @@ DLL_EXPORT void BlitzSteam_WriteMiniDump(uint32_t uStructuredExceptionCode, void
} }
#pragma comment(linker, "/EXPORT:BlitzSteam_WriteMiniDump=_BlitzSteam_WriteMiniDump@12") #pragma comment(linker, "/EXPORT:BlitzSteam_WriteMiniDump=_BlitzSteam_WriteMiniDump@12")
// Callbacks & Hooks
DLL_EXPORT void BlitzSteam_RunCallbacks() {
SteamAPI_RunCallbacks();
}
#pragma comment(linker, "/EXPORT:BlitzSteam_RunCallbacks=_BlitzSteam_RunCallbacks@0")
DLL_EXPORT void BlitzSteam_RegisterCallback(class CCallbackBase *pCallback, int iCallback) {
SteamAPI_RegisterCallback(pCallback, iCallback);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_RegisterCallback=_BlitzSteam_RegisterCallback@8")
DLL_EXPORT void BlitzSteam_UnregisterCallback(class CCallbackBase *pCallback) {
SteamAPI_UnregisterCallback(pCallback);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_UnregisterCallback=_BlitzSteam_UnregisterCallback@4")
DLL_EXPORT void BlitzSteam_RegisterCallResult(class CCallbackBase *pCallback, uint32_t hAPICall_L, uint32_t hAPICall_R) {
SteamAPI_RegisterCallResult(pCallback, ((uint64_t)hAPICall_L << 32) + (uint64_t)hAPICall_R);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_RegisterCallResult=_BlitzSteam_RegisterCallResult@12")
DLL_EXPORT void BlitzSteam_UnregisterCallResult(class CCallbackBase *pCallback, uint32_t hAPICall_L, uint32_t hAPICall_R) {
SteamAPI_UnregisterCallResult(pCallback, ((uint64_t)hAPICall_L << 32) + (uint64_t)hAPICall_R);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_UnregisterCallResult=_BlitzSteam_UnregisterCallResult@12")
// Interface Pointers, configured by SteamAPI_Init(). // Interface Pointers, configured by SteamAPI_Init().
DLL_EXPORT ISteamClient* BlitzSteamClient() { DLL_EXPORT ISteamClient* BlitzSteamClient() {
return SteamClient(); return SteamClient();
@@ -161,3 +151,29 @@ DLL_EXPORT ISteamVideo* BlitzSteamVideo() {
return SteamVideo(); return SteamVideo();
} }
#pragma comment(linker, "/EXPORT:BlitzSteamVideo=_BlitzSteamVideo@0") #pragma comment(linker, "/EXPORT:BlitzSteamVideo=_BlitzSteamVideo@0")
// Callbacks & Hooks
DLL_EXPORT void BlitzSteam_RunCallbacks() {
SteamAPI_RunCallbacks();
}
#pragma comment(linker, "/EXPORT:BlitzSteam_RunCallbacks=_BlitzSteam_RunCallbacks@0")
DLL_EXPORT void BlitzSteam_RegisterCallback(class CCallbackBase *pCallback, int iCallback) {
SteamAPI_RegisterCallback(pCallback, iCallback);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_RegisterCallback=_BlitzSteam_RegisterCallback@8")
DLL_EXPORT void BlitzSteam_UnregisterCallback(class CCallbackBase *pCallback) {
SteamAPI_UnregisterCallback(pCallback);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_UnregisterCallback=_BlitzSteam_UnregisterCallback@4")
DLL_EXPORT void BlitzSteam_RegisterCallResult(class CCallbackBase *pCallback, uint32_t hAPICall_L, uint32_t hAPICall_R) {
SteamAPI_RegisterCallResult(pCallback, ((uint64_t)hAPICall_L << 32) + (uint64_t)hAPICall_R);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_RegisterCallResult=_BlitzSteam_RegisterCallResult@12")
DLL_EXPORT void BlitzSteam_UnregisterCallResult(class CCallbackBase *pCallback, uint32_t hAPICall_L, uint32_t hAPICall_R) {
SteamAPI_UnregisterCallResult(pCallback, ((uint64_t)hAPICall_L << 32) + (uint64_t)hAPICall_R);
}
#pragma comment(linker, "/EXPORT:BlitzSteam_UnregisterCallResult=_BlitzSteam_UnregisterCallResult@12")
+17 -1
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
DLL_EXPORT uint32_t BlitzSteamAppList_GetNumInstalledApps(ISteamAppList* lpSteamAppList) { DLL_EXPORT uint32_t BlitzSteamAppList_GetNumInstalledApps(ISteamAppList* lpSteamAppList) {
@@ -18,7 +34,7 @@ DLL_EXPORT uint32_t BlitzSteamAppList_GetAppName(ISteamAppList* lpSteamAppList,
DLL_EXPORT uint32_t BlitzSteamAppList_GetAppInstallDir(ISteamAppList* lpSteamAppList, AppId_t nAppID, char* pchDirectory, uint32_t cchDirectoryMax) { DLL_EXPORT uint32_t BlitzSteamAppList_GetAppInstallDir(ISteamAppList* lpSteamAppList, AppId_t nAppID, char* pchDirectory, uint32_t cchDirectoryMax) {
return lpSteamAppList->GetAppInstallDir(nAppID, pchDirectory, cchDirectoryMax); return lpSteamAppList->GetAppInstallDir(nAppID, pchDirectory, cchDirectoryMax);
} }
#pragma comment(linker, "/EXPORT:BlitzSteamAppList_GetAppName=_BlitzSteamAppList_GetAppName@16") #pragma comment(linker, "/EXPORT:BlitzSteamAppList_GetAppInstallDir=_BlitzSteamAppList_GetAppInstallDir@16")
DLL_EXPORT uint32_t BlitzSteamAppList_GetAppBuildId(ISteamAppList* lpSteamAppList, AppId_t nAppID) { DLL_EXPORT uint32_t BlitzSteamAppList_GetAppBuildId(ISteamAppList* lpSteamAppList, AppId_t nAppID) {
return lpSteamAppList->GetAppBuildId(nAppID); return lpSteamAppList->GetAppBuildId(nAppID);
+16
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
DLL_EXPORT uint32_t BlitzSteamApps_IsSubscribed(ISteamApps* lpSteamApps) { DLL_EXPORT uint32_t BlitzSteamApps_IsSubscribed(ISteamApps* lpSteamApps) {
+16
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
DLL_EXPORT HSteamPipe BlitzSteamClient_CreateSteamPipe(ISteamClient* lpSteamClient) { DLL_EXPORT HSteamPipe BlitzSteamClient_CreateSteamPipe(ISteamClient* lpSteamClient) {
+16
View File
@@ -1,2 +1,18 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
+16
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
DLL_EXPORT void* BlitzSteam_ISteamUser_GetSteamID(void* lpSteamUser) { DLL_EXPORT void* BlitzSteam_ISteamUser_GetSteamID(void* lpSteamUser) {
+16
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dllmain.h" #include "dllmain.h"
#include "Libraries\BlitzPointer.h" #include "Libraries\BlitzPointer.h"
+16
View File
@@ -1,3 +1,19 @@
// BlitzSteam - Steam wrapper for Blitz.
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// STL Exceptions // STL Exceptions
#include <exception> #include <exception>
#include <stdexcept> #include <stdexcept>