diff options
Diffstat (limited to '')
| -rw-r--r-- | src/shyguy.cpp | 57 | 
1 files changed, 42 insertions, 15 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp index 22d157f..e838516 100644 --- a/src/shyguy.cpp +++ b/src/shyguy.cpp @@ -141,6 +141,7 @@ daShyGuy *daShyGuy::build() {  	extern "C" int SomeStrangeModification(dStageActor_c* actor);  	extern "C" void DoStuffAndMarkDead(dStageActor_c *actor, Vec vector, float unk);  	extern "C" int SmoothRotation(short* rot, u16 amt, int unk2); +	extern "C" void addToList(RideableActorCollider *self);  	CREATE_STATE(daShyGuy, Walk); @@ -285,6 +286,7 @@ daShyGuy *daShyGuy::build() {  		if (this->damage > 2) {  			doStateChange(&StateID_DieSmoke); +			this._vf14C();		  		}  		else {  			doStateChange(stateVar); @@ -369,8 +371,6 @@ bool daShyGuy::calculateTileCollisions() {  	return false;  } - -  void daShyGuy::bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate) {  	nw4r::g3d::ResAnmChr anmChr = this->anmFile.GetResAnmChr(name);  	this->chrAnimation.bind(&this->bodyModel, anmChr, unk); @@ -440,10 +440,10 @@ int daShyGuy::onCreate() {  	this->speed.x = 0.0;  	this->speed.y = 0.0; -	this->max_speed.x = 1.0; +	this->max_speed.x = 0.8;  	this->x_speed_inc = 0.2;  	this->Baseline = this->pos.y; -	this->XSpeed = 1.0; +	this->XSpeed = 0.8;  	this->balloonSize = 1.5;  	OSReport("Creating ShyGuy's Physics Struct\n"); @@ -453,13 +453,16 @@ int daShyGuy::onCreate() {  	if (type > 8) {  		this->scale = (Vec){40.0f, 40.0f, 40.0f}; -		giantRider.init(this, -24.0f, 28.0f, 24.0f, 28.0f); -  		HitMeBaby.xDistToCenter = 0.0;  		HitMeBaby.yDistToCenter = 24.0;  		HitMeBaby.xDistToEdge = 28.0;  		HitMeBaby.yDistToEdge = 24.0; + +		giantRider.init(this, -19.5f, 18.0f, 19.5f, 18.0f); +		addToList(&giantRider); + +		giantRider.update();  	}  	else { @@ -481,6 +484,7 @@ int daShyGuy::onCreate() {  	this->aPhysics.initWithStruct(this, &HitMeBaby);  	this->aPhysics.addToList(); +  	// Tile collider  	OSReport("Making the Tile collider Class\n"); @@ -610,6 +614,10 @@ void daShyGuy::updateModelMatrices() {  		bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);   		this->timer = 0;  		this->rot.y = (direction) ? 0xD800 : 0x2800; + +		this->max_speed.x = 0.0; +		this->speed.x = 0.0; +		this->x_speed_inc = 0.0;  	}  	void daShyGuy::executeState_Walk() {  @@ -838,10 +846,10 @@ void daShyGuy::updateModelMatrices() {  		if (this->timer == 80) {   			if (this->direction == 1) {  -				CreateEffect(&(Vec){this->pos.x + 7.0, this->pos.y + 14.0, this->pos.z + 5600.0}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8}, 966);  +				CreateEffect(&(Vec){this->pos.x + 7.0, this->pos.y + 14.0, this->pos.z - 5500.0}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8}, 966);   			}  			else { -				CreateEffect(&(Vec){this->pos.x - 7.0, this->pos.y + 14.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8}, 966);  +				CreateEffect(&(Vec){this->pos.x - 7.0, this->pos.y + 14.0, this->pos.z + 5500.0}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8}, 966);   			}	  		} @@ -962,6 +970,18 @@ void daShyGuy::updateModelMatrices() {  				spawned->speed.x = 2.0;  				spawned->speed.y = 2.0;  			} + +			spawned->_320 = 0.0f; +			spawned->_324 = 8.0f; +			spawned->spriteSomeRectX = 8.0f; +			spawned->spriteSomeRectY = 8.0f; + +			// TODO: Figure these out +			spawned->_338 = 128.0f; +			spawned->_33C = 128.0f; +			spawned->_340 = 128.0f + 40.0f; +			spawned->_344 = 128.0f + 40.0f; +  		}  		else { @@ -981,7 +1001,7 @@ void daShyGuy::updateModelMatrices() {  		//inline this piece of code  		bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);   		this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed; -		this->speed.x = (direction) ? -1.0f : 1.0f; +		this->speed.x = (direction) ? -0.8f : 0.8f;  		this->max_speed.y = -4.0;  		this->speed.y = -4.0; @@ -1033,8 +1053,11 @@ void daShyGuy::updateModelMatrices() {  		CreateEffect(318, &(Vec){this->pos.x, this->pos.y + 24.0, 0}, 0);  -		this->max_speed.y = -2.0; +		this->max_speed.x = 0;  		this->speed.x = 0; +		this->x_speed_inc = 0; + +		this->max_speed.y = -2.0;  		this->speed.y = -2.0;  		this->y_speed_inc = -0.1875; @@ -1218,6 +1241,13 @@ void daShyGuy::updateModelMatrices() {  		this->timer = 0;  		this->dying = -10.0;  		this->Baseline = this->pos.y; +		this->rot.y = 0; +		this->rot.x = 0; + +		if (type > 5 && type < 9) { +			this->renderBalloon = 0; +			CreateEffect(&(Vec){this->pos.x, this->pos.y - 32.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 337);  +		}  	}  	void daShyGuy::executeState_Die() {  @@ -1227,22 +1257,19 @@ void daShyGuy::updateModelMatrices() {  		this->timer += 1; -		this->pos.x += 0.5;  +		// this->pos.x += 0.5;   		this->pos.y = Baseline + (-0.2 * dying * dying) + 20.0;  		this->dying += 0.5; - -		this->dEn_c::dieFall_Execute();  		if (this->timer > 450) {  			this->kill();  			return;  		} -		dEn_c::dieFall_Execute(); +		// dEn_c::dieFall_Execute();  	}  	void daShyGuy::endState_Die() { -		dEn_c::dieFall_End();  	}  | 
