Difference between revisions of "DPS905 Kaitlyn ParticleEffects"
Line 10: | Line 10: | ||
INSTALLATION | INSTALLATION | ||
− | 1) | + | 1) Add the following files to your project: |
− | |||
− | Add the following files to your project: | ||
* [http://matrix.senecac.on.ca/~dacallow/DPS905/Particle.cpp Particle.cpp] | * [http://matrix.senecac.on.ca/~dacallow/DPS905/Particle.cpp Particle.cpp] | ||
Line 22: | Line 20: | ||
− | |||
− | Append onto the bottom of your existing Effects.fx file the contents of the following file: | + | 2) Append onto the bottom of your existing Effects.fx file the contents of the following file: |
+ | |||
* [http://matrix.senecac.on.ca/~dacallow/DPS905/effects.fx Effects.fx] | * [http://matrix.senecac.on.ca/~dacallow/DPS905/effects.fx Effects.fx] | ||
− | |||
− | |||
− | Modify iObject.h: | + | 3) Modify iObject.h: |
* Add to Class iObject... | * Add to Class iObject... | ||
Line 48: | Line 44: | ||
− | 4) | + | |
− | Modify Object.h | + | 4) Modify Object.h |
* Add to Class Object... | * Add to Class Object... | ||
void update(int now) { /* do nothing, added for particle effects & animations */ } | void update(int now) { /* do nothing, added for particle effects & animations */ } | ||
+ | |||
+ | |||
+ | |||
+ | 5) Modify Display.cpp | ||
+ | |||
+ | * Inside of method: bool Display::setup(void* hwnd) | ||
+ | |||
+ | near line 360 (beneath the comment "// setup successful") add... | ||
+ | ParticleVertex::device = d3dd; | ||
+ | ParticleVertexList::connectDevice(d3dd); | ||
+ | |||
+ | |||
+ | |||
+ | 6) |
Revision as of 18:07, 11 April 2011
************************************************************************************************** ** Particles * ************************************************************************************************** * April 2011 * By Kaitlyn Callow ( KaitlynCallow.com | dacallow@learn.senecac.on.ca ) * For DPS905, Professor Chris Szalwinski **************************************************************************************************
INSTALLATION
1) Add the following files to your project:
- Particle.cpp
- Particle.h
- ParticleGenerator.cpp
- ParticleGenerator.h
- ParticleVertexList.cpp
- ParticleVertexList.h
2) Append onto the bottom of your existing Effects.fx file the contents of the following file:
3) Modify iObject.h:
- Add to Class iObject...
//added for particle effects / animations virtual void update(int now) = 0;
- At the bottom of the file iObject.h add...
extern "C" iObject* CreateParticleGenerator(float _generatorlifespan, float _particlelifespan, float _particlespawnrate, float _spawnpositiondispersion, float _theta, float _startingspeed, Colour _startcolour, Colour _endcolour, float _frequencycolour, float _startsize, float _endsize, float _frequencysize, Vector _startgravity, Vector _endgravity, float _frequencygravityvertical, float _frequencygravityhorizontal, float _startalpha, float _endalpha, float _frequencyalpha, Colour* c, float* p);
4) Modify Object.h
- Add to Class Object...
void update(int now) { /* do nothing, added for particle effects & animations */ }
5) Modify Display.cpp
- Inside of method: bool Display::setup(void* hwnd)
near line 360 (beneath the comment "// setup successful") add...
ParticleVertex::device = d3dd; ParticleVertexList::connectDevice(d3dd);
6)