forked from gitter-badger/notes-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
msg.h
632 lines (499 loc) · 13.4 KB
/
msg.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
#include "types.h"
/// address: 0x43BBA4
///
/// j_msg_cpp_init initializes the C++ runtime of msg.cpp.
void j_msg_cpp_init();
/// address: 0x43BBA9
///
/// msg_cpp_init initializes the C++ runtime of msg.cpp.
void msg_cpp_init();
/// address: 0x43BBB4
///
/// TODO: add documentation.
/// address: 0x43BBCF
///
/// TODO: add documentation.
/// address: 0x43BC31
///
/// TODO: add documentation.
/// address: 0x43BC6D
///
/// TODO: add documentation.
/// address: 0x43BCED
///
/// TODO: add documentation.
/// address: 0x43BD19
///
/// TODO: add documentation.
/// address: 0x43BDEB
///
/// TODO: add documentation.
/// address: 0x43BE0D
///
/// TODO: add documentation.
/// address: 0x43BE74
///
/// TODO: add documentation.
/// address: 0x43BF2B
///
/// TODO: add documentation.
/// address: 0x43BF5B
///
/// TODO: add documentation.
/// address: 0x43BF6F
///
/// TODO: add documentation.
/// address: 0x43BFA1
///
/// TODO: add documentation.
/// address: 0x43C019
///
/// TODO: add documentation.
/// address: 0x43C035
///
/// TODO: add documentation.
/// address: 0x43C07C
///
/// TODO: add documentation.
/// address: 0x43C0C2
///
/// TODO: add documentation.
/// address: 0x43C0F2
///
/// TODO: add documentation.
/// address: 0x43C134
///
/// TODO: add documentation.
/// address: 0x43C17D
///
/// TODO: add documentation.
/// address: 0x43C24F
///
/// msg_is_portal_inactive reports whether the given portal is active.
///
/// PSX ref: 0x8004F2F0
/// PSX def: unsigned char delta_portal_inited__Fi(int i)
bool32_t __fastcall msg_is_portal_inactive(int portal_num);
/// address: 0x43C25D
///
/// TODO: add documentation.
/// address: 0x43C26B
///
/// TODO: add documentation.
/// address: 0x43C372
///
/// TODO: add documentation.
/// address: 0x43C3BA
///
/// TODO: add documentation.
/// address: 0x43C873
///
/// msg_send_cmd sends a command message without body to connected peers.
///
/// PSX ref: 0x8004F6D0
/// PSX def: void NetSendCmd__FUcUc(unsigned char bHiPri, unsigned char bCmd)
void __fastcall msg_send_cmd(bool32_t high_priority, cmd cmd);
/// address: 0x43C891
///
/// msg_send_cmd_spawn_golem sends a spawn golem command message.
///
/// PSX ref: 0x8004F6F8
/// PSX def: void NetSendCmdGolem__FUcUcUcUclUc(unsigned char mx, unsigned char my, unsigned char dir, unsigned char menemy, long hp, int cl)
void __fastcall msg_send_cmd_spawn_golem(int8_t x, int8_t y, int8_t direction, int8_t target_num, int hp_cur, int8_t dlvl);
/// address: 0x43C8C7
///
/// msg_send_cmd_coord sends a command message with X,Y coordinates to connected peers.
///
/// PSX ref: 0x8004F744
/// PSX def: void NetSendCmdLoc__FUcUcUcUc(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y)
void __fastcall msg_send_cmd_coord(bool32_t high_priority, cmd cmd, int8_t x, int8_t y);
/// address: 0x43C8F3
///
/// msg_send_cmd_coord_param1 sends a command message with X,Y coordinates and
/// one parameter to connected peers.
///
/// PSX ref: 0x8004F774
/// PSX def: void NetSendCmdLocParam1__FUcUcUcUcUs(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1)
void __fastcall msg_send_cmd_coord_param1(bool32_t high_priority, cmd cmd, int8_t x, int8_t y, int16_t param1);
/// address: 0x43C928
///
/// msg_send_cmd_coord_param2 sends a command message with X,Y coordinates and
/// two parameters to connected peers.
///
/// PSX ref: 0x8004F7AC
/// PSX def: void NetSendCmdLocParam2__FUcUcUcUcUsUs(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1, int wParam2)
void __fastcall msg_send_cmd_coord_param2(bool32_t high_priority, cmd cmd, int8_t x, int8_t y, int16_t param1, int16_t param2);
/// address: 0x43C965
///
/// msg_send_cmd_coord_param3 sends a command message with X,Y coordinates and
/// three parameters to connected peers.
///
/// PSX ref: 0x8004F7EC
/// PSX def: void NetSendCmdLocParam3__FUcUcUcUcUsUsUs(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1, int wParam2, int wParam3)
void __fastcall msg_send_cmd_coord_param3(bool32_t high_priority, cmd cmd, int8_t x, int8_t y, int16_t param1, int16_t param2, int16_t param3);
/// address: 0x43C9AB
///
/// msg_send_cmd_param1 sends a command message with one parameter to connected
/// peers.
///
/// PSX ref: 0x8004F834
/// PSX def: void NetSendCmdParam1__FUcUcUs(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1)
void __fastcall msg_send_cmd_param1(bool32_t high_priority, cmd cmd, int16_t param1);
/// address: 0x43C9D3
///
/// msg_send_cmd_param2 sends a command message with two parameters to connected
/// peers.
///
/// PSX ref: 0x8004F860
/// PSX def: void NetSendCmdParam2__FUcUcUsUs(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1, unsigned short wParam2)
void __fastcall msg_send_cmd_param2(bool32_t high_priority, cmd cmd, int16_t param1, int16_t param2);
/// address: 0x43CA04
///
/// msg_send_cmd_param3 sends a command message with three parameters to
/// connected peers.
///
/// PSX ref: 0x8004F890
/// PSX def: void NetSendCmdParam3__FUcUcUsUsUs(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1, unsigned short wParam2, int wParam3)
void __fastcall msg_send_cmd_param3(bool32_t high_priority, cmd cmd, int16_t param1, int16_t param2, int16_t param3);
/// address: 0x43CA3D
///
/// msg_send_cmd_sync_quest sends a sync quest command message to connected
/// peers.
///
/// PSX ref: 0x8004F8C8
/// PSX def: void NetSendCmdQuest__FUcUc(unsigned char bHiPri, unsigned char q)
void __fastcall msg_send_cmd_sync_quest(bool32_t high_priority, quest_id quest_id);
/// address: 0x43CA84
///
/// msg_send_cmd_get_item sends a get item command message to connected peers.
///
/// PSX ref: 0x8004F93C
/// PSX def: void NetSendCmdGItem__FUcUcUcUcUc(unsigned char bHiPri, unsigned char bCmd, unsigned char mast, unsigned char pnum, int ii)
void __fastcall msg_send_cmd_get_item(bool32_t high_priority, cmd cmd, int8_t player_num_master, int8_t player_num, int8_t item_num);
/// address: 0x43CC09
///
/// msg_send_cmd_get_item2 sends a GetItem command message to connected peers.
///
/// PSX ref: 0x8004FA84
/// PSX def: void NetSendCmdGItem2__FUcUcUcUcPC9TCmdGItem(unsigned char usonly, unsigned char bCmd, unsigned char mast, unsigned char pnum, struct TCmdGItem *p)
void __fastcall msg_send_cmd_get_item2(bool32_t record_tc, cmd cmd, int8_t master_player_num, int8_t player_num, CmdGetItem *src_msg);
/// address: 0x43CC74
///
/// TODO: add documentation.
/// address: 0x43CCCF
///
/// TODO: add documentation.
/// address: 0x43CCF8
///
/// TODO: add documentation.
/// address: 0x43CE5B
///
/// TODO: add documentation.
/// address: 0x43CEB2
///
/// TODO: add documentation.
/// address: 0x43CED4
///
/// TODO: add documentation.
/// address: 0x43D039
///
/// TODO: add documentation.
/// address: 0x43D064
///
/// TODO: add documentation.
/// address: 0x43D09D
///
/// TODO: add documentation.
/// address: 0x43D0BC
///
/// TODO: add documentation.
/// address: 0x43D632
///
/// TODO: add documentation.
/// address: 0x43D6BA
///
/// TODO: add documentation.
/// address: 0x43D6F5
///
/// TODO: add documentation.
/// address: 0x43D709
///
/// TODO: add documentation.
/// address: 0x43D746
///
/// TODO: add documentation.
/// address: 0x43D7F1
///
/// TODO: add documentation.
/// address: 0x43D7FC
///
/// msg_on_cmd_walk_to_coordinate handles a WalkToCoordinate command.
///
/// PSX ref: 0x8004FF74
/// PSX def: void On_WALKXY__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_cmd_walk_to_coordinate(CmdCoord *msg, int player_num);
/// address: 0x43D84A
///
/// msg_on_add_str handles an AddStr command.
///
/// PSX ref: 0x8004FFF4
/// PSX def: void On_ADDSTR__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_add_str(CmdParam1 *msg, int player_num);
/// address: 0x43D87B
///
/// msg_on_add_mag handles an AddMag command.
///
/// PSX ref: 0x80050024
/// PSX def: void On_ADDMAG__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_add_mag(CmdParam1 *msg, int player_num);
/// address: 0x43D8AC
///
/// msg_on_add_dex handles an AddDex command.
///
/// PSX ref: 0x80050054
/// PSX def: void On_ADDDEX__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_add_dex(CmdParam1 *msg, int player_num);
/// address: 0x43D8DD
///
/// msg_on_add_vit handles an AddVit command.
///
/// PSX ref: 0x80050084
/// PSX def: void On_ADDVIT__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_add_vit(CmdParam1 *msg, int player_num);
/// address: 0x43D90E
///
/// msg_on_cmd_cast_spell handles a CastSpell command.
///
/// PSX ref: 0x800500B4
/// PSX def: void On_SBSPELL__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_cmd_cast_spell(CmdParam1 *msg, int player_num);
/// address: 0x43D97D
///
/// msg_errorf displays a formatted error message.
void msg_errorf(char *format, ...);
/// address: 0x43D9C4
///
/// msg_on_cmd_lift_item_at_coordinate handles a LiftItemAtCoordinate command.
///
/// PSX ref: 0x80050128
/// PSX def: void On_GOTOGETITEM__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_cmd_lift_item_at_coordinate(CmdCoordParam1 *msg, int player_num);
/// address: 0x43DA16
///
/// msg_on_cmd_lift_item handles a LiftItem command.
///
/// PSX ref: 0x800501B0
/// PSX def: void On_REQUESTGITEM__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_cmd_lift_item(CmdGetItem *msg, int player_num);
/// address: 0x43DAE6
///
/// TODO: add documentation.
/// address: 0x43DB2D
///
/// TODO: add documentation.
/// address: 0x43DC3D
///
/// TODO: add documentation.
/// address: 0x43DD40
///
/// msg_on_cmd_loot_item_at_coordinate handles a LootItemAtCoordinate command.
///
/// PSX ref: 0x800501B0
/// PSX def: void On_REQUESTGITEM__FPC4TCmdi(struct TCmd *pCmd, int pnum)
int __fastcall msg_on_cmd_loot_item_at_coordinate(CmdCoordParam1 *msg, int player_num);
/// address: 0x43DD92
///
/// TODO: add documentation.
/// address: 0x43DE60
///
/// TODO: add documentation.
/// address: 0x43DF6E
///
/// TODO: add documentation.
/// address: 0x43DFC9
///
/// TODO: add documentation.
/// address: 0x43E0CE
///
/// TODO: add documentation.
/// address: 0x43E179
///
/// TODO: add documentation.
/// address: 0x43E193
///
/// TODO: add documentation.
/// address: 0x43E284
///
/// TODO: add documentation.
/// address: 0x43E32A
///
/// TODO: add documentation.
/// address: 0x43E386
///
/// TODO: add documentation.
/// address: 0x43E3D5
///
/// TODO: add documentation.
/// address: 0x43E424
///
/// TODO: add documentation.
/// address: 0x43E4D2
///
/// TODO: add documentation.
/// address: 0x43E576
///
/// TODO: add documentation.
/// address: 0x43E61A
///
/// TODO: add documentation.
/// address: 0x43E68A
///
/// TODO: add documentation.
/// address: 0x43E6FA
///
/// TODO: add documentation.
/// address: 0x43E732
///
/// TODO: add documentation.
/// address: 0x43E7DF
///
/// TODO: add documentation.
/// address: 0x43E840
///
/// TODO: add documentation.
/// address: 0x43E885
///
/// TODO: add documentation.
/// address: 0x43E8CA
///
/// TODO: add documentation.
/// address: 0x43E964
///
/// TODO: add documentation.
/// address: 0x43E9FE
///
/// TODO: add documentation.
/// address: 0x43EA98
///
/// TODO: add documentation.
/// address: 0x43EB32
///
/// TODO: add documentation.
/// address: 0x43EB74
///
/// TODO: add documentation.
/// address: 0x43EBA4
///
/// TODO: add documentation.
/// address: 0x43EBD5
///
/// TODO: add documentation.
/// address: 0x43EC27
///
/// TODO: add documentation.
/// address: 0x43EC5B
///
/// TODO: add documentation.
/// address: 0x43ECBA
///
/// TODO: add documentation.
/// address: 0x43ED23
///
/// TODO: add documentation.
/// address: 0x43ED89
///
/// TODO: add documentation.
/// address: 0x43EE3D
///
/// TODO: add documentation.
/// address: 0x43EEF5
///
/// TODO: add documentation.
/// address: 0x43EF2D
///
/// TODO: add documentation.
/// address: 0x43EFDD
///
/// TODO: add documentation.
/// address: 0x43F033
///
/// TODO: add documentation.
/// address: 0x43F058
///
/// TODO: add documentation.
/// address: 0x43F0AE
///
/// TODO: add documentation.
/// address: 0x43F104
///
/// TODO: add documentation.
/// address: 0x43F15C
///
/// TODO: add documentation.
/// address: 0x43F1B0
///
/// TODO: add documentation.
/// address: 0x43F1F0
///
/// TODO: add documentation.
/// address: 0x43F21E
///
/// TODO: add documentation.
/// address: 0x43F258
///
/// TODO: add documentation.
/// address: 0x43F28F
///
/// TODO: add documentation.
/// address: 0x43F2C9
///
/// TODO: add documentation.
/// address: 0x43F2CE
///
/// TODO: add documentation.
/// address: 0x43F448
///
/// TODO: add documentation.
/// address: 0x43F521
///
/// TODO: add documentation.
/// address: 0x43F55C
///
/// TODO: add documentation.
/// address: 0x43F59A
///
/// TODO: add documentation.
/// address: 0x43F5D3
///
/// TODO: add documentation.
/// address: 0x43F60C
///
/// TODO: add documentation.
/// address: 0x43F645
///
/// TODO: add documentation.
/// address: 0x43F67E
///
/// TODO: add documentation.
/// address: 0x43F6B7
///
/// TODO: add documentation.
/// address: 0x43F6EC
///
/// TODO: add documentation.
/// address: 0x43F72E
///
/// TODO: add documentation.
/// address: 0x43F7A5
///
/// TODO: add documentation.
/// address: 0x43F7A9
///
/// TODO: add documentation.
/// address: 0x43F818
///
/// TODO: add documentation.
/// address: 0x43F830
///
/// msg_parse_cmd_impact_mana_shield parses a impact mana shield command.
int __fastcall msg_parse_cmd_impact_mana_shield(uint8_t *msg, int player_num);