-
Notifications
You must be signed in to change notification settings - Fork 19
/
defines.h
1467 lines (1220 loc) · 33 KB
/
defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
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
#ifndef DEFINES_H
#define DEFINES_H
#define FRAMES_PER_SECOND 60
#define RES_W 320
#define RES_H 240
#define UNUSED(x) (void)x
enum e_PLAYERS {
PLAYER_1,
PLAYER_2,
PLAYER_3,
PLAYER_4,
PLAYER_COUNT
};
/*
#if defined(PLAYSTATION2) || defined(DINGUX)
#define DEFAULT_FPS_MAX 30
#else
#define DEFAULT_FPS_MAX 60
#endif
*/
#define DEFAULT_FPS_MAX 60
#define WALK_FRAME_DELAY 150
// ==================== PHYSICS ==================== //
// stages, MAX DEFINED INAI_MAX_STATES AS 20
enum STAGE_LIST {
INTRO_STAGE,
STAGE1,
STAGE2,
STAGE3,
STAGE4,
STAGE5,
STAGE6,
STAGE7,
STAGE8,
CASTLE1_STAGE1,
CASTLE1_STAGE2,
CASTLE1_STAGE3,
CASTLE1_STAGE4,
CASTLE1_STAGE5,
CASTLE1_STAGE6,
CASTLE2_STAGE1,
CASTLE2_STAGE2,
CASTLE2_STAGE3,
CASTLE2_STAGE4,
CASTLE2_STAGE5,
STAGE_COUNT
};
/**
* @brief
*
*/
enum COLlISION_TYPES {
BLOCK_UNBLOCKED,
BLOCK_X,
BLOCK_Y,
BLOCK_XY,
BLOCK_STAIR_X,
BLOCK_STAIR_Y,
BLOCK_WATER,
BLOCK_MOVE_LEFT,
BLOCK_MOVE_RIGHT,
BLOCK_QUICKSAND,
BLOCK_INSIDE_OBJ
};
/**
* @brief
*
*/
enum JUMP_STATES { NO_JUMP, JUMP_UP, JUMP_DOWN };
#define TIME_MOVES 0
enum E_INPUT_TYPES {
INPUT_TYPE_DOUBLE,
INPUT_TYPE_KEYBOARD,
INPUT_TYPE_JOYSTICK
};
/**
* @brief
*
*/
enum E_INPUT_MODES {
INPUT_MODE_DOUBLE, // uses both keyboard and joystick
INPUT_MODE_ANALOG,
INPUT_MODE_DIGITAL
};
enum E_PLATFORM {
PLATFORM_PS2,
PLATFORM_WII,
PLATFORM_PSP,
PLATFORM_LINUX,
PLATFORM_WINDOWS,
PLATFORM_DINGUX,
PLATFORM_PANDORA,
PLATFORM_DREAMCAST,
PLATFORM_RASPBERRY,
PLATFORM_POCKETGO,
PLATFORM_XBOX,
PLATFORM_COUNT
};
/**
* @brief
*
*/
enum INPUT_COMMANDS {
BTN_UP,
BTN_DOWN,
BTN_LEFT,
BTN_RIGHT,
BTN_JUMP,
BTN_ATTACK,
BTN_QUIT,
BTN_START,
BTN_L,
BTN_R,
BTN_DASH,
BTN_SHIELD,
BTN_JUMP_TIMER,
BTN_COUNT
};
enum joystick_input_types {
JOYSTICK_INPUT_TYPE_NONE,
JOYSTICK_INPUT_TYPE_BUTTON,
JOYSTICK_INPUT_TYPE_HAT,
JOYSTICK_INPUT_TYPE_AXIS,
JOYSTICK_INPUT_TYPE_COUNT
};
enum ANIM_DIRECTION {
ANIM_DIRECTION_LEFT,
ANIM_DIRECTION_RIGHT,
ANIM_DIRECTION_UP,
ANIM_DIRECTION_DOWN,
ANIM_DIRECTION_UP_LEFT,
ANIM_DIRECTION_UP_RIGHT,
ANIM_DIRECTION_DOWN_LEFT,
ANIM_DIRECTION_DOWN_RIGHT,
ANIM_DIRECTION_COUNT };
#define CHAR_ANIM_DIRECTION_COUNT 2 // characters use only left/right, not like projectiles
/**
* @brief
*
*/
enum ANIM_TYPE {
ANIM_TYPE_STAND,
ANIM_TYPE_WALK,
ANIM_TYPE_JUMP,
ANIM_TYPE_ATTACK,
ANIM_TYPE_TELEPORT,
ANIM_TYPE_JUMP_ATTACK,
ANIM_TYPE_WALK_ATTACK,
ANIM_TYPE_HIT,
ANIM_TYPE_STAIRS,
ANIM_TYPE_STAIRS_SEMI,
ANIM_TYPE_STAIRS_ATTACK,
ANIM_TYPE_STAIRS_MOVE,
ANIM_TYPE_THROW,
ANIM_TYPE_TURN,
ANIM_TYPE_MOVE_SEMI, // like turn, the start of the movement
ANIM_TYPE_WALK_AIR, // for those that can walk on air
ANIM_TYPE_INTRO, // for bosses
ANIM_TYPE_SPECIAL_ATTACK, // for bosses, charging weapon, etc
ANIM_TYPE_SLIDE,
ANIM_TYPE_SHIELD,
ANIM_TYPE_VERTICAL_TURN,
ANIM_TYPE_ATTACK_THROW,
ANIM_TYPE_ATTACK_DIAGONAL_UP,
ANIM_TYPE_ATTACK_DIAGONAL_DOWN,
ANIM_TYPE_ATTACK_UP,
ANIM_TYPE_ATTACK_DOWN,
ANIM_TYPE_ATTACK_SPECIAL, // (hadouken, shouryuken, etc)
ANIM_TYPE_LOOK_UP,
ANIM_TYPE_GRAB_WALL,
ANIM_TYPE_HIT_SPECIAL,
ANIM_TYPE_GOT_WEAPON,
ANIM_TYPE_HOLDING_HAND,
// placeholders for future use
ANIM_TYPE_EFFECT_FROZE,
ANIM_TYPE_EFFECT_BURN,
ANIM_TYPE_EFFECT_SHOCK,
ANIM_TYPE_PLACEHOLDER3,
ANIM_TYPE_PLACEHOLDER4,
ANIM_TYPE_PLACEHOLDER5,
ANIM_TYPE_PLACEHOLDER6,
ANIM_TYPE_PLACEHOLDER7,
ANIM_TYPE_PLACEHOLDER8,
ANIM_TYPE_PLACEHOLDER9,
ANIM_TYPE_COUNT
};
#define OLD_ANIM_TYPE_COUNT 29
// alguns como attack_trhow e throw; e special attack e attack_special estão repetidos. fica de reserva futura
#define ANIM_FRAMES_COUNT 10 // max number of animation frames for each animation_type
#define MAP_W 200 // this size was determined by looking at common maps from games
#define MAP_H 15
#define FORMAT202_MAP_H 13
#define TILESIZE 16
#define GRAVITY_MAX_SPEED 8
#define GRAVITY_TELEPORT_MAX_SPEED 12
// for pre-loading
/**
* @brief
*
*/
enum STAGE_SELECT_ENUM {
INTRO_SURFACES_STAGE_SELECT_BG,
STAGE_SELECT_COUNT
};
// sound-effect list
enum SFX_LIST {
SFX_NPC_HIT,
SFX_NPC_KILLED,
SFX_PLAYER_HIT,
SFX_PLAYER_SHOT,
SFX_PLAYER_JUMP,
SFX_CURSOR,
SFX_STAGE_SELECTED,
SFX_GOT_ENERGY,
SFX_GOT_ITEM,
SFX_SHOT_REFLECTED,
SFX_DOOR_OPEN,
SFX_GOT_WEAPON,
SFX_TELEPORT,
SFX_IMPLOSION,
SFX_PLAYER_DEATH,
SFX_PLAYER_CHARGED_SHOT,
SFX_CHARGING1,
SFX_CHARGING2,
SFX_BIG_EXPLOSION,
SFX_WATER_ENTER,
SFX_WATER_LEAVE,
SFX_DISAPPEARING_BLOCK,
SFX_SHORYUKEN_GIRL,
SFX_BEAM,
SFX_GOT_ENERGY_BIG,
SFX_TIMED_BOMB_TICK,
SFX_OBJECT_BREAK,
SFX_COUNT // not used as sfx, this is a way to measure size of the enum list
};
/**
* @brief
*
*/
enum TERRAIN_TYPES {
TERRAIN_UNBLOCKED,
TERRAIN_SOLID,
TERRAIN_STAIR,
TERRAIN_DOOR,
TERRAIN_SPIKE,
TERRAIN_WATER,
TERRAIN_ICE,
TERRAIN_MOVE_LEFT,
TERRAIN_MOVE_RIGHT,
TERRAIN_QUICKSAND,
TERRAIN_SCROLL_LOCK,
TERRAIN_CHECKPOINT,
TERRAIN_EASYMODEBLOCK,
TERRAIN_HARDMODEBLOCK,
TERRAIN_TYPES_COUNT
};
#define CURSOR_SPACING 12
#define NPC_FRAME_NUMBER 50
/**
* @brief
*
*/
enum ITEM_ICONS_ENUM {
ENERGY_TANK,
P1_1LIFE,
P2_1LIFE,
WEAPONS_TANK
};
enum WEAPON_ICONS_ENUM {
WEAPON_DEFAULT,
WEAPON_APEBOT,
WEAPON_DAISIEBOT,
WEAPON_DYNAMITEBOT,
WEAPON_MUMMYBOT,
WEAPON_SPIKEBOT,
WEAPON_TECHNOBOT,
WEAPON_MAGEBOT,
WEAPON_SEAHORSEBOT,
WEAPON_ITEM_COIL,
WEAPON_ITEM_JET,
WEAPON_ITEM_ETANK,
WEAPON_ITEM_WTANK,
WEAPON_ITEM_STANK,
WEAPON_COUNT
};
/**
* @brief
*
*/
enum transition_types {
NO_TRANSITION,
TRANSITION_TOP_TO_BOTTOM,
TRANSITION_BOTTOM_TO_TOP,
TRANSITION_LEFT_TO_RIGHT,
TRANSITION_RIGHT_TO_LEFT
};
enum enum_npc_behavior {
NPC_BEHAVIOR_NONE,
NPC_BEHAVIOR_PLAYER_FRIEND,
NPC_BEHAVIOR_COUNT
};
/**
* @brief
*
*/
enum OBJECT_TYPE {
OBJ_MOVING_PLATFORM_UPDOWN,
OBJ_MOVING_PLATFORM_LEFTRIGHT,
OBJ_DISAPPEARING_BLOCK,
OBJ_ENERGY_TANK,
OBJ_WEAPON_TANK,
OBJ_ENERGY_PILL_BIG,
OBJ_WEAPON_PILL_BIG,
OBJ_ENERGY_PILL_SMALL,
OBJ_WEAPON_PILL_SMALL,
OBJ_LIFE,
OBJ_FALL_PLATFORM,
OBJ_FLY_PLATFORM,
OBJ_ITEM_FLY,
OBJ_ITEM_JUMP,
OBJ_ACTIVE_DISAPPEARING_BLOCK, // disappear only after player activates it
OBJ_ARMOR_ARMS,
OBJ_ARMOR_BODY,
OBJ_ARMOR_LEGS,
OBJ_RAY_HORIZONTAL,
OBJ_RAY_VERTICAL,
OBJ_TRACK_PLATFORM,
OBJ_BOSS_TELEPORTER,
OBJ_DESTRUCTIBLE_WALL,
OBJ_SPECIAL_TANK,
OBJ_DEATHRAY_VERTICAL,
OBJ_DEATHRAY_HORIZONTAL,
OBJ_FINAL_BOSS_TELEPORTER,
OBJ_ACTIVE_OPENING_SLIM_PLATFORM,
OBJ_DAMAGING_PLATFORM,
OBJ_CHECKPOINT,
OBJ_BOSS_DOOR,
OBJ_PLATFORM_TELEPORTER,
OBJ_STAGE_BOSS_TELEPORTER,
OBJ_CRUSHER, // goes down and can kill if player or enemy if pressed by it against the ground
OBJ_MOVING_PLATFORM_UP_LOOP,
OBJ_MOVING_PLATFORM_DOWN,
OBJ_DESTRUCTIBLE_NO_DROP,
OBJ_DESTRUCTIBLE_WITH_DROP,
OBJ_ACTIVE_PLATFORM_DIAGONAL_UP,
OBJ_ACTIVE_PLATFORM_DIAGONAL_DOWN,
OBJ_ACTIVE_PLATFORM_AHEAD,
OBJ_ACTIVE_PLATFORM_UP,
OBJ_JUMP_SHOOT_DESTRUCTIBLE_NO_DROP,
OBJ_TIMED_BOMB,
OBJ_EXPANDING_SPIKE,
OBJ_TYPE_COUNT
};
/**
* @brief
*
*/
enum OBJ_STATE {
OBJ_STATE_STAND,
OBJ_STATE_MOVE,
OBJ_STATE_RETURN,
OBJ_STATE_COUNT
};
/**
* @brief
*
*/
enum LINK_TYPES { LINK_HORIZONTAL, LINK_VERTICAL, LINK_TELEPORTER, LINK_FADE_TELEPORT, LINK_TELEPORT_LEFT_LOCK, LINK_TELEPORT_RIGHT_LOCK, LINK_TYPE_COUNT };
#define DOOR_MOVE_STEP 2
#define TRANSITION_STEP 4
#define PLAYER_INITIAL_HP 28
#define PLAYER_INITIAL_X_POS 144 // half-screen
#define BOSS_INITIAL_HP 36 // a bit more HP (8 pts) than player, so it will endure a bit more on the fight
#define HIT_BLINK_ANIMATION_LAPSE 80
#define WATER_SPEED_MULT 0.7
#define QUICKSAND_SPEED_MULT 0.4
#define ATTACK_DELAY 300 // how many milisseconds the attack frame must last before returning to stand/jump/walk
/**
* @brief
*
*/
enum PROJECTILE_TRAJECTORIES {
TRAJECTORY_LINEAR,
TRAJECTORY_ARC,
TRAJECTORY_SIN,
TRAJECTORY_CHAIN,
TRAJECTORY_QUAKE,
TRAJECTORY_BOMB,
TRAJECTORY_FOLLOW, // follow enemy
TRAJECTORY_PROGRESSIVE,
TRAJECTORY_FREEZE,
TRAJECTORY_DIAGONAL_UP,
TRAJECTORY_DIAGONAL_DOWN,
TRAJECTORY_CENTERED, // centered around character
TRAJECTORY_ZIGZAG, // linear until reach a wall, then invert (repeat until reflection number = 3)
TRAJECTORY_TARGET_DIRECTION, // adjust to linear, diagonal up or diagonal down depending on player position when shoot
TRAJECTORY_ARC_TO_TARGET, // forms an arn that will end at player's position
TRAJECTORY_TARGET_EXACT, // will go exactly to the point the target is in
TRAJECTORY_FALL_BOMB, // falls until ground then explodes
TRAJECTORY_LASER,
TRAJECTORY_PUSH_BACK, // pushes player or enemies into opposite direction
TRAJECTORY_ARC_SMALL,
TRAJECTORY_RING, // increases size and on last frame, oponent can pass in the middle
TRAJECTORY_LIGHTING, // appears sequentially in some parts of the screen
TRAJECTORY_SPIRAL,
TRAJECTORY_BOUNCING,
TRAJECTORY_INVERSE_LINEAR,
TRAJECTORY_DOUBLE_LINEAR, // simultaneous shots left/right
TRAJECTORY_DOUBLE_DIAGONAL, // imperfect diagonal (only 45 degrees)
TRAJECTORY_BOMB_RAIN, // creates small drop-bombs progressively
TRAJECTORY_LARGE_BEAM,
TRAJECTORY_PULL, // pull player or enemies into shooter
TRAJECTORY_SLASH, // stay in place, runs until animation finishes
TRAJECTORY_UP,
TRAJECTORY_DOWN,
TRAJECTORY_FALL_AND_SEEK, // fall near to the ground, then moves to player direction
TRAJECTORY_AHEAD_AND_BACK, // linear until reach a wall or limit, then return to initial position
PROJECTILE_TRAJECTORIES_COUNT
};
/**
* @brief
*
*/
enum EDITOR_MODES {
EDITMODE_NORMAL,
EDITMODE_LOCK,
EDITMODE_ERASER,
EDITMODE_FILL,
EDITMODE_LINK,
EDITMODE_LINK_DEST,
EDITMODE_NPC,
EDITMODE_ADDNPC,
EDITMODE_OBJECT,
EDITMODE_SET_BOSS,
EDITMODE_SET_SUBBOSS,
EDITMODE_ANIM_TILE,
EDITMODE_OBJECT_LINK_PLACING,
EDITMODE_SELECT,
EDITMODE_PASTE
};
/**
* @brief
*
*/
enum IA_TYPE_LIST {
IA_STAND,
IA_WAIT,
IA_FOLLOW,
IA_ZIGZAG,
IA_SIDETOSIDE,
IA_BAT,
IA_ROOF_SHOOTER,
IA_GROUND_SHOOTER,
IA_SHOOT_AND_GO,
IA_FLY_ZIG_ZAG,
IA_BUTTERFLY,
IA_HORIZONTAL_GO_AHEAD,
IA_HORIZONTAL_TURN,
IA_FIXED_JUMPER,
IA_SIDE_SHOOTER,
IA_GHOST,
IA_FISH,
IA_DOLPHIN,
IA_VERTICAL_ZIGZAG, IA_TYPES_COUNT };
/**
* @brief
*
*/
enum IA_STATES {
IA_INITIAL_STATE,
IA_STATE_SLEEP,
IA_STATE_FOLLOW,
IA_STATE_RETURN,
IA_STATE_SHOT_RAINBOW,
IA_STATE_CROSS_SCREEN,
IA_STATE_SHOT_FLOWER,
IA_STATE_WAIT_TIME,
IA_STATE_START_MOVE,
IA_STATE_START_STAND,
IA_STATE_INTRO,
IA_STATE_JUMP_TO_ROOF,
IA_STATE_JUMP_TO_PLAYER,
IA_STATE_AIR_WALK,
IA_STATE_QUAKE_ATTACK,
IA_STATE_JUMP_FALL,
IA_STATE_GROUND_ATTACK,
IA_STATE_TELEPORT,
IA_STATE_WALK_TO_POINT,
IA_STATE_CHARGED_DASH,
IA_STATE_SHOT_STOP_TIME,
IA_STATE_JUMP_TO_WALL,
IA_STATE_FLOAT_TO_POINT,
IA_STATE_COUNT
};
/**
* @brief
*
*/
enum IA_CONDITIONALS {
IA_CONDITION_NO_CONDITION,
IA_CONDITION_NEAR_PLAYER,
IA_CONDITION_ABOUT_TO_DIE,
IA_CONDITION_ABOVE_PLAYER,
IA_CONDITION_UNDER_PLAYER
};
#define AI_MAX_STATES 20
enum AI_REACTIONS {
AI_REACTION_PLAYER_ON_RANGE, // player is on range-distance
AI_REACTION_HIT, // npc was damaged
AI_REACTION_DEAD, // npc was killed
AI_REACTION_PLAYER_SAME_Y, // player on same y (tolerance=tilesize)
AI_REACTION_PLAYER_CLOSE, // player on a close distance (1/4 range)
AI_REACTION_PLAYER_SAME_X, // player in part in the same X
MAX_AI_REACTIONS
};
//#define MAX_AI_REACTIONS 6
/**
* @brief
*
*/
enum e_shield_types {
SHIELD_NO,
SHIELD_FULL,
SHIELD_FRONT,
SHIELD_STAND,
SHIELD_DISGUISE,
SHIELD_STAND_FRONT,
SHIELD_STAND_AND_WALK,
SHIELD_BACK,
SHIELD_USING_SHIELD,
SHIELD_COUNT };
enum e_GAME_STYLE {
GAME_STYLE_MODERN,
GAME_STYLE_VINTAGE,
GAME_STYLE_COUNT
};
/**
* @brief
*
*/
enum e_energy_types { ENERGY_TYPE_HP, ENERGY_TYPE_WEAPON };
#define MAX_PLAYER_SPRITES 23
#define MAX_NPC_SPRITES 15
#define MAX_WEAPON_N 12
#define MAX_STAGES 16
#define MAX_MAP_NPC_N 30
#define STAGE_MAX_LINKS 30
#define STAGE_MAX_MAPS 3
#define CHAR_NAME_SIZE 30
#define MAX_FILE_PLAYERS 5
#define MAX_FILE_PROJECTILES 20
#define PROJECTILE_DEFAULT_SPEED 6
#define PROJECTILE_DEFAULT_DAMAGE 1
#define PROJECTILE_DEFAULT_ANIMATION_TIME 100
#define DIALOG_LINE_LIMIT 30
#define EDITOR_DIALOG_LINE_LIMIT 27
#define MAX_PLAYERS 3
#ifdef PLAYSTATION2
#define JOYVAL 12000
#else
#define JOYVAL 30000
#endif
// ATUAL: []: tiro, X: pulo, O: dash =>
// DESEJADO: X: ataque, O: pulo, /\: dash
#define ENERGY_ITEM_SMALL 3
#define ENERGY_ITEM_BIG 8
#define MOVING_GROUND 10 //TREADMILL
#define CHARGED_SHOT_INITIAL_TIME 1000
#define CHARGED_SHOT_TIME 2200
#define SUPER_CHARGED_SHOT_TIME 3200
#define TURBO_ATTACK_INTERVAL 200
#define TOUCH_DAMAGE_SMALL 2
#define TOUCH_DAMAGE_BIG 4
// from graphiLib
#define WPN_COLUMN1_X 42
#define WPN_COLUMN2_X 182
#define WPN_COLUMN_Y 53
#define _MIXER_THREAD_PRIORITY 3
#define PLAYER_NPC_COLLISION_REDUTOR 6
/**
* @brief
*
*/
enum e_game_flags {
FLAG_QUICKLOAD,
FLAG_INVENCIBLE,
FLAG_INFINITE_JUMP,
FLAG_ALLWEAPONS,
FLAG_INFINITE_HP,
FLAG_PLAYER1,
FLAG_PLAYER2,
FLAG_PLAYER3,
FLAG_PLAYER4,
FLAG_COUNT
};
enum AI_ACTION_LIST {
AI_ACTION_WALK,
AI_ACTION_FLY,
AI_ACTION_JUMP,
AI_ACTION_WAIT_UNTIL_PLAYER_IS_IN_RANGE,
AI_ACTION_SAVE_POINT,
AI_ACTION_SHOT_PROJECTILE_AHEAD,
AI_ACTION_SHOT_PROJECTILE_PLAYER_DIRECTION,
AI_ACTION_SHOT_PROJECTILE_INVERT_DIRECTION,
AI_ACTION_AIR_WALK,
AI_ACTION_FALL_TO_GROUND,
AI_ACTION_TELEPORT,
AI_ACTION_DASH,
AI_ACTION_GRAB_WALL,
AI_ACTION_SPAWN_NPC,
AI_ACTION_CHANGE_MOVE_TYPE,
AI_ACTION_REPLACE_NPC, // similar to spawn npc, but removes itself
AI_ACTION_CIRCLE_PLAYER,
AI_ACTION_CHANGE_MOVE_TYPE_REVERSE,
AI_ACTION_JUMP_ATTACK_UP,
AI_ACTION_JUMP_ATTACK_AHEAD_ONCE,
AI_ACTION_WAIT_RANDOM_TIME,
AI_ACTION_MORPH_INTO_NPC, // instead of a new enemy with full hp and such, just morph into a new one
AI_ACTION_PLAY_SFX, // play a sound-effect
AI_ACTION_WALL_WALK,
AI_ACTION_WALL_WALK_SHOOT,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE,
AI_ACTION_EXPLODE_ITSELF,
AI_ACTION_THROW_ITEM,
AI_ACTION_LIST_SIZE
};
enum AI_ACTION_SHOT_MULTIPLE_PROJECTILE_OPTIONS {
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_5_UP,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_5_DOWN,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_5_AHEAD,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_3_UP,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_3_DOWN,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_3_AHEAD,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_8,
AI_ACTION_SHOT_MULTIPLE_PROJECTILE_COUNT
};
enum AI_ACTION_SFX_OPTIONS {
AI_ACTION_SFX_DINO,
AI_ACTION_SFX_COUNT
};
enum AI_ACTION_SHOT_OPTIONS {
AI_ACTION_SHOT_FACEPLAYER,
AI_ACTION_SHOT_AHEAD
};
enum AI_ACTION_GOTO_LIST {
AI_ACTION_GOTO_CHANCE,
AI_ACTION_GOTO_1,
AI_ACTION_GOTO_2,
AI_ACTION_GOTO_3,
AI_ACTION_GOTO_4
};
enum DEAD_STATE_LIST {
DEAD_STATE_ALIVE,
DEAD_STATE_DYING,
DEAD_STATE_DEAD,
DEAD_STATE_IGNORE,
DEAD_STATE_COUNT
};
/**
* @brief
*
*/
enum AI_ACTION_WALK_OPTION_LIST {
AI_ACTION_WALK_OPTION_HORIZONTAL_AHEAD,
AI_ACTION_WALK_OPTION_HORIZONTAL_TURN, // execute turn animation, ends when animation is compelted
AI_ACTION_WALK_OPTION_TO_PLAYER,
AI_ACTION_WALK_OPTION_TO_SAVED_POINT,
AI_ACTION_WALK_OPTION_TURN_TO_PLAYER,
AI_ACTION_WALK_OPTION_TO_RANDOM_DIRECTION,
AI_ACTION_WALK_OPTION_TO_OPPOSITE_DIRECTION,
AI_ACTION_WALK_OPTION_HORIZONTAL_AHEAD_FALLING,
AI_ACTION_WALK_OPTION_COUNT
};
/**
* @brief
*
*/
enum AI_ACTION_FLY_OPTION_LIST {
AI_ACTION_FLY_OPTION_HORIZONTAL_AHEAD,
AI_ACTION_FLY_OPTION_HORIZONTAL_TURN,
AI_ACTION_FLY_OPTION_UP,
AI_ACTION_FLY_OPTION_DOWN,
AI_ACTION_FLY_OPTION_TO_PLAYER,
AI_ACTION_FLY_OPTION_TO_SAVED_POINT,
AI_ACTION_FLY_OPTION_TO_RANDOM_POINT,
AI_ACTION_FLY_OPTION_FALL, // fall until out of screen or hitting ground (ignores distance)
AI_ACTION_FLY_OPTION_DRILL_DOWN,
AI_ACTION_FLY_OPTION_VERTICAL_CENTER,
AI_ACTION_FLY_OPTION_PLAYER_DIRECTION,
AI_ACTION_FLY_OPTION_OPOSITE_WALL,
AI_ACTION_FLY_OPTION_OPOSITE_SHOOT_1,
AI_ACTION_FLY_OPTION_TO_PLAYER_X, // move only in the X axis
AI_ACTION_FLY_OPTION_TO_PLAYER_Y, // move only in the Y axis
AI_ACTION_FLY_OPTION_ZIGZAG_AHEAD, // similar to horizontal-aahead but moving a bit on Y axias up/down
AI_ACTION_FLY_OPTION_RANDOM_X,
AI_ACTION_FLY_OPTION_RANDOM_Y,
AI_ACTION_FLY_OPTION_SIN_AHEAD, // moves ahead making a sin on y-axis
AI_ACTION_FLY_OPTION_DASH_TO_PLAYER,
AI_ACTION_FLY_OPTION_DOWN_RANDOM_DIAGONAL,
AI_ACTION_FLY_OPTION_UP_UNTIL_GROUND,
AI_ACTION_FLY_OPTION_DOWN_INTO_GROUND,
AI_ACTION_FLY_OPTION_DIAGONAL_UP,
AI_ACTION_FLY_OPTION_DIAGONAL_DOWN,
AI_ACTION_FLY_OPTION_COUNT
};
/**
* @brief
*
*/
enum AI_ACTION_JUMP_OPTION_LIST {
AI_ACTION_JUMP_OPTION_AHEAD,
AI_ACTION_JUMP_OPTION_TO_RANDOM_POINT,
AI_ACTION_JUMP_OPTION_UP,
AI_ACTION_JUMP_OPTION_TO_PLAYER,
AI_ACTION_JUMP_OPTION_TO_ROOF,
AI_ACTION_JUMP_OPTION_TO_SAVED_POINT,
AI_ACTION_JUMP_OPTION_TO_PLAYER_DIRECTION,
AI_ACTION_JUMP_OPTION_TELEPORT_IN,
AI_ACTION_JUMP_OPTION_TELEPORT_OUT,
AI_ACTION_JUMP_OPTION_LONG_AHEAD,
AI_ACTION_JUMP_OPTION_ONCE
};
/**
* @brief
*
*/
enum AI_ACTION_AIR_WALK_OPTION_LIST {
AI_ACTION_AIR_WALK_OPTION_LEFT,
AI_ACTION_AIR_WALK_OPTION_RIGHT,
AI_ACTION_AIR_WALK_OPTION_TO_PLAYER
};
/**
* @brief
*
*/
enum AI_ACTION_TELEPORT_OPTION_LIST {
AI_ACTION_TELEPORT_OPTION_LEFT,
AI_ACTION_TELEPORT_OPTION_RIGHT,
AI_ACTION_TELEPORT_OPTION_TO_PLAYER,
AI_ACTION_TELEPORT_OPTION_RANDOM_X,
AI_ACTION_TELEPORT_OPTION_RANDOM_Y,
AI_ACTION_TELEPORT_OPTION_RANDOM_POINT,
AI_ACTION_TELEPORT_OPTION_AHEAD,
AI_ACTION_TELEPORT_OPTION_COUNT
};
/**
* @brief
*
*/
enum AI_ACTION_DASH_OPTION_LIST {
AI_ACTION_DASH_OPTION_LEFT,
AI_ACTION_DASH_OPTION_RIGHT,
AI_ACTION_DASH_OPTION_TO_PLAYER,
AI_ACTION_DASH_OPTION_OPPOSITE_DIRECTION,
AI_ACTION_DASH_OPTION_AHEAD,
AI_ACTION_DASH_OPTION_TO_NEAR_PLAYER,
AI_ACTION_DASH_OPTION_COUNT
};
/**
* @brief
*
*/
enum AI_ACTION_GRAB_WALL_OPTION_LIST {
AI_ACTION_GRAB_WALL_OPTION_LEFT,
AI_ACTION_GRAB_WALL_OPTION_RIGHT
};
enum AI_ACTION_WALL_WALK_OPTION_LIST {
AI_ACTION_WALL_WALK_OPTION_LEFT,
AI_ACTION_WALL_WALK_OPTION_RIGHT,
AI_ACTION_WALL_WALK_OPTION_UP,
AI_ACTION_WALL_WALK_OPTION_DOWN,
AI_ACTION_WALL_WALK_OPTION_COUNT
};
/**
* @brief
*
*/
enum DROP_ITEMS_LIST {
DROP_ITEM_ENERGY_SMALL,
DROP_ITEM_ENERGY_BIG,
DROP_ITEM_WEAPON_SMALL,
DROP_ITEM_WEAPON_BIG,
DROP_ITEM_COIN,
DROP_ITEM_ENERGY_TANK,
DROP_ITEM_1UP,
DROP_ITEM_COUNT
};
#define COIL_GOT_STAGE 1
#define JET_GOT_STAGE 6
#define KEY_MAP_N 7
enum collision_modes {
COLlISION_MODE_XY,
COLlISION_MODE_X,
COLlISION_MODE_Y
};
#define FONT_SIZE 8
#define FONT_SIZE_SMALL 12
#define FONT_SIZE_ERROR 7
#define MENU_CHANGE_DELAY 100
#define QUAKE_SCREEN_MOVE 2
enum FREEZE_EFFECT_TYPES {
FREEZE_EFFECT_NONE,
FREEZE_EFFECT_PLAYER,
FREEZE_EFFECT_NPC
};
/**
* @brief
*
*/
enum COLOR_KEYS {
COLOR_KEY_GREEN,
COLOR_KEY_PURPLE,
COLOR_KEY_CYAN,
COLOR_KEY_LENGTH
};
enum e_VIDEO_FILTERS {
VIDEO_FILTER_NOSCALE,
VIDEO_FILTER_BITSCALE,
VIDEO_FILTER_SCALE2x,
VIDEO_FILTER_COUNT
};
#define BOSS_HIT_DURATION 1500
#define COLORKEY_R 75
#define COLORKEY_G 125
#define COLORKEY_B 125
#define COLOR_COUNT 68
// filesystem defines
#define FS_MAX_WEAPONS 20
#define FS_MAX_PLAYERS 4
#define FS_MAX_STAGES 20
#define FS_CHAR_NAME_SIZE 30
#define FS_CHAR8_NAME_SIZE 8
#define FS_CHAR_FILENAME_SIZE 30
#define FS_INI_KEY_SIZE 30
#define FS_FILENAME_SIZE 30
#define FS_NAME_SIZE 30
#define FS_STAGE_MAX_LINKS 30
#define FS_STAGE_MAX_MAPS 3
#define FS_MAX_MAP_NPCS 30
#define FS_MAX_MAP_OBJECTS 30
#define FS_NPC_WEAKNESSES 9
#define FS_DIALOG_LINES 3
#define TROPHIES_MAX 10
#define CASTLE_STAGES_MAX 6
#define FS_COLOR_KEYS_N 3
#define FS_NPC_PROJECTILE_N 2
#define FS_PLAYER_ARMOR_PIECES_MAX 50 // allow more pieces in the future
enum e_ARMOR_PIECES {
ARMOR_TYPE_ARMS, ARMOR_TYPE_BODY, ARMOR_TYPE_LEGS, ARMOR_TYPE_COUNT
};