31 #include "hpl1/engine/engine.h" 35 #include "hpl1/penumbra-overture/GameTypes.h" 58 class cPlayerAmbientLight;
75 kSaveData_ClassInit(
cPlayer) public :
77 int mlStat_NumOfSaves;
82 virtual int GetSaveCreatePrio();
96 void Update(
float afTimeStep);
105 virtual void OnUpdate(
float afTimeStep) {}
109 float mfForwardSpeed;
110 float mfBackwardSpeed;
111 float mfSidewaySpeed;
114 float mfForwardDeacc;
116 float mfSidewayDeacc;
120 float mfHeadMoveSpeed;
121 float mfHeadMoveBackSpeed;
129 float mfHeightAddCount;
131 float mfHeightAddSpeed;
139 ePlayerMoveState mPrevMoveState;
141 ePlayerMoveState mType;
146 friend class cSaveData_cPlayer;
155 void MoveForwards(
float afMul,
float afTimeStep);
156 void MoveSideways(
float afMul,
float afTimeStep);
157 void AddYaw(
float afVal);
158 void AddPitch(
float afVal);
159 void Lean(
float afMul,
float afTimeStep);
161 void StartInteract();
175 void StartInteractMode();
177 void StartInventory();
179 void StartInventoryShortCut(
int alNum);
181 void StartFlashLightButton();
183 void StartGlowStickButton();
187 void SetStartPos(
const tString &asName);
189 void FootStep(
float afMul,
const tString &asType =
"",
bool abSkipCount =
false);
191 void ChangeState(ePlayerState aState);
192 void ChangeMoveState(ePlayerMoveState aState,
bool abSetHeadHeightDirectly =
false);
194 void AddCollideScript(eGameCollideScriptType aType,
const tString &asFunc,
const tString &asEntity);
195 void RemoveCollideScript(eGameCollideScriptType aType,
const tString &asFunc);
196 void RemoveCollideScriptWithChildEntity(
iGameEntity *apEntity);
197 void ClearCollideScripts();
199 void SetHealth(
float afX);
200 void AddHealth(
float afX);
201 float GetHealth() {
return mfHealth; }
202 void Damage(
float afDamage, ePlayerDamageType aType);
204 void DestroyWorldObjects();
213 void Update(
float afTimeStep);
216 void OnPostSceneDraw();
231 void SetActive(
bool abActive);
232 bool IsActive() {
return mbActive; }
234 void SetPushBody(
iPhysicsBody *apBody) { mpPushBody = apBody; }
237 float GetDefaultMass() {
return mfDefaultMass; }
239 float GetMass() {
return mfMass; }
240 void SetMass(
float afX);
242 void SetPower(
float afX);
243 void AddPower(
float afX);
244 float GetPower() {
return mfPower; }
247 cCamera3D *GetCamera() {
return mpCamera; }
250 float GetCrouchHeight() {
return mfCrouchHeight; }
252 float GetMaxPushDist() {
return mfMaxPushDist; }
253 float GetMaxPushSpeed() {
return mfMaxPushSpeed; }
254 cVector2f GetMaxPushHeadMovement() {
return mvMaxPushHeadMovement; }
255 cVector2f GetMinPushHeadMovement() {
return mvMinPushHeadMovement; }
257 float GetMaxMoveDist() {
return mfMaxMoveDist; }
259 float GetMaxGrabDist() {
return mfMaxGrabDist; }
261 float GetMaxUseItemDist() {
return mfMaxUseItemDist; }
263 void SetPrevMoveState(ePlayerMoveState aState);
264 iPlayerMoveState *GetMoveStateData(ePlayerMoveState aState) {
return mvMoveStates[aState]; }
265 ePlayerMoveState GetMoveState() {
return mMoveState; }
266 ePlayerState GetState() {
return mState; }
268 iPlayerState *GetStateData(ePlayerState aState) {
return mvStates[aState]; }
270 float GetSpeedMul() {
return mfSpeedMul; }
271 void SetSpeedMul(
float afSpeedMul);
273 float GetHealthSpeedMul() {
return mfHealthSpeedMul; }
274 void SetHealthSpeedMul(
float afHealthSpeedMul);
276 void SetHeadMoveSizeMul(
float afX) { mfHeadMoveSizeMul = afX; }
277 void SetHeadMoveSpeedMul(
float afX) { mfHeadMoveSpeedMul = afX; }
278 float GetHeadMoveSizeMul() {
return mfHeadMoveSizeMul; }
279 float GetHeadMoveSpeedMul() {
return mfHeadMoveSpeedMul; }
281 float GetLookSpeed() {
return mfLookSpeed; }
283 void SetCrossHairState(eCrossHairState aState) { mCrossHairState = aState; }
284 eCrossHairState GetCrossHairState() {
return mCrossHairState; }
288 float GetPickedDist();
292 float GetCameraHeightAdd() {
return mfCameraHeightAdd; }
293 bool IsMoving() {
return mbMoving; }
313 float GetHeightAdd() {
return mfHeightAdd; }
314 void SetHeightAdd(
float afX) { mfHeightAdd = afX; }
316 cInit *GetInit() {
return mpInit; }
318 cVector2f GetInteractMoveBorder() {
return mvInteractMoveBorder; }
320 cVector2f GetCrossHairPos() {
return mvCrossHairPos; }
321 void SetCrossHairPos(
const cVector2f &avPos) { mvCrossHairPos = avPos; }
322 bool AddCrossHairPos(
const cVector2f &avPos);
323 void ResetCrossHairPos() { mvCrossHairPos =
cVector2f(400, 300); }
325 void SetCurrentItem(
cInventoryItem *apItem) { mpCurrentItem = apItem; }
327 void SetItemFlash(
bool abX) { mbItemFlash = abX; }
332 bool GetLandedFromJump() {
return mbLandedFromJump; }
333 void SetLandedFromJump(
bool abX) { mbLandedFromJump = abX; }
335 void SetJumpButtonDown(
bool abX);
336 bool GetJumpButtonDown() {
return mbJumpButtonDown; }
337 float GetJumpCount() {
return mfJumpCount; }
338 float GetMaxJumpCount() {
return mfMaxJumpCount; }
342 int mlStat_NumOfSaves;
346 float mfForwardUpMul;
347 float mfForwardRightMul;
353 bool mbRotateWithPlayer;
354 bool mbUseNormalMass;
361 float mfCurrentMaxInteractDist;
364 bool mbGrabbingMoveBody;
365 bool mbProxyTouching;
366 float mfHapticTorqueMul;
368 bool mbDamageFromPos;
391 float mfCameraHeightAdd;
394 float mfCrouchHeight;
396 bool mbJumpButtonDown;
398 float mfMaxJumpCount;
400 bool mbLandedFromJump;
407 float mfMaxPushSpeed;
414 float mfMaxUseItemDist;
417 float mfHealthSpeedMul;
419 float mfHeadMoveSizeMul;
420 float mfHeadMoveSpeedMul;
459 ePlayerMoveState mMoveState;
462 eCrossHairState mCrossHairState;
476 bool mbUpdatingCollisionCallbacks;
482 bool mbShowSoundsPlaying;
487 #endif // GAME_PLAYER_H
Definition: PlayerHelper.h:229
Definition: PlayerHelper.h:301
Definition: PlayerHelper.h:487
Definition: PlayerHelper.h:42
Definition: font_data.h:67
Definition: PlayerState.h:45
Definition: PlayerHelper.h:345
Definition: PlayerHelper.h:572
Definition: PlayerHelper.h:102
T * iterator
Definition: array.h:54
Definition: ConfigFile.h:38
Definition: stablemap.h:43
Definition: SaveGame.h:130
Definition: GraphicsDrawer.h:77
Definition: PlayerHelper.h:140
Definition: PlayerHelper.h:262
Definition: PlayerHelper.h:72
Definition: PhysicsBody.h:117
Definition: PlayerHelper.h:168
Definition: Inventory.h:123
Definition: SaveGame.h:111
Definition: SaveHandler.h:172
Definition: SaveHandler.h:239
Definition: PlayerHelper.h:192
Definition: Updateable.h:35
Definition: PlayerHelper.h:54
Definition: PlayerHelper.h:436
Definition: PlayerHelper.h:404
Definition: PlayerHelper.h:461
Definition: Resources.h:160
Definition: CharacterBody.h:153
Definition: MathTypes.h:61
Definition: PlayerHelper.h:369
Definition: GameEntity.h:126
Definition: SaveGame.h:183
Definition: Graphics.h:46
Definition: Camera3D.h:53