This adds gLevelValues.wingCapLookUpReq to lua. (#271)

* added gLevelValues.wingCapLookUpReq

* Added gLevelValues.wingCapLookUpReq

* Added gLevelValues.wingCapLookUpReq

* Added gLevelValues.wingCapLookUpReq

* Added gLevelValues.wingCapLookUpReq

* Changed the look up warp star req

Hidden Palace can only be accessed at 120 stars.
This commit is contained in:
Blockyyy 2023-02-18 22:04:22 +01:00 committed by GitHub
parent 1a136ced9e
commit 260202ab5d
6 changed files with 11 additions and 3 deletions

View File

@ -17,6 +17,10 @@ gLevelValues.wingCapDurationTotwc = 1800
gLevelValues.metalCapDurationCotmc = 900
gLevelValues.vanishCapDurationVcutm = 900
-- Hidden Palace look up req
gLevelValues.wingCapLookUpReq = 120
-- Replace Stars
starPositions = gLevelValues.starPositions

View File

@ -706,7 +706,7 @@ static void newcam_apply_values(struct Camera *c) {
//Adds support for wing mario tower
if (gMarioStates[0].floor != NULL) {
if (gMarioStates[0].floor->type == SURFACE_LOOK_UP_WARP) {
if (save_file_get_total_star_count(gCurrSaveFileNum - 1, 0, 0x18) >= 10) {
if (save_file_get_total_star_count(gCurrSaveFileNum - 1, 0, 0x18) >= gLevelValues.wingCapLookUpReq) {
if (newcam_tilt < -8000 && gMarioStates[0].forwardVel == 0 && sCurrPlayMode != PLAY_MODE_PAUSED) {
level_trigger_warp(gMarioState, 1);
}

View File

@ -16,6 +16,7 @@
#include "rendering_graph_node.h"
#include "save_file.h"
#include "segment2.h"
#include "hardcoded.h"
/**
* @file geo_misc.c
@ -82,7 +83,7 @@ Gfx *geo_exec_inside_castle_light(s32 callContext, struct GraphNode *node, UNUSE
if (callContext == GEO_CONTEXT_RENDER) {
flags = save_file_get_flags();
if (gHudDisplay.stars >= 10 && !(flags & SAVE_FLAG_HAVE_WING_CAP)) {
if (gHudDisplay.stars >= gLevelValues.wingCapLookUpReq && !(flags & SAVE_FLAG_HAVE_WING_CAP)) {
displayList = alloc_display_list(2 * sizeof(*displayList));
if (displayList == NULL) {

View File

@ -99,6 +99,7 @@ struct LevelValues gDefaultLevelValues = {
.floorLowerLimitShadow = FLOOR_LOWER_LIMIT_SHADOW,
.pauseExitAnywhere = 1,
.disableActs = false,
.wingCapLookUpReq = 10,
};
struct LevelValues gLevelValues = { 0 };

View File

@ -40,6 +40,7 @@ struct StarPositions {
struct LevelValues {
u8 fixCollisionBugs;
u8 wingCapLookUpReq;
bool fixVanishFloors;
enum LevelNum entryLevel;
enum LevelNum exitCastleLevel;

View File

@ -20,6 +20,7 @@
#include "pc/configfile.h"
#include "pc/network/network.h"
#include "pc/lua/smlua.h"
#include "hardcoded.h"
s32 check_common_idle_cancels(struct MarioState *m) {
mario_drop_held_object(m);
@ -1085,7 +1086,7 @@ s32 act_first_person(struct MarioState *m) {
}
if (m->floor->type == SURFACE_LOOK_UP_WARP
&& save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1) >= 10) {
&& save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1) >= gLevelValues.wingCapLookUpReq) {
s16 sp1A = m->statusForCamera->headRotation[0];
s16 sp18 = ((m->statusForCamera->headRotation[1] * 4) / 3) + m->faceAngle[1];
if (sp1A == -0x1800 && (sp18 < -0x6FFF || sp18 >= 0x7000)) {