Compare commits
No commits in common. "734f2aff8557c2a5b018d40db948476f0267c620" and "648b85dbb6580735396afe2b60c92abba67a9472" have entirely different histories.
734f2aff85
...
648b85dbb6
2
.gitignore
vendored
2
.gitignore
vendored
@ -44,7 +44,7 @@
|
||||
|
||||
# Text editor remnants
|
||||
*.swp
|
||||
# vscode/*
|
||||
.vscode/*
|
||||
.idea/*
|
||||
|
||||
# General project-specific ignores
|
||||
|
29
.vscode/c_cpp_properties.json
vendored
29
.vscode/c_cpp_properties.json
vendored
@ -1,29 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${workspaceFolder}/include",
|
||||
"${workspaceFolder}/include/**",
|
||||
"${workspaceFolder}/include/dxsdk",
|
||||
"${workspaceFolder}/include/GL",
|
||||
"${workspaceFolder}/include/libc",
|
||||
"${workspaceFolder}/include/PR",
|
||||
"${workspaceFolder}/include/stb"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.22621.0",
|
||||
"compilerPath": "cl.exe",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17",
|
||||
"intelliSenseMode": "windows-msvc-x64",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
42
.vscode/settings.json
vendored
42
.vscode/settings.json
vendored
@ -1,42 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"sm64.h": "c",
|
||||
"gfx_dimensions.h": "c",
|
||||
"gbi.h": "c",
|
||||
"options_menu.h": "c",
|
||||
"*.in": "cpp",
|
||||
"chrono": "cpp",
|
||||
"functional": "cpp"
|
||||
},
|
||||
// https://stackoverflow.com/questions/45836650/how-do-i-integrate-msys2-shell-into-visual-studio-code-on-window
|
||||
"terminal.integrated.profiles.windows": {
|
||||
"PowerShell": {
|
||||
"source": "PowerShell",
|
||||
"icon": "terminal-powershell"
|
||||
},
|
||||
"Command Prompt": {
|
||||
"path": [
|
||||
"${env:windir}\\Sysnative\\cmd.exe",
|
||||
"${env:windir}\\System32\\cmd.exe"
|
||||
],
|
||||
"args": [],
|
||||
"icon": "terminal-cmd"
|
||||
},
|
||||
"Git Bash": {
|
||||
"source": "Git Bash"
|
||||
},
|
||||
"MSYS2": {
|
||||
"path": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"args": [
|
||||
"--login",
|
||||
"-i"
|
||||
],
|
||||
"env": {
|
||||
"MSYSTEM": "MINGW64",
|
||||
"CHERE_INVOKING": "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
28
Dockerfile
28
Dockerfile
@ -1,16 +1,24 @@
|
||||
FROM ubuntu:22.04 as build
|
||||
FROM ubuntu:18.04 as build
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
binutils-mips-linux-gnu \
|
||||
bsdmainutils \
|
||||
build-essential \
|
||||
git \
|
||||
libglew-dev \
|
||||
libsdl2-dev \
|
||||
python3
|
||||
libaudiofile-dev \
|
||||
python3 \
|
||||
wget
|
||||
|
||||
RUN mkdir /render96ex
|
||||
WORKDIR /render96ex
|
||||
ENV PATH="/render96ex/tools:${PATH}"
|
||||
RUN wget \
|
||||
https://github.com/n64decomp/qemu-irix/releases/download/v2.11-deb/qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb \
|
||||
-O qemu.deb && \
|
||||
echo 8170f37cf03a08cc2d7c1c58f10d650ea0d158f711f6916da9364f6d8c85f741 qemu.deb | sha256sum --check && \
|
||||
dpkg -i qemu.deb && \
|
||||
rm qemu.deb
|
||||
|
||||
CMD echo 'Usage: docker run --rm -v ${PWD}:/render96ex render96ex make VERSION=${VERSION:-us} -j4\n' \
|
||||
'See https://github.com/Render96/Render96ex/blob/master/README.md for more information'
|
||||
RUN mkdir /sm64
|
||||
WORKDIR /sm64
|
||||
ENV PATH="/sm64/tools:${PATH}"
|
||||
|
||||
CMD echo 'usage: docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 sm64 make VERSION=${VERSION:-us} -j4\n' \
|
||||
'see https://github.com/n64decomp/sm64/blob/master/README.md for advanced usage'
|
||||
|
12
Makefile
12
Makefile
@ -576,17 +576,17 @@ ifeq ($(SDL_USED),2)
|
||||
endif
|
||||
|
||||
ifeq ($(WINDOWS_BUILD),1)
|
||||
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security -fpermissive $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
|
||||
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv -fpermissive
|
||||
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
|
||||
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv
|
||||
|
||||
else ifeq ($(TARGET_WEB),1)
|
||||
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security -fpermissive $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -s USE_SDL=2
|
||||
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv -fpermissive -s USE_SDL=2
|
||||
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -s USE_SDL=2
|
||||
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv -s USE_SDL=2
|
||||
|
||||
# Linux / Other builds below
|
||||
else
|
||||
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security -fpermissive $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
|
||||
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv -fpermissive
|
||||
CC_CHECK := $(CC) -fsyntax-only -fsigned-char $(BACKEND_CFLAGS) $(INCLUDE_CFLAGS) -Wall -Wextra -Wno-format-security $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
|
||||
CFLAGS := $(OPT_FLAGS) $(INCLUDE_CFLAGS) $(BACKEND_CFLAGS) $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -fno-strict-aliasing -fwrapv
|
||||
|
||||
endif
|
||||
|
||||
|
@ -1,75 +0,0 @@
|
||||
# Adding menus to this decomp
|
||||
1. Go into the charmap.txt to get a list of characters needed.
|
||||
2. Add a menu into options_menu.c:
|
||||
|
||||
### To enable the below features:
|
||||
Add my custom code define under s32 l_counter = 0 in options_menu.c, example:
|
||||
```
|
||||
// Enable my custom menus, and other features in this file.
|
||||
// kelson8
|
||||
#define _CUSTOM_CODE
|
||||
```
|
||||
|
||||
|
||||
### To add a menu into options_menu.c:
|
||||
1. Define a string using the charmap.txt into text_options_strings.h, for example to make the word "Test" add this into that file (0xFF is needed at the end):
|
||||
```
|
||||
#define TEXT_OPT_TEST 0x1D,0x0E,0x1C,0x1D,0xFF
|
||||
```
|
||||
|
||||
2. Add a string for the menu in menuStr, and define that in the text_options_strings.h, for example if the menu OPT is test add this into there
|
||||
```
|
||||
#ifdef _CUSTOM_CODE
|
||||
{ TEXT_OPT_TEST },
|
||||
#endif //_CUSTOM_CODE
|
||||
```
|
||||
|
||||
3. Add a string for the option under bindStr in options_menu.c, example:
|
||||
```
|
||||
#ifdef _CUSTOM_CODE
|
||||
static const u8 testStr[][8] = {
|
||||
{ TEXT_OPT_TEST }
|
||||
};
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
```
|
||||
|
||||
4. Add a new option in options_menu.c, example:
|
||||
```
|
||||
#ifdef _CUSTOM_CODE
|
||||
static struct Option optsTest[] = {
|
||||
// TODO Fix this to do something else.
|
||||
// First option is the value of the testStr defined
|
||||
DEF_OPT_SCROLL( testStr[0], &configMasterVolume, 0, MAX_VOLUME, 1 )
|
||||
};
|
||||
#endif //_CUSTOM_CODE
|
||||
```
|
||||
|
||||
5. Add the menu to the SubMenu struct under menuAudio in options_menu.c, example:
|
||||
```
|
||||
#ifdef _CUSTOM_CODE
|
||||
// Get the value from the menuStr
|
||||
static struct SubMenu menuTest = DEF_SUBMENU( menuStr[9], optsTest );
|
||||
static struct SubMenu menuCheats = DEF_SUBMENU( menuStr[10], optsCheats );
|
||||
#else
|
||||
static struct SubMenu menuCheats = DEF_SUBMENU( menuStr[9], optsCheats );
|
||||
#endif //_CUSTOM_CODE
|
||||
```
|
||||
|
||||
6. Finally, add this under optmenu_act_exit within optsMain in options_menu.c, example:
|
||||
```
|
||||
#ifdef _CUSTOM_CODE
|
||||
DEF_OPT_SUBMENU( menuStr[9], &menuTest ),
|
||||
DEF_OPT_SUBMENU( menuStr[10], &menuCheats )
|
||||
#else
|
||||
DEF_OPT_SUBMENU( menuStr[9], &menuCheats )
|
||||
#endif //_CUSTOM_CODE
|
||||
```
|
||||
|
||||
### To add a title for the menu:
|
||||
1. Go into include/text_options_strings.h.in
|
||||
2. Add this into that file under cheats or wherever:
|
||||
```
|
||||
// Add the text for the test menu
|
||||
#define TEXT_OPT_TEST _("TEST")
|
||||
```
|
@ -11,10 +11,6 @@
|
||||
#define TEXT_OPT_VIDEO _("DISPLAY")
|
||||
#define TEXT_OPT_AUDIO _("SOUND")
|
||||
#define TEXT_OPT_CHEATS _("CHEATS")
|
||||
// Add the text for the test menu
|
||||
// #ifdef _CUSTOM_CODE
|
||||
#define TEXT_OPT_TEST _("TEST")
|
||||
// #endif //_CUSTOM_CODE
|
||||
|
||||
// Markers
|
||||
|
||||
|
@ -18,14 +18,6 @@
|
||||
#include "make_const_nonconst.h"
|
||||
#include "levels/intro/header.h"
|
||||
|
||||
// Enable the debug level selector.
|
||||
// TODO Figure out how to add to the games menu and switch to this, it should be possible.
|
||||
// #define _LEVEL_SELECTOR
|
||||
|
||||
// Bypass the mario startup screen and make the game show the saves without pressing start.
|
||||
// TODO Make this auto load save slot 1 for testing.
|
||||
#define _FAST_LOADER
|
||||
|
||||
const LevelScript level_intro_entry_1[] = {
|
||||
INIT_LEVEL(),
|
||||
FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
|
||||
@ -33,37 +25,19 @@ const LevelScript level_intro_entry_1[] = {
|
||||
LOAD_MIO0(/*seg*/ 0x07, _intro_segment_7SegmentRomStart, _intro_segment_7SegmentRomEnd),
|
||||
ALLOC_LEVEL_POOL(),
|
||||
|
||||
#ifndef _FAST_LOADER
|
||||
AREA(/*index*/ 1, intro_geo_0002D0),
|
||||
END_AREA(),
|
||||
#endif //!_FAST_LOADER
|
||||
|
||||
FREE_LEVEL_POOL(),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
|
||||
#ifndef _FAST_LOADER
|
||||
CALL(/*arg*/ 0, /*func*/ lvl_intro_update),
|
||||
SLEEP(/*frames*/ 75),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 16),
|
||||
|
||||
#endif //!_FAST_LOADER
|
||||
|
||||
CMD2A(/*unk2*/ 1),
|
||||
|
||||
CLEAR_LEVEL(),
|
||||
SLEEP(/*frames*/ 2),
|
||||
|
||||
#ifdef _LEVEL_SELECTOR //Level selector patch
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4),
|
||||
#elif defined(_FAST_LOADER)
|
||||
// This bypasses the mario startup where it says to press start by enabling this.
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_main_menu_entry_1),
|
||||
#else
|
||||
// Normal load screen
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_2),
|
||||
|
||||
#endif //_LEVEL_SELECTOR
|
||||
};
|
||||
|
||||
const LevelScript level_intro_entry_2[] = {
|
||||
@ -82,20 +56,13 @@ const LevelScript level_intro_entry_2[] = {
|
||||
SLEEP(/*frames*/ 2),
|
||||
BLACKOUT(/*active*/ FALSE),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
// Toggle the intro music by commenting this out.
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0002),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 20),
|
||||
CALL_LOOP(/*arg*/ 1, /*func*/ lvl_intro_update),
|
||||
// Original code
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
|
||||
JUMP(script_intro_L4),
|
||||
|
||||
// This somewhat makes it load faster after going into the main menu and hitting start
|
||||
// JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, level_main_menu_entry_1),
|
||||
// JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, level_main_menu_entry_1),
|
||||
// JUMP(level_main_menu_entry_1),
|
||||
};
|
||||
|
||||
const LevelScript level_intro_entry_3[] = {
|
||||
@ -114,7 +81,6 @@ const LevelScript level_intro_entry_3[] = {
|
||||
SLEEP(/*frames*/ 2),
|
||||
BLACKOUT(/*active*/ FALSE),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
// Toggle the intro music by commenting this out.
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0082),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 20),
|
||||
@ -137,7 +103,6 @@ const LevelScript level_intro_entry_4[] = {
|
||||
|
||||
FREE_LEVEL_POOL(),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
// Toggle the intro music by commenting this out.
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0002),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
|
||||
SLEEP(/*frames*/ 16),
|
||||
|
@ -3,22 +3,12 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// Enable my custom menus, I don't know how to use these yet.
|
||||
// #define _CUSTOM_CODE
|
||||
// Disables the menu music
|
||||
// #define _DISABLE_MENU_MUSIC
|
||||
|
||||
// geo
|
||||
extern const GeoLayout geo_menu_mario_save_button[];
|
||||
extern const GeoLayout geo_menu_mario_save_button_fade[];
|
||||
extern const GeoLayout geo_menu_mario_new_button[];
|
||||
extern const GeoLayout geo_menu_mario_new_button_fade[];
|
||||
extern const GeoLayout geo_menu_erase_button[];
|
||||
|
||||
#ifdef _CUSTOM_CODE
|
||||
extern const GeoLayout geo_menu_custom_button[];
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
extern const GeoLayout geo_menu_copy_button[];
|
||||
extern const GeoLayout geo_menu_file_button[];
|
||||
extern const GeoLayout geo_menu_score_button[];
|
||||
|
@ -35,13 +35,6 @@ const LevelScript level_main_menu_entry_1[] = {
|
||||
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_PURPLE_SOUND_BUTTON, geo_menu_sound_button),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_GENERIC_BUTTON, geo_menu_generic_button),
|
||||
|
||||
// TODO Figure out how to add to the main menu, enable this in header.h
|
||||
#ifdef _CUSTOM_CODE
|
||||
LOAD_MODEL_FROM_GEO(MODEL_MAIN_MENU_GENERIC_BUTTON, geo_menu_custom_button),
|
||||
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
|
||||
AREA(/*index*/ 1, geo_menu_file_select_strings_and_menu_cursor),
|
||||
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvMenuButtonManager),
|
||||
OBJECT(/*model*/ MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvYellowBackgroundInMenu),
|
||||
@ -50,13 +43,7 @@ const LevelScript level_main_menu_entry_1[] = {
|
||||
|
||||
FREE_LEVEL_POOL(),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
|
||||
#ifdef _DISABLE_MENU_MUSIC
|
||||
// Make this do nothing if enabled
|
||||
#else
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0021),
|
||||
#endif //_DISABLE_MENU_MUSIC
|
||||
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
|
||||
CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos),
|
||||
CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected),
|
||||
|
@ -1160,8 +1160,6 @@ s32 update_level(void) {
|
||||
return changeLevel;
|
||||
}
|
||||
|
||||
#define _DISABLE_START_INTRO
|
||||
|
||||
s32 init_level(void) {
|
||||
s32 val4 = 0;
|
||||
|
||||
@ -1200,11 +1198,9 @@ s32 init_level(void) {
|
||||
if (gMarioState->action != ACT_UNINITIALIZED) {
|
||||
if (save_file_exists(gCurrSaveFileNum - 1)) {
|
||||
set_mario_action(gMarioState, ACT_IDLE, 0);
|
||||
#ifndef _DISABLE_START_INTRO //Disable the starting intro when launching a new save.
|
||||
} else if (gCLIOpts.SkipIntro == 0 && configSkipIntro == 0) {
|
||||
set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 0);
|
||||
val4 = 1;
|
||||
#endif //_DISABLE_START_INTRO
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1250,8 +1246,6 @@ s32 lvl_init_or_update(s16 initOrUpdate, UNUSED s32 unused) {
|
||||
return result;
|
||||
}
|
||||
|
||||
#undef _LEVEL_SELECTOR
|
||||
|
||||
s32 lvl_init_from_save_file(UNUSED s16 arg0, s32 levelNum) {
|
||||
#ifdef VERSION_EU
|
||||
s16 var = eu_get_language();
|
||||
@ -1273,6 +1267,7 @@ s32 lvl_init_from_save_file(UNUSED s16 arg0, s32 levelNum) {
|
||||
sWarpDest.type = WARP_TYPE_NOT_WARPING;
|
||||
sDelayedWarpOp = WARP_OP_NONE;
|
||||
gShouldNotPlayCastleMusic = !save_file_exists(gCurrSaveFileNum - 1) && gCLIOpts.SkipIntro == 0 && configSkipIntro == 0;
|
||||
|
||||
gCurrLevelNum = levelNum;
|
||||
gCurrCourseNum = COURSE_NONE;
|
||||
gSavedCourseNum = COURSE_NONE;
|
||||
|
@ -1,7 +1,3 @@
|
||||
|
||||
// Add this to enable intellisense in this file,
|
||||
// it is already defined in the Makefile.
|
||||
#define EXT_OPTIONS_MENU
|
||||
#ifdef EXT_OPTIONS_MENU
|
||||
|
||||
#include "sm64.h"
|
||||
@ -44,10 +40,6 @@ static s32 l_counter = 0;
|
||||
// menus: add a new submenu definition and a new
|
||||
// option to the optsMain list
|
||||
|
||||
// Enable my custom menus, and other features in this file.
|
||||
// kelson8
|
||||
#define _CUSTOM_CODE
|
||||
|
||||
static const u8 toggleStr[][16] = {
|
||||
{ TEXT_OPT_DISABLED },
|
||||
{ TEXT_OPT_ENABLED },
|
||||
@ -63,12 +55,7 @@ static const u8 menuStr[][32] = {
|
||||
{ TEXT_OPT_VIDEO },
|
||||
{ TEXT_OPT_AUDIO },
|
||||
{ TEXT_EXIT_GAME },
|
||||
|
||||
#ifdef _CUSTOM_CODE
|
||||
{ TEXT_OPT_TEST },
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
{ TEXT_OPT_CHEATS }
|
||||
{ TEXT_OPT_CHEATS },
|
||||
|
||||
};
|
||||
|
||||
@ -138,12 +125,6 @@ static const u8 bindStr[][32] = {
|
||||
{ TEXT_OPT_RUMBLE }
|
||||
};
|
||||
|
||||
#ifdef _CUSTOM_CODE
|
||||
static const u8 testStr[][8] = {
|
||||
{ TEXT_OPT_TEST }
|
||||
};
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
static const u8 *filterChoices[] = {
|
||||
optsVideoStr[2],
|
||||
optsVideoStr[3],
|
||||
@ -288,13 +269,6 @@ static struct Option optsAudio[] = {
|
||||
DEF_OPT_SCROLL( optsAudioStr[3], &configEnvVolume, 0, MAX_VOLUME, 1),
|
||||
};
|
||||
|
||||
#ifdef _CUSTOM_CODE
|
||||
static struct Option optsTest[] = {
|
||||
// TODO Fix this to do something else.
|
||||
DEF_OPT_SCROLL( testStr[0], &configMasterVolume, 0, MAX_VOLUME, 1 )
|
||||
};
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
static struct Option optsCheats[] = {
|
||||
DEF_OPT_TOGGLE( optsCheatsStr[0], &Cheats.EnableCheats ),
|
||||
DEF_OPT_TOGGLE( optsCheatsStr[1], &Cheats.MoonJump ),
|
||||
@ -316,17 +290,7 @@ static struct SubMenu menuCamera = DEF_SUBMENU( menuStr[4], optsCamera );
|
||||
static struct SubMenu menuControls = DEF_SUBMENU( menuStr[5], optsControls );
|
||||
static struct SubMenu menuVideo = DEF_SUBMENU( menuStr[6], optsVideo );
|
||||
static struct SubMenu menuAudio = DEF_SUBMENU( menuStr[7], optsAudio );
|
||||
|
||||
// Test, this works!
|
||||
#ifdef _CUSTOM_CODE
|
||||
// Get the value from the menuStr
|
||||
static struct SubMenu menuTest = DEF_SUBMENU( menuStr[9], optsTest );
|
||||
static struct SubMenu menuCheats = DEF_SUBMENU( menuStr[10], optsCheats );
|
||||
#else
|
||||
static struct SubMenu menuCheats = DEF_SUBMENU( menuStr[9], optsCheats );
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
|
||||
|
||||
/* main options menu definition */
|
||||
|
||||
@ -338,17 +302,8 @@ static struct Option optsMain[] = {
|
||||
DEF_OPT_SUBMENU( menuStr[6], &menuVideo ),
|
||||
DEF_OPT_SUBMENU( menuStr[7], &menuAudio ),
|
||||
DEF_OPT_BUTTON ( menuStr[8], optmenu_act_exit ),
|
||||
|
||||
// Test, this works!
|
||||
#ifdef _CUSTOM_CODE
|
||||
DEF_OPT_SUBMENU( menuStr[9], &menuTest ),
|
||||
DEF_OPT_SUBMENU( menuStr[10], &menuCheats )
|
||||
#else
|
||||
DEF_OPT_SUBMENU( menuStr[9], &menuCheats )
|
||||
#endif //_CUSTOM_CODE
|
||||
|
||||
// NOTE: always keep cheats the last option here because of the half-assed way I toggle them
|
||||
// DEF_OPT_SUBMENU( menuStr[10], &menuCheats )
|
||||
DEF_OPT_SUBMENU( menuStr[9], &menuCheats )
|
||||
};
|
||||
|
||||
static struct SubMenu menuMain = DEF_SUBMENU( menuStr[3], optsMain );
|
||||
|
Loading…
Reference in New Issue
Block a user