Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / client / src / attack.h
blob068132008cbc0b77d760c80e4f824a160fbf0fd8
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CL_CREATURE_ATTACK_H
20 #define CL_CREATURE_ATTACK_H
22 #include "animation_fx.h"
23 #include "animation_fx.h"
25 #include "nel/misc/string_conversion.h"
27 namespace NL3D
29 class UAnimationSet;
33 class CCreatureAttackSheet;
35 /** Description of a creature attack
37 class CCreatureAttack
39 public:
40 // pointer on base sheet
41 const CCreatureAttackSheet *Sheet;
42 // anim fx set for attack part
43 CAnimationFXSet AttackFXSet;
44 // anim fx set for custom projectile part (whether custom projectile is used is told in 'Sheet');
45 CAnimationFXSet ProjectileFXSet;
46 // anim fx set for custom impact part (whether custom impact is used is told in 'Sheet');
47 CAnimationFXSet ImpactFXSet;
48 public:
49 // ctor
50 CCreatureAttack();
51 // Init from parent sheet
52 void init(const CCreatureAttackSheet *sheet, NL3D::UAnimationSet *as);
55 /** gather all creature attack in a single place
57 class CCreatureAttackDictionnary
59 public:
60 // get the unique instance of this class
61 static CCreatureAttackDictionnary &getInstance();
62 /** This :
63 * - Init an animation set.
64 * - Build all creature attacks datas and build their tracks.
66 void init();
67 void release();
68 // get creature attack by its name (case unsensitive)
69 const CCreatureAttack *getAttackByName(const std::string &name) const;
70 private:
71 typedef std::map<std::string,
72 CCreatureAttack,
73 NLMISC::CUnsensitiveStrLessPred> TAttackMap;
74 NL3D::UAnimationSet *_AnimationSet;
75 static CCreatureAttackDictionnary *_Instance;
76 TAttackMap _AttackMap;
81 #endif