comparison _deleted.cpp @ 2020:b123afb8246b

WritePointedObjectStatusString() clear
author Ritor1
date Mon, 11 Nov 2013 22:03:16 +0600
parents 30c2b575d25c
children b2a434d65344
comparison
equal deleted inserted replaced
2019:ab7d10b66503 2020:b123afb8246b
13836 default: 13836 default:
13837 swprintf(b, wcslen(L"UIMSG_%03X") , L"UIMSG_%03X", msg); return b; 13837 swprintf(b, wcslen(L"UIMSG_%03X") , L"UIMSG_%03X", msg); return b;
13838 }; 13838 };
13839 #undef CASE 13839 #undef CASE
13840 } 13840 }
13841
13842 //----- (0046A99B) --------------------------------------------------------
13843 int sub_46A99B()
13844 {
13845 int v0; // ebx@1
13846 signed int v1; // ecx@1
13847 signed int v2; // esi@1
13848 int v3; // edx@1
13849 signed int v4; // eax@1
13850 int v5; // ecx@2
13851 int *v6; // eax@3
13852 int v7; // ecx@3
13853 int v8; // edx@5
13854 int v9; // edi@6
13855 unsigned __int8 v10; // zf@14
13856 char v11; // sf@14
13857 char v12; // of@14
13858 int *v14; // esi@19
13859 signed int v15; // ebx@19
13860 int i; // edi@20
13861 int v17; // ecx@21
13862 int v18; // edi@26
13863 int v19; // esi@27
13864 unsigned int v20; // ecx@27
13865 BLVFace *v21; // eax@32
13866 unsigned int v22; // ecx@33
13867 const char *v23; // eax@35
13868 const char *v24; // ecx@36
13869 LevelDecoration *v25; // ecx@43
13870 LevelDecoration *v26; // edi@43
13871 __int16 v27; // ax@43
13872 int v28; // [sp+Ch] [bp-18h]@1
13873 int v29; // [sp+14h] [bp-10h]@2
13874 int v30; // [sp+18h] [bp-Ch]@1
13875 signed int v31; // [sp+1Ch] [bp-8h]@3
13876 int v32; // [sp+20h] [bp-4h]@1
13877
13878 v0 = 0;
13879 v1 = (signed int)(viewparams->uScreen_BttmR_Y + viewparams->uScreen_topL_Y) >> 1;
13880 v2 = (signed int)(viewparams->uScreen_topL_X + viewparams->uScreen_BttmR_X) >> 1;
13881 v3 = v1 - 50;
13882 v32 = 0;
13883 v4 = 100;
13884 v30 = v1 - 50;
13885 v28 = v1 + 50;
13886 if ( v1 - 50 >= v1 + 50 )
13887 return 0;
13888 v5 = 640 * v3;
13889 v29 = 640 * v3;
13890 while ( 2 )
13891 {
13892 v6 = &pRenderer->pActiveZBuffer[v2 + v5 - v4 / 2]-1;
13893 v7 = v0;
13894 //while ( 1 )
13895 for( int i = 0; i < 100; i++)
13896 {
13897 ++v6;
13898 v8 = *v6;
13899 if ( (unsigned int)*v6 <= 0x2000000 )
13900 {
13901 v9 = 0;
13902 if ( v7 > 0 )
13903 {
13904 do
13905 {
13906 if ( dword_7201B0_zvalues[v9] == (unsigned __int16)v8 )
13907 break;
13908 ++v9;
13909 }
13910 while ( v9 < v0 );
13911 }
13912 if ( v9 == v0 )
13913 {
13914 if ( v8 & 7 )
13915 {
13916 dword_720020_zvalues[v7] = v8;
13917 dword_7201B0_zvalues[v7] = (unsigned __int16)v8;
13918 ++v7;
13919 ++v0;
13920 v32 = v0;
13921 if ( v7 == 99 )
13922 {
13923 v12 = 0;
13924 v10 = v0 == 0;
13925 v11 = v0 < 0;
13926 goto LABEL_18;
13927 }
13928 }
13929 }
13930 }
13931 }
13932 v4 = -1;
13933 ++v30;
13934 v5 = v29 + 640;
13935 v29 += 640;
13936 if ( v30 >= v28 )
13937 break;
13938 }
13939 v12 = 0;
13940 v10 = v0 == 0;
13941 v11 = v0 < 0;
13942 if ( !v0 )
13943 return 0;
13944 LABEL_18:
13945 if ( !((unsigned __int8)(v11 ^ v12) | v10) )
13946 {
13947 v14 = dword_720020_zvalues.data();
13948 v15 = 1;
13949 do
13950 {
13951 for ( i = v15; i < v32; ++i )
13952 {
13953 v17 = dword_720020_zvalues[i];
13954 if ( v17 < *v14 )
13955 {
13956 dword_720020_zvalues[i] = *v14;
13957 *v14 = v17;
13958 }
13959 }
13960 ++v15;
13961 ++v14;
13962 }
13963 while ( v15 - 1 < v32 );
13964 v0 = v32;
13965 }
13966 v18 = 0;
13967 if ( v0 <= 0 )
13968 return 0;
13969 while ( 1 )
13970 {
13971 v19 = dword_720020_zvalues[v18] & 0xFFFF;
13972 v20 = PID_ID(dword_720020_zvalues[v18]);
13973 if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_Item)
13974 {
13975 if ( v20 >= 0x3E8 )
13976 return 0;
13977 if ( !(pSpriteObjects[v20].uAttributes & 0x10) )
13978 {
13979 v23 = pSpriteObjects[v20].stru_24.GetDisplayName();
13980 v24 = v23;
13981 GameUI_SetFooterString(v24);
13982 return v19;
13983 }
13984 }
13985 else
13986 {
13987 if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_Actor)
13988 {
13989 if ( v20 >= 0xBB8 )
13990 return 0;
13991 v24 = (const char *)&pActors[v20];
13992 GameUI_SetFooterString(v24);
13993 return v19;
13994 }
13995 if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_Decoration)
13996 break;
13997 if ( PID_TYPE(dword_720020_zvalues[v18]) == OBJECT_BModel)
13998 {
13999 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
14000 {
14001 v21 = &pIndoor->pFaces[v20];
14002 if ( BYTE3(v21->uAttributes) & 2 )
14003 v22 = pIndoor->pFaceExtras[v21->uFaceExtraID].uEventID;
14004 }
14005 else
14006 {
14007 if ( (dword_720020_zvalues[v18] & 0xFFFFu) >> 9 < pOutdoor->uNumBModels )
14008 {
14009 v22 = pOutdoor->pBModels[(dword_720020_zvalues[v18] & 0xFFFFu) >> 9].pFaces[v20 & 0x3F].sCogTriggeredID;
14010 if ( v22 )
14011 {
14012 v23 = GetEventHintString(v22);
14013 if ( v23 )
14014 {
14015 v24 = v23;
14016 GameUI_SetFooterString(v24);
14017 return v19;
14018 }
14019 }
14020 }
14021 }
14022 }
14023 }
14024 ++v18;
14025 if ( v18 >= v0 )
14026 return 0;
14027 }
14028 v25 = &pLevelDecorations[v20];
14029 v26 = v25;
14030 v27 = pLevelDecorations[v20].uEventID;
14031 if ( v27 )
14032 {
14033 v23 = GetEventHintString(v27);
14034 if ( !v23 )
14035 return v19;
14036 v24 = v23;
14037 GameUI_SetFooterString(v24);
14038 return v19;
14039 }
14040 if ( v25->IsInteractive() )
14041 v24 = pNPCTopics[stru_5E4C90_MapPersistVars._decor_events[v26->_idx_in_stru123 - 75] + 379].pTopic;
14042 else
14043 v24 = pDecorationList->pDecorations[v26->uDecorationDescID].field_20;
14044 GameUI_SetFooterString(v24);
14045 return v19;
14046 }
14047
13841 */ 14048 */