comparison mm7_2.cpp @ 196:982c1ec5a983

More picking stuff
author Nomad
date Sat, 16 Feb 2013 20:24:02 +0200
parents 650d96af8855
children 30aa44013f7a
comparison
equal deleted inserted replaced
195:3dfa006a6bef 196:982c1ec5a983
15203 } 15203 }
15204 return stru_5C6E00->Atan2(_this - pViewport->uScreenCenterY, v3) - stru_5C6E00->uIntegerHalfPi; 15204 return stru_5C6E00->Atan2(_this - pViewport->uScreenCenterY, v3) - stru_5C6E00->uIntegerHalfPi;
15205 } 15205 }
15206 15206
15207 //----- (0046A14B) -------------------------------------------------------- 15207 //----- (0046A14B) --------------------------------------------------------
15208 char __cdecl OnPressSpace() 15208 void OnPressSpace()
15209 { 15209 {
15210 //SHORT v0; // ax@2 15210 //SHORT v0; // ax@2
15211 int *v1; // eax@2 15211 int *v1; // eax@2
15212 char *v2; // ebx@5 15212 char *v2; // ebx@5
15213 unsigned int v3; // esi@5 15213 unsigned int v3; // esi@5
15233 if ( pRenderer->pRenderD3D ) 15233 if ( pRenderer->pRenderD3D )
15234 { 15234 {
15235 pGame->PickKeyboard(GetAsyncKeyState(VK_CONTROL) & 0x8001, &vis_sprite_filter_3, &vis_door_filter); 15235 pGame->PickKeyboard(GetAsyncKeyState(VK_CONTROL) & 0x8001, &vis_sprite_filter_3, &vis_door_filter);
15236 v1 = (int *)pGame->pVisInstance->get_picked_object_zbuf_val(); 15236 v1 = (int *)pGame->pVisInstance->get_picked_object_zbuf_val();
15237 if ( v1 != (int *)-1 ) 15237 if ( v1 != (int *)-1 )
15238 LOBYTE(v1) = DoInteractionWithTopmostZObject((unsigned __int16)v1, (signed int)(unsigned __int16)v1 >> 3); 15238 DoInteractionWithTopmostZObject((unsigned __int16)v1, (signed int)(unsigned __int16)v1 >> 3);
15239 return (char)v1;
15240 } 15239 }
15241 v22 = 0; 15240 v22 = 0;
15242 v1 = (int *)((signed int)(viewparams->uScreenZ + viewparams->uScreenX) >> 1); 15241 v1 = (int *)((signed int)(viewparams->uScreenZ + viewparams->uScreenX) >> 1);
15243 if ( (signed int)viewparams->uScreenY >= (signed int)viewparams->uScreenW ) 15242 if ( (signed int)viewparams->uScreenY >= (signed int)viewparams->uScreenW )
15244 goto LABEL_21; 15243 goto LABEL_21;
15331 { 15330 {
15332 LOBYTE(v1) = DoInteractionWithTopmostZObject(dword_720660[j] & 0xFFFF, v16); 15331 LOBYTE(v1) = DoInteractionWithTopmostZObject(dword_720660[j] & 0xFFFF, v16);
15333 if ( !(char)v1 ) 15332 if ( !(char)v1 )
15334 break; 15333 break;
15335 } 15334 }
15336 return (char)v1;
15337 } 15335 }
15338 // 72065C: using guessed type int dword_72065C[];
15339 // 7207EC: using guessed type int dword_7207EC[];
15340 15336
15341 //----- (0046A334) -------------------------------------------------------- 15337 //----- (0046A334) --------------------------------------------------------
15342 char __fastcall DoInteractionWithTopmostZObject(int a1, int a2) 15338 char __fastcall DoInteractionWithTopmostZObject(int a1, int a2)
15343 { 15339 {
15344 int v2; // edx@1 15340 int v2; // edx@1