diff options
| -rwxr-xr-x | src/mrsun.cpp | 18 | 
1 files changed, 16 insertions, 2 deletions
| diff --git a/src/mrsun.cpp b/src/mrsun.cpp index 3ef27ed..bce5908 100755 --- a/src/mrsun.cpp +++ b/src/mrsun.cpp @@ -13,6 +13,8 @@ class daMrSun_c : public dEn_c {  	static daMrSun_c *build(); +	void updateModelMatrix(); +  	USING_STATES(daMrSun_c);  	DECLARE_STATE(Follow);  	DECLARE_STATE(Swoop); @@ -39,7 +41,7 @@ int daMrSun_c::onCreate() {  	OSReport("Creating the Mr.Sun Model");  	allocator.link(-1, GameHeaps[0], 0, 0x20); -	nw4r::g3d::ResFile rf(getResource("g3d/bubble.brres", "bubble")); +	nw4r::g3d::ResFile rf(getResource("bubble", "g3d/t00.brres"));  	model.setup(rf.GetResMdl("bubble"), &allocator, 0x224, 1, 0);  	SetupTextures_Enemy(&model, 0); @@ -79,8 +81,9 @@ int daMrSun_c::onDelete() {  }  int daMrSun_c::onExecute() { -	OSReport("Oh Mr.Sun, Sun, Mr.Golden Sun"); +	//OSReport("Oh Mr.Sun, Sun, Mr.Golden Sun");  	acState.execute(); +	updateModelMatrix();  	return true;  } @@ -90,6 +93,17 @@ int daMrSun_c::onDraw() {  } +void daMrSun_c::updateModelMatrix() { +	// This won't work with wrap because I'm lazy. +	matrix.translation(pos.x, pos.y, pos.z); +	matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z); + +	model.setDrawMatrix(matrix); +	model.setScale(&scale); +	model.calcWorld(false); +} + +  void daMrSun_c::beginState_Follow() { }  void daMrSun_c::executeState_Follow() { } | 
