Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
sprite_effect.c
Go to the documentation of this file.
1/* FIGHTSTG's sprite effects: the 2D effects of techniques and hits, from
2 their sheets. */
3
5
6/* the 2D effects' sheets; the European version's differ */
7#if VERSION_US || VERSION_JP
9 { 0, 0x78E0026, { 320, 256 } },
10 { 0, 0x7940000, { 448, 256 } },
11 { 0, 0x7D10000, { 512, 256 } },
12 { 0, 0x7D30000, { 576, 256 } },
13 { 0, 0, { 576, 256 } },
14 { 0x7E60006, 0x7E60000, { 768, 256 } },
15 { 0x8910005, 0x8910000, { 768, 256 } },
16 { 0x8000002, 0x8000000, { 896, 256 } },
17 { 0x77C0002, 0x77C0000, { 896, 256 } },
18 { 0x7FF0003, 0x7FF0000, { 896, 256 } },
19 { 0x77A0003, 0x77A0000, { 896, 256 } },
20 { 0x80B0002, 0x80B0001, { 896, 256 } },
21 { 0x7D60003, 0x7D60000, { 896, 256 } },
22 { 0x6CA0002, 0x6CA0000, { 896, 256 } },
23 { 0x7D70003, 0x7D70000, { 896, 256 } },
24 { 0x8020002, 0x8020000, { 896, 256 } },
25 { 0x80C0002, 0x80C0001, { 896, 256 } },
26 { 0x77D0002, 0x77D0000, { 896, 256 } },
27 { 0x7CC0002, 0x7CC0000, { 896, 256 } },
28 { 0x7D80002, 0x7D80000, { 896, 256 } },
29 { 0x8030002, 0x8030000, { 896, 256 } },
30 { 0x7960002, 0x7960000, { 896, 256 } },
31 { 0x8080002, 0x8080000, { 896, 256 } },
32 { 0x77E0003, 0x77E0000, { 896, 256 } },
33 { 0x77F0005, 0x77F0000, { 896, 256 } },
34 { 0x88C0002, 0x88C0000, { 896, 256 } },
35 { 0x7800004, 0x7800000, { 896, 256 } },
36 { 0x7CD0002, 0x7CD0000, { 896, 256 } },
37 { 0x8040003, 0x8040000, { 896, 256 } },
38 { 0x8070002, 0x8070000, { 896, 256 } },
39 { 0x80A0002, 0x80A0000, { 896, 256 } },
40 { 0x77B0003, 0x77B0000, { 896, 256 } },
41 { 0x7640002, 0x7640000, { 896, 256 } },
42 { 0x82C0002, 0x82C0000, { 896, 256 } },
43 { 0x7D90003, 0x7D90000, { 896, 256 } },
44 { 0x7CE0003, 0x7CE0000, { 896, 256 } },
45 { 0x7CF0002, 0x7CF0000, { 896, 256 } },
46 { 0x7DA0004, 0x7DA0000, { 896, 256 } },
47 { 0x7F20002, 0x7F20000, { 896, 256 } },
48 { 0x7D00002, 0x7D00000, { 896, 256 } },
49 { 0x7F40002, 0x7F40000, { 896, 256 } },
50 { 0x7810001, 0x7810000, { 896, 256 } },
51 { 0x7F60002, 0x7F60000, { 896, 256 } },
52 { 0x7F30003, 0x7F30000, { 896, 256 } },
53 { 0x87F0002, 0x87F0000, { 896, 256 } },
54 { 0x8780002, 0x8780000, { 896, 256 } },
55 { 0x8790004, 0x8790000, { 896, 256 } },
56 { 0x8770002, 0x8770000, { 896, 256 } },
57 { 0x87A0004, 0x87A0000, { 896, 256 } },
58 { 0x8010002, 0x8010000, { 896, 256 } },
59 { 0x8090002, 0x8090000, { 896, 256 } },
60};
61#elif VERSION_EU
63 { 0, 0x79D0026, { 320, 256 } },
64 { 0, 0x7A30000, { 448, 256 } },
65 { 0, 0x7E00000, { 512, 256 } },
66 { 0, 0x7E20000, { 576, 256 } },
67 { 0, 0, { 576, 256 } },
68 { 0x7F50006, 0x7F50000, { 768, 256 } },
69 { 0x8A20005, 0x8A20000, { 768, 256 } },
70 { 0x80F0002, 0x80F0000, { 896, 256 } },
71 { 0x78B0002, 0x78B0000, { 896, 256 } },
72 { 0x80E0003, 0x80E0000, { 896, 256 } },
73 { 0x7890003, 0x7890000, { 896, 256 } },
74 { 0x81C0002, 0x81C0001, { 896, 256 } },
75 { 0x7E50003, 0x7E50000, { 896, 256 } },
76 { 0x6D90002, 0x6D90000, { 896, 256 } },
77 { 0x7E60003, 0x7E60000, { 896, 256 } },
78 { 0x8110002, 0x8110000, { 896, 256 } },
79 { 0x81D0002, 0x81D0001, { 896, 256 } },
80 { 0x78C0002, 0x78C0000, { 896, 256 } },
81 { 0x7DB0002, 0x7DB0000, { 896, 256 } },
82 { 0x7E70002, 0x7E70000, { 896, 256 } },
83 { 0x8120002, 0x8120000, { 896, 256 } },
84 { 0x7A50002, 0x7A50000, { 896, 256 } },
85 { 0x8190002, 0x8190000, { 896, 256 } },
86 { 0x78D0003, 0x78D0000, { 896, 256 } },
87 { 0x78E0005, 0x78E0000, { 896, 256 } },
88 { 0x89D0002, 0x89D0000, { 896, 256 } },
89 { 0x78F0004, 0x78F0000, { 896, 256 } },
90 { 0x7DC0002, 0x7DC0000, { 896, 256 } },
91 { 0x8130003, 0x8130000, { 896, 256 } },
92 { 0x8180002, 0x8180000, { 896, 256 } },
93 { 0x81B0002, 0x81B0000, { 896, 256 } },
94 { 0x78A0003, 0x78A0000, { 896, 256 } },
95 { 0x7730002, 0x7730000, { 896, 256 } },
96 { 0x83D0002, 0x83D0000, { 896, 256 } },
97 { 0x7E80003, 0x7E80000, { 896, 256 } },
98 { 0x7DD0003, 0x7DD0000, { 896, 256 } },
99 { 0x7DE0002, 0x7DE0000, { 896, 256 } },
100 { 0x7E90004, 0x7E90000, { 896, 256 } },
101 { 0x8010002, 0x8010000, { 896, 256 } },
102 { 0x7DF0002, 0x7DF0000, { 896, 256 } },
103 { 0x8030002, 0x8030000, { 896, 256 } },
104 { 0x7900001, 0x7900000, { 896, 256 } },
105 { 0x8050002, 0x8050000, { 896, 256 } },
106 { 0x8020003, 0x8020000, { 896, 256 } },
107 { 0x8900002, 0x8900000, { 896, 256 } },
108 { 0x8890002, 0x8890000, { 896, 256 } },
109 { 0x88A0004, 0x88A0000, { 896, 256 } },
110 { 0x8880002, 0x8880000, { 896, 256 } },
111 { 0x88B0004, 0x88B0000, { 896, 256 } },
112 { 0x8100002, 0x8100000, { 896, 256 } },
113 { 0x81A0002, 0x81A0000, { 896, 256 } },
114};
115#endif
116/* the 2D effects, ended by an id of -1; the European version's differ */
117#if VERSION_US || VERSION_JP
119 { 0, 0, 0x78E0000 },
120 { 1, 0, 0x78E0001 },
121 { 2, 0, 0x78E0002 },
122 { 19, 0, 0x78E0003 },
123 { 20, 0, 0x78E0028 },
124 { 21, 0, 0x78E0004 },
125 { 22, 0, 0x78E0005 },
126 { 23, 0, 0x78E0006 },
127 { 24, 0, 0x78E0007 },
128 { 25, 0, 0x78E0027 },
129 { 26, 0, 0x78E0008 },
130 { 27, 0, 0x78E0009 },
131 { 28, 0, 0x78E000A },
132 { 29, 0, 0x78E000B },
133 { 31, 0, 0x78E000C },
134 { 32, 0, 0x78E000D },
135 { 42, 0, 0x78E0017 },
136 { 43, 0, 0x78E0018 },
137 { 44, 0, 0x78E0019 },
138 { 45, 0, 0x78E001A },
139 { 46, 0, 0x78E001B },
140 { 47, 0, 0x78E001C },
141 { 57, 0, 0x78E0024 },
142 { 58, 0, 0x78E0025 },
143 { 33, 0, 0x78E000E },
144 { 34, 0, 0x78E000F },
145 { 35, 0, 0x78E0010 },
146 { 36, 0, 0x78E0011 },
147 { 37, 0, 0x78E0012 },
148 { 38, 0, 0x78E0013 },
149 { 39, 0, 0x78E0014 },
150 { 40, 0, 0x78E0015 },
151 { 41, 0, 0x78E0016 },
152 { 50, 0, 0x78E001D },
153 { 51, 0, 0x78E001E },
154 { 52, 0, 0x78E001F },
155 { 53, 0, 0x78E0020 },
156 { 54, 0, 0x78E0021 },
157 { 55, 0, 0x78E0022 },
158 { 56, 0, 0x78E0023 },
159 { 13, 1, 0x7940001 },
160 { 14, 1, 0x7940002 },
161 { 15, 1, 0x7940003 },
162 { 16, 1, 0x7940004 },
163 { 17, 1, 0x7940005 },
164 { 18, 1, 0x7940006 },
165 { 64, 1, 0x7940008 },
166 { 65, 1, 0x7940009 },
167 { 3, 2, 0x7D10001 },
168 { 4, 2, 0x7D10002 },
169 { 5, 2, 0x7D10003 },
170 { 6, 2, 0x7D10004 },
171 { 7, 2, 0x7D10005 },
172 { 8, 2, 0x7D10006 },
173 { 9, 2, 0x7D10007 },
174 { 10, 2, 0x7D10008 },
175 { 11, 2, 0x7D10009 },
176 { 12, 2, 0x7D1000A },
177 { 63, 2, 0x7D1000B },
178 { 62, 3, 0x7D3000B },
179 { 1009, 3, 0x7D30009 },
180 { 1012, 3, 0x7D30003 },
181 { 1013, 3, 0x7D30004 },
182 { 1014, 3, 0x7D30005 },
183 { 1017, 3, 0x7D30008 },
184 { 1020, 3, 0x7D3000A },
185 { 1004, 5, 0x7E60001 },
186 { 1005, 5, 0x7E60002 },
187 { 1006, 5, 0x7E60003 },
188 { 1000, 6, 0x8910001 },
189 { 1001, 6, 0x8910002 },
190 { 1002, 6, 0x8910003 },
191 { 1003, 6, 0x8910004 },
192 { 1007, 6, 0x8910006 },
193 { 1008, 6, 0x8910007 },
194 { 1010, 7, 0x8000001 },
195 { 59, 9, 0x7FF0001 },
196 { 60, 9, 0x7FF0002 },
197 { 1018, 9, 0x7FF0006 },
198 { 1019, 9, 0x7FF0007 },
199 { 2040, 8, 0x77C0001 },
200 { 2036, 10, 0x77A0001 },
201 { 2037, 10, 0x77A0002 },
202 { 2058, 11, 0x80B0000 },
203 { 1021, 12, 0x7D60004 },
204 { 2027, 12, 0x7D60001 },
205 { 2028, 12, 0x7D60002 },
206 { 2043, 13, 0x6CA0001 },
207 { 2011, 14, 0x7D70001 },
208 { 2012, 14, 0x7D70002 },
209 { 1015, 15, 0x8020001 },
210 { 2059, 15, 0x8020003 },
211 { 2060, 16, 0x80C0000 },
212 { 2056, 17, 0x77D0003 },
213 { 2031, 17, 0x77D0001 },
214 { 2014, 18, 0x7CC0001 },
215 { 2026, 19, 0x7D80001 },
216 { 1016, 20, 0x8030001 },
217 { 2044, 21, 0x7960001 },
218 { 1022, 22, 0x8080001 },
219 { 2019, 23, 0x77E0001 },
220 { 2020, 23, 0x77E0002 },
221 { 2008, 24, 0x77F0002 },
222 { 2009, 24, 0x77F0003 },
223 { 2010, 24, 0x77F0004 },
224 { 2062, 25, 0x88C0001 },
225 { 2000, 26, 0x7800001 },
226 { 2001, 26, 0x7800002 },
227 { 2002, 26, 0x7800003 },
228 { 2004, 27, 0x7CD0001 },
229 { 2046, 28, 0x8040001 },
230 { 2047, 28, 0x8040002 },
231 { 2061, 29, 0x8070001 },
232 { 2057, 30, 0x80A0001 },
233 { 2029, 31, 0x77B0001 },
234 { 2030, 31, 0x77B0002 },
235 { 2032, 32, 0x7640001 },
236 { 2007, 33, 0x82C0001 },
237 { 2041, 34, 0x7D90001 },
238 { 2042, 34, 0x7D90002 },
239 { 2024, 35, 0x7CE0001 },
240 { 2025, 35, 0x7CE0002 },
241 { 2005, 36, 0x7CF0001 },
242 { 2006, 36, 0x7CF0003 },
243 { 2016, 37, 0x7DA0001 },
244 { 2017, 37, 0x7DA0002 },
245 { 2018, 37, 0x7DA0003 },
246 { 2038, 38, 0x7F20003 },
247 { 2039, 38, 0x7F20004 },
248 { 2003, 39, 0x7D00001 },
249 { 2015, 40, 0x7F40001 },
250 { 2021, 41, 0x7810002 },
251 { 2022, 41, 0x7810003 },
252 { 2023, 41, 0x7810004 },
253 { 2013, 42, 0x7F60001 },
254 { 2033, 43, 0x7F30001 },
255 { 2034, 43, 0x7F30002 },
256 { 2035, 44, 0x87F0001 },
257 { 2049, 45, 0x8780001 },
258 { 2050, 46, 0x8790001 },
259 { 2051, 46, 0x8790002 },
260 { 2052, 46, 0x8790003 },
261 { 2048, 47, 0x8770001 },
262 { 2053, 48, 0x87A0001 },
263 { 2054, 48, 0x87A0002 },
264 { 2055, 48, 0x87A0003 },
265 { 1011, 49, 0x8010001 },
266 { 2045, 50, 0x8090001 },
267 { -1, 0, 0 },
268};
269#elif VERSION_EU
271 { 0, 0, 0x79D0000 },
272 { 1, 0, 0x79D0001 },
273 { 2, 0, 0x79D0002 },
274 { 19, 0, 0x79D0003 },
275 { 20, 0, 0x79D0028 },
276 { 21, 0, 0x79D0004 },
277 { 22, 0, 0x79D0005 },
278 { 23, 0, 0x79D0006 },
279 { 24, 0, 0x79D0007 },
280 { 25, 0, 0x79D0027 },
281 { 26, 0, 0x79D0008 },
282 { 27, 0, 0x79D0009 },
283 { 28, 0, 0x79D000A },
284 { 29, 0, 0x79D000B },
285 { 31, 0, 0x79D000C },
286 { 32, 0, 0x79D000D },
287 { 42, 0, 0x79D0017 },
288 { 43, 0, 0x79D0018 },
289 { 44, 0, 0x79D0019 },
290 { 45, 0, 0x79D001A },
291 { 46, 0, 0x79D001B },
292 { 47, 0, 0x79D001C },
293 { 57, 0, 0x79D0024 },
294 { 58, 0, 0x79D0025 },
295 { 33, 0, 0x79D000E },
296 { 34, 0, 0x79D000F },
297 { 35, 0, 0x79D0010 },
298 { 36, 0, 0x79D0011 },
299 { 37, 0, 0x79D0012 },
300 { 38, 0, 0x79D0013 },
301 { 39, 0, 0x79D0014 },
302 { 40, 0, 0x79D0015 },
303 { 41, 0, 0x79D0016 },
304 { 50, 0, 0x79D001D },
305 { 51, 0, 0x79D001E },
306 { 52, 0, 0x79D001F },
307 { 53, 0, 0x79D0020 },
308 { 54, 0, 0x79D0021 },
309 { 55, 0, 0x79D0022 },
310 { 56, 0, 0x79D0023 },
311 { 13, 1, 0x7A30001 },
312 { 14, 1, 0x7A30002 },
313 { 15, 1, 0x7A30003 },
314 { 16, 1, 0x7A30004 },
315 { 17, 1, 0x7A30005 },
316 { 18, 1, 0x7A30006 },
317 { 64, 1, 0x7A30008 },
318 { 65, 1, 0x7A30009 },
319 { 3, 2, 0x7E00001 },
320 { 4, 2, 0x7E00002 },
321 { 5, 2, 0x7E00003 },
322 { 6, 2, 0x7E00004 },
323 { 7, 2, 0x7E00005 },
324 { 8, 2, 0x7E00006 },
325 { 9, 2, 0x7E00007 },
326 { 10, 2, 0x7E00008 },
327 { 11, 2, 0x7E00009 },
328 { 12, 2, 0x7E0000A },
329 { 63, 2, 0x7E0000B },
330 { 62, 3, 0x7E2000B },
331 { 1009, 3, 0x7E20009 },
332 { 1012, 3, 0x7E20003 },
333 { 1013, 3, 0x7E20004 },
334 { 1014, 3, 0x7E20005 },
335 { 1017, 3, 0x7E20008 },
336 { 1020, 3, 0x7E2000A },
337 { 1004, 5, 0x7F50001 },
338 { 1005, 5, 0x7F50002 },
339 { 1006, 5, 0x7F50003 },
340 { 1000, 6, 0x8A20001 },
341 { 1001, 6, 0x8A20002 },
342 { 1002, 6, 0x8A20003 },
343 { 1003, 6, 0x8A20004 },
344 { 1007, 6, 0x8A20006 },
345 { 1008, 6, 0x8A20007 },
346 { 1010, 7, 0x80F0001 },
347 { 59, 9, 0x80E0001 },
348 { 60, 9, 0x80E0002 },
349 { 1018, 9, 0x80E0006 },
350 { 1019, 9, 0x80E0007 },
351 { 2040, 8, 0x78B0001 },
352 { 2036, 10, 0x7890001 },
353 { 2037, 10, 0x7890002 },
354 { 2058, 11, 0x81C0000 },
355 { 1021, 12, 0x7E50004 },
356 { 2027, 12, 0x7E50001 },
357 { 2028, 12, 0x7E50002 },
358 { 2043, 13, 0x6D90001 },
359 { 2011, 14, 0x7E60001 },
360 { 2012, 14, 0x7E60002 },
361 { 1015, 15, 0x8110001 },
362 { 2059, 15, 0x8110003 },
363 { 2060, 16, 0x81D0000 },
364 { 2056, 17, 0x78C0003 },
365 { 2031, 17, 0x78C0001 },
366 { 2014, 18, 0x7DB0001 },
367 { 2026, 19, 0x7E70001 },
368 { 1016, 20, 0x8120001 },
369 { 2044, 21, 0x7A50001 },
370 { 1022, 22, 0x8190001 },
371 { 2019, 23, 0x78D0001 },
372 { 2020, 23, 0x78D0002 },
373 { 2008, 24, 0x78E0002 },
374 { 2009, 24, 0x78E0003 },
375 { 2010, 24, 0x78E0004 },
376 { 2062, 25, 0x89D0001 },
377 { 2000, 26, 0x78F0001 },
378 { 2001, 26, 0x78F0002 },
379 { 2002, 26, 0x78F0003 },
380 { 2004, 27, 0x7DC0001 },
381 { 2046, 28, 0x8130001 },
382 { 2047, 28, 0x8130002 },
383 { 2061, 29, 0x8180001 },
384 { 2057, 30, 0x81B0001 },
385 { 2029, 31, 0x78A0001 },
386 { 2030, 31, 0x78A0002 },
387 { 2032, 32, 0x7730001 },
388 { 2007, 33, 0x83D0001 },
389 { 2041, 34, 0x7E80001 },
390 { 2042, 34, 0x7E80002 },
391 { 2024, 35, 0x7DD0001 },
392 { 2025, 35, 0x7DD0002 },
393 { 2005, 36, 0x7DE0001 },
394 { 2006, 36, 0x7DE0003 },
395 { 2016, 37, 0x7E90001 },
396 { 2017, 37, 0x7E90002 },
397 { 2018, 37, 0x7E90003 },
398 { 2038, 38, 0x8010003 },
399 { 2039, 38, 0x8010004 },
400 { 2003, 39, 0x7DF0001 },
401 { 2015, 40, 0x8030001 },
402 { 2021, 41, 0x7900002 },
403 { 2022, 41, 0x7900003 },
404 { 2023, 41, 0x7900004 },
405 { 2013, 42, 0x8050001 },
406 { 2033, 43, 0x8020001 },
407 { 2034, 43, 0x8020002 },
408 { 2035, 44, 0x8900001 },
409 { 2049, 45, 0x8890001 },
410 { 2050, 46, 0x88A0001 },
411 { 2051, 46, 0x88A0002 },
412 { 2052, 46, 0x88A0003 },
413 { 2048, 47, 0x8880001 },
414 { 2053, 48, 0x88B0001 },
415 { 2054, 48, 0x88B0002 },
416 { 2055, 48, 0x88B0003 },
417 { 1011, 49, 0x8100001 },
418 { 2045, 50, 0x81A0001 },
419 { -1, 0, 0 },
420};
421#endif
422
423/* Finds 2D effect effect's sheet (FIGHTSTG_spriteEffects,
424 FIGHTSTG_effectSheets) and gives its values; returns whether it has one */
425s32 FIGHTSTG_findEffectSheet(s32 effect, s32 *images, s32 *sheet, Vec2 *texPos) {
426 SpriteEffectEntry *entry;
427
428 for (entry = FIGHTSTG_spriteEffects; entry->id != -1; entry++) {
429 if (entry->id == effect) {
430 *images = FIGHTSTG_effectSheets[entry->sheet].images;
431 *sheet = FIGHTSTG_effectSheets[entry->sheet].sheet;
432 *texPos = FIGHTSTG_effectSheets[entry->sheet].texPos;
433 return 1;
434 }
435 }
436 return 0;
437}
438
439/* A 2D effect's task: starts a sprite animation for each entry of its
440 archive (up to 30), on BATTLE_LAYER_FRONT for effects 1000 to 1002 and
441 1007, else on BATTLE_LAYER_MODELS, and ends once they all have */
443 s32 *archive;
444 s32 layerId;
445 s32 count;
446 s32 i;
447 s32 j;
448 s32 done;
449
450 switch (task->state) {
451 case TASK_INIT:
452 default:
453 /* getEntry gives the archive's address as a number, getArchiveEntry
454 an entry's as a u8 * */
455 archive = FILE_CACHE.getEntry(task->file);
456 layerId = BATTLE_LAYER_MODELS;
457 if (task->effect >= 1000 && task->effect < 1003) {
458 layerId = BATTLE_LAYER_FRONT;
459 }
460 if (task->effect == 1007) {
461 layerId = BATTLE_LAYER_FRONT;
462 }
463 for (count = 0; count < 30; count++) {
464 if (archive[count] == 0) {
465 break;
466 }
467 }
468 for (i = 0; i < count; i++) {
469 children[i] = FIGHTSTG_createSpriteAnim(FILE_CACHE.getArchiveEntry(i, archive), &task->pos,
471 }
472 task->count = count;
473 task->nextState(task);
474 break;
475 case TASK_RUN:
476 done = 1;
477 for (j = 0; j < task->count; j++) {
478 if (children[j] != NULL) {
479 done = 0;
480 break;
481 }
482 }
483 if (done) {
484 task->setState(task, TASK_KILL);
485 }
486 break;
487 case TASK_DONE:
488 case TASK_KILL:
489 break;
490 }
491}
492
493/* Starts 2D effect effect (FIGHTSTG_spriteEffects) at pos; killed at once
494 when it has no entry */
495SpriteEffect *FIGHTSTG_startSpriteEffect(s32 effect, const SVECTOR *pos) {
496 SpriteEffect *task = createTask(FIGHTSTG_updateSpriteEffect, sizeof(SpriteEffect), 30 * sizeof(Task *));
497 SpriteEffectEntry *entry;
498
499 task->effect = -1;
500 for (entry = FIGHTSTG_spriteEffects; entry->id != -1; entry++) {
501 if (entry->id == effect) {
502 task->effect = effect;
503 task->sheet = entry->sheet;
504 task->file = entry->file;
505 task->pos = *pos;
506 }
507 }
508 if (task->effect == -1) {
509 task->setState(task, TASK_KILL);
510 }
511 return task;
512}
#define BATTLE_LAYER_FRONT
the fades, the flashes and the sprite effects over all
Definition types.h:32
#define BATTLE_LAYER_MODELS
Definition types.h:30
FIGHTSTG.PRO: the battle.
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
SpriteAnim * FIGHTSTG_createSpriteAnim(s16 *data, SVECTOR *pos, s32 sheet, Vec2 *texPos, s32 layerId)
Creates a sprite animation from data at pos, with frames of sheet (textures at texPos) on layer layer...
SpriteEffectEntry FIGHTSTG_spriteEffects[]
the 2D effects, ended by an id of -1; the European version's differ
EffectSheet FIGHTSTG_effectSheets[]
the 2D effects' sheets; the European version's differ
s32 FIGHTSTG_findEffectSheet(s32 effect, s32 *images, s32 *sheet, Vec2 *texPos)
Finds 2D effect effect's sheet (FIGHTSTG_spriteEffects, FIGHTSTG_effectSheets) and gives its values; ...
SpriteEffect * FIGHTSTG_startSpriteEffect(s32 effect, const SVECTOR *pos)
Starts 2D effect effect (FIGHTSTG_spriteEffects) at pos; killed at once when it has no entry.
void FIGHTSTG_updateSpriteEffect(SpriteEffect *task, SpriteAnim **children)
A 2D effect's task: starts a sprite animation for each entry of its archive (up to 30),...
A sprite sheet for the battle's 2D effects: an archive of animations, the sheet and where its texture...
Definition effect.h:35
s32 images
the archive of TIMs a script loads for it, 0 for none
Definition effect.h:36
Vec2 texPos
Definition effect.h:38
s32 sheet
Definition effect.h:37
void *(* getArchiveEntry)(s32 index, void *archive)
Definition file.h:97
void *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
One animation of a 2D effect (FIGHTSTG_createSpriteAnim), drawn by a layer callback.
Definition effect.h:64
A 2D effect: its sheet in FIGHTSTG_effectSheets and its animations, an archive of SpriteAnim data; th...
Definition effect.h:44
A 2D effect (FIGHTSTG_startSpriteEffect): a SpriteAnim per animation, killed when they all are.
Definition effect.h:52
s32 effect
-1: not found
Definition effect.h:54
SVECTOR pos
Definition effect.h:57
s32 count
Definition effect.h:58
void(* nextState)(struct SpriteEffect *task)
Definition effect.h:53
s32 state
Definition effect.h:53
s32 sheet
Definition effect.h:55
void(* setState)(struct SpriteEffect *task, s32 state)
Definition effect.h:53
Any task, seen through its header.
Definition task.h:62
Definition gfx.h:352
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105