mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 10:52:19 -05:00
Cheats Menu expansion (#176)
* Added extra cheats; compacted cheats menu * fixed flag oversight
This commit is contained in:
parent
ffeb2afcb7
commit
f65486d82d
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/*
|
@ -124,6 +124,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);
|
||||
|
||||
@ -136,6 +139,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();
|
||||
}
|
||||
|
||||
|
@ -49,10 +49,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
|
||||
|
@ -460,24 +460,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)) {
|
||||
@ -500,6 +509,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();
|
||||
}
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user