ScummVM API documentation
HudModel_Throw.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * Copyright (C) 2006-2010 - Frictional Games
24  *
25  * This file is part of Penumbra Overture.
26  */
27 
28 #ifndef GAME_HUD_MODEL_THROW_H
29 #define GAME_HUD_MODEL_THROW_H
30 
31 #include "hpl1/engine/engine.h"
32 #include "hpl1/penumbra-overture/GameTypes.h"
33 
34 #include "hpl1/penumbra-overture/PlayerHands.h"
35 
36 using namespace hpl;
37 
38 class cInventoryItem;
39 
40 //-------------------------------------------
41 
42 class cHudModel_Throw : public iHudModel {
43  friend class cPlayerHands;
44 
45 public:
47 
48  void LoadData(TiXmlElement *apRootElem);
49 
50  void OnStart();
51 
52  void OnAttackDown();
53  void OnAttackUp();
54 
55  bool OnMouseMove(const cVector2f &avMovement);
56 
57  bool UpdatePoseMatrix(cMatrixf &aPoseMtx, float afTimeStep);
58 
59  void SetItem(cInventoryItem *apItem) { mpItem = apItem; }
60 
61 private:
62  void ResetExtraData();
63 
64  bool mbButtonDown;
65  float mfChargeCount;
66 
67  cHudModelPose mChargePose;
68 
69  float mfChargeTime;
70  float mfMinImpulse;
71  float mfMaxImpulse;
72 
73  float mfReloadTime;
74 
75  cVector3f mvTorque;
76 
77  tString msChargeSound;
78  tString msThrowSound;
79 
80  tString msThrowEntity;
81 
82  cInventoryItem *mpItem;
83 };
84 
85 //-------------------------------------------
86 
87 #endif // GAME_HUD_MODEL_THROW_H
Definition: AI.h:36
Definition: str.h:59
Definition: HudModel_Throw.h:42
Definition: PlayerHands.h:40
Definition: Inventory.h:123
Definition: PlayerHands.h:74
Definition: tinyxml.h:864
Definition: PlayerHands.h:159