Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widescreen toggle #94

Draft
wants to merge 4 commits into
base: develop/2.1.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/textures/title_static/16by9_eng.ia8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/textures/title_static/4by3_eng.ia8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
673 changes: 673 additions & 0 deletions assets/textures/title_static/title_static.c

Large diffs are not rendered by default.

155 changes: 155 additions & 0 deletions assets/textures/title_static/title_static.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
#ifndef TITLE_STATIC_H
#define TITLE_STATIC_H 1

extern u64 gFileSelConnectorTex[];
extern u64 gFileSelForestMedallionTex[];
extern u64 gFileSelFireMedallionTex[];
extern u64 gFileSelWaterMedallionTex[];
extern u64 gFileSelSpiritMedallionTex[];
extern u64 gFileSelShadowMedallionTex[];
extern u64 gFileSelLightMedallionTex[];
extern u64 gFileSelWindow1Tex[];
extern u64 gFileSelWindow2Tex[];
extern u64 gFileSelWindow3Tex[];
extern u64 gFileSelWindow4Tex[];
extern u64 gFileSelWindow5Tex[];
extern u64 gFileSelWindow6Tex[];
extern u64 gFileSelWindow7Tex[];
extern u64 gFileSelWindow8Tex[];
extern u64 gFileSelWindow9Tex[];
extern u64 gFileSelWindow10Tex[];
extern u64 gFileSelWindow11Tex[];
extern u64 gFileSelWindow12Tex[];
extern u64 gFileSelWindow13Tex[];
extern u64 gFileSelWindow14Tex[];
extern u64 gFileSelWindow15Tex[];
extern u64 gFileSelWindow16Tex[];
extern u64 gFileSelWindow17Tex[];
extern u64 gFileSelWindow18Tex[];
extern u64 gFileSelWindow19Tex[];
extern u64 gFileSelWindow20Tex[];
extern u64 gFileSelKanjiButtonTex[];
extern u64 gFileSelHiraganaButtonTex[];
extern u64 gFileSelKatakanaButtonTex[];
extern u64 gFileSelENDButtonENGTex[];
extern u64 gFileSelENDButtonGERTex[];
extern u64 gFileSelENDButtonFRATex[];
extern u64 gFileSelBackspaceButtonTex[];
extern u64 gFileSelNameBoxTex[];
extern u64 gFileSelFileInfoBox1Tex[];
extern u64 gFileSelFileInfoBox2Tex[];
extern u64 gFileSelFileInfoBox3Tex[];
extern u64 gFileSelFileInfoBox4Tex[];
extern u64 gFileSelFileInfoBox5Tex[];
extern u64 gFileSelDISKButtonTex[];
extern u64 gFileSelOptionsDividerTex[];
extern u64 gFileSelBrightnessCheckTex[];
extern u64 gFileSelBigButtonHighlightTex[];
extern u64 gFileSelCharHighlightTex[];
extern u64 gFileSelMediumButtonHighlightTex[];
extern u64 gFileSelSmallButtonHighlightTex[];
extern u64 gFileSelKokiriEmeraldTex[];
extern u64 gFileSelGoronRubyTex[];
extern u64 gFileSelZoraSapphireTex[];
extern u64 gFileSelNoFileToCopyENGTex[];
extern u64 gFileSelNoFileToEraseENGTex[];
extern u64 gFileSelNoEmptyFileENGTex[];
extern u64 gFileSelFileEmptyENGTex[];
extern u64 gFileSelFileInUseENGTex[];
extern u64 gFileSelNoFileToCopyGERTex[];
extern u64 gFileSelNoFileToEraseGERTex[];
extern u64 gFileSelNoEmptyFileGERTex[];
extern u64 gFileSelFileEmptyGERTex[];
extern u64 gFileSelFileInUseGERTex[];
extern u64 gFileSelNoFileToCopyFRATex[];
extern u64 gFileSelNoFileToEraseFRATex[];
extern u64 gFileSelNoEmptyFileFRATex[];
extern u64 gFileSelFileEmptyFRATex[];
extern u64 gFileSelFileInUseFRATex[];
extern u64 gFileSelCopyWhichFileENGTex[];
extern u64 gFileSelCopyToWhichFileENGTex[];
extern u64 gFileSelAreYouSureENGTex[];
extern u64 gFileSelFileCopiedENGTex[];
extern u64 gFileSelWhichFile1GERTex[];
extern u64 gFileSelCopyToWhichFileGERTex[];
extern u64 gFileSelAreYouSureGERTex[];
extern u64 gFileSelFileCopiedGERTex[];
extern u64 gFileSelCopyWhichFileFRATex[];
extern u64 gFileSelCopyToWhichFileFRATex[];
extern u64 gFileSelAreYouSureFRATex[];
extern u64 gFileSelFileCopiedFRATex[];
extern u64 gFileSelPleaseSelectAFileENGTex[];
extern u64 gFileSelOpenThisFileENGTex[];
extern u64 gFileSelPleaseSelectAFileGERTex[];
extern u64 gFileSelOpenThisFileGERTex[];
extern u64 gFileSelPleaseSelectAFileFRATex[];
extern u64 gFileSelOpenThisFileFRATex[];
extern u64 gFileSelEraseWhichFileENGTex[];
extern u64 gFileSelAreYouSure2ENGTex[];
extern u64 gFileSelFileErasedENGTex[];
extern u64 gFileSelWhichFile2GERTex[];
extern u64 gFileSelAreYouSure2GERTex[];
extern u64 gFileSelFileErasedGERTex[];
extern u64 gFileSelEraseWhichFileFRATex[];
extern u64 gFileSelAreYouSure2FRATex[];
extern u64 gFileSelFileErasedFRATex[];
extern u64 gFileSelOptionsENGTex[];
extern u64 gFileSelOptionsGERTex[];
extern u64 gFileSelNameENGTex[];
extern u64 gFileSelNameGERTex[];
extern u64 gFileSelNameFRATex[];
extern u64 gFileSelControlsENGTex[];
extern u64 gFileSelControlsGERTex[];
extern u64 gFileSelControlsFRATex[];
extern u64 gFileSelCopyButtonENGTex[];
extern u64 gFileSelCopyButtonGERTex[];
extern u64 gFileSelCopyButtonFRATex[];
extern u64 gFileSelFile1ButtonENGTex[];
extern u64 gFileSelFile2ButtonENGTex[];
extern u64 gFileSelFile3ButtonENGTex[];
extern u64 gFileSelFile1ButtonGERTex[];
extern u64 gFileSelFile2ButtonGERTex[];
extern u64 gFileSelFile3ButtonGERTex[];
extern u64 gFileSelFile1ButtonFRATex[];
extern u64 gFileSelFile2ButtonFRATex[];
extern u64 gFileSelFile3ButtonFRATex[];
extern u64 gFileSelYesButtonENGTex[];
extern u64 gFileSelYesButtonGERTex[];
extern u64 gFileSelYesButtonFRATex[];
extern u64 gFileSelEraseButtonENGTex[];
extern u64 gFileSelEraseButtonGERTex[];
extern u64 gFileSelEraseButtonFRATex[];
extern u64 gFileSelQuitButtonENGTex[];
extern u64 gFileSelQuitButtonGERTex[];
extern u64 gFileSelQuitButtonFRATex[];
extern u64 gFileSelSurroundENGTex[];
extern u64 gFileSelHeadsetENGTex[];
extern u64 gFileSelHeadsetGERTex[];
extern u64 gFileSelHeadsetFRATex[];
extern u64 gFileSelMonoENGTex[];
extern u64 gFileSelSOUNDENGTex[];
extern u64 gFileSelSOUNDFRATex[];
extern u64 gFileSelStereoENGTex[];
extern u64 gFileSelStereoFRATex[];
extern u64 gFileSelLTargetingENGTex[];
extern u64 gFileSelLTargetingGERTex[];
extern u64 gFileSelLTargetingFRATex[];
extern u64 gFileSelSwitchENGTex[];
extern u64 gFileSelSwitchGERTex[];
extern u64 gFileSelSwitchFRATex[];
extern u64 gFileSelHoldENGTex[];
extern u64 gFileSelHoldGERTex[];
extern u64 gFileSelHoldFRATex[];
extern u64 gFileSelCheckBrightnessENGTex[];
extern u64 gFileSelCheckBrightnessGERTex[];
extern u64 gFileSelCheckBrightnessFRATex[];
extern u64 gFileSelWidescreenENGTex[];
extern u64 gFileSel4BY3ENGTex[];
extern u64 gFileSel16BY9ENGTex[];
extern u64 gFileSelOptionsButtonENGTex[];
extern u64 gFileSelOptionsButtonGERTex[];
extern u64 gFileSelSaveXTex[];
extern Gfx gFileSelWindow1DL[];
extern Gfx gFileSelWindow2DL[];
extern Gfx gFileSelWindow3DL[];
#endif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion include/config/config_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
* Use the button combo Z + R + D-Pad Up to toggle
* Note: pre-rendered scenes with the fixed camera mode won't re-scale properly
*/
#define ENABLE_WIDESCREEN false
#define ENABLE_WIDESCREEN true

// Force widescreen mode regardless of SaveContext
#define FORCE_WIDESCREEN false
Expand Down
2 changes: 1 addition & 1 deletion include/config/config_safeguards.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
#if FORCE_WIDESCREEN
#define USE_WIDESCREEN true
#else
#define USE_WIDESCREEN (ENABLE_WIDESCREEN && gSaveContext.save.useWidescreen == true)
#define USE_WIDESCREEN (ENABLE_WIDESCREEN && gSaveContext.useWidescreen == true)
#endif


Expand Down
2 changes: 1 addition & 1 deletion include/z64save.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ typedef struct {
/* 0x14 */ s32 totalDays;
/* 0x18 */ s32 bgsDayCount; // increments with totalDays, can be cleared with `Environment_ClearBgsDayCount`
/* 0x1C */ SaveInfo info; // "information"
u8 useWidescreen;
} Save;

typedef struct {
Expand Down Expand Up @@ -300,6 +299,7 @@ typedef struct {
/* 0x1420 */ s16 worldMapArea;
/* 0x1422 */ s16 sunsSongState; // controls the effects of suns song
/* 0x1424 */ s16 healthAccumulator;
u8 useWidescreen;
} SaveContext; // size = 0x1428

typedef enum {
Expand Down
2 changes: 1 addition & 1 deletion src/code/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {

if (ENABLE_WIDESCREEN && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_DUP) &&
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_Z | BTN_R)) {
gSaveContext.save.useWidescreen ^= 1;
gSaveContext.useWidescreen ^= 1;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/code/z_common_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ void SaveContext_Init(void) {
gSaveContext.dogIsLost = true;
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
gSaveContext.save.useWidescreen = false;
gSaveContext.useWidescreen = false;
}
6 changes: 4 additions & 2 deletions src/overlays/gamestates/ovl_file_choose/file_select.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ typedef enum {
/* 37 */ CM_OPTIONS_MENU,
/* 38 */ CM_START_OPTIONS,
/* 39 */ CM_OPTIONS_TO_MAIN,
/* 40 */ CM_UNUSED_DELAY
/* 40 */ CM_UNUSED_DELAY,
CM_OPTIONS_PAGE_2
} ConfigMode;

typedef enum {
Expand Down Expand Up @@ -144,7 +145,8 @@ typedef enum {

typedef enum {
/* 0 */ FS_SETTING_AUDIO,
/* 1 */ FS_SETTING_TARGET
/* 1 */ FS_SETTING_TARGET,
/* 2 */ FS_SETTING_WIDESCREEN
} SettingIndex;

typedef enum {
Expand Down
Loading