ScummVM API documentation
barbot.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 #ifndef TITANIC_BARBOT_H
23 #define TITANIC_BARBOT_H
24 
25 #include "titanic/npcs/true_talk_npc.h"
26 #include "titanic/messages/messages.h"
27 
28 namespace Titanic {
29 
30 enum GlassGiven { GG_DEFAULT = -1, GG_EMPTY = 0, GG_CONDIMENT = 1, GG_BIRD = 3 };
31 
32 class CBarbot : public CTrueTalkNPC {
33  struct FrameRange {
34  int _startFrame;
35  int _endFrame;
36  FrameRange() : _startFrame(0), _endFrame(0) {}
37  };
38  class FrameRanges : public Common::Array<FrameRange> {
39  public:
40  FrameRanges();
41  };
42 
43  DECLARE_MESSAGE_MAP;
44  bool ActMsg(CActMsg *msg);
45  bool EnterViewMsg(CEnterViewMsg *msg);
46  bool TurnOn(CTurnOn *msg);
47  bool TurnOff(CTurnOff *msg);
48  bool LeaveViewMsg(CLeaveViewMsg *msg);
49  bool MovieEndMsg(CMovieEndMsg *msg);
50  bool TrueTalkSelfQueueAnimSetMsg(CTrueTalkSelfQueueAnimSetMsg *msg);
51  bool TrueTalkQueueUpAnimSetMsg(CTrueTalkQueueUpAnimSetMsg *msg);
52  bool TrueTalkGetStateValueMsg(CTrueTalkGetStateValueMsg *msg);
53  bool TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg);
54  bool FrameMsg(CFrameMsg *msg);
55  bool LoadSuccessMsg(CLoadSuccessMsg *msg);
56  bool MovieFrameMsg(CMovieFrameMsg *msg);
57  bool EnterRoomMsg(CEnterRoomMsg *msg);
58  bool TimerMsg(CTimerMsg *msg);
59 private:
60  static int _timesCalled;
61 private:
62  FrameRanges _frames;
63  int _field108;
64  int _field10C;
65  int _field110;
66  bool _addedLemon;
67  bool _addedTV;
68  bool _addedPuret;
69  int _field120;
70  int _field124;
71  bool _visCenterOnCounter;
72  bool _addedVodka;
73  bool _gottenDrunk;
74  int _field134;
75  int _field138;
76  int _field13C;
77  int _volume;
78  int _frameNum;
79  int _field148;
80  int _field14C;
81  int _field150;
82  int _field154;
83  GlassGiven _glassContent;
84  bool _drunkFlag;
85  int _field160;
86 private:
90  void playRange(const FrameRange &range, uint flags = 0);
91 
96  bool areIngredientsMissing() const {
97  return !_addedPuret || !_addedLemon || !_addedVodka;
98  }
99 public:
100  CLASSDEF;
101  CBarbot();
102 
106  void save(SimpleFile *file, int indent) override;
107 
111  void load(SimpleFile *file) override;
112 };
113 
114 } // End of namespace Titanic
115 
116 #endif /* TITANIC_BARBOT_H */
void load(SimpleFile *file) override
Definition: messages.h:404
Definition: messages.h:288
Definition: array.h:52
Definition: barbot.h:32
Definition: messages.h:397
Definition: true_talk_npc.h:43
Definition: messages.h:289
Definition: simple_file.h:49
Definition: messages.h:188
Definition: messages.h:401
Definition: messages.h:319
Definition: messages.h:254
void save(SimpleFile *file, int indent) override
Definition: arm.h:30
Definition: messages.h:402
Definition: messages.h:310
Definition: messages.h:320
Definition: messages.h:400
Definition: messages.h:291
Definition: messages.h:313
Definition: messages.h:403