summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2013-04-21 11:20:12 -0500
committerColin Noga <Tempus@chronometry.ca>2013-04-21 11:20:12 -0500
commitf7d6d47758b48af86089088fd9fab07cc16bc989 (patch)
tree949c299a92de133836a9fc64b524aeb0771b6332 /src
parent8c8705cc19e6422b125f2c0bd3c4f0d26f1297a0 (diff)
downloadkamek-f7d6d47758b48af86089088fd9fab07cc16bc989.tar.gz
kamek-f7d6d47758b48af86089088fd9fab07cc16bc989.zip
Minor fixes
Diffstat (limited to 'src')
-rw-r--r--src/makeYourOwnModelSprite.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/makeYourOwnModelSprite.cpp b/src/makeYourOwnModelSprite.cpp
index 1491053..ceb72e1 100644
--- a/src/makeYourOwnModelSprite.cpp
+++ b/src/makeYourOwnModelSprite.cpp
@@ -38,6 +38,7 @@ class dMakeYourOwn : public dStageActor_c {
bool isAnimating;
float size;
float zOrder;
+ bool customZ;
void setupAnim(const char* name, float rate);
void setupModel(const char* arcName, const char* brresName, const char* mdlName);
@@ -88,6 +89,8 @@ int dMakeYourOwn::onCreate() {
this->zOrder = zLevels[(this->settings >> 16) & 0xF];
+ this->customZ = (((this->settings >> 16) & 0xF) != 0);
+
// Setup the models inside an allocator
allocator.link(-1, GameHeaps[0], 0, 0x20);
@@ -537,16 +540,16 @@ int dMakeYourOwn::onExecute() {
}
int dMakeYourOwn::onDraw() {
- if ((this->settings >> 16) & 0xF != 0) {
+ if (customZ) {
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.
else {
- 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, 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.applyRotationYXZ(&rot.x, &rot.y, &rot.z); // Set how to rotate the drawn model
bodyModel.setDrawMatrix(matrix); // Apply matrix
bodyModel.setScale(&scale); // Apply scale
- bodyModel.calcWorld(false); // Do some shit
+ bodyModel.calcWorld(true); // Do some shit
bodyModel.scheduleForDrawing(); // Add it to the draw list for the game
return true;