Add SQLite again (still heavy WIP)
This commit is contained in:
+54
-29
@@ -1,5 +1,5 @@
|
||||
// Blitz - Steam wrapper for Blitz.
|
||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
||||
// Copyright (C) 2015 Xaymar (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
|
||||
@@ -17,43 +17,68 @@
|
||||
#include "Double.h"
|
||||
#include <list>
|
||||
|
||||
// Templates
|
||||
template< typename T >
|
||||
std::string int_to_hex(T i) {
|
||||
std::stringstream stream;
|
||||
stream
|
||||
<< std::setfill('0')
|
||||
<< std::setw(sizeof(T) * 2)
|
||||
<< std::hex
|
||||
<< i;
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
T hex_to_int(std::string t) {
|
||||
T x;
|
||||
std::stringstream stream;
|
||||
stream
|
||||
<< std::hex
|
||||
<< t;
|
||||
stream
|
||||
>> x;
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
std::list<double_t*> BU_DoubleTemporary;
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_Create() {
|
||||
DLL_FUNCTION(double_t*) BU_Double_Create() {
|
||||
return new double_t;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_Destroy(double_t* pthis) {
|
||||
DLL_FUNCTION(void) BU_Double_Destroy(double_t* pthis) {
|
||||
delete pthis;
|
||||
}
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_Copy(double_t* other) {
|
||||
DLL_FUNCTION(double_t*) BU_Double_Copy(double_t* other) {
|
||||
double_t* pthis = new double_t;
|
||||
*pthis = *other;
|
||||
return pthis;
|
||||
}
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_TempCreate() {
|
||||
DLL_FUNCTION(double_t*) BU_Double_TempCreate() {
|
||||
double_t* val = new double_t;
|
||||
BU_DoubleTemporary.push_back(val);
|
||||
return val;
|
||||
}
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_TempCopy(double_t* other) {
|
||||
DLL_FUNCTION(double_t*) BU_Double_TempCopy(double_t* other) {
|
||||
double_t* val = new double_t(*other);
|
||||
BU_DoubleTemporary.push_back(val);
|
||||
return val;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_SetTemp(double_t* pthis) {
|
||||
DLL_FUNCTION(void) BU_Double_SetTemp(double_t* pthis) {
|
||||
BU_DoubleTemporary.push_back(pthis);
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_UnsetTemp(double_t* pthis) {
|
||||
DLL_FUNCTION(void) BU_Double_UnsetTemp(double_t* pthis) {
|
||||
BU_DoubleTemporary.remove(pthis);
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_TempCleanup() {
|
||||
DLL_FUNCTION(void) BU_Double_TempCleanup() {
|
||||
auto iterEnd = BU_DoubleTemporary.end();
|
||||
for (auto iter = BU_DoubleTemporary.begin(); iter != iterEnd; ++iter) {
|
||||
delete *iter;
|
||||
@@ -61,90 +86,90 @@ DLL_METHOD void DLL_CALL BU_Double_TempCleanup() {
|
||||
BU_DoubleTemporary.clear();
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_Set(double_t* pthis, double_t* other) {
|
||||
DLL_FUNCTION(void) BU_Double_Set(double_t* pthis, double_t* other) {
|
||||
*pthis = *other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_SetF(double_t* pthis, float_t other) {
|
||||
DLL_FUNCTION(void) BU_Double_SetF(double_t* pthis, float_t other) {
|
||||
*pthis = other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_Add(double_t* pthis, double_t* other) {
|
||||
DLL_FUNCTION(void) BU_Double_Add(double_t* pthis, double_t* other) {
|
||||
*pthis += *other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_AddF(double_t* pthis, float_t other) {
|
||||
DLL_FUNCTION(void) BU_Double_AddF(double_t* pthis, float_t other) {
|
||||
*pthis += other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_Sub(double_t* pthis, double_t* other) {
|
||||
DLL_FUNCTION(void) BU_Double_Sub(double_t* pthis, double_t* other) {
|
||||
*pthis -= *other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_SubF(double_t* pthis, float_t other) {
|
||||
DLL_FUNCTION(void) BU_Double_SubF(double_t* pthis, float_t other) {
|
||||
*pthis -= other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_Mul(double_t* pthis, double_t* other) {
|
||||
DLL_FUNCTION(void) BU_Double_Mul(double_t* pthis, double_t* other) {
|
||||
*pthis *= *other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_MulF(double_t* pthis, float_t other) {
|
||||
DLL_FUNCTION(void) BU_Double_MulF(double_t* pthis, float_t other) {
|
||||
*pthis *= other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_Div(double_t* pthis, double_t* other) {
|
||||
DLL_FUNCTION(void) BU_Double_Div(double_t* pthis, double_t* other) {
|
||||
*pthis /= *other;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_Double_DivF(double_t* pthis, float_t other) {
|
||||
DLL_FUNCTION(void) BU_Double_DivF(double_t* pthis, float_t other) {
|
||||
*pthis /= other;
|
||||
}
|
||||
|
||||
DLL_METHOD uint32_t DLL_CALL BU_Double_Compare(double_t* pthis, double_t* other) {
|
||||
DLL_FUNCTION(uint32_t) BU_Double_Compare(double_t* pthis, double_t* other) {
|
||||
return (*pthis == *other ? 1 : 0) + (*pthis < *other ? 2 : 0) + (*pthis > *other ? 4 : 0);
|
||||
}
|
||||
|
||||
DLL_METHOD uint32_t DLL_CALL BU_Double_CompareF(double_t* pthis, float_t other) {
|
||||
DLL_FUNCTION(uint32_t) BU_Double_CompareF(double_t* pthis, float_t other) {
|
||||
return ((float_t)*pthis == other ? 1 : 0) + ((float_t)*pthis < other ? 2 : 0) + ((float_t)*pthis > other ? 4 : 0);
|
||||
}
|
||||
|
||||
DLL_METHOD const char* DLL_CALL BU_Double_ToString(double_t* pthis) {
|
||||
DLL_FUNCTION(const char*) BU_Double_ToString(double_t* pthis) {
|
||||
std::stringstream stream;
|
||||
stream << *pthis;
|
||||
return stream.str().c_str();
|
||||
}
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_FromString(const char* text) {
|
||||
DLL_FUNCTION(double_t*) BU_Double_FromString(const char* text) {
|
||||
std::stringstream stream = std::stringstream(text);
|
||||
double_t* doublePtr = new double_t;
|
||||
stream >> *doublePtr;
|
||||
return doublePtr;
|
||||
}
|
||||
|
||||
DLL_METHOD float_t DLL_CALL BU_Double_ToFloat(double_t* pthis) {
|
||||
DLL_FUNCTION(float_t) BU_Double_ToFloat(double_t* pthis) {
|
||||
return (float_t)*pthis;
|
||||
}
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_FromFloat(float_t other) {
|
||||
DLL_FUNCTION(double_t*) BU_Double_FromFloat(float_t other) {
|
||||
double_t* val = new double_t;
|
||||
*val = (double_t)other;
|
||||
return val;
|
||||
}
|
||||
|
||||
DLL_METHOD int64_t* DLL_CALL BU_Double_ToLongLong(double_t* pthis) {
|
||||
DLL_FUNCTION(int64_t*) BU_Double_ToLongLong(double_t* pthis) {
|
||||
int64_t* val = new int64_t;
|
||||
*val = (int64_t)*pthis;
|
||||
return val;
|
||||
}
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_FromLongLong(int64_t* other) {
|
||||
DLL_FUNCTION(double_t*) BU_Double_FromLongLong(int64_t* other) {
|
||||
double_t* val = new double_t;
|
||||
*val = (double_t)*other;
|
||||
return val;
|
||||
}
|
||||
|
||||
DLL_METHOD const char* DLL_CALL BU_Double_Serialize(double_t* pthis) {
|
||||
DLL_FUNCTION(const char*) BU_Double_Serialize(double_t* pthis) {
|
||||
union {
|
||||
double_t real;
|
||||
int64_t integer;
|
||||
@@ -153,7 +178,7 @@ DLL_METHOD const char* DLL_CALL BU_Double_Serialize(double_t* pthis) {
|
||||
return int_to_hex<int64_t>(myval.integer).c_str();
|
||||
}
|
||||
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_Deserialize(const char* text) {
|
||||
DLL_FUNCTION(double_t*) BU_Double_Deserialize(const char* text) {
|
||||
union {
|
||||
double_t real;
|
||||
int64_t integer;
|
||||
|
||||
+31
-30
@@ -1,5 +1,5 @@
|
||||
// Blitz - Steam wrapper for Blitz.
|
||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
||||
// Copyright (C) 2015 Xaymar (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
|
||||
@@ -15,24 +15,25 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "dllmain.h"
|
||||
#include "BlitzUtility.h"
|
||||
#include "LongLong.h"
|
||||
#include <iomanip>
|
||||
|
||||
#pragma region Constructor & Destructor
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_Create();
|
||||
DLL_METHOD void DLL_CALL BU_Double_Destroy(double_t* pthis);
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_Copy(double_t* other);
|
||||
DLL_FUNCTION(double_t*) BU_Double_Create();
|
||||
DLL_FUNCTION(void) BU_Double_Destroy(double_t* pthis);
|
||||
DLL_FUNCTION(double_t*) BU_Double_Copy(double_t* other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Create=_BU_Double_Create@0")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Destroy=_BU_Double_Destroy@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Copy=_BU_Double_Copy@4")
|
||||
#pragma endregion Constructor & Destructor
|
||||
|
||||
#pragma region Temporary Objects
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_TempCreate();
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_TempCopy(double_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_Double_SetTemp(double_t* pthis);
|
||||
DLL_METHOD void DLL_CALL BU_Double_UnsetTemp(double_t* pthis);
|
||||
DLL_METHOD void DLL_CALL BU_Double_TempCleanup();
|
||||
DLL_FUNCTION(double_t*) BU_Double_TempCreate();
|
||||
DLL_FUNCTION(double_t*) BU_Double_TempCopy(double_t* other);
|
||||
DLL_FUNCTION(void) BU_Double_SetTemp(double_t* pthis);
|
||||
DLL_FUNCTION(void) BU_Double_UnsetTemp(double_t* pthis);
|
||||
DLL_FUNCTION(void) BU_Double_TempCleanup();
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_TempCreate=_BU_Double_TempCreate@0")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_TempCopy=_BU_Double_TempCopy@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_SetTemp=_BU_Double_SetTemp@4")
|
||||
@@ -41,56 +42,56 @@ DLL_METHOD void DLL_CALL BU_Double_TempCleanup();
|
||||
#pragma endregion Temporary Objects
|
||||
|
||||
#pragma region Math
|
||||
DLL_METHOD void DLL_CALL BU_Double_Set(double_t* pthis, double_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_Double_SetF(double_t* pthis, float_t other);
|
||||
DLL_FUNCTION(void) BU_Double_Set(double_t* pthis, double_t* other);
|
||||
DLL_FUNCTION(void) BU_Double_SetF(double_t* pthis, float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Set=_BU_Double_Set@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_SetF=_BU_Double_SetF@8")
|
||||
DLL_METHOD void DLL_CALL BU_Double_Add(double_t* pthis, double_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_Double_AddF(double_t* pthis, float_t other);
|
||||
DLL_FUNCTION(void) BU_Double_Add(double_t* pthis, double_t* other);
|
||||
DLL_FUNCTION(void) BU_Double_AddF(double_t* pthis, float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Add=_BU_Double_Add@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_AddF=_BU_Double_AddF@8")
|
||||
DLL_METHOD void DLL_CALL BU_Double_Sub(double_t* pthis, double_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_Double_SubF(double_t* pthis, float_t other);
|
||||
DLL_FUNCTION(void) BU_Double_Sub(double_t* pthis, double_t* other);
|
||||
DLL_FUNCTION(void) BU_Double_SubF(double_t* pthis, float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Sub=_BU_Double_Sub@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_SubF=_BU_Double_SubF@8")
|
||||
DLL_METHOD void DLL_CALL BU_Double_Mul(double_t* pthis, double_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_Double_MulF(double_t* pthis, float_t other);
|
||||
DLL_FUNCTION(void) BU_Double_Mul(double_t* pthis, double_t* other);
|
||||
DLL_FUNCTION(void) BU_Double_MulF(double_t* pthis, float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Mul=_BU_Double_Mul@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_MulF=_BU_Double_MulF@8")
|
||||
DLL_METHOD void DLL_CALL BU_Double_Div(double_t* pthis, double_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_Double_DivF(double_t* pthis, float_t other);
|
||||
DLL_FUNCTION(void) BU_Double_Div(double_t* pthis, double_t* other);
|
||||
DLL_FUNCTION(void) BU_Double_DivF(double_t* pthis, float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Div=_BU_Double_Div@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_DivF=_BU_Double_DivF@8")
|
||||
#pragma endregion Math
|
||||
|
||||
#pragma region Comparision
|
||||
DLL_METHOD uint32_t DLL_CALL BU_Double_Compare(double_t* pthis, double_t* other);
|
||||
DLL_METHOD uint32_t DLL_CALL BU_Double_CompareF(double_t* pthis, float_t other);
|
||||
DLL_FUNCTION(uint32_t) BU_Double_Compare(double_t* pthis, double_t* other);
|
||||
DLL_FUNCTION(uint32_t) BU_Double_CompareF(double_t* pthis, float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Compare=_BU_Double_Compare@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_CompareF=_BU_Double_CompareF@8")
|
||||
#pragma endregion Comparision
|
||||
|
||||
#pragma region Conversion
|
||||
// String conversion
|
||||
DLL_METHOD const char* DLL_CALL BU_Double_ToString(double_t* pthis);
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_FromString(const char* text);
|
||||
DLL_FUNCTION(const char*) BU_Double_ToString(double_t* pthis);
|
||||
DLL_FUNCTION(double_t*) BU_Double_FromString(const char* text);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_ToString=_BU_Double_ToString@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_FromString=_BU_Double_FromString@4")
|
||||
// 32-Bit Floating Point
|
||||
DLL_METHOD float_t DLL_CALL BU_Double_ToFloat(double_t* pthis);
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_FromFloat(float_t other);
|
||||
DLL_FUNCTION(float_t) BU_Double_ToFloat(double_t* pthis);
|
||||
DLL_FUNCTION(double_t*) BU_Double_FromFloat(float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_ToFloat=_BU_Double_ToFloat@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_FromFloat=_BU_Double_FromFloat@4")
|
||||
// 64-Bit Integer
|
||||
DLL_METHOD int64_t* DLL_CALL BU_Double_ToLongLong(double_t* pthis);
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_FromLongLong(int64_t* other);
|
||||
DLL_FUNCTION(int64_t*) BU_Double_ToLongLong(double_t* pthis);
|
||||
DLL_FUNCTION(double_t*) BU_Double_FromLongLong(int64_t* other);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_ToLongLong=_BU_Double_ToLongLong@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_FromLongLong=_BU_Double_FromLongLong@4")
|
||||
#pragma endregion Conversion
|
||||
|
||||
#pragma region Serialization
|
||||
DLL_METHOD const char* DLL_CALL BU_Double_Serialize(double_t* pthis);
|
||||
DLL_METHOD double_t* DLL_CALL BU_Double_Deserialize(const char* text);
|
||||
DLL_FUNCTION(const char*) BU_Double_Serialize(double_t* pthis);
|
||||
DLL_FUNCTION(double_t*) BU_Double_Deserialize(const char* text);
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Serialize=_BU_Double_Serialize@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_Double_Deserialize=_BU_Double_Deserialize@4")
|
||||
#pragma endregion Serialization
|
||||
+125
-43
@@ -1,5 +1,5 @@
|
||||
// Blitz - Steam wrapper for Blitz.
|
||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
||||
// Copyright (C) 2015 Xaymar (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
|
||||
@@ -18,43 +18,75 @@
|
||||
#include "LongLong.h"
|
||||
#include <list>
|
||||
|
||||
// Templates
|
||||
template< typename T >
|
||||
std::string int_to_hex(T i) {
|
||||
std::stringstream stream;
|
||||
stream
|
||||
<< std::setfill('0')
|
||||
<< std::setw(sizeof(T) * 2)
|
||||
<< std::hex
|
||||
<< i;
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
T hex_to_int(std::string t) {
|
||||
T x;
|
||||
std::stringstream stream;
|
||||
stream
|
||||
<< std::hex
|
||||
<< t;
|
||||
stream
|
||||
>> x;
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
std::list<int64_t*> blitzLLTemporary;
|
||||
|
||||
int64_t* DLL_CALL BU_LongLong_Create() {
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_Create() {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Create=_BU_LongLong_Create@0")
|
||||
return new int64_t;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_Destroy(int64_t* pthis) {
|
||||
DLL_FUNCTION(void) BU_LongLong_Destroy(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Destroy=_BU_LongLong_Destroy@4")
|
||||
delete pthis;
|
||||
}
|
||||
|
||||
int64_t* DLL_CALL BU_LongLong_Copy(int64_t* other) {
|
||||
int64_t* pthis = new int64_t;
|
||||
*pthis = *other;
|
||||
return pthis;
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_Copy(int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Copy=_BU_LongLong_Copy@4")
|
||||
return new int64_t(*other);
|
||||
}
|
||||
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_TempCreate() {
|
||||
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCreate() {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCreate=_BU_LongLong_TempCreate@0")
|
||||
int64_t* val = new int64_t;
|
||||
blitzLLTemporary.push_back(val);
|
||||
return val;
|
||||
}
|
||||
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_TempCopy(int64_t* other) {
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCopy(int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCopy=_BU_LongLong_TempCopy@4")
|
||||
int64_t* val = new int64_t(*other);
|
||||
blitzLLTemporary.push_back(val);
|
||||
return val;
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_SetTemp(int64_t* pthis) {
|
||||
DLL_FUNCTION(void) BU_LongLong_SetTemp(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SetTemp=_BU_LongLong_SetTemp@4")
|
||||
blitzLLTemporary.push_back(pthis);
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_UnsetTemp(int64_t* pthis) {
|
||||
DLL_FUNCTION(void) BU_LongLong_UnsetTemp(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_UnsetTemp=_BU_LongLong_UnsetTemp@4")
|
||||
blitzLLTemporary.remove(pthis);
|
||||
}
|
||||
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_TempCleanup() {
|
||||
DLL_FUNCTION(void) BU_LongLong_TempCleanup() {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCleanup=_BU_LongLong_TempCleanup@0")
|
||||
auto iterEnd = blitzLLTemporary.end();
|
||||
for (auto iter = blitzLLTemporary.begin(); iter != iterEnd; ++iter) {
|
||||
delete *iter;
|
||||
@@ -62,113 +94,163 @@ DLL_METHOD void DLL_CALL BU_LongLong_TempCleanup() {
|
||||
blitzLLTemporary.clear();
|
||||
}
|
||||
|
||||
|
||||
void DLL_CALL BU_LongLong_Set(int64_t* pthis, int64_t* other) {
|
||||
DLL_FUNCTION(void) BU_LongLong_Set(int64_t* pthis, int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Set=_BU_LongLong_Set@8")
|
||||
*pthis = *other;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_SetV(int64_t* pthis, uint32_t left, uint32_t right) {
|
||||
DLL_FUNCTION(void) BU_LongLong_SetV(int64_t* pthis, int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SetV=_BU_LongLong_SetV@12")
|
||||
*pthis = ((int64_t)left << 32) + right;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_Add(int64_t* pthis, int64_t* other) {
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Add(int64_t* pthis, int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Add=_BU_LongLong_Add@8")
|
||||
*pthis += *other;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_AddV(int64_t* pthis, uint32_t left, uint32_t right) {
|
||||
DLL_FUNCTION(void) BU_LongLong_AddV(int64_t* pthis, int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_AddV=_BU_LongLong_AddV@12")
|
||||
*pthis += ((int64_t)left << 32) + right;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_Sub(int64_t* pthis, int64_t* other) {
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Sub(int64_t* pthis, int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Sub=_BU_LongLong_Sub@8")
|
||||
*pthis -= *other;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_SubV(int64_t* pthis, uint32_t left, uint32_t right) {
|
||||
DLL_FUNCTION(void) BU_LongLong_SubV(int64_t* pthis, int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SubV=_BU_LongLong_SubV@12")
|
||||
*pthis -= ((int64_t)left << 32) + right;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_Mul(int64_t* pthis, int64_t* other) {
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Mul(int64_t* pthis, int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Mul=_BU_LongLong_Mul@8")
|
||||
*pthis *= *other;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_MulV(int64_t* pthis, uint32_t left, uint32_t right) {
|
||||
DLL_FUNCTION(void) BU_LongLong_MulV(int64_t* pthis, int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_MulV=_BU_LongLong_MulV@12")
|
||||
*pthis *= ((int64_t)left << 32) + right;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_Div(int64_t* pthis, int64_t* other) {
|
||||
*pthis *= *other;
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Div(int64_t* pthis, int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Div=_BU_LongLong_Div@8")
|
||||
*pthis /= *other;
|
||||
}
|
||||
|
||||
void DLL_CALL BU_LongLong_DivV(int64_t* pthis, uint32_t left, uint32_t right) {
|
||||
*pthis *= ((int64_t)left << 32) + right;
|
||||
DLL_FUNCTION(void) BU_LongLong_DivV(int64_t* pthis, int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_DivV=_BU_LongLong_DivV@12")
|
||||
*pthis /= ((int64_t)left << 32) + right;
|
||||
}
|
||||
|
||||
uint32_t DLL_CALL BU_LongLong_Compare(int64_t* pthis, int64_t* other) {
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Modulo(int64_t* pThis, int64_t* pOther) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Modulo=_BU_LongLong_Modulo@8")
|
||||
*pThis %= *pOther;
|
||||
}
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_ModuloV(int64_t* pThis, int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ModuloV=_BU_LongLong_ModuloV@12")
|
||||
*pThis %= (((uint64_t)left << 32) + (uint64_t)right);
|
||||
}
|
||||
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_ShiftLeft(int64_t* pThis, int32_t left) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ShiftLeft=_BU_LongLong_ShiftLeft@8")
|
||||
*pThis <<= left;
|
||||
}
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_ShiftRight(int64_t* pThis, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ShiftRight=_BU_LongLong_ShiftRight@8")
|
||||
*pThis >>= right;
|
||||
}
|
||||
|
||||
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_Compare(int64_t* pthis, int64_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Compare=_BU_LongLong_Compare@8")
|
||||
return (*pthis == *other ? 1 : 0) + (*pthis < *other ? 2 : 0) + (*pthis > *other ? 4 : 0);
|
||||
}
|
||||
|
||||
uint32_t DLL_CALL BU_LongLong_CompareV(int64_t* pthis, uint32_t left, uint32_t right) {
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_CompareV(int64_t* pthis, int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_CompareV=_BU_LongLong_CompareV@12")
|
||||
int64_t other = ((int64_t)left << 32) + right;
|
||||
return (*pthis == other ? 1 : 0) + (*pthis < other ? 2 : 0) + (*pthis > other ? 4 : 0);
|
||||
}
|
||||
|
||||
const char* DLL_CALL BU_LongLong_ToString(int64_t* pthis) {
|
||||
DLL_FUNCTION(const char*) BU_LongLong_ToString(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToString=_BU_LongLong_ToString@4")
|
||||
std::stringstream stream;
|
||||
stream << *pthis;
|
||||
stream << (*pthis);
|
||||
return stream.str().c_str();
|
||||
}
|
||||
|
||||
int64_t* DLL_CALL BU_LongLong_FromString(const char* text) {
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromString(const char* text) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromString=_BU_LongLong_FromString@4")
|
||||
std::stringstream stream = std::stringstream(text);
|
||||
int64_t* val = new int64_t;
|
||||
stream >> *val;
|
||||
stream >> (*val);
|
||||
return val;
|
||||
}
|
||||
|
||||
int32_t DLL_CALL BU_LongLong_ToLong(int64_t* pthis, int32_t _modulus) {
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLong(int64_t* pthis, int32_t _modulus) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLong=_BU_LongLong_ToLong@8")
|
||||
return *pthis % _modulus;
|
||||
}
|
||||
|
||||
int64_t* DLL_CALL BU_LongLong_FromLong(int32_t left, int32_t right) {
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromLong(int32_t left, int32_t right) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromLong=_BU_LongLong_FromLong@8")
|
||||
int64_t* val = new int64_t;
|
||||
*val = ((int64_t)left << 32) + right;
|
||||
return val;
|
||||
}
|
||||
|
||||
int32_t DLL_CALL BU_LongLong_ToLongHigh(int64_t* pthis) {
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongHigh(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLongHigh=_BU_LongLong_ToLongHigh@4")
|
||||
return (int32_t)((*pthis) >> 32);
|
||||
}
|
||||
|
||||
int32_t DLL_CALL BU_LongLong_ToLongLow(int64_t* pthis) {
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongLow(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLongLow=_BU_LongLong_ToLongLow@4")
|
||||
return (int32_t)((*pthis) && 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
float_t DLL_CALL BU_LongLong_ToFloat(int64_t* pthis) {
|
||||
DLL_FUNCTION(float_t) BU_LongLong_ToFloat(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToFloat=_BU_LongLong_ToFloat@4")
|
||||
return (float)*pthis;
|
||||
}
|
||||
|
||||
int64_t* DLL_CALL BU_LongLong_FromFloat(float_t other) {
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromFloat(float_t other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromFloat=_BU_LongLong_FromFloat@4")
|
||||
int64_t val = (int64_t)other;
|
||||
return BU_LongLong_Copy(&val);
|
||||
}
|
||||
|
||||
double_t* DLL_CALL BU_LongLong_ToDouble(int64_t* pthis) {
|
||||
DLL_FUNCTION(double_t*) BU_LongLong_ToDouble(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToDouble=_BU_LongLong_ToDouble@4")
|
||||
double_t* val = new double_t;
|
||||
*val = (double_t)*pthis;
|
||||
return val;
|
||||
}
|
||||
|
||||
int64_t* DLL_CALL BU_LongLong_FromDouble(double_t* other) {
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromDouble(double_t* other) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromDouble=_BU_LongLong_FromDouble@4")
|
||||
int64_t* val = new int64_t;
|
||||
*val = (int64_t)*other;
|
||||
return val;
|
||||
}
|
||||
|
||||
const char* DLL_CALL BU_LongLong_Serialize(int64_t* pthis) {
|
||||
DLL_FUNCTION(const char*) BU_LongLong_Serialize(int64_t* pthis) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Serialize=_BU_LongLong_Serialize@4")
|
||||
return int_to_hex<int64_t>(*pthis).c_str();
|
||||
}
|
||||
|
||||
int64_t* DLL_CALL BU_LongLong_Deserialize(const char* text) {
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_Deserialize(const char* text) {
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Deserialize=_BU_LongLong_Deserialize@4")
|
||||
int64_t val = hex_to_int<int64_t>(std::string(text));
|
||||
return BU_LongLong_Copy(&val);
|
||||
}
|
||||
return new int64_t(val);
|
||||
}
|
||||
|
||||
+50
-67
@@ -1,5 +1,5 @@
|
||||
// Blitz - Steam wrapper for Blitz.
|
||||
// Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
|
||||
// Copyright (C) 2015 Xaymar (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
|
||||
@@ -15,90 +15,73 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "dllmain.h"
|
||||
#include "BlitzUtility.h"
|
||||
#include "Double.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#pragma region Constructor & Destructor
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_Create();
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_Destroy(int64_t* pthis);
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_Copy(int64_t* other);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Create=_BU_LongLong_Create@0")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Destroy=_BU_LongLong_Destroy@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Copy=_BU_LongLong_Copy@4")
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_Create();
|
||||
DLL_FUNCTION(void) BU_LongLong_Destroy(int64_t* pthis);
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_Copy(int64_t* other);
|
||||
#pragma endregion Constructor & Destructor
|
||||
|
||||
#pragma region Temporary Objects
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_TempCreate();
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_TempCopy(int64_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_SetTemp(int64_t* pthis);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_UnsetTemp(int64_t* pthis);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_TempCleanup();
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCreate=_BU_LongLong_TempCreate@0")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCopy=_BU_LongLong_TempCopy@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SetTemp=_BU_LongLong_SetTemp@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_UnsetTemp=_BU_LongLong_UnsetTemp@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_TempCleanup=_BU_LongLong_TempCleanup@0")
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCreate();
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_TempCopy(int64_t* other);
|
||||
DLL_FUNCTION(void) BU_LongLong_SetTemp(int64_t* pthis);
|
||||
DLL_FUNCTION(void) BU_LongLong_UnsetTemp(int64_t* pthis);
|
||||
DLL_FUNCTION(void) BU_LongLong_TempCleanup();
|
||||
#pragma endregion Temporary Objects
|
||||
|
||||
#pragma region Math
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_Set(int64_t* pthis, int64_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_SetV(int64_t* pthis, uint32_t left, uint32_t right);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Set=_BU_LongLong_Set@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SetV=_BU_LongLong_SetV@12")
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_Add(int64_t* pthis, int64_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_AddV(int64_t* pthis, uint32_t left, uint32_t right);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Add=_BU_LongLong_Add@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_AddV=_BU_LongLong_AddV@12")
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_Sub(int64_t* pthis, int64_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_SubV(int64_t* pthis, uint32_t left, uint32_t right);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Sub=_BU_LongLong_Sub@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_SubV=_BU_LongLong_SubV@12")
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_Mul(int64_t* pthis, int64_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_MulV(int64_t* pthis, uint32_t left, uint32_t right);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Mul=_BU_LongLong_Mul@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_MulV=_BU_LongLong_MulV@12")
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_Div(int64_t* pthis, int64_t* other);
|
||||
DLL_METHOD void DLL_CALL BU_LongLong_DivV(int64_t* pthis, uint32_t left, uint32_t right);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Div=_BU_LongLong_Div@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_DivV=_BU_LongLong_DivV@12")
|
||||
DLL_FUNCTION(void) BU_LongLong_Set(int64_t* pthis, int64_t* other);
|
||||
DLL_FUNCTION(void) BU_LongLong_SetV(int64_t* pthis, int32_t left, int32_t right);
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Add(int64_t* pthis, int64_t* other);
|
||||
DLL_FUNCTION(void) BU_LongLong_AddV(int64_t* pthis, int32_t left, int32_t right);
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Sub(int64_t* pthis, int64_t* other);
|
||||
DLL_FUNCTION(void) BU_LongLong_SubV(int64_t* pthis, int32_t left, int32_t right);
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Mul(int64_t* pthis, int64_t* other);
|
||||
DLL_FUNCTION(void) BU_LongLong_MulV(int64_t* pthis, int32_t left, int32_t right);
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_Div(int64_t* pthis, int64_t* other);
|
||||
DLL_FUNCTION(void) BU_LongLong_DivV(int64_t* pthis, int32_t left, int32_t right);
|
||||
#pragma endregion Math
|
||||
|
||||
#pragma region Advanced Math
|
||||
DLL_FUNCTION(void) BU_LongLong_Modulo(int64_t* pThis, int64_t* pOther);
|
||||
DLL_FUNCTION(void) BU_LongLong_ModuloV(int64_t* pThis, int32_t left, int32_t right);
|
||||
|
||||
DLL_FUNCTION(void) BU_LongLong_ShiftLeft(int64_t* pThis, int32_t left);
|
||||
DLL_FUNCTION(void) BU_LongLong_ShiftRight(int64_t* pThis, int32_t right);
|
||||
#pragma endregion Advanced Math
|
||||
|
||||
#pragma region Comparison
|
||||
DLL_METHOD uint32_t DLL_CALL BU_LongLong_Compare(int64_t* pthis, int64_t* other);
|
||||
DLL_METHOD uint32_t DLL_CALL BU_LongLong_CompareV(int64_t* pthis, uint32_t left, uint32_t right);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Compare=_BU_LongLong_Compare@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_CompareV=_BU_LongLong_CompareV@12")
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_Compare(int64_t* pthis, int64_t* other);
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_CompareV(int64_t* pthis, int32_t left, int32_t right);
|
||||
#pragma endregion Comparison
|
||||
|
||||
|
||||
#pragma region Conversion
|
||||
DLL_METHOD const char* DLL_CALL BU_LongLong_ToString(int64_t* pthis);
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_FromString(const char* text);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToString=_BU_LongLong_ToString@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromString=_BU_LongLong_FromString@4")
|
||||
DLL_METHOD int32_t DLL_CALL BU_LongLong_ToLong(int64_t* pthis, int32_t _modulus);
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_FromLong(int32_t left, int32_t right);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLong=_BU_LongLong_ToLong@8")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromLong=_BU_LongLong_FromLong@8")
|
||||
DLL_METHOD int32_t DLL_CALL BU_LongLong_ToLongHigh(int64_t* pthis);
|
||||
DLL_METHOD int32_t DLL_CALL BU_LongLong_ToLongLow(int64_t* pthis);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLongHigh=_BU_LongLong_ToLongHigh@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToLongLow=_BU_LongLong_ToLongLow@4")
|
||||
DLL_METHOD float_t DLL_CALL BU_LongLong_ToFloat(int64_t* pthis);
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_FromFloat(float_t other);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToFloat=_BU_LongLong_ToFloat@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromFloat=_BU_LongLong_FromFloat@4")
|
||||
DLL_METHOD double_t* DLL_CALL BU_LongLong_ToDouble(int64_t* pthis);
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_FromDouble(double_t* pthis);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_ToDouble=_BU_LongLong_ToDouble@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_FromDouble=_BU_LongLong_FromDouble@4")
|
||||
DLL_FUNCTION(const char*) BU_LongLong_ToString(int64_t* pthis);
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromString(const char* text);
|
||||
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLong(int64_t* pthis, int32_t _modulus);
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromLong(int32_t left, int32_t right);
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongHigh(int64_t* pthis);
|
||||
DLL_FUNCTION(int32_t) BU_LongLong_ToLongLow(int64_t* pthis);
|
||||
|
||||
DLL_FUNCTION(float_t) BU_LongLong_ToFloat(int64_t* pthis);
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromFloat(float_t other);
|
||||
|
||||
DLL_FUNCTION(double_t*) BU_LongLong_ToDouble(int64_t* pthis);
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_FromDouble(double_t* pthis);
|
||||
#pragma endregion Conversion
|
||||
|
||||
#pragma region Serialization
|
||||
DLL_METHOD const char* DLL_CALL BU_LongLong_Serialize(int64_t* pthis);
|
||||
DLL_METHOD int64_t* DLL_CALL BU_LongLong_Deserialize(const char* text);
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Serialize=_BU_LongLong_Serialize@4")
|
||||
#pragma comment(linker, "/EXPORT:BU_LongLong_Deserialize=_BU_LongLong_Deserialize@4")
|
||||
DLL_FUNCTION(const char*) BU_LongLong_Serialize(int64_t* pthis);
|
||||
DLL_FUNCTION(int64_t*) BU_LongLong_Deserialize(const char* text);
|
||||
#pragma endregion Serialization
|
||||
|
||||
Reference in New Issue
Block a user