summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2013-04-12 14:02:47 -0500
committerColin Noga <Tempus@chronometry.ca>2013-04-12 14:02:47 -0500
commitfa8bbea36e980cda0ca36569c81d8315364d482a (patch)
treefe70a99b49dd3b845ef67b95b555036d1c59f5fe /src
parente7abd34aaeb3f479ded4fa0c37ca954f77edb25d (diff)
downloadkamek-fa8bbea36e980cda0ca36569c81d8315364d482a.tar.gz
kamek-fa8bbea36e980cda0ca36569c81d8315364d482a.zip
More Models for the sacrifice! And Z-orders!
Diffstat (limited to 'src')
-rw-r--r--src/makeYourOwnModelSprite.cpp40
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