-
Notifications
You must be signed in to change notification settings - Fork 142
/
seqtbl.c
1228 lines (1094 loc) · 62 KB
/
seqtbl.c
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
/*
SDLPoP, a port/conversion of the DOS game Prince of Persia.
Copyright (C) 2013-2023 Dávid Nagy
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
The authors of this program may be contacted at https://forum.princed.org
*/
#include "common.h"
#define SEQTBL_BASE 0x196E
#define SEQTBL_0 (seqtbl - SEQTBL_BASE)
// This expands a two-byte number into two comma-separated bytes, used for the JMP destinations
#define DW(data_word) (data_word) & 0x00FF, (((data_word) & 0xFF00) >> 8)
// Shorter notation for the sequence table instructions
#define act(action) SEQ_ACTION, (action)
#define jmp(dest) SEQ_JMP, DW(dest)
#define jmp_if_feather(dest) SEQ_JMP_IF_FEATHER, DW(dest)
#define dx(amount) SEQ_DX, (byte) (amount)
#define dy(amount) SEQ_DY, (byte) (amount)
#define snd(sound) SEQ_SOUND, (sound)
#define set_fall(x, y) SEQ_SET_FALL, (byte) (x), (byte) (y)
// This splits the byte array into labeled "sections" that are packed tightly next to each other
// However, it only seems to work correctly in the Debug configuration...
//#define LABEL(label) }; const byte label##_eventual_ptr[] __attribute__ ((aligned(1))) = {
#define LABEL(label) // disable
//#define OFFSET(label) label - seqtbl + SEQTBL_BASE
// Labels
#define running SEQTBL_BASE // 0x196E
#define startrun 5 + running //SEQTBL_BASE + 5 // 0x1973
#define runstt1 2 + startrun //SEQTBL_BASE + 7 // 0x1975
#define runstt4 3 + runstt1 //SEQTBL_BASE + 10 // 0x1978
#define runcyc1 9 + runstt4 //SEQTBL_BASE + 19 // 0x1981
#define runcyc7 20 + runcyc1 //SEQTBL_BASE + 39 // 0x1995
#define stand 11 + runcyc7 //SEQTBL_BASE + 50 // 0x19A0
#define goalertstand 6 + stand //SEQTBL_BASE + 56 // 0x19A6
#define alertstand 2 + goalertstand //SEQTBL_BASE + 58 // 0x19A8
#define arise 4 + alertstand //SEQTBL_BASE + 62 // 0x19AC
#define guardengarde 21 + arise //SEQTBL_BASE + 83 // 0x19C1
#define engarde 3 + guardengarde //SEQTBL_BASE + 86 // 0x19C4
#define ready 14 + engarde //SEQTBL_BASE + 100 // 0x19D2
#define ready_loop 6 + ready //SEQTBL_BASE + 106 // 0x19D8
#define stabbed 4 + ready_loop //SEQTBL_BASE + 110 // 0x19DC
#define strikeadv 29 + stabbed //SEQTBL_BASE + 139 // 0x19F9
#define strikeret 14 + strikeadv //SEQTBL_BASE + 153 // 0x1A07
#define advance 12 + strikeret //SEQTBL_BASE + 165 // 0x1A13
#define fastadvance 15 + advance //SEQTBL_BASE + 180 // 0x1A22
#define retreat 12 + fastadvance //SEQTBL_BASE + 192 // 0x1A2E
#define strike 14 + retreat //SEQTBL_BASE + 206 // 0x1A3C
#define faststrike 6 + strike //SEQTBL_BASE + 212 // 0x1A42
#define guy4 3 + faststrike //SEQTBL_BASE + 215 // 0x1A45
#define guy7 5 + guy4 //SEQTBL_BASE + 220 // 0x1A4A
#define guy8 3 + guy7 //SEQTBL_BASE + 223 // 0x1A4D
#define blockedstrike 7 + guy8 //SEQTBL_BASE + 230 // 0x1A54
#define blocktostrike 6 + blockedstrike //SEQTBL_BASE + 236 // 0x1A5A
#define readyblock 4 + blocktostrike //SEQTBL_BASE + 240 // 0x1A5E
#define blocking 1 + readyblock //SEQTBL_BASE + 241 // 0x1A5F
#define striketoblock 4 + blocking //SEQTBL_BASE + 245 // 0x1A63
#define landengarde 5 + striketoblock //SEQTBL_BASE + 250 // 0x1A68
#define bumpengfwd 6 + landengarde //SEQTBL_BASE + 256 // 0x1A6E
#define bumpengback 7 + bumpengfwd //SEQTBL_BASE + 263 // 0x1A75
#define flee 7 + bumpengback //SEQTBL_BASE + 270 // 0x1A7C
#define turnengarde 7 + flee //SEQTBL_BASE + 277 // 0x1A83
#define alertturn 8 + turnengarde //SEQTBL_BASE + 285 // 0x1A8B
#define standjump 8 + alertturn //SEQTBL_BASE + 293 // 0x1A93
#define sjland 29 + standjump //SEQTBL_BASE + 322 // 0x1AB0
#define runjump 29 + sjland //SEQTBL_BASE + 351 // 0x1ACD
#define rjlandrun 46 + runjump //SEQTBL_BASE + 397 // 0x1AFB
#define rdiveroll 9 + rjlandrun //SEQTBL_BASE + 406 // 0x1B04
#define rdiveroll_crouch 18 + rdiveroll //SEQTBL_BASE + 424 // 0x1B16
#define sdiveroll 4 + rdiveroll_crouch //SEQTBL_BASE + 428 // 0x1B1A
#define crawl 1 + sdiveroll //SEQTBL_BASE + 429 // 0x1B1B
#define crawl_crouch 14 + crawl //SEQTBL_BASE + 443 // 0x1B29
#define turndraw 4 + crawl_crouch //SEQTBL_BASE + 447 // 0x1B2D
#define turn 12 + turndraw //SEQTBL_BASE + 459 // 0x1B39
#define turnrun 26 + turn //SEQTBL_BASE + 485 // 0x1B53
#define runturn 7 + turnrun //SEQTBL_BASE + 492 // 0x1B5A
#define fightfall 43 + runturn //SEQTBL_BASE + 535 // 0x1B85
#define efightfall 28 + fightfall //SEQTBL_BASE + 563 // 0x1BA1
#define efightfallfwd 30 + efightfall //SEQTBL_BASE + 593 // 0x1BBF
#define stepfall 28 + efightfallfwd //SEQTBL_BASE + 621 // 0x1BDB
#define fall1 9 + stepfall //SEQTBL_BASE + 630 // 0x1BE4
#define patchfall 22 + fall1 //SEQTBL_BASE + 652 // 0x1BFA
#define stepfall2 7 + patchfall //SEQTBL_BASE + 659 // 0x1C01
#define stepfloat 5 + stepfall2 //SEQTBL_BASE + 664 // 0x1C06
#define jumpfall 22 + stepfloat //SEQTBL_BASE + 686 // 0x1C1C
#define rjumpfall 28 + jumpfall //SEQTBL_BASE + 714 // 0x1C38
#define jumphangMed 28 + rjumpfall //SEQTBL_BASE + 742 // 0x1C54
#define jumphangLong 21 + jumphangMed //SEQTBL_BASE + 763 // 0x1C69
#define jumpbackhang 27 + jumphangLong //SEQTBL_BASE + 790 // 0x1C84
#define hang 29 + jumpbackhang //SEQTBL_BASE + 819 // 0x1CA1
#define hang1 3 + hang //SEQTBL_BASE + 822 // 0x1CA4
#define hangstraight 45 + hang1 //SEQTBL_BASE + 867 // 0x1CD1
#define hangstraight_loop 7 + hangstraight //SEQTBL_BASE + 874 // 0x1CD8
#define climbfail 4 + hangstraight_loop //SEQTBL_BASE + 878 // 0x1CDC
#define climbdown 16 + climbfail //SEQTBL_BASE + 894 // 0x1CEC
#define climbup 24 + climbdown //SEQTBL_BASE + 918 // 0x1D04
#define hangdrop 33 + climbup //SEQTBL_BASE + 951 // 0x1D25
#define hangfall 17 + hangdrop //SEQTBL_BASE + 968 // 0x1D36
#define freefall 19 + hangfall //SEQTBL_BASE + 987 // 0x1D49
#define freefall_loop 2 + freefall //SEQTBL_BASE + 989 // 0x1D4B
#define runstop 4 + freefall_loop //SEQTBL_BASE + 993 // 0x1D4F
#define jumpup 25 + runstop //SEQTBL_BASE + 1018 // 0x1D68
#define highjump 21 + jumpup //SEQTBL_BASE + 1039 // 0x1D7D
#define superhijump 30 + highjump //SEQTBL_BASE + 1069 // 0x1D9B
#define fallhang 91 + superhijump //SEQTBL_BASE + 1160 // 0x1DF6
#define bump 6 + fallhang //SEQTBL_BASE + 1166 // 0x1DFC
#define bumpfall 10 + bump //SEQTBL_BASE + 1176 // 0x1E06
#define bumpfloat 31 + bumpfall //SEQTBL_BASE + 1207 // 0x1E25
#define hardbump 22 + bumpfloat //SEQTBL_BASE + 1229 // 0x1E3B
#define testfoot 30 + hardbump //SEQTBL_BASE + 1259 // 0x1E59
#define stepback 31 + testfoot //SEQTBL_BASE + 1290 // 0x1E78
#define step14 5 + stepback //SEQTBL_BASE + 1295 // 0x1E7D
#define step13 31 + step14 //SEQTBL_BASE + 1326 // 0x1E9C
#define step12 31 + step13 //SEQTBL_BASE + 1357 // 0x1EBB
#define step11 31 + step12 //SEQTBL_BASE + 1388 // 0x1EDA
#define step10 29 + step11 //SEQTBL_BASE + 1417 // 0x1EF7
#define step10a 5 + step10 //SEQTBL_BASE + 1422 // 0x1EFC
#define step9 23 + step10a //SEQTBL_BASE + 1445 // 0x1F13
#define step8 6 + step9 //SEQTBL_BASE + 1451 // 0x1F19
#define step7 26 + step8 //SEQTBL_BASE + 1477 // 0x1F33
#define step6 21 + step7 //SEQTBL_BASE + 1498 // 0x1F48
#define step5 21 + step6 //SEQTBL_BASE + 1519 // 0x1F5D
#define step4 21 + step5 //SEQTBL_BASE + 1540 // 0x1F72
#define step3 16 + step4 //SEQTBL_BASE + 1556 // 0x1F82
#define step2 16 + step3 //SEQTBL_BASE + 1572 // 0x1F92
#define step1 12 + step2 //SEQTBL_BASE + 1584 // 0x1F9E
#define stoop 9 + step1 //SEQTBL_BASE + 1593 // 0x1FA7
#define stoop_crouch 8 + stoop //SEQTBL_BASE + 1601 // 0x1FAF
#define standup 4 + stoop_crouch //SEQTBL_BASE + 1605 // 0x1FB3
#define pickupsword 23 + standup //SEQTBL_BASE + 1628 // 0x1FCA
#define resheathe 16 + pickupsword //SEQTBL_BASE + 1644 // 0x1FDA
#define fastsheathe 33 + resheathe //SEQTBL_BASE + 1677 // 0x1FFB
#define drinkpotion 14 + fastsheathe //SEQTBL_BASE + 1691 // 0x2009
#define softland 34 + drinkpotion //SEQTBL_BASE + 1725 // 0x202B
#define softland_crouch 11 + softland //SEQTBL_BASE + 1736 // 0x2036
#define landrun 4 + softland_crouch //SEQTBL_BASE + 1740 // 0x203A
#define medland 32 + landrun //SEQTBL_BASE + 1772 // 0x205A
#define hardland 66 + medland //SEQTBL_BASE + 1838 // 0x209C
#define hardland_dead 9 + hardland //SEQTBL_BASE + 1847 // 0x20A5
#define stabkill 4 + hardland_dead //SEQTBL_BASE + 1851 // 0x20A9
#define dropdead 5 + stabkill //SEQTBL_BASE + 1856 // 0x20AE
#define dropdead_dead 12 + dropdead //SEQTBL_BASE + 1868 // 0x20BA
#define impale 4 + dropdead_dead //SEQTBL_BASE + 1872 // 0x20BE
#define impale_dead 7 + impale //SEQTBL_BASE + 1879 // 0x20C5
#define halve 4 + impale_dead //SEQTBL_BASE + 1883 // 0x20C9
#define halve_dead 4 + halve //SEQTBL_BASE + 1887 // 0x20CD
#define crush 4 + halve_dead //SEQTBL_BASE + 1891 // 0x20D1
#define deadfall 3 + crush //SEQTBL_BASE + 1894 // 0x20D4
#define deadfall_loop 5 + deadfall //SEQTBL_BASE + 1899 // 0x20D9
#define climbstairs 4 + deadfall_loop //SEQTBL_BASE + 1903 // 0x20DD
#define climbstairs_loop 81 + climbstairs //SEQTBL_BASE + 1984 // 0x212E
#define Vstand 4 + climbstairs_loop //SEQTBL_BASE + 1988 // 0x2132
#define Vraise 4 + Vstand //SEQTBL_BASE + 1992 // 0x2136
#define Vraise_loop 21 + Vraise //SEQTBL_BASE + 2013 // 0x214B
#define Vwalk 4 + Vraise_loop //SEQTBL_BASE + 2017 // 0x214F
#define Vwalk1 2 + Vwalk //SEQTBL_BASE + 2019 // 0x2151
#define Vwalk2 3 + Vwalk1 //SEQTBL_BASE + 2022 // 0x2154
#define Vstop 18 + Vwalk2 //SEQTBL_BASE + 2040 // 0x2166
#define Vexit 7 + Vstop //SEQTBL_BASE + 2047 // 0x216D
#define Pstand 40 + Vexit //SEQTBL_BASE + 2087 // 0x2195
#define Palert 4 + Pstand //SEQTBL_BASE + 2091 // 0x2199
#define Pstepback 15 + Palert //SEQTBL_BASE + 2106 // 0x21A8
#define Pstepback_loop 16 + Pstepback //SEQTBL_BASE + 2122 // 0x21B8
#define Plie 4 + Pstepback_loop //SEQTBL_BASE + 2126 // 0x21BC
#define Pwaiting 4 + Plie //SEQTBL_BASE + 2130 // 0x21C0
#define Pembrace 4 + Pwaiting //SEQTBL_BASE + 2134 // 0x21C4
#define Pembrace_loop 30 + Pembrace //SEQTBL_BASE + 2164 // 0x21E2
#define Pstroke 4 + Pembrace_loop //SEQTBL_BASE + 2168 // 0x21E6
#define Prise 4 + Pstroke //SEQTBL_BASE + 2172 // 0x21EA
#define Prise_loop 14 + Prise //SEQTBL_BASE + 2186 // 0x21F8
#define Pcrouch 4 + Prise_loop //SEQTBL_BASE + 2190 // 0x21FC
#define Pcrouch_loop 64 + Pcrouch //SEQTBL_BASE + 2254 // 0x223C
#define Pslump 4 + Pcrouch_loop //SEQTBL_BASE + 2258 // 0x2240
#define Pslump_loop 1 + Pslump //SEQTBL_BASE + 2259 // 0x2241
#define Mscurry 4 + Pslump_loop //SEQTBL_BASE + 2263 // 0x2245
#define Mscurry1 2 + Mscurry //SEQTBL_BASE + 2265 // 0x2247
#define Mstop 12 + Mscurry1 //SEQTBL_BASE + 2277 // 0x2253
#define Mraise 4 + Mstop //SEQTBL_BASE + 2281 // 0x2257
#define Mleave 4 + Mraise //SEQTBL_BASE + 2285 // 0x225B
#define Mclimb 19 + Mleave //SEQTBL_BASE + 2304 // 0x226E
#define Mclimb_loop 2 + Mclimb //SEQTBL_BASE + 2306 // 0x2270
#ifdef USE_TELEPORTS
#define teleport 4 + Mclimb_loop
#define teleport_loop 41 + teleport
#endif
// TODO: What are we going to do if we add yet another sequence, and we want to allow compiling with that sequence but without teleports?
const word seqtbl_offsets[] = {
0x0000, startrun, stand, standjump,
runjump, turn, runturn, stepfall,
jumphangMed, hang, climbup, hangdrop,
freefall, runstop, jumpup, fallhang,
jumpbackhang, softland, jumpfall, stepfall2,
medland, rjumpfall, hardland, hangfall,
jumphangLong, hangstraight, rdiveroll, sdiveroll,
highjump, step1, step2, step3,
step4, step5, step6, step7,
step8, step9, step10, step11,
step12, step13, step14, turnrun,
testfoot, bumpfall, hardbump, bump,
superhijump, standup, stoop, impale,
crush, deadfall, halve, engarde,
advance, retreat, strike, flee,
turnengarde, striketoblock, readyblock, landengarde,
bumpengfwd, bumpengback, blocktostrike, strikeadv,
climbdown, blockedstrike, climbstairs, dropdead,
stepback, climbfail, stabbed, faststrike,
strikeret, alertstand, drinkpotion, crawl,
alertturn, fightfall, efightfall, efightfallfwd,
running, stabkill, fastadvance, goalertstand,
arise, turndraw, guardengarde, pickupsword,
resheathe, fastsheathe, Pstand, Vstand,
Vwalk, Vstop, Palert, Pstepback,
Vexit, Mclimb, Vraise, Plie,
patchfall, Mscurry, Mstop, Mleave,
Pembrace, Pwaiting, Pstroke, Prise,
Pcrouch, Pslump, Mraise,
#ifdef USE_TELEPORTS
teleport,
#endif
};
// data:196E
byte seqtbl[] = {
LABEL(running) // running
act(actions_1_run_jump), jmp(runcyc1), // goto running: frame 7
LABEL(startrun) // startrun
act(actions_1_run_jump), LABEL(runstt1) frame_1_start_run,
frame_2_start_run, frame_3_start_run, LABEL(runstt4) frame_4_start_run,
dx(8), frame_5_start_run,
dx(3), frame_6_start_run,
dx(3), LABEL(runcyc1) frame_7_run,
dx(5), frame_8_run,
dx(1), snd(SND_FOOTSTEP), frame_9_run,
dx(2), frame_10_run,
dx(4), frame_11_run,
dx(5), frame_12_run,
dx(2), LABEL(runcyc7) snd(SND_FOOTSTEP), frame_13_run,
dx(3), frame_14_run,
dx(4), jmp(runcyc1),
LABEL(stand) // stand
act(actions_0_stand), frame_15_stand,
jmp(stand), // goto "stand"
LABEL(goalertstand) // alert stand
act(actions_1_run_jump), LABEL(alertstand) frame_166_stand_inactive,
jmp(alertstand), // goto "alertstand"
LABEL(arise) // arise (skeleton)
act(actions_5_bumped), dx(10), frame_177_spiked,
frame_177_spiked,
dx(-7), dy(-2), frame_178_chomped,
dx(5), dy(2), frame_166_stand_inactive,
dx(-1), jmp(ready), // goto "ready"
// guard engarde
LABEL(guardengarde)
jmp(ready), // goto "ready"
// engarde
LABEL(engarde)
act(actions_1_run_jump),
dx(2), frame_207_draw_1,
frame_208_draw_2,
dx(2), frame_209_draw_3,
dx(2), frame_210_draw_4,
dx(3), LABEL(ready) act(actions_1_run_jump), snd(SND_SILENT), frame_158_stand_with_sword,
frame_170_stand_with_sword,
LABEL(ready_loop) frame_171_stand_with_sword,
jmp(ready_loop), // goto ":loop"
LABEL(stabbed)// stabbed
act(actions_5_bumped), set_fall(-1, 0), frame_172_jumpfall_2,
dx(-1), dy(1), frame_173_jumpfall_3,
dx(-1), frame_174_jumpfall_4,
dx(-1), dy(2), // frame 175 is commented out in the Apple II source
dx(-2), dy(1),
dx(-5), dy(-4),
jmp(guy8), // goto "guy8"
// strike - advance
LABEL(strikeadv)
act(actions_1_run_jump), set_fall(1, 0), frame_155_guy_7,
dx(2), frame_165_walk_with_sword,
dx(-2), jmp(ready), // goto "ready"
LABEL(strikeret)// strike - retreat
act(actions_1_run_jump), set_fall(-1, 0), frame_155_guy_7,
frame_156_guy_8,
frame_157_walk_with_sword,
frame_158_stand_with_sword,
jmp(retreat), // goto "retreat"
LABEL(advance) // advance
act(actions_1_run_jump), set_fall(1, 0),
dx(2), frame_163_fighting,
dx(4), frame_164_fighting,
frame_165_walk_with_sword,
jmp(ready), // goto "ready"
LABEL(fastadvance) // fast advance
act(actions_1_run_jump), set_fall(1, 0), dx(6), frame_164_fighting,
frame_165_walk_with_sword,
jmp(ready), // goto "ready"
LABEL(retreat) // retreat
act(actions_1_run_jump), set_fall(-1, 0), dx(-3), frame_160_fighting,
dx(-2), frame_157_walk_with_sword,
jmp(ready), // goto "ready"
LABEL(strike) // strike
act(actions_1_run_jump), set_fall(-1, 0), frame_168_back,
LABEL(faststrike) act(actions_1_run_jump), frame_151_strike_1,
LABEL(guy4) act(actions_1_run_jump), frame_152_strike_2,
frame_153_strike_3,
frame_154_poking,
LABEL(guy7) act(actions_5_bumped), frame_155_guy_7,
LABEL(guy8) act(actions_1_run_jump), frame_156_guy_8,
frame_157_walk_with_sword,
jmp(ready), // goto "ready"
LABEL(blockedstrike)// blocked strike
act(actions_1_run_jump), frame_167_blocked,
jmp(guy7), // goto "guy7"
// block to strike
LABEL(blocktostrike)// "blocktostrike"
frame_162_block_to_strike,
jmp(guy4), // goto "guy4"
LABEL(readyblock) // ready block
frame_169_begin_block,
LABEL(blocking) frame_150_parry,
jmp(ready), // goto "ready"
LABEL(striketoblock) // strike to block
frame_159_fighting,
frame_160_fighting,
jmp(blocking), // goto "blocking"
LABEL(landengarde) // land en garde
act(actions_1_run_jump), SEQ_KNOCK_DOWN, jmp(ready), // goto "ready"
LABEL(bumpengfwd) // bump en garde (forward)
act(actions_5_bumped), dx(-8), jmp(ready), // goto "ready"
LABEL(bumpengback) // bump en garde (back)
act(actions_5_bumped), frame_160_fighting,
frame_157_walk_with_sword,
jmp(ready), // goto "ready"
LABEL(flee) // flee
act(actions_7_turn), dx(-8), jmp(turn), // goto "turn"
LABEL(turnengarde) // turn en garde
act(actions_5_bumped), SEQ_FLIP, dx(5), jmp(retreat), // goto "retreat"
LABEL(alertturn) // alert turn (for enemies)
act(actions_5_bumped), SEQ_FLIP, dx(18), jmp(goalertstand), // goto "goalertstand"
LABEL(standjump) // standing jump
act(actions_1_run_jump), frame_16_standing_jump_1,
frame_17_standing_jump_2,
dx(2), frame_18_standing_jump_3,
dx(2), frame_19_standing_jump_4,
dx(2), frame_20_standing_jump_5,
dx(2), frame_21_standing_jump_6,
dx(2), frame_22_standing_jump_7,
dx(7), frame_23_standing_jump_8,
dx(9), frame_24_standing_jump_9,
dx(5), dy(-6), /* "sjland" */ LABEL(sjland) frame_25_standing_jump_10,
dx(1), dy(6), frame_26_standing_jump_11,
dx(4), SEQ_KNOCK_DOWN, snd(SND_FOOTSTEP), frame_27_standing_jump_12,
dx(-3), frame_28_standing_jump_13,
dx(5), frame_29_standing_jump_14,
snd(SND_FOOTSTEP), frame_30_standing_jump_15,
frame_31_standing_jump_16,
frame_32_standing_jump_17,
frame_33_standing_jump_18,
dx(1), jmp(stand), // goto "stand"
LABEL(runjump) // running jump
act(actions_1_run_jump), snd(SND_FOOTSTEP), frame_34_start_run_jump_1,
dx(5), frame_35_start_run_jump_2,
dx(6), frame_36_start_run_jump_3,
dx(3), frame_37_start_run_jump_4,
dx(5), snd(SND_FOOTSTEP), frame_38_start_run_jump_5,
dx(7), frame_39_start_run_jump_6,
dx(12), dy(-3), frame_40_running_jump_1,
dx(8), dy(-9), frame_41_running_jump_2,
dx(8), dy(-2), frame_42_running_jump_3,
dx(4), dy(11), frame_43_running_jump_4,
dx(4), dy(3), /* "rjlandrun" */ LABEL(rjlandrun) frame_44_running_jump_5,
dx(5), SEQ_KNOCK_DOWN, snd(SND_FOOTSTEP), jmp(runcyc1), // goto "runcyc1"
LABEL(rdiveroll) // run dive roll
act(actions_1_run_jump), dx(1), frame_107_fall_land_1,
dx(2), dx(2), frame_108_fall_land_2,
dx(2), frame_109_crouch,
dx(2), frame_109_crouch,
dx(2), /* ":crouch" */ LABEL(rdiveroll_crouch) frame_109_crouch,
jmp(rdiveroll_crouch), // goto ":crouch"
LABEL(sdiveroll)
0x00, // stand dive roll; not implemented
LABEL(crawl) // crawl
act(actions_1_run_jump), dx(1), frame_110_stand_up_from_crouch_1,
frame_111_stand_up_from_crouch_2,
dx(2), frame_112_stand_up_from_crouch_3,
dx(2), frame_108_fall_land_2,
dx(2), /* ":crouch" */ LABEL(crawl_crouch) frame_109_crouch,
jmp(crawl_crouch), // goto ":crouch"
LABEL(turndraw) // turn draw
act(actions_7_turn), SEQ_FLIP, dx(6), frame_45_turn,
dx(1), frame_46_turn,
jmp(engarde), // goto "engarde"
LABEL(turn) // turn
act(actions_7_turn), SEQ_FLIP, dx(6), frame_45_turn,
dx(1), frame_46_turn,
dx(2), frame_47_turn,
dx(-1), /* "finishturn" */ frame_48_turn,
dx(1), frame_49_turn,
dx(-2), frame_50_turn,
frame_51_turn,
frame_52_turn,
jmp(stand), // goto "stand"
LABEL(turnrun) // turnrun (from frame 48)
act(actions_1_run_jump), dx(-1), jmp(runstt1), // goto "runstt1"
LABEL(runturn) // runturn
act(actions_1_run_jump), dx(1), frame_53_runturn,
dx(1), snd(SND_FOOTSTEP), frame_54_runturn,
dx(8) ,frame_55_runturn,
snd(SND_FOOTSTEP), frame_56_runturn,
dx(7), frame_57_runturn,
dx(3), frame_58_runturn,
dx(1), frame_59_runturn,
frame_60_runturn,
dx(2), frame_61_runturn,
dx(-1), frame_62_runturn,
frame_63_runturn,
frame_64_runturn,
dx(-1), frame_65_runturn,
dx(-14), SEQ_FLIP, jmp(runcyc7), // goto "runcyc7"
LABEL(fightfall) // fightfall (backward)
act(actions_3_in_midair), dy(-1), frame_102_start_fall_1,
dx(-2), dy(6), frame_103_start_fall_2,
dx(-2), dy(9), frame_104_start_fall_3,
dx(-1), dy(12), frame_105_start_fall_4,
dx(-3), set_fall(0, 15), jmp(freefall), // goto "freefall"
LABEL(efightfall) // enemy fight fall
act(actions_3_in_midair), dy(-1), dx(-2), frame_102_start_fall_1,
dx(-3), dy(6), frame_103_start_fall_2,
dx(-3), dy(9), frame_104_start_fall_3,
dx(-2), dy(12), frame_105_start_fall_4,
dx(-3), set_fall(0, 15), jmp(freefall), // goto "freefall"
LABEL(efightfallfwd)// enemy fight fall forward
act(actions_3_in_midair), dx(1), dy(-1), frame_102_start_fall_1,
dx(2), dy(6), frame_103_start_fall_2,
dx(-1), dy(9), frame_104_start_fall_3,
dy(12), frame_105_start_fall_4,
dx(-2), set_fall(1, 15), jmp(freefall), // goto "freefall"
LABEL(stepfall) // stepfall
act(actions_3_in_midair), dx(1), dy(3), jmp_if_feather(stepfloat), // goto "stepfloat"
/* "fall1" */ LABEL(fall1) frame_102_start_fall_1,
dx(2), dy(6), frame_103_start_fall_2,
dx(-1), dy(9), frame_104_start_fall_3,
dy(12), frame_105_start_fall_4,
dx(-2), set_fall(1, 15), jmp(freefall), // goto "freefall"
LABEL(patchfall) // patchfall
dx(-1), dy(-3), jmp(fall1), // goto "fall1"
LABEL(stepfall2) // stepfall2 (from frame 12)
dx(1), jmp(stepfall), // goto "stepfall"
LABEL(stepfloat) // stepfloat
frame_102_start_fall_1,
dx(2), dy(3), frame_103_start_fall_2,
dx(-1), dy(4), frame_104_start_fall_3,
dy(5), frame_105_start_fall_4,
dx(-2), set_fall(1, 6), jmp(freefall), // goto "freefall"
LABEL(jumpfall) // jump fall (from standing jump)
act(actions_3_in_midair), dx(1), dy(3), frame_102_start_fall_1,
dx(2), dy(6), frame_103_start_fall_2,
dx(1), dy(9), frame_104_start_fall_3,
dx(2), dy(12), frame_105_start_fall_4,
set_fall(2, 15), jmp(freefall), // goto "freefall"
LABEL(rjumpfall) // running jump fall
act(actions_3_in_midair), dx(1), dy(3), frame_102_start_fall_1,
dx(3), dy(6), frame_103_start_fall_2,
dx(2), dy(9), frame_104_start_fall_3,
dx(3), dy(12), frame_105_start_fall_4,
set_fall(3, 15), jmp(freefall), // goto "freefall"
LABEL(jumphangMed) // jumphang (medium: DX = 0)
act(actions_1_run_jump), frame_67_start_jump_up_1,
frame_68_start_jump_up_2, frame_69_start_jump_up_3, frame_70_jumphang, frame_71_jumphang,
frame_72_jumphang, frame_73_jumphang, frame_74_jumphang, frame_75_jumphang, frame_76_jumphang,
frame_77_jumphang,
act(actions_2_hang_climb), frame_78_jumphang, frame_79_jumphang, frame_80_jumphang,
jmp(hang), // goto "hang"
LABEL(jumphangLong)// jumphang (long: DX = 4)
act(actions_1_run_jump), frame_67_start_jump_up_1,
frame_68_start_jump_up_2, frame_69_start_jump_up_3, frame_70_jumphang, frame_71_jumphang,
frame_72_jumphang, frame_73_jumphang, frame_74_jumphang, frame_75_jumphang, frame_76_jumphang,
frame_77_jumphang,
act(actions_2_hang_climb), dx(1), frame_78_jumphang,
dx(2), frame_79_jumphang,
dx(1), frame_80_jumphang,
jmp(hang), // goto "hang"
LABEL(jumpbackhang) // jumpbackhang
act(actions_1_run_jump), frame_67_start_jump_up_1,
frame_68_start_jump_up_2, frame_69_start_jump_up_3, frame_70_jumphang, frame_71_jumphang,
frame_72_jumphang, frame_73_jumphang, frame_74_jumphang, frame_75_jumphang, frame_76_jumphang,
dx(-1), frame_77_jumphang,
act(actions_2_hang_climb), dx(-2), frame_78_jumphang,
dx(-1), frame_79_jumphang,
dx(-1), frame_80_jumphang,
jmp(hang), // goto "hang"
LABEL(hang) // hang
act(actions_2_hang_climb), frame_91_hanging_5,
/* "hang1" */ LABEL(hang1) frame_90_hanging_4, frame_89_hanging_3, frame_88_hanging_2,
frame_87_hanging_1, frame_87_hanging_1, frame_87_hanging_1, frame_88_hanging_2,
frame_89_hanging_3, frame_90_hanging_4, frame_91_hanging_5, frame_92_hanging_6,
frame_93_hanging_7, frame_94_hanging_8, frame_95_hanging_9, frame_96_hanging_10,
frame_97_hanging_11, frame_98_hanging_12, frame_99_hanging_13, frame_97_hanging_11,
frame_96_hanging_10, frame_95_hanging_9, frame_94_hanging_8, frame_93_hanging_7,
frame_92_hanging_6, frame_91_hanging_5, frame_90_hanging_4, frame_89_hanging_3,
frame_88_hanging_2, frame_87_hanging_1, frame_88_hanging_2, frame_89_hanging_3,
frame_90_hanging_4, frame_91_hanging_5, frame_92_hanging_6, frame_93_hanging_7,
frame_94_hanging_8, frame_95_hanging_9, frame_96_hanging_10, frame_95_hanging_9,
frame_94_hanging_8, frame_93_hanging_7, frame_92_hanging_6,
jmp(hangdrop), // goto "hangdrop"
LABEL(hangstraight) // hangstraight
act(actions_6_hang_straight), frame_92_hanging_6, // Apple II source has a bump sound here
frame_93_hanging_7, frame_93_hanging_7, frame_92_hanging_6, frame_92_hanging_6,
/* ":loop" */ LABEL(hangstraight_loop) frame_91_hanging_5,
jmp(hangstraight_loop), // goto ":loop"
LABEL(climbfail) // climbfail
frame_135_climbing_1, frame_136_climbing_2, frame_137_climbing_3, frame_137_climbing_3,
frame_138_climbing_4, frame_138_climbing_4, frame_138_climbing_4, frame_138_climbing_4,
frame_137_climbing_3, frame_136_climbing_2, frame_135_climbing_1,
dx(-7), jmp(hangdrop), // goto "hangdrop"
LABEL(climbdown) // climbdown
act(actions_1_run_jump), frame_148_climbing_14,
frame_145_climbing_11, frame_144_climbing_10, frame_143_climbing_9, frame_142_climbing_8,
frame_141_climbing_7,
dx(-5), dy(63), SEQ_DOWN, act(actions_3_in_midair), frame_140_climbing_6,
frame_138_climbing_4, frame_136_climbing_2,
frame_91_hanging_5,
act(actions_2_hang_climb), jmp(hang1), // goto "hang1"
LABEL(climbup) // climbup
act(actions_1_run_jump), frame_135_climbing_1,
frame_136_climbing_2, frame_137_climbing_3, frame_138_climbing_4,
frame_139_climbing_5, frame_140_climbing_6,
dx(5), dy(-63), SEQ_UP, frame_141_climbing_7,
frame_142_climbing_8, frame_143_climbing_9, frame_144_climbing_10, frame_145_climbing_11,
frame_146_climbing_12, frame_147_climbing_13, frame_148_climbing_14,
act(actions_5_bumped), // to clear flags
frame_149_climbing_15,
act(actions_1_run_jump), frame_118_stand_up_from_crouch_9, frame_119_stand_up_from_crouch_10,
dx(1), jmp(stand), // goto "stand"
LABEL(hangdrop) // hangdrop
frame_81_hangdrop_1, frame_82_hangdrop_2,
act(actions_5_bumped), frame_83_hangdrop_3,
act(actions_1_run_jump), SEQ_KNOCK_DOWN, snd(SND_SILENT),
frame_84_hangdrop_4, frame_85_hangdrop_5,
dx(3), jmp(stand), // goto "stand"
LABEL(hangfall) // hangfall
act(actions_3_in_midair), frame_81_hangdrop_1,
dy(6), frame_81_hangdrop_1,
dy(9), frame_81_hangdrop_1,
dy(12), dx(2), set_fall(0, 12), jmp(freefall), // goto "freefall"
LABEL(freefall) // freefall
act(actions_4_in_freefall), /* ":loop" */ LABEL(freefall_loop) frame_106_fall,
jmp(freefall_loop), // goto :loop
LABEL(runstop) // runstop
act(actions_1_run_jump), frame_53_runturn,
dx(2), snd(SND_FOOTSTEP), frame_54_runturn,
dx(7), frame_55_runturn,
snd(SND_FOOTSTEP), frame_56_runturn,
dx(2), frame_49_turn,
dx(-2), frame_50_turn,
frame_51_turn, frame_52_turn,
jmp(stand), // goto "stand"
LABEL(jumpup) // jump up (and touch ceiling)
act(actions_1_run_jump), frame_67_start_jump_up_1,
frame_68_start_jump_up_2, frame_69_start_jump_up_3, frame_70_jumphang, frame_71_jumphang,
frame_72_jumphang, frame_73_jumphang, frame_74_jumphang, frame_75_jumphang,
frame_76_jumphang, frame_77_jumphang, frame_78_jumphang,
act(actions_0_stand), SEQ_KNOCK_UP, frame_79_jumphang,
jmp(hangdrop), // goto "hangdrop"
LABEL(highjump) // highjump (no ceiling above)
act(actions_1_run_jump), frame_67_start_jump_up_1,
frame_68_start_jump_up_2, frame_69_start_jump_up_3, frame_70_jumphang, frame_71_jumphang,
frame_72_jumphang, frame_73_jumphang, frame_74_jumphang, frame_75_jumphang,
frame_76_jumphang, frame_77_jumphang, frame_78_jumphang, frame_79_jumphang,
dy(-4), frame_79_jumphang,
dy(-2), frame_79_jumphang,
frame_79_jumphang,
dy(2), frame_79_jumphang,
dy(4), jmp(hangdrop), // goto "hangdrop"
LABEL(superhijump) // superhijump (when weightless) - this sequence is not being used in PoP1
frame_67_start_jump_up_1, frame_68_start_jump_up_2, frame_69_start_jump_up_3, frame_70_jumphang,
frame_71_jumphang, frame_72_jumphang, frame_73_jumphang, frame_74_jumphang,
frame_75_jumphang, frame_76_jumphang,
dy(-1), frame_77_jumphang,
dy(-3), frame_78_jumphang,
dy(-4), frame_79_jumphang,
dy(-10), frame_79_jumphang,
#ifdef USE_SUPER_HIGH_JUMP // prevents kid from jumping too high into the ceiling
dy(-8), frame_79_jumphang,
dy(-6), frame_79_jumphang,
dy(-5), frame_79_jumphang,
dy(-4), frame_79_jumphang,
dy(-4), frame_79_jumphang,
#else
dy(-9), frame_79_jumphang,
dy(-8), frame_79_jumphang,
dy(-7), frame_79_jumphang,
dy(-6), frame_79_jumphang,
dy(-5), frame_79_jumphang,
#endif
dy(-4), frame_79_jumphang,
dy(-3), frame_79_jumphang,
dy(-2), frame_79_jumphang,
dy(-2), frame_79_jumphang,
dy(-1), frame_79_jumphang,
dy(-1), frame_79_jumphang,
dy(-1), frame_79_jumphang,
frame_79_jumphang, frame_79_jumphang, frame_79_jumphang,
dy(1), frame_79_jumphang,
dy(1), frame_79_jumphang,
dy(2), frame_79_jumphang,
dy(2), frame_79_jumphang,
dy(3), frame_79_jumphang,
dy(4), frame_79_jumphang,
dy(5), frame_79_jumphang,
dy(6), frame_79_jumphang,
set_fall(0, 6), jmp(freefall), // goto "freefall"
LABEL(fallhang) // fall hang
act(actions_3_in_midair), frame_80_jumphang,
jmp(hang), // goto "hang"
LABEL(bump) // bump
act(actions_5_bumped), dx(-4), frame_50_turn,
frame_51_turn, frame_52_turn,
jmp(stand), // goto "stand"
LABEL(bumpfall) // bumpfall
/* action is patched to 3_in_midair by FIX_WALLBUMP_TRIGGERS_TILE_BELOW */
act(actions_5_bumped), dx(1), dy(3), jmp_if_feather(bumpfloat),
frame_102_start_fall_1,
dx(2), dy(6), frame_103_start_fall_2,
dx(-1), dy(9), frame_104_start_fall_3,
dy(12), frame_105_start_fall_4,
dx(-2), set_fall(0, 15), jmp(freefall), // goto "freefall"
LABEL(bumpfloat) // bumpfloat
frame_102_start_fall_1,
dx(2), dy(3), frame_103_start_fall_2,
dx(-1), dy(4), frame_104_start_fall_3,
dy(5), frame_105_start_fall_4,
dx(-2), set_fall(0, 6), jmp(freefall), // goto "freefall"
LABEL(hardbump) // hard bump
act(actions_5_bumped), dx(-1), dy(-4), frame_102_start_fall_1,
dx(-1), dy(3), dx(-3), dy(1), SEQ_KNOCK_DOWN,
dx(1), snd(SND_FOOTSTEP), frame_107_fall_land_1,
dx(2), frame_108_fall_land_2,
snd(SND_FOOTSTEP), frame_109_crouch,
jmp(standup), // goto "standup"
LABEL(testfoot) // test foot
frame_121_stepping_1,
dx(1), frame_122_stepping_2,
frame_123_stepping_3,
dx(2), frame_124_stepping_4,
dx(4), frame_125_stepping_5,
dx(3), frame_126_stepping_6,
dx(-4), frame_86_test_foot,
snd(SND_FOOTSTEP), SEQ_KNOCK_DOWN, dx(-4), frame_116_stand_up_from_crouch_7,
dx(-2), frame_117_stand_up_from_crouch_8,
frame_118_stand_up_from_crouch_9,
frame_119_stand_up_from_crouch_10,
jmp(stand), // goto "stand"
LABEL(stepback) // step back
dx(-5), jmp(stand), // goto "stand"
LABEL(step14) // step forward 14 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(3), frame_124_stepping_4,
dx(4), frame_125_stepping_5,
dx(3), frame_126_stepping_6,
dx(-1), dx(3), frame_127_stepping_7,
frame_128_stepping_8, frame_129_stepping_9, frame_130_stepping_10,
frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step13) // step forward 13 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(3), frame_124_stepping_4,
dx(4), frame_125_stepping_5,
dx(3), frame_126_stepping_6,
dx(-1), dx(2), frame_127_stepping_7,
frame_128_stepping_8, frame_129_stepping_9, frame_130_stepping_10,
frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step12) // step forward 12 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(3), frame_124_stepping_4,
dx(4), frame_125_stepping_5,
dx(3), frame_126_stepping_6,
dx(-1), dx(1), frame_127_stepping_7,
frame_128_stepping_8, frame_129_stepping_9, frame_130_stepping_10,
frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step11) // step forward 11 pixels (normal step)
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(3), frame_124_stepping_4,
dx(4), frame_125_stepping_5,
dx(3), frame_126_stepping_6,
dx(-1), frame_127_stepping_7,
frame_128_stepping_8, frame_129_stepping_9, frame_130_stepping_10,
frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step10) // step forward 10 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), /* "step10a "*/ LABEL(step10a) frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(3), frame_124_stepping_4,
dx(4), frame_125_stepping_5,
dx(3), frame_126_stepping_6,
dx(-2), frame_128_stepping_8,
frame_129_stepping_9, frame_130_stepping_10, frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step9) // step forward 9 pixels
act(actions_1_run_jump), frame_121_stepping_1,
jmp(step10a), // goto "step10a"
LABEL(step8) // step forward 8 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(3), frame_124_stepping_4,
dx(4), frame_125_stepping_5,
dx(-1), frame_127_stepping_7,
frame_128_stepping_8, frame_129_stepping_9, frame_130_stepping_10, frame_131_stepping_11,
frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step7) // step forward 7 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(3), frame_124_stepping_4,
dx(2), frame_129_stepping_9,
frame_130_stepping_10, frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step6) // step forward 6 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(2), frame_124_stepping_4,
dx(2), frame_129_stepping_9,
frame_130_stepping_10, frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step5) // step forward 5 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(2), frame_124_stepping_4,
dx(1), frame_129_stepping_9,
frame_130_stepping_10, frame_131_stepping_11, frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step4) // step forward 4 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(2), frame_131_stepping_11,
frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step3) // step forward 3 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_123_stepping_3,
dx(1), frame_131_stepping_11,
frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step2) // step forward 2 pixels
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_122_stepping_2,
dx(1), frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(step1) // step forward 1 pixel
act(actions_1_run_jump), frame_121_stepping_1,
dx(1), frame_132_stepping_12,
jmp(stand), // goto "stand"
LABEL(stoop) // stoop
act(actions_1_run_jump), dx(1), frame_107_fall_land_1,
dx(2), frame_108_fall_land_2,
/* ":crouch" */ LABEL(stoop_crouch) frame_109_crouch,
jmp(stoop_crouch), // goto ":crouch
LABEL(standup) // stand up
act(actions_5_bumped), dx(1), frame_110_stand_up_from_crouch_1,
frame_111_stand_up_from_crouch_2,
dx(2), frame_112_stand_up_from_crouch_3,
frame_113_stand_up_from_crouch_4,
dx(1 /*patched to 0 by FIX_STAND_ON_THIN_AIR*/), frame_114_stand_up_from_crouch_5,
frame_115_stand_up_from_crouch_6, frame_116_stand_up_from_crouch_7,
dx(-4 /*patched to -3 by FIX_STAND_ON_THIN_AIR*/), frame_117_stand_up_from_crouch_8,
frame_118_stand_up_from_crouch_9, frame_119_stand_up_from_crouch_10,
jmp(stand), // goto "stand"
LABEL(pickupsword) // pick up sword
act(actions_1_run_jump), SEQ_GET_ITEM, 1, frame_229_found_sword,
frame_229_found_sword, frame_229_found_sword, frame_229_found_sword, frame_229_found_sword,
frame_229_found_sword, frame_230_sheathe, frame_231_sheathe, frame_232_sheathe,
jmp(resheathe), // goto "resheathe"
LABEL(resheathe) // resheathe
act(actions_1_run_jump), dx(-5), frame_233_sheathe,
frame_234_sheathe, frame_235_sheathe, frame_236_sheathe, frame_237_sheathe,
frame_238_sheathe, frame_239_sheathe, frame_240_sheathe, frame_133_sheathe,
frame_133_sheathe, frame_134_sheathe, frame_134_sheathe, frame_134_sheathe,
frame_48_turn,
dx(1), frame_49_turn,
dx(-2), act(actions_5_bumped), frame_50_turn,
act(actions_1_run_jump), frame_51_turn,
frame_52_turn,
jmp(stand), // goto "stand"
LABEL(fastsheathe) // fast sheathe
act(actions_1_run_jump), dx(-5), frame_234_sheathe,
frame_236_sheathe, frame_238_sheathe, frame_240_sheathe, frame_134_sheathe,
dx(-1), jmp(stand), // goto "stand"
LABEL(drinkpotion) // drink potion
act(actions_1_run_jump), dx(4), frame_191_drink,
frame_192_drink, frame_193_drink, frame_194_drink, frame_195_drink,
frame_196_drink, frame_197_drink, snd(SND_DRINK),
frame_198_drink, frame_199_drink, frame_200_drink, frame_201_drink,
frame_202_drink, frame_203_drink, frame_204_drink, frame_205_drink,
frame_205_drink, frame_205_drink,
SEQ_GET_ITEM, 1, frame_205_drink,
frame_205_drink, frame_201_drink, frame_198_drink,
dx(-4), jmp(stand), // goto "stand"
LABEL(softland)// soft land
act(actions_5_bumped), SEQ_KNOCK_DOWN, dx(1), frame_107_fall_land_1,
dx(2), frame_108_fall_land_2,
act(actions_1_run_jump), /* ":crouch" */ LABEL(softland_crouch) frame_109_crouch,
jmp(softland_crouch), // goto ":crouch"
LABEL(landrun) // land run
act(actions_1_run_jump), dy(-2), dx(1), frame_107_fall_land_1,
dx(2), frame_108_fall_land_2,
frame_109_crouch,
dx(1), frame_110_stand_up_from_crouch_1,
frame_111_stand_up_from_crouch_2,
dx(2), frame_112_stand_up_from_crouch_3,
frame_113_stand_up_from_crouch_4,
dx(1), dy(1), frame_114_stand_up_from_crouch_5,
dy(1), frame_115_stand_up_from_crouch_6,
dx(-2), jmp(runstt4), // goto "runstt4"
LABEL(medland) // medium land (1.5 - 2 stories)
act(actions_5_bumped), SEQ_KNOCK_DOWN, dy(-2), dx(1), dx(2), frame_108_fall_land_2,
frame_109_crouch, frame_109_crouch, frame_109_crouch, frame_109_crouch,
frame_109_crouch, frame_109_crouch, frame_109_crouch, frame_109_crouch,
frame_109_crouch, frame_109_crouch, frame_109_crouch, frame_109_crouch,
frame_109_crouch, frame_109_crouch, frame_109_crouch, frame_109_crouch,
frame_109_crouch, frame_109_crouch, frame_109_crouch, frame_109_crouch,
frame_109_crouch, frame_109_crouch, frame_109_crouch, frame_109_crouch,
frame_109_crouch, frame_109_crouch, frame_109_crouch, frame_109_crouch,
frame_109_crouch,
dx(1), frame_110_stand_up_from_crouch_1,
frame_110_stand_up_from_crouch_1, frame_110_stand_up_from_crouch_1, frame_111_stand_up_from_crouch_2,
dx(2), frame_112_stand_up_from_crouch_3,
frame_113_stand_up_from_crouch_4,
dx(1), dy(1), frame_114_stand_up_from_crouch_5,
dy(1), frame_115_stand_up_from_crouch_6,
frame_116_stand_up_from_crouch_7,
dx(-4), frame_117_stand_up_from_crouch_8,
frame_118_stand_up_from_crouch_9, frame_119_stand_up_from_crouch_10,
jmp(stand), // goto "stand"
LABEL(hardland) // hard land (splat!; >2 stories)
act(actions_5_bumped), SEQ_KNOCK_DOWN, dy(-2), dx(3), frame_185_dead,
SEQ_DIE, /* ":dead" */ LABEL(hardland_dead) frame_185_dead,
jmp(hardland_dead), // goto ":dead"
LABEL(stabkill) // stabkill
act(actions_5_bumped), jmp(dropdead), // goto "dropdead"
LABEL(dropdead) // dropdead
act(actions_1_run_jump), SEQ_DIE, frame_179_collapse_1,
frame_180_collapse_2, frame_181_collapse_3, frame_182_collapse_4,
dx(1), frame_183_collapse_5,
dx(-4), /* ":dead" */ LABEL(dropdead_dead) frame_185_dead,
jmp(dropdead_dead), // goto ":dead"
LABEL(impale) // impale
act(actions_1_run_jump), SEQ_KNOCK_DOWN, dx(4), frame_177_spiked,
SEQ_DIE, /* ":dead" */ LABEL(impale_dead) frame_177_spiked,
jmp(impale_dead), // goto ":dead"
LABEL(halve) // halve
act(actions_1_run_jump), frame_178_chomped,
SEQ_DIE, /* ":dead" */ LABEL(halve_dead) frame_178_chomped,
jmp(halve_dead), // goto ":dead"
LABEL(crush) // crush
jmp(medland), // goto "medland"
LABEL(deadfall) // deadfall
set_fall(0, 0), act(actions_4_in_freefall), /* ":loop"*/ LABEL(deadfall_loop) frame_185_dead,
jmp(deadfall_loop), // goto ":loop"
LABEL(climbstairs) // climb stairs
act(actions_5_bumped),
dx(-5), dy(-1), snd(SND_FOOTSTEP), frame_217_exit_stairs_1,
frame_218_exit_stairs_2, frame_219_exit_stairs_3,
dx(1), frame_220_exit_stairs_4,
dx(-4), dy(-3), snd(SND_FOOTSTEP), frame_221_exit_stairs_5,
dx(-4), dy(-2), frame_222_exit_stairs_6,
dx(-2), dy(-3), frame_223_exit_stairs_7,
dx(-3), dy(-8), snd(SND_LEVEL), snd(SND_FOOTSTEP), frame_224_exit_stairs_8,
dx(-1), dy(-1), frame_225_exit_stairs_9,
dx(-3), dy(-4), frame_226_exit_stairs_10,
dx(-1), dy(-5), snd(SND_FOOTSTEP), frame_227_exit_stairs_11,
dx(-2), dy(-1), frame_228_exit_stairs_12,
frame_0,