mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-24 23:01:47 -05:00
use RegisterShipInitFunc
This commit is contained in:
parent
2bc46bfa68
commit
849c4325b9
@ -1,19 +1,24 @@
|
|||||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||||
|
#include "soh/ShipInit.hpp"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "z64.h"
|
#include "z64.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkipLogoTitle_Register() {
|
// Allows pressing A to skip the boot logo and go to the next state (opening or file select)
|
||||||
// Allows pressing A to skip the boot logo and go to the next state (opening or file select)
|
void OnZTitleUpdateSkipLogoTitle(void* gameState) {
|
||||||
COND_HOOK(OnZTitleUpdate, true, [](void* gameState) {
|
TitleContext* titleContext = (TitleContext*)gameState;
|
||||||
TitleContext* titleContext = (TitleContext*)gameState;
|
|
||||||
|
|
||||||
if (CHECK_BTN_ANY(titleContext->state.input->press.button, BTN_A | BTN_B | BTN_START)) {
|
if (CHECK_BTN_ANY(titleContext->state.input->press.button, BTN_A | BTN_B | BTN_START)) {
|
||||||
// Force the title state to start fading to black and to last roughly 5 frames based on current fade in/out
|
// Force the title state to start fading to black and to last roughly 5 frames based on current fade in/out
|
||||||
titleContext->visibleDuration = 0;
|
titleContext->visibleDuration = 0;
|
||||||
titleContext->addAlpha = (255 - titleContext->coverAlpha) / 5;
|
titleContext->addAlpha = (255 - titleContext->coverAlpha) / 5;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RegisterSkipLogoTitle() {
|
||||||
|
COND_HOOK(OnZTitleUpdate, true, OnZTitleUpdateSkipLogoTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
static RegisterShipInitFunc initFunc(RegisterSkipLogoTitle);
|
||||||
|
@ -9,7 +9,6 @@ void TimeSavers_Register() {
|
|||||||
SkipToGivingZeldasLetter_Register();
|
SkipToGivingZeldasLetter_Register();
|
||||||
SkipZeldaFleeingCastle_Register();
|
SkipZeldaFleeingCastle_Register();
|
||||||
SkipIntro_Register();
|
SkipIntro_Register();
|
||||||
SkipLogoTitle_Register();
|
|
||||||
// SkipMiscInteractions
|
// SkipMiscInteractions
|
||||||
MoveJabuJabuElevator_Register();
|
MoveJabuJabuElevator_Register();
|
||||||
MoveMidoInKokiriForest_Register();
|
MoveMidoInKokiriForest_Register();
|
||||||
|
@ -11,7 +11,6 @@ void TimeSavers_Register();
|
|||||||
void SkipToGivingZeldasLetter_Register();
|
void SkipToGivingZeldasLetter_Register();
|
||||||
void SkipZeldaFleeingCastle_Register();
|
void SkipZeldaFleeingCastle_Register();
|
||||||
void SkipIntro_Register();
|
void SkipIntro_Register();
|
||||||
void SkipLogoTitle_Register();
|
|
||||||
// SkipMiscInteractions
|
// SkipMiscInteractions
|
||||||
void MoveJabuJabuElevator_Register();
|
void MoveJabuJabuElevator_Register();
|
||||||
void MoveMidoInKokiriForest_Register();
|
void MoveMidoInKokiriForest_Register();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user