Skip to content

Commit

Permalink
Merge pull request #4343 from Archez/merge-develop-rando-sep14
Browse files Browse the repository at this point in the history
Merge develop -> develop-rando
  • Loading branch information
Archez authored Sep 15, 2024
2 parents c507d4d + 8359d2a commit e75400a
Show file tree
Hide file tree
Showing 35 changed files with 834 additions and 840 deletions.
31 changes: 31 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,37 @@ include(CMake/lus-cvars.cmake)
set(PROJECT_BUILD_NAME "MacReady Golf" CACHE STRING "" FORCE)
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "" FORCE)

execute_process(
COMMAND git branch --show-current
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

set(CMAKE_PROJECT_GIT_BRANCH "${GIT_BRANCH}" CACHE STRING "Git branch" FORCE)

execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

set(CMAKE_PROJECT_GIT_COMMIT_HASH "${GIT_COMMIT_HASH}" CACHE STRING "Git commit hash" FORCE)

execute_process(
COMMAND git describe --tags --abbrev=0 --exact-match HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(NOT GIT_COMMIT_TAG)
set(GIT_COMMIT_TAG "" CACHE STRING "Git commit tag" FORCE)
endif()

set(CMAKE_PROJECT_GIT_COMMIT_TAG "${GIT_COMMIT_TAG}" CACHE STRING "Git commit tag" FORCE)

set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/utf-8>)
Expand Down
17 changes: 5 additions & 12 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@ Requires:
* At least 8GB of RAM (machines with 4GB have seen complier failures)
* Visual Studio 2022 Community Edition with the C++ feature set
* One of the Windows SDKs that comes with Visual Studio, for example the current Windows 10 version 10.0.19041.0
* The `MSVC v142 - VS 2019 C++ build tools` component of Visual Studio
* The `MSVC v143 - VS 2022 C++ build tools` component of Visual Studio
* Python 3 (can be installed manually or as part of Visual Studio)
* Git (can be installed manually or as part of Visual Studio)
* Cmake (can be installed via chocolatey or manually)

During installation, check the "Desktop development with C++" feature set:

![image](https://user-images.githubusercontent.com/30329717/183511274-d11aceea-7900-46ec-acb6-3f2cc110021a.png)
Doing so should also check one of the Windows SDKs by default. Then, in the installation details in the right-hand column, make sure you also check the v142 toolset.
Doing so should also check one of the Windows SDKs by default. Then, in the installation details in the right-hand column, make sure you also check the v143 toolset. This is often done by default.

You can also find the v142 toolset by searching through the individual components tab:

![image](https://user-images.githubusercontent.com/30329717/183521169-ead6a73b-a1bf-4e99-aab8-441746d8f08e.png)
While you're there, you can also install Python 3 and Git if needed.
It is recommended that you install Python and Git standalone, the install process in VS Installer has given some issues in the past.

1. Clone the Ship of Harkinian repository

Expand All @@ -33,9 +30,7 @@ _Note: Instructions assume using powershell_
cd Shipwright
# Setup cmake project
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging)
# or for VS2019
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging)
# Extract assets & generate OTR (run this anytime you need to regenerate OTR)
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssets # --config Release (if you're packaging)
# Compile project
Expand All @@ -60,9 +55,7 @@ With the cmake build system you have two options for working on the project:
To develop using Visual Studio you only need to use cmake to generate the solution file:
```powershell
# Generates Ship.sln at `build/x64` for Visual Studio 2022
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64
# or for Visual Studio 2019
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64
```

#### Visual Studio Code or another editor
Expand Down
2 changes: 1 addition & 1 deletion libultraship
Submodule libultraship updated 58 files
+1 −1 .github/workflows/tidy-format-validation.yml
+6 −4 cmake/dependencies/common.cmake
+1 −0 include/libultraship/libultra/gbi.h
+2 −2 include/libultraship/libultra/os.h
+3 −0 src/CMakeLists.txt
+10 −10 src/Context.cpp
+6 −9 src/Context.h
+3 −5 src/audio/Audio.cpp
+3 −1 src/audio/Audio.h
+0 −2 src/audio/AudioPlayer.cpp
+32 −4 src/audio/AudioPlayer.h
+1 −7 src/audio/SDLAudioPlayer.cpp
+2 −2 src/audio/SDLAudioPlayer.h
+0 −6 src/audio/WasapiAudioPlayer.cpp
+6 −6 src/audio/WasapiAudioPlayer.h
+1 −1 src/config/Config.cpp
+2 −2 src/controller/controldeck/ControlDeck.cpp
+2 −3 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToAxisDirectionMapping.cpp
+2 −2 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToButtonMapping.cpp
+4 −3 src/controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h
+2 −0 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAnyMapping.cpp
+8 −0 src/controller/controldevice/controller/mapping/sdl/SDLButtonToAnyMapping.cpp
+2 −2 src/controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLGyroMapping.cpp
+4 −1 src/graphic/Fast3D/Fast3dWindow.cpp
+3 −3 src/graphic/Fast3D/debug/GfxDebugger.cpp
+2 −3 src/graphic/Fast3D/debug/GfxDebugger.h
+11 −6 src/graphic/Fast3D/gfx_dxgi.cpp
+51 −19 src/graphic/Fast3D/gfx_pc.cpp
+2 −1 src/graphic/Fast3D/gfx_pc.h
+10 −4 src/graphic/Fast3D/gfx_sdl2.cpp
+1 −0 src/graphic/Fast3D/lus_gbi.h
+1 −1 src/public/bridge/gfxdebuggerbridge.cpp
+1 −0 src/resource/ResourceType.h
+1 −1 src/resource/archive/Archive.cpp
+1 −1 src/resource/factory/DisplayListFactory.cpp
+15 −0 src/resource/factory/LightFactory.cpp
+11 −0 src/resource/factory/LightFactory.h
+11 −0 src/resource/type/Light.cpp
+65 −0 src/resource/type/Light.h
+12 −0 src/utils/binarytools/BinaryReader.cpp
+1 −0 src/utils/binarytools/BinaryReader.h
+10 −0 src/window/Window.cpp
+3 −0 src/window/Window.h
+44 −13 src/window/gui/ConsoleWindow.cpp
+1 −1 src/window/gui/ConsoleWindow.h
+335 −62 src/window/gui/GfxDebuggerWindow.cpp
+1 −1 src/window/gui/GfxDebuggerWindow.h
+126 −72 src/window/gui/Gui.cpp
+11 −2 src/window/gui/Gui.h
+6 −46 src/window/gui/GuiElement.cpp
+3 −8 src/window/gui/GuiElement.h
+46 −1 src/window/gui/GuiMenuBar.cpp
+10 −1 src/window/gui/GuiMenuBar.h
+67 −2 src/window/gui/GuiWindow.cpp
+12 −1 src/window/gui/GuiWindow.h
+3 −5 src/window/gui/InputEditorWindow.cpp
+0 −2 src/window/gui/StatsWindow.cpp
5 changes: 4 additions & 1 deletion soh/include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ extern "C"
extern u16 gBuildVersionMajor;
extern u16 gBuildVersionMinor;
extern u16 gBuildVersionPatch;
extern u8 gBuildTeam[];
extern u8 gGitBranch[];
extern u8 gGitCommitHash[];
extern u8 gGitCommitTag[];
extern u8 gBuildTeam[];
extern u8 gBuildDate[];
extern u8 gBuildMakeOption[];
extern OSMesgQueue gPiMgrCmdQ;
Expand Down
2 changes: 2 additions & 0 deletions soh/soh/CrashHandlerExt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ extern "C" void CrashHandler_PrintSohData(char* buffer, size_t* pos) {
char intCharBuffer[16];
append_line(buffer, pos, "Build Information:");
WRITE_VAR_LINE(buffer, pos, "Game Version: ", (const char*)gBuildVersion);
WRITE_VAR_LINE(buffer, pos, "Git Branch: ", (const char*)gGitBranch);
WRITE_VAR_LINE(buffer, pos, "Git Commit: ", (const char*)gGitCommitHash);
WRITE_VAR_LINE(buffer, pos, "Build Date: ", (const char*)gBuildDate);

if (gPlayState != nullptr) {
Expand Down
7 changes: 0 additions & 7 deletions soh/soh/Enhancements/audio/AudioEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,6 @@ void AudioEditor::InitElement() {
void AudioEditor::DrawElement() {
AudioCollection::Instance->InitializeShufflePool();

ImGui::SetNextWindowSize(ImVec2(820, 630), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("Audio Editor", &mIsVisible)) {
ImGui::End();
return;
}

float buttonSegments = ImGui::GetContentRegionAvail().x / 4;
if (ImGui::Button("Randomize All Groups", ImVec2(buttonSegments, 30.0f))) {
AudioEditor_RandomizeAll();
Expand Down Expand Up @@ -700,7 +694,6 @@ void AudioEditor::DrawElement() {

ImGui::EndTabBar();
}
ImGui::End();
}

std::vector<SeqType> allTypes = { SEQ_BGM_WORLD, SEQ_BGM_EVENT, SEQ_BGM_BATTLE, SEQ_OCARINA, SEQ_FANFARE, SEQ_INSTRUMENT, SEQ_SFX, SEQ_VOICE };
Expand Down
Loading

0 comments on commit e75400a

Please sign in to comment.