diff options
author | Treeki <treeki@gmail.com> | 2012-01-16 01:51:12 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-01-16 01:51:12 +0100 |
commit | c5205660419679499cd6c7c89426279290bea5ce (patch) | |
tree | 93d4af910ba9fab08b7ce36d9ca29aa482de7561 /src/koopatlas/map.cpp | |
parent | 2bf4f9ef114e667aa8a230b169e05f1edf005107 (diff) | |
download | kamek-c5205660419679499cd6c7c89426279290bea5ce.tar.gz kamek-c5205660419679499cd6c7c89426279290bea5ce.zip |
quick optimisation I noticed
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/map.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp index d78aad4..0334926 100644 --- a/src/koopatlas/map.cpp +++ b/src/koopatlas/map.cpp @@ -352,11 +352,13 @@ void dWMMap_c::renderer_c::renderDoodadLayer(dKPLayer_s *layer) { Mtx doodadMtx; MTXTransApply(renderMtx, doodadMtx, effectiveX + halfW, -effectiveY - halfH, 0); - - Mtx rotMtx; - MTXRotDeg(rotMtx, 'z', -effectiveAngle); - MTXConcat(doodadMtx, rotMtx, doodadMtx); + if (effectiveAngle != 0) { + Mtx rotMtx; + MTXRotDeg(rotMtx, 'z', -effectiveAngle); + + MTXConcat(doodadMtx, rotMtx, doodadMtx); + } loadCamera(doodadMtx); loadTexture(doodad->texObj); |