forked from AloUltraExt/sm64ex-alo
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpos
3758 lines (3758 loc) · 291 KB
/
pos
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
Doxyfile:# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
Doxyfile:# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
Makefile: CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp -P
Makefile: OBJDUMP := $(DEVKITARM)/bin/arm-none-eabi-objdump
Makefile: OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy
Makefile: AS := $(DEVKITARM)/bin/arm-none-eabi-as
Makefile: CC := $(DEVKITARM)/bin/arm-none-eabi-gcc
Makefile: CXX := $(DEVKITARM)/bin/arm-none-eabi-g++
Makefile: # For the asm-processor, since it doesn't support -O3. Probably not actually compiled with these flags.
README.md:RM2C is the tool I developed to be able to port romhacks: [RM2C](https://gitlab.com/scuttlebugraiser/rom-manger-2-c)
enhancements/60fps.patch:+ if ((m->action == ACT_SLEEPING) || (m->action == ACT_START_SLEEPING)) {
enhancements/60fps.patch:+ if (m->area->camera->cutscene == CUTSCENE_0F_UNUSED) {
enhancements/60fps.patch:+ if (m->area->camera->mode == CAMERA_MODE_FIXED && m->area->camera->cutscene == 0) {
enhancements/60fps.patch:+ if (m->area->camera->mode == CAMERA_MODE_FIXED && m->area->camera->cutscene == 0) {
enhancements/60fps.patch: gCurAnimEnabled = (anim->flags & ANIM_FLAG_5) == 0;
enhancements/60fps.patch: gCurrAnimAttribute = segmented_to_virtual((void *) anim->index);
enhancements/60fps.patch: gCurAnimData = segmented_to_virtual((void *) anim->values);
enhancements/ext_bounds_col_patches.patch: m->floorHeight = find_floor(m->pos[0], m->pos[1], m->pos[2], &m->floor);
enhancements/ext_bounds_col_patches.patch:- m->ceilHeight = vec3f_find_ceil(&m->pos[0], m->floorHeight, &m->ceil);
enhancements/ext_bounds_col_patches.patch:+ m->ceilHeight = vec3f_find_ceil(&m->pos[0], m->pos[1], &m->ceil);
enhancements/ext_bounds_col_patches.patch: gasLevel = find_poison_gas_level(m->pos[0], m->pos[2]);
enhancements/ext_bounds_col_patches.patch: m->waterLevel = find_water_level(m->pos[0], m->pos[2]);
enhancements/ext_bounds_col_patches.patch:+ magnitude = sqrtf((m->controller->stickX*m->controller->stickX + m->controller->stickY*m->controller->stickY));
enhancements/ext_bounds_col_patches.patch:+ x = magnitude * sins(m->intendedYaw);
enhancements/ext_bounds_col_patches.patch:+ z = magnitude * coss(m->intendedYaw);
enhancements/ext_bounds_col_patches.patch:+ m->pos[0]+=m->platformDisplacement[0];
enhancements/ext_bounds_col_patches.patch:+ m->vel[1]+=m->platformDisplacement[1];
enhancements/ext_bounds_col_patches.patch:+ m->platformDisplacement[1] = 0;
enhancements/ext_bounds_col_patches.patch:+ m->pos[2]+=m->platformDisplacement[2];
enhancements/ext_bounds_col_patches.patch:+ if (absf2(m->platformDisplacement[0]+ x) < absf2(m->platformDisplacement[0])){
enhancements/ext_bounds_col_patches.patch:+ m->platformDisplacement[0]+=x;
enhancements/ext_bounds_col_patches.patch:+ if (absf2(m->platformDisplacement[2]+ z) < absf2(m->platformDisplacement[2])){
enhancements/ext_bounds_col_patches.patch:+ m->platformDisplacement[2]+=z;
enhancements/ext_bounds_col_patches.patch: m->wall = resolve_and_return_wall_collisions(nextPos, 50.0f, 50.0f);
enhancements/ext_bounds_col_patches.patch:- intendedPos[0] = m->pos[0] + m->floor->normal.y * (m->vel[0] / 4.0f);
enhancements/ext_bounds_col_patches.patch:- intendedPos[2] = m->pos[2] + m->floor->normal.y * (m->vel[2] / 4.0f);
enhancements/ext_bounds_col_patches.patch:+ s16 moveDir = atan2s(m->vel[2], m->vel[0]);
enhancements/ext_bounds_col_patches.patch:+ float speedFactor = m->floor->normal.y / sqrtf(sqr(m->floor->normal.y) + sqr(m->floor->normal.x * moveX + m->floor->normal.z * moveZ));
enhancements/ext_bounds_col_patches.patch:+ intendedPos[0] = m->pos[0] + speedFactor * (m->vel[0] / 4.0f);
enhancements/ext_bounds_col_patches.patch:+ intendedPos[2] = m->pos[2] + speedFactor * (m->vel[2] / 4.0f);
enhancements/ext_bounds_col_patches.patch: intendedPos[1] = m->pos[1];
enhancements/record_demo.patch:+// Prints the status on the bottom-left side of the screen in colorful text.
include/macros.h:// asm-process isn't supported outside of IDO, and undefined behavior causes
include/seq_macros.inc:# To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros >seq_macros.inc
include/stb/stb_image.h:// zlib-from-memory implementation for PNG reading
include/stb/stb_image.h: // force the image data from big-endian to platform-native.
include/tinfl.h: pStream->data_type = 0;
include/tinfl.h: pStream->adler = 0;
include/tinfl.h: pStream->msg = NULL;
include/tinfl.h: pStream->total_in = 0;
include/tinfl.h: pStream->total_out = 0;
include/tinfl.h: pStream->reserved = 0;
include/tinfl.h: if (!pStream->zalloc) pStream->zalloc = tinfl_def_alloc_func;
include/tinfl.h: if (!pStream->zfree) pStream->zfree = tinfl_def_free_func;
include/tinfl.h: pDecomp = (inflate_state*)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state));
include/tinfl.h: pStream->state = (struct mz_internal_state *)pDecomp;
include/tinfl.h: if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR;
include/tinfl.h: pState = (inflate_state*)pStream->state;
include/tinfl.h: orig_avail_in = pStream->avail_in;
include/tinfl.h: in_bytes = pStream->avail_in; out_bytes = pStream->avail_out;
include/tinfl.h: status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags);
include/tinfl.h: pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes;
include/tinfl.h: pStream->adler = tinfl_get_adler32(&pState->m_decomp);
include/tinfl.h: pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes;
include/tinfl.h: n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
include/tinfl.h: memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
include/tinfl.h: pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
include/tinfl.h: in_bytes = pStream->avail_in;
include/tinfl.h: status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags);
include/tinfl.h: pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes;
include/tinfl.h: pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp);
include/tinfl.h: n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
include/tinfl.h: memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
include/tinfl.h: pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
include/tinfl.h: else if (!pStream->avail_out)
include/tinfl.h: else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail))
include/tinfl.h: if (pStream->state)
include/tinfl.h: pStream->zfree(pStream->opaque, pStream->state);
include/tinfl.h: pStream->state = NULL;
Binary file levels/menu/main_menu_seg7.02018.rgba16.png matches
lib/src/guMtxF2L.c: s32 *m1 = &m->m[0][0];
lib/src/guMtxF2L.c: s32 *m2 = &m->m[2][0];
lib/src/guMtxF2L.c: m1 = (u32 *) &m->m[0][0];
lib/src/guMtxF2L.c: m2 = (u32 *) &m->m[2][0];
lib/src/guMtxF2L.c: guMtxIdentF(m->m);
pisetup.sh:sudo apt install -y libdrm-dev libgbm-dev
sound/README.md:custom-made samples and sequences it is advisable to include that substring
src/audio/copt/seq_channel_layer_process_script_copt.inc.c: layer->adsr.envelope = drum->envelope;
src/audio/copt/seq_channel_layer_process_script_copt.inc.c: layer->adsr.releaseRate = drum->releaseRate;
src/audio/copt/seq_channel_layer_process_script_copt.inc.c: layer->pan = FLOAT_CAST(drum->pan) / US_FLOAT(128.0);
src/audio/copt/seq_channel_layer_process_script_copt.inc.c: layer->sound = &drum->sound;
src/audio/heap.c: func_sh_802F2320(entry, drum->sound.sample);
src/audio/heap.c: func_sh_802F2320(entry, drum->sound.sample);
src/audio/load.c: func_sh_802f2f38(drum->sound.sample, bankId);
src/audio/load.c: itInstrs = mem->drums;
src/audio/load.c: if (mem->drums) {
src/audio/load.c: drums = mem->drums;
src/audio/load.c: mem->drums = (void *)((uintptr_t) drums + (uintptr_t) mem);
src/audio/load.c: mem->drums = PATCH(drums, mem);
src/audio/load.c: mem->drums = PATCH(itInstrs, mem);
src/audio/load.c: patched = mem->drums[i];
src/audio/load.c: mem->drums[i] = drum;
src/audio/load.c: if (drum->loaded == 0) {
src/audio/load.c: drum->envelope = BASE_OFFSET(mem, patched);
src/audio/load.c: patch_sound(&drum->sound, (u8 *) mem, offset);
src/audio/load.c: func_sh_802f51d4(&drum->sound, mem, patchInfo);
src/audio/load.c: patched = drum->envelope;
src/audio/load.c: drum->envelope = BASE_OFFSET(patched, mem);
src/audio/load.c: drum->loaded = 1;
src/audio/load.c: itInstrs = mem->instruments;
src/audio/load.c: gCtlEntries[bankId].drums = mem->drums;
src/audio/load.c: gCtlEntries[bankId].instruments = mem->instruments;
src/audio/load.c: m->hdr.pri = pri;
src/audio/load.c: m->hdr.retQueue = retQueue;
src/audio/load.c: m->dramAddr = dramAddr;
src/audio/load.c: m->devAddr = devAddr;
src/audio/load.c: m->size = size;
src/audio/load.c: ret = drum->sound.sample;
src/audio/load.c: item->inProgress = 1;
src/audio/load.c: item->devAddr = devAddr;
src/audio/load.c: item->audioBank = vAddr;
src/audio/load.c: item->vAddr = vAddr;
src/audio/load.c: item->remaining = size;
src/audio/load.c: item->transferSize = 0x1000;
src/audio/load.c: item->transferSize = ((size / numChunks) + 0xFF) & ~0xFF;
src/audio/load.c: if (item->transferSize < 0x100) {
src/audio/load.c: item->transferSize = 0x100;
src/audio/load.c: item->retQueue = retQueue;
src/audio/load.c: item->timer = 3;
src/audio/load.c: item->medium = medium;
src/audio/load.c: item->encodedInfo = encodedInfo;
src/audio/load.c: osCreateMesgQueue(&item->dmaRetQueue, item->mesgs, 1);
src/audio/load.c: numLoaded = func_sh_802f5900(drum->sound.sample, numLoaded, list);
src/audio/playback.c: if (item->prev != NULL) {
src/audio/playback.c: item->prev = list;
src/audio/playback.c: item->next = list->next;
src/audio/playback.c: item->pool = list->pool;
src/audio/playback.c: if (item->prev == NULL) {
src/audio/playback.c: item->prev->next = item->next;
src/audio/playback.c: item->next->prev = item->prev;
src/audio/playback.c: item->prev = NULL;
src/audio/seqplayer.c: if (item->prev == NULL) {
src/audio/seqplayer.c: item->prev = gLayerFreeList.prev;
src/audio/seqplayer.c: item->next = &gLayerFreeList;
src/audio/seqplayer.c: item->pool = gLayerFreeList.pool;
src/audio/seqplayer.c: if (item->prev != NULL) {
src/audio/seqplayer.c: item->prev = list->prev;
src/audio/seqplayer.c: item->next = list;
src/audio/seqplayer.c: item->pool = list->pool;
src/audio/seqplayer.c: item->prev->next = list;
src/audio/seqplayer.c: list->prev = item->prev;
src/audio/seqplayer.c: item->prev = NULL;
src/audio/seqplayer.c: return item->u.value;
src/audio/seqplayer.c: layer->adsr.envelope = drum->envelope;
src/audio/seqplayer.c: layer->adsr.releaseRate = drum->releaseRate;
src/audio/seqplayer.c: layer->pan = drum->pan;
src/audio/seqplayer.c: layer->pan = FLOAT_CAST(drum->pan) / US_FLOAT(128.0);
src/audio/seqplayer.c: layer->sound = &drum->sound;
src/audio/seqplayer.c: layer->adsr.envelope = drum->envelope;
src/audio/seqplayer.c: layer->adsr.releaseRate = drum->releaseRate;
src/audio/seqplayer.c: layer->pan = drum->pan;
src/audio/seqplayer.c: layer->sound = &drum->sound;
src/audio/synthesis.c: osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH);
src/audio/synthesis.c: for (srcPos = 0, dstPos = 0; dstPos < item->lengthA / 2;
src/audio/synthesis.c: reverb->ringBuffer.left[item->startPos + dstPos] =
src/audio/synthesis.c: item->toDownsampleLeft[srcPos];
src/audio/synthesis.c: reverb->ringBuffer.right[item->startPos + dstPos] =
src/audio/synthesis.c: item->toDownsampleRight[srcPos];
src/audio/synthesis.c: for (dstPos = 0; dstPos < item->lengthB / 2; srcPos += reverb->downsampleRate, dstPos++) {
src/audio/synthesis.c: reverb->ringBuffer.left[dstPos] = item->toDownsampleLeft[srcPos];
src/audio/synthesis.c: reverb->ringBuffer.right[dstPos] = item->toDownsampleRight[srcPos];
src/audio/synthesis.c: item->lengthA = nSamples * 2;
src/audio/synthesis.c: item->lengthB = 0;
src/audio/synthesis.c: item->startPos = (s32) reverb->nextRingBufferPos;
src/audio/synthesis.c: item->lengthA = (nSamples - excessiveSamples) * 2;
src/audio/synthesis.c: item->lengthB = excessiveSamples * 2;
src/audio/synthesis.c: item->startPos = reverb->nextRingBufferPos;
src/audio/synthesis.c: item->numSamplesAfterDownsampling = nSamples;
src/audio/synthesis.c: item->chunkLen = chunkLen;
src/audio/synthesis.c: osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH);
src/audio/synthesis.c: for (srcPos = 0, dstPos = 0; dstPos < item->lengthA / 2;
src/audio/synthesis.c: gSynthesisReverb.ringBuffer.left[dstPos + item->startPos] =
src/audio/synthesis.c: item->toDownsampleLeft[srcPos];
src/audio/synthesis.c: gSynthesisReverb.ringBuffer.right[dstPos + item->startPos] =
src/audio/synthesis.c: item->toDownsampleRight[srcPos];
src/audio/synthesis.c: for (dstPos = 0; dstPos < item->lengthB / 2; srcPos += gReverbDownsampleRate, dstPos++) {
src/audio/synthesis.c: gSynthesisReverb.ringBuffer.left[dstPos] = item->toDownsampleLeft[srcPos];
src/audio/synthesis.c: gSynthesisReverb.ringBuffer.right[dstPos] = item->toDownsampleRight[srcPos];
src/audio/synthesis.c: item->lengthA = numSamplesAfterDownsampling * 2;
src/audio/synthesis.c: item->lengthB = 0;
src/audio/synthesis.c: item->startPos = (s32) gSynthesisReverb.nextRingBufferPos;
src/audio/synthesis.c: item->lengthA = nSamples * 2;
src/audio/synthesis.c: item->lengthB = excessiveSamples * 2;
src/audio/synthesis.c: item->startPos = gSynthesisReverb.nextRingBufferPos;
src/audio/synthesis.c: item->numSamplesAfterDownsampling = numSamplesAfterDownsampling;
src/audio/synthesis.c: item->chunkLen = chunkLen;
src/audio/synthesis.c: cmd = synthesis_load_reverb_ring_buffer(cmd, DMEM_ADDR_WET_LEFT_CH, item->startPos, item->lengthA, reverbIndex);
src/audio/synthesis.c: if (item->lengthB != 0) {
src/audio/synthesis.c: cmd = synthesis_load_reverb_ring_buffer(cmd, DMEM_ADDR_WET_LEFT_CH + item->lengthA, 0, item->lengthB, reverbIndex);
src/audio/synthesis.c: startPad = (item->startPos % 8u) * 2;
src/audio/synthesis.c: paddedLengthA = ALIGN(startPad + item->lengthA, 4);
src/audio/synthesis.c: cmd = synthesis_load_reverb_ring_buffer(cmd, DMEM_ADDR_RESAMPLED, (item->startPos - startPad / 2), DEFAULT_LEN_1CH, reverbIndex);
src/audio/synthesis.c: if (item->lengthB != 0) {
src/audio/synthesis.c: cmd = synthesis_load_reverb_ring_buffer(cmd, DMEM_ADDR_RESAMPLED, item->startPos, item->lengthA, reverbIndex);
src/audio/synthesis.c: if (item->lengthB != 0) {
src/audio/synthesis.c: cmd = synthesis_load_reverb_ring_buffer(cmd, DMEM_ADDR_RESAMPLED + item->lengthA, 0, item->lengthB, reverbIndex);
src/audio/synthesis.c: cmd = synthesis_save_reverb_ring_buffer(cmd, DMEM_ADDR_WET_LEFT_CH, item->startPos, item->lengthA, reverbIndex);
src/audio/synthesis.c: if (item->lengthB != 0) {
src/audio/synthesis.c: cmd = synthesis_save_reverb_ring_buffer(cmd, DMEM_ADDR_WET_LEFT_CH + item->lengthA, 0, item->lengthB, reverbIndex);
src/audio/synthesis.c: cmd = synthesis_save_reverb_ring_buffer(cmd, DMEM_ADDR_WET_LEFT_CH, item->startPos, item->lengthA, reverbIndex);
src/audio/synthesis.c: if (item->lengthB != 0) {
src/audio/synthesis.c: cmd = synthesis_save_reverb_ring_buffer(cmd, DMEM_ADDR_WET_LEFT_CH + item->lengthA, 0, item->lengthB, reverbIndex);
src/audio/synthesis.c: cmd = synthesis_save_reverb_ring_buffer(cmd, DMEM_ADDR_RESAMPLED, item->startPos, item->lengthA, reverbIndex);
src/audio/synthesis.c: if (item->lengthB != 0) {
src/audio/synthesis.c: cmd = synthesis_save_reverb_ring_buffer(cmd, DMEM_ADDR_RESAMPLED + item->lengthA, 0, item->lengthB, reverbIndex);
src/engine/graph_node.c: graphNode->animInfo.animFrame = anim->startFrame + ((anim->flags & ANIM_FLAG_FORWARD) ? 1 : -1);
src/engine/graph_node.c: (anim->startFrame << 16) + ((anim->flags & ANIM_FLAG_FORWARD) ? animAccel : -animAccel);
src/engine/graph_node.c: if (obj->animTimer == gAreaUpdateCounter || anim->flags & ANIM_FLAG_2) {
src/engine/graph_node.c: if (anim->flags & ANIM_FLAG_FORWARD) {
src/engine/graph_node.c: if (GET_HIGH_S16_OF_32(result) < anim->loopStart) {
src/engine/graph_node.c: if (anim->flags & ANIM_FLAG_NOLOOP) {
src/engine/graph_node.c: SET_HIGH_S16_OF_32(result, anim->loopStart);
src/engine/graph_node.c: SET_HIGH_S16_OF_32(result, anim->loopEnd - 1);
src/engine/graph_node.c: if (GET_HIGH_S16_OF_32(result) >= anim->loopEnd) {
src/engine/graph_node.c: if (anim->flags & ANIM_FLAG_NOLOOP) {
src/engine/graph_node.c: SET_HIGH_S16_OF_32(result, anim->loopEnd - 1);
src/engine/graph_node.c: SET_HIGH_S16_OF_32(result, anim->loopStart);
src/game/behaviors/bowser.inc.c: if (bowser->header.gfx.animInfo.curAnim->loopEnd == sp30)
src/game/behaviors/bowser.inc.c: platform->oAngleVelPitch = coss(angle) * a1;
src/game/behaviors/bowser.inc.c: platform->oAngleVelRoll = -sins(angle) * a1;
src/game/behaviors/bowser.inc.c: play_sound(SOUND_ENV_UNKNOWN4, platform->header.gfx.cameraToObject);
src/game/behaviors/bowser.inc.c: platform->oAngleVelPitch = 0;
src/game/behaviors/bowser.inc.c: platform->oAngleVelRoll = 0;
src/game/behaviors/bowser.inc.c: platform->oFaceAnglePitch = 0;
src/game/behaviors/bowser.inc.c: platform->oFaceAngleRoll = 0;
src/game/behaviors/ferris_wheel.inc.c: platform->collisionData =
src/game/behaviors/piranha_bubbles.inc.c: s32 lastFrame = parent->header.gfx.animInfo.curAnim->loopEnd - 2;
src/game/behaviors/tower_platform.inc.c: platform->oMoveAngleYaw = yaw;
src/game/behaviors/tower_platform.inc.c: platform->oPosX += o->oPlatformSpawnerUnk100 * sins(yaw);
src/game/behaviors/tower_platform.inc.c: platform->oPosY += 100 * o->oPlatformSpawnerUnkF4;
src/game/behaviors/tower_platform.inc.c: platform->oPosZ += o->oPlatformSpawnerUnk100 * coss(yaw);
src/game/behaviors/tower_platform.inc.c: platform->oPlatformUnk110 = o->oPlatformSpawnerUnk104;
src/game/behaviors/tower_platform.inc.c: platform->oPlatformUnk10C = o->oPlatformSpawnerUnk108;
src/game/camera.c: if ((m->action == ACT_SLEEPING) || (m->action == ACT_START_SLEEPING)) {
src/game/camera.c: if (m->area->camera->cutscene == CUTSCENE_0F_UNUSED) {
src/game/camera.c: if (m->area->camera->mode == CAMERA_MODE_FIXED && m->area->camera->cutscene == 0) {
src/game/camera.c: if (m->area->camera->mode == CAMERA_MODE_FIXED && m->area->camera->cutscene == 0) {
src/game/debug.c:s16 gDebugPrintState2[6]; // prints bottom-up?
src/game/ingame_menu.c: gDialogLineNum--;
src/game/interaction.c: f32 dx = m->pos[0] - o->oPosX;
src/game/interaction.c: f32 dz = m->pos[2] - o->oPosZ;
src/game/interaction.c: f32 dx = o->oPosX - m->pos[0];
src/game/interaction.c: f32 dz = o->oPosZ - m->pos[2];
src/game/interaction.c: u32 action = m->action;
src/game/interaction.c: s16 dYawToObject = mario_obj_angle_to_object(m, o) - m->faceAngle[1];
src/game/interaction.c: if (m->flags & MARIO_PUNCHING) {
src/game/interaction.c: if (m->flags & MARIO_KICKING) {
src/game/interaction.c: if (m->flags & MARIO_TRIPPING) {
src/game/interaction.c: if (m->vel[1] < 0.0f) {
src/game/interaction.c: if (m->vel[1] < 0.0f && m->actionState == 0) {
src/game/interaction.c: } else if (m->forwardVel <= -26.0f || 26.0f <= m->forwardVel) {
src/game/interaction.c: if (m->vel[1] < 0.0f) {
src/game/interaction.c: if (m->pos[1] > o->oPosY) {
src/game/interaction.c: if (m->pos[1] < o->oPosY) {
src/game/interaction.c: if (m->riddenObj != NULL) {
src/game/interaction.c: m->riddenObj->oInteractStatus = INT_STATUS_STOP_RIDING;
src/game/interaction.c: m->riddenObj = NULL;
src/game/interaction.c: if (m->heldObj == NULL) {
src/game/interaction.c: m->heldObj = m->usedObj;
src/game/interaction.c: obj_set_held_state(m->heldObj, bhvCarrySomething3);
src/game/interaction.c: if (m->heldObj != NULL) {
src/game/interaction.c: if (m->heldObj->behavior == segmented_to_virtual(bhvKoopaShellUnderwater)) {
src/game/interaction.c: obj_set_held_state(m->heldObj, bhvCarrySomething4);
src/game/interaction.c: m->heldObj->oPosX = m->marioBodyState->heldObjLastPosition[0];
src/game/interaction.c: m->heldObj->oPosY = m->pos[1];
src/game/interaction.c: m->heldObj->oPosZ = m->marioBodyState->heldObjLastPosition[2];
src/game/interaction.c: m->heldObj->oMoveAngleYaw = m->faceAngle[1];
src/game/interaction.c: m->heldObj = NULL;
src/game/interaction.c: if (m->heldObj != NULL) {
src/game/interaction.c: if (m->heldObj->behavior == segmented_to_virtual(bhvKoopaShellUnderwater)) {
src/game/interaction.c: obj_set_held_state(m->heldObj, bhvCarrySomething5);
src/game/interaction.c: m->heldObj->oPosX = m->marioBodyState->heldObjLastPosition[0] + 32.0f * sins(m->faceAngle[1]);
src/game/interaction.c: m->heldObj->oPosY = m->marioBodyState->heldObjLastPosition[1];
src/game/interaction.c: m->heldObj->oPosZ = m->marioBodyState->heldObjLastPosition[2] + 32.0f * coss(m->faceAngle[1]);
src/game/interaction.c: m->heldObj->oMoveAngleYaw = m->faceAngle[1];
src/game/interaction.c: m->heldObj = NULL;
src/game/interaction.c: if (m->action == ACT_RIDING_HOOT) {
src/game/interaction.c: m->usedObj->oInteractStatus = 0;
src/game/interaction.c: m->usedObj->oHootMarioReleaseTime = gGlobalTimer;
src/game/interaction.c: return (m->flags & (MARIO_CAPS | MARIO_CAP_ON_HEAD)) == (MARIO_NORMAL_CAP | MARIO_CAP_ON_HEAD);
src/game/interaction.c: m->flags &= ~(MARIO_NORMAL_CAP | MARIO_CAP_ON_HEAD);
src/game/interaction.c: capObject = spawn_object(m->marioObj, MODEL_MARIOS_CAP, bhvNormalCap);
src/game/interaction.c: capObject->oPosY += (m->action & ACT_FLAG_SHORT_HITBOX) ? 120.0f : 180.0f;
src/game/interaction.c: capObject->oMoveAngleYaw = (s16)(m->faceAngle[1] + 0x400);
src/game/interaction.c: if (m->forwardVel < 0.0f) {
src/game/interaction.c: u32 action = m->action;
src/game/interaction.c: if (m->actionArg < 2) {
src/game/interaction.c: for (i = 0; i < m->marioObj->numCollidedObjs; i++) {
src/game/interaction.c: object = m->marioObj->collidedObjs[i];
src/game/interaction.c: if (m->input & INPUT_INTERACT_OBJ_GRABBABLE) {
src/game/interaction.c: script = virtual_to_segmented(0x13, m->interactObj->behavior);
src/game/interaction.c: s16 facingDYaw = m->faceAngle[1] - m->interactObj->oMoveAngleYaw;
src/game/interaction.c: m->faceAngle[1] = m->interactObj->oMoveAngleYaw;
src/game/interaction.c: m->usedObj = m->interactObj;
src/game/interaction.c: s16 facingDYaw = mario_obj_angle_to_object(m, m->interactObj) - m->faceAngle[1];
src/game/interaction.c: m->usedObj = m->interactObj;
src/game/interaction.c: if (!(m->action & ACT_FLAG_AIR)) {
src/game/interaction.c: m, (m->action & ACT_FLAG_DIVING) ? ACT_DIVE_PICKING_UP : ACT_PICKING_UP, 0);
src/game/interaction.c: m->pos[1] = o->oPosY + o->hitboxHeight;
src/game/interaction.c: m->vel[1] = velY;
src/game/interaction.c: m->flags &= ~MARIO_UNKNOWN_08;
src/game/interaction.c: play_sound(SOUND_ACTION_BOUNCE_OFF_OBJECT, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->vel[1] = 0.0f;
src/game/interaction.c: s16 angleToObject = mario_obj_angle_to_object(m, m->interactObj);
src/game/interaction.c: s16 facingDYaw = angleToObject - m->faceAngle[1];
src/game/interaction.c: if (m->forwardVel < 16.0f) {
src/game/interaction.c: m->forwardVel = 16.0f;
src/game/interaction.c: m->faceAngle[1] = angleToObject;
src/game/interaction.c: m->forwardVel *= -1.0f;
src/game/interaction.c: if (m->action & (ACT_FLAG_AIR | ACT_FLAG_ON_POLE | ACT_FLAG_HANGING)) {
src/game/interaction.c: m->faceAngle[1] += 0x8000;
src/game/interaction.c: if (m->action & (ACT_FLAG_AIR | ACT_FLAG_ON_POLE | ACT_FLAG_HANGING)) {
src/game/interaction.c: s16 angleToObject = mario_obj_angle_to_object(m, m->interactObj);
src/game/interaction.c: s16 facingDYaw = angleToObject - m->faceAngle[1];
src/game/interaction.c: s16 remainingHealth = m->health - 0x40 * m->hurtCounter;
src/game/interaction.c: if (m->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) {
src/game/interaction.c: } else if (m->action & (ACT_FLAG_AIR | ACT_FLAG_ON_POLE | ACT_FLAG_HANGING)) {
src/game/interaction.c: } else if (m->interactObj->oDamageOrCoinValue >= 4) {
src/game/interaction.c: } else if (m->interactObj->oDamageOrCoinValue >= 2) {
src/game/interaction.c: m->faceAngle[1] = angleToObject;
src/game/interaction.c: if (m->forwardVel < 28.0f) {
src/game/interaction.c: if (m->pos[1] >= m->interactObj->oPosY) {
src/game/interaction.c: if (m->vel[1] < 20.0f) {
src/game/interaction.c: m->vel[1] = 20.0f;
src/game/interaction.c: if (m->vel[1] > 0.0f) {
src/game/interaction.c: m->vel[1] = 0.0f;
src/game/interaction.c: if (m->forwardVel < 16.0f) {
src/game/interaction.c: m->forwardVel *= -1.0f;
src/game/interaction.c: m->faceAngle[1] += 0x8000;
src/game/interaction.c: f32 minDistance = o->hitboxRadius + m->marioObj->hitboxRadius + padding;
src/game/interaction.c: f32 offsetX = m->pos[0] - o->oPosX;
src/game/interaction.c: f32 offsetZ = m->pos[2] - o->oPosZ;
src/game/interaction.c: pushAngle = m->faceAngle[1];
src/game/interaction.c: f32_find_wall_collision(&newMarioX, &m->pos[1], &newMarioZ, 60.0f, 50.0f);
src/game/interaction.c: find_floor(newMarioX, m->pos[1], newMarioZ, &floor);
src/game/interaction.c: m->pos[0] = newMarioX;
src/game/interaction.c: m->pos[2] = newMarioZ;
src/game/interaction.c: if (m->action == ACT_PUNCHING) {
src/game/interaction.c: m->action = ACT_MOVE_PUNCHING;
src/game/interaction.c: if (m->action & ACT_FLAG_AIR) {
src/game/interaction.c: m->particleFlags |= PARTICLE_TRIANGLE;
src/game/interaction.c: play_sound(SOUND_ACTION_HIT_2, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: f32 dx = o->oPosX - m->pos[0];
src/game/interaction.c: f32 dz = o->oPosZ - m->pos[2];
src/game/interaction.c: if(m->interactObj->oDamageOrCoinValue==1)
src/game/interaction.c: else if(m->interactObj->oDamageOrCoinValue==2)
src/game/interaction.c: else if(m->interactObj->oDamageOrCoinValue>2)
src/game/interaction.c: damage = m->interactObj->oDamageOrCoinValue;
src/game/interaction.c: if (!(m->flags & MARIO_CAP_ON_HEAD)) {
src/game/interaction.c: if (m->flags & MARIO_METAL_CAP) {
src/game/interaction.c: m->hurtCounter += 4 * damage;
src/game/interaction.c: if (!sInvulnerable && !(m->flags & MARIO_VANISH_CAP)
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->forwardVel = 40.0f;
src/game/interaction.c: play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (m->action == ACT_WATER_JUMP || m->action == ACT_SHOT_FROM_CANNON || m->action == ACT_FLYING) {
src/game/interaction.c: set_camera_mode(m->area->camera, m->area->camera->defMode, 1);
src/game/interaction.c: m->faceAngle[0] = 0;
src/game/interaction.c: m->numCoins += o->oDamageOrCoinValue;
src/game/interaction.c: m->healCounter += 4 * o->oDamageOrCoinValue;
src/game/interaction.c: if (COURSE_IS_MAIN_COURSE(gCurrCourseNum) && m->numCoins - o->oDamageOrCoinValue < COINS_REQ_COINSTAR
src/game/interaction.c: && m->numCoins >= COINS_REQ_COINSTAR) {
src/game/interaction.c: m->healCounter += 4 * o->oDamageOrCoinValue;
src/game/interaction.c: if (m->health >= 0x100) {
src/game/interaction.c: m->hurtCounter = 0;
src/game/interaction.c: m->healCounter = 0;
src/game/interaction.c: if (m->capTimer > 1) {
src/game/interaction.c: m->capTimer = 1;
src/game/interaction.c: if (m->action & ACT_FLAG_SWIMMING) {
src/game/interaction.c: if (m->action & ACT_FLAG_METAL_WATER) {
src/game/interaction.c: if (m->action & ACT_FLAG_AIR) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: save_file_collect_star_or_key(m->numCoins, starIndex);
src/game/interaction.c: m->numStars =
src/game/interaction.c: play_sound(SOUND_MENU_STAR_SOUND, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (m->action != ACT_BBH_ENTER_SPIN && m->action != ACT_BBH_ENTER_JUMP) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if (m->action & ACT_FLAG_AIR) {
src/game/interaction.c: action = m->action;
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if (m->action != ACT_EMERGE_FROM_PIPE) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: play_sound(SOUND_MENU_ENTER_PIPE, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: play_sound(SOUND_MENU_ENTER_HOLE, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (m->action == ACT_WALKING || m->action == ACT_DECELERATING) {
src/game/interaction.c: if (m->action == ACT_WALKING || m->action == ACT_DECELERATING) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if (m->action == ACT_WALKING || m->action == ACT_DECELERATING) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: } else if (m->action == ACT_IDLE && sDisplayingDoorText == TRUE && requiredNumStars == 70) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if (m->action != ACT_IN_CANNON) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: struct Object *marioObj = m->marioObj;
src/game/interaction.c: if (m->action != ACT_TORNADO_TWIRLING && m->action != ACT_SQUISHED) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: marioObj->oMarioTornadoPosY = m->pos[1] - o->oPosY;
src/game/interaction.c: play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: return set_mario_action(m, ACT_TORNADO_TWIRLING, m->action == ACT_TWIRLING);
src/game/interaction.c: struct Object *marioObj = m->marioObj;
src/game/interaction.c: if (m->action != ACT_CAUGHT_IN_WHIRLPOOL) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: m->forwardVel = 0.0f;
src/game/interaction.c: marioObj->oMarioWhirlpoolPosY = m->pos[1] - o->oPosY;
src/game/interaction.c: play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: UNUSED struct Object *marioObj = m->marioObj;
src/game/interaction.c: if (m->action != ACT_GETTING_BLOWN) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: m->faceAngle[1] = o->oMoveAngleYaw + 0x8000;
src/game/interaction.c: m->unkC4 = 0.4f;
src/game/interaction.c: m->forwardVel = -24.0f;
src/game/interaction.c: m->vel[1] = 12.0f;
src/game/interaction.c: play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (!sInvulnerable && !(m->flags & MARIO_METAL_CAP) && !(m->flags & MARIO_VANISH_CAP)
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: if ((m->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER))
src/game/interaction.c: || m->waterLevel - m->pos[1] > 50.0f) {
src/game/interaction.c: play_sound(SOUND_GENERAL_FLAME_OUT, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->marioObj->oMarioBurnTimer = 0;
src/game/interaction.c: play_sound(SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if ((m->action & ACT_FLAG_AIR) && m->vel[1] <= 0.0f) {
src/game/interaction.c: if (!sInvulnerable && !(m->flags & MARIO_VANISH_CAP)) {
src/game/interaction.c: if (m->flags & MARIO_METAL_CAP) {
src/game/interaction.c: play_sound(SOUND_ACTION_UNKNOWN458, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: if (m->flags & MARIO_METAL_CAP) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->forwardVel = -16.0f;
src/game/interaction.c: o->oMoveAngleYaw = m->faceAngle[1];
src/game/interaction.c: else if (!sInvulnerable && !(m->flags & MARIO_VANISH_CAP)
src/game/interaction.c: m->invincTimer = 2;
src/game/interaction.c: play_sound(SOUND_MARIO_EEUH, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: play_sound(SOUND_OBJ_BULLY_METAL, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (!sInvulnerable && !(m->flags & MARIO_VANISH_CAP)
src/game/interaction.c: u32 actionArg = (m->action & (ACT_FLAG_AIR | ACT_FLAG_ON_POLE | ACT_FLAG_HANGING)) == 0;
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (m->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) {
src/game/interaction.c: if (m->flags & MARIO_METAL_CAP) {
src/game/interaction.c: play_sound(SOUND_MARIO_TWIRL_BOUNCE, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (m->flags & MARIO_METAL_CAP) {
src/game/interaction.c: play_sound(SOUND_MARIO_TWIRL_BOUNCE, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: if (!(m->action & ACT_FLAG_RIDING_SHELL)) {
src/game/interaction.c: if (interaction == INT_HIT_FROM_ABOVE || m->action == ACT_WALKING
src/game/interaction.c: || m->action == ACT_HOLD_WALKING) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: m->riddenObj = o;
src/game/interaction.c: if ((!(m->action & (ACT_FLAG_AIR | ACT_FLAG_INVULNERABLE | ACT_FLAG_ATTACKING)) || !sInvulnerable)
src/game/interaction.c: m->faceAngle[1] = o->oMoveAngleYaw;
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: s32 actionId = m->action & ACT_ID_MASK;
src/game/interaction.c: if (!(m->prevAction & ACT_FLAG_ON_POLE) || m->usedObj != o) {
src/game/interaction.c: u32 lowSpeed = (m->forwardVel <= 10.0f);
src/game/interaction.c: struct Object *marioObj = m->marioObj;
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: m->vel[1] = 0.0f;
src/game/interaction.c: m->forwardVel = 0.0f;
src/game/interaction.c: marioObj->oMarioPolePos = (m->pos[1] - o->oPosY) < 0
src/game/interaction.c: : (m->pos[1] - o->oPosY);
src/game/interaction.c: //! @bug Using m->forwardVel here is assumed to be 0.0f due to the set from earlier.
src/game/interaction.c: marioObj->oMarioPoleYawVel = (s32)(m->forwardVel * 0x100 + 0x1000);
src/game/interaction.c: s32 actionId = m->action & ACT_ID_MASK;
src/game/interaction.c: && (gGlobalTimer - m->usedObj->oHootMarioReleaseTime > 30)) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if (m->action != ACT_GETTING_BLOWN && capFlag != 0) {
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->flags &= ~MARIO_CAP_ON_HEAD & ~MARIO_CAP_IN_HAND;
src/game/interaction.c: m->flags |= capFlag;
src/game/interaction.c: if (capTime > m->capTimer) {
src/game/interaction.c: m->capTimer = capTime;
src/game/interaction.c: if ((m->action & ACT_FLAG_IDLE) || m->action == ACT_WALKING) {
src/game/interaction.c: m->flags |= MARIO_CAP_IN_HAND;
src/game/interaction.c: m->flags |= MARIO_CAP_ON_HEAD;
src/game/interaction.c: play_sound(SOUND_MENU_STAR_SOUND, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: play_sound(SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->input |= INPUT_INTERACT_OBJ_GRABBABLE;
src/game/interaction.c: if ((m->action & ACT_FLAG_IDLE) != 0x00000000) {
src/game/interaction.c: if (m->action == ACT_WALKING) {
src/game/interaction.c: val6 = m->marioObj->header.gfx.animInfo.animID;
src/game/interaction.c: if ((m->input & READ_MASK) && mario_can_talk(m, 0) && object_facing_mario(m, o, SIGN_RANGE)) {
src/game/interaction.c: s16 facingDYaw = (s16)(o->oMoveAngleYaw + 0x8000) - m->faceAngle[1];
src/game/interaction.c: m->marioObj->oMarioReadingSignDYaw = facingDYaw;
src/game/interaction.c: m->marioObj->oMarioReadingSignDPosX = targetX - m->pos[0];
src/game/interaction.c: m->marioObj->oMarioReadingSignDPosZ = targetZ - m->pos[2];
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if ((m->input & READ_MASK) && mario_can_talk(m, 0) && object_facing_mario(m, o, SIGN_RANGE)) {
src/game/interaction.c: s16 facingDYaw = (s16)(o->oMoveAngleYaw + 0x8000) - m->faceAngle[1];
src/game/interaction.c: m->marioObj->oMarioReadingSignDYaw = facingDYaw;
src/game/interaction.c: m->marioObj->oMarioReadingSignDPosX = targetX - m->pos[0];
src/game/interaction.c: m->marioObj->oMarioReadingSignDPosZ = targetZ - m->pos[2];
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if ((m->input & READ_MASK) && mario_can_talk(m, 1)) {
src/game/interaction.c: s16 facingDYaw = mario_obj_angle_to_object(m, o) - m->faceAngle[1];
src/game/interaction.c: m->interactObj = o;
src/game/interaction.c: m->usedObj = o;
src/game/interaction.c: if (m->flags & (MARIO_PUNCHING | MARIO_KICKING | MARIO_TRIPPING)) {
src/game/interaction.c: detector[0] = m->pos[0] + 50.0f * sins(m->faceAngle[1]);
src/game/interaction.c: detector[2] = m->pos[2] + 50.0f * coss(m->faceAngle[1]);
src/game/interaction.c: detector[1] = m->pos[1];
src/game/interaction.c: if (m->action != ACT_MOVE_PUNCHING || m->forwardVel >= 0.0f) {
src/game/interaction.c: if (m->action == ACT_PUNCHING) {
src/game/interaction.c: m->action = ACT_MOVE_PUNCHING;
src/game/interaction.c: play_sound(SOUND_ACTION_HIT_2, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->particleFlags |= PARTICLE_TRIANGLE;
src/game/interaction.c: } else if (m->action & ACT_FLAG_AIR) {
src/game/interaction.c: play_sound(SOUND_ACTION_HIT_2, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: m->particleFlags |= PARTICLE_TRIANGLE;
src/game/interaction.c: sInvulnerable = (m->action & ACT_FLAG_INVULNERABLE) || m->invincTimer != 0;
src/game/interaction.c: if (!(m->action & ACT_FLAG_INTANGIBLE) && m->collidedObjInteractTypes != 0) {
src/game/interaction.c: if (m->collidedObjInteractTypes & interactType) {
src/game/interaction.c: m->collidedObjInteractTypes &= ~interactType;
src/game/interaction.c: if (m->invincTimer > 0 && !sDelayInvincTimer) {
src/game/interaction.c: m->invincTimer -= 1;
src/game/interaction.c: m->flags &= ~MARIO_PUNCHING & ~MARIO_KICKING & ~MARIO_TRIPPING;
src/game/interaction.c: if (!(m->marioObj->collidedObjInteractTypes & (INTERACT_WARP_DOOR | INTERACT_DOOR))) {
src/game/interaction.c: if (!(m->marioObj->collidedObjInteractTypes & INTERACT_WARP)) {
src/game/interaction.c: if (m->pos[1] < m->floorHeight + 2048.0f) {
src/game/interaction.c: if (level_trigger_warp(m, WARP_OP_WARP_FLOOR) == 20 && !(m->flags & MARIO_UNKNOWN_18)) {
src/game/interaction.c: play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
src/game/interaction.c: if (!(m->action & ACT_FLAG_RIDING_SHELL) && m->pos[1] < m->floorHeight + 10.0f) {
src/game/interaction.c: if (!(m->flags & MARIO_METAL_CAP)) {
src/game/interaction.c: m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 12 : 18;
src/game/interaction.c: m->marioObj->oBehParams = (1 << 24);
src/game/interaction.c: if ((m->action & ACT_GROUP_MASK) == ACT_GROUP_CUTSCENE) {
src/game/interaction.c: if (m->floor != NULL) {
src/game/interaction.c: s32 floorType = m->floor->type;
src/game/interaction.c: if (!(m->action & ACT_FLAG_AIR) && !(m->action & ACT_FLAG_SWIMMING)) {
src/game/level_geo.c: gfx = create_skybox_facing_camera(0, backgroundNode->background, camFrustum->fov, gLakituState.pos[0],
src/game/level_update.c: m->flags |= MARIO_METAL_CAP | MARIO_CAP_ON_HEAD;
src/game/level_update.c: m->capTimer = MC_LEVEL_TIME;
src/game/level_update.c: m->flags |= MARIO_WING_CAP | MARIO_CAP_ON_HEAD;
src/game/level_update.c: m->capTimer = WC_LEVEL_TIME;
src/game/level_update.c: m->flags |= MARIO_VANISH_CAP | MARIO_CAP_ON_HEAD;
src/game/level_update.c: m->capTimer = VC_LEVEL_TIME;
src/game/level_update.c: m->invincTimer = -1;
src/game/level_update.c: if (m->numLives == 0 && INFINITE_LIVES) {
src/game/level_update.c: if (m->numLives == 0 && !INFINITE_LIVES) {
src/game/level_update.c: sSourceWarpNodeId = (m->usedObj->oBehParams & 0x00FF0000) >> 16;
src/game/level_update.c: sSourceWarpNodeId = (m->usedObj->oBehParams & 0x00FF0000) >> 16;
src/game/level_update.c: sDelayedWarpArg = m->actionArg;
src/game/level_update.c: sSourceWarpNodeId = (m->usedObj->oBehParams & 0x00FF0000) >> 16;
src/game/level_update.c: sSourceWarpNodeId = (m->usedObj->oBehParams & 0x00FF0000) >> 16;
src/game/mario.c: struct Object *o = m->marioObj;
src/game/mario.c: return (o->header.gfx.animInfo.animFrame + 1) == o->header.gfx.animInfo.curAnim->loopEnd;
src/game/mario.c: struct Object *o = m->marioObj;
src/game/mario.c: return o->header.gfx.animInfo.animFrame >= (o->header.gfx.animInfo.curAnim->loopEnd - 2);
src/game/mario.c: struct Object *o = m->marioObj;
src/game/mario.c: struct Animation *targetAnim = m->animation->targetAnim;
src/game/mario.c: if (load_patchable_table(m->animation, targetAnimID)) {
src/game/mario.c: targetAnim->values = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->values);
src/game/mario.c: targetAnim->index = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->index);
src/game/mario.c: o->header.gfx.animInfo.animYTrans = m->unkB0;
src/game/mario.c: if (targetAnim->flags & ANIM_FLAG_2) {
src/game/mario.c: o->header.gfx.animInfo.animFrame = targetAnim->startFrame;
src/game/mario.c: if (targetAnim->flags & ANIM_FLAG_FORWARD) {
src/game/mario.c: o->header.gfx.animInfo.animFrame = targetAnim->startFrame + 1;
src/game/mario.c: o->header.gfx.animInfo.animFrame = targetAnim->startFrame - 1;
src/game/mario.c: struct Object *o = m->marioObj;
src/game/mario.c: struct Animation *targetAnim = m->animation->targetAnim;
src/game/mario.c: if (load_patchable_table(m->animation, targetAnimID)) {
src/game/mario.c: targetAnim->values = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->values);
src/game/mario.c: targetAnim->index = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->index);
src/game/mario.c: o->header.gfx.animInfo.animYTrans = m->unkB0;
src/game/mario.c: if (targetAnim->flags & ANIM_FLAG_2) {
src/game/mario.c: o->header.gfx.animInfo.animFrameAccelAssist = (targetAnim->startFrame << 0x10);
src/game/mario.c: if (targetAnim->flags & ANIM_FLAG_FORWARD) {
src/game/mario.c: o->header.gfx.animInfo.animFrameAccelAssist = (targetAnim->startFrame << 0x10) + accel;
src/game/mario.c: o->header.gfx.animInfo.animFrameAccelAssist = (targetAnim->startFrame << 0x10) - accel;
src/game/mario.c: struct AnimInfo *animInfo = &m->marioObj->header.gfx.animInfo;
src/game/mario.c: if (curAnim->flags & ANIM_FLAG_FORWARD) {
src/game/mario.c: if (curAnim->flags & ANIM_FLAG_FORWARD) {
src/game/mario.c: struct AnimInfo *animInfo = &m->marioObj->header.gfx.animInfo;
src/game/mario.c: if (curAnim->flags & ANIM_FLAG_FORWARD) {
src/game/mario.c: if (curAnim->flags & ANIM_FLAG_FORWARD) {
src/game/mario.c: u16 *animIndex = segmented_to_virtual((void *) curAnim->index);
src/game/mario.c: s16 *animValues = segmented_to_virtual((void *) curAnim->values);
src/game/mario.c: return curAnim->flags;
src/game/mario.c: flags = find_mario_anim_flags_and_translation(m->marioObj, m->faceAngle[1], translation);
src/game/mario.c: m->pos[0] += (f32) translation[0];
src/game/mario.c: m->pos[2] += (f32) translation[2];
src/game/mario.c: m->pos[1] += (f32) translation[1];
src/game/mario.c: find_mario_anim_flags_and_translation(m->marioObj, 0, translation);
src/game/mario.c: if (!(m->flags & flags)) {
src/game/mario.c: play_sound(soundBits, m->marioObj->header.gfx.cameraToObject);
src/game/mario.c: m->flags |= flags;
src/game/mario.c: if (!(m->flags & MARIO_MARIO_SOUND_PLAYED)) {
src/game/mario.c: if (m->action == ACT_TRIPLE_JUMP) {
src/game/mario.c: m->marioObj->header.gfx.cameraToObject);
src/game/mario.c: m->marioObj->header.gfx.cameraToObject);
src/game/mario.c: m->flags |= MARIO_MARIO_SOUND_PLAYED;
src/game/mario.c: s32 absForwardVel = (m->forwardVel > 0.0f) ? m->forwardVel : -m->forwardVel;
src/game/mario.c: if (m->terrainSoundAddend == (SOUND_TERRAIN_WATER << 16)) {
src/game/mario.c: m->particleFlags |= PARTICLE_SHALLOW_WATER_SPLASH;
src/game/mario.c: m->particleFlags |= PARTICLE_SHALLOW_WATER_WAVE;
src/game/mario.c: if (m->terrainSoundAddend == (SOUND_TERRAIN_SAND << 16)) {
src/game/mario.c: m->particleFlags |= PARTICLE_DIRT;
src/game/mario.c: } else if (m->terrainSoundAddend == (SOUND_TERRAIN_SNOW << 16)) {
src/game/mario.c: m->particleFlags |= PARTICLE_SNOW;
src/game/mario.c: if ((m->flags & MARIO_METAL_CAP) || soundBits == SOUND_ACTION_UNSTUCK_FROM_GROUND
src/game/mario.c: play_sound(soundBits, m->marioObj->header.gfx.cameraToObject);
src/game/mario.c: play_sound(m->terrainSoundAddend + soundBits, m->marioObj->header.gfx.cameraToObject);
src/game/mario.c: if (!(m->flags & MARIO_ACTION_SOUND_PLAYED)) {
src/game/mario.c: m->flags |= MARIO_ACTION_SOUND_PLAYED;
src/game/mario.c: m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_LANDING : soundBits, 1);
src/game/mario.c: m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_LANDING : soundBits, 1);
src/game/mario.c: m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_HEAVY_LANDING : soundBits, 1);
src/game/mario.c: m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_HEAVY_LANDING : soundBits, 1);
src/game/mario.c: play_mario_action_sound(m, (m->flags & MARIO_METAL_CAP) ? (s32) SOUND_ACTION_METAL_JUMP
src/game/mario.c: m->forwardVel = forwardVel;
src/game/mario.c: m->slideVelX = sins(m->faceAngle[1]) * m->forwardVel;
src/game/mario.c: m->slideVelZ = coss(m->faceAngle[1]) * m->forwardVel;
src/game/mario.c: m->vel[0] = (f32) m->slideVelX;
src/game/mario.c: m->vel[2] = (f32) m->slideVelZ;
src/game/mario.c: if ((m->area->terrainType & TERRAIN_MASK) == TERRAIN_SLIDE) {
src/game/mario.c: if (m->floor != NULL) {
src/game/mario.c: switch (m->floor->type) {
src/game/mario.c: if (m->action == ACT_CRAWLING && m->floor->normal.y > 0.5f && floorClass == SURFACE_CLASS_DEFAULT) {
src/game/mario.c: s16 terrainType = m->area->terrainType & TERRAIN_MASK;
src/game/mario.c: if (m->floor != NULL) {
src/game/mario.c: floorType = m->floor->type;
src/game/mario.c: if ((gCurrLevelNum != LEVEL_LLL) && (m->floorHeight < (m->waterLevel - 10))) {
src/game/mario.c: s16 faceAngleYaw = m->faceAngle[1];
src/game/mario.c: if (turnYaw && m->forwardVel < 0.0f) {
src/game/mario.c: faceAngleYaw = m->floorAngle - faceAngleYaw;
src/game/mario.c: if ((m->area->terrainType & TERRAIN_MASK) == TERRAIN_SLIDE
src/game/mario.c: && m->floor->normal.y < 0.9998477f //~cos(1 deg)
src/game/mario.c: return m->floor->normal.y <= normY;
src/game/mario.c: if ((m->area->terrainType & TERRAIN_MASK) == TERRAIN_SLIDE
src/game/mario.c: && m->floor->normal.y < 0.9998477f) { // ~cos(1 deg)
src/game/mario.c: return m->floor->normal.y <= normY;
src/game/mario.c: result = m->floor->normal.y <= normY;
src/game/mario.c: f32 y = sins(m->faceAngle[1] + angleFromMario) * distFromMario;
src/game/mario.c: f32 x = coss(m->faceAngle[1] + angleFromMario) * distFromMario;
src/game/mario.c: floorY = find_floor(m->pos[0] + y, m->pos[1] + 100.0f, m->pos[2] + x, &floor);
src/game/mario.c: f32 x = sins(m->faceAngle[1] + yawOffset) * 5.0f;
src/game/mario.c: f32 z = coss(m->faceAngle[1] + yawOffset) * 5.0f;
src/game/mario.c: forwardFloorY = find_floor(m->pos[0] + x, m->pos[1] + 100.0f, m->pos[2] + z, &floor);
src/game/mario.c: backwardFloorY = find_floor(m->pos[0] - x, m->pos[1] + 100.0f, m->pos[2] - z, &floor);
src/game/mario.c: forwardYDelta = forwardFloorY - m->pos[1];
src/game/mario.c: backwardYDelta = m->pos[1] - backwardFloorY;
src/game/mario.c: u32 action = m->action;
src/game/mario.c: s32 camPreset = m->area->camera->mode;
src/game/mario.c: set_camera_mode(m->area->camera, -1, 1);
src/game/mario.c: set_camera_mode(m->area->camera, m->area->camera->defMode, 1);
src/game/mario.c: m->marioObj->oMarioSteepJumpYaw = m->faceAngle[1];
src/game/mario.c: if (m->forwardVel > 0.0f) {
src/game/mario.c: // undefined behavior if m->floorAngle >= 0.
src/game/mario.c: s16 angleTemp = m->floorAngle + 0x8000;
src/game/mario.c: s16 faceAngleTemp = m->faceAngle[1] - angleTemp;
src/game/mario.c: f32 y = sins(faceAngleTemp) * m->forwardVel;
src/game/mario.c: f32 x = coss(faceAngleTemp) * m->forwardVel * 0.75f;
src/game/mario.c: m->forwardVel = sqrtf(y * y + x * x);
src/game/mario.c: m->faceAngle[1] = atan2s(x, y) + angleTemp;
src/game/mario.c: m->vel[1] = initialVelY + get_additive_y_vel_for_jumps() + m->forwardVel * multiplier;
src/game/mario.c: if (m->squishTimer != 0 || m->quicksandDepth > 1.0f) {
src/game/mario.c: m->vel[1] *= 0.5f;
src/game/mario.c: if ((m->squishTimer != 0 || m->quicksandDepth >= 1.0f)
src/game/mario.c: m->forwardVel *= 0.8f;
src/game/mario.c: m->marioObj->header.gfx.animInfo.animID = -1;
src/game/mario.c: m->forwardVel = -16.0f;
src/game/mario.c: m->forwardVel *= 0.8f;
src/game/mario.c: m->vel[1] = 31.5f;
src/game/mario.c: m->forwardVel = 8.0f;
src/game/mario.c: m->marioObj->header.gfx.animInfo.animID = -1;
src/game/mario.c: m->forwardVel *= 0.8f;
src/game/mario.c: if (m->forwardVel < 24.0f) {
src/game/mario.c: m->forwardVel = 24.0f;
src/game/mario.c: m->wallKickTimer = 0;
src/game/mario.c: m->forwardVel = 8.0f;
src/game/mario.c: m->faceAngle[1] = m->intendedYaw;
src/game/mario.c: m->marioObj->header.gfx.animInfo.animID = -1;
src/game/mario.c: m->faceAngle[0] = -0x2000;
src/game/mario.c: m->vel[1] = 84.0f;
src/game/mario.c: m->forwardVel = 0.0f;
src/game/mario.c: if ((fowardVel = m->forwardVel + 15.0f) > 48.0f) {
src/game/mario.c: m->marioObj->header.gfx.animInfo.animID = -1;
src/game/mario.c: m->marioObj->oMarioLongJumpIsSlow = m->forwardVel > 16.0f ? FALSE : TRUE;
src/game/mario.c: if ((m->forwardVel *= 1.5f) > 48.0f) {
src/game/mario.c: m->forwardVel = 48.0f;
src/game/mario.c: m->vel[1] = 12.0f;
src/game/mario.c: if (m->forwardVel < 32.0f) {
src/game/mario.c: m->forwardVel = 32.0f;
src/game/mario.c: m->vel[1] = 20.0f;
src/game/mario.c: m->peakHeight = m->pos[1];
src/game/mario.c: m->flags |= MARIO_UNKNOWN_08;
src/game/mario.c: f32 forwardVel = m->forwardVel;
src/game/mario.c: f32 mag = min(m->intendedMag, 8.0f);
src/game/mario.c: m->forwardVel = mag;
src/game/mario.c: m->marioObj->oMarioWalkingPitch = 0;
src/game/mario.c: m->forwardVel = mag / 2.0f;
src/game/mario.c: m->vel[1] = 32.0f;
src/game/mario.c: m->vel[1] = 52.0f;
src/game/mario.c: m->vel[1] = 64.0f;
src/game/mario.c: m->flags &= ~(MARIO_ACTION_SOUND_PLAYED | MARIO_MARIO_SOUND_PLAYED);
src/game/mario.c: if (!(m->action & ACT_FLAG_AIR)) {
src/game/mario.c: m->flags &= ~MARIO_UNKNOWN_18;
src/game/mario.c: m->prevAction = m->action;
src/game/mario.c: m->action = action;
src/game/mario.c: m->actionArg = actionArg;
src/game/mario.c: m->actionState = 0;
src/game/mario.c: m->actionTimer = 0;
src/game/mario.c: if (m->quicksandDepth >= 11.0f) {
src/game/mario.c: if (m->heldObj == NULL) {
src/game/mario.c: if ((m->doubleJumpTimer == 0) || (m->squishTimer != 0)) {
src/game/mario.c: switch (m->prevAction) {
src/game/mario.c: if (m->flags & MARIO_WING_CAP) {
src/game/mario.c: } else if (m->forwardVel > 20.0f) {
src/game/mario.c: m->doubleJumpTimer = 0;
src/game/mario.c: UNUSED u32 currAction = m->action;
src/game/mario.c: if (m->quicksandDepth >= 11.0f) {
src/game/mario.c: if (m->heldObj == NULL) {
src/game/mario.c: m->hurtCounter = hurtCounter;
src/game/mario.c: if (m->input & INPUT_A_PRESSED) {
src/game/mario.c: if (m->input & INPUT_OFF_FLOOR) {
src/game/mario.c: if (m->input & INPUT_NONZERO_ANALOG) {
src/game/mario.c: if (m->input & INPUT_ABOVE_SLIDE) {
src/game/mario.c: if (m->input & INPUT_A_PRESSED) {
src/game/mario.c: if (m->input & INPUT_OFF_FLOOR) {
src/game/mario.c: if (m->input & INPUT_NONZERO_ANALOG) {
src/game/mario.c: if (m->input & INPUT_ABOVE_SLIDE) {
src/game/mario.c: set_camera_mode(m->area->camera, m->area->camera->defMode, 1);
src/game/mario.c: vec3s_set(m->angleVel, 0, 0, 0);
src/game/mario.c: if (m->heldObj == NULL) {
src/game/mario.c: m->forwardVel = m->forwardVel / 4.0f;
src/game/mario.c: m->vel[1] = m->vel[1] / 2.0f;
src/game/mario.c: // m->pos[1] = m->waterLevel - 100;
src/game/mario.c: m->faceAngle[2] = 0;
src/game/mario.c: vec3s_set(m->angleVel, 0, 0, 0);
src/game/mario.c: if (!(m->action & ACT_FLAG_DIVING)) {
src/game/mario.c: m->faceAngle[0] = 0;
src/game/mario.c: if (m->area->camera->mode != CAMERA_MODE_WATER_SURFACE) {
src/game/mario.c: set_camera_mode(m->area->camera, CAMERA_MODE_WATER_SURFACE, 1);
src/game/mario.c: if (m->squishTimer != 0xFF) {
src/game/mario.c: if (m->squishTimer == 0) {
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 2.5f, 2.5f, 2.5f);
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 0.2f, 0.2f, 0.2f);
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 1.0f, 1.0f, 1.0f);
src/game/mario.c: if (m->Chaos_Vals[0]<5 | m->Chaos_Vals[1]<5){
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, Mscale, Mscale, Mscale);
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, Mscale, Mscale, Mscale);
src/game/mario.c: else if (m->squishTimer <= 16) {
src/game/mario.c: m->squishTimer -= 1;
src/game/mario.c: m->marioObj->header.gfx.scale[1] =
src/game/mario.c: 1.0f - ((sSquishScaleOverTime[15 - m->squishTimer] * 0.6f) / 100.0f);
src/game/mario.c: m->marioObj->header.gfx.scale[0] =
src/game/mario.c: ((sSquishScaleOverTime[15 - m->squishTimer] * 0.4f) / 100.0f) + 1.0f;
src/game/mario.c: m->marioObj->header.gfx.scale[2] = m->marioObj->header.gfx.scale[0];
src/game/mario.c: m->squishTimer -= 1;
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 1.4f, 0.4f, 1.4f);
src/game/mario.c: ((m->floor->normal.x * m->floor->normal.x) + (m->floor->normal.z * m->floor->normal.z)));
src/game/mario.c: floor_nY = m->floor->normal.y;
src/game/mario.c: print_text_fmt_int(210, 72, "SPD %d", m->forwardVel);
src/game/mario.c: print_text_fmt_int(210, 56, "STA %x", (m->action & ACT_ID_MASK));
src/game/mario.c: if (m->controller->buttonPressed & A_BUTTON) {
src/game/mario.c: m->input |= INPUT_A_PRESSED;
src/game/mario.c: if (m->controller->buttonDown & A_BUTTON) {
src/game/mario.c: m->input |= INPUT_A_DOWN;
src/game/mario.c: if (m->squishTimer == 0) {
src/game/mario.c: if (m->controller->buttonPressed & B_BUTTON) {
src/game/mario.c: m->input |= INPUT_B_PRESSED;
src/game/mario.c: if (m->controller->buttonDown & Z_TRIG) {
src/game/mario.c: m->input |= INPUT_Z_DOWN;
src/game/mario.c: if (m->controller->buttonPressed & Z_TRIG) {
src/game/mario.c: m->input |= INPUT_Z_PRESSED;
src/game/mario.c: if (m->input & INPUT_A_PRESSED) {
src/game/mario.c: m->framesSinceA = 0;
src/game/mario.c: } else if (m->framesSinceA < 0xFF) {
src/game/mario.c: m->framesSinceA += 1;
src/game/mario.c: if (m->input & INPUT_B_PRESSED) {
src/game/mario.c: m->framesSinceB = 0;
src/game/mario.c: } else if (m->framesSinceB < 0xFF) {
src/game/mario.c: m->framesSinceB += 1;
src/game/mario.c: struct Controller *controller = m->controller;
src/game/mario.c: if (m->squishTimer == 0) {
src/game/mario.c: m->intendedMag = mag / 2.0f;
src/game/mario.c: m->intendedMag = mag / 8.0f;
src/game/mario.c: if (m->intendedMag > 0.0f) {
src/game/mario.c: m->intendedYaw = atan2s(-controller->stickY, controller->stickX) + m->area->camera->yaw;
src/game/mario.c: m->intendedYaw = atan2s(-controller->stickY, controller->stickX) + m->area->camera->yaw;
src/game/mario.c: m->intendedYaw = atan2s(-controller->stickY, controller->stickX)-newcam_yaw+0x4000;
src/game/mario.c: m->input |= INPUT_NONZERO_ANALOG;
src/game/mario.c: m->intendedYaw = m->faceAngle[1];
src/game/mario.c: f32_find_wall_collision(&m->pos[0], &m->pos[1], &m->pos[2], 60.0f*mScale, 50.0f*mScale);
src/game/mario.c: f32_find_wall_collision(&m->pos[0], &m->pos[1], &m->pos[2], 30.0f*mScale, 24.0f*mScale);
src/game/mario.c: m->floorHeight = find_floor(m->pos[0], m->pos[1], m->pos[2], &m->floor);
src/game/mario.c: if (m->floor == NULL) {
src/game/mario.c: vec3f_copy(m->pos, m->marioObj->header.gfx.pos);
src/game/mario.c: m->floorHeight = find_floor(m->pos[0], m->pos[1], m->pos[2], &m->floor);
src/game/mario.c: m->ceilHeight = vec3f_find_ceil(&m->pos[0], m->pos[1], &m->ceil);
src/game/mario.c: gasLevel = find_poison_gas_level(m->pos[0], m->pos[2]);
src/game/mario.c: m->waterLevel = find_water_level(m->pos[0], m->pos[2]);
src/game/mario.c: if (m->floor != NULL) {
src/game/mario.c: m->floorAngle = atan2s(m->floor->normal.z, m->floor->normal.x);
src/game/mario.c: m->terrainSoundAddend = mario_get_terrain_sound_addend(m);
src/game/mario.c: if ((m->pos[1] > m->waterLevel - 40) && mario_floor_is_slippery(m)) {
src/game/mario.c: m->input |= INPUT_ABOVE_SLIDE;
src/game/mario.c: if ((m->floor->flags & SURFACE_FLAG_DYNAMIC)
src/game/mario.c: || (m->ceil && m->ceil->flags & SURFACE_FLAG_DYNAMIC)) {
src/game/mario.c: ceilToFloorDist = m->ceilHeight - m->floorHeight;
src/game/mario.c: m->input |= INPUT_SQUISHED;
src/game/mario.c: if (m->pos[1] > m->floorHeight + 100.0f*mScale) {
src/game/mario.c: m->input |= INPUT_OFF_FLOOR;
src/game/mario.c: if (m->pos[1] < (m->waterLevel - 10*mScale)) {
src/game/mario.c: m->input |= INPUT_IN_WATER;
src/game/mario.c: if (m->pos[1] < (gasLevel - 100.0f*mScale)) {
src/game/mario.c: m->input |= INPUT_IN_POISON_GAS;
src/game/mario.c: m->particleFlags = 0;
src/game/mario.c: m->input = 0;
src/game/mario.c: m->collidedObjInteractTypes = m->marioObj->collidedObjInteractTypes;
src/game/mario.c: m->flags &= 0xFFFFFF;
src/game/mario.c: while (Cheats.MoonJump == true && Cheats.EnableCheats == true && m->controller->buttonDown & L_TRIG ){
src/game/mario.c: m->vel[1] = 25;
src/game/mario.c: if (m->action & ACT_FLAG_ALLOW_FIRST_PERSON) {
src/game/mario.c: m->input |= INPUT_FIRST_PERSON;
src/game/mario.c: if (!(m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED))) {
src/game/mario.c: m->input |= INPUT_UNKNOWN_5;
src/game/mario.c: if (m->marioObj->oInteractStatus
src/game/mario.c: m->input |= INPUT_UNKNOWN_10;
src/game/mario.c: if (m->wallKickTimer > 0) {
src/game/mario.c: m->wallKickTimer--;
src/game/mario.c: if (m->doubleJumpTimer > 0) {
src/game/mario.c: m->doubleJumpTimer--;
src/game/mario.c: if ((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) {
src/game/mario.c: heightBelowWater = (f32)(m->waterLevel - 80) - m->pos[1];
src/game/mario.c: camPreset = m->area->camera->mode;
src/game/mario.c: if (m->action & ACT_FLAG_METAL_WATER) {
src/game/mario.c: set_camera_mode(m->area->camera, CAMERA_MODE_CLOSE, 1);
src/game/mario.c: set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1);
src/game/mario.c: set_camera_mode(m->area->camera, CAMERA_MODE_WATER_SURFACE, 1);
src/game/mario.c: if (!(m->action & ACT_FLAG_INTANGIBLE)) {
src/game/mario.c: if ((m->pos[1] < (f32)(m->waterLevel - 160)) || (m->faceAngle[0] < -0x800)) {
src/game/mario.c: m->particleFlags |= PARTICLE_BUBBLE;
src/game/mario.c: if (m->health >= 0x100) {
src/game/mario.c: m->health -= 1;
src/game/mario.c: m->health -= 0x100;
src/game/mario.c: m->health -= 0x100;
src/game/mario.c: m->health -= 0x100;
src/game/mario.c: if (((u32) m->healCounter | (u32) m->hurtCounter) == 0) {
src/game/mario.c: if ((m->input & INPUT_IN_POISON_GAS) && !(m->action & ACT_FLAG_INTANGIBLE)) {
src/game/mario.c: if (!(m->flags & MARIO_METAL_CAP) && !gDebugLevelSelect) {
src/game/mario.c: m->health -= 4;
src/game/mario.c: if ((m->action & ACT_FLAG_SWIMMING) && !(m->action & ACT_FLAG_INTANGIBLE)) {
src/game/mario.c: terrainIsSnow = (m->area->terrainType & TERRAIN_MASK) == TERRAIN_SNOW;
src/game/mario.c: if ((m->pos[1] >= (m->waterLevel - 140)) && !terrainIsSnow) {
src/game/mario.c: m->health += 0x1A;
src/game/mario.c: m->health -= (terrainIsSnow ? 3 : 1);
src/game/mario.c: if (m->healCounter > 0) {
src/game/mario.c: m->health += 0x40;
src/game/mario.c: m->healCounter--;
src/game/mario.c: if (m->hurtCounter > 0) {
src/game/mario.c: m->health -= 0x40;
src/game/mario.c: m->hurtCounter--;
src/game/mario.c: if (m->health > 0x180) {
src/game/mario.c: m->health = 0x180;
src/game/mario.c: if (m->health > MAXHP) {
src/game/mario.c: m->health = MAXHP;
src/game/mario.c: if (m->health < 0x100) {
src/game/mario.c: m->health = 0xFF;
src/game/mario.c: if (((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) && (m->health < 0x300)) {
src/game/mario.c: m->marioBodyState->action = m->action;
src/game/mario.c: m->statusForCamera->action = m->action;
src/game/mario.c: vec3s_copy(m->statusForCamera->faceAngle, m->faceAngle);
src/game/mario.c: if (!(m->flags & MARIO_UNKNOWN_25)) {
src/game/mario.c: vec3f_copy(m->statusForCamera->pos, m->pos);
src/game/mario.c: struct MarioBodyState *bodyState = m->marioBodyState;
src/game/mario.c: m->flags &= ~MARIO_METAL_SHOCK;
src/game/mario.c: struct Object *o = m->marioObj;
src/game/mario.c: (*o->header.gfx.throwMatrix)[3][1] -= m->quicksandDepth;
src/game/mario.c: o->header.gfx.pos[1] -= m->quicksandDepth;
src/game/mario.c: u32 flags = m->flags;
src/game/mario.c: if (m->capTimer > 0) {
src/game/mario.c: action = m->action;
src/game/mario.c: if ((m->capTimer <= 60)
src/game/mario.c: m->capTimer -= 1;
src/game/mario.c: if (m->capTimer == 0) {
src/game/mario.c: m->flags &= ~MARIO_SPECIAL_CAPS;
src/game/mario.c: if (!(m->flags & MARIO_CAPS)) {
src/game/mario.c: m->flags &= ~MARIO_CAP_ON_HEAD;
src/game/mario.c: if (m->capTimer == 60) {
src/game/mario.c: if ((m->capTimer < 64) && ((1ULL << m->capTimer) & sCapFlickerFrames)) {
src/game/mario.c: struct MarioBodyState *bodyState = m->marioBodyState;
src/game/mario.c: if ((m->invincTimer >= 3) && (gGlobalTimer & 1)) {
src/game/mario.c: if (m->action & ACT_FLAG_SHORT_HITBOX) {
src/game/mario.c: m->marioObj->hitboxHeight = 100.0f*GetMarioScaleFactors();
src/game/mario.c: m->marioObj->hitboxHeight = 160.0f*GetMarioScaleFactors();
src/game/mario.c: if ((m->flags & MARIO_TELEPORTING) && (m->fadeWarpOpacity != 0xFF)) {
src/game/mario.c: bodyState->modelState |= (0x100 | m->fadeWarpOpacity);
src/game/mario.c: m->Chaos_Vals[1] = m->Chaos_Vals[0];
src/game/mario.c: m->Chaos_Vals[0] = newChaos;
src/game/mario.c: }while(newChaos==m->Chaos_Vals[0]);
src/game/mario.c: switch(m->Chaos_Vals[i]){
src/game/mario.c: tempV = m->forwardVel;
src/game/mario.c: // m->forwardVel = tempV;
src/game/mario.c: tempV = m->forwardVel;
src/game/mario.c: // m->forwardVel = tempV;
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 2.5f, 2.5f, 2.5f);
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 4.5f, 1.0f, 4.5f);
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 0.4f, 0.4f, 0.4f);
src/game/mario.c: vec3f_set(m->marioObj->header.gfx.scale, 0.25f, 1.0f, 0.25f);
src/game/mario.c: m->flags &= ~MARIO_CAP_ON_HEAD;
src/game/mario.c: m->input |= INPUT_Z_DOWN;
src/game/mario.c: m->flags |= 14;
src/game/mario.c: m->capTimer=30;
src/game/mario.c: if(m->forwardVel>0){
src/game/mario.c: m->forwardVel+=32.0f;
src/game/mario.c: m->forwardVel-=32.0f;
src/game/mario_actions_airborne.c: s32 animFrame = m->marioObj->header.gfx.animInfo.animFrame;
src/game/mario_actions_airborne.c: play_sound(SOUND_ACTION_SPIN, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: u32 action = m->action;
src/game/mario_actions_airborne.c: && !(m->flags & MARIO_UNKNOWN_18)) {
src/game/mario_actions_airborne.c: if (m->peakHeight - m->pos[1] > 1150.0f) {
src/game/mario_actions_airborne.c: play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: m->flags |= MARIO_UNKNOWN_18;
src/game/mario_actions_airborne.c: if (m->actionArg == 0 && (m->forwardVel <= -28.0f || m->forwardVel >= 28.0f)) {
src/game/mario_actions_airborne.c: m->faceAngle[1] = atan2s(m->wall->normal.z, m->wall->normal.x);
src/game/mario_actions_airborne.c: if (m->forwardVel < 24.0f) {
src/game/mario_actions_airborne.c: m->forwardVel = 24.0f;
src/game/mario_actions_airborne.c: if (!(m->flags & MARIO_METAL_CAP)) {
src/game/mario_actions_airborne.c: m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 24 : 36;
src/game/mario_actions_airborne.c: if (!(m->flags & MARIO_METAL_CAP)) {
src/game/mario_actions_airborne.c: m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 12 : 18;
src/game/mario_actions_airborne.c: play_sound(SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: fallHeight = m->peakHeight - m->pos[1];
src/game/mario_actions_airborne.c: if (m->SelFallDmg){
src/game/mario_actions_airborne.c: m->SelFallDmg=0;
src/game/mario_actions_airborne.c: if (m->actionState == ACT_GROUND_POUND) {
src/game/mario_actions_airborne.c: if (m->action != ACT_TWIRLING && m->floor->type != SURFACE_BURNING && FALL_DAMAGE) {
src/game/mario_actions_airborne.c: if (m->vel[1] < -55.0f) {
src/game/mario_actions_airborne.c: m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 16 : 24;
src/game/mario_actions_airborne.c: play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 8 : 12;
src/game/mario_actions_airborne.c: m->squishTimer = 30;
src/game/mario_actions_airborne.c: play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: if (m->input & INPUT_B_PRESSED) {
src/game/mario_actions_airborne.c: return set_mario_action(m, m->forwardVel > 28.0f ? ACT_DIVE : ACT_JUMP_KICK, 0);
src/game/mario_actions_airborne.c: u32 terrainType = m->area->terrainType & TERRAIN_MASK;
src/game/mario_actions_airborne.c: struct Surface *floor = m->floor;
src/game/mario_actions_airborne.c: if (!(flags & 0x01) && m->peakHeight - m->pos[1] > 1000.0f && floor->normal.y >= 0.8660254f) {
src/game/mario_actions_airborne.c: play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: m->particleFlags |= PARTICLE_MIST_CIRCLE;
src/game/mario_actions_airborne.c: floor = m->floor;
src/game/mario_actions_airborne.c: m->slideVelX += 1.2f * sins(pushAngle);
src/game/mario_actions_airborne.c: m->slideVelZ += 1.2f * coss(pushAngle);
src/game/mario_actions_airborne.c: speed = sqrtf(m->slideVelX * m->slideVelX + m->slideVelZ * m->slideVelZ);
src/game/mario_actions_airborne.c: m->slideVelX = m->slideVelX * 48.0f / speed;
src/game/mario_actions_airborne.c: m->slideVelZ = m->slideVelZ * 48.0f / speed;
src/game/mario_actions_airborne.c: m->vel[0] = m->slideVelX;
src/game/mario_actions_airborne.c: m->vel[2] = m->slideVelZ;
src/game/mario_actions_airborne.c: m->slideYaw = atan2s(m->slideVelZ, m->slideVelX);
src/game/mario_actions_airborne.c: m->forwardVel = speed * coss(m->faceAngle[1] - m->slideYaw);
src/game/mario_actions_airborne.c: play_sound(SOUND_ENV_WIND2, m->marioObj->header.gfx.cameraToObject);
src/game/mario_actions_airborne.c: dragThreshold = m->action == ACT_LONG_JUMP ? 48.0f : 32.0f;
src/game/mario_actions_airborne.c: m->forwardVel = approach_f32(m->forwardVel, 0.0f, 0.35f, 0.35f);
src/game/mario_actions_airborne.c: if (m->input & INPUT_NONZERO_ANALOG) {
src/game/mario_actions_airborne.c: intendedDYaw = m->intendedYaw - m->faceAngle[1];
src/game/mario_actions_airborne.c: intendedMag = m->intendedMag / 32.0f;
src/game/mario_actions_airborne.c: m->forwardVel += 1.5f * coss(intendedDYaw) * intendedMag;
src/game/mario_actions_airborne.c: m->faceAngle[1] += 512.0f * sins(intendedDYaw) * intendedMag;
src/game/mario_actions_airborne.c: if (m->forwardVel > dragThreshold) {
src/game/mario_actions_airborne.c: m->forwardVel -= 1.0f;
src/game/mario_actions_airborne.c: if (m->forwardVel < -16.0f) {
src/game/mario_actions_airborne.c: m->forwardVel += 2.0f;
src/game/mario_actions_airborne.c: m->vel[0] = m->slideVelX = m->forwardVel * sins(m->faceAngle[1]);
src/game/mario_actions_airborne.c: m->vel[2] = m->slideVelZ = m->forwardVel * coss(m->faceAngle[1]);
src/game/mario_actions_airborne.c: dragThreshold = m->action == ACT_LONG_JUMP ? 48.0f : 32.0f;