Merge master/2.0.8 into 2.1.0 (#551)

* Imminent fixes for bugs found on master branch (#512)

* The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on

*  The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made.

*  Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice.

*  The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code.

*  Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR

* Update version to 2.0.4 (#515)

* HackerSM64 2.0.5 (#517)

* Bugfix: race condition with accessing cleared audio memory pools

* Bugfix: skyboxes access tiles out of range when looking straight down (#518)

* Vscode fixes (#516)

* Revert s32 angles and remove Angle typedef usage (#529)

* Fix some surface shadowing (#531)

* Delete rtc.h

* Remove `wait_for_audio_frames()`

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: Arceveti <73617174+Arceveti@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>

* Update VERSION.txt (#534)

* HackerSM64 2.0.6 (#539)

* revert random_u16 to be a u16 (#538)

* Added safety gcc math flags (#537)

* removed useless compilation flags that could cause performance loss

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>

* Update VERSION.txt

HackerSM64 2.0.6

* Add GCC opt flag to suppress warnings

* v2.0.7

* 2.0.8 (fix more compiler warnings) (#543)

* fix Waddress in mario_step.c

* fix Winfinite-recursion in unused dynlist_proc function

* in fact remove the offending function entirely

* fix warnings in RNC decompress functions

* update version

* fix version in VERSION.txt

premature on my part, will update it to 2.0.10 next time

Co-authored-by: someone2639 <someone2639@gmail.com>

Co-authored-by: arthurtilly <32559225+arthurtilly@users.noreply.github.com>
Co-authored-by: axollyon <20480418+axollyon@users.noreply.github.com>
Co-authored-by: Gregory Heskett <gheskett@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com>
Co-authored-by: thecozies <collinpferguson@gmail.com>
Co-authored-by: Reonu <danileon95@gmail.com>
Co-authored-by: someone2639 <someone2639@users.noreply.github.com>
Co-authored-by: someone2639 <someone2639@gmail.com>
This commit is contained in:
Arceveti
2022-12-12 14:40:55 -05:00
committed by GitHub
parent f04a3ab624
commit 8043823cce
7 changed files with 13 additions and 50 deletions

View File

@@ -130,10 +130,14 @@ $(eval $(call validate-option,TEXT_ENGINE,none s2dex_text_engine))
# Default non-gcc opt flags
DEFAULT_OPT_FLAGS = -Ofast
# Note: -fno-associative-math is used here to suppress warnings, ideally we would enable this as an optimization but
# this conflicts with -ftrapping-math apparently.
# TODO: Figure out how to allow -fassociative-math to be enabled
SAFETY_OPT_FLAGS = -ftrapping-math -fno-associative-math
# Main opt flags
GCC_MAIN_OPT_FLAGS = \
-Ofast \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=10 \
--param max-unrolled-insns=10 \
@@ -144,7 +148,7 @@ GCC_MAIN_OPT_FLAGS = \
# Surface Collision
GCC_COLLISION_OPT_FLAGS = \
-Ofast \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=100 \
--param max-unrolled-insns=100 \
@@ -157,7 +161,7 @@ GCC_COLLISION_OPT_FLAGS = \
# Math Util
GCC_MATH_UTIL_OPT_FLAGS = \
-Ofast \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
-fno-unroll-loops \
-fno-peel-loops \
--param case-values-threshold=20 \
@@ -169,7 +173,7 @@ GCC_MATH_UTIL_OPT_FLAGS = \
# Rendering graph node
GCC_GRAPH_NODE_OPT_FLAGS = \
-Ofast \
$(DEFAULT_OPT_FLAGS) $(SAFETY_OPT_FLAGS) \
--param case-values-threshold=20 \
--param max-completely-peeled-insns=100 \
--param max-unrolled-insns=100 \

View File

@@ -1 +1 @@
v2.0.5
v2.0.8

View File

@@ -116,7 +116,7 @@
/**
* Makes Mario unable to ledge grab steep slopes to prevent false ledge grabs.
*/
// #define DONT_LEDGE_GRAB_STEEP_SLOPES
#define DONT_LEDGE_GRAB_STEEP_SLOPES
/**
* Disables BLJs and crushes SimpleFlips's dreams.

View File

@@ -28,7 +28,7 @@ Vec3s gVec3sOne = { 1, 1, 1 };
static u16 gRandomSeed16;
// Generate a pseudorandom integer from 0 to 65535 from the random seed, and update the seed.
u32 random_u16(void) {
u16 random_u16(void) {
if (gRandomSeed16 == 22026) {
gRandomSeed16 = 0;
}

View File

@@ -475,7 +475,7 @@ ALWAYS_INLINE s32 absi(s32 in) {
#define FLT_IS_NONZERO(x) (absf(x) > NEAR_ZERO)
u32 random_u16(void);
u16 random_u16(void);
f32 random_float(void);
s32 random_sign(void);

View File

@@ -541,7 +541,7 @@ s32 perform_air_quarter_step(struct MarioState *m, Vec3f intendedPos, u32 stepAr
}
}
if (stepResult == AIR_STEP_GRABBED_LEDGE && grabbedWall != NULL && ledgeFloor != NULL && ledgePos != NULL) {
if (stepResult == AIR_STEP_GRABBED_LEDGE && grabbedWall != NULL && ledgeFloor != NULL) {
vec3f_copy(m->pos, ledgePos);
set_mario_floor(m, floor, ledgePos[1]);
m->faceAngle[0] = 0x0;

View File

@@ -1889,47 +1889,6 @@ void d_set_att_offset(const struct GdVec3f *off) {
}
}
/**
* An incorrectly-coded recursive function that was presumably supposed to
* set the offset of an attached object. Now, it will only call itself
* until it encounters a NULL pointer, which will trigger a `fatal_printf()`
* call.
*
* @note Not called
*/
void d_set_att_to_offset(UNUSED u32 a) {
struct GdObj *dynobj; // sp3c
UNUSED u8 filler[24];
if (sDynListCurObj == NULL) {
fatal_printf("proc_dynlist(): No current object");
}
dynobj = sDynListCurObj;
d_stash_dynobj();
switch (sDynListCurObj->type) {
case OBJ_TYPE_JOINTS:
set_cur_dynobj(((struct ObjJoint *) dynobj)->attachedToObj);
break;
case OBJ_TYPE_NETS:
set_cur_dynobj(((struct ObjNet *) dynobj)->attachedToObj);
break;
case OBJ_TYPE_PARTICLES:
set_cur_dynobj(((struct ObjParticle *) dynobj)->attachedToObj);
break;
default:
fatal_printf("%s: Object '%s'(%x) does not support this function.", "dSetAttToOffset()",
sDynListCurInfo->name, sDynListCurObj->type);
}
if (sDynListCurObj == NULL) {
fatal_printf("dSetAttOffset(): Object '%s' isnt attached to anything",
sStashedDynObjInfo->name);
}
d_set_att_to_offset(a);
d_unstash_dynobj();
}
/**
* Store the offset of the attached object into `dst`.
*