ScummVM API documentation
spelvals.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 * aint32 with this program; if not, write to the Free Software
19 *
20 *
21 * Based on the original sources
22 * Faery Tale II -- The Halls of the Dead
23 * (c) 1993-1996 The Wyrmkeep Entertainment Co.
24 */
25
26#ifndef SAGA2_SPELVALS_H
27#define SAGA2_SPELVALS_H
28
29namespace Saga2 {
30
31// constants affecting all or most of the spells
32
33const uint32 kSpellJumpiness = 10;
34const uint16 kSpellSpeed = 1;
35
36// Bolt spell dimensions
37const int16 kBoltSpellLength = 192;
38const int16 kBoltSpellWidth = kBoltSpellLength / 6;
39
40// Bolt spell dimensions
41const int16 kBeamSpellLength = 192;
42const int16 kBeamSpellWidth = kBeamSpellLength / 12;
43
44// Cone spell dimensions
45const int16 kConeSpellLength = 128;
46const int16 kConeSpellWidth = kConeSpellLength / 2;
47
48// Wide Cone spell dimensions
49const int16 kWaveSpellLength = 128;
50const int16 kWaveSpellWidth = kWaveSpellLength;
51
52// small ball spell dimensions
53const int16 kBallSpellRadius = 48;
54
55// small ball spell dimensions
56const int16 kSquareSpellSize = 48;
57
58// large ball spell dimensions
59const int16 kStormSpellRadius = 64;
60
61// small ball spell dimensions
62const int16 kWallSpellRadius = 32;
63const int16 kWallInnerRadius = 16;
64
65/* ===================================================================== *
66 Imports
67 * ===================================================================== */
68
69// ball shaped spell shapes
70extern StaticTilePoint WallVectors[];
71extern StaticTilePoint FireballVectors[];
72extern StaticTilePoint SquareSpellVectors[];
73
74/* ===================================================================== *
75 Spell shape math explanations
76 * ===================================================================== */
77
78//-----------------------------------------------------------------------
79// Fireball vectors
80//
81// X0X Vectors are numbered from 0 in clockwise order
82// XX XX
83// X X
84// X X ^
85// X + X |
86// X X U
87// X X +V -->
88// XX XX
89// XXX
90//
91
92// SquareSpell vectors
93//
94// XXXX0XXXX Vectors are numbered from 0 in clockwise order
95// X X
96// X X
97// X X ^
98// X + X |
99// X X U
100// X X +V -->
101// X X
102// XXXXXXXXX
103//
104
105//
106// Cone spell vectors
107//
108// X targetVector+orth(targetVector)/2
109// X
110// X
111// + -> X targetVector
112// X
113// X
114// X targetVector-orth(targetVector)/2
115//
116// Wide Cone is similar, but bound by
117// targetVector+orth(targetVector)
118// targetVector-orth(targetVector)
119//
120
121// Bolt spell Vectors
122//
123// OrthoVector=ortho(TargetVector){mag = boltWidth/2}
124//
125//
126// XXXXXXX = projectile +
127// +XXXXXXX = projectile -> target vector
128// XXXXXXX = projectile -
129//
130//
131
132//-----------------------------------------------------------------------
133
134} // end of namespace Saga2
135
136#endif