Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

C++ and PR_SetParticleDrawProc

Started by astu Feb 25, 2000 at 3:07 AM 1 replies 750+ views
Original Post
astu
astu
What is it I couldn''t get PR_SetParticleDrawProc to work with c++? I have void DrawParticle(PR_PARTICLE *particle); and I''m trying to give it as a second parameter to void PR_SetParticleDrawProc (PR_DWORD partnum, void (*drawproc)(void *particle)) What should i do? PR_SetParticleDrawProc(0,DrawParticle) doesn''t work like in pure C-source. It''s too bad every example is C but not C++. Maybe this is a stupid question, but I just can''t get it work.
astu.
Pinky
Pinky
HI!
I am not sure, but try this :

#ifdef __cplusplus
extern "C" {
#endif

void DrawParticle(PR_PARTICLE *particle)
{
.
.
.

}


#ifdef __cplusplus
}
#endif


if the func is part of a Class,
define it as "static"


Pinky.
ICQ 42026534


Edited by - Pinky on 2/26/00 3:11:49 AM
Pinky.
ICQ 42026534
astu
astu

That doesn''t help at all.
Those particle-routines have bored me enough, I had
forgotten them and currently I am not trying to get them work.
Well, thanks anyway for a good try.

-astu

astu.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.