More preparations. Also add a README.md

This commit is contained in:
Michael Dirks
2015-06-20 15:54:29 +02:00
parent 7a96afeda7
commit 7b3c7cc8f6
18 changed files with 2487 additions and 0 deletions
+374
View File
@@ -0,0 +1,374 @@
// BlitzUtility - Expanding the normal Blitz functionality.
// 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 "Vector3.h"
void Vector3::set(const float &o)
{
this->X = o;
this->Y = o;
this->Z = o;
}
void Vector3::set(const float &x, const float &y, const float &z)
{
this->X = x;
this->Y = y;
this->Z = z;
}
void Vector3::set(const Vector3 &o)
{
if (this != &o) {
this->X = o.X;
this->Y = o.Y;
this->Z = o.Z;
}
}
void Vector3::add(const float &o)
{
this->X += o;
this->Y += o;
this->Z += o;
}
void Vector3::add(const float &x, const float &y, const float &z)
{
this->X += x;
this->Y += y;
this->Z += z;
}
void Vector3::add(const Vector3 &o)
{
this->X += o.X;
this->Y += o.Y;
this->Z += o.Z;
}
void Vector3::sub(const float &o)
{
this->X -= o;
this->Y -= o;
this->Z -= o;
}
void Vector3::sub(const float &x, const float &y, const float &z)
{
this->X -= x;
this->Y -= y;
this->Z -= z;
}
void Vector3::sub(const Vector3 &o)
{
this->X -= o.X;
this->Y -= o.Y;
this->Z -= o.Z;
}
void Vector3::mul(const float &o)
{
this->X *= o;
this->Y *= o;
this->Z *= o;
}
void Vector3::mul(const float &x, const float &y, const float &z)
{
this->X *= x;
this->Y *= y;
this->Z *= z;
}
void Vector3::mul(const Vector3 &o)
{
this->X *= o.X;
this->Y *= o.Y;
this->Z *= o.Z;
}
void Vector3::div(const float &o)
{
this->X /= o;
this->Y /= o;
this->Z /= o;
}
void Vector3::div(const float &x, const float &y, const float &z)
{
this->X /= x;
this->Y /= y;
this->Z /= z;
}
void Vector3::div(const Vector3 &o)
{
this->X /= o.X;
this->Y /= o.Y;
this->Z /= o.Z;
}
float Vector3::length()
{
return sqrt(this->X * this->X + this->Y * this->Y + this->Z * this->Z);
}
float Vector3::distance(const float &x, const float &y, const float &z)
{
float X = (this->X - x);
float Y = (this->Y - y);
float Z = (this->Z - z);
return sqrt(X * X + Y * Y + Z * Z);
}
float Vector3::distance(const Vector3 &o)
{
float X = (this->X - o.X);
float Y = (this->Y - o.Y);
float Z = (this->Z - o.Z);
return sqrt(X * X + Y * Y + Z * Z);
}
float Vector3::dot(const float &x, const float &y, const float &z)
{
return (this->X * x) + (this->Y * y) + (this->Z * z);
}
float Vector3::dot(const Vector3 &o)
{
return (this->X * o.X) + (this->Y * o.Y) + (this->Z * o.Z);
}
Vector3 Vector3::cross(const float &x, const float &y, const float &z)
{
Vector3* data = new Vector3();
data->X = (this->Y * z) - (this->Z * y);
data->Y = (this->Z * x) - (this->X * z);
data->Z = (this->X * y) - (this->Y * x);
return *data;
}
Vector3 Vector3::cross(const Vector3 &o)
{
Vector3* data = new Vector3();
data->X = (this->Y * o.Z) - (this->Z * o.Y);
data->Y = (this->Z * o.X) - (this->X * o.Z);
data->Z = (this->X * o.Y) - (this->Y * o.X);
return *data;
}
void Vector3::normalize()
{
this->div(this->length());
}
void Vector3::rotate(float &pitch, float &yaw, float &roll)
{
float** matrix = new float*[3];
matrix[0] = new float[3]; matrix[1] = new float[3]; matrix[2] = new float[3];
matrix[0][0] = cos(yaw) * cos(roll); matrix[0][1] = -sin(roll); matrix[0][2] = sin(yaw);
matrix[1][0] = sin(roll); matrix[1][1] = cos(pitch) * cos(roll); matrix[1][2] = -sin(pitch);
matrix[2][0] = -sin(yaw); matrix[2][1] = sin(pitch); matrix[2][2] = cos(pitch) * cos(yaw);
float X = (this->X * matrix[0][0]) + (this->Y * matrix[0][1]) + (this->Z * matrix[0][2]);
float Y = (this->X * matrix[1][0]) + (this->Y * matrix[1][1]) + (this->Z * matrix[1][2]);
float Z = (this->X * matrix[2][0]) + (this->Y * matrix[2][1]) + (this->Z * matrix[2][2]);
this->X = X; this->Y = Y; this->Z = Z;
}
void Vector3::rotateAround(const float &x, const float &y, const float &z, float &pitch, float &yaw, float &roll)
{
this->sub(x, y, z);
this->rotate(pitch, yaw, roll);
this->add(x, y, z);
}
void Vector3::rotateAround(Vector3 &o, float &pitch, float &yaw, float &roll)
{
this->sub(o);
this->rotate(pitch, yaw, roll);
this->add(o);
}
float Vector3::deltaPitch() {
return (float)(atan(this->X / -this->Y) * (180.0 / M_PI));
}
float Vector3::deltaPitch(const float &x, const float &y, const float &z)
{
return (float)(atan((this->X - x) / (-(this->Y - y))) * (180.0 / M_PI));
}
float Vector3::deltaPitch(Vector3 &o)
{
return (float)(atan((this->X - o.X) / (-(this->Y - o.Y))) * (180.0 / M_PI));
}
float Vector3::deltaYaw() {
return (float)(atan(sqrt((this->X * this->X) + (this->Y * this->Y)) / this->Z) * (180.0 / M_PI));
}
float Vector3::deltaYaw(const float &x, const float &y, const float &z)
{
float X = (this->X - x);
float Y = (this->Y - y);
return (float)(atan(sqrt((X * X) + (Y * Y)) / (this->Z - z)) * (180.0 / M_PI));
}
float Vector3::deltaYaw(Vector3 &o)
{
float X = (this->X - o.X);
float Y = (this->Y - o.Y);
return (float)(atan(sqrt((X * X) + (Y * Y)) / (this->Z - o.Z)) * (180.0 / M_PI));
}
char* Vector3::serialize()
{
char* data = new char[13];
memcpy(data, this->Xc, 4);
memcpy(data + 4, this->Yc, 4);
memcpy(data + 8, this->Zc, 4);
data[12] = 0;
return data;
}
void Vector3::deserialize(char* o)
{
memcpy(o, this->Xc, 4);
memcpy(o + 4, this->Yc, 4);
memcpy(o + 8, this->Zc, 4);
}
DLL_METHOD void Vector3_Set(Vector3* a, float o) {
a->set(o);
}
DLL_METHOD void Vector3_SetP(Vector3* a, float x, float y, float z) {
a->set(x, y, z);
}
DLL_METHOD void Vector3_SetV(Vector3* a, Vector3* b) {
a->set(*b);
}
#pragma comment(linker, "/EXPORT:Vector3_Set=_Vector3_Set@8")
#pragma comment(linker, "/EXPORT:Vector3_SetP=_Vector3_SetP@16")
#pragma comment(linker, "/EXPORT:Vector3_SetV=_Vector3_SetV@8")
DLL_METHOD void Vector3_Add(Vector3* a, float o) {
a->add(o);
}
DLL_METHOD void Vector3_AddP(Vector3* a, float x, float y, float z) {
a->add(x, y, z);
}
DLL_METHOD void Vector3_AddV(Vector3* a, Vector3* b) {
a->add(*b);
}
#pragma comment(linker, "/EXPORT:Vector3_Add=_Vector3_Add@8")
#pragma comment(linker, "/EXPORT:Vector3_AddP=_Vector3_AddP@16")
#pragma comment(linker, "/EXPORT:Vector3_AddV=_Vector3_AddV@8")
DLL_METHOD void Vector3_Sub(Vector3* a, float o) {
a->sub(o);
}
DLL_METHOD void Vector3_SubP(Vector3* a, float x, float y, float z) {
a->sub(x, y, z);
}
DLL_METHOD void Vector3_SubV(Vector3* a, Vector3* b) {
a->sub(*b);
}
#pragma comment(linker, "/EXPORT:Vector3_Sub=_Vector3_Sub@8")
#pragma comment(linker, "/EXPORT:Vector3_SubP=_Vector3_SubP@16")
#pragma comment(linker, "/EXPORT:Vector3_SubV=_Vector3_SubV@8")
DLL_METHOD void Vector3_Mul(Vector3* a, float o) {
a->mul(o);
}
DLL_METHOD void Vector3_MulP(Vector3* a, float x, float y, float z) {
a->mul(x, y, z);
}
DLL_METHOD void Vector3_MulV(Vector3* a, Vector3* b) {
a->mul(*b);
}
#pragma comment(linker, "/EXPORT:Vector3_Mul=_Vector3_Mul@8")
#pragma comment(linker, "/EXPORT:Vector3_MulP=_Vector3_MulP@16")
#pragma comment(linker, "/EXPORT:Vector3_MulV=_Vector3_MulV@8")
DLL_METHOD void Vector3_Div(Vector3* a, float o) {
a->div(o);
}
DLL_METHOD void Vector3_DivP(Vector3* a, float x, float y, float z) {
a->div(x, y, z);
}
DLL_METHOD void Vector3_DivV(Vector3* a, Vector3* b) {
a->div(*b);
}
#pragma comment(linker, "/EXPORT:Vector3_Div=_Vector3_Div@8")
#pragma comment(linker, "/EXPORT:Vector3_DivP=_Vector3_DivP@16")
#pragma comment(linker, "/EXPORT:Vector3_DivV=_Vector3_DivV@8")
DLL_METHOD float Vector3_Length(Vector3* a) {
return (float)a->length();
}
DLL_METHOD float Vector3_DistanceP(Vector3* a, float x, float y, float z) {
return (float)a->distance(x, y, z);
}
DLL_METHOD float Vector3_DistanceV(Vector3* a, Vector3* b) {
return (float)a->distance(*b);
}
#pragma comment(linker, "/EXPORT:Vector3_Length=_Vector3_Length@4")
#pragma comment(linker, "/EXPORT:Vector3_DistanceP=_Vector3_DistanceP@16")
#pragma comment(linker, "/EXPORT:Vector3_DistanceV=_Vector3_DistanceV@8")
DLL_METHOD float Vector3_DotP(Vector3* a, float x, float y, float z) {
return (float)a->dot(x, y, z);
}
DLL_METHOD float Vector3_DotV(Vector3* a, Vector3* b) {
return (float)a->dot(*b);
}
DLL_METHOD void Vector3_CrossP(Vector3* a, float x, float y, float z, Vector3* out) {
Vector3 temp = a->cross(x, y, z);
*out = temp;
}
DLL_METHOD void Vector3_CrossV(Vector3* a, Vector3* b, Vector3* out) {
Vector3 temp = a->cross(*b);
*out = temp;
}
DLL_METHOD void Vector3_Normalize(Vector3* a) {
a->normalize();
}
#pragma comment(linker, "/EXPORT:Vector3_DotP=_Vector3_DotP@16")
#pragma comment(linker, "/EXPORT:Vector3_DotV=_Vector3_DotV@8")
#pragma comment(linker, "/EXPORT:Vector3_CrossP=_Vector3_CrossP@20")
#pragma comment(linker, "/EXPORT:Vector3_CrossV=_Vector3_CrossV@12")
#pragma comment(linker, "/EXPORT:Vector3_Normalize=_Vector3_Normalize@4")
DLL_METHOD void Vector3_Rotate(Vector3* a, float pitch, float yaw, float roll) {
a->rotate(pitch, yaw, roll);
}
DLL_METHOD void Vector3_RotateAroundP(Vector3* a, float x, float y, float z, float pitch, float yaw, float roll) {
a->rotateAround(x, y, z, pitch, yaw, roll);
}
DLL_METHOD void Vector3_RotateAroundV(Vector3* a, Vector3* b, float pitch, float yaw, float roll) {
a->rotateAround(*b, pitch, yaw, roll);
}
#pragma comment(linker, "/EXPORT:Vector3_Rotate=_Vector3_Rotate@16")
#pragma comment(linker, "/EXPORT:Vector3_RotateAroundP=_Vector3_RotateAroundP@28")
#pragma comment(linker, "/EXPORT:Vector3_RotateAroundV=_Vector3_RotateAroundV@20")
DLL_METHOD float Vector3_DeltaPitchP(Vector3* a, float x, float y, float z) {
return (float)a->deltaPitch(x, y, z);
}
DLL_METHOD float Vector3_DeltaPitchV(Vector3* a, Vector3* b) {
return (float)a->deltaPitch(*b);
}
DLL_METHOD float Vector3_DeltaYawP(Vector3* a, float x, float y, float z) {
return (float)a->deltaYaw(x, y, z);
}
DLL_METHOD float Vector3_DeltaYawV(Vector3* a, Vector3* b) {
return (float)a->deltaYaw(*b);
}
#pragma comment(linker, "/EXPORT:Vector3_DeltaPitchP=_Vector3_DeltaPitchP@16")
#pragma comment(linker, "/EXPORT:Vector3_DeltaPitchV=_Vector3_DeltaPitchV@8")
#pragma comment(linker, "/EXPORT:Vector3_DeltaYawP=_Vector3_DeltaYawP@16")
#pragma comment(linker, "/EXPORT:Vector3_DeltaYawV=_Vector3_DeltaYawV@8")
DLL_METHOD char* Vector3_Serialize(Vector3* a) {
return a->serialize();
}
DLL_METHOD void Vector3_Deserialize(Vector3* a, char* s) {
a->deserialize(s);
}
#pragma comment(linker, "/EXPORT:Vector3_Serialize=_Vector3_Serialize@4")
#pragma comment(linker, "/EXPORT:Vector3_Deserialize=_Vector3_Deserialize@8")
*/
+82
View File
@@ -0,0 +1,82 @@
// BlitzUtility - Expanding the normal Blitz functionality.
// 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
#include "dllmain.h"
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#include <math.h>
#undef _USE_MATH_DEFINES
#endif
struct Vector3 {
union {
float X;
char Xc[4];
};
union {
float Y;
char Yc[4];
};
union {
float Z;
char Zc[4];
};
void set(const float &o);
void set(const float &x, const float &y, const float &z);
void set(const Vector3 &o);
void add(const float &o);
void add(const float &x, const float &y, const float &z);
void add(const Vector3 &o);
void sub(const float &o);
void sub(const float &x, const float &y, const float &z);
void sub(const Vector3 &o);
void mul(const float &o);
void mul(const float &x, const float &y, const float &z);
void mul(const Vector3 &o);
void div(const float &o);
void div(const float &x, const float &y, const float &z);
void div(const Vector3 &o);
float length();
float distance(const float &x, const float &y, const float &z);
float distance(const Vector3 &o);
float dot(const float &x, const float &y, const float &z);
float dot(const Vector3 &o);
Vector3 cross(const float &x, const float &y, const float &z);
Vector3 cross(const Vector3 &o);
void normalize();
void rotate(float &pitch, float &yaw, float &roll);
void rotateAround(const float &x, const float &y, const float &z, float &pitch, float &yaw, float &roll);
void rotateAround(Vector3 &o, float &pitch, float &yaw, float &roll);
float deltaPitch();
float deltaPitch(const float &x, const float &y, const float &z);
float deltaPitch(Vector3 &o);
float deltaYaw();
float deltaYaw(const float &x, const float &y, const float &z);
float deltaYaw(Vector3 &o);
char* serialize();
void deserialize(char* o);
};*/
+132
View File
@@ -0,0 +1,132 @@
#include "Common.h"
#include <memory>
#include <sstream>
// Rev-engineered from https://github.com/blitz-research/blitz3d/blob/master/compiler/declnode.cpp
#define BBVARTYPE_GLOBAL 0
#define BBVARTYPE_INT 1
#define BBVARTYPE_FLOAT 2
#define BBVARTYPE_UNUSED 3
#define BBVARTYPE_STRING 4
#define BBVARTYPE_TYPE 5
#define BBVARTYPE_ARRAY 6
struct BBVar {
int Type = -1;
};
struct BBVarGlobal {
int GlobalType = -1;
int* Value;
};
struct BBVarInt : BBVar {
int Value;
};
struct BBVarFloat : BBVar {
float Value;
};
struct BBVarUnused : BBVar {
// Not a Dim, as you can see here:
// https://github.com/blitz-research/blitz3d/blob/master/compiler/stmtnode.cpp#L86
};
struct BBVarString : BBVar {
int Length;
char* Value;
};
struct BBVarElement;
struct BBVarType : BBVar {
BBVarElement used, free;
int fieldCount; // Field Info follows (Exactly <fieldCount> int pointers to variable struct)
int* fields[];
};
struct BBVarElement {
int* currentPtr; // Points towards fields.
int* nextPtr, prevPtr;
BBVarType* BBStructPtr;
int refCount; // Fields usually follow here, may be at another location, see currentPtr.
//BBVar* fields[];
};
struct BBVarArray : BBVar {
int Size; //???
BBVar* ArrayType;
};
std::string BBVar_Serialize(void* obj) {
std::stringstream myStream;
BBVar* var = (BBVar*)obj;
switch (var->Type) {
case BBVARTYPE_GLOBAL:
BBVarGlobal* varGlobal = (BBVarGlobal*)obj;
myStream << "[Global] " << BBVar_Serialize(varGlobal->Value) << std::endl;
break;
case BBVARTYPE_INT:
BBVarInt* varInt = (BBVarInt*)obj;
myStream << "Int" << std::endl;
break;
case BBVARTYPE_FLOAT:
BBVarFloat* varFloat = (BBVarFloat*)obj;
myStream << "Float" << std::endl;
break;
case BBVARTYPE_UNUSED:
BBVarUnused* varUnused = (BBVarUnused*)obj;
myStream << "Unused" << std::endl;
break;
case BBVARTYPE_STRING:
BBVarString* varString = (BBVarString*)obj;
myStream << "String" << std::endl;
break;
case BBVARTYPE_TYPE:
BBVarType* varType = (BBVarType*)obj;
myStream << BBVarType_Serialize(varType);
break;
case BBVARTYPE_ARRAY:
BBVarArray* varArray = (BBVarArray*)obj;
myStream << "Array = " << std::endl;
break;
}
return myStream.str();
}
std::string BBVarType_Serialize(BBVarType* obj, unsigned int indent = 0) {
std::stringstream myStream;
std::stringstream myPaddingSS;
for (unsigned int pad = 0; pad < indent; pad++) {
myPaddingSS << " ";
}
std::string myPadding = myPaddingSS.str();
myStream << myPadding << "Type {" << std::endl;
for (unsigned int fld = 0; fld < obj->fieldCount; fld++) {
myStream << myPadding << " (" << fld << ") => " << BBVar_Serialize(obj->fields[fld]) << std::endl;
}
myStream << myPadding << "}" << std::endl;
return myStream.str();
}
DLL_EXPORT(char*) SerializeObject(void* obj) {
return strdup(BBVar_Serialize(obj).c_str());
}
// Laut Mark Sibly:
struct BBType {
int obj_size;
BBObj usedList, freeList;
};
struct BBObj {
BBObj *curr;
BBObj *next, *prev;
int* bbtype;
int ref_cnt;
};
+163
View File
@@ -0,0 +1,163 @@
// Blitz - 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 "Double.h"
#include <list>
std::list<double_t*> BU_DoubleTemporary;
DLL_METHOD double_t* DLL_CALL BU_Double_Create() {
return new double_t;
}
DLL_METHOD void DLL_CALL BU_Double_Destroy(double_t* pthis) {
delete pthis;
}
DLL_METHOD double_t* DLL_CALL 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() {
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) {
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) {
BU_DoubleTemporary.push_back(pthis);
}
DLL_METHOD void DLL_CALL BU_Double_UnsetTemp(double_t* pthis) {
BU_DoubleTemporary.remove(pthis);
}
DLL_METHOD void DLL_CALL BU_Double_TempCleanup() {
auto iterEnd = BU_DoubleTemporary.end();
for (auto iter = BU_DoubleTemporary.begin(); iter != iterEnd; ++iter) {
delete *iter;
}
BU_DoubleTemporary.clear();
}
DLL_METHOD void DLL_CALL 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) {
*pthis = other;
}
DLL_METHOD void DLL_CALL 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) {
*pthis += other;
}
DLL_METHOD void DLL_CALL 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) {
*pthis -= other;
}
DLL_METHOD void DLL_CALL 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) {
*pthis *= other;
}
DLL_METHOD void DLL_CALL 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) {
*pthis /= other;
}
DLL_METHOD uint32_t DLL_CALL 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) {
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) {
std::stringstream stream;
stream << *pthis;
return stream.str().c_str();
}
DLL_METHOD double_t* DLL_CALL 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) {
return (float_t)*pthis;
}
DLL_METHOD double_t* DLL_CALL 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) {
int64_t* val = new int64_t;
*val = (int64_t)*pthis;
return val;
}
DLL_METHOD double_t* DLL_CALL 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) {
union {
double_t real;
int64_t integer;
} myval;
myval.real = *pthis;
return int_to_hex<int64_t>(myval.integer).c_str();
}
DLL_METHOD double_t* DLL_CALL BU_Double_Deserialize(const char* text) {
union {
double_t real;
int64_t integer;
} myval;
myval.integer = hex_to_int<int64_t>(std::string(text));
return BU_Double_Copy(&myval.real);
}
+96
View File
@@ -0,0 +1,96 @@
// Blitz - 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
#include "dllmain.h"
#include "LongLong.h"
#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);
#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();
#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")
#pragma comment(linker, "/EXPORT:BU_Double_UnsetTemp=_BU_Double_UnsetTemp@4")
#pragma comment(linker, "/EXPORT:BU_Double_TempCleanup=_BU_Double_TempCleanup@0")
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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);
#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
+220
View File
@@ -0,0 +1,220 @@
// BlitzUtility - Expanding the normal Blitz functionality.
// 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
#include "FVector2.h"
double FVector2::length()
{
return std::sqrtf(std::abs((this->X*this->X) + (this->Y*this->Y)));
}
void FVector2::normalize() {
double len = this->length();
double divisor = 1.0 / (len != 0 ? len : FLT_EPSILON);
}
double FVector2::distance(const FVector2 r)
{
float X = (this->X - r.X), Y = (this->Y - r.Y);
return std::sqrtf(std::abs(X*X + Y*Y));
}
const char* FVector2::serialize() {
}
FVector2& FVector2::deserialize(const char* serialized) {
}
FVector2::FVector2(float V) {
}
FVector2::FVector2(float X, float Y) {
}
FVector2::FVector2(FVector2& V) {
}
FVector2& FVector2::operator++() {
}
FVector2& FVector2::operator--() {
}
bool FVector2::operator>(const FVector2& r) {
}
bool FVector2::operator>(const float& r) {
}
bool FVector2::operator<(const FVector2& r) {
}
bool FVector2::operator<(const float& r) {
}
bool FVector2::operator==(const FVector2& r) {
}
bool FVector2::operator==(const float& r) {
}
bool FVector2::operator>=(const FVector2& r) {
}
bool FVector2::operator>=(const float& r) {
}
bool FVector2::operator<=(const FVector2& r) {
}
bool FVector2::operator<=(const float& r) {
}
bool FVector2::operator!=(const FVector2& r) {
}
bool FVector2::operator!=(const float& r) {
}
FVector2& FVector2::operator=(const FVector2& r) {
}
FVector2& FVector2::operator=(const float& r) {
}
FVector2& FVector2::operator+(const FVector2& r) {
}
FVector2& FVector2::operator+(const float& r) {
}
FVector2& FVector2::operator-(const FVector2& r) {
}
FVector2& FVector2::operator*(const FVector2& r) {
}
FVector2& FVector2::operator*(const float& r) {
}
FVector2& FVector2::operator/(const FVector2& r) {
}
FVector2& FVector2::operator/(const float& r) {
}
FVector2& FVector2::operator+=(const FVector2& r) {
}
FVector2& FVector2::operator+=(const float& r) {
}
FVector2& FVector2::operator-=(const FVector2& r) {
}
FVector2& FVector2::operator*=(const FVector2& r) {
}
FVector2& FVector2::operator*=(const float& r) {
}
FVector2& FVector2::operator/=(const FVector2& r) {
}
FVector2& FVector2::operator/=(const float& r) {
}
FVector2& FVector2::operator-(const float& r) {
}
FVector2& FVector2::operator-=(const float& r) {
}
*/
+98
View File
@@ -0,0 +1,98 @@
// BlitzUtility - Expanding the normal Blitz functionality.
// 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
#include "dllmain.h"
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#include <math.h>
#undef _USE_MATH_DEFINES
#endif
struct FVector2 {
float X, Y;
// Constructor & Destructor
FVector2(float V);
FVector2(float X, float Y);
FVector2(FVector2& V);
// Operator Overloading
FVector2& operator++();
FVector2& operator--();
bool operator>(const FVector2& r);
bool operator<(const FVector2& r);
bool operator==(const FVector2& r);
bool operator>=(const FVector2& r);
bool operator<=(const FVector2& r);
bool operator!=(const FVector2& r);
FVector2& operator=(const FVector2& r);
FVector2& operator+(const FVector2& r);
FVector2& operator-(const FVector2& r);
FVector2& operator*(const FVector2& r);
FVector2& operator/(const FVector2& r);
FVector2& operator+=(const FVector2& r);
FVector2& operator-=(const FVector2& r);
FVector2& operator*=(const FVector2& r);
FVector2& operator/=(const FVector2& r);
// Operator Overloading - float
bool operator>(const float& r);
bool operator<(const float& r);
bool operator==(const float& r);
bool operator>=(const float& r);
bool operator<=(const float& r);
bool operator!=(const float& r);
FVector2& operator=(const float& r);
FVector2& operator+(const float& r);
FVector2& operator-(const float& r);
FVector2& operator*(const float& r);
FVector2& operator/(const float& r);
FVector2& operator+=(const float& r);
FVector2& operator-=(const float& r);
FVector2& operator*=(const float& r);
FVector2& operator/=(const float& r);
// Simple Math
double length();
void normalize();
double distance(const FVector2 r);
// Advanced Math
void rotate(const double )
// Serialization
const char* serialize();
static FVector2& deserialize(const char* serialized);
};
DLL_METHOD FVector2* DLL_CALL BU_FVector2_Create();
DLL_METHOD FVector2* DLL_CALL BU_FVector2_Copy(FVector2* copyVector);
DLL_METHOD void DLL_CALL BU_FVector2_Destroy();
DLL_METHOD FVector2* DLL_CALL BU_FVector2_TempCreate();
DLL_METHOD FVector2* DLL_CALL BU_FVector2_TempCopy(FVector2* copyVector);
DLL_METHOD void DLL_CALL BU_FVector2_SetTemp(FVector2* vector);
DLL_METHOD void DLL_CALL BU_FVector2_UnsetTemp(FVector2* vector);
DLL_METHOD void DLL_CALL BU_FVector2_TempCleanup();
DLL_METHOD float DLL_CALL BU_FVector2_Length(FVector2* vector);
DLL_METHOD float DLL_CALL BU_FVector2_Normalize();
DLL_METHOD float DLL_CALL BU_FVector2_Distance(FVector2* vector);
DLL_METHOD float DLL_CALL BU_FVector2_DistanceL(float X, float Y);
*/
+174
View File
@@ -0,0 +1,174 @@
// Blitz - 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
#include "LongLong.h"
#include <list>
std::list<int64_t*> blitzLLTemporary;
int64_t* DLL_CALL BU_LongLong_Create() {
return new int64_t;
}
void DLL_CALL BU_LongLong_Destroy(int64_t* pthis) {
delete pthis;
}
int64_t* DLL_CALL BU_LongLong_Copy(int64_t* other) {
int64_t* pthis = new int64_t;
*pthis = *other;
return pthis;
}
DLL_METHOD int64_t* DLL_CALL BU_LongLong_TempCreate() {
int64_t* val = new int64_t;
blitzLLTemporary.push_back(val);
return val;
}
DLL_METHOD int64_t* DLL_CALL BU_LongLong_TempCopy(int64_t* other) {
int64_t* val = new int64_t(*other);
blitzLLTemporary.push_back(val);
return val;
}
DLL_METHOD void DLL_CALL BU_LongLong_SetTemp(int64_t* pthis) {
blitzLLTemporary.push_back(pthis);
}
DLL_METHOD void DLL_CALL BU_LongLong_UnsetTemp(int64_t* pthis) {
blitzLLTemporary.remove(pthis);
}
DLL_METHOD void DLL_CALL BU_LongLong_TempCleanup() {
auto iterEnd = blitzLLTemporary.end();
for (auto iter = blitzLLTemporary.begin(); iter != iterEnd; ++iter) {
delete *iter;
}
blitzLLTemporary.clear();
}
void DLL_CALL BU_LongLong_Set(int64_t* pthis, int64_t* other) {
*pthis = *other;
}
void DLL_CALL BU_LongLong_SetV(int64_t* pthis, uint32_t left, uint32_t right) {
*pthis = ((int64_t)left << 32) + right;
}
void DLL_CALL BU_LongLong_Add(int64_t* pthis, int64_t* other) {
*pthis += *other;
}
void DLL_CALL BU_LongLong_AddV(int64_t* pthis, uint32_t left, uint32_t right) {
*pthis += ((int64_t)left << 32) + right;
}
void DLL_CALL BU_LongLong_Sub(int64_t* pthis, int64_t* other) {
*pthis -= *other;
}
void DLL_CALL BU_LongLong_SubV(int64_t* pthis, uint32_t left, uint32_t right) {
*pthis -= ((int64_t)left << 32) + right;
}
void DLL_CALL BU_LongLong_Mul(int64_t* pthis, int64_t* other) {
*pthis *= *other;
}
void DLL_CALL BU_LongLong_MulV(int64_t* pthis, uint32_t left, uint32_t right) {
*pthis *= ((int64_t)left << 32) + right;
}
void DLL_CALL BU_LongLong_Div(int64_t* pthis, int64_t* other) {
*pthis *= *other;
}
void DLL_CALL BU_LongLong_DivV(int64_t* pthis, uint32_t left, uint32_t right) {
*pthis *= ((int64_t)left << 32) + right;
}
uint32_t DLL_CALL BU_LongLong_Compare(int64_t* pthis, int64_t* other) {
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) {
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) {
std::stringstream stream;
stream << *pthis;
return stream.str().c_str();
}
int64_t* DLL_CALL BU_LongLong_FromString(const char* text) {
std::stringstream stream = std::stringstream(text);
int64_t* val = new int64_t;
stream >> *val;
return val;
}
int32_t DLL_CALL BU_LongLong_ToLong(int64_t* pthis, int32_t _modulus) {
return *pthis % _modulus;
}
int64_t* DLL_CALL BU_LongLong_FromLong(int32_t left, int32_t right) {
int64_t* val = new int64_t;
*val = ((int64_t)left << 32) + right;
return val;
}
int32_t DLL_CALL BU_LongLong_ToLongHigh(int64_t* pthis) {
return (int32_t)((*pthis) >> 32);
}
int32_t DLL_CALL BU_LongLong_ToLongLow(int64_t* pthis) {
return (int32_t)((*pthis) && 0xFFFFFFFF);
}
float_t DLL_CALL BU_LongLong_ToFloat(int64_t* pthis) {
return (float)*pthis;
}
int64_t* DLL_CALL BU_LongLong_FromFloat(float_t other) {
int64_t val = (int64_t)other;
return BU_LongLong_Copy(&val);
}
double_t* DLL_CALL BU_LongLong_ToDouble(int64_t* pthis) {
double_t* val = new double_t;
*val = (double_t)*pthis;
return val;
}
int64_t* DLL_CALL BU_LongLong_FromDouble(double_t* other) {
int64_t* val = new int64_t;
*val = (int64_t)*other;
return val;
}
const char* DLL_CALL BU_LongLong_Serialize(int64_t* pthis) {
return int_to_hex<int64_t>(*pthis).c_str();
}
int64_t* DLL_CALL BU_LongLong_Deserialize(const char* text) {
int64_t val = hex_to_int<int64_t>(std::string(text));
return BU_LongLong_Copy(&val);
}
+104
View File
@@ -0,0 +1,104 @@
// Blitz - 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
#include "dllmain.h"
#include "Double.h"
#include <string>
#include <sstream>
#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")
#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")
#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")
#pragma endregion 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")
#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")
#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")
#pragma endregion Serialization