ScummVM API documentation
clock.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
/*
23
* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
24
* Copyright (c) 1994-1995 Mike: Mark and Thomas Thurman.
25
*/
26
27
#ifndef AVALANCHE_CLOCK_H
28
#define AVALANCHE_CLOCK_H
29
30
#include "common/rect.h"
31
#include "avalanche/enums.h"
32
33
namespace
Avalanche
{
34
class
AvalancheEngine;
35
36
class
Clock
{
37
public
:
38
Clock
(
AvalancheEngine
*vm);
39
40
void
update();
41
42
private
:
43
static
const
int
kCenterX = 510;
44
static
const
int
kCenterY = 183;
45
46
AvalancheEngine
*_vm;
47
48
uint16 _hour, _minute, _second, _hourAngle, _oldHour, _oldMinute, _oldHourAngle;
49
Common::Point
_clockHandHour, _clockHandMinute;
50
51
Common::Point
calcHand(uint16 angle, uint16 length, Color color);
52
void
drawHand(
const
Common::Point
&endPoint, Color color);
53
void
plotHands();
54
void
chime();
55
};
56
57
}
// End of namespace Avalanche
58
59
#endif // AVALANCHE_CLOCK_H
Avalanche
Definition:
animation.h:32
Avalanche::AvalancheEngine
Definition:
avalanche.h:74
Avalanche::Clock
Definition:
clock.h:36
Common::Point
Definition:
rect.h:45
engines
avalanche
clock.h
Generated on Sat Nov 23 2024 09:09:44 for ScummVM API documentation by
1.8.13