ScummVM API documentation
spigotpuzzle.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 NANCY_ACTION_SPIGOTPUZZLE_H
23
#define NANCY_ACTION_SPIGOTPUZZLE_H
24
25
#include "engines/nancy/action/puzzlerecord.h"
26
27
namespace
Nancy
{
28
namespace
Action {
29
30
// A puzzle in nancy7 where you pull spigots to input a password
31
class
SpigotPuzzle
:
public
PuzzleRecord
{
32
public
:
33
SpigotPuzzle
() :
PuzzleRecord
(7) {}
34
virtual
~
SpigotPuzzle
() {}
35
36
void
init()
override
;
37
void
updateGraphics()
override
;
38
39
void
readData(
Common::SeekableReadStream
&stream)
override
;
40
void
execute()
override
;
41
void
handleInput(
NancyInput
&input)
override
;
42
43
bool
isViewportRelative()
const override
{
return
true
; }
44
45
protected
:
46
Common::String
getRecordTypeName()
const override
{
return
"SpigotPuzzle"
; }
47
48
uint _numSpigots = 0;
49
uint _numLetters = 0;
50
uint _numInbetweens = 0;
51
52
Common::Array<uint16>
_startOrder;
53
Common::Array<uint16>
_numSpins;
54
55
Common::Array<Common::Rect>
_spigotDests;
56
Common::Array<Common::Rect>
_spigotHotspots;
57
Common::Array<Common::Rect>
_letterDests;
58
Common::Array<Common::Rect>
_digitDests;
59
Common::Array<Common::Rect>
_buttonDests;
60
61
Common::Array<Common::Array<Common::Rect>
> _spigotAnimSrcs;
62
Common::Array<Common::Array<Common::Rect>
> _digitSrcs;
63
Common::Array<Common::Rect>
_buttonSrcs;
64
Common::Array<Common::Array<Common::Rect>
> _letterSrcs;
65
66
uint16 _letterTime = 0;
// 1 unit = 200ms
67
Common::Array<uint16>
_correctOrder;
68
69
SoundDescription
_buttonSound;
70
SoundDescription
_letterSound;
71
SoundDescription
_spigotSound;
72
73
Common::Array<uint16>
_currentOrder;
74
Common::Array<uint16>
_currentAnimOrder;
75
Common::Array<uint16>
_numPulls;
76
77
int
_animatingSpigotID = -1;
78
int
_animatingLetterID = -1;
79
int
_pushedButtonID = -1;
80
uint _frameID = 0;
81
uint32 _nextAnimTime = 0;
82
83
bool
_solved =
false
;
84
};
85
86
}
// End of namespace Action
87
}
// End of namespace Nancy
88
89
#endif // NANCY_ACTION_SPIGOTPUZZLE_H
Common::String
Definition:
str.h:59
Common::Array< uint16 >
Common::SeekableReadStream
Definition:
stream.h:745
Nancy::NancyInput
Definition:
input.h:41
Nancy::Action::PuzzleRecord
Definition:
puzzlerecord.h:37
Nancy::SoundDescription
Definition:
commontypes.h:306
Nancy::Action::SpigotPuzzle
Definition:
spigotpuzzle.h:31
Nancy
Definition:
actionmanager.h:32
engines
nancy
action
puzzle
spigotpuzzle.h
Generated on Thu Oct 22 2026 09:23:49 for ScummVM API documentation by
1.8.13