Definition in file BattleSprite.cpp.
#include "BattleSprite.h"
#include "Globals.h"
Include dependency graph for BattleSprite.cpp:
Go to the source code of this file.
Functions | |
| FLOAT | bridgeFunc (FLOAT x, FLOAT max) |
| void | updateParticleList (list< BattleSprite > &sprites) |
| void | renderParticleList (list< BattleSprite > &sprites) |
|
||||||||||||
|
Definition at line 29 of file BattleSprite.cpp. References absf. Referenced by renderParticleList().
00030 {
00031 FLOAT delta = 1.0f - 2.0f*absf(max-x)/max;
00032 return sqrtf(delta);
00033 }
|
|
|
Definition at line 48 of file BattleSprite.cpp. References Globals::artWork, ATexture, bridgeFunc(), sprite_add(), and Vec4D. Referenced by Overhead::overheadRender(), and BattleEntry::renderParticles().
00049 {
00050 list<BattleSprite>::iterator iter = sprites.begin();
00051 ATexture textures[6] = { artWork->smokeTextureSmall, artWork->smokeTextureLarge,
00052 artWork->exploTextureSmall, artWork->exploTextureLarge,
00053 artWork->artilTextureShell, artWork->exploTextureSmall };
00054 FLOAT maxTime[6] = { 65, 75, 20, 45, 15, 15 };
00055 FLOAT baseSize[6] = { 6.0f, 8.0f, 5.0f, 8.0f, 6.0f, 2.6f };
00056 int blendMode[6] = { BlendModes::MIX, BlendModes::MIX, BlendModes::ADD,
00057 BlendModes::ADD, BlendModes::ADD, BlendModes::ADD };
00058 while( iter!=sprites.end() )
00059 {
00060 int type = iter->type;
00061 FLOAT max = maxTime[type];
00062 FLOAT v = bridgeFunc( (FLOAT)iter->timeRemaining, max );
00063 Vec4D mult(1,1,1, v );
00064 FLOAT size = v + (max-iter->timeRemaining)/max;
00065 sprite_add( textures[type], blendMode[type], iter->pos, mult, size*baseSize[type] );
00066 iter++;
00067 }
00068 }
|
|
|
Definition at line 35 of file BattleSprite.cpp. Referenced by Overhead::overheadRender(), and BattleEntry::updateParticles().
00036 {
00037 list<BattleSprite>::iterator iter = sprites.begin();
00038 while( iter!=sprites.end() ) // delete those whose time ran out
00039 {
00040 int timeLeft = iter->timeRemaining--;
00041 list<BattleSprite>::iterator toDel(iter);
00042 iter++;
00043 if( timeLeft <= 0 )
00044 sprites.erase(toDel);
00045 }
00046 }
|
1.3-rc2