diff options
Diffstat (limited to 'src/makeYourOwnModelSprite.cpp')
-rw-r--r-- | src/makeYourOwnModelSprite.cpp | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/src/makeYourOwnModelSprite.cpp b/src/makeYourOwnModelSprite.cpp index 7e5ace8..36ea1db 100644 --- a/src/makeYourOwnModelSprite.cpp +++ b/src/makeYourOwnModelSprite.cpp @@ -37,6 +37,7 @@ class dMakeYourOwn : public dStageActor_c { int model; bool isAnimating; float size; + float zOrder; void setupAnim(const char* name, float rate); void setupModel(const char* arcName, const char* brresName, const char* mdlName); @@ -79,6 +80,16 @@ int dMakeYourOwn::onCreate() { this->isAnimating = this->settings & 0x100; // Sets nybble 11 to a checkbox for whether or not the model has an anmChr to use this->size = (float)((this->settings >> 24) & 0xFF) / 4.0; // Sets nybbles 5-6 to size. Size equals value / 4. + + float zLevels[16] = {-6500.0, -5000.0, -4500.0, -2000.0, + -1000.0, 300.0, 800.0, 1600.0, + 2000.0, 3600.0, 4000.0, 4500.0, + 6000.0, 6500.0, 7000.0, 7500.0 }; + + currentInfo = &types[Type]; + + this->zOrder = &zLevels[(this->settings >> 16) & 0xF] + // Setup the models inside an allocator allocator.link(-1, GameHeaps[0], 0, 0x20); @@ -465,6 +476,33 @@ int dMakeYourOwn::onCreate() { setupAnim("anim38", 1.0); break; + + case 40: // Chestnut Canopy + + setupModel("chestnut", "g3d/canopy.brres", "canopy"); + SetupTextures_MapObj(&bodyModel, 0); + this->pos.z = 0.0; + + // setupAnim("anim38", 1.0); + break; + + case 41: // Chestnut Canopy + + setupModel("chestnut", "g3d/canopy_1.brres", "canopy_1"); + SetupTextures_MapObj(&bodyModel, 0); + this->pos.z = 0.0; + + // setupAnim("anim38", 1.0); + break; + + case 42: // Chestnut Canopy + + setupModel("chestnut", "g3d/canopy_2.brres", "canopy_2"); + SetupTextures_MapObj(&bodyModel, 0); + this->pos.z = 0.0; + + // setupAnim("anim38", 1.0); + break; } allocator.unlink(); @@ -501,7 +539,7 @@ int dMakeYourOwn::onExecute() { } int dMakeYourOwn::onDraw() { - matrix.translation(pos.x, pos.y, pos.z - 6500.0); // Set where to draw the model : -5500.0 is the official behind layer 2, while 5500.0 is in front of layer 0. + matrix.translation(pos.x, pos.y, this->zOrder); // Set where to draw the model : -5500.0 is the official behind layer 2, while 5500.0 is in front of layer 0. matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z); // Set how to rotate the drawn model bodyModel.setDrawMatrix(matrix); // Apply matrix |