Reindeer games additions (#33)

* Remove hat from darunia

* Update some stuffs

* Remove custom collectible (in favor of CustomItem)

* Roguelike

Co-authored-by: Caladius <Caladius@users.noreply.github.com>
Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com>

* Fix a bunch of stuff

* Persist roguelike data

* Experimental anchor tweaks

* Stop freeze from scrubs & fix pablo cvar

---------

Co-authored-by: Caladius <Caladius@users.noreply.github.com>
Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com>
This commit is contained in:
Garrett Cox
2025-12-06 10:45:43 -06:00
committed by GitHub
parent e3029a834b
commit f5af415098
116 changed files with 4375 additions and 474 deletions
+1 -1
View File
@@ -3353,7 +3353,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
objBankIndex = Object_GetIndex(&gPlayState->objectCtx, dbEntry->objectId);
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) ||
CVarGetInteger("gHoliday.Caladius.Blitz.Enabled", 0))) {
CVarGetInteger("gHoliday.Gameplay.Blitz.Enabled", 0))) {
objBankIndex = 0;
}
+8
View File
@@ -2,6 +2,7 @@
#include "vt.h"
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include <assert.h>
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
@@ -3030,6 +3031,13 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCt
if (CVarGetInteger(CVAR_ENHANCEMENT("IvanCoopModeEnabled"), 0)) {
collider->actor->colChkInfo.damage *= GET_PLAYER(play)->ivanDamageMultiplier;
}
if (!GameInteractor_Should(VB_APPLY_DAMAGE_TO_ACTOR, true, collider->actor,
collider->actor->colChkInfo.damageEffect, collider->actor->colChkInfo.damage,
info->acHitInfo->toucher.dmgFlags)) {
collider->actor->colChkInfo.damageEffect = 0;
collider->actor->colChkInfo.damage = 0;
}
}
/**
+3 -2
View File
@@ -399,9 +399,10 @@ DrawItemTableEntry sDrawItemTable[] = {
* Calls the corresponding draw function for the given draw ID
*/
void GetItem_Draw(PlayState* play, s16 drawId) {
if (drawId < 0 || drawId >= GID_MAXIMUM) {
// SoH [Enhancements] Prevent any UB here, GID_MAXIMUM useful for overriding GI draws
if (drawId < 0 || drawId >= GID_MAXIMUM)
return;
}
sDrawItemTable[drawId].drawFunc(play, drawId);
}
+2
View File
@@ -2716,6 +2716,8 @@ void Message_OpenText(PlayState* play, u16 textId) {
bool loadFromMessageTable = true;
GameInteractor_ExecuteOnOpenText(&textId, &loadFromMessageTable);
sDisplayNextMessageAsEnglish = false;
if (msgCtx->msgMode == MSGMODE_NONE) {
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
}
+4 -7
View File
@@ -1873,11 +1873,9 @@ u8 Return_Item(u8 itemID, ModIndex modId, ItemID returnItem) {
* @return u8
*/
u8 Item_Give(PlayState* play, u8 item) {
// TODO: Add ShouldItemGive
// if (!GameInteractor_ShouldItemGive(item) || item == ITEM_SHIP) {
if (item == ITEM_SHIP) {
// SoH [Enhancements] Ignore ITEM_SHIP, used for CustomItem
if (item == ITEM_SHIP)
return ITEM_NONE;
}
// prevents getting sticks without the bag in case something got missed
if (IS_RANDO && (item == ITEM_STICK || item == ITEM_STICKS_5 || item == ITEM_STICKS_10) &&
@@ -2479,10 +2477,9 @@ u8 Item_CheckObtainability(u8 item) {
s16 slot = SLOT(item);
s32 temp;
// SOH [Enhancements] Added to enable custom item gives
if (item == ITEM_SHIP) {
// SoH [Enhancements] Ignore ITEM_SHIP, used for CustomItem
if (item == ITEM_SHIP)
return ITEM_NONE;
}
if (item >= ITEM_STICKS_5) {
slot = SLOT(sExtraItemBases[item - ITEM_STICKS_5]);
+5 -1
View File
@@ -1603,6 +1603,10 @@ void Play_Draw(PlayState* play) {
if ((HREG(80) != 10) || (HREG(88) != 0)) {
if (play->envCtx.sandstormState != SANDSTORM_OFF) {
Environment_DrawSandstorm(play, play->envCtx.sandstormState);
} else if (CVarGetInteger("gHoliday.Visual.SnowingWeatherActive", 0) == 1) {
Environment_DrawSandstorm(play, SANDSTORM_DISSIPATE);
} else if (CVarGetInteger("gHoliday.Visual.SnowingWeatherActive", 0) == 2) {
Environment_DrawSandstorm(play, SANDSTORM_ACTIVE);
}
}
@@ -1699,7 +1703,7 @@ time_t Play_GetRealTime() {
void Play_Main(GameState* thisx) {
PlayState* play = (PlayState*)thisx;
if (play->envCtx.unk_EE[2] == 0 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
if (play->envCtx.unk_EE[2] == 0 && CVarGetInteger("gHoliday.Visual.SnowingWeather", 0)) {
play->envCtx.unk_EE[3] = 64;
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJECT_KANKYO, 0, 0, 0, 0, 0, 0, 3, 0);
}
+1 -1
View File
@@ -1814,7 +1814,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_MultVec3f(&sZeroVec, D_80160000);
}
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0) && !(this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) &&
if (CVarGetInteger("gHoliday.Visual.Hats", 0) && !(this->stateFlags1 & PLAYER_STATE1_FIRST_PERSON) &&
!(this->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
if (limbIndex == PLAYER_LIMB_HEAD) {
OPEN_DISPS(play->state.gfxCtx);