Skip to content

Commit

Permalink
Merge branch 'main' into cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
z64a committed Jun 14, 2024
2 parents 14a83b9 + 0cec8ae commit 9f4aff7
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 149 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

# suppress asm/nonmatchings/ in GitHub diffs
asm/nonmatchings/**/*.s linguist-generated

*.c diff=cpp
*.h diff=cpp

src/world/dead/**/* merge=ours
18 changes: 10 additions & 8 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# If the tests pass then the PR is automatically merged by GitHub.
name: Sync upstream
env:
UPSTREAM: pmret/papermario # If you forked dx, change this to star-haven/papermario-dx! (TODO: do this automatically)
UPSTREAM_BRANCH: main
BASE_BRANCH: main
on:
Expand All @@ -21,8 +20,15 @@ jobs:
with:
fetch-depth: 0
ref: ${{ env.BASE_BRANCH }}
- name: Determine upstream
run: |
if [[ "${{ github.repository }}" == "bates64/papermario-dx" ]]; then
echo "UPSTREAM=pmret/papermario" >> $GITHUB_ENV
else
echo "UPSTREAM=bates64/papermario-dx" >> $GITHUB_ENV
fi
- name: Fetch upstream
run: git fetch https://github.com/${{ env.UPSTREAM }}.git ${UPSTREAM_BRANCH}
run: git fetch https://github.com/$UPSTREAM.git $UPSTREAM_BRANCH
- name: Set git user
# https://github.com/orgs/community/discussions/26560
run: |
Expand All @@ -32,13 +38,9 @@ jobs:
run: |
git checkout ${BASE_BRANCH}
git merge --no-ff --log FETCH_HEAD -m "Merge upstream changes"
- name: Push changes
run: git push origin ${BASE_BRANCH}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
run: |
gh pr create --title "Sync with ${{ env.UPSTREAM }}" --body "Automated PR to keep this repository in sync with upstream. Beep boop." --base ${BASE_BRANCH}
gh pr create --title "Sync with $UPSTREAM" --body "Automated PR to keep this repository in sync with upstream. Beep boop." --base ${BASE_BRANCH}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion include/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ typedef struct PauseMapSpace {
} PauseMapSpace; // size = 0x14

typedef struct MenuPanel {
/* 0x00 */ u8 initialized;
/* 0x00 */ b8 initialized;
/* 0x01 */ s8 col;
/* 0x02 */ s8 row;
/* 0x03 */ u8 selected; // usually set to the current value from gridData
Expand Down
16 changes: 8 additions & 8 deletions include/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -5292,14 +5292,14 @@ enum WindowID {
WIN_FILES_OPTION_LEFT = 53,
WIN_FILES_OPTION_CENTER = 54,
WIN_FILES_OPTION_RIGHT = 55,
WIN_FILES_SLOT0_BODY = 56,
WIN_FILES_SLOT1_BODY = 57,
WIN_FILES_SLOT2_BODY = 58,
WIN_FILES_SLOT3_BODY = 59,
WIN_FILES_SLOT0_TITLE = 60,
WIN_FILES_SLOT1_TITLE = 61,
WIN_FILES_SLOT2_TITLE = 62,
WIN_FILES_SLOT3_TITLE = 63,
WIN_FILES_SLOT1_BODY = 56,
WIN_FILES_SLOT2_BODY = 57,
WIN_FILES_SLOT3_BODY = 58,
WIN_FILES_SLOT4_BODY = 59,
WIN_FILES_SLOT1_TITLE = 60,
WIN_FILES_SLOT2_TITLE = 61,
WIN_FILES_SLOT3_TITLE = 62,
WIN_FILES_SLOT4_TITLE = 63,
};

enum SimpleWindowUpdateID {
Expand Down
7 changes: 7 additions & 0 deletions include/filemenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,25 @@ enum {
FM_MAIN_SELECT_DELETE = 1, // choose which file to delete
FM_MAIN_SELECT_COPY_FROM = 2,
FM_MAIN_SELECT_COPY_TO = 3,

FM_CONFIRM_DELETE = 0,
FM_CONFIRM_CREATE = 1,
FM_CONFIRM_COPY = 2, // unused
FM_CONFIRM_START = 3,

FM_MESSAGE_DELETED = 0,
FM_MESSAGE_COPIED = 1,
FM_MESSAGE_CREATED = 2,

FM_INPUT_CHARSET_A = 0,
FM_INPUT_CHARSET_B = 1,
};

enum {
FM_MAIN_OPT_FILE_1 = 0,
FM_MAIN_OPT_FILE_2 = 1,
FM_MAIN_OPT_FILE_3 = 2,
FM_MAIN_OPT_FILE_4 = 3,
FM_MAIN_OPT_DELETE = 4,
FM_MAIN_OPT_COPY = 5,
FM_MAIN_OPT_CANCEL = 6,
Expand Down
8 changes: 3 additions & 5 deletions src/filemenu/filemenu_createfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ s32 D_8024A18C = -4;
#define WINDOW_2_Y (55)
#define WINDOW_2_HEIGHT (133)
#define ROWS (8)
#define INPUT_FINAL_PAGE (1)
extern u8 D_filemenu_80250958[];
extern u8 D_filemenu_80250960[];
#else
#define WINDOW_1_Y (10)
#define WINDOW_2_Y (67)
#define WINDOW_2_HEIGHT (113)
#define ROWS (6)
#define INPUT_FINAL_PAGE (2)
#endif

MenuWindowBP filemenu_createfile_windowBPs[] = {
Expand Down Expand Up @@ -488,7 +486,7 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) {
gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -70;

filemenu_currentMenu = FILE_MENU_CONFIRM;
filemenu_menus[filemenu_currentMenu]->state = INPUT_FINAL_PAGE;
filemenu_menus[filemenu_currentMenu]->state = FM_CONFIRM_CREATE;
filemenu_set_selected(filemenu_menus[filemenu_currentMenu], 0, 0);
return;
default:
Expand Down Expand Up @@ -528,10 +526,10 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) {
set_window_update(WIN_FILES_OPTION_CENTER, (s32) &filemenu_update_show_with_rotation);
set_window_update(WIN_FILES_OPTION_RIGHT, (s32) &filemenu_update_show_with_rotation);
set_window_update(WIN_FILES_OPTION_LEFT, (s32) &filemenu_update_show_with_rotation);
set_window_update(WIN_FILES_SLOT0_BODY, (s32) &filemenu_update_show_with_rotation);
set_window_update(WIN_FILES_SLOT1_BODY, (s32) &filemenu_update_show_with_rotation);
set_window_update(WIN_FILES_SLOT2_BODY, (s32) &filemenu_update_show_with_rotation);
set_window_update(WIN_FILES_SLOT3_BODY, (s32) &filemenu_update_show_with_rotation);
set_window_update(WIN_FILES_SLOT4_BODY, (s32) &filemenu_update_show_with_rotation);
filemenu_currentMenu = FILE_MENU_MAIN;
return;
}
Expand Down Expand Up @@ -571,7 +569,7 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) {
gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -70;

filemenu_currentMenu = FILE_MENU_CONFIRM;
filemenu_menus[FILE_MENU_CONFIRM]->state = INPUT_FINAL_PAGE;
filemenu_menus[FILE_MENU_CONFIRM]->state = FM_CONFIRM_CREATE;
filemenu_set_selected(filemenu_menus[FILE_MENU_CONFIRM], 0, 0);
}
}
Expand Down
Loading

0 comments on commit 9f4aff7

Please sign in to comment.