Fix THI black title screen glitch [build]

This commit is contained in:
Agent X 2025-05-04 16:45:43 -04:00
parent 3e1c04dbe7
commit d66efc4671
6 changed files with 129 additions and 26 deletions

View file

@ -6,7 +6,7 @@ on:
branches: [ dev ]
jobs:
build-ubuntu:
build-linux:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: ubuntu-latest
steps:
@ -16,18 +16,61 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential git python3 libglew-dev libsdl2-dev libz-dev libcurl4-openssl-dev
sudo apt install -y build-essential git python3 libglew-dev libsdl2-dev libz-dev libcurl4-openssl-dev zip
- name: Build the game
run: make -j$(nproc)
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_Linux.zip dynos lang mods palettes libdiscord_game_sdk.so sm64coopdx
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-ubuntu
path: ./build/us_pc/sm64coopdx
name: sm64coopdx-linux
path: ./build/us_pc/sm64coopdx_Linux.zip
build-steamos:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
build-windows:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential git python3 libglew-dev libsdl2-dev libz-dev libcurl4-openssl-dev zip
- name: Build the game
run: make -j$(nproc) HANDHELD=1
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_SteamOS.zip dynos lang mods palettes libdiscord_game_sdk.so sm64coopdx
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-steamos
path: ./build/us_pc/sm64coopdx_SteamOS.zip
build-windows-opengl:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: windows-latest
defaults:
@ -55,15 +98,77 @@ jobs:
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL
python3
zip
- name: Build the game
run: make -j$(nproc)
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file.exe hash_file.cpp
echo "::notice ::$(./hash_file.exe ../build/us_pc/sm64coopdx.exe)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_Windows_OpenGL.zip dynos lang mods palettes coop.map discord_game_sdk.dll sm64coopdx.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-windows
path: ./build/us_pc/sm64coopdx.exe
name: sm64coopdx-windows-opengl
path: ./build/us_pc/sm64coopdx_Windows_OpenGL.zip
build-windows-directx:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >
unzip
make
git
mingw-w64-i686-gcc
mingw-w64-x86_64-gcc
mingw-w64-i686-glew
mingw-w64-x86_64-glew
mingw-w64-i686-SDL2
mingw-w64-i686-SDL
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL
python3
zip
- name: Build the game
run: make -j$(nproc) RENDER_API=D3D11 WINDOW_API=DXGI
- name: Generate hash
run: |
cd tools
g++ -std=c++17 -o hash_file.exe hash_file.cpp
echo "::notice ::$(./hash_file.exe ../build/us_pc/sm64coopdx.exe)"
- name: Zip the game
run: |
cd ./build/us_pc
zip -r sm64coopdx_Windows_DirectX.zip dynos lang mods palettes coop.map discord_game_sdk.dll sm64coopdx.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sm64coopdx-windows-directx
path: ./build/us_pc/sm64coopdx_Windows_DirectX.zip
build-macos-arm:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
@ -74,7 +179,7 @@ jobs:
- name: Install dependencies
run: |
brew install make mingw-w64 gcc sdl2 pkg-config glew glfw3 libusb coreutils
brew install make mingw-w64 sdl2 pkg-config glew glfw3 coreutils
- name: Build the game
run: |
@ -110,7 +215,7 @@ jobs:
- name: Install dependencies
run: |
brew install make mingw-w64 gcc@9 sdl2 pkg-config glew glfw3 libusb coreutils
brew install make mingw-w64 gcc@9 sdl2 pkg-config glew glfw3 coreutils
- name: Build the game
run: |

View file

@ -4944,11 +4944,11 @@ function warp_special(arg)
-- ...
end
--- @param arg0 integer
--- @param param integer
--- @param levelNum integer
--- @return integer
--- Sets the level number and handles the act select screen
function lvl_set_current_level(arg0, levelNum)
--- Sets the level number and handles the act select screen. `param` is used for overriding the level ID in level scripts, set to 0 in Lua
function lvl_set_current_level(param, levelNum)
-- ...
end

View file

@ -6410,22 +6410,22 @@ Special warps to arg (`SPECIAL_WARP_*`)
## [lvl_set_current_level](#lvl_set_current_level)
### Description
Sets the level number and handles the act select screen
Sets the level number and handles the act select screen. `param` is used for overriding the level ID in level scripts, set to 0 in Lua
### Lua Example
`local integerValue = lvl_set_current_level(arg0, levelNum)`
`local integerValue = lvl_set_current_level(param, levelNum)`
### Parameters
| Field | Type |
| ----- | ---- |
| arg0 | `integer` |
| param | `integer` |
| levelNum | `integer` |
### Returns
- `integer`
### C Prototype
`s32 lvl_set_current_level(s16 arg0, s16 levelNum);`
`s32 lvl_set_current_level(s16 param, s16 levelNum);`
[:arrow_up_small:](#)

View file

@ -1538,14 +1538,12 @@ void update_menu_level(void) {
gChangeLevel = curLevel;
gChangeActNum = 6;
gDemoCountdown = 0;
}
if (gIsDemoActive) { return; }
if (gCurrAreaIndex != 2 && gCurrLevelNum == LEVEL_THI) {
} else if (gCurrAreaIndex != 2 && gCurrLevelNum == LEVEL_THI) {
sWarpDest.type = WARP_TYPE_CHANGE_AREA;
sWarpDest.areaIdx = 2;
sWarpDest.nodeId = 0x0A;
}
if (gIsDemoActive) { return; }
struct Object *o;
// set mario/camera pos
@ -1920,9 +1918,9 @@ s32 lvl_init_from_save_file(UNUSED s16 arg0, s16 levelNum) {
return levelNum;
}
s32 lvl_set_current_level(s16 arg0, s16 levelNum) {
s32 lvl_set_current_level(s16 param, s16 levelNum) {
s32 warpCheckpointActive = sWarpCheckpointActive;
s16 level = arg0 != 0 ? arg0 : levelNum;
s16 level = param != 0 ? param : levelNum;
sWarpCheckpointActive = FALSE;
gCurrLevelNum = level;

View file

@ -198,8 +198,8 @@ void initiate_warp(s16 destLevel, s16 destArea, s16 destWarpNode, s32 arg);
s32 lvl_init_or_update(s16 initOrUpdate, UNUSED s32 unused);
s32 lvl_init_from_save_file(UNUSED s16 arg0, s16 levelNum);
/* |description|Sets the level number and handles the act select screen|descriptionEnd| */
s32 lvl_set_current_level(s16 arg0, s16 levelNum);
/* |description|Sets the level number and handles the act select screen. `param` is used for overriding the level ID in level scripts, set to 0 in Lua|descriptionEnd| */
s32 lvl_set_current_level(s16 param, s16 levelNum);
s32 lvl_play_the_end_screen_sound(UNUSED s16 arg0, UNUSED s32 arg1);
void basic_update(UNUSED s16 *arg);

View file

@ -15314,12 +15314,12 @@ int smlua_func_lvl_set_current_level(lua_State* L) {
return 0;
}
s16 arg0 = smlua_to_integer(L, 1);
s16 param = smlua_to_integer(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lvl_set_current_level"); return 0; }
s16 levelNum = smlua_to_integer(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "lvl_set_current_level"); return 0; }
lua_pushinteger(L, lvl_set_current_level(arg0, levelNum));
lua_pushinteger(L, lvl_set_current_level(param, levelNum));
return 1;
}