-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathth20_cursed.anmm
More file actions
809 lines (773 loc) · 14 KB
/
th20_cursed.anmm
File metadata and controls
809 lines (773 loc) · 14 KB
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
!anmmap
# mappings from zero318
# compatibility mappings from ExpHP
!ins_names
## Even older names from Bravi's cursed map
## REALLY DON'T USE THESE THEY SUCK
1 end
5 case
410 rotateTimeEx
421 anchor
500 createScript
501 createScript2
502 createScript3
503 createScript4
504 createScript5
604 drawStar
605 drawStarBorder
606 drawRect2
607 drawRect3
608 drawRect4
## Compatibility names from ExpHP
## PLEASE DON'T USE THESE
1 delete
2 static
3 stop
4 stopHide
5 interruptLabel
7 caseReturn
100 iset
101 fset
102 iadd
103 fadd
104 isub
105 fsub
106 imul
107 fmul
108 idiv
109 fdiv
110 imod
111 fmod
112 isetAdd
113 fsetAdd
114 isetSub
115 fsetSub
116 isetMul
117 fsetMul
118 isetDiv
119 fsetDiv
120 isetMod
121 fsetMod
122 isetRand
123 fsetRand
124 fsin
125 fcos
126 ftan
127 facos
128 fatan
129 validRad
130 circlePos
131 circlePosRand
200 jmp
201 jmpDec
202 ije
203 fje
204 ijne
205 fjne
206 ijl
207 fjl
208 ijle
209 fjle
210 ijg
211 fjg
212 ijge
213 fjge
300 sprite
301 spriteRand
302 type
303 blendMode
305 zWriteDisable
307 randMode
308 flipX
309 flipY
310 visible
311 resampleMode
312 scrollMode
313 resolutionMode
315 colorizeChildren
400 pos
401 rotate
405 alpha2
406 color2
407 posTime
408 colorTime
409 alphaTime
410 rotateTime
411 rotateTime2D
412 scaleTime
413 color2Time
414 alpha2Time
415 angleVel
416 scaleGrowth
417 alphaTimeLinear
420 moveBezier
421 anchorMode
423 colorMode
424 rotateAuto
425 scrollX
426 scrollY
427 scrollXTime
428 scrollYTime
429 scaleUV
430 scaleUVTime
432 slowdownImmune
435 scale2Time
436 anchorOffset
437 rotationMode
438 originMode
439 fadeNearCamera
440 unflip
500 scriptNew
501 scriptNewUI
502 scriptNewFront
503 scriptNewUIFront
504 scriptNewRoot
505 scriptNewPos
506 scriptNewRootPos
508 effectNew
509 copyVars
600 texCircle
601 texArcEven
602 texArc
603 drawRect
604 drawPoly
605 drawPolyBorder
606 drawRectGrad
607 drawRectRot
608 drawRectRotGrad
609 texCylinder3D
610 texRing3D
611 drawRing
612 drawRectBorder
613 drawLine
## Section A
0 nop
1 anm_delete
2 anm_static
3 anm_halt
4 anm_halt_invisible
5 interrupt_label
6 wait
7 interrupt_return
## Section B
100 set_int
101 set_float
102 math_int_add_assign
103 math_float_add_assign
104 math_int_sub_assign
105 math_float_sub_assign
106 math_int_mul_assign
107 math_float_mul_assign
108 math_int_div_assign
109 math_float_div_assign
110 math_int_mod_assign
111 math_float_mod_assign
112 math_int_add
113 math_float_add
114 math_int_sub
115 math_float_sub
116 math_int_mul
117 math_float_mul
118 math_int_div
119 math_float_div
120 math_int_mod
121 math_float_mod
122 set_int_rand_bound
123 set_float_rand_bound
124 math_sin
125 math_cos
126 math_tan
127 math_acos
128 math_atan
129 math_reduce_angle
130 math_circle_pos_fast
131 math_circle_pos_rand
## Section C
200 jump
201 _loop
202 jump_int_equ
203 jump_float_equ
204 jump_int_neq
205 jump_float_neq
206 jump_int_lss
207 jump_float_lss
208 jump_int_leq
209 jump_float_leq
210 jump_int_gre
211 jump_float_gre
212 jump_int_geq
213 jump_float_geq
## Section D
300 sprite_set
301 sprite_set_rand_bound
302 render_mode
303 blend_mode
304 layer
305 anm_flag_disable_z_write
306 __anm_flag_unknown_std_A
307 rand_mode
308 scale_flip_x
309 scale_flip_y
310 anm_flag_visible
311 resample_mode
312 scroll_mode
313 resolution_mode
314 anm_flag_inherit_rotation
315 anm_flag_color_children
316 __anm_flag_set_visible2
317 __anm_flag_clear_visible2
318 __anm_flag_unknown_V
319 __sprite_set_unknown
## Section E
400 move_position
401 rotation
402 scale
403 alpha
404 color
405 alpha_gradient
406 color_gradient
407 move_position_interp
408 color_interp
409 alpha_interp
410 rotation_interp
411 spin_interp
412 scale_interp
413 color_gradient_interp
414 alpha_gradient_interp
415 rotation_speed
416 scale_speed
417 alpha_interp_linear
418 sprite_window
419 __anm_flag_continual_sprite_window
420 move_bezier
421 anchor_mode
422 position_inherit
423 color_mode
424 anm_flag_auto_rotate
425 scroll_speed_x
426 scroll_speed_y
427 scroll_speed_x_interp
428 scroll_speed_y_interp
429 uv_scale
430 uv_scale_interp
431 __anm_flag_unknown_T
432 anm_flag_slowdown_immune
433 move_velocity_interp
434 scale2
435 scale2_interp
436 anchor_offset
437 rotation_mode
438 origin_mode
439 camera_fade
440 scale_unflip
441 move_position2
## Section F
500 anm_create_child_back
501 anm_create_child_ui_back
502 anm_create_child_front
503 anm_create_child_ui_front
504 anm_create_back
505 anm_create_child_back_rel
506 anm_create_back_rel
507 __anm_flag_treat_as_root
508 effect_create_special
509 copy_parent_context
510 anm_create_child_front_rel
## Section G
600 textured_ring
601 textured_arc_A
602 textured_arc_B
603 polygon_rectangle
604 polygon
605 polygon_hollow
606 polygon_rectangle_gradient
607 polygon_rectangle_antialias
608 polygon_rectangle_gradient_antialias
609 textured_cylinder
610 textured_ring_3D
611 polygon_ring
612 polygon_rectangle_hollow
613 polygon_line
614 __polygon_unknown_A
615 __polygon_ring_unknown_A
616 __polygon_ring_unknown_B
617 __polygon_unknown_C
618 __polygon_unknown_D
619 __polygon_unknown_E
620 __polygon_unknown_F1
621 __polygon_unknown_F2
622 __polygon_unknown_F3
623 __polygon_unknown_G
624 __polygon_unknown_H
625 __polygon_unknown_I1
626 __polygon_unknown_I2
627 __polygon_unknown_I3
628 __polygon_unknown_J
629 __polygon_unknown_K
630 __polygon_unknown_L1
631 __polygon_unknown_L2
632 __polygon_unknown_L3
633 __polygon_unknown_M
634 __polygon_unknown_N
!ins_signatures
## Section A
0
1
2
3
4
5 S(imm)
6 S
7
## Section B
100 SS
101 ff
102 SS
103 ff
104 SS
105 ff
106 SS
107 ff
108 SS
109 ff
110 SS
111 ff
112 SSS
113 fff
114 SSS
115 fff
116 SSS
117 fff
118 SSS
119 fff
120 SSS
121 fff
122 SU
123 ff
124 ff
125 ff
126 ff
127 ff
128 ff
129 f
130 ffff
131 ffff
## Section C
200 ot
201 Sot
202 SSot
203 ffot
204 SSot
205 ffot
206 SSot
207 ffot
208 SSot
209 ffot
210 SSot
211 ffot
212 SSot
213 ffot
## Section D
300 n
301 nU
302 b(imm;enum="RenderMode")---
303 b(imm;enum="BlendMode")---
304 b(imm;enum="AnmLayerIndex")---
305 b(imm;enum="bool")--- ## b(imm;enum="BitBool")---
306 b(imm;enum="bool")--- ## b(imm;enum="BitBool")---
307 b(imm;enum="RandMode")---
308
309
310 b(imm;enum="bool")--- ## b(imm;enum="BitBool")---
311 c(imm;enum="ResampleMode")---
312 U(enum="ScrollMode")U(enum="ScrollMode")
313 U(enum="ResolutionMode")
314 U(enum="bool") ## U(enum="BitBool")
315 b(imm;enum="bool")--- ## b(imm;enum="BitBool")---
316
317
318 b(imm;enum="bool")--- ## b(imm;enum="BitBool")---
319 nnnn
## Section E
400 fff
401 fff
402 ff
403 C
404 CCC
405 C
406 CCC
407 SU(imm;enum="InterpMode")fff
408 Sb(imm;enum="InterpMode")---CCC
409 Sb(imm;enum="InterpMode")---C
410 SU(imm;enum="InterpMode")fff
411 SU(imm;enum="InterpMode")f
412 Sb(imm;enum="InterpMode")---ff
413 Sb(imm;enum="InterpMode")---CCC
414 Sb(imm;enum="InterpMode")---C
415 fff
416 ff
417 b(imm;hex)---S
418
419 U(enum="bool") ## U(enum="BitBool")
420 Sfffffffff
421 b(imm;enum="AnchorModeX")-b(imm;enum="AnchorModeY")-
422
423 b(imm;enum="ColorMode")---
424 b(imm;enum="bool")---
425 f
426 f
427 SU(imm;enum="InterpMode")f
428 SU(imm;enum="InterpMode")f
429 ff
430 Sb(imm;enum="InterpMode")---ff
431 b(imm;enum="bool")--- ## b(imm;enum="BitBool")---
432 U(enum="bool") ## U(enum="BitBool")
433 SU(imm;enum="InterpMode")ff
434 ff
435 Sb(imm;enum="InterpMode")---ff
436 ff
437 U(enum="RotationMode")
438 b(imm;enum="OriginMode")---
439 b(imm;enum="bool")---f(imm)f(imm) ## b(imm;enum="BitBool")---f(imm)f(imm)
440
441 fff
## Section F
500 N
501 N
502 N
503 N
504 N
505 Nff
506 Nff
507 U(enum="bool") ## U(enum="BitBool")
508 U(enum="EffectID")
509
510 Nff
## Section G
600 U
601 U
602 U
603 ff
604 fS
605 fS
606 ff
607 ff
608 ff
609 U
610 U
611 ffS
612 ff
613 ff
614 ff
615 ffS
616 ffS
617 fS
618
619 fS
620 ffS
621 ffS
622 ffS
623 fffS
624 fffS
625 ffffS
626 ffffS
627 ffffS
628 fS
629 fS
630 ffS
631 ffS
632 ffS
633 S
634 f
!gvar_names
## Compatibility names
## DO NOT USE THESE
10008 I4
10009 I5
10010 RANDRAD
10011 RANDF
10012 RANDF2
10013 POS_X
10014 POS_Y
10015 POS_Z
10022 RAND
10027 RANDFLIMIT
10028 RANDRADLIMIT
10029 RANDLIMIT
10030 RANDRADREP
10031 RANDFREP
10032 RANDF2REP
10000 I0
10001 I1
10002 I2
10003 I3
10004 F0
10005 F1
10006 F2
10007 F3
10008 IC0
10009 IC1
10010 RAND_ANGLE
10011 RAND_FLOAT
10012 RAND_FLOAT_SIGNED
10013 SELF_X
10014 SELF_Y
10015 SELF_Z
10016 CAMERA_POS_X
10017 CAMERA_POS_Y
10018 CAMERA_POS_Z
10019 CAMERA_FACING_X
10020 CAMERA_FACING_Y
10021 CAMERA_FACING_Z
10022 RAND_UINT
10023 SELF_X_ROT
10024 SELF_Y_ROT
10025 SELF_Z_ROT
10026 __ROOT_VM_Z_ROT
10027 RAND_SCALE
10028 RAND_ANGLE_SCALE
10029 RAND_UINT_RANGE
10030 RAND_ANGLE_REPLAY
10031 RAND_FLOAT_REPLAY
10032 RAND_FLOAT_SIGNED_REPLAY
10033 __UNKNOWN_X
10034 __UNKNOWN_Y
10035 __UNKNOWN_Z
# ZANM
10036 PLAYER_POWER
10037 PLAYER_STORY_STONE_COLOR
10038 PLAYER_NARROW_SHOT_STONE_COLOR
10039 PLAYER_WIDE_SHOT_STONE_COLOR
10040 PLAYER_ASSIST_STONE_COLOR
10041 PLAYER_STORY_STONE
10042 PLAYER_NARROW_SHOT_STONE
10043 PLAYER_WIDE_SHOT_STONE
10044 PLAYER_ASSIST_STONE
!gvar_types
10000 $
10001 $
10002 $
10003 $
10004 %
10005 %
10006 %
10007 %
10008 $
10009 $
10010 %
10011 %
10012 %
10013 %
10014 %
10015 %
10016 %
10017 %
10018 %
10019 %
10020 %
10021 %
10022 $
10023 %
10024 %
10025 %
10026 %
10027 %
10028 %
10029 $
10030 %
10031 %
10032 %
10033 %
10034 %
10035 %
# ZANM
10036 $
10037 $
10038 $
10039 $
10040 $
10041 $
10042 $
10043 $
10044 $
!ins_intrinsics
5 Interrupt()
100 AssignOp(op="=";type="int")
101 AssignOp(op="=";type="float")
102 AssignOp(op="+=";type="int")
103 AssignOp(op="+=";type="float")
104 AssignOp(op="-=";type="int")
105 AssignOp(op="-=";type="float")
106 AssignOp(op="*=";type="int")
107 AssignOp(op="*=";type="float")
108 AssignOp(op="/=";type="int")
109 AssignOp(op="/=";type="float")
110 AssignOp(op="%=";type="int")
111 AssignOp(op="%=";type="float")
112 BinOp(op="+";type="int")
113 BinOp(op="+";type="float")
114 BinOp(op="-";type="int")
115 BinOp(op="-";type="float")
116 BinOp(op="*";type="int")
117 BinOp(op="*";type="float")
118 BinOp(op="/";type="int")
119 BinOp(op="/";type="float")
120 BinOp(op="%";type="int")
121 BinOp(op="%";type="float")
124 UnOp(op="sin";type="float")
125 UnOp(op="cos";type="float")
126 UnOp(op="tan";type="float")
127 UnOp(op="acos";type="float")
128 UnOp(op="atan";type="float")
200 Jmp()
201 CountJmp(op=">")
202 CondJmp(op="==";type="int")
203 CondJmp(op="==";type="float")
204 CondJmp(op="!=";type="int")
205 CondJmp(op="!=";type="float")
206 CondJmp(op="<";type="int")
207 CondJmp(op="<";type="float")
208 CondJmp(op="<=";type="int")
209 CondJmp(op="<=";type="float")
210 CondJmp(op=">";type="int")
211 CondJmp(op=">";type="float")
212 CondJmp(op=">=";type="int")
213 CondJmp(op=">=";type="float")
!enum(name="InterpMode")
0 Linear
1 AccelerateSlow
2 Accelerate
3 AccelerateFast
4 DecelerateSlow
5 Decelerate
6 DecelerateFast
7 ConstantVelocity
8 Bezier
9 AccelDecelSlow
10 AccelDecel
11 AccelDecelFast
12 DecelAccelSlow
13 DecelAccel
14 DecelAccelFast
15 Initial
16 Final
17 ConstantAccel
18 DecelerateSine
19 AccelerateSine
20 DecelAccelSine
21 AccelDecelSine
22 __AccelParabolaA
23 __AccelParabolaB
24 __AccelParabolaC
25 __AccelParabolaD
26 __AccelParabolaE
27 __DecelParabolaA
28 __DecelParabolaB
29 __DecelParabolaC
30 __DecelParabolaD
31 __DecelParabolaE
!enum(name="RenderMode")
0 RenderMode0 # Normal
1 RenderMode1 # Normal
2 RenderMode2 # Normal
3 RenderMode3 # Normal
4 RenderMode4 # Normal
5 RenderMode5 # Normal
6 RenderMode6 # Normal
7 RenderMode7 # Normal
8 RenderMode8 # Normal
9 TexturedRing
10 RenderMode10 # SPECIAL
11 RenderMode11 #
12 RenderMode12 #
13 TexturedArcA
14 TexturedArcB
15 RenderMode15 # Normal (RenderMode8 with fog)
16 PolygonRectangle # [TRIANGLESTRIP x 2, ZWRITE = False]
17 Polygon # [TRIANGLEFAN x I0, ZWRITE = False, ZFUNC = CmpAlways]
18 PolygonHollow # [LINESTRIP x I0]
19 PolygonRing # [TRIANGLESTRIP x I0 * 2]
20 PolygonRectangleGradient # [TRIANGLESTRIP x 2, ZWRITE = False]
21 PolygonRectangleAntialias # [TRIANGLESTRIP x 2, ZWRITE = False]
22 PolygonRectangleGradientAntialias # [TRIANGLESTRIP x 2, ZWRITE = False]
23 RenderMode23 #
24 TexturedCylinder
25 TexturedRing3D
26 PolygonLine # [LINESTRIP x 1, ZWRITE = False]
27 PolgonRectangleHollow # [LINESTRIP x 4, ZWRITE = False]
28 __PolygonUnknownA # [TRIANGLESTRIP x 1, ZWRITE = False]
29 __PolygonRingUnknownA # [TRIANGLESTRIP x I0 * 2]
30 __PolygonRingUnknownB # [TRIANGLESTRIP x I0 * 2]
31 __PolygonUnknownC # [TRIANGLEFAN x I0, ZWRITE = False, ZFUNC = CmpAlways]
32 __PolygonUnknownD # [POINTLIST x 1, ZWRITE = False]
33 __PolygonUnknownE # [LINESTRIP x I0, ZWRITE = False, ZFUNC = CmpAlways]
34 __PolygonUnknownF1 # [TRIANGLESTRIP x I0 * 2, ZWRITE = False, ZFUNC = CmpAlways]
35 __PolygonUnknownF2 # [TRIANGLESTRIP x I0 * 2, ZWRITE = False, ZFUNC = CmpAlways]
36 __PolygonUnknownF3 # [TRIANGLESTRIP x I0 * 2, ZWRITE = False, ZFUNC = CmpAlways]
37 __PolygonUnknownG # [TRIANGLESTRIP x I0, ZWRITE = False, ZFUNC = CmpAlways]
38 __PolygonUnknownH # [LINESTRIP, ZWRITE = False, ZFUNC = CmpAlways]
39 __PolygonUnknownI1 # [TRIANGLESTRIP x I0 * 2, ZWRITE = False, ZFUNC = CmpAlways]
40 __PolygonUnknownI2 # [TRIANGLESTRIP x I0 * 2, ZWRITE = False, ZFUNC = CmpAlways]
41 __PolygonUnknownI3 # [TRIANGLESTRIP x I0 * 2, ZWRITE = False, ZFUNC = CmpAlways]
42 __PolygonUnknownJ # [TRIANGLEFAN x I0, ZWRITE = False, ZFUNC = CmpAlways]
43 __PolygonUnknownK # [LINESTRIP x I0]
44 __PolygonUnknownL1 # [TRIANGLESTRIP x I0 * 2]
45 __PolygonUnknownL2 # [TRIANGLESTRIP x I0 * 2]
46 __PolygonUnknownL3 # [TRIANGLESTRIP x I0 * 2]
!enum(name="BlendMode")
0 Normal
1 Additive
2 BlendMode2
3 BlendMode3
4 BlendMode4
5 BlendMode5
6 BlendMode6
7 BlendMode7
8 BlendMode8
9 BlendMode9
!enum(name="RandMode")
0 ReplayRNG
1 AnimationRNG
!enum(name="ResampleMode")
0 LinearInterp
1 NearestPoint
!enum(name="ScrollMode")
0 Wrap
1 Clamp
2 Mirror
!enum(name="ResolutionMode")
0 ResolutionMode0
1 ResolutionMode1
2 ResolutionMode2
3 ResolutionMode3
4 ResolutionMode4
5 ResolutionMode5
6 ResolutionMode6
!enum(name="AnchorModeX")
0 Center
1 Left
2 Right
!enum(name="AnchorModeY")
0 Center
1 Top
2 Bottom
!enum(name="ColorMode")
0 ColorOnly
1 GradientColorOnly
2 HorizontalGradient
3 VerticalGradient
4 ColorMode4
!enum(name="RotationMode")
0 XYZ
1 XZY
2 YXZ
3 YZX
4 ZXY
5 ZYX
6 None
!enum(name="OriginMode")
0 OriginMode0
1 OriginMode1
2 OriginMode2
!enum(name="AnmLayerIndex")
!enum(name="EffectID")