ScummVM API documentation
bbdou_foodctl.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 ILLUSIONS_BBDOU_BBDOU_FOODCTL_H
23 #define ILLUSIONS_BBDOU_BBDOU_FOODCTL_H
24 
25 #include "illusions/specialcode.h"
26 #include "illusions/thread.h"
27 
28 namespace Illusions {
29 
30 class IllusionsEngine_BBDOU;
31 
32 const uint kFoodMaxPropertyIdsCount = 15;
33 const uint kFoodCount = 16;
34 
35 struct FoodItem {
36  uint32 objectId;
37  int value;
38 };
39 
40 class BbdouFoodCtl {
41 public:
43  ~BbdouFoodCtl();
44  void placeFood(uint totalRoundsCount, uint maxRequestedFoodCount);
45  void addFood(uint32 propertyId);
46  void requestFirstFood();
47  void requestNextFood();
48  void nextRound();
49  bool hasReachedRequestedFoodCount();
50  bool hasRoundFinished();
51  void serveFood();
52  void resetFood();
53 protected:
55  uint _totalRoundsCount, _maxRequestedFoodCount;
56  uint32 _foodPropertyIds[kFoodMaxPropertyIdsCount];
57  uint _requestedFoodCount;
58  uint _requestedFoodIndex;
59  FoodItem _foodItems[kFoodCount];
60  uint _servedFoodCount;
61  void placeActors();
62  void resetFoodControls();
63  uint32 getFoodSequenceId();
64  uint32 getCurrentStudentObjectId();
65 };
66 
67 } // End of namespace Illusions
68 
69 #endif // ILLUSIONS_BBDOU_BBDOU_FOODCTL_H
Definition: bbdou_foodctl.h:35
Definition: actor.h:34
Definition: bbdou_foodctl.h:40
Definition: illusions_bbdou.h:60