diff options
author | Treeki <treeki@gmail.com> | 2013-06-02 23:32:09 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-06-02 23:32:09 +0200 |
commit | e33d76475bc5326d608e74421c8e3a40ae0f4e2e (patch) | |
tree | 2798b85a822f5fbe375fc1369b1fd7396647aa5c | |
parent | 330d88af1b6d8415bb6bfc27a3882686f2d9555f (diff) | |
parent | f4526064654ad2ed884e63eb633babda523d73cd (diff) | |
download | kamek-e33d76475bc5326d608e74421c8e3a40ae0f4e2e.tar.gz kamek-e33d76475bc5326d608e74421c8e3a40ae0f4e2e.zip |
FUCKING CRAP MERGES
-rw-r--r-- | src/bossSamurshai.cpp | 3 | ||||
-rw-r--r-- | src/challengeStar.cpp | 10 | ||||
-rw-r--r-- | src/prolog.S | 2 | ||||
-rw-r--r-- | src/randomcrap.S | 2 | ||||
-rw-r--r-- | src/shyguy.cpp | 40 |
5 files changed, 39 insertions, 18 deletions
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/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; } 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 ad7b713..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\nsend it to newer@newerteam.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" 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); } |