Mercurial > might-and-magic-trilogy
comparison mm7_5.cpp @ 45:bcc051713d20
BLV render & seffects
author | Nomad |
---|---|
date | Mon, 22 Oct 2012 20:45:14 +0200 |
parents | e19e48280ca0 |
children | 79a30ee1ecdb |
comparison
equal
deleted
inserted
replaced
43:484492a6dd28 | 45:bcc051713d20 |
---|---|
8955 return result; | 8955 return result; |
8956 } | 8956 } |
8957 | 8957 |
8958 | 8958 |
8959 //----- (0043F333) -------------------------------------------------------- | 8959 //----- (0043F333) -------------------------------------------------------- |
8960 int stru170::RenderWalls() | 8960 void stru170::RenderWalls() |
8961 { | 8961 { |
8962 signed int result; // eax@1 | |
8963 unsigned __int8 v2; // zf@1 | |
8964 unsigned __int8 v3; // sf@1 | |
8965 stru170_stru0 *v4; // edx@2 | |
8966 int v5; // eax@3 | |
8967 int v6; // ebx@3 | 8962 int v6; // ebx@3 |
8968 char *v7; // esi@4 | 8963 |
8969 signed int v8; // [sp+0h] [bp-4h]@1 | 8964 field_53730 = 0; |
8970 | 8965 for (uint i = 0; i < std__vector_000FA8; ++i) |
8971 result = 0; | 8966 { |
8972 v2 = this->std__vector_000FA8 == 0; | |
8973 v3 = (this->std__vector_000FA8 & 0x80000000u) != 0; | |
8974 this->field_53730 = 0; | |
8975 v8 = 0; | |
8976 if ( !(v3 | v2) ) | |
8977 { | |
8978 v4 = this->field_FA8; | |
8979 do | |
8980 { | |
8981 v5 = this->field_53730; | |
8982 v6 = 0; | 8967 v6 = 0; |
8983 if ( v5 <= 0 ) | 8968 if (!field_53730) |
8984 { | 8969 { |
8985 LABEL_7: | 8970 LABEL_7: |
8986 this->pSectorIDs_toDrawDecorationsFrom[v5] = v4->uSectorID; | 8971 pSectorIDs_toDrawDecorationsFrom[field_53730++] = field_FA8[i].uSectorID; |
8987 ++this->field_53730; | |
8988 } | 8972 } |
8989 else | 8973 else |
8990 { | 8974 { |
8991 v7 = (char *)this->pSectorIDs_toDrawDecorationsFrom; | 8975 while (pSectorIDs_toDrawDecorationsFrom[v6] != field_FA8[i].uSectorID ) |
8992 while ( *(short *)v7 != v4->uSectorID ) | |
8993 { | 8976 { |
8994 ++v6; | 8977 ++v6; |
8995 v7 += 2; | 8978 if ( v6 >= field_53730) |
8996 if ( v6 >= v5 ) | 8979 { |
8997 goto LABEL_7; | 8980 pSectorIDs_toDrawDecorationsFrom[field_53730++] = field_FA8[i].uSectorID; |
8981 continue; | |
8982 } | |
8998 } | 8983 } |
8999 } | 8984 } |
9000 ++v8; | 8985 } |
9001 ++v4; | |
9002 result = v8; | |
9003 } | |
9004 while ( v8 < (signed int)this->std__vector_000FA8 ); | |
9005 } | |
9006 return result; | |
9007 } | 8986 } |
9008 | 8987 |
9009 | 8988 |
9010 //----- (0043F515) -------------------------------------------------------- | 8989 //----- (0043F515) -------------------------------------------------------- |
9011 void __cdecl MessWithBillboards_BLV() | 8990 void MessWithBillboards_BLV() |
9012 { | 8991 { |
9013 signed int v0; // edi@1 | 8992 for (uint i = 0; i < uNumBillboardsToDraw; ++i) |
9014 char *v1; // esi@2 | 8993 { |
9015 | 8994 auto p = pBillboardRenderList + i; |
9016 v0 = 0; | 8995 |
9017 if ( (signed int)uNumBillboardsToDraw > 0 ) | 8996 if (p->field_1E & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !p->uIndoorSectorID) |
9018 { | 8997 p->uPaletteSubindex = 0; |
9019 v1 = (char *)&pBillboardRenderList[0].field_2A; | 8998 else |
9020 do | 8999 p->uPaletteSubindex = _43F55F_get_billboard_light_level(p, -1); |
9021 { | |
9022 if ( *(v1 - 12) & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !*((short *)v1 - 7) ) | |
9023 *(short *)v1 = 0; | |
9024 else | |
9025 *(short *)v1 = sub_43F55F((RenderBillboard *)(v1 - 42), -1); | |
9026 ++v0; | |
9027 v1 += 52; | |
9028 } | |
9029 while ( v0 < (signed int)uNumBillboardsToDraw ); | |
9030 } | 9000 } |
9031 } | 9001 } |
9032 | 9002 |
9033 //----- (0043F55F) -------------------------------------------------------- | 9003 //----- (0043F55F) -------------------------------------------------------- |
9034 signed int __fastcall sub_43F55F(RenderBillboard *a1, signed int a2) | 9004 int __fastcall _43F55F_get_billboard_light_level(RenderBillboard *a1, int uBaseLightLevel) |
9035 { | 9005 { |
9036 RenderBillboard *v2; // eax@1 | |
9037 signed int v3; // ecx@2 | 9006 signed int v3; // ecx@2 |
9038 float v4; // ST08_4@6 | 9007 |
9039 float v5; // ST04_4@6 | |
9040 float v6; // ST00_4@6 | |
9041 | |
9042 v2 = a1; | |
9043 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 9008 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
9044 { | 9009 { |
9045 v3 = pIndoor->pSectors[a1->uIndoorSectorID].uMinAmbientLightLevel; | 9010 v3 = pIndoor->pSectors[a1->uIndoorSectorID].uMinAmbientLightLevel; |
9046 } | 9011 } |
9047 else | 9012 else |
9048 { | 9013 { |
9049 if ( a2 == -1 ) | 9014 if ( uBaseLightLevel == -1 ) |
9050 v3 = a1->field_2A; | 9015 v3 = a1->uPaletteSubindex; |
9051 else | 9016 else |
9052 v3 = a2; | 9017 v3 = uBaseLightLevel; |
9053 } | 9018 } |
9054 v4 = (double)v2->field_24; | 9019 return _43F5C8_get_point_light_level_with_respect_to_lights(v3, a1->uIndoorSectorID, a1->some_x, a1->some_y, a1->some_z); |
9055 v5 = (double)v2->field_22; | |
9056 v6 = (double)v2->field_20; | |
9057 return sub_43F5C8(v3, v2->uIndoorSectorID, v6, v5, v4); | |
9058 } | 9020 } |
9059 | 9021 |
9060 //----- (0043F5C8) -------------------------------------------------------- | 9022 //----- (0043F5C8) -------------------------------------------------------- |
9061 signed int __fastcall sub_43F5C8(signed int a1, int a2, float a3, float a4, float a5) | 9023 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z) |
9062 { | 9024 { |
9063 int v5; // esi@1 | 9025 int v5; // esi@1 |
9064 signed int v6; // edi@1 | 9026 signed int v6; // edi@1 |
9065 char *v7; // ebx@2 | |
9066 int v8; // eax@6 | 9027 int v8; // eax@6 |
9067 int v9; // ebx@6 | 9028 int v9; // ebx@6 |
9068 unsigned int v10; // ecx@6 | 9029 unsigned int v10; // ecx@6 |
9069 unsigned int v11; // edx@9 | 9030 unsigned int v11; // edx@9 |
9070 unsigned int v12; // edx@11 | 9031 unsigned int v12; // edx@11 |
9071 signed int v13; // ecx@12 | 9032 signed int v13; // ecx@12 |
9072 BLVSector *v14; // esi@17 | |
9073 int v15; // ecx@17 | |
9074 BLVLightMM7 *v16; // esi@20 | 9033 BLVLightMM7 *v16; // esi@20 |
9075 int v17; // ebx@21 | 9034 int v17; // ebx@21 |
9076 int v18; // eax@24 | 9035 int v18; // eax@24 |
9077 int v19; // ebx@24 | 9036 int v19; // ebx@24 |
9078 unsigned int v20; // ecx@24 | 9037 unsigned int v20; // ecx@24 |
9079 int v21; // edx@25 | 9038 int v21; // edx@25 |
9080 unsigned int v22; // edx@27 | 9039 unsigned int v22; // edx@27 |
9081 unsigned int v23; // edx@29 | 9040 unsigned int v23; // edx@29 |
9082 signed int v24; // ecx@30 | 9041 signed int v24; // ecx@30 |
9083 char *v25; // esi@34 | |
9084 int v26; // ebx@35 | 9042 int v26; // ebx@35 |
9085 int v27; // eax@38 | 9043 int v27; // eax@38 |
9086 int v28; // ebx@38 | 9044 int v28; // ebx@38 |
9087 unsigned int v29; // ecx@38 | 9045 unsigned int v29; // ecx@38 |
9088 int v30; // edx@39 | 9046 int v30; // edx@39 |
9089 unsigned int v31; // edx@41 | 9047 unsigned int v31; // edx@41 |
9090 unsigned int v32; // edx@43 | 9048 unsigned int v32; // edx@43 |
9091 signed int v33; // ecx@44 | 9049 signed int v33; // ecx@44 |
9092 int v35; // [sp+Ch] [bp-18h]@4 | |
9093 BLVSector *v36; // [sp+Ch] [bp-18h]@17 | |
9094 int v37; // [sp+Ch] [bp-18h]@37 | 9050 int v37; // [sp+Ch] [bp-18h]@37 |
9095 int v38; // [sp+10h] [bp-14h]@5 | 9051 int v38; // [sp+10h] [bp-14h]@5 |
9096 int v39; // [sp+10h] [bp-14h]@23 | 9052 int v39; // [sp+10h] [bp-14h]@23 |
9097 int v40; // [sp+10h] [bp-14h]@36 | 9053 int v40; // [sp+10h] [bp-14h]@36 |
9098 int v41; // [sp+14h] [bp-10h]@3 | |
9099 int v42; // [sp+14h] [bp-10h]@22 | 9054 int v42; // [sp+14h] [bp-10h]@22 |
9100 unsigned int v43; // [sp+18h] [bp-Ch]@12 | 9055 unsigned int v43; // [sp+18h] [bp-Ch]@12 |
9101 unsigned int v44; // [sp+18h] [bp-Ch]@30 | 9056 unsigned int v44; // [sp+18h] [bp-Ch]@30 |
9102 unsigned int v45; // [sp+18h] [bp-Ch]@44 | 9057 unsigned int v45; // [sp+18h] [bp-Ch]@44 |
9103 char *v46; // [sp+1Ch] [bp-8h]@2 | 9058 |
9104 int v47; // [sp+1Ch] [bp-8h]@17 | 9059 v6 = uBaseLightLevel; |
9105 int v48; // [sp+20h] [bp-4h]@1 | 9060 for (uint i = 0; i < uNumMobileLightsApplied; ++i) |
9106 int v49; // [sp+20h] [bp-4h]@17 | 9061 { |
9107 int v50; // [sp+20h] [bp-4h]@33 | 9062 auto p = pMobileLights + i; |
9108 | 9063 |
9109 v48 = 0; | 9064 auto distX = abs(p->vPosition.x - x); |
9110 v5 = a2; | 9065 if ( distX <= p->uRadius) |
9111 v6 = a1; | |
9112 if ( uNumMobileLightsApplied > 0 ) | |
9113 { | |
9114 v7 = (char *)&pMobileLights[0].uRadius; | |
9115 v46 = (char *)&pMobileLights[0].uRadius; | |
9116 do | |
9117 { | |
9118 v41 = abs((signed __int64)((double)*((short *)v7 - 3) - a3)); | |
9119 if ( v41 <= *(short *)v7 ) | |
9120 { | 9066 { |
9121 v35 = abs((signed __int64)((double)*((short *)v7 - 2) - a4)); | 9067 auto distY = abs(p->vPosition.y - y); |
9122 if ( v35 <= *(short *)v7 ) | 9068 if ( distY <= p->uRadius) |
9123 { | 9069 { |
9124 v38 = abs((signed __int64)((double)*((short *)v7 - 1) - a5)); | 9070 auto distZ = abs(p->vPosition.z - z); |
9125 if ( v38 <= *(short *)v7 ) | 9071 if ( distZ <= p->uRadius) |
9126 { | 9072 { |
9127 v8 = v41; | 9073 v8 = distX; |
9128 v9 = v35; | 9074 v9 = distY; |
9129 v10 = v38; | 9075 v10 = distZ; |
9130 if ( v41 < v35 ) | 9076 if (distX < distY) |
9131 { | 9077 { |
9132 v8 = v35; | 9078 v8 = distY; |
9133 v9 = v41; | 9079 v9 = distX; |
9134 } | 9080 } |
9135 if ( v8 < v38 ) | 9081 if ( v8 < distZ ) |
9136 { | 9082 { |
9137 v11 = v8; | 9083 v11 = v8; |
9138 v8 = v38; | 9084 v8 = distZ; |
9139 v10 = v11; | 9085 v10 = v11; |
9140 } | 9086 } |
9141 if ( v9 < (signed int)v10 ) | 9087 if ( v9 < (signed int)v10 ) |
9142 { | 9088 { |
9143 v12 = v10; | 9089 v12 = v10; |
9144 v10 = v9; | 9090 v10 = v9; |
9145 v9 = v12; | 9091 v9 = v12; |
9146 } | 9092 } |
9147 v43 = ((unsigned int)(11 * v9) >> 5) + (v10 >> 2) + v8; | 9093 v43 = ((unsigned int)(11 * v9) / 32) + (v10 / 4) + v8; |
9148 v13 = *(short *)v46; | 9094 v13 = p->uRadius; |
9149 if ( (signed int)v43 < v13 ) | 9095 if ( (signed int)v43 < v13 ) |
9150 v6 = v6 + ((unsigned __int64)(30i64 * (signed int)(v43 << 16) / v13) >> 16) - 30; | 9096 v6 += ((unsigned __int64)(30i64 * (signed int)(v43 << 16) / v13) >> 16) - 30; |
9151 v7 = v46; | |
9152 } | 9097 } |
9153 } | 9098 } |
9154 } | 9099 } |
9155 ++v48; | 9100 } |
9156 v7 += 18; | 9101 |
9157 v46 = v7; | |
9158 } | |
9159 while ( v48 < uNumMobileLightsApplied ); | |
9160 } | |
9161 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 9102 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
9162 { | 9103 { |
9163 v14 = &pIndoor->pSectors[v5]; | 9104 auto pSector = pIndoor->pSectors + uSectorID; |
9164 v15 = 0; | 9105 |
9165 v49 = 0; | 9106 for (uint i = 0; i < pSector->uNumLights; ++i) |
9166 v36 = v14; | 9107 { |
9167 v47 = v14->uNumLights; | 9108 v16 = pIndoor->pLights + *(&pSector->pLights->vPosition.x + i); |
9168 if ( v14->uNumLights > 0 ) | |
9169 { | |
9170 while ( 1 ) | |
9171 { | |
9172 v16 = &pIndoor->pLights[*(&v14->pLights->vPosition.x + v15)]; | |
9173 if ( !(v16->uAtributes & 8) ) | 9109 if ( !(v16->uAtributes & 8) ) |
9174 { | 9110 { |
9175 v17 = abs((signed __int64)((double)v16->vPosition.x - a3)); | 9111 v17 = abs(v16->vPosition.x - x); |
9176 if ( v17 <= v16->uRadius ) | 9112 if ( v17 <= v16->uRadius ) |
9177 { | 9113 { |
9178 v42 = abs((signed __int64)((double)v16->vPosition.y - a4)); | 9114 v42 = abs(v16->vPosition.y - y); |
9179 if ( v42 <= v16->uRadius ) | 9115 if ( v42 <= v16->uRadius ) |
9180 { | 9116 { |
9181 v39 = abs((signed __int64)((double)v16->vPosition.z - a5)); | 9117 v39 = abs(v16->vPosition.z - z); |
9182 if ( v39 <= v16->uRadius ) | 9118 if ( v39 <= v16->uRadius ) |
9183 { | 9119 { |
9184 v18 = v17; | 9120 v18 = v17; |
9185 v19 = v42; | 9121 v19 = v42; |
9186 v20 = v39; | 9122 v20 = v39; |
9203 v19 = v23; | 9139 v19 = v23; |
9204 } | 9140 } |
9205 v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18; | 9141 v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18; |
9206 v24 = v16->uRadius; | 9142 v24 = v16->uRadius; |
9207 if ( (signed int)v44 < v24 ) | 9143 if ( (signed int)v44 < v24 ) |
9208 v6 = v6 + ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30; | 9144 v6 += ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30; |
9209 } | 9145 } |
9210 } | 9146 } |
9211 } | 9147 } |
9212 } | 9148 } |
9213 v15 = v49++ + 1; | 9149 } |
9214 if ( v49 >= v47 ) | 9150 } |
9215 break; | 9151 |
9216 v14 = v36; | 9152 for (uint i = 0; i < uNumStationaryLightsApplied; ++i) |
9217 } | 9153 { |
9218 } | 9154 auto p = pStationaryLights + i; |
9219 } | 9155 v26 = abs(p->vPosition.x - x); |
9220 v50 = 0; | 9156 if ( v26 <= p->uRadius) |
9221 if ( uNumStationaryLightsApplied > 0 ) | |
9222 { | |
9223 v25 = (char *)&pStationaryLights[0].uRadius; | |
9224 do | |
9225 { | |
9226 v26 = abs((signed __int64)((double)*((short *)v25 - 3) - a3)); | |
9227 if ( v26 <= *(short *)v25 ) | |
9228 { | 9157 { |
9229 v40 = abs((signed __int64)((double)*((short *)v25 - 2) - a4)); | 9158 v40 = abs(p->vPosition.y - y); |
9230 if ( v40 <= *(short *)v25 ) | 9159 if ( v40 <= p->uRadius) |
9231 { | 9160 { |
9232 v37 = abs((signed __int64)((double)*((short *)v25 - 1) - a5)); | 9161 v37 = abs(p->vPosition.z - z); |
9233 if ( v37 <= *(short *)v25 ) | 9162 if ( v37 <= p->uRadius) |
9234 { | 9163 { |
9235 v27 = v26; | 9164 v27 = v26; |
9236 v28 = v40; | 9165 v28 = v40; |
9237 v29 = v37; | 9166 v29 = v37; |
9238 if ( v27 < v40 ) | 9167 if ( v27 < v40 ) |
9252 v32 = v29; | 9181 v32 = v29; |
9253 v29 = v28; | 9182 v29 = v28; |
9254 v28 = v32; | 9183 v28 = v32; |
9255 } | 9184 } |
9256 v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27; | 9185 v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27; |
9257 v33 = *(short *)v25; | 9186 v33 = p->uRadius; |
9258 if ( (signed int)v45 < v33 ) | 9187 if ( (signed int)v45 < v33 ) |
9259 v6 = v6 + ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30; | 9188 v6 += ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30; |
9260 } | 9189 } |
9261 } | 9190 } |
9262 } | 9191 } |
9263 ++v50; | 9192 } |
9264 v25 += 12; | 9193 |
9265 } | |
9266 while ( v50 < uNumStationaryLightsApplied ); | |
9267 } | |
9268 if ( v6 <= 31 ) | 9194 if ( v6 <= 31 ) |
9269 { | 9195 { |
9270 if ( v6 < 0 ) | 9196 if ( v6 < 0 ) |
9271 v6 = 0; | 9197 v6 = 0; |
9272 } | 9198 } |
9274 { | 9200 { |
9275 v6 = 31; | 9201 v6 = 31; |
9276 } | 9202 } |
9277 return v6; | 9203 return v6; |
9278 } | 9204 } |
9279 // 519AB4: using guessed type int uNumStationaryLightsApplied; | |
9280 | 9205 |
9281 //----- (00406051) -------------------------------------------------------- | 9206 //----- (00406051) -------------------------------------------------------- |
9282 __int16 stru262_TurnBased::StartTurn() | 9207 __int16 stru262_TurnBased::StartTurn() |
9283 { | 9208 { |
9284 stru262_TurnBased *v1; // esi@1 | 9209 stru262_TurnBased *v1; // esi@1 |
9481 } | 9406 } |
9482 v6 = (signed __int16)v6; | 9407 v6 = (signed __int16)v6; |
9483 if ( (signed __int16)v6 == 4 ) | 9408 if ( (signed __int16)v6 == 4 ) |
9484 { | 9409 { |
9485 v3 = 0; | 9410 v3 = 0; |
9486 v5->uAIState = 5; | 9411 v5->uAIState = Dead; |
9487 v5->uCurrentActionTime = 0; | 9412 v5->uCurrentActionTime = 0; |
9488 v5->uCurrentActionLength = 0; | 9413 v5->uCurrentActionLength = 0; |
9489 v5->UpdateAnimation(); | 9414 v5->UpdateAnimation(); |
9490 } | 9415 } |
9491 else | 9416 else |
10233 { | 10158 { |
10234 if ( v7 == 4 ) | 10159 if ( v7 == 4 ) |
10235 { | 10160 { |
10236 v6->uCurrentActionTime = 0; | 10161 v6->uCurrentActionTime = 0; |
10237 v6->uCurrentActionLength = 0; | 10162 v6->uCurrentActionLength = 0; |
10238 v6->uAIState = 5; | 10163 v6->uAIState = Dead; |
10239 v6->UpdateAnimation(); | 10164 v6->UpdateAnimation(); |
10240 } | 10165 } |
10241 if ( !thisa->_406D10(a2) ) | 10166 if ( !thisa->_406D10(a2) ) |
10242 LABEL_26: | 10167 LABEL_26: |
10243 Actor::_403EB6(v12, v13, 0x20u, &v9); | 10168 Actor::_403EB6(v12, v13, 0x20u, &v9); |
10504 memcpy(&v11, Actor::GetDirectionInfo(*(int *)((char *)&v3->uPackedID + v18), v8, &a3, 0), sizeof(v11)); | 10429 memcpy(&v11, Actor::GetDirectionInfo(*(int *)((char *)&v3->uPackedID + v18), v8, &a3, 0), sizeof(v11)); |
10505 memcpy(&a4, &v11, sizeof(a4)); | 10430 memcpy(&a4, &v11, sizeof(a4)); |
10506 v5->uCurrentActionTime += pMiscTimer->uTimeElapsed; | 10431 v5->uCurrentActionTime += pMiscTimer->uTimeElapsed; |
10507 if ( (signed int)v5->uCurrentActionTime >= v5->uCurrentActionLength ) | 10432 if ( (signed int)v5->uCurrentActionTime >= v5->uCurrentActionLength ) |
10508 { | 10433 { |
10509 if ( v5->uAIState == 4 ) | 10434 if (v5->uAIState == Dying) |
10510 { | 10435 { |
10511 v5->uCurrentActionTime = 0; | 10436 v5->uCurrentActionTime = 0; |
10512 v5->uCurrentActionLength = 0; | 10437 v5->uCurrentActionLength = 0; |
10513 v5->uAIState = 5; | 10438 v5->uAIState = Dead; |
10514 v5->UpdateAnimation(); | 10439 v5->UpdateAnimation(); |
10515 return; | 10440 return; |
10516 } | 10441 } |
10517 if ( rand() % 2 ) | 10442 if ( rand() % 2 ) |
10518 Actor::_403EB6(uActorID, a2, 0x40u, &a4); | 10443 Actor::_403EB6(uActorID, a2, 0x40u, &a4); |
11913 } | 11838 } |
11914 return v1; | 11839 return v1; |
11915 } | 11840 } |
11916 | 11841 |
11917 //----- (00408896) -------------------------------------------------------- | 11842 //----- (00408896) -------------------------------------------------------- |
11918 char *__cdecl UpdateLayingItems() | 11843 void UpdateLayingItems() |
11919 { | 11844 { |
11920 unsigned int v0; // edi@1 | 11845 unsigned int v0; // edi@1 |
11921 char *v1; // esi@1 | 11846 char *v1; // esi@1 |
11922 char *result; // eax@7 | 11847 char *result; // eax@7 |
11923 | 11848 |
11929 LayingItem::_42F933(v0); | 11854 LayingItem::_42F933(v0); |
11930 v1 += 112; | 11855 v1 += 112; |
11931 ++v0; | 11856 ++v0; |
11932 } | 11857 } |
11933 while ( (signed int)v1 < (signed int)((char *)&pObjectList->uNumObjects + 2) ); | 11858 while ( (signed int)v1 < (signed int)((char *)&pObjectList->uNumObjects + 2) ); |
11934 result = (char *)&array_5118E8.pElements[0].field_C; | 11859 |
11935 do | 11860 for (uint i = 0; i < 100; ++i) |
11936 { | 11861 array_5118E8.pElements[i].field_C_time_left = 0; |
11937 *(short *)result = 0; | |
11938 result += 24; | |
11939 } | |
11940 while ( (signed int)result < (signed int)&pBillboardRenderList[0].field_4 ); | |
11941 return result; | |
11942 } | 11862 } |
11943 | 11863 |
11944 //----- (004088E9) -------------------------------------------------------- | 11864 //----- (004088E9) -------------------------------------------------------- |
11945 signed int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6) | 11865 signed int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6) |
11946 { | 11866 { |
17284 strcat(pTmpBuf, pTmpBuf2); | 17204 strcat(pTmpBuf, pTmpBuf2); |
17285 if ( pPlayer->uSkillPoints ) | 17205 if ( pPlayer->uSkillPoints ) |
17286 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); | 17206 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); |
17287 else | 17207 else |
17288 v4 = 0xFFFFu; | 17208 v4 = 0xFFFFu; |
17289 sprintfex(pTmpBuf2, &byte_4E2F14, pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints); | 17209 sprintfex(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints); |
17290 strcat(pTmpBuf, pTmpBuf2); | 17210 strcat(pTmpBuf, pTmpBuf2); |
17291 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0); | 17211 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0); |
17292 v5 = pPlayer->GetBaseStrength(); | 17212 v5 = pPlayer->GetBaseStrength(); |
17293 v6 = pPlayer->GetActualMight(); | 17213 v6 = pPlayer->GetActualMight(); |
17294 v7 = pPlayer->GetBaseStrength(); | 17214 v7 = pPlayer->GetBaseStrength(); |