ScummVM API documentation
PlayerState_Weapon.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_PLAYER_STATE_WEAPON_H
29#define GAME_PLAYER_STATE_WEAPON_H
30
31#include "hpl1/engine/engine.h"
32#include "hpl1/penumbra-overture/PlayerState.h"
33
34using namespace hpl;
35
36//-----------------------------------------------------------------
37
39// THROW STATE
41
42class cHudModel_Throw;
43
45public:
46 cPlayerState_Throw(cInit *apInit, cPlayer *apPlayer);
47
48 void OnUpdate(float afTimeStep);
49
50 void OnDraw();
51 void OnPostSceneDraw();
52
53 bool OnJump();
54
55 void OnStartInteractMode();
56
57 void OnStartInteract();
58 void OnStopInteract();
59 void OnStartExamine();
60 void OnStartHolster();
61
62 bool OnAddYaw(float afVal);
63 bool OnAddPitch(float afVal);
64
65 bool OnMoveForwards(float afMul, float afTimeStep);
66 bool OnMoveSideways(float afMul, float afTimeStep);
67
68 void EnterState(iPlayerState *apPrevState);
69 void LeaveState(iPlayerState *apNextState);
70
71 void OnStartRun();
72 void OnStopRun();
73
74 void OnStartCrouch();
75 void OnStopCrouch();
76
77 bool OnStartInventory();
78 bool OnStartInventoryShortCut(int alNum);
79
80 void SetHudObject(cHudModel_Throw *apHudObject) { mpHudObject = apHudObject; }
81
82private:
83 cHudModel_Throw *mpHudObject;
84 float mfLastForward;
85 float mfLastSideways;
86};
87
88//-----------------------------------------------------------------
89
91// WEAPON MELEE STATE
93
95
97public:
98 cPlayerState_WeaponMelee(cInit *apInit, cPlayer *apPlayer);
99
100 void OnUpdate(float afTimeStep);
101
102 void OnDraw();
103 void OnPostSceneDraw();
104
105 bool OnJump();
106
107 void OnStartInteractMode();
108
109 void OnStartInteract();
110 void OnStopInteract();
111 void OnStartExamine();
112 void OnStartHolster();
113
114 bool OnAddYaw(float afVal);
115 bool OnAddPitch(float afVal);
116
117 bool OnMoveForwards(float afMul, float afTimeStep);
118 bool OnMoveSideways(float afMul, float afTimeStep);
119
120 void EnterState(iPlayerState *apPrevState);
121 void LeaveState(iPlayerState *apNextState);
122
123 void OnStartRun();
124 void OnStopRun();
125
126 void OnStartCrouch();
127 void OnStopCrouch();
128
129 bool OnStartInventory();
130 bool OnStartInventoryShortCut(int alNum);
131
132 void SetHudWeapon(cHudModel_WeaponMelee *apHudWeapon) { mpHudWeapon = apHudWeapon; }
133
134private:
135 cHudModel_WeaponMelee *mpHudWeapon;
136 float mfLastForward;
137 float mfLastSideways;
138};
139
140//-----------------------------------------------------------------
141
142#endif // GAME_PLAYER_STATE_WEAPON_H
Definition: HudModel_Throw.h:42
Definition: HudModel_Weapon.h:92
Definition: Init.h:70
Definition: Player.h:145
Definition: PlayerState_Weapon.h:44
Definition: PlayerState_Weapon.h:96
Definition: PlayerState.h:45