Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Core/HLE/FunctionWrappers.h
3186 views
1
// Copyright (c) 2012- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include "Common/CommonTypes.h"
21
#include "Core/HLE/HLE.h"
22
#include "Core/MemMap.h"
23
24
// For easy parameter parsing and return value processing.
25
26
// 64bit wrappers
27
// 64bit values are always "aligned" in regs (never start on an odd reg.)
28
29
template<u64 func()> void WrapU64_V() {
30
u64 retval = func();
31
RETURN64(retval);
32
}
33
34
template<u64 func(u32)> void WrapU64_U() {
35
u64 retval = func(PARAM(0));
36
RETURN64(retval);
37
}
38
39
template<u64 func(int)> void WrapU64_I() {
40
u64 retval = func(PARAM(0));
41
RETURN64(retval);
42
}
43
44
template<u64 func(u32, u64)> void WrapU64_UU64() {
45
u64 retval = func(PARAM(0), PARAM64(2));
46
RETURN64(retval);
47
}
48
49
template<u64 func(int, u64)> void WrapU64_IU64() {
50
u64 retval = func(PARAM(0), PARAM64(2));
51
RETURN64(retval);
52
}
53
54
template<int func(int, u64)> void WrapI_IU64() {
55
int retval = func(PARAM(0), PARAM64(2));
56
RETURN(retval);
57
}
58
59
template<int func(u32, u64)> void WrapI_UU64() {
60
int retval = func(PARAM(0), PARAM64(2));
61
RETURN(retval);
62
}
63
64
template<u32 func(u32, u64)> void WrapU_UU64() {
65
u32 retval = func(PARAM(0), PARAM64(2));
66
RETURN(retval);
67
}
68
69
template<int func(u32, u32, u64)> void WrapI_UUU64() {
70
int retval = func(PARAM(0), PARAM(1), PARAM64(2));
71
RETURN(retval);
72
}
73
74
template<u32 func(int, s64, int)> void WrapU_II64I() {
75
u32 retval = func(PARAM(0), PARAM64(2), PARAM(4));
76
RETURN(retval);
77
}
78
79
template<u32 func(u32, u64, u32, u32)> void WrapU_UU64UU() {
80
u32 retval = func(PARAM(0), PARAM64(2), PARAM(4), PARAM(5));
81
RETURN(retval);
82
}
83
84
template<u32 func(int, u64, u32, u32)> void WrapU_IU64UU() {
85
u32 retval = func(PARAM(0), PARAM64(2), PARAM(4), PARAM(5));
86
RETURN(retval);
87
}
88
89
template<int func(int, int, const char*, u64)> void WrapI_IICU64() {
90
int retval = func(PARAM(0), PARAM(1), Memory::GetCharPointer(PARAM(2)), PARAM64(4));
91
RETURN(retval);
92
}
93
94
template<s64 func(int, s64, int)> void WrapI64_II64I() {
95
s64 retval = func(PARAM(0), PARAM64(2), PARAM(4));
96
RETURN64(retval);
97
}
98
99
//32bit wrappers
100
template<void func()> void WrapV_V() {
101
func();
102
}
103
104
template<u32 func()> void WrapU_V() {
105
RETURN(func());
106
}
107
108
template<u32 func(int, void *, int)> void WrapU_IVI() {
109
u32 retval = func(PARAM(0), Memory::GetPointerWrite(PARAM(1)), PARAM(2));
110
RETURN(retval);
111
}
112
113
template<int func(const char *, int, int, u32)> void WrapI_CIIU() {
114
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2), PARAM(3));
115
RETURN(retval);
116
}
117
118
template<int func(int, const char *, u32, void *, void *, u32, int)> void WrapI_ICUVVUI() {
119
u32 retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), Memory::GetPointerWrite(PARAM(3)),Memory::GetPointerWrite(PARAM(4)), PARAM(5), PARAM(6) );
120
RETURN(retval);
121
}
122
123
// Hm, do so many params get passed in registers?
124
template<int func(const char *, int, const char *, int, int, int, int, int)> void WrapI_CICIIIII() {
125
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), Memory::GetCharPointer(PARAM(2)),
126
PARAM(3), PARAM(4), PARAM(5), PARAM(6), PARAM(7));
127
RETURN(retval);
128
}
129
130
// Hm, do so many params get passed in registers?
131
template<int func(const char *, int, int, int, int, int, int)> void WrapI_CIIIIII() {
132
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
133
PARAM(3), PARAM(4), PARAM(5), PARAM(6));
134
RETURN(retval);
135
}
136
137
template<int func(int, int, int, const char *)> void WrapI_IIIC() {
138
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), Memory::GetCharPointer(PARAM(3)));
139
RETURN(retval);
140
}
141
142
// Hm, do so many params get passed in registers?
143
template<int func(int, int, int, int, int, int, u32)> void WrapI_IIIIIIU() {
144
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6));
145
RETURN(retval);
146
}
147
148
// Hm, do so many params get passed in registers?
149
template<int func(int, int, int, int, int, int, int, int, u32)> void WrapI_IIIIIIIIU() {
150
u32 param8 = *(const u32_le *)Memory::GetPointerWrite(currentMIPS->r[29]); //Fixed 9th parameter, thanks to Kingcom
151
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6), PARAM(7), param8);
152
RETURN(retval);
153
}
154
155
template<u32 func(int, void *)> void WrapU_IV() {
156
u32 retval = func(PARAM(0), Memory::GetPointerWrite(PARAM(1)));
157
RETURN(retval);
158
}
159
160
template<float func()> void WrapF_V() {
161
RETURNF(func());
162
}
163
164
// TODO: Not sure about the floating point parameter passing
165
template<float func(int, float, u32)> void WrapF_IFU() {
166
RETURNF(func(PARAM(0), PARAMF(0), PARAM(1)));
167
}
168
169
template<u32 func(u32)> void WrapU_U() {
170
u32 retval = func(PARAM(0));
171
RETURN(retval);
172
}
173
174
template<u32 func(u32, int)> void WrapU_UI() {
175
u32 retval = func(PARAM(0), PARAM(1));
176
RETURN(retval);
177
}
178
179
template<int func(u32)> void WrapI_U() {
180
int retval = func(PARAM(0));
181
RETURN(retval);
182
}
183
184
template<int func(u32, int)> void WrapI_UI() {
185
int retval = func(PARAM(0), PARAM(1));
186
RETURN(retval);
187
}
188
189
template<int func(u32, int, int, u32)> void WrapI_UIIU() {
190
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
191
RETURN(retval);
192
}
193
194
template<u32 func(int, u32, int)> void WrapU_IUI() {
195
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
196
RETURN(retval);
197
}
198
199
template<int func(u32, u32)> void WrapI_UU() {
200
int retval = func(PARAM(0), PARAM(1));
201
RETURN(retval);
202
}
203
204
template<int func(u32, float, float)> void WrapI_UFF() {
205
// Not sure about the float arguments.
206
int retval = func(PARAM(0), PARAMF(0), PARAMF(1));
207
RETURN(retval);
208
}
209
210
template<int func(u32, u32, u32)> void WrapI_UUU() {
211
int retval = func(PARAM(0), PARAM(1), PARAM(2));
212
RETURN(retval);
213
}
214
215
template<int func(u32, u32, u32, int)> void WrapI_UUUI() {
216
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
217
RETURN(retval);
218
}
219
220
template<int func(u32, u32, u32, int, int, int,int )> void WrapI_UUUIIII() {
221
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6));
222
RETURN(retval);
223
}
224
225
template<int func(u32, u32, u32, u32)> void WrapI_UUUU() {
226
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
227
RETURN(retval);
228
}
229
230
template<int func(u32, u32, u32, u32, u32)> void WrapI_UUUUU() {
231
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
232
RETURN(retval);
233
}
234
235
template<int func(u32, const char*, u32, u32, int)> void WrapI_UCUUI() {
236
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3), PARAM(4));
237
RETURN(retval);
238
}
239
240
template<int func(u32, int, const char*, u32, u32)> void WrapI_UICUU() {
241
int retval = func(PARAM(0), PARAM(1), Memory::GetCharPointer(PARAM(2)), PARAM(3), PARAM(4));
242
RETURN(retval);
243
}
244
245
template<int func(u32, u32, int, const char*)> void WrapI_UUIC() {
246
int retval = func(PARAM(0), PARAM(1), PARAM(2), Memory::GetCharPointer(PARAM(3)));
247
RETURN(retval);
248
}
249
250
template<int func(u32, u32, int, u32, int)> void WrapI_UUIUI() {
251
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
252
RETURN(retval);
253
}
254
255
template<int func()> void WrapI_V() {
256
int retval = func();
257
RETURN(retval);
258
}
259
260
template<u32 func(int)> void WrapU_I() {
261
u32 retval = func(PARAM(0));
262
RETURN(retval);
263
}
264
265
template<u32 func(int, int, u32)> void WrapU_IIU() {
266
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
267
RETURN(retval);
268
}
269
270
template<int func(int)> void WrapI_I() {
271
int retval = func(PARAM(0));
272
RETURN(retval);
273
}
274
275
template<void func(u32)> void WrapV_U() {
276
func(PARAM(0));
277
}
278
279
template<void func(int)> void WrapV_I() {
280
func(PARAM(0));
281
}
282
283
template<void func(u32, u32)> void WrapV_UU() {
284
func(PARAM(0), PARAM(1));
285
}
286
287
template<void func(int, int)> void WrapV_II() {
288
func(PARAM(0), PARAM(1));
289
}
290
291
template<void func(u32, const char *)> void WrapV_UC() {
292
func(PARAM(0), Memory::GetCharPointer(PARAM(1)));
293
}
294
295
template<int func(u32, const char *)> void WrapI_UC() {
296
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)));
297
RETURN(retval);
298
}
299
300
template<int func(u32, const char *, int)> void WrapI_UCI() {
301
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2));
302
RETURN(retval);
303
}
304
305
template<u32 func(u32, int , int , int, int, int)> void WrapU_UIIIII() {
306
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
307
RETURN(retval);
308
}
309
310
template<u32 func(u32, int , int , int, u32)> void WrapU_UIIIU() {
311
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
312
RETURN(retval);
313
}
314
315
template<u32 func(u32, int , int , int, int, int, int)> void WrapU_UIIIIII() {
316
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6));
317
RETURN(retval);
318
}
319
320
template<u32 func(u32, u32)> void WrapU_UU() {
321
u32 retval = func(PARAM(0), PARAM(1));
322
RETURN(retval);
323
}
324
325
template<u32 func(u32, u32, int)> void WrapU_UUI() {
326
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
327
RETURN(retval);
328
}
329
330
template<u32 func(u32, u32, int, int)> void WrapU_UUII() {
331
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
332
RETURN(retval);
333
}
334
335
template<u32 func(const char *, u32, u32, u32)> void WrapU_CUUU() {
336
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2), PARAM(3));
337
RETURN(retval);
338
}
339
340
template<void func(u32, int, u32, int, int)> void WrapV_UIUII() {
341
func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
342
}
343
344
template<u32 func(u32, int, u32, int, int)> void WrapU_UIUII() {
345
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
346
RETURN(retval);
347
}
348
349
template<int func(u32, int, u32, int, int)> void WrapI_UIUII() {
350
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
351
RETURN(retval);
352
}
353
354
template<u32 func(u32, int, u32, int)> void WrapU_UIUI() {
355
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
356
RETURN(retval);
357
}
358
359
template<int func(u32, int, u32, int)> void WrapI_UIUI() {
360
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
361
RETURN(retval);
362
}
363
364
template<u32 func(u32, int, u32)> void WrapU_UIU() {
365
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
366
RETURN(retval);
367
}
368
369
template<u32 func(u32, int, u32, u32)> void WrapU_UIUU() {
370
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
371
RETURN(retval);
372
}
373
374
template<u32 func(u32, int, int)> void WrapU_UII() {
375
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
376
RETURN(retval);
377
}
378
379
template<u32 func(u32, int, int, u32)> void WrapU_UIIU() {
380
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
381
RETURN(retval);
382
}
383
384
template<int func(u32, int, int, u32, u32)> void WrapI_UIIUU() {
385
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
386
RETURN(retval);
387
}
388
389
template<int func(u32, u32, int, int)> void WrapI_UUII() {
390
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
391
RETURN(retval);
392
}
393
394
template<int func(u32, u32, int, int, int)> void WrapI_UUIII() {
395
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
396
RETURN(retval);
397
}
398
399
template<void func(u32, int, int, int)> void WrapV_UIII() {
400
func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
401
}
402
403
template<void func(u32, int, int, int, int, int)> void WrapV_UIIIII() {
404
func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
405
}
406
407
template<void func(u32, int, int)> void WrapV_UII() {
408
func(PARAM(0), PARAM(1), PARAM(2));
409
}
410
411
template<u32 func(int, u32)> void WrapU_IU() {
412
int retval = func(PARAM(0), PARAM(1));
413
RETURN(retval);
414
}
415
416
template<int func(int, u32)> void WrapI_IU() {
417
int retval = func(PARAM(0), PARAM(1));
418
RETURN(retval);
419
}
420
421
template<int func(u32, u32, int)> void WrapI_UUI() {
422
int retval = func(PARAM(0), PARAM(1), PARAM(2));
423
RETURN(retval);
424
}
425
426
template<int func(u32, u32, int, u32)> void WrapI_UUIU() {
427
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
428
RETURN(retval);
429
}
430
431
template<int func(int, int)> void WrapI_II() {
432
int retval = func(PARAM(0), PARAM(1));
433
RETURN(retval);
434
}
435
436
template<int func(int, int, int)> void WrapI_III() {
437
int retval = func(PARAM(0), PARAM(1), PARAM(2));
438
RETURN(retval);
439
}
440
441
template<int func(int, u32, int)> void WrapI_IUI() {
442
int retval = func(PARAM(0), PARAM(1), PARAM(2));
443
RETURN(retval);
444
}
445
446
template<int func(int, int, int, int)> void WrapI_IIII() {
447
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
448
RETURN(retval);
449
}
450
451
template<int func(u32, int, int, int)> void WrapI_UIII() {
452
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
453
RETURN(retval);
454
}
455
456
template<int func(int, int, int, u32, int)> void WrapI_IIIUI() {
457
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
458
RETURN(retval);
459
}
460
461
template<int func(int, int, int, u32, u32)> void WrapI_IIIUU() {
462
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
463
RETURN(retval);
464
}
465
466
template<int func(int, u32, u32, int, int)> void WrapI_IUUII() {
467
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
468
RETURN(retval);
469
}
470
471
template<int func(int, u32, u32, int, int, int)> void WrapI_IUUIII() {
472
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
473
RETURN(retval);
474
}
475
476
template<int func(int, const char *, int, u32, u32)> void WrapI_ICIUU() {
477
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3), PARAM(4));
478
RETURN(retval);
479
}
480
481
template<int func(int, int, u32)> void WrapI_IIU() {
482
int retval = func(PARAM(0), PARAM(1), PARAM(2));
483
RETURN(retval);
484
}
485
486
template<void func(int, u32)> void WrapV_IU() {
487
func(PARAM(0), PARAM(1));
488
}
489
490
template<void func(u32, int)> void WrapV_UI() {
491
func(PARAM(0), PARAM(1));
492
}
493
494
template<u32 func(const char *)> void WrapU_C() {
495
u32 retval = func(Memory::GetCharPointer(PARAM(0)));
496
RETURN(retval);
497
}
498
499
template<u32 func(const char *, const char *, const char *, u32)> void WrapU_CCCU() {
500
u32 retval = func(Memory::GetCharPointer(PARAM(0)),
501
Memory::GetCharPointer(PARAM(1)), Memory::GetCharPointer(PARAM(2)),
502
PARAM(3));
503
RETURN(retval);
504
}
505
506
template<int func(const char *)> void WrapI_C() {
507
int retval = func(Memory::GetCharPointer(PARAM(0)));
508
RETURN(retval);
509
}
510
511
template<int func(const char *, u32)> void WrapI_CU() {
512
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1));
513
RETURN(retval);
514
}
515
516
template<int func(int, const char*, u32)> void WrapI_ICU() {
517
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2));
518
RETURN(retval);
519
}
520
521
template<int func(const char *, u32, int)> void WrapI_CUI() {
522
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2));
523
RETURN(retval);
524
}
525
526
template<u32 func(const char *, u32, int)> void WrapU_CUI() {
527
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2));
528
RETURN(retval);
529
}
530
531
template<int func(int, const char *, int, u32)> void WrapI_ICIU() {
532
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3));
533
RETURN(retval);
534
}
535
536
template<int func(int, const char *, u32, u32)> void WrapI_ICUU() {
537
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3));
538
RETURN(retval);
539
}
540
541
template<int func(int, const char *, u32, u32, u32)> void WrapI_ICUUU() {
542
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3), PARAM(4));
543
RETURN(retval);
544
}
545
546
template<int func(int, int, u32, u32)> void WrapI_IIUU() {
547
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
548
RETURN(retval);
549
}
550
551
template<int func(const char *, int, u32)> void WrapI_CIU() {
552
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2));
553
RETURN(retval);
554
}
555
556
template<int func(const char *, u32, u32)> void WrapI_CUU() {
557
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2));
558
RETURN(retval);
559
}
560
561
template<int func(const char *, u32, u32, u32)> void WrapI_CUUU() {
562
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
563
PARAM(3));
564
RETURN(retval);
565
}
566
567
template<int func(const char *, const char*, int, int)> void WrapI_CCII() {
568
int retval = func(Memory::GetCharPointer(PARAM(0)), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3));
569
RETURN(retval);
570
}
571
572
template<int func(const char *, u32, u32, int, u32, u32)> void WrapI_CUUIUU() {
573
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
574
PARAM(3), PARAM(4), PARAM(5));
575
RETURN(retval);
576
}
577
578
template<int func(const char *, int, int, u32, int, int)> void WrapI_CIIUII() {
579
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
580
PARAM(3), PARAM(4), PARAM(5));
581
RETURN(retval);
582
}
583
584
template<int func(const char *, int, int, int, u32, u32, int)> void WrapI_CIIIUUI() {
585
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
586
PARAM(3), PARAM(4), PARAM(5), PARAM(6));
587
RETURN(retval);
588
}
589
590
template<int func(const char *, int, u32, u32, u32)> void WrapI_CIUUU() {
591
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
592
PARAM(3), PARAM(4));
593
RETURN(retval);
594
}
595
596
template<int func(const char *, u32, u32, u32, u32, u32)> void WrapI_CUUUUU() {
597
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
598
PARAM(3), PARAM(4), PARAM(5));
599
RETURN(retval);
600
}
601
602
template<u32 func(const char *, u32)> void WrapU_CU() {
603
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1));
604
RETURN((u32) retval);
605
}
606
607
template<u32 func(u32, const char *)> void WrapU_UC() {
608
u32 retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)));
609
RETURN(retval);
610
}
611
612
template<u32 func(const char *, u32, u32)> void WrapU_CUU() {
613
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2));
614
RETURN((u32) retval);
615
}
616
617
template<u32 func(int, int, int)> void WrapU_III() {
618
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
619
RETURN(retval);
620
}
621
622
template<u32 func(int, int)> void WrapU_II() {
623
u32 retval = func(PARAM(0), PARAM(1));
624
RETURN(retval);
625
}
626
627
template<u32 func(int, int, int, int)> void WrapU_IIII() {
628
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
629
RETURN(retval);
630
}
631
632
template<u32 func(int, u32, u32)> void WrapU_IUU() {
633
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
634
RETURN(retval);
635
}
636
637
template<u32 func(int, u32, u32, u32)> void WrapU_IUUU() {
638
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
639
RETURN(retval);
640
}
641
642
template<u32 func(int, u32, u32, u32, u32)> void WrapU_IUUUU() {
643
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
644
RETURN(retval);
645
}
646
647
template<u32 func(u32, u32, u32)> void WrapU_UUU() {
648
u32 retval = func(PARAM(0), PARAM(1), PARAM(2));
649
RETURN(retval);
650
}
651
652
template<void func(int, u32, u32)> void WrapV_IUU() {
653
func(PARAM(0), PARAM(1), PARAM(2));
654
}
655
656
template<void func(int, int, u32)> void WrapV_IIU() {
657
func(PARAM(0), PARAM(1), PARAM(2));
658
}
659
660
template<void func(u32, int, u32)> void WrapV_UIU() {
661
func(PARAM(0), PARAM(1), PARAM(2));
662
}
663
664
template<int func(u32, int, u32)> void WrapI_UIU() {
665
int retval = func(PARAM(0), PARAM(1), PARAM(2));
666
RETURN(retval);
667
}
668
669
template<void func(int, u32, u32, u32, u32)> void WrapV_IUUUU() {
670
func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
671
}
672
673
template<void func(u32, u32, u32)> void WrapV_UUU() {
674
func(PARAM(0), PARAM(1), PARAM(2));
675
}
676
677
template<void func(u32, u32, u32, u32)> void WrapV_UUUU() {
678
func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
679
}
680
681
template<void func(const char *, u32, int, u32)> void WrapV_CUIU() {
682
func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2), PARAM(3));
683
}
684
685
template<int func(const char *, u32, int, u32)> void WrapI_CUIU() {
686
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2), PARAM(3));
687
RETURN(retval);
688
}
689
690
template<void func(u32, const char *, u32, int, u32)> void WrapV_UCUIU() {
691
func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3),
692
PARAM(4));
693
}
694
695
template<int func(u32, const char *, u32, int, u32)> void WrapI_UCUIU() {
696
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2),
697
PARAM(3), PARAM(4));
698
RETURN(retval);
699
}
700
701
template<void func(const char *, u32, int, int, u32)> void WrapV_CUIIU() {
702
func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2), PARAM(3),
703
PARAM(4));
704
}
705
706
template<int func(const char *, u32, int, int, u32)> void WrapI_CUIIU() {
707
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
708
PARAM(3), PARAM(4));
709
RETURN(retval);
710
}
711
712
template<u32 func(u32, u32, u32, u32)> void WrapU_UUUU() {
713
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
714
RETURN(retval);
715
}
716
717
template<u32 func(u32, const char *, u32, u32)> void WrapU_UCUU() {
718
u32 retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3));
719
RETURN(retval);
720
}
721
722
template<u32 func(u32, u32, u32, int)> void WrapU_UUUI() {
723
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
724
RETURN(retval);
725
}
726
727
template<u32 func(u32, u32, u32, int, u32)> void WrapU_UUUIU() {
728
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
729
RETURN(retval);
730
}
731
732
template<u32 func(u32, u32, u32, int, u32, int)> void WrapU_UUUIUI() {
733
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
734
RETURN(retval);
735
}
736
737
template<u32 func(u32, u32, int, u32)> void WrapU_UUIU() {
738
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
739
RETURN(retval);
740
}
741
742
template<u32 func(u32, int, int, int)> void WrapU_UIII() {
743
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
744
RETURN(retval);
745
}
746
747
template<int func(int, u32, u32, u32, u32)> void WrapI_IUUUU() {
748
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
749
RETURN(retval);
750
}
751
752
template<int func(int, u32, u32, u32, u32, u32)> void WrapI_IUUUUU() {
753
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
754
RETURN(retval);
755
}
756
757
template<int func(int, u32, u32, int, u32, u32)> void WrapI_IUUIUU() {
758
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
759
RETURN(retval);
760
}
761
762
template<int func(int, u32, int, int)> void WrapI_IUII() {
763
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
764
RETURN(retval);
765
}
766
template<u32 func(u32, u32, u32, u32, u32)> void WrapU_UUUUU() {
767
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
768
RETURN(retval);
769
}
770
771
template<void func(u32, u32, u32, u32, u32)> void WrapV_UUUUU() {
772
func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
773
}
774
775
template<u32 func(const char *, const char *)> void WrapU_CC() {
776
int retval = func(Memory::GetCharPointer(PARAM(0)),
777
Memory::GetCharPointer(PARAM(1)));
778
RETURN(retval);
779
}
780
781
template<void func(const char *, int)> void WrapV_CI() {
782
func(Memory::GetCharPointer(PARAM(0)), PARAM(1));
783
}
784
785
template<u32 func(const char *, int)> void WrapU_CI() {
786
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1));
787
RETURN(retval);
788
}
789
790
template<u32 func(const char *, int, int)> void WrapU_CII() {
791
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2));
792
RETURN(retval);
793
}
794
795
template<int func(const char *, int, u32, int, u32)> void WrapU_CIUIU() {
796
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
797
PARAM(3), PARAM(4));
798
RETURN(retval);
799
}
800
801
template<u32 func(const char *, int, u32, int, u32, int)> void WrapU_CIUIUI() {
802
u32 retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
803
PARAM(3), PARAM(4), PARAM(5));
804
RETURN(retval);
805
}
806
807
template<u32 func(u32, u32, u32, u32, u32, u32)> void WrapU_UUUUUU() {
808
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4),
809
PARAM(5));
810
RETURN(retval);
811
}
812
813
template<int func(int, u32, u32, u32)> void WrapI_IUUU() {
814
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
815
RETURN(retval);
816
}
817
818
template<int func(int, u32, u32, int)> void WrapI_IUUI() {
819
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
820
RETURN(retval);
821
}
822
823
template<int func(int, u32, int, int, u32, u32)> void WrapI_IUIIUU() {
824
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
825
RETURN(retval);
826
}
827
828
template<int func(int, u32, int, int, u32, int)> void WrapI_IUIIUI() {
829
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
830
RETURN(retval);
831
}
832
833
template<int func(int, u32, u32)> void WrapI_IUU() {
834
int retval = func(PARAM(0), PARAM(1), PARAM(2));
835
RETURN(retval);
836
}
837
838
template<u32 func(u32, u32, u32, u32, u32, u32, u32)> void WrapU_UUUUUUU() {
839
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6));
840
RETURN(retval);
841
}
842
843
template<int func(u32, u32, u32, u32, u32, u32, u32)> void WrapI_UUUUUUU() {
844
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6));
845
RETURN(retval);
846
}
847
848
template<int func(int, u32, u32, u32, u32, u32, u32)> void WrapI_IUUUUUU() {
849
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6));
850
RETURN(retval);
851
}
852
853
template<int func(u32, int, u32, u32)> void WrapI_UIUU() {
854
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
855
RETURN(retval);
856
}
857
858
template<int func(int, const char *)> void WrapI_IC() {
859
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)));
860
RETURN(retval);
861
}
862
863
template <int func(int, const char *, const char *, u32, int)> void WrapI_ICCUI() {
864
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), Memory::GetCharPointer(PARAM(2)), PARAM(3), PARAM(4));
865
RETURN(retval);
866
}
867
868
template <int func(int, const char *, const char *, int)> void WrapI_ICCI() {
869
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), Memory::GetCharPointer(PARAM(2)), PARAM(3));
870
RETURN(retval);
871
}
872
873
template <int func(const char *, int, int)> void WrapI_CII() {
874
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2));
875
RETURN(retval);
876
}
877
878
template <int func(int, const char *, int)> void WrapI_ICI() {
879
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2));
880
RETURN(retval);
881
}
882
883
template<int func(int, void *, void *, void *, void *, u32, int)> void WrapI_IVVVVUI(){
884
u32 retval = func(PARAM(0), Memory::GetPointerWrite(PARAM(1)), Memory::GetPointerWrite(PARAM(2)), Memory::GetPointerWrite(PARAM(3)), Memory::GetPointerWrite(PARAM(4)), PARAM(5), PARAM(6) );
885
RETURN(retval);
886
}
887
888
template<int func(int, const char *, u32, void *, int, int, int)> void WrapI_ICUVIII(){
889
u32 retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), Memory::GetPointerWrite(PARAM(3)), PARAM(4), PARAM(5), PARAM(6));
890
RETURN(retval);
891
}
892
893
template<int func(void *, u32, int)> void WrapI_VUI(){
894
u32 retval = func(Memory::GetPointerWrite(PARAM(0)), PARAM(1), PARAM(2));
895
RETURN(retval);
896
}
897
898
template<u32 func(void *, u32, u32)> void WrapU_VUU() {
899
u32 retval = func(Memory::GetPointerWrite(PARAM(0)), PARAM(1), PARAM(2));
900
RETURN(retval);
901
}
902
903
template<u32 func(void *, const char *)> void WrapU_VC() {
904
u32 retval = func(Memory::GetPointerWrite(PARAM(0)), Memory::GetCharPointer(PARAM(1)));
905
RETURN(retval);
906
}
907
908
template<int func(const char *, const char*, u32)> void WrapI_CCU() {
909
int retval = func(Memory::GetCharPointer(PARAM(0)), Memory::GetCharPointer(PARAM(1)), PARAM(2));
910
RETURN(retval);
911
}
912
913
template<int func(const char *, const char*)> void WrapI_CC() {
914
int retval = func(Memory::GetCharPointer(PARAM(0)), Memory::GetCharPointer(PARAM(1)));
915
RETURN(retval);
916
}
917
918
template<u32 func(void *, const char *, u32)> void WrapU_VCU() {
919
u32 retval = func(Memory::GetPointerWrite(PARAM(0)), Memory::GetCharPointer(PARAM(1)), PARAM(2));
920
RETURN(retval);
921
}
922
923
template<u32 func(void *, int)> void WrapU_VI() {
924
u32 retval = func(Memory::GetPointerWrite(PARAM(0)), PARAM(1));
925
RETURN(retval);
926
}
927
928