-
Notifications
You must be signed in to change notification settings - Fork 2
/
functions_oCNpc_engine.d
1594 lines (1223 loc) · 47.3 KB
/
functions_oCNpc_engine.d
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
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Author: mud-freak
*/
func void oCNpc_SetFocusVob (var int slfInstance, var int focusPtr) {
//0x0068FF70 public: void __thiscall oCNpc::SetFocusVob(class zCVob *)
const int oCNpc__SetFocusVob_G1 = 6881136;
//0x00732B60 public: void __thiscall oCNpc::SetFocusVob(class zCVob *)
const int oCNpc__SetFocusVob_G2 = 7547744;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
// Update the focus vob (properly, mind the reference counter)
if (focusPtr != slf.focus_vob) {
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam(_@(focusPtr));
CALL__thiscall(_@(slfPtr), MEMINT_SwitchG1G2 (oCNpc__SetFocusVob_G1, oCNpc__SetFocusVob_G2));
call = CALL_End();
};
};
};
func void oCNpc_SetInteractItem(var int slfInstance, var int itemPtr) {
//0x006A6670 public: void __thiscall oCNpc::SetInteractItem(class oCItem *)
const int oCNpc__SetInteractItem_G1 = 6973040;
//0x0074ACC0 public: void __thiscall oCNpc::SetInteractItem(class oCItem *)
const int oCNpc__SetInteractItem_G2 = 7646400;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam(_@(itemPtr));
CALL__thiscall(_@(slfPtr), MEMINT_SwitchG1G2(oCNpc__SetInteractItem_G1, oCNpc__SetInteractItem_G2));
call = CALL_End();
};
};
/*
*
*/
func void oCNpc_SetEnemy (var int slfInstance, var int focusPtr) {
//0x00691A80 public: void __thiscall oCNpc::SetEnemy(class oCNpc *)
const int oCNpc__SetEnemy_G1 = 6888064;
//0x00734BC0 public: void __thiscall oCNpc::SetEnemy(class oCNpc *)
const int oCNpc__SetEnemy_G2 = 7556032;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam(_@(focusPtr));
CALL__thiscall(_@(slfPtr), MEMINT_SwitchG1G2 (oCNpc__SetEnemy_G1, oCNpc__SetEnemy_G2));
call = CALL_End();
};
};
/*
*
*/
func void oCNpc_DropUnconscious (var int slfInstance, var int attackerInstance) {
//0x00692C10 public: void __thiscall oCNpc::DropUnconscious(float,class oCNpc *)
const int oCNpc__DropUnconscious_G1 = 6892560;
//0x00735EB0 public: void __thiscall oCNpc::DropUnconscious(float,class oCNpc *)
const int oCNpc__DropUnconscious_G2 = 7560880;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
var int attackerPtr; attackerPtr = 0;
var oCNPC attacker; attacker = Hlp_GetNPC (attackerInstance);
if (Hlp_IsValidNPC (attacker)) {
attackerPtr = _@ (attacker);
};
//Safety check - game crashes if called with Npc that is not in active vob list
if (!VobPtr_IsInActiveVobList (slfPtr)) { return; };
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (attackerPtr));
CALL_FloatParam (_@ (FLOATNULL)); //???
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__DropUnconscious_G1, oCNpc__DropUnconscious_G2));
call = CALL_End();
};
};
/*
*
*/
func void oCNpc_DoDie (var int slfInstance, var int attackerInstance) {
//0x006934A0 public: virtual void __thiscall oCNpc::DoDie(class oCNpc *)
const int oCNpc__DoDie_G1 = 6894752;
//0x00736760 public: virtual void __thiscall oCNpc::DoDie(class oCNpc *)
const int oCNpc__DoDie_G2 = 7563104;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
var int attackerPtr; attackerPtr = 0;
var oCNPC attacker; attacker = Hlp_GetNPC (attackerInstance);
if (Hlp_IsValidNPC (attacker)) {
attackerPtr = _@ (attacker);
};
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (attackerPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__DoDie_G1, oCNpc__DoDie_G2));
call = CALL_End();
};
};
/*
*
*/
func int oCNpc_DoTakeVob (var int slfInstance, var int vobPtr) {
//0x006A0D10 public: virtual int __thiscall oCNpc::DoTakeVob(class zCVob *)
const int oCNpc__DoTakeVob_G1 = 6950160;
//0x007449C0 public: virtual int __thiscall oCNpc::DoTakeVob(class zCVob *)
const int oCNpc__DoTakeVob_G2 = 7621056;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
if (!vobPtr) { return 0; };
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__DoTakeVob_G1, oCNpc__DoTakeVob_G2));
call = CALL_End();
};
return CALL_RetValAsInt ();
};
/*
*
*/
func void oCNpc_OpenDeadNpc (var int slfInstance) {
//0x006BB890 public: void __thiscall oCNpc::OpenDeadNpc(void)
const int oCNpc__OpenDeadNpc_G1 = 7059600;
//0x00762970 public: void __thiscall oCNpc::OpenDeadNpc(void)
const int oCNpc__OpenDeadNpc_G2 = 7743856;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__OpenDeadNpc_G1, oCNpc__OpenDeadNpc_G2));
call = CALL_End();
};
};
/*
*
*/
func void oCNpc_CloseDeadNpc (var int slfInstance) {
//0x006BBAA0 public: void __thiscall oCNpc::CloseDeadNpc(void)
const int oCNpc__CloseDeadNpc_G1 = 7060128;
//0x00762B40 public: void __thiscall oCNpc::CloseDeadNpc(void)
const int oCNpc__CloseDeadNpc_G2 = 7744320;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__CloseDeadNpc_G1, oCNpc__CloseDeadNpc_G2));
call = CALL_End();
};
};
/*
*
*/
func void oCNpc_OpenInventory (var int slfInstance, var int param1) {
//0x006BB0A0 public: void __thiscall oCNpc::OpenInventory(void)
const int oCNpc__OpenInventory_G1 = 7057568;
//0x00762250 public: void __thiscall oCNpc::OpenInventory(int)
const int oCNpc__OpenInventory_G2 = 7742032;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
if (MEMINT_SwitchG1G2 (0, 1)) {
CALL_IntParam (_@ (param1));
};
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__OpenInventory_G1, oCNpc__OpenInventory_G2));
call = CALL_End();
};
};
/*
*
*/
func void oCNpc_CloseInventory (var int slfInstance) {
//0x006BB2F0 public: void __thiscall oCNpc::CloseInventory(void)
const int oCNpc__CloseInventory_G1 = 7058160;
//0x00762410 public: void __thiscall oCNpc::CloseInventory(void)
const int oCNpc__CloseInventory_G2 = 7742480;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__CloseInventory_G1, oCNpc__CloseInventory_G2));
call = CALL_End();
};
};
/*
*
*/
func int oCNpc_UseItem (var int slfInstance, var int itemPtr) {
//0x00698810 public: int __thiscall oCNpc::UseItem(class oCItem *)
const int oCNpc__UseItem_G1 = 6916112;
//0x0073BC10 public: int __thiscall oCNPC::UseItem(class oCItem *)
const int oCNpc__UseItem_G2 = 7584784;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (itemPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__UseItem_G1, oCNpc__UseItem_G2));
call = CALL_End();
};
return CALL_RetValAsInt ();
};
/*
*
*/
func int oCNpc_GetSlotItem (var int slfInstance, var string slotName) {
//0x0068F4F0 public: class oCItem * __thiscall oCNpc::GetSlotItem(class zSTRING const &)
const int oCNpc__GetSlotItem_G1 = 6878448;
//0x00731F90 public: class oCItem * __thiscall oCNpc::GetSlotItem(class zSTRING const &)
const int oCNpc__GetSlotItem_G2 = 7544720;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
CALL_zStringPtrParam (slotName);
CALL__thiscall (_@ (slf), MEMINT_SwitchG1G2 (oCNpc__GetSlotItem_G1, oCNpc__GetSlotItem_G2));
return CALL_RetValAsPtr ();
};
/*
*
*/
func int oCNpc_DoExchangeTorch (var int slfInstance)
{
//0x006A1680 public: virtual int __thiscall oCNpc::DoExchangeTorch(void)
const int oCNpc__DoExchangeTorch_G1 = 6952576;
//0x00745370 public: virtual int __thiscall oCNpc::DoExchangeTorch(void)
const int oCNpc__DoExchangeTorch_G2 = 7623536;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__DoExchangeTorch_G1, oCNpc__DoExchangeTorch_G2));
call = CALL_End();
};
return CALL_RetValAsInt ();
};
func int oCNpc_HasTorch (var int slfInstance) {
//0x00697EC0 public: int __thiscall oCNpc::HasTorch(void)
const int oCNpc__HasTorch_G1 = 6913728;
//0x0073B2C0 public: int __thiscall oCNpc::HasTorch(void)
const int oCNpc__HasTorch_G2 = 7582400;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__HasTorch_G1, oCNpc__HasTorch_G2));
call = CALL_End();
};
return CALL_RetValAsInt ();
};
/*
const int FMODE_NONE = 0;
const int FMODE_FIST = 1;
const int FMODE_MELEE = 2;
const int FMODE_FAR = 5;
const int FMODE_MAGIC = 7;
*/
func void oCNpc_SetWeaponMode (var int slfInstance, var int weaponMode) {
//0x00696550 public: virtual void __thiscall oCNpc::SetWeaponMode(int)
const int oCNpc__SetWeaponMode_G1 = 6907216;
//0x00739940 public: virtual void __thiscall oCNpc::SetWeaponMode(int)
const int oCNpc__SetWeaponMode_G2 = 7575872;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_IntParam (_@ (weaponMode));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__SetWeaponMode_G1, oCNpc__SetWeaponMode_G2));
call = CALL_End();
};
};
func void oCNpc_SetWeaponMode2 (var int slfInstance, var int weaponMode) {
//0x00695A60 public: virtual void __thiscall oCNpc::SetWeaponMode2(int)
const int oCNpc__SetWeaponMode2_G1 = 6904416;
//0x00738E80 public: virtual void __thiscall oCNpc::SetWeaponMode2(int)
const int oCNpc__SetWeaponMode2_G2 = 7573120;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_IntParam (_@ (weaponMode));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__SetWeaponMode2_G1, oCNpc__SetWeaponMode2_G2));
call = CALL_End();
};
};
func int oCNpc_GetWeaponMode (var int slfInstance) {
//0x00695820 public: int __thiscall oCNpc::GetWeaponMode(void)
const int oCNpc__GetWeaponMode_G1 = 6903840;
//0x00738C40 public: int __thiscall oCNpc::GetWeaponMode(void)
const int oCNpc__GetWeaponMode_G2 = 7572544;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return -1; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__GetWeaponMode_G1, oCNpc__GetWeaponMode_G2));
call = CALL_End();
};
return CALL_RetValAsInt();
};
/*
* NPC vob list
*/
/*
* oCNpc_CreateVobList (var int slfInstance, var int rangeF)
* Pretty much same as NPC_PerceiveAll - however allows you to control rangeF in which Vobs will be collected.
* When used all collected vobs will be available in slf.vobList_array.
*/
func void oCNpc_CreateVobList (var int slfInstance, var int rangeF) {
//0x006B7110 public: void __thiscall oCNpc::CreateVobList(float)
const int oCNpc__CreateVobList_G1 = 7041296;
//0x0075DA40 public: void __thiscall oCNpc::CreateVobList(float)
const int oCNpc__CreateVobList_G2 = 7723584;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_FloatParam (_@ (rangeF));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__CreateVobList_G1, oCNpc__CreateVobList_G2));
call = CALL_End();
};
};
/*
* oCNpc_ClearVobList (var int slfInstance)
* Clears slf.vobList_array
*/
func void oCNpc_ClearVobList (var int slfInstance) {
//0x006B6EB0 public: void __thiscall oCNpc::ClearVobList(void)
const int oCNpc__ClearVobList_G1 = 7040688;
//0x0075D7F0 public: void __thiscall oCNpc::ClearVobList(void)
const int oCNpc__ClearVobList_G2 = 7722992;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__ClearVobList_G1, oCNpc__ClearVobList_G2));
call = CALL_End();
};
};
/*
* oCNpc_InsertInVobList (var int slfInstance, var int vobPtr)
* Adds specific vobPtr from slf.vobList_array
*/
func void oCNpc_InsertInVobList (var int slfInstance, var int vobPtr) {
//0x006B6F30 public: void __thiscall oCNpc::InsertInVobList(class zCVob *)
const int oCNpc__InsertInVobList_G1 = 7040816;
//0x0075D870 public: void __thiscall oCNpc::InsertInVobList(class zCVob *)
const int oCNpc__InsertInVobList_G2 = 7723120;
if (!vobPtr) { return; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__InsertInVobList_G1, oCNpc__InsertInVobList_G2));
call = CALL_End();
};
};
/*
* oCNpc_RemoveFromVobList (var int slfInstance, var int vobPtr)
* Removes specific vobPtr from slf.vobList_array
*/
func void oCNpc_RemoveFromVobList (var int slfInstance, var int vobPtr) {
//0x006B7080 public: void __thiscall oCNpc::RemoveFromVobList(class zCVob *)
const int oCNpc__RemoveFromVobList_G1 = 7041152;
//0x0075D9B0 public: void __thiscall oCNpc::RemoveFromVobList(class zCVob *)
const int oCNpc__RemoveFromVobList_G2 = 7723440;
if (!vobPtr) { return; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__RemoveFromVobList_G1, oCNpc__RemoveFromVobList_G2));
call = CALL_End();
};
};
/*
*
*/
func int oCNpc_CanSee (var int slfInstance, var int vobPtr, var int ignoreAngles){
//0x0069E010 public: int __thiscall oCNpc::CanSee(class zCVob *,int)
const int oCNpc__CanSee_G1 = 6938640;
//0x00741C10 public: int __thiscall oCNPC::CanSee(class zCVob *,int)
const int oCNpc__CanSee_G2 = 7609360;
if (!vobPtr) { return 0; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_IntParam (_@ (ignoreAngles));
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__CanSee_G1, oCNpc__CanSee_G2));
call = CALL_End();
};
return CALL_RetValAsInt();
};
func int oCNpc_FreeLineOfSight (var int slfInstance, var int vobPtr){
//0x0069DE50 public: int __thiscall oCNpc::FreeLineOfSight(class zCVob *)
const int oCNpc__FreeLineOfSight_G1 = 6938192;
//0x007418E0 public: int __thiscall oCNpc::FreeLineOfSight(class zCVob *)
const int oCNpc__FreeLineOfSight_G2 = 7608544;
if (!vobPtr) { return 0; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__FreeLineOfSight_G1, oCNpc__FreeLineOfSight_G2));
call = CALL_End();
};
return CALL_RetValAsInt();
};
func int oCNpc_DoDropVob (var int slfInstance, var int vobPtr) {
//0x006A10F0 public: virtual int __thiscall oCNpc::DoDropVob(class zCVob *)
const int oCNpc__DoDropVob_G1 = 6951152;
//0x00744DD0 public: virtual int __thiscall oCNpc::DoDropVob(class zCVob *)
const int oCNpc__DoDropVob_G2 = 7622096;
if (!vobPtr) { return 0; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__DoDropVob_G1, oCNpc__DoDropVob_G2));
call = CALL_End();
};
return CALL_RetValAsInt();
};
func void oCNpc_DropAllInHand (var int slfInstance)
{
//0x00694230 public: void __thiscall oCNpc::DropAllInHand(void)
const int oCNpc__DropAllInHand_G1 = 6898224;
//0x007375E0 public: void __thiscall oCNpc::DropAllInHand(void)
const int oCNpc__DropAllInHand_G2 = 7566816;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__DropAllInHand_G1, oCNpc__DropAllInHand_G2));
call = CALL_End();
};
};
func void oCNpc_SetRightHand (var int slfInstance, var int vobPtr) {
//0x00697DC0 public: void __thiscall oCNpc::SetRightHand(class oCVob *)
const int oCNpc__SetRightHand_G1 = 6913472;
//0x0073B1C0 public: void __thiscall oCNpc::SetRightHand(class oCVob *)
const int oCNpc__SetRightHand_G2 = 7582144;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__SetRightHand_G1, oCNpc__SetRightHand_G2));
call = CALL_End();
};
};
func void oCNpc_SetLeftHand (var int slfInstance, var int vobPtr) {
//0x00697CC0 public: void __thiscall oCNpc::SetLeftHand(class oCVob *)
const int oCNpc__SetLeftHand_G1 = 6913216;
//0x0073B0C0 public: void __thiscall oCNpc::SetLeftHand(class oCVob *)
const int oCNpc__SetLeftHand_G2 = 7581888;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__SetLeftHand_G1, oCNpc__SetLeftHand_G2));
call = CALL_End();
};
};
/* angleX
* - negative number vob is on lefthand-side
* - 0 vob is directly in front of npc
* - positive number vob is on righthand-side
* angleY
* - negative number vob is below npc
* - 0 vob is directly in front of NPC
* - positive number vob is above npc
*/
func void oCNpc_GetAnglesVob (var int slfInstance, var int vobPtr, var int angleXPtr, var int angleYPtr) {
//0x0074C0D0 public: void __thiscall oCNpc::GetAngles(class zCVob *,float &,float &)
const int oCNpc__GetAnglesVob_G1 = 7651536;
//0x00681680 public: void __thiscall oCNpc::GetAngles(class zCVob *,float &,float &)
const int oCNpc__GetAnglesVob_G2 = 6821504;
if (!vobPtr) { return; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (angleYPtr));
CALL_PtrParam (_@ (angleXPtr));
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__GetAnglesVob_G1, oCNpc__GetAnglesVob_G2));
call = CALL_End();
};
};
func void oCNpc_GetAngles (var int slfInstance, var int posPtr, var int angleXPtr, var int angleYPtr) {
//0x0074BD00 public: void __thiscall oCNpc::GetAngles(class zVEC3 &,float &,float &)
const int oCNpc__GetAngles_G1 = 7650560;
//0x006812B0 public: void __thiscall oCNpc::GetAngles(class zVEC3 &,float &,float &)
const int oCNpc__GetAngles_G2 = 6820528;
if (!posPtr) { return; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam (_@ (angleYPtr));
CALL_PtrParam (_@ (angleXPtr));
CALL_PtrParam (_@ (posPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__GetAngles_G1, oCNpc__GetAngles_G2));
call = CALL_End();
};
};
func int NPC_IsVobPtrInAngleX (var int slfInstance, var int vobPtr, var int angle) {
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return FALSE; };
if (!vobPtr) { return FALSE; };
var int angleX;
var int angleY;
oCNpc_GetAnglesVob (slfInstance, vobPtr, _@ (angleX), _@ (angleY));
if (gef (angleX, negf (mkf (angle))))
&& (lef (angleX, mkf (angle)))
{
return TRUE;
};
return FALSE;
};
func int NPC_IsVobPtrInAngleY (var int slfInstance, var int vobPtr, var int angle) {
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return FALSE; };
if (!vobPtr) { return FALSE; };
var int angleX;
var int angleY;
oCNpc_GetAnglesVob (slfInstance, vobPtr, _@ (angleX), _@ (angleY));
if (gef (angleY, negf (mkf (angle))))
&& (lef (angleY, mkf (angle)))
{
return TRUE;
};
return FALSE;
};
func int NPC_IsNpcInAngleX (var int slfInstance, var int npcInstance, var int angle) {
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return FALSE; };
var oCNPC npc; npc = Hlp_GetNPC (npcInstance);
if (!Hlp_IsValidNPC (npc)) { return FALSE; };
return + (NPC_IsVobPtrInAngleX (slfInstance, _@ (npc), angle));
};
func int NPC_IsNpcInAngleY (var int slfInstance, var int npcInstance, var int angle) {
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return FALSE; };
var oCNPC npc; npc = Hlp_GetNPC (npcInstance);
if (!Hlp_IsValidNPC (npc)) { return FALSE; };
return + (NPC_IsVobPtrInAngleY (slfInstance, _@ (npc), angle));
};
/*
*
*/
func int oCNpc_DoThrowVob (var int slfInstance, var int vobPtr, var int speedF) {
//0x006A13C0 public: virtual int __thiscall oCNpc::DoThrowVob(class zCVob *,float)
const int oCNpc__DoThrowVob_G1 = 6951872;
//0x007450B0 public: virtual int __thiscall oCNPC::DoThrowVob(class zCVob *,float)
const int oCNpc__DoThrowVob_G2 = 7622832;
if (!vobPtr) { return 0; };
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_FloatParam (_@ (speedF));
CALL_PtrParam (_@ (vobPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__DoThrowVob_G1, oCNpc__DoThrowVob_G2));
call = CALL_End();
};
return CALL_RetValAsInt ();
};
func int oCNpc_FindMobInter (var int slfInstance, var string scemeName) {
//0x0069C720 public: class oCMobInter * __thiscall oCNpc::FindMobInter(class zSTRING const &)
const int oCNpc__FindMobInter_G1 = 6932256;
//0x0073FE70 public: class oCMobInter * __thiscall oCNpc::FindMobInter(class zSTRING const &)
const int oCNpc__FindMobInter_G2 = 7601776;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
scemeName = STR_Upper (scemeName);
CALL_zStringPtrParam (scemeName);
CALL__thiscall (_@ (slf), MEMINT_SwitchG1G2 (oCNpc__FindMobInter_G1, oCNpc__FindMobInter_G2));
return CALL_RetValAsPtr ();
};
func int oCNpc_DropFromSlot (var int slfInstance, var string slotName) {
//0x006A61A0 public: class oCVob * __thiscall oCNpc::DropFromSlot(class zSTRING const &)
const int oCNpc__DropFromSlot_G1 = 6971808;
//0x0074A590 public: class oCVob * __thiscall oCNpc::DropFromSlot(class zSTRING const &)
const int oCNpc__DropFromSlot_G2 = 7644560;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
CALL_zStringPtrParam (slotName);
CALL__thiscall (_@ (slf), MEMINT_SwitchG1G2 (oCNpc__DropFromSlot_G1, oCNpc__DropFromSlot_G2));
return CALL_RetValAsPtr ();
};
func int oCNpc_GetTalkingWith (var int slfInstance) {
//0x006335D0 public: class oCNpc * __thiscall oCNpc::GetTalkingWith(void)
const int oCNpc__GetTalkingWith_G1 = 6501840;
//0x006BCF60 public: class oCNpc * __thiscall oCNpc::GetTalkingWith(void)
const int oCNpc__GetTalkingWith_G2 = 7065440;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__GetTalkingWith_G1, oCNpc__GetTalkingWith_G2));
call = CALL_End();
};
return CALL_RetValAsPtr ();
};
func int oCNpc_BeamTo (var int slfInstance, var string targetVob) {
//0x00693B10 public: int __thiscall oCNpc::BeamTo(class zSTRING const &)
const int oCNpc__BeamTo_G1 = 6896400;
//0x00736EE0 public: int __thiscall oCNpc::BeamTo(class zSTRING const &)
const int oCNpc__BeamTo_G2 = 7565024;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
CALL_zstringPtrParam (targetVob);
CALL__thiscall (_@ (slf), MEMINT_SwitchG1G2 (oCNpc__BeamTo_G1, oCNpc__BeamTo_G2));
return CALL_RetValAsInt ();
};
func void oCNpc_Enable (var int slfInstance, var int posPtr) {
//0x006A2000 public: virtual void __thiscall oCNpc::Enable(class zVEC3 &)
const int oCNpc__Enable_G1 = 6955008;
//0x00745D40 public: virtual void __thiscall oCNpc::Enable(class zVEC3 &)
const int oCNpc__Enable_G2 = 7626048;
if (!posPtr) { return; };
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam(_@ (posPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__Enable_G1, oCNpc__Enable_G2));
call = CALL_End();
};
};
func void oCNpc_Disable (var int slfInstance) {
//0x006A1D20 public: virtual void __thiscall oCNpc::Disable(void)
const int oCNpc__Disable_G1 = 6954272;
//0x00745A20 public: virtual void __thiscall oCNpc::Disable(void)
const int oCNpc__Disable_G2 = 7625248;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__Disable_G1, oCNpc__Disable_G2));
call = CALL_End();
};
};
func void oCNpc_ClearEM (var int slfInstance) {
//0x006A2610 public: void __thiscall oCNpc::ClearEM(void)
const int oCNpc__ClearEM_G1 = 6956560;
//0x00746400 public: void __thiscall oCNpc::ClearEM(void)
const int oCNpc__ClearEM_G2 = 7627776;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__ClearEM_G1, oCNpc__ClearEM_G2));
call = CALL_End();
};
};
//0x00639840 private: virtual void __thiscall oCGame::SetAsPlayer(class zSTRING const &)
//0x006C3D20 private: virtual void __thiscall oCGame::SetAsPlayer(class zSTRING const &)
func void oCNpc_SetAsPlayer (var int slfInstance) {
//0x0069EAE0 public: virtual void __thiscall oCNpc::SetAsPlayer(void)
const int oCNpc__SetAsPlayer_G1 = 6941408;
//0x007426A0 public: virtual void __thiscall oCNpc::SetAsPlayer(void)
const int oCNpc__SetAsPlayer_G2 = 7612064;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__SetAsPlayer_G1, oCNpc__SetAsPlayer_G2));
call = CALL_End();
};
};
func string oCNpc_GetVisualBody (var int slfInstance) {
//0x006953A0 public: class zSTRING __thiscall oCNpc::GetVisualBody(void)
const int oCNpc__GetVisualBody_G1 = 6902688;
//0x007387C0 public: class zSTRING __thiscall oCNpc::GetVisualBody(void)
const int oCNpc__GetVisualBody_G2 = 7571392;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return STR_EMPTY; };
CALL_RetValIszString ();
CALL__thiscall (_@ (slf), MEMINT_SwitchG1G2 (oCNpc__GetVisualBody_G1, oCNpc__GetVisualBody_G2));
return CALL_RetValAszstring ();
};
func void oCNpc_ResetPos (var int slfInstance, var int posPtr) {
//0x0074CED0 public: virtual void __thiscall oCNpc::ResetPos(class zVEC3 &)
const int oCNPC__ResetPos_G1 = 7655120;
//0x006824D0 public: virtual void __thiscall oCNpc::ResetPos(class zVEC3 &)
const int oCNPC__ResetPos_G2 = 6825168;
var oCNPC slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return; };
var int slfPtr; slfPtr = _@ (slf);
const int call = 0;
if (CALL_Begin(call)) {
CALL_PtrParam(_@ (posPtr));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNPC__ResetPos_G1, oCNPC__ResetPos_G2));
call = CALL_End();
};
};
func int oCNpc_HasPerception (var int slfInstance, var int percType) {
//0x006B7AA0 public: int __thiscall oCNpc::HasPerception(int)
const int oCNpc__HasPerception_G1 = 7043744;
//0x0075E3C0 public: int __thiscall oCNpc::HasPerception(int)
const int oCNpc__HasPerception_G2 = 7726016;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
var int retVal;
const int call = 0;
if (CALL_Begin(call)) {
CALL_IntParam (_@ (percType));
CALL_PutRetValTo (_@ (retVal));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__HasPerception_G1, oCNpc__HasPerception_G2));
call = CALL_End();
};
return + retVal;
};
func int oCNpc_GetPerceptionFunc (var int slfInstance, var int percType) {
//0x006B7AE0 public: int __thiscall oCNpc::GetPerceptionFunc(int)
const int oCNpc__GetPerceptionFunc_G1 = 7043808;
//0x0075E400 public: int __thiscall oCNpc::GetPerceptionFunc(int)
const int oCNpc__GetPerceptionFunc_G2 = 7726080;
var oCNpc slf; slf = Hlp_GetNPC (slfInstance);
if (!Hlp_IsValidNPC (slf)) { return 0; };
var int slfPtr; slfPtr = _@ (slf);
var int retVal;
const int call = 0;
if (CALL_Begin(call)) {
CALL_IntParam (_@ (percType));
CALL_PutRetValTo (_@ (retVal));
CALL__thiscall (_@ (slfPtr), MEMINT_SwitchG1G2 (oCNpc__GetPerceptionFunc_G1, oCNpc__GetPerceptionFunc_G2));
call = CALL_End();
};
return + retVal;