Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ void chTumblar_copyPosition(s32 arg0, Struct68s *arg1, f32 arg2[3]);
void chTumblar_checkMMMChecksums(void);

// --- MMM/minigame_organ.c ---
int func_80389CE8(s32 arg0, s32 arg1, s32 arg2);
int func_80389CE8(Struct5Fs *arg0, Struct68s *arg1, s32 arg2);
s32 func_80389BBC(void);
void MMM_func_80389CD8();
void code3420_handleOrganGame(s32 arg0, s32 arg1);
Expand Down
7 changes: 5 additions & 2 deletions src/MMM/minigame_organ.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ void MMM_func_80389CD8() {}

void func_80389CE0() {}

int func_80389CE8(s32 arg0, s32 arg1, s32 arg2){
// [port] pointer truncation
//int func_80389CE8(s32 arg0, s32 arg1, s32 arg2){
int func_80389CE8(Struct5Fs *arg0, Struct68s *arg1, s32 arg2){
if(Me.state == 3){
if(*Me.unk10 == arg2){
Me.unk0--;
Expand All @@ -296,7 +298,8 @@ int func_80389CE8(s32 arg0, s32 arg1, s32 arg2){
return 1;
}//L80389D6C
else{
func_8028F55C(0xD, func_80351794((Struct68s *)(intptr_t)arg1));
// func_8028F55C(0xD, func_80351794((Struct68s *)(intptr_t)arg1));
func_8028F55C(0xD, func_80351794(arg1));
return 2;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/MMM/organ_tiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ void func_8038B790(Struct5Fs *arg0, Struct68s *arg1, f32 arg2) {

func_80351814(arg1, sp2C);
if (func_803518C0(arg1) != 0) {
temp_v0 = func_80389CE8((s32)(intptr_t)arg0, (s32)(intptr_t)arg1, arg0->unk8);
// temp_v0 = func_80389CE8((s32)(intptr_t)arg0, (s32)(intptr_t)arg1, arg0->unk8);
temp_v0 = func_80389CE8(arg0, arg1, arg0->unk8);
if (temp_v0 == 0) {
func_8038B6FC(arg0, arg1);
}
Expand Down
3 changes: 3 additions & 0 deletions src/core2/fx/effect_jiggy_spawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
void func_80347B10(Struct81s *arg0){
Actor *actor;
actor = bundle_spawn_f32(BUNDLE_10__JIGGY, arg0->position);
if (actor == NULL) {
return;
}
actor->unk54 = 3.0f;
func_803333DC(arg0, actor);
}
Expand Down
9 changes: 8 additions & 1 deletion src/core2/scorequeue/lifescore.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ struct8s D_80381ED0;

/* .code */
s32 func_802FFDE0(s32 arg0){
return D_8036A260[arg0/4];
// [port] Off by one
// return D_8036A260[arg0/4];
s32 idx = arg0/4;
s32 last = (s32)(sizeof(D_8036A260)/sizeof(D_8036A260[0])) - 1;
if (idx > last) {
idx = last;
}
return D_8036A260[idx];
}

s32 func_802FFE04(void){
Expand Down
3 changes: 3 additions & 0 deletions src/core2/sprite/rendertex.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ s32 spriteRender1PrimMode;
void func_80347DF0(Struct81s *arg0){
Actor *actor;
actor = bundle_spawn_f32(arg0->actor_id, arg0->position);
if (actor == NULL) {
return;
}
if (!EventSystem_Should(VB_BUNDLE_SPAWN_SET_ACTOR_DATA, false, actor)) {
actor->unk54 = 3.0f;
func_803333DC(arg0, actor);
Expand Down
8 changes: 8 additions & 0 deletions src/port/Enhancements/Cheats/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,19 @@ static bool isWishyWashyUnlocked() {
return (baanim_getActiveBottlesBonusMask() & BAANIM_WISHYWASHY) != 0;
}

static bool jiggyCollectInFlight() {
return baflag_isTrue(BA_FLAG_7_TOUCHING_JIGGY) || bsjig_inJiggyJig((enum bs_e)bs_getState());
}

// Transformation cycling with D-pad Up/Down
// D-pad Up: Cycle forward through transformations (Banjo -> Termite -> ... -> Bee -> [Wishy] -> Banjo)
// D-pad Down: Cycle backward through transformations (Banjo -> [Wishy] -> Bee -> ... -> Termite -> Banjo)
void RegisterCycleTransform_Init() {
COND_HOOK(GameFrameUpdate, EVENT_PRIORITY_NORMAL, CVarGetInteger(CVAR_CYCLE_TRANSFORM, 0), [](IEvent* event) {
if (jiggyCollectInFlight()) {
return;
}

s32 currentTransform = (s32)player_getTransformation();

// D-pad Up: Cycle forward through transformations
Expand Down
Loading