JNR
stageIntro.h
1 /*
2 
3 Jump'n'Run Engine
4 http://www.atanaslaskov.com/jnr/
5 
6 BSD LICENSE
7 Copyright (c) 2007-2013, Atanas Laskov
8 All rights reserved.
9 
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions are met:
12 1. Redistributions of source code must retain the above copyright notice,
13 this list of conditions and the following disclaimer.
14 2. Redistributions in binary form must reproduce the above copyright notice,
15 this list of conditions and the following disclaimer in the documentation
16 and/or other materials provided with the distribution.
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL ATANAS LASKOV BE LIABLE FOR ANY
21 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 */
30 
31 
37 
38 #include "laStage.h"
39 
40 class uiDesktop_Intro: public uiDesktop{
41  public:
42  virtual void onCommand(unsigned long uID, unsigned long nCmd);
43 };
44 
45 class stageIntro :
46  public laStage, public laLoadableObj
47 {
48  uiDesktop_Intro _uiDesktop;
49 
50  char _strTitle[128];
51  char _strNarrator[128];
52  M_BOOL _bNarrator_AutoEmotions;
53  M_BOOL _bNarrator_AutoEmotions_OnCompletion;
54 
55  fxAnimatedText _fxNarratorText;
56 
57  // Tileset and TS element to be used as narrator
58  //
59  class laTileset* _pTS;
60  laStateObject* _pNarrator;
61 
62  laTimeTrig _ttEmotionSwitch;
63 
64  laMultiKey _mkEnter;
65  laMultiKey _mkEscape;
66 
67  uiButton* _pb;
68 
69 public:
70  stageIntro(void);
71  ~stageIntro(void);
72 
73  void setTS(laTileset* pts) {
74  _pTS = pts;
75  }
76 
77  virtual void onInit();
78  virtual void onFini();
79  virtual void onFrame(laRenderer *pr, laInputManager *pi, laTimer *pt);
80 
81  virtual void onActivate();
82  virtual void onDeactivate();
83 
84  //Load or reload intro file
85  virtual void load(laFileParser *fp);
86 };
virtual void onCommand(unsigned long uID, unsigned long nCmd)
Command event handler.
Definition: stageIntro.cpp:55
Interface for loadable objects.
Definition: laLoadableObj.h:43
Multi-state Level Object.
Definition: laStateObject.h:64
GUI Push-button.
Definition: uiButton.h:41
Time-triggered events.
Definition: laTimeTrig.h:41
Base Class for Stages.
Definition: laStage.h:48
GUI Topmost Window.
Definition: uiDesktop.h:44
Virtual interface for the Engine graphics renderer.
Definition: laRenderer.h:98
Level Intro/Outro Stage.
Definition: stageIntro.h:40
Tileset Class.
Definition: laTileset.h:46
Handling Multiple Key Presses.
Definition: laMultiKey.h:49
File Parser.
Definition: laFileParser.h:41