mirror of
https://github.com/ENSL/NS.git
synced 2024-11-21 20:21:14 +00:00
PR Merge of Patch 63 to Patch 61 (#6)
* handle particles project VC++ compilation errors with MVCS and project property changes - retarget to v142 platformtoolset - remove explicit windows SDK version; use latest by default - remove settings that are otherwise default values in project or are best determined by solution * attempt to handle clang++ issues regarding unsupported c++11 features * reset file changes to particledefs.h * removing PARTICLEDLL_API definition and replacing usage with extern "C" block statements * add g++ compiler option to specify c++11 standard * attempt to resolve forward enum errors by adding std to base cflags * replacing deprecated libstdc++ and removing -lstdc++ flag, updating MacOSX10 sdk version * small refactor to Makefiles, and add libstdc++ back to linux build * remove added type to enum * reset makefile changes that may be causing unexpected linux build failures * refactoring std=c++11 declarations in Makefile to mitgate linux build failing * ensure std is set for hl_cdll make * attempt to define a standard library to resolve vector initialization_list constructor issue * attempt to update MacOS sdk, set minimum os to be 10.7, and include export in travis ci to define deployment target
This commit is contained in:
parent
594c4a28f1
commit
36c78acbce
22 changed files with 1118 additions and 1138 deletions
|
@ -37,6 +37,7 @@ matrix:
|
|||
before_script:
|
||||
- export CC=clang
|
||||
- export CPLUS=clang++
|
||||
- export MACOSX_DEPLOYMENT_TARGET=10.10
|
||||
script: cd main/source/linux && make
|
||||
|
||||
allow_failures:
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<SccLocalPath />
|
||||
<SccProvider />
|
||||
<ProjectGuid>{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'" Label="Configuration">
|
||||
|
@ -22,7 +22,7 @@
|
|||
<UseOfMfc>false</UseOfMfc>
|
||||
<UseOfAtl>false</UseOfAtl>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
|
|
@ -107,17 +107,6 @@ int EV_TFC_IsAllyTeam( int iTeam1, int iTeam2 );
|
|||
void LoadData(void* inBuffer, const unsigned char* inData, int inSizeToCopy, int& inSizeVariable);
|
||||
void SaveData(unsigned char* inBuffer, const void* inData, int inSizeToCopy, int& inSizeVariable);
|
||||
|
||||
void Output(const char* szFormat, ...)
|
||||
{
|
||||
char szBuff[1024];
|
||||
va_list arg;
|
||||
va_start(arg, szFormat);
|
||||
_vsnprintf(szBuff, sizeof(szBuff), szFormat, arg);
|
||||
va_end(arg);
|
||||
|
||||
OutputDebugString(szBuff);
|
||||
}
|
||||
|
||||
int ScorePanel_InitializeDemoPlayback(int inSize, unsigned char* inBuffer)
|
||||
{
|
||||
int theBytesRead = 0;
|
||||
|
@ -398,6 +387,7 @@ ScorePanel::ScorePanel(int x, int y, int wide, int tall) : Panel(x, y, wide, tal
|
|||
m_pCloseButton->setFont(tfont);
|
||||
m_pCloseButton->setBoundKey( (char)255 );
|
||||
m_pCloseButton->setContentAlignment(Label::a_center);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
@ -1100,9 +1090,6 @@ void ScorePanel::FillGrid()
|
|||
}
|
||||
*/
|
||||
// set Player Color
|
||||
//Output((to_string(thePlayerId)+ string("\n")).c_str());
|
||||
//ConsolePrint((to_string(thePlayerId)+ string("\n")).c_str());
|
||||
|
||||
|
||||
|
||||
switch (theTeamNumber) {
|
||||
|
@ -1329,11 +1316,14 @@ void ScorePanel::FillGrid()
|
|||
// Parse color (last 3 bytes are the RGB values 1-9)
|
||||
string theColor = theCustomIcon.substr( strlen(theCustomIcon.c_str()) - 3, 3);
|
||||
|
||||
string rStr = theColor.substr(0, 1);
|
||||
string bStr = theColor.substr(1, 1);
|
||||
string gStr = theColor.substr(2, 1);
|
||||
|
||||
|
||||
int theRed = (MakeIntFromString(theColor.substr(0, 1))/9.0f)*255;
|
||||
int theGreen = (MakeIntFromString(theColor.substr(1, 1))/9.0f)*255;
|
||||
int theBlue = (MakeIntFromString(theColor.substr(2, 1))/9.0f)*255;
|
||||
//pass reference type
|
||||
int theRed = (MakeIntFromString(rStr) / 9.0f) * 255;
|
||||
int theGreen = (MakeIntFromString(bStr) / 9.0f) * 255;
|
||||
int theBlue = (MakeIntFromString(gStr) / 9.0f) * 255;
|
||||
|
||||
|
||||
pIcon->setColor(BuildColor(theRed, theGreen, theBlue, gHUD.GetGammaSlope()));
|
||||
|
@ -1364,12 +1354,6 @@ void ScorePanel::FillGrid()
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
/* case COLUMN_PLAYER_COLOR:
|
||||
Preparation for Player Color in own column
|
||||
pLabel->setImage(m_pCYellow);
|
||||
pLabel->setFgColorAsImageColor(false);
|
||||
m_pCYellow->setColor(BuildColor(255, 255, 255, gHUD.GetGammaSlope()));
|
||||
break;*/
|
||||
case COLUMN_SCORE:
|
||||
if(!theIsForEnemy && theLocalPlayerTeam != TEAM_IND || (gHUD.GetPlayMode() == PLAYMODE_OBSERVER))
|
||||
{
|
||||
|
|
Binary file not shown.
BIN
main/source/dlls/Playtest/vc142.idb
Normal file
BIN
main/source/dlls/Playtest/vc142.idb
Normal file
Binary file not shown.
|
@ -26,29 +26,29 @@
|
|||
<SccLocalPath />
|
||||
<SccProvider />
|
||||
<ProjectGuid>{BC87A180-F17B-83FC-5D7D-470FAD003ABC}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Playtest - balance disabled|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Developer - release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
|
|
@ -49,7 +49,7 @@ ifeq ($(OS),Darwin)
|
|||
endif
|
||||
|
||||
#SDKROOT ?= $(SDK_DIR)/MacOSX10.6.sdk
|
||||
SDKROOT ?= $(SDK_DIR)/MacOSX10.8.sdk
|
||||
SDKROOT ?= $(SDK_DIR)/MacOSX10.10.sdk
|
||||
|
||||
ARCH_FLAGS ?= -arch i386 -m32 -march=prescott -gdwarf-2 -g2 -Wno-typedef-redefinition -momit-leaf-frame-pointer -mtune=core2
|
||||
CPP_LIB=-lstdc++ -lpthread
|
||||
|
@ -58,10 +58,10 @@ ifeq ($(OS),Darwin)
|
|||
AR = libtool -static -o
|
||||
endif
|
||||
ifeq ($(origin CC), default)
|
||||
CC ="$(COMPILER_BIN_DIR)/clang -Qunused-arguments -isysroot $(SDKROOT) -mmacosx-version-min=10.5 -fasm-blocks -I$(SDKROOT)/usr/include/malloc $(ARCH_FLAGS)"
|
||||
CC ="$(COMPILER_BIN_DIR)/clang -Qunused-arguments -isysroot $(SDKROOT) -mmacosx-version-min=10.7 -fasm-blocks -I$(SDKROOT)/usr/include/malloc $(ARCH_FLAGS)"
|
||||
endif
|
||||
ifeq ($(origin CPLUS), default)
|
||||
CPLUS ="$(COMPILER_BIN_DIR)/clang++ -Qunused-arguments -isysroot $(SDKROOT) -mmacosx-version-min=10.5 -fasm-blocks -I$(SDKROOT)/usr/include/malloc $(ARCH_FLAGS)"
|
||||
CPLUS ="$(COMPILER_BIN_DIR)/clang++ -std=c++11 -Qunused-arguments -isysroot $(SDKROOT) -mmacosx-version-min=10.7 -fasm-blocks -I$(SDKROOT)/usr/include/malloc $(ARCH_FLAGS)"
|
||||
endif
|
||||
LINK ?= $(CPLUS)
|
||||
endif
|
||||
|
|
|
@ -32,14 +32,21 @@ INCLUDEDIRS= -I$(HL_SRC_DIR) -I$(NS_MOD_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PUBLIC_
|
|||
|
||||
ifeq ($(OS),Darwin)
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -L. libpng12.dylib -lz -framework Carbon -framework OpenGL vgui.dylib -L. -lSDL2-2.0.0 -L. libparticleMP.a
|
||||
DO_CC=$(CPLUS) -std=c++11 -stdlib=libc++ $(INCLUDEDIRS) $(CFLAGS) -o $@ -c $<
|
||||
DO_PUBLIC_CC=$(CPLUS) -std=c++11 -stdlib=libc++ $(COMMON_INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_COMMON_CC=$(CPLUS) -std=c++11 -stdlib=libc++ $(INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_PM_SHARED_CC=$(CPLUS) -std=c++11 -stdlib=libc++ $(INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
|
||||
else
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -lpng -lz -lfmod-3.75 -L$(CFG) vgui.so -L. libSDL2-2.0.so.0 -L. libparticleMP.a
|
||||
endif
|
||||
|
||||
DO_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) -o $@ -c $<
|
||||
DO_PUBLIC_CC=$(CPLUS) $(COMMON_INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_COMMON_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_PM_SHARED_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
|
||||
HL1_OBJS = \
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#endif
|
||||
|
||||
//#include <GL/gl.h>
|
||||
#include "common/triangleapi.h"
|
||||
#include "cl_dll/wrect.h"
|
||||
#include "cl_dll/cl_dll.h"
|
||||
#include "common/renderingconst.h"
|
||||
#include "particles/papi.h"
|
||||
#include "../common/triangleapi.h"
|
||||
#include "../cl_dll/wrect.h"
|
||||
#include "../cl_dll/cl_dll.h"
|
||||
#include "../common/renderingconst.h"
|
||||
#include "papi.h"
|
||||
|
||||
// XXX #include <iostream.h>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
######################################################################
|
||||
|
||||
C++ = g++ -m32
|
||||
C++ = g++ -std=c++11 -m32
|
||||
|
||||
GLUT_HOME =/usr/local/contrib/unmoderated
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#v4.0:v100
|
||||
Release|Win32|C:\Users\fabian\Downloads\NS\main\source\particles\|
|
Binary file not shown.
|
@ -7,7 +7,7 @@
|
|||
// added to an action list.
|
||||
|
||||
#include "general.h"
|
||||
#include "particles/papi.h"
|
||||
#include "papi.h"
|
||||
|
||||
extern void _pAddActionToList(ParticleAction *S, int size);
|
||||
extern void _pCallActionList(ParticleAction *pa, int num_actions,
|
||||
|
@ -33,7 +33,8 @@ void _pSendAction(ParticleAction *S, PActionEnum type, int size)
|
|||
}
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pAvoid(float magnitude, float epsilon, float look_ahead,
|
||||
extern "C" {
|
||||
void pAvoid(float magnitude, float epsilon, float look_ahead,
|
||||
PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
|
@ -49,7 +50,7 @@ PARTICLEDLL_API void pAvoid(float magnitude, float epsilon, float look_ahead,
|
|||
_pSendAction(&S, PAAvoidID, sizeof(PAAvoid));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pBounce(float friction, float resilience, float cutoff,
|
||||
void pBounce(float friction, float resilience, float cutoff,
|
||||
PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
|
@ -65,7 +66,7 @@ PARTICLEDLL_API void pBounce(float friction, float resilience, float cutoff,
|
|||
_pSendAction(&S, PABounceID, sizeof(PABounce));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pCopyVertexB(bool copy_pos, bool copy_vel)
|
||||
void pCopyVertexB(bool copy_pos, bool copy_vel)
|
||||
{
|
||||
PACopyVertexB S;
|
||||
|
||||
|
@ -75,7 +76,7 @@ PARTICLEDLL_API void pCopyVertexB(bool copy_pos, bool copy_vel)
|
|||
_pSendAction(&S, PACopyVertexBID, sizeof(PACopyVertexB));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pDamping(float damping_x, float damping_y, float damping_z,
|
||||
void pDamping(float damping_x, float damping_y, float damping_z,
|
||||
float vlow, float vhigh)
|
||||
{
|
||||
PADamping S;
|
||||
|
@ -87,7 +88,7 @@ PARTICLEDLL_API void pDamping(float damping_x, float damping_y, float damping_z,
|
|||
_pSendAction(&S, PADampingID, sizeof(PADamping));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pExplosion(float center_x, float center_y, float center_z, float velocity,
|
||||
void pExplosion(float center_x, float center_y, float center_z, float velocity,
|
||||
float magnitude, float stdev, float epsilon, float age)
|
||||
{
|
||||
PAExplosion S;
|
||||
|
@ -105,7 +106,7 @@ PARTICLEDLL_API void pExplosion(float center_x, float center_y, float center_z,
|
|||
_pSendAction(&S, PAExplosionID, sizeof(PAExplosion));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pFollow(float magnitude, float epsilon, float max_radius)
|
||||
void pFollow(float magnitude, float epsilon, float max_radius)
|
||||
{
|
||||
PAFollow S;
|
||||
|
||||
|
@ -116,7 +117,7 @@ PARTICLEDLL_API void pFollow(float magnitude, float epsilon, float max_radius)
|
|||
_pSendAction(&S, PAFollowID, sizeof(PAFollow));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pGravitate(float magnitude, float epsilon, float max_radius)
|
||||
void pGravitate(float magnitude, float epsilon, float max_radius)
|
||||
{
|
||||
PAGravitate S;
|
||||
|
||||
|
@ -127,7 +128,7 @@ PARTICLEDLL_API void pGravitate(float magnitude, float epsilon, float max_radius
|
|||
_pSendAction(&S, PAGravitateID, sizeof(PAGravitate));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pGravity(float dir_x, float dir_y, float dir_z)
|
||||
void pGravity(float dir_x, float dir_y, float dir_z)
|
||||
{
|
||||
PAGravity S;
|
||||
|
||||
|
@ -136,7 +137,7 @@ PARTICLEDLL_API void pGravity(float dir_x, float dir_y, float dir_z)
|
|||
_pSendAction(&S, PAGravityID, sizeof(PAGravity));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pJet(float center_x, float center_y, float center_z,
|
||||
void pJet(float center_x, float center_y, float center_z,
|
||||
float magnitude, float epsilon, float max_radius)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
@ -152,7 +153,7 @@ PARTICLEDLL_API void pJet(float center_x, float center_y, float center_z,
|
|||
_pSendAction(&S, PAJetID, sizeof(PAJet));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pKillOld(float age_limit, bool kill_less_than)
|
||||
void pKillOld(float age_limit, bool kill_less_than)
|
||||
{
|
||||
PAKillOld S;
|
||||
|
||||
|
@ -162,7 +163,7 @@ PARTICLEDLL_API void pKillOld(float age_limit, bool kill_less_than)
|
|||
_pSendAction(&S, PAKillOldID, sizeof(PAKillOld));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pMatchVelocity(float magnitude, float epsilon, float max_radius)
|
||||
void pMatchVelocity(float magnitude, float epsilon, float max_radius)
|
||||
{
|
||||
PAMatchVelocity S;
|
||||
|
||||
|
@ -173,14 +174,14 @@ PARTICLEDLL_API void pMatchVelocity(float magnitude, float epsilon, float max_ra
|
|||
_pSendAction(&S, PAMatchVelocityID, sizeof(PAMatchVelocity));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pMove()
|
||||
void pMove()
|
||||
{
|
||||
PAMove S;
|
||||
|
||||
_pSendAction(&S, PAMoveID, sizeof(PAMove));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pOrbitLine(float p_x, float p_y, float p_z,
|
||||
void pOrbitLine(float p_x, float p_y, float p_z,
|
||||
float axis_x, float axis_y, float axis_z,
|
||||
float magnitude, float epsilon, float max_radius)
|
||||
{
|
||||
|
@ -196,7 +197,7 @@ PARTICLEDLL_API void pOrbitLine(float p_x, float p_y, float p_z,
|
|||
_pSendAction(&S, PAOrbitLineID, sizeof(PAOrbitLine));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pOrbitPoint(float center_x, float center_y, float center_z,
|
||||
void pOrbitPoint(float center_x, float center_y, float center_z,
|
||||
float magnitude, float epsilon, float max_radius)
|
||||
{
|
||||
PAOrbitPoint S;
|
||||
|
@ -209,7 +210,7 @@ PARTICLEDLL_API void pOrbitPoint(float center_x, float center_y, float center_z,
|
|||
_pSendAction(&S, PAOrbitPointID, sizeof(PAOrbitPoint));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pRandomAccel(PDomainEnum dtype,
|
||||
void pRandomAccel(PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -221,7 +222,7 @@ PARTICLEDLL_API void pRandomAccel(PDomainEnum dtype,
|
|||
_pSendAction(&S, PARandomAccelID, sizeof(PARandomAccel));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pRandomDisplace(PDomainEnum dtype,
|
||||
void pRandomDisplace(PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -233,7 +234,7 @@ PARTICLEDLL_API void pRandomDisplace(PDomainEnum dtype,
|
|||
_pSendAction(&S, PARandomDisplaceID, sizeof(PARandomDisplace));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pRandomVelocity(PDomainEnum dtype,
|
||||
void pRandomVelocity(PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -245,7 +246,7 @@ PARTICLEDLL_API void pRandomVelocity(PDomainEnum dtype,
|
|||
_pSendAction(&S, PARandomVelocityID, sizeof(PARandomVelocity));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pRestore(float time_left)
|
||||
void pRestore(float time_left)
|
||||
{
|
||||
PARestore S;
|
||||
|
||||
|
@ -254,7 +255,7 @@ PARTICLEDLL_API void pRestore(float time_left)
|
|||
_pSendAction(&S, PARestoreID, sizeof(PARestore));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pSink(bool kill_inside, PDomainEnum dtype,
|
||||
void pSink(bool kill_inside, PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -267,7 +268,7 @@ PARTICLEDLL_API void pSink(bool kill_inside, PDomainEnum dtype,
|
|||
_pSendAction(&S, PASinkID, sizeof(PASink));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pSinkVelocity(bool kill_inside, PDomainEnum dtype,
|
||||
void pSinkVelocity(bool kill_inside, PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -280,7 +281,7 @@ PARTICLEDLL_API void pSinkVelocity(bool kill_inside, PDomainEnum dtype,
|
|||
_pSendAction(&S, PASinkVelocityID, sizeof(PASinkVelocity));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pSource(float particle_rate, PDomainEnum dtype,
|
||||
void pSource(float particle_rate, PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -303,7 +304,7 @@ PARTICLEDLL_API void pSource(float particle_rate, PDomainEnum dtype,
|
|||
_pSendAction(&S, PASourceID, sizeof(PASource));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pSpeedLimit(float min_speed, float max_speed)
|
||||
void pSpeedLimit(float min_speed, float max_speed)
|
||||
{
|
||||
PASpeedLimit S;
|
||||
|
||||
|
@ -313,7 +314,7 @@ PARTICLEDLL_API void pSpeedLimit(float min_speed, float max_speed)
|
|||
_pSendAction(&S, PASpeedLimitID, sizeof(PASpeedLimit));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pTargetColor(float color_x, float color_y, float color_z,
|
||||
void pTargetColor(float color_x, float color_y, float color_z,
|
||||
float alpha, float scale)
|
||||
{
|
||||
PATargetColor S;
|
||||
|
@ -325,7 +326,7 @@ PARTICLEDLL_API void pTargetColor(float color_x, float color_y, float color_z,
|
|||
_pSendAction(&S, PATargetColorID, sizeof(PATargetColor));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pTargetSize(float size_x, float size_y, float size_z,
|
||||
void pTargetSize(float size_x, float size_y, float size_z,
|
||||
float scale_x, float scale_y, float scale_z)
|
||||
{
|
||||
PATargetSize S;
|
||||
|
@ -336,7 +337,7 @@ PARTICLEDLL_API void pTargetSize(float size_x, float size_y, float size_z,
|
|||
_pSendAction(&S, PATargetSizeID, sizeof(PATargetSize));
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pTargetVelocity(float vel_x, float vel_y, float vel_z, float scale)
|
||||
void pTargetVelocity(float vel_x, float vel_y, float vel_z, float scale)
|
||||
{
|
||||
PATargetVelocity S;
|
||||
|
||||
|
@ -348,7 +349,7 @@ PARTICLEDLL_API void pTargetVelocity(float vel_x, float vel_y, float vel_z, floa
|
|||
|
||||
// If in immediate mode, quickly add a vertex.
|
||||
// If building an action list, call pSource.
|
||||
PARTICLEDLL_API void pVertex(float x, float y, float z)
|
||||
void pVertex(float x, float y, float z)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -374,7 +375,7 @@ PARTICLEDLL_API void pVertex(float x, float y, float z)
|
|||
_ps.pgrp->Add(pos, posB, siz, vel, col, _ps.Alpha, _ps.Age);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pVortex(float center_x, float center_y, float center_z,
|
||||
void pVortex(float center_x, float center_y, float center_z,
|
||||
float axis_x, float axis_y, float axis_z,
|
||||
float magnitude, float epsilon, float max_radius)
|
||||
{
|
||||
|
@ -389,3 +390,4 @@ PARTICLEDLL_API void pVortex(float center_x, float center_y, float center_z,
|
|||
|
||||
_pSendAction(&S, PAVortexID, sizeof(PAVortex));
|
||||
}
|
||||
}
|
4
main/source/particles/cpp.hint
Normal file
4
main/source/particles/cpp.hint
Normal file
|
@ -0,0 +1,4 @@
|
|||
// Hint files help the Visual Studio IDE interpret Visual C++ identifiers
|
||||
// such as names of functions and macros.
|
||||
// For more information see https://go.microsoft.com/fwlink/?linkid=865984
|
||||
#define PARTICLEDLL_API
|
|
@ -21,12 +21,14 @@
|
|||
|
||||
// XXX #include <iostream.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// Emit OpenGL calls to draw the particles. These are drawn with
|
||||
// whatever primitive type the user specified(GL_POINTS, for
|
||||
// example). The color and radius are set per primitive, by default.
|
||||
// For GL_LINES, the other vertex of the line is the velocity vector.
|
||||
// XXX const_size is ignored.
|
||||
PARTICLEDLL_API void pDrawGroupp(int primitive, bool const_size, bool const_color)
|
||||
void pDrawGroupp(int primitive, bool const_size, bool const_color)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -93,7 +95,7 @@ PARTICLEDLL_API void pDrawGroupp(int primitive, bool const_size, bool const_colo
|
|||
}
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pDrawGroupl(int dlist, bool const_size, bool const_color, bool const_rotation)
|
||||
void pDrawGroupl(int dlist, bool const_size, bool const_color, bool const_rotation)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -154,3 +156,4 @@ PARTICLEDLL_API void pDrawGroupl(int dlist, bool const_size, bool const_color, b
|
|||
glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,8 +22,6 @@
|
|||
#define drand48() (((float) rand())/((float) RAND_MAX))
|
||||
#define srand48(x) srand(x)
|
||||
|
||||
// This is because their stupid compiler thinks it's smart.
|
||||
#define inline __forceinline
|
||||
#endif
|
||||
|
||||
class pVector
|
||||
|
|
|
@ -14,188 +14,189 @@
|
|||
#define P_VERSION 120
|
||||
|
||||
// added <<< cgc >>>
|
||||
#include <p_vector.h>
|
||||
#include <general.h>
|
||||
#include <particledefs.h>
|
||||
#include "p_vector.h"
|
||||
#include "general.h"
|
||||
#include "particledefs.h"
|
||||
|
||||
// State setting calls
|
||||
|
||||
PARTICLEDLL_API void pColor(float red, float green, float blue, float alpha = 1.0f);
|
||||
extern "C" {
|
||||
void pColor(float red, float green, float blue, float alpha = 1.0f);
|
||||
|
||||
PARTICLEDLL_API void pColorD(float alpha, PDomainEnum dtype,
|
||||
void pColorD(float alpha, PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pSize(float size_x, float size_y = 1.0f, float size_z = 1.0f);
|
||||
void pSize(float size_x, float size_y = 1.0f, float size_z = 1.0f);
|
||||
|
||||
PARTICLEDLL_API void pSizeD(PDomainEnum dtype,
|
||||
void pSizeD(PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pStartingAge(float age, float sigma = 1.0f);
|
||||
void pStartingAge(float age, float sigma = 1.0f);
|
||||
|
||||
PARTICLEDLL_API void pTimeStep(float new_dt);
|
||||
void pTimeStep(float new_dt);
|
||||
|
||||
PARTICLEDLL_API void pVelocity(float x, float y, float z);
|
||||
void pVelocity(float x, float y, float z);
|
||||
|
||||
PARTICLEDLL_API void pVelocityD(PDomainEnum dtype,
|
||||
void pVelocityD(PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pVertexB(float x, float y, float z);
|
||||
void pVertexB(float x, float y, float z);
|
||||
|
||||
PARTICLEDLL_API void pVertexBD(PDomainEnum dtype,
|
||||
void pVertexBD(PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pVertexBTracks(bool track_vertex = true);
|
||||
void pVertexBTracks(bool track_vertex = true);
|
||||
|
||||
|
||||
// Action List Calls
|
||||
|
||||
PARTICLEDLL_API void pCallActionList(int action_list_num);
|
||||
void pCallActionList(int action_list_num);
|
||||
|
||||
PARTICLEDLL_API void pDeleteActionLists(int action_list_num, int action_list_count = 1);
|
||||
void pDeleteActionLists(int action_list_num, int action_list_count = 1);
|
||||
|
||||
PARTICLEDLL_API void pEndActionList();
|
||||
void pEndActionList();
|
||||
|
||||
PARTICLEDLL_API int pGenActionLists(int action_list_count = 1);
|
||||
int pGenActionLists(int action_list_count = 1);
|
||||
|
||||
PARTICLEDLL_API void pNewActionList(int action_list_num);
|
||||
void pNewActionList(int action_list_num);
|
||||
|
||||
|
||||
// Particle Group Calls
|
||||
|
||||
PARTICLEDLL_API ParticleGroup* pGetParticleGroupRef(int p_group_num);
|
||||
ParticleGroup* pGetParticleGroupRef(int p_group_num);
|
||||
|
||||
PARTICLEDLL_API void pCopyGroup(int p_src_group_num, int index = 0, int copy_count = P_MAXINT);
|
||||
void pCopyGroup(int p_src_group_num, int index = 0, int copy_count = P_MAXINT);
|
||||
|
||||
PARTICLEDLL_API void pCurrentGroup(int p_group_num);
|
||||
void pCurrentGroup(int p_group_num);
|
||||
|
||||
PARTICLEDLL_API ParticleGroup* pGetCurrentGroup(void);
|
||||
ParticleGroup* pGetCurrentGroup(void);
|
||||
|
||||
PARTICLEDLL_API void pDeleteParticleGroups(int p_group_num, int p_group_count = 1);
|
||||
void pDeleteParticleGroups(int p_group_num, int p_group_count = 1);
|
||||
|
||||
PARTICLEDLL_API void pDrawGroupl(int dlist, bool const_size = false,
|
||||
void pDrawGroupl(int dlist, bool const_size = false,
|
||||
bool const_color = false, bool const_rotation = false);
|
||||
|
||||
PARTICLEDLL_API void pDrawGroupp(int primitive, bool const_size = false,
|
||||
void pDrawGroupp(int primitive, bool const_size = false,
|
||||
bool const_color = false);
|
||||
|
||||
// Added <<< cgc >>>
|
||||
PARTICLEDLL_API void DrawGroupTriSplat(const pVector &view, const pVector &up, float size_scale = 1.0f, bool draw_tex=false, bool const_size=false, bool const_color=false);
|
||||
void DrawGroupTriSplat(const pVector& view, const pVector& up, float size_scale = 1.0f, bool draw_tex = false, bool const_size = false, bool const_color = false);
|
||||
// end
|
||||
|
||||
PARTICLEDLL_API int pGenParticleGroups(int p_group_count = 1, int max_particles = 0);
|
||||
int pGenParticleGroups(int p_group_count = 1, int max_particles = 0);
|
||||
|
||||
PARTICLEDLL_API int pGetGroupCount();
|
||||
int pGetGroupCount();
|
||||
|
||||
PARTICLEDLL_API int pGetParticles(int index, int count, float *position = NULL, float *color = NULL,
|
||||
int pGetParticles(int index, int count, float* position = NULL, float* color = NULL,
|
||||
float* vel = NULL, float* size = NULL, float* age = NULL);
|
||||
|
||||
PARTICLEDLL_API int pSetMaxParticles(int max_count);
|
||||
int pSetMaxParticles(int max_count);
|
||||
|
||||
|
||||
// Actions
|
||||
|
||||
PARTICLEDLL_API void pAvoid(float magnitude, float epsilon, float look_ahead,
|
||||
void pAvoid(float magnitude, float epsilon, float look_ahead,
|
||||
PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pBounce(float friction, float resilience, float cutoff,
|
||||
void pBounce(float friction, float resilience, float cutoff,
|
||||
PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pCopyVertexB(bool copy_pos = true, bool copy_vel = false);
|
||||
void pCopyVertexB(bool copy_pos = true, bool copy_vel = false);
|
||||
|
||||
PARTICLEDLL_API void pDamping(float damping_x, float damping_y, float damping_z,
|
||||
void pDamping(float damping_x, float damping_y, float damping_z,
|
||||
float vlow = 0.0f, float vhigh = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pExplosion(float center_x, float center_y, float center_z, float velocity,
|
||||
void pExplosion(float center_x, float center_y, float center_z, float velocity,
|
||||
float magnitude, float stdev, float epsilon = P_EPS, float age = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pFollow(float magnitude = 1.0f, float epsilon = P_EPS, float max_radius = P_MAXFLOAT);
|
||||
void pFollow(float magnitude = 1.0f, float epsilon = P_EPS, float max_radius = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pGravitate(float magnitude = 1.0f, float epsilon = P_EPS, float max_radius = P_MAXFLOAT);
|
||||
void pGravitate(float magnitude = 1.0f, float epsilon = P_EPS, float max_radius = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pGravity(float dir_x, float dir_y, float dir_z);
|
||||
void pGravity(float dir_x, float dir_y, float dir_z);
|
||||
|
||||
PARTICLEDLL_API void pJet(float center_x, float center_y, float center_z, float magnitude = 1.0f,
|
||||
void pJet(float center_x, float center_y, float center_z, float magnitude = 1.0f,
|
||||
float epsilon = P_EPS, float max_radius = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pKillOld(float age_limit, bool kill_less_than = false);
|
||||
void pKillOld(float age_limit, bool kill_less_than = false);
|
||||
|
||||
PARTICLEDLL_API void pMatchVelocity(float magnitude = 1.0f, float epsilon = P_EPS,
|
||||
void pMatchVelocity(float magnitude = 1.0f, float epsilon = P_EPS,
|
||||
float max_radius = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pMove();
|
||||
void pMove();
|
||||
|
||||
PARTICLEDLL_API void pOrbitLine(float p_x, float p_y, float p_z,
|
||||
void pOrbitLine(float p_x, float p_y, float p_z,
|
||||
float axis_x, float axis_y, float axis_z, float magnitude = 1.0f,
|
||||
float epsilon = P_EPS, float max_radius = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pOrbitPoint(float center_x, float center_y, float center_z,
|
||||
void pOrbitPoint(float center_x, float center_y, float center_z,
|
||||
float magnitude = 1.0f, float epsilon = P_EPS,
|
||||
float max_radius = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pRandomAccel(PDomainEnum dtype,
|
||||
void pRandomAccel(PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pRandomDisplace(PDomainEnum dtype,
|
||||
void pRandomDisplace(PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pRandomVelocity(PDomainEnum dtype,
|
||||
void pRandomVelocity(PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pRestore(float time);
|
||||
void pRestore(float time);
|
||||
|
||||
PARTICLEDLL_API void pShade(float color_x, float color_y, float color_z,
|
||||
void pShade(float color_x, float color_y, float color_z,
|
||||
float alpha, float scale);
|
||||
|
||||
PARTICLEDLL_API void pSink(bool kill_inside, PDomainEnum dtype,
|
||||
void pSink(bool kill_inside, PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pSinkVelocity(bool kill_inside, PDomainEnum dtype,
|
||||
void pSinkVelocity(bool kill_inside, PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pSource(float particle_rate, PDomainEnum dtype,
|
||||
void pSource(float particle_rate, PDomainEnum dtype,
|
||||
float a0 = 0.0f, float a1 = 0.0f, float a2 = 0.0f,
|
||||
float a3 = 0.0f, float a4 = 0.0f, float a5 = 0.0f,
|
||||
float a6 = 0.0f, float a7 = 0.0f, float a8 = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pSpeedLimit(float min_speed, float max_speed = P_MAXFLOAT);
|
||||
void pSpeedLimit(float min_speed, float max_speed = P_MAXFLOAT);
|
||||
|
||||
PARTICLEDLL_API void pTargetColor(float color_x, float color_y, float color_z,
|
||||
void pTargetColor(float color_x, float color_y, float color_z,
|
||||
float alpha, float scale);
|
||||
|
||||
PARTICLEDLL_API void pTargetSize(float size_x, float size_y, float size_z,
|
||||
void pTargetSize(float size_x, float size_y, float size_z,
|
||||
float scale_x = 0.0f, float scale_y = 0.0f, float scale_z = 0.0f);
|
||||
|
||||
PARTICLEDLL_API void pTargetVelocity(float vel_x, float vel_y, float vel_z, float scale);
|
||||
void pTargetVelocity(float vel_x, float vel_y, float vel_z, float scale);
|
||||
|
||||
PARTICLEDLL_API void pVertex(float x, float y, float z);
|
||||
void pVertex(float x, float y, float z);
|
||||
|
||||
PARTICLEDLL_API void pVortex(float center_x, float center_y, float center_z,
|
||||
void pVortex(float center_x, float center_y, float center_z,
|
||||
float axis_x, float axis_y, float axis_z,
|
||||
float magnitude = 1.0f, float epsilon = P_EPS,
|
||||
float max_radius = P_MAXFLOAT);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -11,22 +11,6 @@
|
|||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
|
||||
// removed <<< cgc >>>
|
||||
//#ifdef PARTICLEDLL_EXPORTS
|
||||
//#define PARTICLEDLL_API __declspec(dllexport)
|
||||
//#else
|
||||
//#define PARTICLEDLL_API __declspec(dllimport)
|
||||
//#endif
|
||||
#define PARTICLEDLL_API extern "C"
|
||||
|
||||
// removed <<< cgc >>>
|
||||
#else
|
||||
#define PARTICLEDLL_API
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4244)
|
||||
#endif
|
||||
|
||||
|
@ -43,7 +27,8 @@
|
|||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Type codes for domains
|
||||
PARTICLEDLL_API enum PDomainEnum
|
||||
extern "C" {
|
||||
enum PDomainEnum
|
||||
{
|
||||
PDPoint = 0, // Single point
|
||||
PDLine = 1, // Line segment
|
||||
|
@ -57,7 +42,7 @@ PARTICLEDLL_API enum PDomainEnum
|
|||
PDDisc = 9, // Arbitrarily-oriented disc
|
||||
PDRectangle = 10 // Rhombus-shaped planar region
|
||||
};
|
||||
|
||||
}
|
||||
// A single particle
|
||||
struct Particle
|
||||
{
|
||||
|
|
|
@ -12,25 +12,22 @@
|
|||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5AADD469-7488-4B34-A9FD-01CFAC5972FD}</ProjectGuid>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>particles</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
@ -44,18 +41,16 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;..;</IncludePath>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);../common;../public</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;.;$(VCToolsInstallDir)\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared;..;../common;../public</IncludePath>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);../common;../public</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -67,10 +62,7 @@
|
|||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>$(VCInstallDir)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>$(FrameworkPathOverride)</AdditionalUsingDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -84,6 +76,7 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cpp.hint" />
|
||||
<None Include="Overview.txt" />
|
||||
<None Include="PS Docs.htm">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<None Include="PS Docs.htm" />
|
||||
<None Include="Overview.txt" />
|
||||
<None Include="Readme.txt" />
|
||||
<None Include="cpp.hint" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="general.h">
|
||||
|
|
|
@ -417,7 +417,9 @@ void _pAddActionToList(ParticleAction *S, int size)
|
|||
////////////////////////////////////////////////////////
|
||||
// State setting calls
|
||||
|
||||
PARTICLEDLL_API void pColor(float red, float green, float blue, float alpha)
|
||||
extern "C" {
|
||||
|
||||
void pColor(float red, float green, float blue, float alpha)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -425,7 +427,7 @@ PARTICLEDLL_API void pColor(float red, float green, float blue, float alpha)
|
|||
_ps.Color = pDomain(PDPoint, red, green, blue);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pColorD(float alpha, PDomainEnum dtype,
|
||||
void pColorD(float alpha, PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -436,14 +438,14 @@ PARTICLEDLL_API void pColorD(float alpha, PDomainEnum dtype,
|
|||
_ps.Color = pDomain(dtype, a0, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pVelocity(float x, float y, float z)
|
||||
void pVelocity(float x, float y, float z)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
_ps.Vel = pDomain(PDPoint, x, y, z);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pVelocityD(PDomainEnum dtype,
|
||||
void pVelocityD(PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -453,14 +455,14 @@ PARTICLEDLL_API void pVelocityD(PDomainEnum dtype,
|
|||
_ps.Vel = pDomain(dtype, a0, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pVertexB(float x, float y, float z)
|
||||
void pVertexB(float x, float y, float z)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
_ps.VertexB = pDomain(PDPoint, x, y, z);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pVertexBD(PDomainEnum dtype,
|
||||
void pVertexBD(PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -471,21 +473,21 @@ PARTICLEDLL_API void pVertexBD(PDomainEnum dtype,
|
|||
}
|
||||
|
||||
|
||||
PARTICLEDLL_API void pVertexBTracks(bool trackVertex)
|
||||
void pVertexBTracks(bool trackVertex)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
_ps.vertexB_tracks = trackVertex;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pSize(float size_x, float size_y, float size_z)
|
||||
void pSize(float size_x, float size_y, float size_z)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
_ps.Size = pDomain(PDPoint, size_x, size_y, size_z);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pSizeD(PDomainEnum dtype,
|
||||
void pSizeD(PDomainEnum dtype,
|
||||
float a0, float a1, float a2,
|
||||
float a3, float a4, float a5,
|
||||
float a6, float a7, float a8)
|
||||
|
@ -495,7 +497,7 @@ PARTICLEDLL_API void pSizeD(PDomainEnum dtype,
|
|||
_ps.Size = pDomain(dtype, a0, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pStartingAge(float age, float sigma)
|
||||
void pStartingAge(float age, float sigma)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -503,7 +505,7 @@ PARTICLEDLL_API void pStartingAge(float age, float sigma)
|
|||
_ps.AgeSigma = sigma;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pTimeStep(float newDT)
|
||||
void pTimeStep(float newDT)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -513,7 +515,7 @@ PARTICLEDLL_API void pTimeStep(float newDT)
|
|||
////////////////////////////////////////////////////////
|
||||
// Action List Calls
|
||||
|
||||
PARTICLEDLL_API int pGenActionLists(int action_list_count)
|
||||
int pGenActionLists(int action_list_count)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -537,7 +539,7 @@ PARTICLEDLL_API int pGenActionLists(int action_list_count)
|
|||
return ind;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pNewActionList(int action_list_num)
|
||||
void pNewActionList(int action_list_num)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -556,7 +558,7 @@ PARTICLEDLL_API void pNewActionList(int action_list_num)
|
|||
_ps.pact->count = 1;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pEndActionList()
|
||||
void pEndActionList()
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -569,7 +571,7 @@ PARTICLEDLL_API void pEndActionList()
|
|||
_ps.list_id = -1;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pDeleteActionLists(int action_list_num, int action_list_count)
|
||||
void pDeleteActionLists(int action_list_num, int action_list_count)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -601,7 +603,7 @@ PARTICLEDLL_API void pDeleteActionLists(int action_list_num, int action_list_cou
|
|||
_PUnLock();
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pCallActionList(int action_list_num)
|
||||
void pCallActionList(int action_list_num)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -639,7 +641,7 @@ PARTICLEDLL_API void pCallActionList(int action_list_num)
|
|||
// Particle Group Calls
|
||||
|
||||
// Create particle groups, each with max_particles allocated.
|
||||
PARTICLEDLL_API int pGenParticleGroups(int p_group_count, int max_particles)
|
||||
int pGenParticleGroups(int p_group_count, int max_particles)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -665,7 +667,7 @@ PARTICLEDLL_API int pGenParticleGroups(int p_group_count, int max_particles)
|
|||
return ind;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API void pDeleteParticleGroups(int p_group_num, int p_group_count)
|
||||
void pDeleteParticleGroups(int p_group_num, int p_group_count)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -695,7 +697,7 @@ PARTICLEDLL_API void pDeleteParticleGroups(int p_group_num, int p_group_count)
|
|||
}
|
||||
|
||||
// Change which group is current.
|
||||
PARTICLEDLL_API void pCurrentGroup(int p_group_num)
|
||||
void pCurrentGroup(int p_group_num)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -709,7 +711,7 @@ PARTICLEDLL_API void pCurrentGroup(int p_group_num)
|
|||
_ps.group_id = -1;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API ParticleGroup* pGetCurrentGroup(void)
|
||||
ParticleGroup* pGetCurrentGroup(void)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
ParticleGroup* pg = _ps.pgrp;
|
||||
|
@ -717,7 +719,7 @@ PARTICLEDLL_API ParticleGroup* pGetCurrentGroup(void)
|
|||
}
|
||||
|
||||
// Change the maximum number of particles in the current group.
|
||||
PARTICLEDLL_API int pSetMaxParticles(int max_count)
|
||||
int pSetMaxParticles(int max_count)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -772,7 +774,7 @@ PARTICLEDLL_API int pSetMaxParticles(int max_count)
|
|||
}
|
||||
|
||||
// Copy from the specified group to the current group.
|
||||
PARTICLEDLL_API void pCopyGroup(int p_src_group_num, int index, int copy_count)
|
||||
void pCopyGroup(int p_src_group_num, int index, int copy_count)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -809,7 +811,7 @@ PARTICLEDLL_API void pCopyGroup(int p_src_group_num, int index, int copy_count)
|
|||
destgrp->p_count += ccount;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API ParticleGroup* pGetParticleGroupRef(int p_group_num)
|
||||
ParticleGroup* pGetParticleGroupRef(int p_group_num)
|
||||
{
|
||||
ParticleGroup* theGroup = NULL;
|
||||
|
||||
|
@ -823,7 +825,7 @@ PARTICLEDLL_API ParticleGroup* pGetParticleGroupRef(int p_group_num)
|
|||
}
|
||||
|
||||
// Copy from the current group to application memory.
|
||||
PARTICLEDLL_API int pGetParticles(int index, int count, float *verts,
|
||||
int pGetParticles(int index, int count, float* verts,
|
||||
float* color, float* vel, float* size, float* age)
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
@ -894,7 +896,7 @@ PARTICLEDLL_API int pGetParticles(int index, int count, float *verts,
|
|||
}
|
||||
|
||||
// Returns the number of particles currently in the group.
|
||||
PARTICLEDLL_API int pGetGroupCount()
|
||||
int pGetGroupCount()
|
||||
{
|
||||
_ParticleState& _ps = _GetPState();
|
||||
|
||||
|
@ -906,3 +908,4 @@ PARTICLEDLL_API int pGetGroupCount()
|
|||
|
||||
return _ps.pgrp->p_count;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue