From fb2694aec8d0744ad3e407eb67b62e56c3b8cdd2 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Sat, 1 Jun 2013 16:49:34 -0500 Subject: Minor shy guy fix for ice block detection --- src/shyguy.cpp | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/shyguy.cpp b/src/shyguy.cpp index 32928c0..140501a 100644 --- a/src/shyguy.cpp +++ b/src/shyguy.cpp @@ -657,7 +657,7 @@ int daShyGuy::onCreate() { _324 = 16.0f; // These structs tell stupid collider what to collide with - these are from koopa troopa - static const lineSensor_s below(-6<<12, 6<<12, 0<<12); + static const lineSensor_s below(-5<<12, 5<<12, 0<<12); static const pointSensor_s above(0<<12, 12<<12); static const lineSensor_s adjacent(6<<12, 9<<12, 6<<12); @@ -1227,17 +1227,36 @@ bool daShyGuy::willWalkOntoSuitableGround() { void daShyGuy::executeState_RealWalk() { chrAnimation.setUpdateRate(1.5f); + // if (distance) { + // // What the fuck. Somehow, having this code makes the shyguy not + // // fall through solid-on-top platforms... + // bool turn = collMgr.isOnTopOfTile(); + // if (!turn) { + // if (!stillFalling) { + // stillFalling = true; + // pos.x = direction ? pos.x + 1.5 : pos.x - 1.5; + // doStateChange(&StateID_RealTurn); + // } + // } else + // } + + if (distance) { - // What the fuck. Somehow, having this code makes the shyguy not - // fall through solid-on-top platforms... - bool turn = collMgr.isOnTopOfTile(); - if (!turn) { + if (collMgr.isOnTopOfTile()) { + stillFalling = false; + + if (!willWalkOntoSuitableGround()) { + pos.x = direction ? pos.x + 1.5 : pos.x - 1.5; + doStateChange(&StateID_RealTurn); + } + } + else { if (!stillFalling) { stillFalling = true; pos.x = direction ? pos.x + 1.5 : pos.x - 1.5; doStateChange(&StateID_RealTurn); } - } else stillFalling = false; + } } bool ret = calculateTileCollisions(); @@ -1245,15 +1264,6 @@ bool daShyGuy::willWalkOntoSuitableGround() { doStateChange(&StateID_RealTurn); } - if (distance) { - if (collMgr.isOnTopOfTile()) { - if (!willWalkOntoSuitableGround()) { - pos.x = direction ? pos.x + 1.5 : pos.x - 1.5; - doStateChange(&StateID_RealTurn); - } - } - } - if(this->chrAnimation.isAnimationDone()) { this->chrAnimation.setCurrentFrame(0.0); } -- cgit v1.2.3 From b88f46245671234de40dbab625d28a965d0470d7 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Sat, 1 Jun 2013 23:00:54 -0500 Subject: updated version of release, fixed critical samurshai bug --- src/bossSamurshai.cpp | 3 ++- src/prolog.S | 2 +- src/randomcrap.S | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bossSamurshai.cpp b/src/bossSamurshai.cpp index ba871cd..5edb17d 100644 --- a/src/bossSamurshai.cpp +++ b/src/bossSamurshai.cpp @@ -110,7 +110,8 @@ daSamurshai *daSamurshai::build() { //////////////////////// void ChucksAndKnucks(ActivePhysics *apThis, ActivePhysics *apOther) { - ((dEn_c*)apThis->owner)->_vf220(apOther->owner); + if (((dEn_c*)apOther->owner)->name == PLAYER) + ((dEn_c*)apThis->owner)->_vf220(apOther->owner); } void daSamurshai::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { diff --git a/src/prolog.S b/src/prolog.S index ffeaf92..83abdc6 100644 --- a/src/prolog.S +++ b/src/prolog.S @@ -61,7 +61,7 @@ startLoop: .data PMsg: - .string "Newer Super Mario Bros. Wii - Hacks by Treeki and Tempus 2009-2013\nNewer Release Candidate 08 - v1012\n.ctors: %p - %p\n" + .string "Newer Super Mario Bros. Wii - Hacks by Treeki and Tempus 2009-2013\nNewer v1.0.0\n.ctors: %p - %p\n" PMsg2: .string "%d inits called\n" diff --git a/src/randomcrap.S b/src/randomcrap.S index 18dffa5..3e5909e 100644 --- a/src/randomcrap.S +++ b/src/randomcrap.S @@ -581,7 +581,7 @@ ReplaceExceptionOccurred: #.long CRAPPYALLOC .data NewExceptionOccurred: -.string "Whoops! Newer has crashed. Please take a screenshot\nof the info below and send it to butts@butts.com.\nYou can scroll through this report using the D-Pad.\n" +.string "Whoops! Newer 1.0.0 has crashed.\nPlease take a screenshot of the info below\nand send it to newer@newerteam.com.\nYou can scroll through this report using the D-Pad.\n" UniLogStr: .string "[ULog] returning %8x to: %x > %x > %x > %x > %x > %x\n" #WillAlloc: .string "[AH] Will allocate %x bytes aligned by %x\n" #Alloced: .string "[AH] Allocated %p\n" -- cgit v1.2.3 From f4526064654ad2ed884e63eb633babda523d73cd Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Sun, 2 Jun 2013 10:54:54 -0500 Subject: challenge star --- src/challengeStar.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/challengeStar.cpp b/src/challengeStar.cpp index ec80661..f754188 100644 --- a/src/challengeStar.cpp +++ b/src/challengeStar.cpp @@ -22,6 +22,7 @@ class dChallengeStar : public dEn_c { u64 eventFlag; s32 timer; + bool collected; static dChallengeStar *build(); @@ -39,6 +40,12 @@ class dChallengeStar : public dEn_c { void dChallengeStar::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { + + if (collected) { + this->Delete(1); + return; } + + PlaySoundAsync(this, SE_OBJ_BROOM_KEY_SHOW); SpawnEffect("Wm_ob_greencoinkira_a", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8}); @@ -46,6 +53,8 @@ void dChallengeStar::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth if (GlobalStarsCollected == 0) { dFlagMgr_c::instance->flags |= this->eventFlag; } + + collected = true; this->Delete(1); } @@ -81,6 +90,7 @@ dChallengeStar *dChallengeStar::build() { int dChallengeStar::onCreate() { + collected = false; char die = this->settings & 0xF; if (GetSpecificPlayerActor(die) == 0) { this->Delete(1); return 2; } -- cgit v1.2.3