forked from WohlSoft/PGE-File-Library-STL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnpc_filedata.h
261 lines (212 loc) · 7.08 KB
/
npc_filedata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/*
* PGE File Library - a library to process file formats, part of Moondust project
*
* Copyright (c) 2014-2022 Vitaly Novichkov <admin@wohlnet.ru>
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*!
* \file npc_filedata.h
* \brief Contains defition of the SMBX64-NPC.txt config data structure
*/
#pragma once
#ifndef NPC_FILEDATA_H
#define NPC_FILEDATA_H
#include "pge_file_lib_globs.h"
/*!
* \brief SMBX64-NPC.txt File Data structure
*/
struct NPCConfigFile
{
bool ReadFileValid = false;
PGESTRING errorString;
PGESTRING unknownLines;
typedef PGEMAP<PGESTRING, PGESTRING> EntriesMap;
//! Universal store of all NPCTxt values
EntriesMap entries;
/*
* SMBX64 Standard
*/
//! Is GFX-Offset X field using?
bool en_gfxoffsetx = false;
//! GFX-Offset X field
int32_t gfxoffsetx = 0;
//! Is GFX-Offset Y field using?
bool en_gfxoffsety = false;
//! GFX-Offset Y field
int32_t gfxoffsety = 0;
//! Is Width field using?
bool en_width = false;
//! Width field
uint32_t width = 0;
//! Is height field using?
bool en_height = false;
//! Height field
uint32_t height = 0;
//! Is GFX-Width field using?
bool en_gfxwidth = false;
//! GFX-Width field
uint32_t gfxwidth = 0;
//! Is GFX-Height field using?
bool en_gfxheight = false;
//! GFX-Height field
uint32_t gfxheight = 0;
//! Is Score field using?
bool en_score = false;
//! Score rewards field (from 0 to 13)
uint32_t score = 0;
//! Is "Block player at side" flag using?
bool en_playerblock = false;
//! "Block player at side" flag
bool playerblock = false;
//! Is "Player can stay on top" flag using?
bool en_playerblocktop = false;
//! "Player can stay on top" flag
bool playerblocktop = false;
//! Is "Block other NPC at side" flag using?
bool en_npcblock = false;
//! "Block other NPC at side" flag
bool npcblock = false;
//! Is "NPC Can stay on top" flag using?
bool en_npcblocktop = false;
//! "NPC Can stay on top" flag
bool npcblocktop = false;
//! Is "Allow to grab at side" flag using?
bool en_grabside = false;
//! "Allow to grab at side" flag
bool grabside = false;
//! Is "Allow to grab at top" flag using?
bool en_grabtop = false;
//! "Allow to grab at top" flag
bool grabtop = false;
//! Is "Hurt player on stomp attempt" flag using?
bool en_jumphurt = false;
//! "Hurt player on stomp attempt" flag
bool jumphurt = false;
//! Is "Safe for playable character" flag using?
bool en_nohurt = false;
//! "Safe for playable character" flag
bool nohurt = false;
//! Is "Don't collide with blocks" flag using?
bool en_noblockcollision = false;
//! "Don't collide with blocks" flag
bool noblockcollision = false;
//! Is "Turn on cliff" flag using?
bool en_cliffturn = false;
//! "Turn on cliff" flag
bool cliffturn = false;
//! Is "Not eatable" flag using?
bool en_noyoshi = false;
//! "Not eatable" flag
bool noyoshi = false;
//! Is "Foreground render" flag using?
bool en_foreground = false;
//! "Foreground render" flag
bool foreground = false;
//! Is Speed modifier field us using?
bool en_speed = false;
//! Speed modifier field
double speed = 1.0;
//! Is "Immune to fire" flag using?
bool en_nofireball = false;
//! "Immune to fire" flag
bool nofireball = false;
//! Is "Zero gravity" flag using?
bool en_nogravity = false;
//! Zero gravity flag
bool nogravity = false;
//! Is Frames number field using?
bool en_frames = false;
//! Frames number field
uint32_t frames = 0;
//! Is Frame speed modifier field using?
bool en_framespeed = false;
//! Frame speed modifier field
uint32_t framespeed = 0;
//! Is frame style field using?
bool en_framestyle = false;
//! Frame style field
uint32_t framestyle = 0;
//! Is "Immune to ice" flag using?
bool en_noiceball = false;
//! "Immune to ice" flag
bool noiceball = false;
/*
* Extended
*/
//! Is "Immune to hammers/axes/knifes" flag using?
bool en_nohammer = false;
//! "Immune to hammers/axes/knifes" flag
bool nohammer = false;
//! Is "Immune to thrown NPC's" flag using?
bool en_noshell = false;
//! "Immune to thrown NPC's" flag
bool noshell = false;
//! Is NPC's Custom name field using?
bool en_name = false;
//! NPC's Custom name
PGESTRING name;
//! Is NPC's Custom description field using?
bool en_description = false;
//! NPC's Custom description
PGESTRING description;
//! Is custom health level field using?
bool en_health = false;
//! Custom health level field
uint32_t health = 0;
//! Is custom image file name field using?
bool en_image = false;
//! Is custom image file name field using?
PGESTRING image;
//! Is custom in-editor icon image file name field using?
bool en_icon = false;
//! Is custom in-editor icon image file name field using?
PGESTRING icon;
//! Is custom AI script filename field using?
bool en_script = false;
//! Custom AI Script filename field
PGESTRING script;
//! Is custom group name of NPC using?
bool en_group = false;
//! Custom group name of NPC
PGESTRING group;
//! Is custom category name of NPC using?
bool en_category = false;
//! Custom category name of NPC
PGESTRING category;
//! Is custom aligning grid size field using?
bool en_grid = false;
//! Custom aligning grid size field
uint32_t grid = 1;
//! Is custom grid offset X field using?
bool en_gridoffsetx = false;
//! Custom grid offset X field
int32_t gridoffsetx = 0;
//! Is custom grid offset Y field using?
bool en_gridoffsety = false;
//! Custom grid offset Y field
int32_t gridoffsety = 0;
//! Is custom grid align style field using?
bool en_gridalign = false;
//! Custom grid align style field
uint32_t gridalign = 0;
};
#endif // NPC_FILEDATA_H