ScummVM API documentation
thud.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef BAGEL_SPACEBAR_THUD_H
24 #define BAGEL_SPACEBAR_THUD_H
25 
26 #include "bagel/baglib/storage_dev_bmp.h"
27 
28 namespace Bagel {
29 namespace SpaceBar {
30 
31 class SBarThud : public CBagStorageDevBmp {
32 private:
33  CBagObject *_currentObj;
34  int _nObjects; // The number of currently active objects
35  CBofBitmap *_xYouBmp;
36  static int _nThudCursor;
37 public:
38  SBarThud(CBofWindow *pParent = nullptr, const CBofRect &xRect = CBofRect());
39  virtual ~SBarThud();
40 
41  CBagObject *getCurrentObj() {
42  return _currentObj;
43  }
44  CBagObject *setCurrentObj(CBagObject *pObj) {
45  return _currentObj = pObj;
46  }
47 
48  static int getThudCursor() {
49  return _nThudCursor;
50  }
51  static void setThudCursor(int n) {
52  _nThudCursor = n;
53  }
54 
55  ErrorCode loadFile(const CBofString &sFile) override;
56  ErrorCode loadFileFromStream(CBagIfstream &fpInput, const CBofString &sWldName, bool bAttach) override;
57  bool onObjInteraction(CBagObject *pObj, CBagStorageDev *pSDev) override;
58 
59  ErrorCode attach() override;
60  ErrorCode detach() override;
61 
62  ErrorCode activateLocalObject(CBagObject *pObj) override;
63  ErrorCode deactivateLocalObject(CBagObject *pObj) override;
64 
65  ErrorCode activateLocalObject(const CBofString &sName) override;
66  ErrorCode deactivateLocalObject(const CBofString &sName) override;
67 };
68 
69 } // namespace SpaceBar
70 } // namespace Bagel
71 
72 #endif
Definition: window.h:50
Definition: bitmap.h:55
Definition: rect.h:36
Definition: object.h:85
Definition: ifstream.h:31
Definition: string.h:38
Definition: bagel.h:31
Definition: storage_dev_win.h:78
Definition: thud.h:31
Definition: storage_dev_bmp.h:31