Mercurial > mm7
comparison IndoorCameraD3D.cpp @ 1370:14695590d7a6
GetPortalScreenCoord fix
author | Ritor1 |
---|---|
date | Mon, 15 Jul 2013 15:03:40 +0600 |
parents | 66c625fd1113 |
children | cc9a3a24d61d |
comparison
equal
deleted
inserted
replaced
1345:b99aeb077d4f | 1370:14695590d7a6 |
---|---|
134 int to_x; // [sp+14h] [bp+8h]@1 | 134 int to_x; // [sp+14h] [bp+8h]@1 |
135 int to_y; // [sp+18h] [bp+Ch]@1 | 135 int to_y; // [sp+18h] [bp+Ch]@1 |
136 int a2b; // [sp+18h] [bp+Ch]@5 | 136 int a2b; // [sp+18h] [bp+Ch]@5 |
137 int a3a; // [sp+1Ch] [bp+10h]@5 | 137 int a3a; // [sp+1Ch] [bp+10h]@5 |
138 | 138 |
139 to_x = (x - pBLVRenderParams->vPartyPos.x) << 16; | 139 to_x = x - pBLVRenderParams->vPartyPos.x; |
140 to_y = (y - pBLVRenderParams->vPartyPos.y) << 16; | 140 to_y = y - pBLVRenderParams->vPartyPos.y; |
141 if ( pBLVRenderParams->sPartyRotX ) | 141 if ( pBLVRenderParams->sPartyRotX ) |
142 { | 142 { |
143 to_z = (z - pBLVRenderParams->vPartyPos.z) << 16; | 143 to_z = (z - pBLVRenderParams->vPartyPos.z) << 16; |
144 if ( pRenderer->pRenderD3D ) | 144 if ( pRenderer->pRenderD3D ) |
145 { | 145 { |
146 v14 = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) >> 16) | 146 v14 = (unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) |
147 + ((unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sSineY) >> 16); | 147 + (unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sSineY); |
148 v9 = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sSineY) >> 16) | 148 v9 = (unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sSineY) |
149 - ((unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sCosineY) >> 16); | 149 - (unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sCosineY); |
150 } | 150 } |
151 else | 151 else |
152 { | 152 { |
153 v14 = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) >> 16) | 153 v14 = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) >> 16) |
154 - ((unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sSineY) >> 16); | 154 - ((unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sSineY) >> 16); |
167 { | 167 { |
168 pOutY_ = (z - pBLVRenderParams->vPartyPos.z) << 16; | 168 pOutY_ = (z - pBLVRenderParams->vPartyPos.z) << 16; |
169 if ( pRenderer->pRenderD3D ) | 169 if ( pRenderer->pRenderD3D ) |
170 { | 170 { |
171 v10 = pOutX; | 171 v10 = pOutX; |
172 *pOutX = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) >> 16) | 172 *pOutX = (unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) |
173 + ((unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sSineY) >> 16); | 173 + (unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sSineY); |
174 *pOutZ = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sSineY) >> 16) | 174 *pOutZ = (unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sSineY) |
175 - ((unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sCosineY) >> 16); | 175 - (unsigned __int64)(to_y * (signed __int64)pBLVRenderParams->sCosineY); |
176 } | 176 } |
177 else | 177 else |
178 { | 178 { |
179 v10 = pOutX; | 179 v10 = pOutX; |
180 *pOutX = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) >> 16) | 180 *pOutX = ((unsigned __int64)(to_x * (signed __int64)pBLVRenderParams->sCosineY) >> 16) |