ScummVM API documentation
space_logic.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 ULTIMA2_LOGIC_SPACE_LOGIC_H
24#define ULTIMA2_LOGIC_SPACE_LOGIC_H
25
26#include "ultima/ultima1/logic/logic.h"
27
28namespace Ultima {
29namespace Ultima1 {
30namespace Logic {
31
39class SpaceLogic : public Logic {
40protected:
41 SpaceLogic();
42
47 int shipFuel() const;
48
52 void subtractFuel(int amount);
53
58 int shipShields() const;
59
64 void subtractShields(int amount);
65
70 void death();
71
72 void updateCreatures() override {
73 }
74
79 void endOfTurn() override;
80
84 bool inform() override;
85
86 // Commands that do nothing in outer space - just a beep and a prompt.
87 // board/drop/enter/get/open/steal/transact/unlock/xit/noise/pass
88 // already say the right thing via the base Logic fallbacks
89 bool attack(Data::Direction dir) override;
90 bool cast() override;
91 bool climb() override;
92 bool quit() override;
93 bool ready() override;
94
95public:
96 ~SpaceLogic() override {
97 }
98
106 void entering() override;
107
112 void keypress(Common::KeyCode keycode) override;
113};
114
115} // namespace Logic
116} // namespace Ultima1
117} // namespace Ultima
118
119#endif
Definition: logic.h:40
Definition: space_logic.h:39
bool attack(Data::Direction dir) override
void keypress(Common::KeyCode keycode) override
void updateCreatures() override
Definition: space_logic.h:72