fork/training-mode-ce

git clone https://git.julia.blue/fork/training-mode-ce

Alex Harrisonsmall eggs event cleanup33f399a

master
2.5 KiB98 linesraw
1#ifndef _EGGS_H_
2#define _EGGS_H_
3
4#include "../MexTK/mex.h"
5#include "events.h"
6
7enum options_main
8{
9    OPT_RETRY,
10    OPT_FREEPRACTICE,
11    OPT_DAMAGETHRESHOLD,
12    OPT_SCALE,
13    OPT_VELOCITY,
14    OPT_COLLISION,
15    OPT_EXIT,
16
17    OPT_COUNT
18};
19
20void StartFreePractice(GOBJ *gobj);
21GOBJ *Egg_Spawn(void);
22void Exit(GOBJ *menu);
23void Retry(GOBJ *menu);
24void Egg_OnChangeSize(GOBJ *menu, int value);
25void ChangeHitDisplay(GOBJ *menu_gobj, int value);
26void Event_Init(GOBJ *gobj);
27float RandomRange(float low, float high);
28int Egg_OnTakeDamage(GOBJ *gobj);
29void Event_Think(GOBJ *event);
30
31static GXColor text_gold = {255, 211, 0, 255};
32static GXColor text_white = {255, 255, 255, 255};
33
34static float EggOptions_Size[] = {1.0f, .5f, 2.0f};
35static const char *EggOptions_SizeText[] = {"Normal", "Small", "Large"};
36
37static EventOption Options_Main[OPT_COUNT] = {
38    {
39        .kind = OPTKIND_FUNC,
40        .name = "Retry",
41        .desc = { "Retry this event. Pressing Z while paused also does this." },
42        .OnSelect = Retry
43    },
44    {
45        .kind = OPTKIND_FUNC,
46        .name = "Enable Free Practice",
47        .desc = { "Start Free Practice mode." },
48        .OnSelect = StartFreePractice
49    },
50    {
51        .kind = OPTKIND_INT,
52        .name = "Egg Damage Threshold",
53        .desc = { "Adjust the minimum damage needed to break an egg." },
54        .val = 12,
55        .format = "%d",
56        .value_min = 0,
57        .value_num = 200,
58        .disable = 1
59    },
60    {
61        .kind = OPTKIND_STRING,
62        .value_num = countof(EggOptions_SizeText),
63        .name = "Egg Scale",
64        .desc = { "Adjust egg size." },
65        .values = EggOptions_SizeText,
66        .disable = 1,
67        .OnChange = Egg_OnChangeSize
68    },
69    {
70        .kind = OPTKIND_TOGGLE,
71        .name = "Egg Spawn Velocity",
72        .desc = { "Toggle whether eggs spawn with vertical velocity." },
73        .val = 1,
74        .disable = 1
75    },
76    {
77        .kind = OPTKIND_TOGGLE,
78        .name = "Fighter Collision",
79        .desc = {"Toggle hitbox and hurtbox visualization.",
80                 "Hurtboxes: yellow=hurt, purple=ungrabbable, blue=shield.",
81                 "Hitboxes: (by priority) red, green, blue, purple."},
82        .disable = 1,
83        .OnChange = ChangeHitDisplay,
84    },
85    {
86        .kind = OPTKIND_FUNC,
87        .name = "Exit",
88        .desc = { "Return to the Event Select Screen." },
89        .OnSelect = Exit,
90    },
91};
92static EventMenu Menu_Main = {
93    .name = "Eggs-ercise",
94    .option_num = countof(Options_Main),
95    .options = Options_Main,
96};
97
98#endif // _EGGS_H_