Advanced Strategic Command
Classes | Macros | Functions | Variables
attackpanel.cpp File Reference
#include <pgimage.h>
#include <pgtooltiphelp.h>
#include "attackpanel.h"
#include "../paradialog.h"
#include "../attack.h"
#include "../explosivemines.h"
#include "../iconrepository.h"
#include "../soundList.h"
#include "../gamemap.h"
#include "../events.h"
#include "../gameoptions.h"
#include "../windowing.h"
#include "../sdl/graphicsqueue.h"
#include <pgcolors.h>
Include dependency graph for attackpanel.cpp:

Go to the source code of this file.


class  GetAttackerImage
class  GetTargetImage
class  AttackPanel
class  BattleSoundPlayer




void waitWithUpdate (int millisecs)
 Waits the given time, but still updates the screen. More...
void showAttackAnimation (tfight &battle, GameMap *actmap, int ad, int dd)
 Performs the calculation of the attack and displays the result on screen. More...


const int maxdefenseshown = 2
const int maxattackshown = 2

Macro Definition Documentation


Definition at line 27 of file attackpanel.cpp.

Function Documentation

void showAttackAnimation ( tfight battle,
GameMap actmap,
int  ad = -1,
int  dd = -1 

Performs the calculation of the attack and displays the result on screen.

The result is not written to the involved units, this must be done separately.

battleThe fight executer
actmapthe map upon which the battle is fought
adAttacker damage override (used for replays)
ddTarget damage override (used for replays)

Definition at line 292 of file attackpanel.cpp.

References tfight::tavalues::attackbonus, CGameOptions::attackspeed1, CGameOptions::attackspeed2, CGameOptions::attackspeed3, tfight::av, tfight::calc(), tfight::tavalues::damage, AttackFormula::defense_defensebonus(), tfight::tavalues::defensebonus, tfight::dv, tfight::getAttackingPlayer(), Player::getColor(), tfight::getDefendingPlayer(), tfight::tavalues::hemming, CGameOptions::Instance(), lighten_Color(), maxattackshown, BattleSoundPlayer::playEnd(), GameMap::player, releasetimeslice(), AttackFormula::strength_attackbonus(), ticker, and waitWithUpdate().

Referenced by PG_MapDisplay::showBattle().

void waitWithUpdate ( int  millisecs)

Waits the given time, but still updates the screen.

These is of no use to the user, but are needed by the video recorder

Definition at line 273 of file attackpanel.cpp.

References CGameOptions::ascframeratelimit, CGameOptions::Instance(), postScreenUpdate, releasetimeslice(), ticker, and CGameOptions::video.

Referenced by showAttackAnimation().

Variable Documentation

const int maxattackshown = 2

Definition at line 267 of file attackpanel.cpp.

Referenced by showAttackAnimation().

const int maxdefenseshown = 2

Definition at line 266 of file attackpanel.cpp.