Amalgamate some of the old fixes from older PRs here

This commit is contained in:
Colton Rushton 2021-02-13 17:43:37 -04:00
parent 2f97aa1491
commit 825aaa03ad
12 changed files with 55 additions and 27 deletions

View File

@ -103,7 +103,7 @@ ifeq ($(WINDOWS_BUILD),1)
TARGET_BITS = 32
NO_BZERO_BCOPY := 1
else ifeq ($(CROSS),x86_64-w64-mingw32.static-)
TARGET_ARCH = i386pe
TARGET_ARCH = i386pep
TARGET_BITS = 64
NO_BZERO_BCOPY := 1
endif
@ -213,9 +213,7 @@ endif
# on tools and assets, and we use directory globs further down
# in the makefile that we want should cover assets.)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),cleantools)
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
# Make sure assets exist
NOEXTRACT ?= 0
@ -232,8 +230,6 @@ ifeq ($(DUMMY),FAIL)
$(error Failed to build tools)
endif
endif
endif
endif
################ Target Executable and Sources ###############
@ -251,17 +247,12 @@ LIBULTRA := $(BUILD_DIR)/libultra.a
ifeq ($(TARGET_WEB),1)
EXE := $(BUILD_DIR)/$(TARGET).html
else
ifeq ($(WINDOWS_BUILD),1)
EXE := $(BUILD_DIR)/$(TARGET).exe
else # Linux builds/binary namer
ifeq ($(TARGET_RPI),1)
EXE := $(BUILD_DIR)/$(TARGET).arm
else
EXE := $(BUILD_DIR)/$(TARGET)
endif
endif
else ifeq ($(WINDOWS_BUILD),1)
EXE := $(BUILD_DIR)/$(TARGET).exe
else ifeq ($(TARGET_RPI),1) # Linux builds/binary namer
EXE := $(BUILD_DIR)/$(TARGET).arm
else
EXE := $(BUILD_DIR)/$(TARGET)
endif
ELF := $(BUILD_DIR)/$(TARGET).elf

View File

@ -145,15 +145,11 @@ define level_rules =
$$(BUILD_DIR)/levels/$(1)/leveldata.elf: TEXTURE_BIN := $(2)
endef
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),cleantools)
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
$(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
$(CPP) $(VERSION_CFLAGS) -I . -o $@ $<
include $(BUILD_DIR)/level_rules.mk
endif
endif
endif
# --------------------------------------
# Extra Level Rules

View File

@ -215,6 +215,7 @@
#define MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER 0x37 //! @bug this object doesn't have a geo associated with it, yet is placed in vcutm.
// This causes a crash when the player quickly looks towards the
// checkerboard platforms after spawning but before it is unloaded.
// This is partially fixed by having the game load a null model in QOL_FIXES.
// bitfs
#define MODEL_BITFS_PLATFORM_ON_TRACK 0x36 // bitfs_geo_000758

View File

@ -270,7 +270,11 @@ void bhv_free_bowling_ball_roll_loop(void) {
cur_obj_play_sound_1(SOUND_ENV_UNKNOWN2);
}
#ifndef QOL_FIXES
if ((collisionFlags & OBJ_COL_FLAG_GROUNDED) && !(collisionFlags & OBJ_COL_FLAGS_LANDED))
#else
if ((collisionFlags & OBJ_COL_FLAG_GROUNDED) && !(collisionFlags & OBJ_COL_FLAG_NO_Y_VEL))
#endif
cur_obj_play_sound_2(SOUND_GENERAL_QUIET_POUND1_LOWPRIO);
if (!is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 6000)) {

View File

@ -75,7 +75,14 @@ static void klepto_anim_dive(void) {
void bhv_klepto_init(void) {
if (o->oBehParams2ndByte != 0) {
#ifdef QOL_FIXES
if(save_file_get_star_flags(gCurrSaveFileNum - 1, COURSE_SSL) & 1)
o->oAnimState = KLEPTO_ANIM_STATE_HOLDING_TRANSPARENT_STAR;
else
o->oAnimState = KLEPTO_ANIM_STATE_HOLDING_STAR;
#else
o->oAnimState = KLEPTO_ANIM_STATE_HOLDING_STAR;
#endif
} else {
o->oKleptoStartPosX = o->oPosX;
o->oKleptoStartPosY = o->oPosY;
@ -364,7 +371,13 @@ void bhv_klepto_update(void) {
spawn_object(o, MODEL_MARIOS_CAP, bhvNormalCap);
} else if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_STAR) {
spawn_default_star(-5550.0f, 300.0f, -930.0f);
#ifndef QOL_FIXES
}
#else
} else if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_TRANSPARENT_STAR) {
spawn_default_star(-5550.0f, 300.0f, -930.0f);
}
#endif
o->oAnimState = KLEPTO_ANIM_STATE_HOLDING_NOTHING;
o->oAction = KLEPTO_ACT_STRUCK_BY_MARIO;

View File

@ -96,6 +96,9 @@ void bhv_pyramid_top_loop(void) {
if (o->oPyramidTopPillarsTouched == 4) {
play_puzzle_jingle();
o->oAction = PYRAMID_TOP_ACT_SPINNING;
#ifdef QOL_FIXES
cutscene_pyramid_top_explode();
#endif
}
break;
@ -113,6 +116,9 @@ void bhv_pyramid_top_loop(void) {
}
bhv_pyramid_top_explode();
#ifdef QOL_FIXES
cutscene_pyramid_top_explode_end();
#endif
break;
}
}

View File

@ -5218,8 +5218,13 @@ u8 get_cutscene_from_mario_status(struct Camera *c) {
//! doorStatus is never DOOR_ENTER_LOBBY when cameraEvent == 6, because
//! doorStatus is only used for the star door in the lobby, which uses
//! ACT_ENTERING_STAR_DOOR
// This seemingly errant behavior is removed when QOL_FIXES=1
#ifndef QOL_FIXES
if (c->mode == CAMERA_MODE_SPIRAL_STAIRS || c->mode == CAMERA_MODE_CLOSE
|| c->doorStatus == DOOR_ENTER_LOBBY) {
#else
if (c->mode == CAMERA_MODE_SPIRAL_STAIRS || c->mode == CAMERA_MODE_CLOSE) {
#endif
cutscene = open_door_cutscene(CUTSCENE_DOOR_PULL_MODE, CUTSCENE_DOOR_PUSH_MODE);
} else {
cutscene = open_door_cutscene(CUTSCENE_DOOR_PULL, CUTSCENE_DOOR_PUSH);

View File

@ -232,7 +232,7 @@
#define CUTSCENE_DANCE_FLY_AWAY 165
#define CUTSCENE_DANCE_CLOSEUP 166
#define CUTSCENE_KEY_DANCE 167
#define CUTSCENE_SSL_PYRAMID_EXPLODE 168 // Never activated
#define CUTSCENE_SSL_PYRAMID_EXPLODE 168 // Never activated normally. Is now activated when QOL_FIXES=1.
#define CUTSCENE_EXIT_SPECIAL_SUCC 169
#define CUTSCENE_NONPAINTING_DEATH 170
#define CUTSCENE_READ_MESSAGE 171

View File

@ -129,7 +129,7 @@ void clear_z_buffer(void) {
gDPSetFillColor(gDisplayListHead++,
GPACK_ZDZ(G_MAXFBZ, 0) << 16 | GPACK_ZDZ(G_MAXFBZ, 0));
gDPFillRectangle(gDisplayListHead++, 0, BORDER_HEIGHT, SCREEN_WIDTH - 1,
gDPFillRectangle(gDisplayListHead++, GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(0), BORDER_HEIGHT, GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(0) - 1,
SCREEN_HEIGHT - 1 - BORDER_HEIGHT);
}

View File

@ -3003,7 +3003,7 @@ void render_save_confirmation(s16 x, s16 y, s8 *index, s16 sp6e)
{ TEXT_SAVE_AND_QUIT_DE }
};
u8 textSaveExitGame[][26] = { // New function to exit game
u8 textSaveExitGame[][28] = { // New function to exit game
{ TEXT_SAVE_EXIT_GAME },
{ TEXT_SAVE_EXIT_GAME_FR },
{ TEXT_SAVE_EXIT_GAME_DE }

View File

@ -247,7 +247,12 @@ struct Connection *func_801825FC(struct ObjVertex *vtx1, struct ObjVertex *vtx2)
sp34->unk24 = gd_vec3f_magnitude(&sp28);
// Duplicate conditional. Possibly should've checked `vtx2`;
// Also, this shouldn't be called with particle types...
// fixed in QOL_FIXES
#ifndef QOL_FIXES
if (vtx1->header.type == OBJ_TYPE_PARTICLES && vtx1->header.type == OBJ_TYPE_PARTICLES) {
#else
if (vtx1->header.type == OBJ_TYPE_PARTICLES && vtx2->header.type == OBJ_TYPE_PARTICLES) {
#endif
if ((((struct ObjParticle *) vtx1)->unk54 & 4) && (((struct ObjParticle *) vtx2)->unk54 & 4)) {
sp34->unk28 |= 1;
}

View File

@ -1250,10 +1250,17 @@ die Temperatur!"))
DEFINE_DIALOG(DIALOG_098, 1, 1, 95, 200, _("\
Komm nur näher, hehehe!"))
#ifndef QOL_FIXES
DEFINE_DIALOG(DIALOG_099, 1, 3, 95, 200, _("\
"))
#else
DEFINE_DIALOG(DIALOG_099, 1, 3, 95, 200, _("\
Eh he he...\n\
Du gehörst mir, hee hee!\n\
Ich gehe einfach durch\n\
diese Wand. Kannst du\n\
das auch? Heh, heh, heh!"))
#endif
DEFINE_DIALOG(DIALOG_100, 1, 2, 95, 200, _("\
Jippiiiiieee, ich hab' sie!\n\
Jetzt gehört sie mir!!!"))