22 #ifndef ALCACHOFA_ROOMS_H 23 #define ALCACHOFA_ROOMS_H 25 #include "alcachofa/objects.h" 33 static constexpr
const char *kClassName =
"CHabitacion";
37 inline World &world() {
return *_world; }
40 return _activeFloorI < 0 ? nullptr : &_floors[_activeFloorI];
43 return _activeFloorI < 0 ? 49 : activeFloor()->orderAt(query);
46 return _activeFloorI < 0 ? 1 : activeFloor()->depthAt(query);
48 inline uint8 characterAlphaTint()
const {
return _characterAlphaTint; }
50 inline bool fixedCameraOnEntering()
const {
return _fixedCameraOnEntering; }
51 inline int musicID()
const {
return _musicId; }
54 inline ObjectIterator beginObjects()
const {
return _objects.begin(); }
55 inline ObjectIterator endObjects()
const {
return _objects.end(); }
59 virtual bool updateInput();
60 virtual void loadResources();
61 virtual void freeResources();
63 ObjectBase *getObjectByName(
const char *name)
const;
64 void toggleActiveFloor();
65 void debugPrint(
bool withObjects)
const;
70 void updateRoomBounds();
71 void updateInteraction();
80 bool _fixedCameraOnEntering;
81 int8 _activeFloorI = -1;
92 static constexpr
const char *kClassName =
"CHabitacionMenuOpciones";
95 bool updateInput()
override;
96 void loadResources()
override;
98 void clearLastSelectedObject();
99 inline SlideButton *¤tSlideButton() {
return _currentSlideButton; }
109 static constexpr
const char *kClassName =
"CHabitacionConectar";
115 static constexpr
const char *kClassName =
"CHabitacionEsperar";
121 static constexpr
const char *kClassName =
"CInventario";
125 bool updateInput()
override;
128 void updateItemsByActiveCharacter();
129 void drawAsOverlay(int32 scrollY);
134 Item *getHoveredItem();
139 enum class GlobalAnimationKind {
146 MortadeloDisabledIcon,
148 InventoryDisabledIcon,
161 inline RoomIterator beginRooms()
const {
return _rooms.begin(); }
162 inline RoomIterator endRooms()
const {
return _rooms.end(); }
163 inline Room &globalRoom()
const { assert(_globalRoom !=
nullptr);
return *_globalRoom; }
164 inline Inventory &inventory()
const { assert(_inventory !=
nullptr);
return *_inventory; }
165 inline MainCharacter &filemon()
const { assert(_filemon !=
nullptr);
return *_filemon; }
166 inline MainCharacter &mortadelo()
const { assert(_mortadelo !=
nullptr);
return *_mortadelo; }
167 inline const Common::String &initScriptName()
const {
return _initScriptName; }
168 inline uint8 loadedMapCount()
const {
return _loadedMapCount; }
170 inline bool somebodyUsing(
ObjectBase *
object)
const {
171 return filemon().currentlyUsing() ==
object ||
172 mortadelo().currentlyUsing() == object;
175 MainCharacter &getMainCharacterByKind(MainCharacterKind kind)
const;
176 MainCharacter &getOtherMainCharacterByKind(MainCharacterKind kind)
const;
177 Room *getRoomByName(
const char *name)
const;
178 ObjectBase *getObjectByName(
const char *name)
const;
179 ObjectBase *getObjectByName(MainCharacterKind character,
const char *name)
const;
180 ObjectBase *getObjectByNameFromAnyRoom(
const char *name)
const;
181 const Common::String &getGlobalAnimationName(GlobalAnimationKind kind)
const;
183 const char *getDialogLine(int32 dialogId)
const;
185 void toggleObject(MainCharacterKind character,
const char *objName,
bool isEnabled);
189 bool loadWorldFile(
const char *path);
190 void loadLocalizedNames();
191 void loadDialogLines();
194 struct StringEqualTo {
195 bool operator()(
const char *a,
const char *b)
const {
return strcmp(a, b) == 0; }
199 Common::String _globalAnimationNames[(int)GlobalAnimationKind::Count];
204 uint8 _loadedMapCount = 0;
207 StringEqualTo> _localizedNames;
214 #endif // ALCACHOFA_ROOMS_H Definition: objects.h:354
Definition: alcachofa.h:45
Definition: objects.h:123
Path finding is based on the Shape class with the invariant that every polygon is a convex polygon wi...
Definition: shape.h:159
Definition: serializer.h:79
const T * const_iterator
Definition: array.h:55
Definition: atari-cursor.h:35
Definition: objects.h:528
Definition: hash-str.h:74
uint8 _characterAlphaPremultiplier
for some reason in percent instead of 0-255
Definition: rooms.h:84