V-Gears
0
Free Final Fantasy VII engine.
Formation.h
Go to the documentation of this file.
1
/*
2
* V-Gears
3
* Copyright (C) 2022 V-Gears Team
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#include <string>
20
#include "
common/TypeDefine.h
"
21
#include "
data/GameData.h
"
22
26
struct
Formation
{
27
31
enum class
Layout
{
32
36
NORMAL = 0,
37
44
PREEMPTIVE,
45
52
BACK_ATTACK,
53
60
SIDE_ATTACK,
61
66
PINCER_ATTACK,
67
73
LOCKED
74
};
75
79
struct
Enemy
{
80
84
unsigned
int
id
;
85
89
int
x
;
90
94
int
y
;
95
99
int
z
;
100
104
unsigned
int
row
;
105
146
char
cover
[5];
147
151
bool
visible
;
152
156
int
direction
;
157
161
bool
targeteable
;
162
166
bool
main_script_active
;
167
173
Enemy
():
174
id
(0),
x
(0),
y
(0),
z
(0),
row
(0),
visible
(true),
175
direction
(0),
targeteable
(true),
main_script_active
(true)
176
{
177
for
(
int
c = 0; c < 5; c ++)
cover
[c] =
'0'
;
178
}
179
};
180
184
struct
Camera
{
185
189
int
x
;
190
194
int
y
;
195
199
int
z
;
200
204
int
d_x
;
205
209
int
d_y
;
210
214
int
d_z
;
215
221
Camera
():
x
(0),
y
(0),
z
(0),
d_x
(0),
d_y
(0),
d_z
(0){}
222
};
223
227
unsigned
int
id
;
228
232
int
next_formation
;
233
237
float
escape_counter
;
238
242
bool
escapable
;
243
247
bool
skip_victory_pose
;
248
254
bool
skip_spoils
;
255
259
bool
preemptive_disabled
;
260
264
Layout
layout
;
265
269
std::vector<Enemy>
enemies
;
270
277
int
location
;
278
284
std::string
location_name
;
285
289
std::vector<Camera>
camera_positions
;
290
294
int
initial_camera_position
;
295
299
bool
is_arena_battle
;
300
304
std::vector<int>
next_arena_formation_candidates
;
305
311
Formation
():
312
id
(0),
next_formation
(-1),
escape_counter
(0.0f),
escapable
(true),
skip_victory_pose
(false),
313
skip_spoils
(false),
preemptive_disabled
(false),
layout
(
Layout
::NORMAL),
location
(-1),
314
location_name
(
""
),
initial_camera_position
(0),
is_arena_battle
(false)
315
{
316
enemies
.clear();
317
camera_positions
.clear();
318
next_arena_formation_candidates
.clear();
319
}
320
321
};
GameData.h
TypeDefine.h
Formation::Camera
Position for a camera.
Definition:
Formation.h:184
Formation::Camera::x
int x
X position.
Definition:
Formation.h:189
Formation::Camera::Camera
Camera()
Constructor.
Definition:
Formation.h:221
Formation::Camera::y
int y
Y position.
Definition:
Formation.h:194
Formation::Camera::z
int z
z position.
Definition:
Formation.h:199
Formation::Camera::d_z
int d_z
z direction.
Definition:
Formation.h:214
Formation::Camera::d_x
int d_x
X direction.
Definition:
Formation.h:204
Formation::Camera::d_y
int d_y
Y direction.
Definition:
Formation.h:209
Formation::Enemy
Each enemy in the formation.
Definition:
Formation.h:79
Formation::Enemy::z
int z
Enemy Z position.
Definition:
Formation.h:99
Formation::Enemy::y
int y
Enemy Y position.
Definition:
Formation.h:94
Formation::Enemy::row
unsigned int row
Enemy row.
Definition:
Formation.h:104
Formation::Enemy::targeteable
bool targeteable
Indicates if the enemy is targeteable.
Definition:
Formation.h:161
Formation::Enemy::main_script_active
bool main_script_active
Definition:
Formation.h:166
Formation::Enemy::visible
bool visible
Indicates if the enemy is initially visible.
Definition:
Formation.h:151
Formation::Enemy::x
int x
Enemy X position.
Definition:
Formation.h:89
Formation::Enemy::direction
int direction
Indicates initial direction facing if players get a side attack.
Definition:
Formation.h:156
Formation::Enemy::cover
char cover[5]
Cover flags.
Definition:
Formation.h:146
Formation::Enemy::Enemy
Enemy()
Constructor.
Definition:
Formation.h:173
Formation::Enemy::id
unsigned int id
Enemy ID.
Definition:
Formation.h:84
Formation
An enemy formation.
Definition:
Formation.h:26
Formation::skip_victory_pose
bool skip_victory_pose
If true, the victory pose will be played after the battle.
Definition:
Formation.h:247
Formation::is_arena_battle
bool is_arena_battle
Indicates if the formation is an arena battle.
Definition:
Formation.h:299
Formation::skip_spoils
bool skip_spoils
If true, spoils (item, ap, money...) will not be obtained after the battle.
Definition:
Formation.h:254
Formation::next_formation
int next_formation
When all enemies are defeated, begin battle with this ID without ending battle scene.
Definition:
Formation.h:232
Formation::enemies
std::vector< Enemy > enemies
The enemies in the formation.
Definition:
Formation.h:269
Formation::camera_positions
std::vector< Camera > camera_positions
Camera positions.
Definition:
Formation.h:289
Formation::Formation
Formation()
Constructor.
Definition:
Formation.h:311
Formation::next_arena_formation_candidates
std::vector< int > next_arena_formation_candidates
FOr arena battles, candidates fro the next formation.
Definition:
Formation.h:304
Formation::escapable
bool escapable
Indicates if the battle can be escaped.
Definition:
Formation.h:242
Formation::location_name
std::string location_name
Location name.
Definition:
Formation.h:284
Formation::Layout
Layout
Battle layouts.
Definition:
Formation.h:31
Formation::location
int location
Location ID.
Definition:
Formation.h:277
Formation::initial_camera_position
int initial_camera_position
Index of the initial camera position.
Definition:
Formation.h:294
Formation::layout
Layout layout
Battle layout.
Definition:
Formation.h:264
Formation::escape_counter
float escape_counter
Difficulty to escape.
Definition:
Formation.h:237
Formation::id
unsigned int id
Formation ID.
Definition:
Formation.h:227
Formation::preemptive_disabled
bool preemptive_disabled
If false, this battle can never be preemtied.
Definition:
Formation.h:259
src
installer
data
Formation.h
Generated by
1.9.4