mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Merge branch 'HarbourMasters:develop' into develop
This commit is contained in:
commit
9adc79ebad
26 changed files with 937 additions and 129 deletions
402
.gitignore
vendored
Normal file
402
.gitignore
vendored
Normal file
|
@ -0,0 +1,402 @@
|
|||
# Cache files
|
||||
__pycache__/
|
||||
.pyc
|
||||
.DS_Store
|
||||
|
||||
# Text editor remnants
|
||||
.vscode/
|
||||
.vs/
|
||||
.idea/
|
||||
CMakeLists.txt
|
||||
cmake-build-debug
|
||||
venv/
|
||||
|
||||
# Project-specific ignores
|
||||
build/
|
||||
expected/
|
||||
notes/
|
||||
baserom/
|
||||
docs/doxygen/
|
||||
*.elf
|
||||
*.sra
|
||||
*.z64
|
||||
*.n64
|
||||
*.v64
|
||||
*.map
|
||||
*.dump
|
||||
out.txt
|
||||
|
||||
# Tool artifacts
|
||||
tools/mipspro7.2_compiler/
|
||||
tools/overlayhelpers/batchdisasm/output/*
|
||||
tools/overlayhelpers/batchdisasm/output2/*
|
||||
tools/overlayhelpers/batchdisasm/mipsdisasm/*
|
||||
tools/disasm/output/*
|
||||
tools/asmsplitter/asm/*
|
||||
tools/asmsplitter/c/*
|
||||
ctx.c
|
||||
tools/*dSYM/
|
||||
graphs/
|
||||
|
||||
# Assets
|
||||
*.png
|
||||
*.jpg
|
||||
*.mdli
|
||||
*.anmi
|
||||
*.obj
|
||||
*.mtl
|
||||
*.fbx
|
||||
!*_custom*
|
||||
.extracted-assets.json
|
||||
|
||||
# Docs
|
||||
!docs/tutorial/
|
||||
|
||||
# Per-user configuration
|
||||
.python-version
|
||||
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
*.out
|
||||
*.o
|
||||
*.d
|
||||
lib/libgfxd/libgfxd.a
|
||||
ExporterTest/ExporterTest.a
|
||||
ZAPDUtils/ZAPDUtils.a
|
||||
.vscode/
|
||||
build/
|
||||
ZAPDUtils/build/
|
||||
ZAPD/BuildInfo.h
|
||||
|
||||
DebugObj/*
|
||||
ReleaseObj/*
|
22
BUILDING.md
Normal file
22
BUILDING.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Building Ship of Harkinian
|
||||
|
||||
1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe)
|
||||
2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/)
|
||||
2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`.
|
||||
4. Clone the Ship of Harkinian repository.
|
||||
5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice.
|
||||
6. Run `OTRExporter/OTRExporter.sln`.
|
||||
7. Switch the solution to `Release x64`.
|
||||
8. Build the solution.
|
||||
9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`.
|
||||
10. Run `soh/soh.sln`
|
||||
11. Switch the solution to `Release x86`.
|
||||
12. Build the solution.
|
||||
13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`.
|
||||
14. Launch `soh.exe`.
|
||||
|
||||
## Compatible Roms
|
||||
```
|
||||
OOT_PAL_GC checksum 0x09465AC3
|
||||
OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest)
|
||||
```
|
20
README.md
20
README.md
|
@ -63,26 +63,8 @@ Official Discord: https://discord.com/invite/BtBmd55HVH
|
|||
|
||||
## Building The Ship of Harkinian
|
||||
|
||||
1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe)
|
||||
2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/)
|
||||
2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`.
|
||||
4. Clone the Ship of Harkinian repository.
|
||||
5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice.
|
||||
6. Run `OTRExporter/OTRExporter.sln`.
|
||||
7. Switch the solution to `Release x64`.
|
||||
8. Build the solution.
|
||||
9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`.
|
||||
10. Run `soh/soh.sln`
|
||||
11. Switch the solution to `Release x86`.
|
||||
12. Build the solution.
|
||||
13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`.
|
||||
14. Launch `soh.exe`.
|
||||
Refer to the [building instructions](https://github.com/HarbourMasters/Shipwright/BUILDING.md) to compile SoH.
|
||||
|
||||
## Compatible Roms
|
||||
```
|
||||
OOT_PAL_GC checksum 0x09465AC3
|
||||
OOT_PAL_GC_DBG1 checksum 0x871E1C92 (debug non-master quest)
|
||||
```
|
||||
## Troubleshooting The Exporter
|
||||
- Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe
|
||||
- Affirm that `zapd.exe` exists in the `/assets/extractor` folder
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "spdlog/spdlog.h"
|
||||
#include "GlobalCtx2.h"
|
||||
#include "Window.h"
|
||||
#include "GameSettings.h"
|
||||
|
||||
namespace Ship {
|
||||
ConfigFile::ConfigFile(std::shared_ptr<GlobalCtx2> Context, const std::string& Path) : Context(Context), Path(Path), File(Path.c_str()) {
|
||||
|
@ -149,6 +150,8 @@ namespace Ship {
|
|||
(*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKDOWN)] = std::to_string(0x01F);
|
||||
(*this)["KEYBOARD CONTROLLER BINDING 4"][STR(BTN_STICKUP)] = std::to_string(0x011);
|
||||
|
||||
(*this)["ENHANCEMENT SETTINGS"]["TEXT_SPEED"] = "1";
|
||||
|
||||
(*this)["SDL CONTROLLER 1"]["GUID"] = "";
|
||||
(*this)["SDL CONTROLLER 2"]["GUID"] = "";
|
||||
(*this)["SDL CONTROLLER 3"]["GUID"] = "";
|
||||
|
|
|
@ -49,8 +49,11 @@ namespace Game {
|
|||
Settings.debug.n64mode = stob(Conf[ConfSection]["n64_mode"]);
|
||||
|
||||
// Enhancements
|
||||
Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]);
|
||||
CVar_SetS32("gFastText", Settings.enhancements.fast_text);
|
||||
Settings.enhancements.skip_text = stob(Conf[EnhancementSection]["skip_text"]);
|
||||
CVar_SetS32("gSkipText", Settings.enhancements.skip_text);
|
||||
|
||||
Settings.enhancements.text_speed = Ship::stoi(Conf[EnhancementSection]["text_speed"]);
|
||||
CVar_SetS32("gTextSpeed", Settings.enhancements.text_speed);
|
||||
|
||||
Settings.enhancements.disable_lod = stob(Conf[EnhancementSection]["disable_lod"]);
|
||||
CVar_SetS32("gDisableLOD", Settings.enhancements.disable_lod);
|
||||
|
@ -58,12 +61,21 @@ namespace Game {
|
|||
Settings.enhancements.animated_pause_menu = stob(Conf[EnhancementSection]["animated_pause_menu"]);
|
||||
CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu);
|
||||
|
||||
Settings.enhancements.dynamic_wallet_icon = stob(Conf[EnhancementSection]["dynamic_wallet_icon"]);
|
||||
CVar_SetS32(const_cast<char*>("gDynamicWalletIcon"), Settings.enhancements.dynamic_wallet_icon);
|
||||
|
||||
Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]);
|
||||
CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui);
|
||||
|
||||
Settings.enhancements.visualagony = stob(Conf[EnhancementSection]["visualagony"]);
|
||||
CVar_SetS32("gVisualAgony", Settings.enhancements.visualagony);
|
||||
|
||||
Settings.enhancements.mm_bunny_hood = stob(Conf[EnhancementSection]["mm_bunny_hood"]);
|
||||
CVar_SetS32("gMMBunnyHood", Settings.enhancements.mm_bunny_hood);
|
||||
|
||||
Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]);
|
||||
CVar_SetS32("gNewDrops", Settings.enhancements.newdrops);
|
||||
|
||||
// Audio
|
||||
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
|
||||
CVar_SetFloat("gGameMasterVolume", Settings.audio.master);
|
||||
|
@ -118,6 +130,9 @@ namespace Game {
|
|||
Settings.cheats.infinite_magic = stob(Conf[CheatSection]["infinite_magic"]);
|
||||
CVar_SetS32("gInfiniteMagic", Settings.cheats.infinite_magic);
|
||||
|
||||
Settings.cheats.infinite_nayru = stob(Conf[CheatSection]["infinite_nayru"]);
|
||||
CVar_SetS32("gInfiniteNayru", Settings.cheats.infinite_nayru);
|
||||
|
||||
Settings.cheats.no_clip = stob(Conf[CheatSection]["no_clip"]);
|
||||
CVar_SetS32("gNoClip", Settings.cheats.no_clip);
|
||||
|
||||
|
@ -130,6 +145,15 @@ namespace Game {
|
|||
Settings.cheats.super_tunic = stob(Conf[CheatSection]["super_tunic"]);
|
||||
CVar_SetS32("gSuperTunic", Settings.cheats.super_tunic);
|
||||
|
||||
Settings.cheats.ez_isg = stob(Conf[CheatSection]["ez_isg"]);
|
||||
CVar_SetS32("gEzISG", Settings.cheats.ez_isg);
|
||||
|
||||
Settings.cheats.no_restrict_item = stob(Conf[CheatSection]["no_restrict_item"]);
|
||||
CVar_SetS32("gNoRestrictItems", Settings.cheats.no_restrict_item);
|
||||
|
||||
Settings.cheats.freeze_time = stob(Conf[CheatSection]["freeze_time"]);
|
||||
CVar_SetS32("gFreezeTime", Settings.cheats.freeze_time);
|
||||
|
||||
UpdateAudio();
|
||||
}
|
||||
|
||||
|
@ -151,12 +175,17 @@ namespace Game {
|
|||
Conf[AudioSection]["fanfare"] = std::to_string(Settings.audio.fanfare);
|
||||
|
||||
// Enhancements
|
||||
Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text);
|
||||
Conf[EnhancementSection]["skip_text"] = std::to_string(Settings.enhancements.skip_text);
|
||||
Conf[EnhancementSection]["text_speed"] = std::to_string(Settings.enhancements.text_speed);
|
||||
Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod);
|
||||
Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu);
|
||||
Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon);
|
||||
Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui);
|
||||
Conf[EnhancementSection]["newdrops"] = std::to_string(Settings.enhancements.newdrops);
|
||||
Conf[EnhancementSection]["visualagony"] = std::to_string(Settings.enhancements.visualagony);
|
||||
Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood);
|
||||
|
||||
|
||||
// Controllers
|
||||
Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity);
|
||||
Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength);
|
||||
|
|
|
@ -20,11 +20,16 @@ struct SoHConfigType {
|
|||
|
||||
// Enhancements
|
||||
struct {
|
||||
bool fast_text = false;
|
||||
int text_speed = 1;
|
||||
bool skip_text = false;
|
||||
bool disable_lod = false;
|
||||
bool animated_pause_menu = false;
|
||||
bool dynamic_wallet_icon = false;
|
||||
bool minimal_ui = false;
|
||||
bool newdrops = false;
|
||||
bool visualagony = false;
|
||||
bool mm_bunny_hood = false;
|
||||
|
||||
} enhancements;
|
||||
|
||||
// Controller
|
||||
|
@ -47,10 +52,14 @@ struct SoHConfigType {
|
|||
bool infinite_health = false;
|
||||
bool infinite_ammo = false;
|
||||
bool infinite_magic = false;
|
||||
bool infinite_nayru = false;
|
||||
bool no_clip = false;
|
||||
bool climb_everything = false;
|
||||
bool moon_jump_on_l = false;
|
||||
bool super_tunic = false;
|
||||
bool ez_isg = false;
|
||||
bool no_restrict_item = false;
|
||||
bool freeze_time = false;
|
||||
} cheats;
|
||||
|
||||
// Graphics
|
||||
|
|
|
@ -646,7 +646,7 @@ static int gfx_opengl_create_framebuffer() {
|
|||
framebuffers[i].clrbuf_msaa = clrbuf_msaa;
|
||||
framebuffers[i].rbo = rbo;
|
||||
|
||||
return fbo;
|
||||
return i;
|
||||
}
|
||||
|
||||
static void gfx_opengl_update_framebuffer_parameters(int fb_id, uint32_t width, uint32_t height, uint32_t msaa_level, bool opengl_invert_y, bool render_target, bool has_depth_buffer, bool can_extract_depth) {
|
||||
|
|
|
@ -395,8 +395,14 @@ namespace SohImGui {
|
|||
ImGui::Text("Gameplay");
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) {
|
||||
CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text);
|
||||
ImGui::Text("Text Speed: %dx", Game::Settings.enhancements.text_speed);
|
||||
if (ImGui::SliderInt("##TEXTSPEED", &Game::Settings.enhancements.text_speed, 1, 5, "")) {
|
||||
CVar_SetS32("gTextSpeed", Game::Settings.enhancements.text_speed);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Skip Text", &Game::Settings.enhancements.skip_text)) {
|
||||
CVar_SetS32("gSkipText", Game::Settings.enhancements.skip_text);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
|
@ -410,6 +416,11 @@ namespace SohImGui {
|
|||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Visual Stone of Agony", &Game::Settings.enhancements.visualagony)) {
|
||||
CVar_SetS32("gVisualAgony", Game::Settings.enhancements.visualagony);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::Text("Graphics");
|
||||
ImGui::Separator();
|
||||
|
||||
|
@ -425,6 +436,17 @@ namespace SohImGui {
|
|||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Enable 3D Dropped items", &Game::Settings.enhancements.newdrops)) {
|
||||
CVar_SetS32("gNewDrops", Game::Settings.enhancements.newdrops);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Dynamic Wallet Icon", &Game::Settings.enhancements.dynamic_wallet_icon)) {
|
||||
CVar_SetS32(const_cast<char*>("gDynamicWalletIcon"), Game::Settings.enhancements.dynamic_wallet_icon);
|
||||
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
@ -449,24 +471,33 @@ namespace SohImGui {
|
|||
}
|
||||
|
||||
if (ImGui::BeginMenu("Cheats")) {
|
||||
if (ImGui::Checkbox("Infinite Money", &Game::Settings.cheats.infinite_money)) {
|
||||
CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money);
|
||||
needs_save = true;
|
||||
}
|
||||
if (ImGui::BeginMenu("Infinite...")) {
|
||||
if (ImGui::Checkbox("Money", &Game::Settings.cheats.infinite_money)) {
|
||||
CVar_SetS32("gInfiniteMoney", Game::Settings.cheats.infinite_money);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Infinite Health", &Game::Settings.cheats.infinite_health)) {
|
||||
CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health);
|
||||
needs_save = true;
|
||||
}
|
||||
if (ImGui::Checkbox("Health", &Game::Settings.cheats.infinite_health)) {
|
||||
CVar_SetS32("gInfiniteHealth", Game::Settings.cheats.infinite_health);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Infinite Ammo", &Game::Settings.cheats.infinite_ammo)) {
|
||||
CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo);
|
||||
needs_save = true;
|
||||
}
|
||||
if (ImGui::Checkbox("Ammo", &Game::Settings.cheats.infinite_ammo)) {
|
||||
CVar_SetS32("gInfiniteAmmo", Game::Settings.cheats.infinite_ammo);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Infinite Magic", &Game::Settings.cheats.infinite_magic)) {
|
||||
CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic);
|
||||
needs_save = true;
|
||||
if (ImGui::Checkbox("Magic", &Game::Settings.cheats.infinite_magic)) {
|
||||
CVar_SetS32("gInfiniteMagic", Game::Settings.cheats.infinite_magic);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Nayru's Love", &Game::Settings.cheats.infinite_nayru)) {
|
||||
CVar_SetS32("gInfiniteNayru", Game::Settings.cheats.infinite_nayru);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("No Clip", &Game::Settings.cheats.no_clip)) {
|
||||
|
@ -489,6 +520,21 @@ namespace SohImGui {
|
|||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Easy ISG", &Game::Settings.cheats.ez_isg)) {
|
||||
CVar_SetS32("gEzISG", Game::Settings.cheats.ez_isg);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Unrestricted Items", &Game::Settings.cheats.no_restrict_item)) {
|
||||
CVar_SetS32("gNoRestrictItems", Game::Settings.cheats.no_restrict_item);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Freeze Time", &Game::Settings.cheats.freeze_time)) {
|
||||
CVar_SetS32("gFreezeTime", Game::Settings.cheats.freeze_time);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
const char gBuildVersion[] = "DECKARD ALFA (1.0.0)";
|
||||
const char gBuildTeam[] = "github.com/harbourmasters";
|
||||
#ifdef __TIMESTAMP__
|
||||
const char gBuildDate[] = __TIMESTAMP__;
|
||||
#else
|
||||
const char gBuildDate[] = __DATE__ " " __TIME__;
|
||||
#endif
|
||||
const char gBuildMakeOption[] = "";
|
|
@ -129,6 +129,7 @@ extern GraphicsContext* __gfxCtx;
|
|||
#define WORK_DISP __gfxCtx->work.p
|
||||
#define POLY_OPA_DISP __gfxCtx->polyOpa.p
|
||||
#define POLY_XLU_DISP __gfxCtx->polyXlu.p
|
||||
#define TITLE_CARD_DISP __gfxCtx->titlecard.p
|
||||
#define POLY_KAL_DISP __gfxCtx->polyKal.p
|
||||
#define OVERLAY_DISP __gfxCtx->overlay.p
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ typedef struct {
|
|||
/* 0x00000 */ u16 headMagic; // GFXPOOL_HEAD_MAGIC
|
||||
/* 0x00008 */ Gfx polyOpaBuffer[0x2FC0];
|
||||
/* 0x0BF08 */ Gfx polyXluBuffer[0x1000];
|
||||
/* 0xXXXXX */ Gfx titlecardBuffer[0x1000];
|
||||
/* 0x0BF08 */ Gfx polyKalBuffer[0x1000];
|
||||
/* 0x0FF08 */ Gfx overlayBuffer[0x800];
|
||||
/* 0x11F08 */ Gfx workBuffer[0x100];
|
||||
|
@ -130,6 +131,7 @@ typedef struct OSScTask {
|
|||
typedef struct GraphicsContext {
|
||||
/* 0x0000 */ Gfx* polyOpaBuffer; // Pointer to "Zelda 0"
|
||||
/* 0x0004 */ Gfx* polyXluBuffer; // Pointer to "Zelda 1"
|
||||
/* 0xXXX */ Gfx* titlecardBuffer; // Pointer to "Paris"
|
||||
/* 0xXXX */ Gfx* polyKalBuffer; // Pointer to "Rome"
|
||||
/* 0x0008 */ char unk_008[0x08]; // Unused, could this be pointers to "Zelda 2" / "Zelda 3"
|
||||
/* 0x0010 */ Gfx* overlayBuffer; // Pointer to "Zelda 4"
|
||||
|
@ -149,6 +151,7 @@ typedef struct GraphicsContext {
|
|||
/* 0x02A8 */ TwoHeadGfxArena overlay; // "Zelda 4"
|
||||
/* 0x02B8 */ TwoHeadGfxArena polyOpa; // "Zelda 0"
|
||||
/* 0x02C8 */ TwoHeadGfxArena polyXlu; // "Zelda 1"
|
||||
/* 0x0XXX */ TwoHeadGfxArena titlecard; // When in Paris...
|
||||
/* 0x0XXX */ TwoHeadGfxArena polyKal; // When in Rome...
|
||||
/* 0x02D8 */ u32 gfxPoolIdx;
|
||||
/* 0x02DC */ u16* curFrameBuffer;
|
||||
|
|
|
@ -112,9 +112,6 @@
|
|||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapExports>true</MapExports>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>copy /b $(ProjectDir)src\boot\build.c +,,</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -1407,4 +1404,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -25,6 +25,9 @@ void BootCommands_Init()
|
|||
CVar_RegisterS32("gDebugEnabled", 0);
|
||||
CVar_RegisterS32("gPauseLiveLink", 0);
|
||||
CVar_RegisterS32("gMinimalUI", 0);
|
||||
CVar_RegisterS32("gNewDrops", 0);
|
||||
CVar_RegisterS32("gVisualAgony", 0);
|
||||
|
||||
}
|
||||
|
||||
//void BootCommands_ParseBootArgs(char* str)
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
const char gBuildVersion[] = "DECKARD ALFA (1.0.0)";
|
||||
const char gBuildTeam[] = "github.com/harbourmasters";
|
||||
#ifdef __TIMESTAMP__
|
||||
const char gBuildDate[] = __TIMESTAMP__;
|
||||
#else
|
||||
const char gBuildDate[] = __DATE__ " " __TIME__;
|
||||
#endif
|
||||
const char gBuildMakeOption[] = "";
|
||||
|
|
|
@ -381,6 +381,11 @@ void GameState_Update(GameState* gameState) {
|
|||
gSaveContext.magic = (gSaveContext.doubleMagic + 1) * 0x30;
|
||||
}
|
||||
}
|
||||
|
||||
// Inf Nayru's Love Timer
|
||||
if (CVar_GetS32("gInfiniteNayru", 0) != 0) {
|
||||
gSaveContext.nayrusLoveTimer = 0x44B;
|
||||
}
|
||||
|
||||
// Moon Jump On L
|
||||
if (CVar_GetS32("gMoonJumpOnL", 0) != 0) {
|
||||
|
@ -393,6 +398,32 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
}
|
||||
|
||||
// Permanent infinite sword glitch (ISG)
|
||||
if (CVar_GetS32("gEzISG", 0) != 0) {
|
||||
if (gGlobalCtx) {
|
||||
Player* player = GET_PLAYER(gGlobalCtx);
|
||||
player->swordState = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Unrestricted Items
|
||||
if (CVar_GetS32("gNoRestrictItems", 0) != 0) {
|
||||
if (gGlobalCtx) {
|
||||
memset(&gGlobalCtx->interfaceCtx.restrictions, 0, sizeof(gGlobalCtx->interfaceCtx.restrictions));
|
||||
}
|
||||
}
|
||||
|
||||
// Freeze Time
|
||||
if (CVar_GetS32("gFreezeTime", 0) != 0) {
|
||||
if (CVar_GetS32("gPrevTime", -1) == -1) {
|
||||
CVar_SetS32("gPrevTime", gSaveContext.dayTime);
|
||||
}
|
||||
|
||||
int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime);
|
||||
gSaveContext.dayTime = prevTime;
|
||||
}
|
||||
|
||||
|
||||
gameState->frames++;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,12 +95,14 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) {
|
|||
pool->tailMagic = GFXPOOL_TAIL_MAGIC;
|
||||
THGA_Ct(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer));
|
||||
THGA_Ct(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer));
|
||||
THGA_Ct(&gfxCtx->titlecard, pool->titlecardBuffer, sizeof(pool->titlecardBuffer));
|
||||
THGA_Ct(&gfxCtx->polyKal, pool->polyKalBuffer, sizeof(pool->polyKalBuffer));
|
||||
THGA_Ct(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer));
|
||||
THGA_Ct(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer));
|
||||
|
||||
gfxCtx->polyOpaBuffer = pool->polyOpaBuffer;
|
||||
gfxCtx->polyXluBuffer = pool->polyXluBuffer;
|
||||
gfxCtx->titlecardBuffer = pool->titlecardBuffer;
|
||||
gfxCtx->polyKalBuffer = pool->polyKalBuffer;
|
||||
gfxCtx->overlayBuffer = pool->overlayBuffer;
|
||||
gfxCtx->workBuffer = pool->workBuffer;
|
||||
|
@ -274,6 +276,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0);
|
||||
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0);
|
||||
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0);
|
||||
gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 開始", 0);//unsure if needed
|
||||
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../graph.c", 975);
|
||||
|
@ -286,6 +289,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0);
|
||||
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0);
|
||||
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0);
|
||||
gDPNoOpString(TITLE_CARD_DISP++, "TITLE_CARD_DISP 終了", 0);
|
||||
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../graph.c", 996);
|
||||
|
@ -294,6 +298,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
|
||||
gSPBranchList(WORK_DISP++, gfxCtx->polyOpaBuffer);
|
||||
gSPBranchList(POLY_OPA_DISP++, gfxCtx->polyXluBuffer);
|
||||
gSPBranchList(POLY_XLU_DISP++, gfxCtx->titlecardBuffer);
|
||||
gSPBranchList(POLY_XLU_DISP++, gfxCtx->polyKalBuffer);
|
||||
gSPBranchList(POLY_KAL_DISP++, gfxCtx->overlayBuffer);
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
|
|
@ -992,29 +992,30 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
|
|||
height = (width * height > 0x1000) ? 0x1000 / width : height;
|
||||
titleSecondY = titleY + (height * 4);
|
||||
|
||||
OVERLAY_DISP = func_80093808(OVERLAY_DISP);
|
||||
//TITLE_CARD_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP
|
||||
TITLE_CARD_DISP = func_80093808(TITLE_CARD_DISP);
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
|
||||
gDPSetPrimColor(TITLE_CARD_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
|
||||
(u8)titleCtx->alpha);
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA,
|
||||
gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA,
|
||||
G_IM_SIZ_8b,
|
||||
width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
|
||||
gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
|
||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
|
||||
height = titleCtx->height - height;
|
||||
|
||||
// If texture is bigger than 0x1000, display the rest
|
||||
if (height > 0) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000,
|
||||
gDPLoadTextureBlock(TITLE_CARD_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + 0x1000,
|
||||
G_IM_FMT_IA,
|
||||
G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
|
||||
gSPTextureRectangle(TITLE_CARD_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
|
||||
titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
|
||||
#define FLAGS 0
|
||||
|
||||
//Used to force variable to be used in different function, feel free to correct me if you have a better way
|
||||
static s16 DroppedItemRot = 0;
|
||||
|
||||
void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -355,11 +358,34 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
switch (this->actor.params) {
|
||||
case ITEM00_RUPEE_GREEN:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_BLUE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
}
|
||||
case ITEM00_RUPEE_RED:
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
this->scale = 0.015f;
|
||||
yOffset = 750.0f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
this->scale = 0.015f;
|
||||
yOffset = 750.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_SMALL_KEY:
|
||||
this->unk_158 = 0;
|
||||
|
@ -374,10 +400,18 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->scale = 0.02f;
|
||||
break;
|
||||
case ITEM00_HEART:
|
||||
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
|
||||
yOffset = 430.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
|
||||
yOffset = 25.0f;
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
shadowScale = 0.5f;
|
||||
} else {
|
||||
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
|
||||
yOffset = 430.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_HEART_CONTAINER:
|
||||
yOffset = 430.0f;
|
||||
|
@ -386,42 +420,154 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->scale = 0.02f;
|
||||
break;
|
||||
case ITEM00_ARROWS_SINGLE:
|
||||
yOffset = 400.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
yOffset = 400.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->scale = 0.02f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_ARROWS_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_MEDIUM:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_LARGE:
|
||||
Actor_SetScale(&this->actor, 0.035f);
|
||||
this->scale = 0.035f;
|
||||
yOffset = 250.0f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.035f);
|
||||
this->scale = 0.035f;
|
||||
yOffset = 250.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_BOMBS_A:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_B:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_NUTS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_STICK:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_SEEDS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_SPECIAL:
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 320.0f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 320.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 320.0f;
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.5f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 320.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_RUPEE_ORANGE:
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 750.0f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.45f);
|
||||
this->scale = 0.45f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.045 - 1e-10);
|
||||
this->scale = 0.045 - 1e-10;
|
||||
yOffset = 750.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 750.0f;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
Actor_SetScale(&this->actor, 0.4f);
|
||||
this->scale = 0.4f;
|
||||
yOffset = 50.0f;
|
||||
shadowScale = 0.3f;
|
||||
this->actor.world.rot.x = 0x4000;
|
||||
} else {
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->scale = 0.03f;
|
||||
yOffset = 750.0f;
|
||||
}
|
||||
break;
|
||||
case ITEM00_FLEXIBLE:
|
||||
yOffset = 500.0f;
|
||||
|
@ -558,6 +704,19 @@ void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8001DFC8(EnItem00* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) { //set the rotation system on selected model only :)
|
||||
if ((this->actor.params == ITEM_RUPEE_GOLD) || (this->actor.params == ITEM_RUPEE_PURPLE) ||
|
||||
(this->actor.params == ITEM00_ARROWS_SINGLE) || (this->actor.params == ITEM00_ARROWS_SMALL) ||
|
||||
(this->actor.params == ITEM00_ARROWS_MEDIUM) || (this->actor.params == ITEM00_ARROWS_LARGE) ||
|
||||
(this->actor.params == ITEM00_BOMBS_A) || (this->actor.params == ITEM00_BOMBS_B) ||
|
||||
(this->actor.params == ITEM00_NUTS) || (this->actor.params == ITEM00_STICK) ||
|
||||
(this->actor.params == ITEM00_MAGIC_SMALL) || (this->actor.params == ITEM00_SEEDS) ||
|
||||
(this->actor.params == ITEM00_MAGIC_LARGE) || (this->actor.params == ITEM00_HEART) || (this->actor.params == ITEM00_BOMBS_SPECIAL)) {
|
||||
this->actor.shape.rot.y = DroppedItemRot;
|
||||
}
|
||||
}
|
||||
|
||||
if ((this->actor.params <= ITEM00_RUPEE_RED) || ((this->actor.params == ITEM00_HEART) && (this->unk_15A < 0)) ||
|
||||
(this->actor.params == ITEM00_HEART_PIECE)) {
|
||||
this->actor.shape.rot.y += 960;
|
||||
|
@ -731,6 +890,10 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnItem00* this = (EnItem00*)thisx;
|
||||
s32 pad;
|
||||
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) { //Update 3D Model rotation on frame update :)
|
||||
DroppedItemRot += 100;
|
||||
}
|
||||
|
||||
if (this->unk_15A > 0) {
|
||||
this->unk_15A--;
|
||||
}
|
||||
|
@ -934,15 +1097,35 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnItem00* this = (EnItem00*)thisx;
|
||||
f32 mtxScale;
|
||||
|
||||
|
||||
if (!(this->unk_156 & this->unk_158)) {
|
||||
switch (this->actor.params) {
|
||||
case ITEM00_RUPEE_GREEN:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_GREEN);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_BLUE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_BLUE);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_RED:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_RED);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_ORANGE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_GOLD);
|
||||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
EnItem00_DrawRupee(this, globalCtx);
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_RUPEE_PURPLE);
|
||||
} else {
|
||||
EnItem00_DrawRupee(this, globalCtx);
|
||||
}
|
||||
break;
|
||||
case ITEM00_HEART_PIECE:
|
||||
EnItem00_DrawHeartPiece(this, globalCtx);
|
||||
|
@ -951,34 +1134,85 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnItem00_DrawHeartContainer(this, globalCtx);
|
||||
break;
|
||||
case ITEM00_HEART:
|
||||
if (this->unk_15A < 0) {
|
||||
if (this->unk_15A == -1) {
|
||||
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
|
||||
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
|
||||
this->actor.objBankIndex = bankIndex;
|
||||
Actor_SetObjectDependency(globalCtx, &this->actor);
|
||||
this->unk_15A = -2;
|
||||
}
|
||||
} else {
|
||||
mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
GetItem_Draw(globalCtx, GID_HEART);
|
||||
}
|
||||
break;
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_HEART);
|
||||
mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
break;
|
||||
} else {
|
||||
if (this->unk_15A < 0) {
|
||||
if (this->unk_15A == -1) {
|
||||
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
|
||||
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
|
||||
this->actor.objBankIndex = bankIndex;
|
||||
Actor_SetObjectDependency(globalCtx, &this->actor);
|
||||
this->unk_15A = -2;
|
||||
}
|
||||
} else {
|
||||
mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
GetItem_Draw(globalCtx, GID_HEART);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
case ITEM00_BOMBS_A:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_BOMB);
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_B:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_BOMB);
|
||||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_SPECIAL:
|
||||
case ITEM00_ARROWS_SINGLE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_SMALL);
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_MEDIUM:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_MEDIUM);
|
||||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_LARGE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_ARROWS_LARGE);
|
||||
break;
|
||||
}
|
||||
case ITEM00_NUTS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_NUTS);
|
||||
break;
|
||||
}
|
||||
case ITEM00_STICK:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_STICK);
|
||||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_MAGIC_LARGE);
|
||||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_MAGIC_SMALL);
|
||||
break;
|
||||
}
|
||||
case ITEM00_SEEDS:
|
||||
if (CVar_GetS32("gNewDrops", 0) !=0) {
|
||||
GetItem_Draw(globalCtx, GID_SEEDS);
|
||||
break;
|
||||
}
|
||||
case ITEM00_SMALL_KEY:
|
||||
EnItem00_DrawCollectible(this, globalCtx);
|
||||
break;
|
||||
|
|
|
@ -664,6 +664,7 @@ void Minimap_Draw(GlobalContext* globalCtx) {
|
|||
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha);
|
||||
|
||||
gSPInvalidateTexCache(OVERLAY_DISP++, interfaceCtx->mapSegment);
|
||||
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
|
|
@ -166,7 +166,7 @@ void Message_UpdateOcarinaGame(GlobalContext* globalCtx) {
|
|||
u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
|
||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
|
@ -178,7 +178,7 @@ u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
|||
u8 Message_ShouldAdvanceSilent(GlobalContext* globalCtx) {
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
|
||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||
|
||||
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
|
||||
|
@ -951,7 +951,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
}
|
||||
}
|
||||
i = j - 1;
|
||||
msgCtx->textDrawPos = i + 1;
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
|
||||
if (character) {}
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
|
||||
break;
|
||||
case MESSAGE_UNSKIPPABLE:
|
||||
msgCtx->textUnskippable = CVar_GetS32("gFastText", 0) != 1;
|
||||
msgCtx->textUnskippable = CVar_GetS32("gSkipText", 0) != 1;
|
||||
break;
|
||||
case MESSAGE_TWO_CHOICE:
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
|
||||
|
@ -2026,7 +2026,7 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
||||
0);
|
||||
|
||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B)
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B)
|
||||
: CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B);
|
||||
|
||||
switch (msgCtx->msgMode) {
|
||||
|
@ -3067,7 +3067,7 @@ void Message_Update(GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
|
||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||
|
||||
switch (msgCtx->msgMode) {
|
||||
|
|
|
@ -3129,6 +3129,14 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
};
|
||||
static s16 rupeeDigitsFirst[] = { 1, 0, 0 };
|
||||
static s16 rupeeDigitsCount[] = { 2, 3, 3 };
|
||||
|
||||
// courtesy of https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/ASM/c/hud_colors.c
|
||||
static s16 rupeeWalletColors[3][3] = {
|
||||
{ 0xC8, 0xFF, 0x64 }, // Base Wallet (Green)
|
||||
{ 0x82, 0x82, 0xFF }, // Adult's Wallet (Blue)
|
||||
{ 0xFF, 0x64, 0x64 }, // Giant's Wallet (Red)
|
||||
};
|
||||
|
||||
static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 };
|
||||
static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
|
||||
static s16 D_80125B5C[] = { 91, 91 }; // unused
|
||||
|
@ -3171,7 +3179,15 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
|
||||
if (fullUi) {
|
||||
// Rupee Icon
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha);
|
||||
s16* rColor;
|
||||
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0)) {
|
||||
rColor = &rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)];
|
||||
} else {
|
||||
rColor = &rupeeWalletColors[0];
|
||||
}
|
||||
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor[0], rColor[1], rColor[2], interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255);
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, OTRGetRectDimensionFromLeftEdge(26),
|
||||
206, 16, 16, 1 << 10, 1 << 10);
|
||||
|
@ -3269,7 +3285,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]), 8, 16,
|
||||
OTRGetRectDimensionFromLeftEdge(svar3), 206, 8, 16, 1 << 10, 1 << 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Make sure item counts have black backgrounds
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, interfaceCtx->magicAlpha);
|
||||
|
|
|
@ -496,7 +496,7 @@ void EnExItem_DrawMagic(EnExItem* this, GlobalContext* globalCtx, s16 magicIndex
|
|||
}
|
||||
|
||||
void EnExItem_DrawKey(EnExItem* this, GlobalContext* globalCtx, s32 index) {
|
||||
static s32 keySegments[] = { 0x0403F140 };
|
||||
static void* keySegments[] = { gDropKeySmallTex };
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_item.c", 880);
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_link_child/object_link_child.h"
|
||||
#include "textures/icon_item_24_static/icon_item_24_static.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 itemId;
|
||||
|
@ -10265,7 +10266,7 @@ void func_80848C74(GlobalContext* globalCtx, Player* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80848EF8(Player* this) {
|
||||
void func_80848EF8(Player* this, GlobalContext* globalCtx) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)) {
|
||||
f32 temp = 200000.0f - (this->unk_6A4 * 5.0f);
|
||||
|
||||
|
@ -10274,8 +10275,45 @@ void func_80848EF8(Player* this) {
|
|||
}
|
||||
|
||||
this->unk_6A0 += temp;
|
||||
|
||||
/*Prevent it on horse, while jumping and on title screen.
|
||||
If you fly around no stone of agony for you! */
|
||||
if (CVar_GetS32("gVisualAgony", 0) !=0 && !this->stateFlags1) {
|
||||
int rectLeft = OTRGetRectDimensionFromLeftEdge(26); //Left X Pos
|
||||
int rectTop = 60; //Top Y Pos
|
||||
int rectWidth = 24; //Texture Width
|
||||
int rectHeight = 24; //Texture Heigh
|
||||
int DefaultIconA= 50; //Default icon alphe (55 on 255)
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 2824);
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA);
|
||||
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
if (this->unk_6A0 > 4000000.0f) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA);
|
||||
}
|
||||
if (temp == 0 || temp <= 0.1f) {
|
||||
/*Fail check, it is used to draw off the icon when
|
||||
link is standing out range but do not refresh unk_6A0.
|
||||
Also used to make a default value in my case.*/
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, DefaultIconA);
|
||||
}
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
|
||||
gDPSetOtherMode(OVERLAY_DISP++, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_IA16 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2);
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gStoneOfAgonyIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 24, 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPSetOtherMode(OVERLAY_DISP++, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_IA16 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, (rectTop + rectHeight) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 3500);
|
||||
}
|
||||
|
||||
if (this->unk_6A0 > 4000000.0f) {
|
||||
this->unk_6A0 = 0.0f;
|
||||
if (CVar_GetS32("gVisualAgony", 0) !=0 && !this->stateFlags1) {
|
||||
//This audio is placed here and not in previous CVar check to prevent ears ra.. :)
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E0);
|
||||
}
|
||||
func_8083264C(this, 120, 20, 10, 0);
|
||||
}
|
||||
}
|
||||
|
@ -10547,7 +10585,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
|
|||
else {
|
||||
this->fallStartHeight = this->actor.world.pos.y;
|
||||
}
|
||||
func_80848EF8(this);
|
||||
func_80848EF8(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -595,7 +595,6 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItemSegment);
|
||||
//gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItem24Segment);
|
||||
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->nameSegment);
|
||||
gSPInvalidateTexCache(POLY_KAL_DISP++, globalCtx->interfaceCtx.mapSegment);
|
||||
|
||||
//gSPSegment(POLY_KAL_DISP++, 0x07, pauseCtx->playerSegment);
|
||||
gSPSegment(POLY_KAL_DISP++, 0x08, pauseCtx->iconItemSegment);
|
||||
|
|
|
@ -332,6 +332,10 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
|
||||
gSPVertex(POLY_KAL_DISP++, &pauseCtx->mapPageVtx[60], 8, 0);
|
||||
|
||||
// The dungeon map textures are recreated each frame, so always invalidate them
|
||||
gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment);
|
||||
gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment + 0x800);
|
||||
|
||||
gDPLoadTextureBlock_4b(POLY_KAL_DISP++, interfaceCtx->mapSegment, G_IM_FMT_CI, 48, 85, 0, G_TX_WRAP | G_TX_NOMIRROR,
|
||||
G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
|
|
|
@ -3177,15 +3177,9 @@ void KaleidoScope_Update(GlobalContext* globalCtx)
|
|||
if (gSaveContext.language == LANGUAGE_ENG) {
|
||||
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[36 + gSaveContext.worldMapArea]), 0xA00);
|
||||
} else if (gSaveContext.language == LANGUAGE_GER) {
|
||||
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
||||
(uintptr_t)_map_name_staticSegmentRomStart +
|
||||
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x16C00,
|
||||
0xA00, "../z_kaleido_scope_PAL.c", 3780);
|
||||
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[59 + gSaveContext.worldMapArea]), 0xA00);
|
||||
} else {
|
||||
DmaMgr_SendRequest1(pauseCtx->nameSegment + 0x400,
|
||||
(uintptr_t)_map_name_staticSegmentRomStart +
|
||||
(((void)0, gSaveContext.worldMapArea) * 0xA00) + 0x24800,
|
||||
0xA00, "../z_kaleido_scope_PAL.c", 3784);
|
||||
memcpy(pauseCtx->nameSegment + 0x400, ResourceMgr_LoadTexByName(mapNameTextures[81 + gSaveContext.worldMapArea]), 0xA00);
|
||||
}
|
||||
}
|
||||
// OTRTODO - player on pause
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue