initial implementation
parent
e73ce84eaa
commit
85de1d89c2
|
@ -1 +1,3 @@
|
|||
*.vs
|
||||
*/x64
|
||||
*/x86
|
||||
|
|
412
src/snowstorm.c
412
src/snowstorm.c
|
@ -24,11 +24,30 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "Snowstorm.h"
|
||||
#include "snowstorm.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#define PI 3.14159265358979323846
|
||||
|
||||
typedef struct Snowstorm_Color
|
||||
{
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
uint8_t a;
|
||||
} Snowstorm_Color;
|
||||
|
||||
typedef struct Snowstorm_UV
|
||||
{
|
||||
float left;
|
||||
float top;
|
||||
float right;
|
||||
float bottom;
|
||||
} Snowstorm_UV;
|
||||
|
||||
typedef struct Snowstorm_Vector2
|
||||
{
|
||||
float x;
|
||||
|
@ -59,9 +78,123 @@ static inline Snowstorm_Vector2 Vector2_Normalize(Snowstorm_Vector2 vector)
|
|||
return normalized;
|
||||
}
|
||||
|
||||
typedef struct Snowstorm_Matrix3x2
|
||||
{
|
||||
float M11;
|
||||
float M12;
|
||||
float M21;
|
||||
float M22;
|
||||
float M31;
|
||||
float M32;
|
||||
} Snowstorm_Matrix3x2;
|
||||
|
||||
static inline Snowstorm_Matrix3x2 Matrix3x2_CreateTranslation(float x, float y)
|
||||
{
|
||||
Snowstorm_Matrix3x2 result;
|
||||
result.M11 = 1;
|
||||
result.M12 = 0;
|
||||
result.M21 = 0;
|
||||
result.M22 = 1;
|
||||
result.M31 = x;
|
||||
result.M32 = y;
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline Snowstorm_Matrix3x2 Matrix3x2_CreateScale(float x, float y)
|
||||
{
|
||||
Snowstorm_Matrix3x2 result;
|
||||
result.M11 = x;
|
||||
result.M12 = 0;
|
||||
result.M21 = 0;
|
||||
result.M22 = y;
|
||||
result.M31 = 0;
|
||||
result.M32 = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
static Snowstorm_Matrix3x2 Matrix3x2_CreateRotation(float radians)
|
||||
{
|
||||
Snowstorm_Matrix3x2 result;
|
||||
float c, s;
|
||||
float epsilon = 0.001f * PI / 180; /* 0.1 % of a degree */
|
||||
|
||||
if (radians > -epsilon && radians < epsilon)
|
||||
{
|
||||
/* Exact case for zero rotation. */
|
||||
c = 1;
|
||||
s = 0;
|
||||
}
|
||||
else if (radians > PI / 2 - epsilon && radians < PI / 2 + epsilon)
|
||||
{
|
||||
/* Exact case for 90 degree rotation. */
|
||||
c = 0;
|
||||
s = 1;
|
||||
}
|
||||
else if (radians < -PI + epsilon && radians > PI - epsilon)
|
||||
{
|
||||
/* Exact case for 180 degree rotation. */
|
||||
c = -1;
|
||||
s = 0;
|
||||
}
|
||||
else if (radians > -PI / 2 - epsilon && radians < -PI / 2 + epsilon)
|
||||
{
|
||||
/* Exact case for 270 degree rotation. */
|
||||
c = 0;
|
||||
s = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Arbitrary rotation. */
|
||||
c = cosf(radians);
|
||||
s = sinf(radians);
|
||||
}
|
||||
|
||||
/*
|
||||
* [ c s ]
|
||||
* [ -s c ]
|
||||
* [ 0 0 ]
|
||||
*/
|
||||
result.M11 = c;
|
||||
result.M12 = s;
|
||||
result.M21 = -s;
|
||||
result.M22 = c;
|
||||
result.M31 = 0;
|
||||
result.M32 = 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline Snowstorm_Matrix3x2 Matrix3x2_Multiply(Snowstorm_Matrix3x2 m1, Snowstorm_Matrix3x2 m2)
|
||||
{
|
||||
Snowstorm_Matrix3x2 result;
|
||||
|
||||
/* First row */
|
||||
result.M11 = m1.M11 * m2.M11 + m1.M12 * m2.M21;
|
||||
result.M12 = m1.M11 * m2.M12 + m1.M12 * m2.M22;
|
||||
|
||||
/* Second row */
|
||||
result.M21 = m1.M21 * m2.M11 + m1.M22 * m2.M21;
|
||||
result.M22 = m1.M21 * m2.M12 + m1.M22 * m2.M22;
|
||||
|
||||
/* Third row */
|
||||
result.M31 = m1.M31 * m2.M11 + m1.M32 * m2.M21 + m2.M31;
|
||||
result.M32 = m1.M31 * m2.M12 + m1.M32 * m2.M22 + m2.M32;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline Snowstorm_Vector2 Vector2_Transform(Snowstorm_Vector2 vector, Snowstorm_Matrix3x2 matrix)
|
||||
{
|
||||
Snowstorm_Vector2 result;
|
||||
result.x = (vector.x * matrix.M11) + (vector.y * matrix.M21) + matrix.M31;
|
||||
result.y = (vector.x * matrix.M12) + (vector.y * matrix.M22) + matrix.M32;
|
||||
return result;
|
||||
}
|
||||
|
||||
typedef struct Snowstorm_Particle
|
||||
{
|
||||
float time;
|
||||
float timeRate;
|
||||
Snowstorm_Vector2 position;
|
||||
Snowstorm_Vector2 velocity;
|
||||
Snowstorm_Vector2 scale;
|
||||
|
@ -72,25 +205,28 @@ typedef struct Snowstorm_Particle
|
|||
float directionVariance;
|
||||
float speedVariance;
|
||||
Snowstorm_Vector2 catchup;
|
||||
|
||||
uint32_t uvIndex;
|
||||
} Snowstorm_Particle;
|
||||
|
||||
typedef struct Snowstorm_Context
|
||||
{
|
||||
Snowstorm_Particle** particles;
|
||||
Snowstorm_Particle* particles;
|
||||
uint32_t particleCount;
|
||||
uint32_t particleCapacity;
|
||||
|
||||
Snowstorm_Vector2 wind;
|
||||
|
||||
float directionChaos;
|
||||
float speedChaos;
|
||||
|
||||
float leftBound;
|
||||
float topBound;
|
||||
float rightBound;
|
||||
float bottomBound;
|
||||
} Snowstorm_Context;
|
||||
|
||||
static Snowstorm_Context* context = NULL;
|
||||
Snowstorm_UV* uvs;
|
||||
uint32_t uvCount;
|
||||
|
||||
uint8_t* currentBufferAddress; /* GM doesnt let you pass more than 4 arguments with different types lol */
|
||||
} Snowstorm_Context;
|
||||
|
||||
static inline float Approach(float value, float target, float maxChange)
|
||||
{
|
||||
|
@ -123,10 +259,14 @@ static inline float RandomRange(float min, float max)
|
|||
void Snowstorm_Init()
|
||||
{
|
||||
srand((unsigned int)time(NULL));
|
||||
}
|
||||
|
||||
context = malloc(sizeof(Snowstorm_Context));
|
||||
const char* Snowstorm_Create()
|
||||
{
|
||||
Snowstorm_Context *context = malloc(sizeof(Snowstorm_Context));
|
||||
|
||||
context->particles = NULL;
|
||||
context->particleCapacity = 128;
|
||||
context->particles = malloc(sizeof(Snowstorm_Particle) * context->particleCapacity);
|
||||
context->particleCount = 0;
|
||||
|
||||
context->leftBound = -10;
|
||||
|
@ -137,24 +277,48 @@ void Snowstorm_Init()
|
|||
context->wind.x = 0;
|
||||
context->wind.y = 0;
|
||||
|
||||
context->directionChaos = 0;
|
||||
context->speedChaos = 0;
|
||||
context->uvs = NULL;
|
||||
context->uvCount = 0;
|
||||
|
||||
context->currentBufferAddress = NULL;
|
||||
|
||||
return (const char*)context;
|
||||
}
|
||||
|
||||
void Snowstorm_Update(double delta)
|
||||
void Snowstorm_SetUVCount(const char *contextPointer, double count)
|
||||
{
|
||||
Snowstorm_Context *context = (Snowstorm_Context*)contextPointer;
|
||||
|
||||
context->uvCount = (uint32_t)count;
|
||||
context->uvs = realloc(context->uvs, sizeof(Snowstorm_UV) * context->uvCount);
|
||||
}
|
||||
|
||||
void Snowstorm_SetLeftTopUV(const char *contextPointer, double index, double left, double top)
|
||||
{
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
|
||||
context->uvs[(uint32_t)index].left = left;
|
||||
context->uvs[(uint32_t)index].top = top;
|
||||
}
|
||||
|
||||
void Snowstorm_SetRightBottomUV(const char* contextPointer, double index, double right, double bottom)
|
||||
{
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
|
||||
context->uvs[(uint32_t)index].right = right;
|
||||
context->uvs[(uint32_t)index].bottom = bottom;
|
||||
}
|
||||
|
||||
void Snowstorm_Update(const char *contextPointer)
|
||||
{
|
||||
uint32_t i;
|
||||
Snowstorm_Particle* particle = NULL;
|
||||
|
||||
float deltaTime = (float)delta;
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
|
||||
for (i = 0; i < context->particleCount; i += 1)
|
||||
{
|
||||
particle = context->particles[i];
|
||||
Snowstorm_Particle *particle = &context->particles[i];
|
||||
|
||||
if (particle != NULL)
|
||||
{
|
||||
particle->time += deltaTime;
|
||||
particle->time += particle->timeRate;
|
||||
|
||||
float speed = Vector2_Magnitude(particle->velocity);
|
||||
float rotation = sinf(particle->time / (speed * 100)) * particle->directionVariance;
|
||||
|
@ -177,24 +341,214 @@ void Snowstorm_Update(double delta)
|
|||
particle->rotation += particle->spin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Snowstorm_ApplyWind(double xSpeed, double ySpeed)
|
||||
void Snowstorm_ApplyChaos(const char* contextPointer, double directionChaos, double speedChaos)
|
||||
{
|
||||
uint32_t i;
|
||||
Snowstorm_Particle* particle;
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
|
||||
for (i = 0; i < context->particleCount; i += 1)
|
||||
{
|
||||
particle = context->particles[i];
|
||||
Snowstorm_Particle* particle = &context->particles[i];
|
||||
|
||||
if (particle != NULL)
|
||||
particle->directionVariance = RandomRange(-directionChaos, directionChaos);
|
||||
particle->speedVariance = RandomRange(-speedChaos, speedChaos);
|
||||
}
|
||||
}
|
||||
|
||||
void Snowstorm_ApplyWind(const char *contextPointer, double xSpeed, double ySpeed)
|
||||
{
|
||||
particle->directionVariance = RandomRange(-context->directionChaos, context->directionChaos);
|
||||
particle->speedVariance = RandomRange(-context->speedChaos, context->speedChaos);
|
||||
}
|
||||
}
|
||||
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
context->wind.x = (float)xSpeed;
|
||||
context->wind.y = (float)ySpeed;
|
||||
}
|
||||
|
||||
void Snowstorm_SetParticles(const char *contextPointer, double count)
|
||||
{
|
||||
uint32_t i;
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
|
||||
if (count > context->particleCapacity)
|
||||
{
|
||||
context->particleCapacity *= 2;
|
||||
context->particles = realloc(context->particles, sizeof(Snowstorm_Particle) * context->particleCapacity);
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i += 1)
|
||||
{
|
||||
Snowstorm_Particle* particle = &context->particles[i];
|
||||
|
||||
particle->time = 0;
|
||||
particle->timeRate = 0.7f + RandomRange(-0.3f, 0.3f);
|
||||
particle->position.x = RandomRange(context->leftBound, context->rightBound);
|
||||
particle->position.y = RandomRange(context->topBound, context->bottomBound);
|
||||
particle->directionVariance = 0;
|
||||
particle->speedVariance = 0;
|
||||
particle->catchup.x = RandomRange(0.2f, 1);
|
||||
particle->catchup.y = RandomRange(0.2f, 1);
|
||||
particle->velocity.x = context->wind.x;
|
||||
particle->velocity.y = context->wind.y;
|
||||
particle->size = 0.4f;
|
||||
particle->scale.x = particle->size;
|
||||
particle->scale.y = particle->size;
|
||||
particle->spin = RandomRange(-0.1745329f, 0.1745329f); /* 10 degrees */
|
||||
particle->rotation = 0;
|
||||
particle->uvIndex = rand() % context->uvCount;
|
||||
}
|
||||
}
|
||||
|
||||
void Snowstorm_SetBufferAddress(const char *contextPointer, const char* bufferAddress)
|
||||
{
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
context->currentBufferAddress = (uint8_t*)bufferAddress;
|
||||
}
|
||||
|
||||
double Snowstorm_RequiredSnowBufferSize(const char *contextPointer)
|
||||
{
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
return (double)context->particleCount * 6 * (sizeof(Snowstorm_Vector2) + sizeof(Snowstorm_Color) + (2 * sizeof(float)));
|
||||
}
|
||||
|
||||
double Snowstorm_FillSnowBuffer(const char *contextPointer)
|
||||
{
|
||||
uint32_t i, vertexCount;
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
uint8_t* bufferAddress = context->currentBufferAddress;
|
||||
|
||||
Snowstorm_Color color;
|
||||
color.r = 255;
|
||||
color.g = 255;
|
||||
color.b = 255;
|
||||
color.a = 255;
|
||||
|
||||
vertexCount = 0;
|
||||
|
||||
for (i = 0; i < context->particleCount; i += 1)
|
||||
{
|
||||
Snowstorm_Particle* particle = &context->particles[i];
|
||||
|
||||
Snowstorm_Vector2 leftTop;
|
||||
Snowstorm_Vector2 rightTop;
|
||||
Snowstorm_Vector2 leftBottom;
|
||||
Snowstorm_Vector2 rightBottom;
|
||||
|
||||
leftTop.x = -particle->scale.x;
|
||||
leftTop.y = -particle->scale.y;
|
||||
|
||||
rightTop.x = particle->scale.x;
|
||||
rightTop.y = -particle->scale.y;
|
||||
|
||||
leftBottom.x = -particle->scale.x;
|
||||
leftBottom.y = particle->scale.y;
|
||||
|
||||
rightBottom.x = particle->scale.x;
|
||||
rightBottom.y = particle->scale.y;
|
||||
|
||||
Snowstorm_Matrix3x2 translation = Matrix3x2_CreateTranslation(particle->position.x, particle->position.y);
|
||||
Snowstorm_Matrix3x2 rotation = Matrix3x2_CreateRotation(particle->rotation);
|
||||
Snowstorm_Matrix3x2 transform = Matrix3x2_Multiply(translation, rotation);
|
||||
|
||||
leftTop = Vector2_Transform(leftTop, transform);
|
||||
rightTop = Vector2_Transform(rightTop, transform);
|
||||
leftBottom = Vector2_Transform(leftBottom, transform);
|
||||
rightBottom = Vector2_Transform(rightBottom, transform);
|
||||
|
||||
float leftUV = context->uvs[particle->uvIndex].left;
|
||||
float topUV = context->uvs[particle->uvIndex].top;
|
||||
float rightUV = context->uvs[particle->uvIndex].right;
|
||||
float bottomUV = context->uvs[particle->uvIndex].bottom;
|
||||
|
||||
memcpy(bufferAddress, &leftTop, sizeof(Snowstorm_Vector2));
|
||||
bufferAddress += sizeof(Snowstorm_Vector2);
|
||||
|
||||
memcpy(bufferAddress, &color, sizeof(Snowstorm_Color));
|
||||
bufferAddress += sizeof(Snowstorm_Color);
|
||||
|
||||
memcpy(bufferAddress, &leftUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &topUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &rightTop, sizeof(Snowstorm_Vector2));
|
||||
bufferAddress += sizeof(Snowstorm_Vector2);
|
||||
|
||||
memcpy(bufferAddress, &color, sizeof(Snowstorm_Color));
|
||||
bufferAddress += sizeof(Snowstorm_Color);
|
||||
|
||||
memcpy(bufferAddress, &rightUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &topUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &leftBottom, sizeof(Snowstorm_Vector2));
|
||||
bufferAddress += sizeof(Snowstorm_Vector2);
|
||||
|
||||
memcpy(bufferAddress, &color, sizeof(Snowstorm_Color));
|
||||
bufferAddress += sizeof(Snowstorm_Color);
|
||||
|
||||
memcpy(bufferAddress, &leftUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &bottomUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &leftBottom, sizeof(Snowstorm_Vector2));
|
||||
bufferAddress += sizeof(Snowstorm_Vector2);
|
||||
|
||||
memcpy(bufferAddress, &color, sizeof(Snowstorm_Color));
|
||||
bufferAddress += sizeof(Snowstorm_Color);
|
||||
|
||||
memcpy(bufferAddress, &leftUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &bottomUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &rightTop, sizeof(Snowstorm_Vector2));
|
||||
bufferAddress += sizeof(Snowstorm_Vector2);
|
||||
|
||||
memcpy(bufferAddress, &color, sizeof(Snowstorm_Color));
|
||||
bufferAddress += sizeof(Snowstorm_Color);
|
||||
|
||||
memcpy(bufferAddress, &rightUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &topUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &rightBottom, sizeof(Snowstorm_Vector2));
|
||||
bufferAddress += sizeof(Snowstorm_Vector2);
|
||||
|
||||
memcpy(bufferAddress, &color, sizeof(Snowstorm_Color));
|
||||
bufferAddress += sizeof(Snowstorm_Color);
|
||||
|
||||
memcpy(bufferAddress, &rightUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
memcpy(bufferAddress, &bottomUV, sizeof(float));
|
||||
bufferAddress += sizeof(float);
|
||||
|
||||
vertexCount += 6;
|
||||
}
|
||||
|
||||
return (double)vertexCount;
|
||||
}
|
||||
|
||||
void Snowstorm_Destroy(const char *contextPointer)
|
||||
{
|
||||
Snowstorm_Context* context = (Snowstorm_Context*)contextPointer;
|
||||
|
||||
if (context->particles != NULL)
|
||||
{
|
||||
free(context->particles);
|
||||
}
|
||||
|
||||
if (context->uvs != NULL)
|
||||
{
|
||||
free(context->uvs);
|
||||
}
|
||||
|
||||
free(context);
|
||||
}
|
||||
|
|
|
@ -57,17 +57,23 @@ extern "C" {
|
|||
)
|
||||
|
||||
SNOWSTORMAPI void Snowstorm_Init();
|
||||
SNOWSTORMAPI void Snowstorm_Update(double delta);
|
||||
SNOWSTORMAPI void Snowstorm_ApplyWind(double xSpeed, double ySpeed);
|
||||
SNOWSTORMAPI const char* Snowstorm_Create(); /* have to return a string because game maker lol */
|
||||
SNOWSTORMAPI void Snowstorm_SetUVCount(const char *contextPointer, double count);
|
||||
/* i split these up because game maker cant have more than 4 arguments with different types lol */
|
||||
SNOWSTORMAPI void Snowstorm_SetLeftTopUV(const char *contextPointer, double index, double left, double top);
|
||||
SNOWSTORMAPI void Snowstorm_SetRightBottomUV(const char* contextPointer, double index, double right, double bottom);
|
||||
|
||||
SNOWSTORMAPI void Snowstorm_SetBuffer(const char* bufferId);
|
||||
SNOWSTORMAPI void Snowstorm_Update(const char *contextPointer);
|
||||
SNOWSTORMAPI void Snowstorm_ApplyWind(const char *contextPointer, double xSpeed, double ySpeed);
|
||||
SNOWSTORMAPI void Snowstorm_ApplyChaos(const char* contextPointer, double directionChaos, double speedChaos);
|
||||
SNOWSTORMAPI void Snowstorm_SetParticles(const char *contextPointer, double count);
|
||||
|
||||
SNOWSTORMAPI double Snowstorm_RequiredSnowBufferSize();
|
||||
SNOWSTORMAPI double Snowstorm_FillSnowBuffer();
|
||||
SNOWSTORMAPI void Snowstorm_SetBufferAddress(const char *contextPointer, const char* bufferId);
|
||||
|
||||
SNOWSTORMAPI void Snowstorm_PerformDestroys();
|
||||
SNOWSTORMAPI void Snowstorm_ClearAll();
|
||||
SNOWSTORMAPI void Snowstorm_Finish();
|
||||
SNOWSTORMAPI double Snowstorm_RequiredSnowBufferSize(const char *contextPointer);
|
||||
SNOWSTORMAPI double Snowstorm_FillSnowBuffer(const char *contextPointer);
|
||||
|
||||
SNOWSTORMAPI void Snowstorm_Destroy(const char *contextPointer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,31 +1,30 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31424.327
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.645
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Snowstorm", "Snowstorm.vcxproj", "{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Snowstorm", "Snowstorm.vcxproj", "{6DB15344-E000-45CB-A48A-1D72F7D6E945}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
MinSizeRel|x64 = MinSizeRel|x64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Debug|x64.Build.0 = Debug|x64
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Debug|x86.Build.0 = Debug|Win32
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Release|x64.ActiveCfg = Release|x64
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Release|x64.Build.0 = Release|x64
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Release|x86.ActiveCfg = Release|Win32
|
||||
{912587C6-EF96-4BF8-BFE8-0E7D8A70D556}.Release|x86.Build.0 = Release|Win32
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.Debug|x64.Build.0 = Debug|x64
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.Release|x64.ActiveCfg = Release|x64
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.Release|x64.Build.0 = Release|x64
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{6DB15344-E000-45CB-A48A-1D72F7D6E945}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {22EBBD2E-C8D7-4352-BF1B-8188D6AE4259}
|
||||
SolutionGuid = {7B2DB465-0A55-3811-9EF4-A520B47653D2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
@ -19,149 +19,77 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{912587c6-ef96-4bf8-bfe8-0e7d8a70d556}</ProjectGuid>
|
||||
<ProjectGuid>{4F20502A-F926-4D12-872D-64AC2E065078}</ProjectGuid>
|
||||
<RootNamespace>Snowstorm</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
<VcpkgManifestInstall>false</VcpkgManifestInstall>
|
||||
<VcpkgAutoLink>false</VcpkgAutoLink>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;SNOWSTORM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Default</LanguageStandard_C>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;SNOWSTORM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;SNOWSTORM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;SNOWSTORM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClCompile Include="..\src\snowstorm.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\src\snowstorm.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
Loading…
Reference in New Issue