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