Skip to content

Commit

Permalink
add mml codes
Browse files Browse the repository at this point in the history
  • Loading branch information
JLaferri committed Jun 2, 2021
1 parent 5854a97 commit 923ada1
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 27 deletions.
129 changes: 106 additions & 23 deletions common/config/MeleeCodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
#include "../../kernel/gecko/g_lag_pd.h" // Lag Reduction: PD
#include "../../kernel/gecko/g_lag_pdvb.h" // Lag Reduction: PD+VB

#include "../../kernel/gecko/g_frozen.h" // Ruleset: Frozen Pokemon
#include "../../kernel/gecko/g_stages_stadium.h" // Stages: Frozen Pokemon
#include "../../kernel/gecko/g_stages_all.h" // Stages: Frozen Pokemon

#include "../../kernel/gecko/g_gameplay_lgl.h" // Gameplay: LGL
#include "../../kernel/gecko/g_gameplay_wobbling.h" // Gameplay: Wobbling
#include "../../kernel/gecko/g_gameplay_both.h" // Gameplay: Both

#include "../../kernel/gecko/g_screen_wide.h" // Screen: Widescreen
#include "../../kernel/gecko/g_screen_mon43.h" // Screen: 4:3 -> 73:60
Expand Down Expand Up @@ -173,7 +178,7 @@ const MeleeCodeLineItem modsLineItem = {
MELEE_CODES_MODS_OPTION_ID, // identifier
"Convenience",
modsDescription,
1,
2,
MELEE_CODES_MODS_OPTION_COUNT,
modsOptions,
};
Expand Down Expand Up @@ -233,43 +238,120 @@ const MeleeCodeLineItem lagReductionLineItem = {
};

/***************************************
* Ruleset Options
* Stage Options
***************************************/
const MeleeCodeOption rulesetOptionVanilla = {
const MeleeCodeOption stagesOptionVanilla = {
1,
"Off",
0,
NULL,
};

const MeleeCodeOption rulesetOptionFrozenStadium = {
const MeleeCodeOption stagesOptionFrozenStadium = {
2,
"Medium",
g_frozen_size,
g_frozen,
"Stadium",
g_stages_stadium_size,
g_stages_stadium,
};

const MeleeCodeOption stagesOptionFrozenAll = {
3,
"All",
g_stages_all_size,
g_stages_all,
};

const MeleeCodeOption *stagesOptions[MELEE_CODES_STAGES_OPTION_COUNT] = {
&stagesOptionVanilla,
&stagesOptionFrozenStadium,
&stagesOptionFrozenAll,
};

static const char *stagesDescription[] = {
"Choose which stages should be frozen.",
"",
" [Stadium]",
" Freezes Stadium only",
"",
" [All]",
" Freezes Stadium, Whispy,",
" Shy Guys, FD backgrounds",
NULL
};

const MeleeCodeOption *rulesetOptions[MELEE_CODES_RULESET_OPTION_COUNT] = {
&rulesetOptionVanilla,
&rulesetOptionFrozenStadium,
const MeleeCodeLineItem stagesLineItem = {
MELEE_CODES_STAGES_OPTION_ID, // identifier
"Frozen Stages",
stagesDescription,
1,
MELEE_CODES_STAGES_OPTION_COUNT,
stagesOptions,
};

static const char *rulesetDescription[] = {
"Codes that change the rules",
"of the game.",
/***************************************
* Gameplay Options
***************************************/
const MeleeCodeOption gameplayOptionVanilla = {
1,
"Off",
0,
NULL,
};

const MeleeCodeOption gameplayOptionLgl = {
2,
"LGL",
g_gameplay_lgl_size,
g_gameplay_lgl,
};

const MeleeCodeOption gameplayOptionWobbling = {
2,
"Wobbling",
g_gameplay_wobbling_size,
g_gameplay_wobbling,
};

const MeleeCodeOption gameplayOptionBoth = {
2,
"Both",
g_gameplay_both_size,
g_gameplay_both,
};

const MeleeCodeOption *gameplayOptions[MELEE_CODES_GAMEPLAY_OPTION_COUNT] = {
&gameplayOptionVanilla,
&gameplayOptionLgl,
&gameplayOptionWobbling,
&gameplayOptionBoth,
};

static const char *gameplayDescription[] = {
"Choose gameplay changes",
"",
" [LGL]",
" Ledge grab limit. In the event",
" of a timeout, a player with",
" more than 45 ledge grabs will",
" lose",
"",
" [Wobbling]",
" Prevents wobbling. After Nana",
" hits opponent 3 times, grab is",
" broken.",
"",
" [Medium]",
" Frozen Stadium",
" [Both]",
" Enables both other codes",
NULL
};

const MeleeCodeLineItem rulesetLineItem = {
MELEE_CODES_RULESET_OPTION_ID, // identifier
"Ruleset",
rulesetDescription,
const MeleeCodeLineItem gameplayLineItem = {
MELEE_CODES_GAMEPLAY_OPTION_ID, // identifier
"Gameplay",
gameplayDescription,
1,
MELEE_CODES_RULESET_OPTION_COUNT,
rulesetOptions,
MELEE_CODES_GAMEPLAY_OPTION_COUNT,
gameplayOptions,
};

/***************************************
Expand Down Expand Up @@ -337,7 +419,8 @@ const MeleeCodeLineItem *meleeCodeLineItems[] = {
&versionLineItem,
&modsLineItem,
&lagReductionLineItem,
&rulesetLineItem,
&stagesLineItem,
&gameplayLineItem,
&screenLineItem,
};

Expand Down
10 changes: 6 additions & 4 deletions common/config/MeleeCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
#define MELEE_CODES_VERSION_OPTION_COUNT 2
#define MELEE_CODES_MODS_OPTION_COUNT 4
#define MELEE_CODES_LAG_REDUCTION_OPTION_COUNT 3
#define MELEE_CODES_RULESET_OPTION_COUNT 2
#define MELEE_CODES_STAGES_OPTION_COUNT 3
#define MELEE_CODES_SCREEN_OPTION_COUNT 3
#define MELEE_CODES_GAMEPLAY_OPTION_COUNT 4

#define MELEE_CODES_CF_OPTION_ID 0
#define MELEE_CODES_VERSION_OPTION_ID 1
#define MELEE_CODES_MODS_OPTION_ID 2
#define MELEE_CODES_LAG_REDUCTION_OPTION_ID 3
#define MELEE_CODES_RULESET_OPTION_ID 4
#define MELEE_CODES_STAGES_OPTION_ID 4
#define MELEE_CODES_SCREEN_OPTION_ID 5
#define MELEE_CODES_GAMEPLAY_OPTION_ID 6

// Indicates the maximum number possible for ID. This is important in case the line items change,
// we don't want to persist setting values for a different line item
#define MELEE_CODES_MAX_ID 5
#define MELEE_CODES_MAX_ID 6

#define MELEE_CODES_LINE_ITEM_COUNT 6
#define MELEE_CODES_LINE_ITEM_COUNT 7

#define MELEE_CODES_43_MONITOR_VALUE 2
#define MELEE_CODES_WIDE_VALUE 3
Expand Down
Binary file added kernel/gecko/g_gameplay_both.bin
Binary file not shown.
Binary file added kernel/gecko/g_gameplay_lgl.bin
Binary file not shown.
Binary file added kernel/gecko/g_gameplay_wobbling.bin
Binary file not shown.
Binary file added kernel/gecko/g_stages_all.bin
Binary file not shown.
File renamed without changes.

0 comments on commit 923ada1

Please sign in to comment.