Definition in file BattleSprite.h.
#include "..\AEngine\AEngine.h"
Include dependency graph for BattleSprite.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
| namespace | BattleSpriteTypes |
Compounds | |
| class | BattleSprite |
Functions | |
| void | updateParticleList (list< BattleSprite > &sprites) |
| void | renderParticleList (list< BattleSprite > &sprites) |
|
|
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