ScummVM API documentation
PreMenu.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_PRE_MENU_H
29#define GAME_PRE_MENU_H
30
31#include "hpl1/engine/engine.h"
32
33#include "hpl1/penumbra-overture/GameTypes.h"
34
35using namespace hpl;
36
37class cRaindrop {
38public:
39 cVector2f vPos;
40 cVector2f vDir;
41 float fLength;
42 float fColor;
43
44 cGfxObject *mpGfx;
45};
46
47class cInit;
48
49//-------------------------------------------------
50
51class cPreMenu : public iUpdateable {
52public:
53 cPreMenu(cInit *apInit);
54 ~cPreMenu();
55
56 void Reset();
57
58 void OnPostSceneDraw();
59
60 void OnDraw();
61
62 void Update(float afTimeStep);
63
64 void OnMouseDown(eMButton aButton);
65 void OnButtonDown();
66
67 void SetActive(bool abX);
68 bool IsActive() { return mbActive; }
69
70 void OnExit();
71
72private:
73 void LoadConfig();
74
75 cInit *mpInit;
76 cGraphicsDrawer *mpDrawer;
77
79 tStringVec mvTexNames;
80
81 iTexture *mpLogoTexture;
82 iTexture *mpEpTexture;
83
84 FontData *mpFont;
85 FontData *mpTextFont;
86
87 bool mbShowText;
88 tWStringVec mvTextRows;
89 int mlCurrentTextChar;
90 int mlMaxChars;
91 float mfNewCharCount;
92 float mfClickCount;
93
94 float mfAlpha;
95 float mfAlphaAdd;
96
97 int mlState;
98 int mlCurrentLogo;
99
100 bool mbActive;
101
102 float mfStateTimer;
103
104 cVector3f mvecLastTextPos;
105
106 float mfLastTextSize;
107 float mfLastTextColor;
108 float mfLastTextSpeed1;
109 float mfLastTextSpeed2;
110
111 bool mbFadeWindSound;
112 bool mbFadeRainSound;
113 bool mbPlayingWindSound;
114 bool mbPlayingRainSound;
115 bool mbPlayingThunderSound;
116 bool mbPlayingMusic;
117
118 float mfFontColor;
119
120 bool mbFlash;
121
122 float mfLogoSizeFactor;
123
124 float mfRaindropFade;
125
126 cVector3f mvecLogoSize;
127 float mfLogoFade;
128 float mfEpFade;
129 float mfAdd;
130
131 iSoundChannel *mpRainSound;
132 iSoundChannel *mpWindSound;
133
134 Common::Array<cRaindrop> mvRaindropVector;
135 cGfxObject *mpRaindropGfx;
136 cGfxObject *mpFlashGfx;
137};
138
139//---------------------------------------------
140
141#endif // GAME_PRE_MENU_H
Definition: Init.h:70
Definition: PreMenu.h:51
Definition: PreMenu.h:37
Definition: font_data.h:67
Definition: GfxObject.h:38
Definition: GraphicsDrawer.h:77
Definition: SoundChannel.h:46
Definition: Texture.h:88
Definition: Updateable.h:35