am 65ab88c7: am 21977eb0: Merge change I56981989 into eclair

Merge commit '65ab88c78916d7e3a182125878b17c8f40d7cac5' into eclair-mr2-plus-aosp

* commit '65ab88c78916d7e3a182125878b17c8f40d7cac5':
  fix [2231527] Compatibility with SpaceJunk game (OpenGL)
This commit is contained in:
Mathias Agopian
2009-11-03 15:21:00 -08:00
committed by Android Git Automerger

View File

@@ -741,20 +741,19 @@ void point4__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) {
void point4__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) { void point4__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) {
// this used for transforming light positions back to object space. // this used for transforming light positions back to object space.
// Lights have 3 components positions, so w is always 1. // w is used as a switch for directional lights, so we need
// however, it is used as a switch for directional lights, so we need
// to preserve it. // to preserve it.
const GLfixed* const m = mx->matrix.m; const GLfixed* const m = mx->matrix.m;
const GLfixed rx = rhs->x; const GLfixed rx = rhs->x;
const GLfixed ry = rhs->y; const GLfixed ry = rhs->y;
const GLfixed rz = rhs->z; const GLfixed rz = rhs->z;
lhs->x = mla3a(rx, m[ 0], ry, m[ 4], rz, m[ 8], m[12]); const GLfixed rw = rhs->w;
lhs->y = mla3a(rx, m[ 1], ry, m[ 5], rz, m[ 9], m[13]); lhs->x = mla4(rx, m[ 0], ry, m[ 4], rz, m[ 8], rw, m[12]);
lhs->z = mla3a(rx, m[ 2], ry, m[ 6], rz, m[10], m[14]); lhs->y = mla4(rx, m[ 1], ry, m[ 5], rz, m[ 9], rw, m[13]);
lhs->w = rhs->w; lhs->z = mla4(rx, m[ 2], ry, m[ 6], rz, m[10], rw, m[14]);
lhs->w = rw;
} }
void point2__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) { void point2__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) {
lhs->z = 0; lhs->z = 0;
lhs->w = 0x10000; lhs->w = 0x10000;