diff options
Diffstat (limited to '')
| -rw-r--r-- | src/shyguy.cpp | 68 | ||||
| -rw-r--r-- | src/topman.cpp | 7 | 
2 files changed, 26 insertions, 49 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp index c30690a..ee7a1bf 100644 --- a/src/shyguy.cpp +++ b/src/shyguy.cpp @@ -51,7 +51,7 @@ class daShyGuy : public dEn_c {  	m3d::mdl_c bodyModel;  	m3d::mdl_c balloonModel;  	m3d::mdl_c balloonModelB; -	// m3d::mdl_c carryModel; +	// m3d::mdl_c carryModel;1  	m3d::anmChr_c chrAnimation;  	// m3d::anmChr_c carryAnm; @@ -215,6 +215,13 @@ daShyGuy *daShyGuy::build() {  	}  	void daShyGuy::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) { +		u16 name = ((dEn_c*)apOther->owner)->name; + +		if (name == EN_COIN || name == EN_EATCOIN || name == AC_BLOCK_COIN || name == EN_COIN_JUGEM || name == EN_COIN_ANGLE +			|| name == EN_COIN_JUMP || name == EN_COIN_FLOOR || name == EN_COIN_VOLT || name == EN_COIN_WIND  +			|| name == EN_BLUE_COIN || name == EN_COIN_WATER || name == EN_REDCOIN || name == EN_GREENCOIN)  +			{ return; } +  		if (acState.getCurrentState() == &StateID_RealWalk) {  			pos.x = ((pos.x - ((dEn_c*)apOther->owner)->pos.x) > 0) ? pos.x + 1.5 : pos.x - 1.5; @@ -1013,10 +1020,14 @@ void daShyGuy::updateModelMatrices() {  // Judo State  ///////////////  	void daShyGuy::beginState_Judo() {  +		this->max_speed.x = 0.0; +		this->speed.x = 0.0; +		this->x_speed_inc = 0.0; +		this->pos.y -= 4.0; +  		this->timer = 0;  	}  	void daShyGuy::executeState_Judo() {  -		calculateTileCollisions();  	// chargin 476? 673? 760? 768? 808? 966?  		if (this->timer == 0) { bindAnimChr_and_setUpdateRate("c18_OB_IDLE_R", 1, 0.0, 1.0); } @@ -1095,9 +1106,13 @@ void daShyGuy::updateModelMatrices() {  	void daShyGuy::beginState_Spike() {   		this->timer = 80;  		spikeTurn = 0; + +		this->max_speed.x = 0.0; +		this->speed.x = 0.0; +		this->x_speed_inc = 0.0; +		this->pos.y -= 4.0;  	}  	void daShyGuy::executeState_Spike() { -		calculateTileCollisions();  		if (this->timer == 0) { bindAnimChr_and_setUpdateRate("c18_OB_IDLE_R", 1, 0.0, 1.0); } @@ -1150,58 +1165,13 @@ void daShyGuy::updateModelMatrices() {  				spawned->speed.x = 2.0;  				spawned->speed.y = 2.0;  			} - -			// if (spikeTurn == 0) {  -			// 	if (this->spikeA != 0) { -			// 		PlaySound(spikeA, SE_OBJ_ROCK_S_CRASH); -			// 		CreateEffect(&(Vec){this->spikeA->pos.x, this->spikeA->pos.y, 5500.0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 9);  -			// 		this->spikeA->Delete(this->spikeA->deleteForever); -			// 	} -			// 	this->spikeA = spawned;  -			// 	spikeTurn = 1; -			// } -			// else { -			// 	if (this->spikeB != 0) { -			// 		PlaySound(spikeB, SE_OBJ_ROCK_S_CRASH); -			// 		CreateEffect(&(Vec){this->spikeB->pos.x, this->spikeB->pos.y, 5500.0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 9);  -			// 		this->spikeB->Delete(this->spikeB->deleteForever); -			// 	} -			// 	this->spikeB = spawned;  -			// 	spikeTurn = 0; -			// } - -			// spawned->_320 = 0.0f; -			// spawned->_324 = 8.0f; -			// spawned->spriteSomeRectX = 8.0f; -			// spawned->spriteSomeRectY = 8.0f; - -			// spawned->_338 = 128.0f; -			// spawned->_33C = 128.0f; -			// spawned->_340 = 128.0f + 40.0f; -			// spawned->_344 = 128.0f + 40.0f; - -			// spawned->aPhysics.info.xDistToCenter = spawned->aPhysics.info.xDistToCenter / 2.0; -			// spawned->aPhysics.info.yDistToCenter = spawned->aPhysics.info.yDistToCenter / 2.0; -			// spawned->aPhysics.info.xDistToEdge = spawned->aPhysics.info.xDistToEdge / 2.0; -			// spawned->aPhysics.info.yDistToEdge = spawned->aPhysics.info.yDistToEdge / 2.0; - -			// static const u8 one[16] = { -			// 	0x01,0x80,0x41,0x01, 0xFF,0xFF,0x80,0x00, 0x00,0x00,0x70,0x00, 0x00,0x00,0xF0,0x00 -			// }; -			// static const u8 two[16] = { -			// 	0x00,0x00,0x00,0x01, 0xFF,0xFF,0x80,0x00, 0x00,0x00,0x70,0x00, 0xFF,0xFF,0x10,0x00 -			// }; -			// static const u8 three[16] = { -			// 	0x01,0x80,0x41,0x01, 0xFF,0xFF,0x90,0x00, 0x00,0x00,0x80,0x00, 0x00,0x00,0xEF0,0x00 -			// }; -			// spawned->collMgr.init(spawned, two, one, three); -  		}  		else {  			if(this->chrAnimation.isAnimationDone()) {  				this->timer = 0; +				return;  			}  		} diff --git a/src/topman.cpp b/src/topman.cpp index 3d309a6..8b99f0d 100644 --- a/src/topman.cpp +++ b/src/topman.cpp @@ -298,6 +298,8 @@ void daTopman::bindAnimChr_and_setUpdateRate(const char* name, int unk, float un  }  int daTopman::onCreate() { + +	this->deleteForever = true;  	// Model creation	  	allocator.link(-1, GameHeaps[0], 0, 0x20); @@ -394,6 +396,11 @@ int daTopman::onExecute() {  	acState.execute();  	updateModelMatrices(); +	float rect[] = {0.0, 0.0, 38.0, 38.0}; +	int ret = this->outOfZone(this->pos, (float*)&rect, this->currentZoneID); +	if(ret) { +		this->Delete(1); +	}  	return true;  }  | 
