ScummVM API documentation
GameLiquidArea.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_GAME_LIQUID_AREA_H
29
#define GAME_GAME_LIQUID_AREA_H
30
31
#include "hpl1/engine/engine.h"
32
#include "hpl1/penumbra-overture/GameEntity.h"
33
34
using namespace
hpl
;
35
36
//------------------------------------------
37
38
class
cGameLiquidArea_SaveData
:
public
iGameEntity_SaveData
{
39
kSerializableClassInit(
cGameLiquidArea_SaveData
);
40
41
public
:
42
cVector3f
mvSize;
43
44
float
mfDensity;
45
float
mfLinearViscosity;
46
float
mfAngularViscosity;
47
cColor
mColor;
48
49
tString
msPhysicsMaterial;
50
51
cPlanef
mSurfacePlane;
52
53
bool
mbHasWaves;
54
55
iGameEntity
*CreateEntity();
56
};
57
58
//------------------------------------------
59
60
class
cGameLiquidArea
:
public
iGameEntity
{
61
typedef
iGameEntity
super
;
62
friend
class
cAreaLoader_GameLiquidArea
;
63
64
public
:
65
cGameLiquidArea
(
cInit
*apInit,
const
tString
&asName);
66
~
cGameLiquidArea
(
void
);
67
68
void
OnPlayerPick();
69
70
void
Update(
float
afTimeStep);
71
72
void
SetDensity(
float
afX) { mfDensity = afX; }
73
void
SetLinearViscosity(
float
afX) { mfLinearViscosity = afX; }
74
void
SetAngularViscosity(
float
afX) { mfAngularViscosity = afX; }
75
void
SetPhysicsMaterial(
const
tString
asName);
76
void
SetColor(
const
cColor
&aColor) { mColor = aColor; }
77
void
SetHasWaves(
bool
abX) { mbHasWaves = abX; }
78
79
void
Setup();
80
81
iPhysicsMaterial
*GetPhysicsMaterial() {
return
mpPhysicsMaterial; }
82
83
// SaveObject implementation
84
iGameEntity_SaveData
*CreateSaveData();
85
void
SaveToSaveData(
iGameEntity_SaveData
*apSaveData);
86
void
LoadFromSaveData(
iGameEntity_SaveData
*apSaveData);
87
void
SetupSaveData(
iGameEntity_SaveData
*apSaveData);
88
89
private
:
90
void
SplashEffect(
iPhysicsBody
*apBody);
91
92
float
mfDensity;
93
float
mfLinearViscosity;
94
float
mfAngularViscosity;
95
cColor
mColor;
96
97
iPhysicsMaterial
*mpPhysicsMaterial;
98
99
bool
mbHasWaves;
100
float
mfWaveAmp;
101
float
mfWaveFreq;
102
103
float
mfTimeCount;
104
105
cPlanef
mSurfacePlane;
106
};
107
108
//------------------------------------------
109
110
class
cAreaLoader_GameLiquidArea
:
public
iArea3DLoader
{
111
112
public
:
113
cAreaLoader_GameLiquidArea
(
const
tString
&asName,
cInit
*apInit);
114
~
cAreaLoader_GameLiquidArea
();
115
116
iEntity3D
*Load(
const
tString
&asName,
const
cVector3f
&avSize,
const
cMatrixf
&a_mtxTransform,
cWorld3D
*apWorld);
117
118
private
:
119
cInit
*mpInit;
120
};
121
122
#endif // GAME_GAME_DAMAGE_AREA_H
hpl
Definition:
AI.h:36
Common::String
Definition:
str.h:59
cGameLiquidArea
Definition:
GameLiquidArea.h:60
cAreaLoader_GameLiquidArea
Definition:
GameLiquidArea.h:110
iGameEntity_SaveData
Definition:
GameEntity.h:76
hpl::cVector3< float >
cGameLiquidArea_SaveData
Definition:
GameLiquidArea.h:38
hpl::cPlane< float >
hpl::iPhysicsBody
Definition:
PhysicsBody.h:117
hpl::cWorld3D
Definition:
World3D.h:179
hpl::iPhysicsMaterial
Definition:
PhysicsMaterial.h:77
hpl::cColor
Definition:
Color.h:37
hpl::iEntity3D
Definition:
Entity3D.h:81
hpl::cMatrix< float >
hpl::iArea3DLoader
Definition:
Resources.h:133
iGameEntity
Definition:
GameEntity.h:126
cInit
Definition:
Init.h:70
engines
hpl1
penumbra-overture
GameLiquidArea.h
Generated on Fri Nov 22 2024 09:18:40 for ScummVM API documentation by
1.8.13