ScummVM API documentation
specialcode.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_SPECIALCODE_H
23 #define ILLUSIONS_SPECIALCODE_H
24 
25 #include "illusions/resourcesystem.h"
26 
27 namespace Illusions {
28 
29 class IllusionsEngine;
30 struct OpCall;
31 
33 public:
34  SpecialCodeLoader(IllusionsEngine *vm) : _vm(vm) {}
35  ~SpecialCodeLoader() override {}
36  void load(Resource *resource) override;
37  virtual void unload(Resource *resource);
38  virtual void buildFilename(Resource *resource);
39  bool isFlag(int flag) override;
40 protected:
41  IllusionsEngine *_vm;
42 };
43 
44 class SpecialCode {
45 public:
46  virtual ~SpecialCode() {}
47  virtual void init() = 0;
48  virtual void run(uint32 specialCodeId, OpCall &opCall) = 0;
49  virtual void resetBeforeResumeSavegame() {};
50 };
51 
52 } // End of namespace Illusions
53 
54 #endif // ILLUSIONS_SPECIALCODE_H
Definition: actor.h:34
Definition: resourcesystem.h:51
Definition: specialcode.h:44
Definition: specialcode.h:32
Definition: resourcesystem.h:78
Definition: scriptopcodes.h:32
Definition: illusions.h:92