Mercurial > mm7
comparison mm7_2.cpp @ 194:650d96af8855
Vis overhaul; sprites can be picked by mouse
author | Nomad |
---|---|
date | Sat, 16 Feb 2013 18:32:37 +0200 |
parents | 9b77686e2239 |
children | 982c1ec5a983 |
comparison
equal
deleted
inserted
replaced
192:1c8add70bcf9 | 194:650d96af8855 |
---|---|
30 #include "stru123.h" | 30 #include "stru123.h" |
31 #include "stru287.h" | 31 #include "stru287.h" |
32 #include "Time.h" | 32 #include "Time.h" |
33 #include "IconFrameTable.h" | 33 #include "IconFrameTable.h" |
34 #include "GUIProgressBar.h" | 34 #include "GUIProgressBar.h" |
35 #include "stru157.h" | |
36 #include "Bink_Smacker.h" | 35 #include "Bink_Smacker.h" |
37 #include "TileFrameTable.h" | 36 #include "TileFrameTable.h" |
38 #include "PlayerFrameTable.h" | 37 #include "PlayerFrameTable.h" |
39 #include "Awards.h" | 38 #include "Awards.h" |
40 #include "Autonotes.h" | 39 #include "Autonotes.h" |
11979 } | 11978 } |
11980 if ( pGame != (Game *)v28 ) | 11979 if ( pGame != (Game *)v28 ) |
11981 { | 11980 { |
11982 if ( pAsyncMouse != (void *)v28 ) | 11981 if ( pAsyncMouse != (void *)v28 ) |
11983 goto _def_wnd_proc; | 11982 goto _def_wnd_proc; |
11984 pGame->PickMouse(512.0, (unsigned __int16)lParam, lParam >> 16, v28, &a3, &a4); | 11983 pGame->PickMouse(512.0, (unsigned __int16)lParam, lParam >> 16, v28, &vis_sprite_filter_3, &vis_door_filter); |
11985 } | 11984 } |
11986 if ( pAsyncMouse == (void *)v28 ) | 11985 if ( pAsyncMouse == (void *)v28 ) |
11987 { | 11986 { |
11988 UI_OnMouseLeftClick(0); | 11987 UI_OnMouseLeftClick(0); |
11989 return DefWindowProcA(hWnd, Msg, wParam, v4); | 11988 return DefWindowProcA(hWnd, Msg, wParam, v4); |
12001 if (pGame) | 12000 if (pGame) |
12002 { | 12001 { |
12003 if (pAsyncMouse) | 12002 if (pAsyncMouse) |
12004 goto _def_wnd_proc; | 12003 goto _def_wnd_proc; |
12005 v33 = GetPickDepth(); | 12004 v33 = GetPickDepth(); |
12006 pGame->PickMouse(v33, (unsigned __int16)lParam, lParam >> 16, v31, &stru_F93E30, &a4); | 12005 pGame->PickMouse(v33, (unsigned __int16)lParam, lParam >> 16, v31, &vis_sprite_filter_2, &vis_door_filter); |
12007 } | 12006 } |
12008 if (!pAsyncMouse) | 12007 if (!pAsyncMouse) |
12009 { | 12008 { |
12010 sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(0); | 12009 sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(0); |
12011 return DefWindowProcA(hWnd, Msg, wParam, v4); | 12010 return DefWindowProcA(hWnd, Msg, wParam, v4); |
12020 if ( pRenderer->pRenderD3D ) | 12019 if ( pRenderer->pRenderD3D ) |
12021 { | 12020 { |
12022 if ( pGame && !pAsyncMouse ) | 12021 if ( pGame && !pAsyncMouse ) |
12023 { | 12022 { |
12024 v34 = GetPickDepth(); | 12023 v34 = GetPickDepth(); |
12025 pGame->PickMouse(v34, (unsigned __int16)lParam, lParam >> 16, 1, &a3, &a5); | 12024 pGame->PickMouse(v34, (unsigned __int16)lParam, lParam >> 16, 1, &vis_sprite_filter_3, &vis_face_filter); |
12026 return DefWindowProcA(hWnd, Msg, wParam, v4); | 12025 return DefWindowProcA(hWnd, Msg, wParam, v4); |
12027 } | 12026 } |
12028 goto _def_wnd_proc; | 12027 goto _def_wnd_proc; |
12029 } | 12028 } |
12030 if ( !pGame ) | 12029 if ( !pGame ) |
15206 } | 15205 } |
15207 | 15206 |
15208 //----- (0046A14B) -------------------------------------------------------- | 15207 //----- (0046A14B) -------------------------------------------------------- |
15209 char __cdecl OnPressSpace() | 15208 char __cdecl OnPressSpace() |
15210 { | 15209 { |
15211 SHORT v0; // ax@2 | 15210 //SHORT v0; // ax@2 |
15212 int *v1; // eax@2 | 15211 int *v1; // eax@2 |
15213 char *v2; // ebx@5 | 15212 char *v2; // ebx@5 |
15214 unsigned int v3; // esi@5 | 15213 unsigned int v3; // esi@5 |
15215 signed int v4; // edi@7 | 15214 signed int v4; // edi@7 |
15216 unsigned int v5; // edx@7 | 15215 unsigned int v5; // edx@7 |
15231 int *v21; // [sp+18h] [bp-8h]@7 | 15230 int *v21; // [sp+18h] [bp-8h]@7 |
15232 int v22; // [sp+1Ch] [bp-4h]@4 | 15231 int v22; // [sp+1Ch] [bp-4h]@4 |
15233 | 15232 |
15234 if ( pRenderer->pRenderD3D ) | 15233 if ( pRenderer->pRenderD3D ) |
15235 { | 15234 { |
15236 v0 = GetAsyncKeyState(17); | 15235 pGame->PickKeyboard(GetAsyncKeyState(VK_CONTROL) & 0x8001, &vis_sprite_filter_3, &vis_door_filter); |
15237 pGame->_44EB12((v0 & 0x8001) != 0, &a3, &a4); | |
15238 v1 = (int *)pGame->pVisInstance->get_picked_object_zbuf_val(); | 15236 v1 = (int *)pGame->pVisInstance->get_picked_object_zbuf_val(); |
15239 if ( v1 != (int *)-1 ) | 15237 if ( v1 != (int *)-1 ) |
15240 LOBYTE(v1) = DoInteractionWithTopmostZObject((unsigned __int16)v1, (signed int)(unsigned __int16)v1 >> 3); | 15238 LOBYTE(v1) = DoInteractionWithTopmostZObject((unsigned __int16)v1, (signed int)(unsigned __int16)v1 >> 3); |
15241 return (char)v1; | 15239 return (char)v1; |
15242 } | 15240 } |
15613 { | 15611 { |
15614 do | 15612 do |
15615 { | 15613 { |
15616 v3 = pRenderer->GetParentBillboardID(a1a); | 15614 v3 = pRenderer->GetParentBillboardID(a1a); |
15617 v4 = pBillboardRenderList[v3].sZValue; | 15615 v4 = pBillboardRenderList[v3].sZValue; |
15618 v5 = (unsigned __int16)pBillboardRenderList[v3].sZValue; | 15616 v5 = (unsigned __int16)pBillboardRenderList[v3].object_pid; |
15619 if ( (v5 & 7) == OBJECT_Actor) | 15617 if ( (v5 & 7) == OBJECT_Actor) |
15620 { | 15618 { |
15621 if ( v4 <= (unsigned int)(a3 << 16) ) | 15619 if ( v4 <= (unsigned int)(a3 << 16) ) |
15622 { | 15620 { |
15623 v6 = v5 >> 3; | 15621 v6 = v5 >> 3; |