remove z64.h from gameinteractor.h (#6903)

This commit is contained in:
louist103
2026-07-12 00:06:30 -04:00
committed by GitHub
parent 8a45801199
commit ffb741b1dd
51 changed files with 91 additions and 19 deletions
+1 -2
View File
@@ -2,7 +2,6 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "macros.h"
#include "functions.h"
#include "variables.h"
#include "src/overlays/actors/ovl_En_Go2/z_en_go2.h"
@@ -43,7 +42,7 @@ void RegisterAlwaysOnFixes() {
// overwrites it and crashes. Re-set segment 12 before drawing.
COND_VB_SHOULD(VB_ITEMSHIELD_DRAW, true, {
GraphicsContext* __gfxCtx = gPlayState->state.gfxCtx;
gSPSegment(POLY_OPA_DISP++, 0x0C, (uintptr_t)SEGMENTED_TO_VIRTUAL(gCullBackDList));
gSPSegment(POLY_OPA_DISP++, 0x0C, (uintptr_t)gCullBackDList);
});
// Hookshot not spawning softlocks player (child use, memory full). Clear item on no
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static void RegisterClimbEverything() {
COND_VB_SHOULD(VB_SURFACE_IS_CLIMBABLE, CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0), { *should = true; });
@@ -1,9 +1,11 @@
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
extern "C" {
extern PlayState* gPlayState;
#include "z64.h"
#include "macros.h"
}
@@ -1,5 +1,7 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
#include "z64actor.h"
static void RegisterDropsDontDie() {
COND_VB_SHOULD(VB_ITEM00_TIMER_TICK, CVarGetInteger(CVAR_CHEAT("DropsDontDie"), 0), {
+3 -1
View File
@@ -1,9 +1,11 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
extern "C" {
extern PlayState* gPlayState;
#include "z64.h"
#include "macros.h"
extern PlayState* gPlayState;
}
#define CVAR_EASY_ISG_NAME CVAR_CHEAT("EasyISG")
+2 -1
View File
@@ -2,8 +2,9 @@
#include "soh/ShipInit.hpp"
extern "C" {
extern PlayState* gPlayState;
#include "z64.h"
#include "macros.h"
extern PlayState* gPlayState;
}
#define CVAR_EASY_QPA_NAME CVAR_CHEAT("EasyQPA")
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static void RegisterFireproofDekuShield() {
COND_VB_SHOULD(VB_BURN_SHIELD, CVarGetInteger(CVAR_CHEAT("FireproofDekuShield"), 0), { *should = false; });
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static void RegisterHookshotEverything() {
COND_VB_SHOULD(VB_SURFACE_IS_HOOKSHOT, CVarGetInteger(CVAR_CHEAT("HookshotEverything"), 0), { *should = true; });
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static void RegisterInfiniteEponaBoost() {
COND_VB_SHOULD(VB_CONSUME_EPONA_BOOST, CVarGetInteger(CVAR_CHEAT("InfiniteEponaBoost"), 0), { *should = false; });
+3 -1
View File
@@ -1,9 +1,11 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
extern "C" {
extern PlayState* gPlayState;
#include "z64.h"
#include "macros.h"
extern PlayState* gPlayState;
}
#define CVAR_MOON_JUMP_NAME CVAR_CHEAT("MoonJumpOnL")
+5
View File
@@ -1,5 +1,10 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
extern "C" {
#include "z64actor.h"
}
static void RegisterNoClip() {
COND_VB_SHOULD(VB_PERFORM_WALL_COLLISION_CHECK, CVarGetInteger(CVAR_CHEAT("NoClip"), 0), {
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static void RegisterNoFishDespawn() {
COND_VB_SHOULD(VB_FISH_TIMER_TICK, CVarGetInteger(CVAR_CHEAT("NoFishDespawn"), 0), { *should = false; });
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static constexpr int32_t CVAR_NOKEESEGUAYTARGET_DEFAULT = 0;
#define CVAR_NOKEESEGUAYTARGET_NAME CVAR_CHEAT("NoKeeseGuayTarget")
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static constexpr int32_t CVAR_NOREDEADFREEZE_DEFAULT = 0;
#define CVAR_NOREDEADFREEZE_NAME CVAR_CHEAT("NoRedeadFreeze")
@@ -1,7 +1,10 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
extern "C" PlayState* gPlayState;
extern "C" {
extern PlayState* gPlayState;
#include "z64.h"
}
#define CVAR_UNRESTRICTED_ITEMS_NAME CVAR_CHEAT("NoRestrictItems")
#define CVAR_UNRESTRICTED_ITEMS_DEFAULT 0
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
#define CVAR_WIN_GORON_POT_NAME CVAR_ENHANCEMENT("GoronPot")
#define CVAR_WIN_GORON_POT_VALUE CVarGetInteger(CVAR_WIN_GORON_POT_NAME, 0)
@@ -3,6 +3,7 @@
#include "soh/Enhancements/enhancementTypes.h"
extern "C" {
#include "z64.h"
#include "functions.h"
#include "macros.h"
extern PlayState* gPlayState;
@@ -1,7 +1,8 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
extern "C" {
#include "z64.h"
extern PlayState* gPlayState;
}
@@ -2,6 +2,7 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "functions.h"
extern PlayState* gPlayState;
+4 -1
View File
@@ -2,7 +2,10 @@
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/ShipInit.hpp"
extern "C" PlayState* gPlayState;
extern "C" {
#include "z64.h"
extern PlayState* gPlayState;
}
static constexpr ZFightingFixType CVAR_DIRT_PATH_DEFAULT = ZFIGHT_FIX_DISABLED;
#define CVAR_DIRT_PATH_NAME CVAR_ENHANCEMENT("SceneSpecificDirtPathFix")
@@ -3,6 +3,7 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "objects/object_link_boy/object_link_boy.h"
extern SaveContext gSaveContext;
@@ -1,7 +1,10 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
extern "C" SaveContext gSaveContext;
extern "C" {
#include "z64save.h"
extern SaveContext gSaveContext;
}
#define BOSS_DEFEAT_TIMESTAMP(actorID, timestamp) \
COND_ID_HOOK(OnBossDefeat, actorID, true, [](void* refActor) { \
@@ -3,6 +3,7 @@
#include "soh/ResourceManagerHelpers.h"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "objects/object_link_boy/object_link_boy.h"
#include "objects/object_link_child/object_link_child.h"
@@ -4,6 +4,7 @@
#include "soh/ResourceManagerHelpers.h"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "functions.h"
#include "objects/object_link_boy/object_link_boy.h"
@@ -2,9 +2,10 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "variables.h"
#include "z64save.h"
extern SaveContext gSaveContext;
extern PlayState* gPlayState;
#include "variables.h"
}
#define CVAR_NAME CVAR_ENHANCEMENT("3DSceneRender")
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
void RegisterDisableHeatHaze() {
COND_VB_SHOULD(VB_HOT_ROOM_DISTORTION, CVarGetInteger(CVAR_SETTING("A11yNoHeatHaze"), 0), { *should = false; });
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
void RegisterDisableJabuWobble() {
COND_VB_SHOULD(VB_JABU_WOBBLE, CVarGetInteger(CVAR_SETTING("A11yNoJabuWobble"), 0), { *should = false; });
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
void RegisterDisableKokiriDrawDistance() {
COND_VB_SHOULD(VB_FADE_KOKIRI, CVarGetInteger(CVAR_ENHANCEMENT("DisableKokiriDrawDistance"), 0),
@@ -1,7 +1,10 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
extern "C" PlayState* gPlayState;
extern "C" {
#include "z64.h"
extern PlayState* gPlayState;
}
void DisableSandstormAfterTransition(int16_t sceneNum) {
if (sceneNum == SCENE_HAUNTED_WASTELAND) {
@@ -3,6 +3,7 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
#include "align_asset_macro.h"
#include "macros.h"
#include "variables.h"
@@ -5,6 +5,7 @@
#include "textures/icon_item_24_static/icon_item_24_static.h"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "variables.h"
#include "functions.h"
@@ -2,10 +2,12 @@
#include "soh/ShipInit.hpp"
extern "C" {
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
#include "z64.h"
#include "z64save.h"
#include "macros.h"
#include "functions.h"
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
}
#define CVAR_BOW_RETICLE_NAME CVAR_ENHANCEMENT("BowReticle")
@@ -2,6 +2,7 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "variables.h"
#include "functions.h"
@@ -2,6 +2,7 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "variables.h"
@@ -2,8 +2,8 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
#include "macros.h"
#include "functions.h"
#include "objects/object_link_boy/object_link_boy.h"
@@ -1,5 +1,10 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
extern "C" {
#include "z64player.h"
}
#define CVAR_UNSHEATHE_NAME CVAR_ENHANCEMENT("UnsheatheWithoutSlashing")
#define CVAR_UNSHEATHE_VALUE CVarGetInteger(CVAR_UNSHEATHE_NAME, 0)
+1
View File
@@ -6,6 +6,7 @@
#include "soh/OTRGlobals.h"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "variables.h"
}
@@ -1,6 +1,7 @@
#include <libultraship/bridge/consolevariablebridge.h>
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
#include <vector>
#include <spdlog/spdlog.h>
@@ -8,7 +9,6 @@
#include "WeirdAnimation.h"
extern "C" {
#include "macros.h"
#include "z64player.h"
#include "objects/gameplay_keep/gameplay_keep.h"
@@ -25,6 +25,7 @@ AnimationHeaderCommon* ResourceMgr_LoadAnimByName(const char* path);
// the start of the animation or past the end of it. In either case you add a list of animations'
// data that are neighboring before or after the target animation. If more weird frame data is
// required then add more of the neighboring animations in ROM.
// TODO use std::array, we don't need the functionality of of std::vector
static std::vector<WeirdAnimation> weirdAnimations{
// For weirdshots.
{ gPlayerAnim_link_bow_side_walk,
@@ -134,8 +135,7 @@ void RegisterN64WeirdFrames() {
animation = reinterpret_cast<LinkAnimationHeader*>(ResourceMgr_LoadAnimByName(*animationName));
}
const auto playerAnimHeader =
static_cast<LinkAnimationHeader*>(SEGMENTED_TO_VIRTUAL(static_cast<void*>(animation)));
const auto playerAnimHeader = static_cast<LinkAnimationHeader*>(static_cast<void*>(animation));
if (frame < 0 || frame >= playerAnimHeader->common.frameCount) {
const auto direction = frame < 0 ? IndexDirection::BACKWARD : IndexDirection::FORWARD;
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
void RegisterFasterBeanSkulltula() {
COND_VB_SHOULD(VB_SPAWN_BEAN_SKULLTULA, CVarGetInteger(CVAR_ENHANCEMENT("FasterBeanSkull"), 0),
@@ -1,5 +1,7 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
#include "z64player.h"
#include "soh/cvar_prefixes.h"
void RegisterFasterEmptyBottle() {
COND_VB_SHOULD(VB_EMPTYING_BOTTLE, CVarGetInteger(CVAR_ENHANCEMENT("FasterBottleEmpty"), 0), {
@@ -2,6 +2,7 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
#include "z64save.h"
#include "macros.h"
#include "variables.h"
@@ -3,6 +3,7 @@
extern "C" {
#include "variables.h"
#include "z64.h"
extern PlayState* gPlayState;
extern void func_808237B4(PlayState* play, Input* input);
}
@@ -2,6 +2,7 @@
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64.h"
#include "z64save.h"
#include "macros.h"
#include "variables.h"
@@ -3,6 +3,7 @@
extern "C" {
#include "functions.h"
#include "z64save.h"
extern SaveContext gSaveContext;
}
@@ -4,7 +4,9 @@
#include <cassert>
extern "C" {
#include "z64.h"
#include "z64save.h"
#include "z64scene.h"
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
@@ -1,5 +1,6 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
static constexpr int32_t CVAR_ENEMYBGMDISABLE_DEFAULT = 0;
#define CVAR_ENEMYBGMDISABLE_NAME CVAR_AUDIO("EnemyBGMDisable")
@@ -1,7 +1,9 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
#include "soh/cvar_prefixes.h"
extern "C" {
#include "z64.h"
#include "macros.h"
}
@@ -4,10 +4,11 @@
#include "textures/nintendo_rogo_static/nintendo_rogo_static.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "soh_assets.h"
#include "soh/cvar_prefixes.h"
extern "C" {
#include "macros.h"
#include "z64.h"
#include "macros.h"
#include "functions.h"
#include "variables.h"
#include "soh/Enhancements/enhancementTypes.h"
+1
View File
@@ -8,6 +8,7 @@
#include "soh/ResourceManagerHelpers.h"
extern "C" {
#include "z64.h"
#include "macros.h"
#include "functions.h"
#include "variables.h"
@@ -5,7 +5,6 @@
#include <libultraship/bridge/consolevariablebridge.h>
#include "vanilla-behavior/GIVanillaBehavior.h"
#include <z64.h>
typedef enum {
/* 0x00 */ GI_LINK_SIZE_NORMAL,
@@ -55,6 +54,9 @@ typedef enum {
#ifdef __cplusplus
extern "C" {
#endif
#include <z64actor.h>
struct Player;
struct PlayState;
uint8_t GameInteractor_NoUIActive();
GILinkSize GameInteractor_GetLinkSize();
void GameInteractor_SetLinkSize(GILinkSize size);
+1
View File
@@ -5,6 +5,7 @@
#include <ship/window/gui/ConsoleWindow.h>
#include <spdlog/spdlog.h>
#include "soh/ShipUtils.h"
#include "soh/cvar_prefixes.h"
template <class DstType, class SrcType> bool IsType(const SrcType* src) {
return dynamic_cast<const DstType*>(src) != nullptr;