summaryrefslogtreecommitdiff
path: root/src/shyguy.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-07-15 15:16:26 -0500
committerColin Noga <Tempus@chronometry.ca>2012-07-15 15:16:26 -0500
commit85ffcf8e57ab7a90318b8e24f62257b5393f7330 (patch)
treebf583ab2c8a1bc6f9a16b4a7a925a6daee541982 /src/shyguy.cpp
parenta463a96cf84284b4a54eb4c57bf929a523157b45 (diff)
downloadkamek-85ffcf8e57ab7a90318b8e24f62257b5393f7330.tar.gz
kamek-85ffcf8e57ab7a90318b8e24f62257b5393f7330.zip
Lots of bug fixes, changing up the giga goomba, added in shy guy samurai boss
Diffstat (limited to 'src/shyguy.cpp')
-rw-r--r--src/shyguy.cpp36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 6ea3567..d93d77a 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -4,6 +4,12 @@
#include <sfx.h>
+const char* SGarcNameList [] = {
+ "shyguy",
+ "iron_ball",
+ NULL
+};
+
// Shy Guy Settings
//
// Nybble 5: Shy Guy Types
@@ -205,11 +211,26 @@ daShyGuy *daShyGuy::build() {
dStateBase_c *stateVar;
dStateBase_c *deathState;
+ char hitType;
if (this->type < 6) { // Regular Shy Guys
stateVar = &StateID_GoDizzy;
deathState = &StateID_Die;
}
else if (this->type > 8) { // Giants
+ hitType = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 0);
+ if(hitType == 1) { // regular jump
+ apOther->someFlagByte |= 2;
+ }
+ else if(hitType == 3) { // spinning jump or whatever?
+ apOther->someFlagByte |= 2;
+ }
+ else if(hitType == 0) {
+ this->dEn_c::playerCollision(apThis, apOther);
+ this->_vf220(apOther->owner);
+ }
+ this->isDead = 0;
+ this->flags_4FC |= (1<<(31-7));
+ this->counter_504[apOther->owner->which_player] = 0;
return;
}
else { // Ballooneers
@@ -223,7 +244,6 @@ daShyGuy *daShyGuy::build() {
this->counter_504[apOther->owner->which_player] = 0;
- char hitType;
if (this->isDown == 0) {
hitType = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 2);
}
@@ -439,7 +459,7 @@ int daShyGuy::onCreate() {
if (type == 6 || type == 7 || type == 8) {
this->renderBalloon = 1;
- this->balloonFile.data = getResource("lemmy_ball", "g3d/balloon.brres");
+ this->balloonFile.data = getResource("shyguy", "g3d/balloon.brres");
nw4r::g3d::ResMdl mdlB = this->balloonFile.GetResMdl("ballon");
balloonModel.setup(mdlB, &allocator, 0x224, 1, 0);
balloonModelB.setup(mdlB, &allocator, 0x224, 1, 0);
@@ -515,26 +535,26 @@ int daShyGuy::onCreate() {
// Shy Guy Colours
if (type == 1 || type == 8 || type == 10) {
- this->resFile.data = getResource("lemmy_ball", "g3d/ShyGuyBlue.brres");
+ this->resFile.data = getResource("shyguy", "g3d/ShyGuyBlue.brres");
}
else if (type == 5) {
- this->resFile.data = getResource("lemmy_ball", "g3d/ShyGuyGreen.brres");
+ this->resFile.data = getResource("shyguy", "g3d/ShyGuyGreen.brres");
}
else if (type == 3) {
- this->resFile.data = getResource("lemmy_ball", "g3d/ShyGuyCyan.brres");
+ this->resFile.data = getResource("shyguy", "g3d/ShyGuyCyan.brres");
}
else if (type == 4) {
- this->resFile.data = getResource("lemmy_ball", "g3d/ShyGuyPurple.brres");
+ this->resFile.data = getResource("shyguy", "g3d/ShyGuyPurple.brres");
}
else {
- this->resFile.data = getResource("lemmy_ball", "g3d/ShyGuyRed.brres");
+ this->resFile.data = getResource("shyguy", "g3d/ShyGuyRed.brres");
}
nw4r::g3d::ResMdl mdl = this->resFile.GetResMdl("body_h");
bodyModel.setup(mdl, &allocator, 0x224, 1, 0);
// Animations start here
- this->anmFile.data = getResource("lemmy_ball", "g3d/ShyGuyAnimations.brres");
+ this->anmFile.data = getResource("shyguy", "g3d/ShyGuyAnimations.brres");
nw4r::g3d::ResAnmChr anmChr = this->anmFile.GetResAnmChr("c18_IDLE_R");
this->chrAnimation.setup(mdl, anmChr, &this->allocator, 0);