ScummVM API documentation
wield.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_BAGLIB_WIELD_H
24 #define BAGEL_BAGLIB_WIELD_H
25 
26 #include "bagel/spacebar/baglib/storage_dev_bmp.h"
27 
28 namespace Bagel {
29 namespace SpaceBar {
30 
31 class CBagWield : public CBagStorageDevBmp {
32 private:
33  static int _nWieldCursor;
34 
35  CBagObject *_pCurrObj;
36  int _nObjects; // The number of currently active objects
37 
38 public:
39  CBagWield(CBofWindow *pParent = nullptr, const CBofRect &xRect = CBofRect());
40  virtual ~CBagWield();
41  static void initialize() {
42  _nWieldCursor = -1;
43  }
44 
45  CBagObject *getCurrObj() const {
46  return _pCurrObj;
47  }
48  CBagObject *setCurrObj(CBagObject *pObj) {
49  return _pCurrObj = pObj;
50  }
51 
52  static int getWieldCursor() {
53  return _nWieldCursor;
54  }
55  static void setWieldCursor(int n) {
56  _nWieldCursor = n;
57  }
58 
59  ErrorCode update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect = nullptr, int nMaskColor = -1) override;
60 
61  ErrorCode loadFile(const CBofString &sFile) override;
62  bool onObjInteraction(CBagObject *pObj, CBagStorageDev *pSDev) override;
63 
64  ErrorCode attach() override;
65  ErrorCode detach() override;
66 
67  ErrorCode activateLocalObject(CBagObject *pObj) override;
68  ErrorCode deactivateLocalObject(CBagObject *pObj) override;
69 };
70 
71 } // namespace SpaceBar
72 } // namespace Bagel
73 
74 #endif
Definition: window.h:53
Definition: object.h:86
Definition: rect.h:35
Definition: wield.h:31
Definition: string.h:38
Definition: afxwin.h:27
Definition: point.h:32
Definition: storage_dev_win.h:79
Definition: storage_dev_bmp.h:32
Definition: bitmap.h:57