Skip to content
Newer
Older
100644 95 lines (75 sloc) 2.25 KB
2b48c0e Initial Open Source Release
Frictional Games authored May 12, 2010
1 /*
2 * Copyright (C) 2006-2010 - Frictional Games
3 *
4 * This file is part of Penumbra Overture.
5 *
6 * Penumbra Overture is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Penumbra Overture is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Penumbra Overture. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef GAME_GAME_LINK_H
20 #define GAME_GAME_LINK_H
21
22 #include "StdAfx.h"
23 #include "GameEntity.h"
24
25 using namespace hpl;
26
27 //-----------------------------------------
28
29 class cGameLink_SaveData : public iGameEntity_SaveData
30 {
31 kSerializableClassInit(cGameLink_SaveData);
32 public:
33 cVector3f mvSize;
34
35 tString msMapFile;
36 tString msMapPos;
37 tString msStartSound;
38 tString msStopSound;
39 float mfFadeOutTime;
40 float mfFadeInTime;
41 tString msLoadTextCat;
42 tString msLoadTextEntry;
43
44 iGameEntity* CreateEntity();
45 };
46
47 //------------------------------------------
48
49 class cGameLink : public iGameEntity
50 {
51 #ifdef __GNUC__
52 typedef iGameEntity __super;
53 #endif
54 friend class cAreaLoader_GameLink;
55 public:
56 cGameLink(cInit *apInit,const tString& asName);
57 ~cGameLink(void);
58
59 void OnPlayerPick();
60 void OnPlayerInteract();
61
62 tString msMapFile;
63 tString msMapPos;
64 tString msStartSound;
65 tString msStopSound;
66 float mfFadeOutTime;
67 float mfFadeInTime;
68 tString msLoadTextCat;
69 tString msLoadTextEntry;
70
71 //SaveObject implementation
72 iGameEntity_SaveData* CreateSaveData();
73 void SaveToSaveData(iGameEntity_SaveData *apSaveData);
74 void LoadFromSaveData(iGameEntity_SaveData *apSaveData);
75 };
76
77 //--------------------------------------
78
79 class cAreaLoader_GameLink : public iArea3DLoader
80 {
81
82 public:
83 cAreaLoader_GameLink(const tString &asName, cInit *apInit);
84 ~cAreaLoader_GameLink();
85
86 iEntity3D* Load(const tString &asName, const cVector3f &avSize, const cMatrixf &a_mtxTransform,cWorld3D *apWorld);
87
88 private:
89
90 cInit *mpInit;
91 };
92
93
94 #endif // GAME_GAME_LINK_H
Something went wrong with that request. Please try again.