# HG changeset patch # User zipi # Date 1364088454 0 # Node ID d170f23f70d1f009e8b2c566852cce2742b82eed # Parent 93c6b78abf35d6016b718e1f19e55de406112df9 tidy, code moving diff -r 93c6b78abf35 -r d170f23f70d1 Actor.cpp --- a/Actor.cpp Sun Mar 24 00:42:55 2013 +0000 +++ b/Actor.cpp Sun Mar 24 01:27:34 2013 +0000 @@ -21,17 +21,31 @@ #include "GUIWindow.h" #include "GUIFont.h" - - - Actor pActors[500]; int uNumActors; stru319 stru_50C198; // idb - - - +//----- (00448A40) -------------------------------------------------------- +void Actor::ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle) +{ + if ( uActorID >= 0 && uActorID <= (signed int)(uNumActors - 1) ) + { + if ( bToggle ) + { + pActors[uActorID].uAttributes |= uFlag; + } + else + { + if ( uFlag == 0x10000 ) + { + if (pActors[uActorID].uAIState == Disabled ) + pActors[uActorID].uAIState = Standing; + } + pActors[uActorID].uAttributes &= ~uFlag; + } + } +} //----- (00448518) -------------------------------------------------------- void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3) @@ -142,7 +156,6 @@ } } - //----- (00445D4A) -------------------------------------------------------- void Actor::InitializeDialogue(int bPlayerSaysHello) { @@ -289,7 +302,6 @@ pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodDay, 0); } } - //----- (0040894B) -------------------------------------------------------- bool Actor::CanAct() @@ -1412,7 +1424,6 @@ } } - //----- (0043ABB0) -------------------------------------------------------- bool Actor::ArePeasantsOfSameFaction(Actor *a1, Actor *a2) { @@ -1468,7 +1479,6 @@ } } - //----- (00404874) -------------------------------------------------------- char __fastcall Actor::_404874(unsigned int uActorID, AIDirection *a2, int a3, char a4) { @@ -1950,7 +1960,6 @@ return result; } - //----- (00404030) -------------------------------------------------------- void Actor::FaceObject(unsigned int uActorID, unsigned int uObjID, int _48, AIDirection *a4) { @@ -2003,8 +2012,6 @@ AI_Stand(uActorID, uObjID, uActionLength, a4); } - - //----- (00403EB6) -------------------------------------------------------- void Actor::AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, AIDirection *a4) { @@ -2029,7 +2036,6 @@ actor->UpdateAnimation(); } - //----- (00403E61) -------------------------------------------------------- void __fastcall Actor::StandAwhile(unsigned int uActorID) { @@ -2148,7 +2154,6 @@ Actor::_402AD7(v24, a2, rand() % 2, 64, arg0); } - //----- (00438CF3) -------------------------------------------------------- void Actor::ApplyFineForKillingPeasant(unsigned int uActorID) { @@ -2216,7 +2221,6 @@ } } - //----- (0043AE80) -------------------------------------------------------- void Actor::AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2, signed int a3) { @@ -2326,7 +2330,6 @@ return; } - //----- (0043B3E0) -------------------------------------------------------- int Actor::_43B3E0_CalcDamage(Actor *a1, signed int a2) { @@ -2453,7 +2456,6 @@ return result; } - //----- (00403A60) -------------------------------------------------------- void Actor::_403A60(unsigned int uActorID, signed int edx0, AIDirection *pDir) { @@ -2560,7 +2562,6 @@ Actor::_402AD7(v22, a2, v22, 64, pDir); } - //----- (00403854) -------------------------------------------------------- void Actor::_403854(unsigned int uActorID, signed int edx0, AIDirection *pDir) { @@ -2667,7 +2668,6 @@ Actor::_402AD7(v22, a2, v22, 64, pDir); } - //----- (0040368B) -------------------------------------------------------- void Actor::_40368B(unsigned int uActorID, signed int edx0, AIDirection *pDir) { @@ -2759,7 +2759,6 @@ Actor::_402AD7(v21, a2, v21, 64, pDir); } - //----- (00403476) -------------------------------------------------------- void Actor::_403476(unsigned int uActorID, signed int edx0, AIDirection *pDir) { @@ -2942,7 +2941,6 @@ v5->UpdateAnimation(); } - //----- (004031C1) -------------------------------------------------------- char __fastcall Actor::_4031C1_update_job(unsigned int uActorID, signed int a2, int a3) { @@ -3001,7 +2999,6 @@ return (char)v5; } - //----- (004030AD) -------------------------------------------------------- void Actor::_4030AD(unsigned int uActorID, signed int edx0, int arg0) { @@ -3105,7 +3102,6 @@ pActor->UpdateAnimation(); } - //----- (00402D6E) -------------------------------------------------------- void Actor::Die(unsigned int uActorID) { @@ -3372,7 +3368,6 @@ } } - //----- (0040281C) -------------------------------------------------------- void Actor::_40281C(unsigned int uActorID, unsigned int a2, signed int uActionLength, AIDirection *pDir, int a5) { @@ -3456,7 +3451,6 @@ v7->UpdateAnimation(); } - //----- (00402686) -------------------------------------------------------- void Actor::_402686(unsigned int uActorID, unsigned int a2, signed int uActionLength, AIDirection *a4) { @@ -3817,7 +3811,6 @@ return 0; } - //----- (0045976D) -------------------------------------------------------- void Actor::UpdateAnimation() { @@ -3958,14 +3951,12 @@ } } - //----- (00459667) -------------------------------------------------------- void Actor::Remove() { this->uAIState = Removed; } - //----- (0044FD29) -------------------------------------------------------- int Actor::_44FD29(int a2) { @@ -4096,4 +4087,4 @@ v8->uSummonerID = result; } return result; -} \ No newline at end of file +} diff -r 93c6b78abf35 -r d170f23f70d1 IndoorCameraD3D.cpp --- a/IndoorCameraD3D.cpp Sun Mar 24 00:42:55 2013 +0000 +++ b/IndoorCameraD3D.cpp Sun Mar 24 01:27:34 2013 +0000 @@ -7,10 +7,92 @@ #include "OutdoorCamera.h" #include "Render.h" #include "LOD.h" - #include "mm7_data.h" +//----- (004361EF) -------------------------------------------------------- +IndoorCameraD3D::IndoorCameraD3D() +{ + IndoorCameraD3D *v1; // esi@1 + //double v2; // st7@1 + //double v3; // st6@1 + //double v4; // st5@1 + //double v5; // st7@1 + //double v6; // st6@1 + //double v7; // st5@1 + v1 = this; + //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&this->field_4); + //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_14); + //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_24); + /*_eh_vector_constructor_iterator_(v1->std__vector_000034_prolly_frustrum, + 24, + 6, + (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4, + (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor);*/ + //v2 = 0;//(double)pBLVRenderParams->vPartyPos.z; + //v3 = 0;//(double)pBLVRenderParams->vPartyPos.y; + //v4 = 0;//(double)pBLVRenderParams->vPartyPos.x; + v1->field_108 = 0.0; + v1->blv_party_x = 0; + v1->blv_party_y = 0; + v1->blv_party_z = 0; + //v5 = 0;//(double)pBLVRenderParams->vPartyPos.z; + //v6 = 0;//(double)pBLVRenderParams->vPartyPos.y; + //v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300); + v1->field_138 = 0.0; + v1->blv_party_x_2 = 300; + v1->blv_party_y_2 = 0; + v1->blv_party_z_2 = 0; + v1->field_168 = 0.0; + v1->field_198 = 0.0; + v1->field_1C8 = 0.0; + v1->field_1F8 = 0.0; + v1->field_228 = 0.0; + v1->field_258 = 0.0; + v1->field_288 = 0.0; + v1->field_2B8 = 0.0; + v1->field_2E8 = 0.0; + v1->field_2BC = 0.0; + v1->field_2C0 = 0.0; + v1->field_2C4 = 0.0; + v1->field_318 = 0.0; + v1->field_2EC = 0.0; + v1->field_2F0 = 0.0; + v1->field_2F4 = 0.0; + v1->field_348 = 0.0; + v1->field_31C = 0.0; + v1->field_320 = 0.0; + v1->field_324 = 0.0; + v1->field_378 = 0.0; + v1->field_34C = 0.0; + v1->field_350 = 0.0; + v1->field_354 = 0.0; + for (uint i = 0; i < 16384; ++i) + { + list_0037C[i].field_0 = 0; + list_0037C[i].flt_30 = 0.0f; + } + + list_0037C_size = 0; + for (uint i = 0; i < 256; ++i) + list_E0380[i].mm7__vector_000004_size = 0; + /*v10 = v1->list_E0380; + v12 = 256; + do + { + v10->mm7__vector_000004_size = 0; + //mm7__vector_constructor( + // v10->mm7__vector_000004, + // 48, + // 64, + // (int (__thiscall *)(int))IndoorCameraD3D_stru1::IndoorCameraD3D_stru1); + //++v10; + --v12; + } + while ( v12 );*/ + list_E0380_size = 0; + //v1->vdestructor_ptr = &stru8_pvdtor; +} //----- (004364C5) -------------------------------------------------------- void IndoorCameraD3D::ViewTransfrom_OffsetUV(RenderVertexSoft *pVertices, unsigned int uNumVertices, RenderVertexSoft *pOutVertices, stru320 *a5) @@ -92,8 +174,6 @@ return !bDoNotShow || (v12 = *v10, v12 >= (signed int)0x40000u) && v12 <= (signed int)0x1F400000u; } - - //----- (00436455) -------------------------------------------------------- bool IndoorCameraD3D::IsCulled(BLVFace *pFace) { @@ -329,7 +409,6 @@ pIndoorCamera->ViewTransform(a1a + i); } - //----- (00436932) -------------------------------------------------------- bool IndoorCameraD3D::GetFacetOrientation(char polyType, Vec3_float_ *a2, Vec3_float_ *a3, Vec3_float_ *a4) { @@ -392,7 +471,6 @@ } } - //----- (00438258) -------------------------------------------------------- bool IndoorCameraD3D::is_face_faced_to_camera(BLVFace *pFace, RenderVertexSoft *a2) { @@ -414,7 +492,6 @@ this->list_0037C_size = 0; } - //----- (00438240) -------------------------------------------------------- void IndoorCameraD3D::_438240_draw_lits() { @@ -479,7 +556,6 @@ } } - //----- (00438141) -------------------------------------------------------- void IndoorCameraD3D::_438141_draw_list_0037C() { @@ -528,7 +604,6 @@ } } - //----- (00437D4A) -------------------------------------------------------- void IndoorCameraD3D::_437D4A_draw_some_vertices(float x, float y, float z, unsigned int a5, char a6, float a7) { @@ -713,7 +788,6 @@ } } - //----- (00437C96) -------------------------------------------------------- void IndoorCameraD3D::do_draw_debug_line_d3d(const RenderVertexD3D3 *pLineBegin, unsigned int uDiffuseBegin, const RenderVertexD3D3 *pLineEnd, unsigned int uDiffuseEnd, float z_stuff) { @@ -867,7 +941,6 @@ MessageBoxW(nullptr, L"draw_debug_line() not implemented for SW rendering", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Core3D.cpp:1383", 0); } - //----- (00437A55) -------------------------------------------------------- void IndoorCameraD3D::debug_outline_d3d(const RenderVertexD3D3 *pLineVertices, unsigned int uNumLines, int uDiffuse, float z_stuff) { @@ -896,7 +969,6 @@ do_draw_debug_line_d3d(&pLineVertices[v5], uDiffuse, pLineVertices, uDiffuse, z_stuff); } - //----- (004379EE) -------------------------------------------------------- void IndoorCameraD3D::debug_outline_sw(RenderVertexSoft *a2, unsigned int uNumVertices, unsigned int uDiffuse, float a5) { @@ -926,7 +998,6 @@ do_draw_debug_line_sw(&a2[v5], uDiffuse, a2, uDiffuse, 0, a5); } - //----- (00437906) -------------------------------------------------------- void IndoorCameraD3D::PrepareAndDrawDebugOutline(BLVFace *pFace, unsigned int uDiffuse) { @@ -972,7 +1043,6 @@ } // 50D9D0: using guessed type char static_sub_437906_byte_50D9D0_init_flag; - //----- (004378BA) -------------------------------------------------------- void IndoorCameraD3D::MatrixMultiply(Matrix3x3_float_ *a1, Matrix3x3_float_ *a2, Matrix3x3_float_ *out) { @@ -1010,7 +1080,6 @@ while ( v6 ); } - //----- (004376E7) -------------------------------------------------------- void IndoorCameraD3D::CreateWorldMatrixAndSomeStuff() { @@ -1067,7 +1136,6 @@ screenCenterY = (double)(pViewport->uScreenCenterY - pViewport->uScreen_TL_Y); } - //----- (00437691) -------------------------------------------------------- void IndoorCameraD3D::Vec3Transform(const IndoorCameraD3D_Vec3 *pVector, IndoorCameraD3D_Vec3 *pOut) { @@ -1390,6 +1458,7 @@ *pOutNumVertices = v5; return result; } + //----- (00436F09) -------------------------------------------------------- void IndoorCameraD3D::_436F09_mess_with_lightmap__clipflag_4(RenderVertexSoft *pInVertices, int uNumInVertices, RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices) { @@ -1492,7 +1561,6 @@ } } - //----- (00436CDC) -------------------------------------------------------- void IndoorCameraD3D::_436CDC_mess_with_lightmap__clipflag_2(RenderVertexSoft *pInVertices, int uNumInVertices, RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices) { @@ -1588,7 +1656,6 @@ } } - //----- (00436BB7) -------------------------------------------------------- void IndoorCameraD3D::Project(RenderVertexSoft *pVertices, unsigned int uNumVertices, char a4) { @@ -1658,7 +1725,6 @@ } } - //----- (00436A9A) -------------------------------------------------------- void IndoorCameraD3D::Project(signed int x, signed int y, signed int z, int *a5, int *a6) { @@ -1717,7 +1783,6 @@ return result; } - //----- (00436A24) -------------------------------------------------------- struct IDirect3DTexture2 *IndoorCameraD3D::LoadTextureAndGetHardwarePtr(char *Str1) { diff -r 93c6b78abf35 -r d170f23f70d1 NPC.cpp --- a/NPC.cpp Sun Mar 24 00:42:55 2013 +0000 +++ b/NPC.cpp Sun Mar 24 01:27:34 2013 +0000 @@ -11,7 +11,6 @@ #include "MM7.h" #include "NPC.h" - int pDialogueNPCCount; struct Texture *pDialogueNPCPortraits[6]; int uNumDialogueNPCPortraits; // weak @@ -25,6 +24,235 @@ void InitializeQuests(); bool CheckPortretAgainstSex(int portret_num, int sex); +//----- (004459F9) -------------------------------------------------------- +NPCData *__fastcall GetNPCData(signed int npcid) +{ + unsigned int v1; // esi@1 + NPCData *result; // eax@5 + int v3; // esi@9 + int v4; // ecx@9 + //int v5; // edx@9 + //NPCData *v6; // eax@9 + char *v7; // ebx@14 + NPCData *v8; // edi@14 + char v9; // al@22 + char v10; + //std::string v10; // [sp-18h] [bp-2Ch]@4 + int v11; + //const char *v11; // [sp-8h] [bp-1Ch]@4 + int v12; // [sp-4h] [bp-18h]@4 + int v13; + char *v14; + //std::string *v13; // [sp+Ch] [bp-8h]@4 + int a3; // [sp+13h] [bp-1h]@4 + int i; + + /*v1 = npcid; + if ( (npcid & 0x80000000u) == 0 ) + { + if ( (signed int)npcid < 5000 ) + { + if ( (signed int)npcid >= 501 ) + { + MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0); + } + return &pNPCStats->pNewNPCData[v1]; + } + return &pNPCStats->array_13EF4[npcid - 5000]; + } + if ( (signed int)npcid >= 5000 ) + return &pNPCStats->array_13EF4[npcid - 5000]; + if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) + { + result = 0; + } + else + { + v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1; + v4 = 0; + v5 = 0; + v6 = pParty->pHirelings; + do + { + if ( v6->pName ) + pTmpBuf[v4++] = v5; + ++v6; + ++v5; + } + while ( (signed int)v6 < (signed int)&pParty->pPickedItem ); + v13 = 0; + if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) + { + v7 = &pTmpBuf[v4]; + v8 = pNPCStats->pNewNPCData; + do + { + if ( v8->uFlags & 0x80 + && (!pParty->pHirelings[0].pName || strcmp(v8->pName, pParty->pHirelings[0].pName)) + && (!pParty->pHirelings[1].pName || strcmp(v8->pName, pParty->pHirelings[1].pName)) ) + *v7++ = (char)v13 + 2; + v13 = (std::string *)((char *)v13 + 1); + ++v8; + } + while ( (signed int)v13 < (signed int)pNPCStats->uNumNewNPCs ); + } + v9 = pTmpBuf[v3]; + if ( (unsigned __int8)v9 >= 2u ) + result = &pNPCStats->pNPCData[(unsigned __int8)v9 + 499]; + else + result = &pParty->pHirelings[(unsigned __int8)v9]; + } + return result;*/ + v1 = npcid; + if ( npcid >= 0 ) + { + if ( npcid < 5000 ) + { + if ( npcid >= 501 ) + { + MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0); + } + return &pNPCStats->pNewNPCData[v1];// - 1]; + } + return &pNPCStats->pAdditionalNPC[npcid - 5000]; + } + + + if ( npcid >= 5000 ) + return &pNPCStats->pAdditionalNPC[npcid - 5000]; + if (sDialogue_SpeakingActorNPC_ID >= 0) + { + result = 0; + } + else + { + v3 = abs(sDialogue_SpeakingActorNPC_ID) - 1; + v4 = 0; + + for (i = 0; i < 2; ++i) + { + if (pParty->pHirelings[i].pName) + pTmpBuf[v4++] = i; + } + + if (pNPCStats->uNumNewNPCs > 0) + { + for (i = 0; i < pNPCStats->uNumNewNPCs; ++i) + { + if (pNPCStats->pNewNPCData[i].Hired()) + { + if (!pParty->pHirelings[0].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[0].pName)) + { + if (!pParty->pHirelings[1].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[1].pName)) + pTmpBuf[v4++] = i + 2; + } + } + } + } + + v9 = pTmpBuf[v3]; + if ( v9 >= 2 ) + result = &pNPCStats->pNPCData[499 + v9]; + else + result = &pParty->pHirelings[v9]; + } +} + +//----- (00445B2C) -------------------------------------------------------- +NPCData *__fastcall GetNewNPCData(signed int npcid, int a2) +{ + signed int v2; // esi@1 + int v3; // edi@1 + NPCData *result; // eax@5 + int v5; // esi@9 + int v6; // ecx@9 + int v7; // edx@9 + NPCData *v8; // eax@9 + NPCData *v9; // edi@14 + int v10; // ecx@20 + char v11; // al@23 + std::string v12; // [sp-18h] [bp-34h]@4 + const char *v13; // [sp-8h] [bp-24h]@4 + int v14; // [sp-4h] [bp-20h]@4 + std::string *v15; // [sp+Ch] [bp-10h]@1 + char *v16; // [sp+10h] [bp-Ch]@14 + int v17; // [sp+14h] [bp-8h]@13 + int a3; // [sp+1Bh] [bp-1h]@4 + + v2 = npcid; + v3 = a2; + v15 = (std::string *)a2; + if ( npcid >= 0 ) + { + if ( npcid < 5000 ) + { + if ( npcid >= 501 ) + { + MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:2040", 0); + } + *(int *)v3 = v2; + return &pNPCStats->pNewNPCData[v2]; + } +LABEL_7: + *(int *)a2 = npcid - 5000; + return &pNPCStats->pAdditionalNPC[npcid - 5000]; + } + if ( npcid >= 5000 ) + goto LABEL_7; + if ( sDialogue_SpeakingActorNPC_ID >= 0 ) + { + *(int *)a2 = 0; + result = 0; + } + else + { + v5 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1; + v6 = 0; + v7 = 0; + v8 = pParty->pHirelings; + do + { + if ( v8->pName ) + pTmpBuf[v6++] = v7; + ++v8; + ++v7; + } + while ( (signed int)v8 < (signed int)&pParty->pPickedItem ); + v17 = 0; + if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) + { + v9 = pNPCStats->pNewNPCData; + v16 = &pTmpBuf[v6]; + do + { + if ( v9->Hired() + && (!pParty->pHirelings[0].pName || strcmp(v9->pName, pParty->pHirelings[0].pName)) + && (!pParty->pHirelings[1].pName || strcmp(v9->pName, pParty->pHirelings[1].pName)) ) + { + v10 = (int)v16++; + *(char *)v10 = v17 + 2; + } + ++v17; + ++v9; + } + while ( v17 < (signed int)pNPCStats->uNumNewNPCs ); + v3 = (int)v15; + } + v11 = pTmpBuf[v5]; + if ( (unsigned __int8)v11 >= 2u ) + { + *(int *)v3 = (unsigned __int8)v11 - 2; + result = &pNPCStats->pNPCData[(unsigned __int8)pTmpBuf[v5] + 499]; + } + else + { + *(int *)v3 = (unsigned __int8)v11; + result = &pParty->pHirelings[(unsigned __int8)pTmpBuf[v5]]; + } + } + return result; +} + //----- (00476977) -------------------------------------------------------- void NPCStats::InitializeNPCText() { diff -r 93c6b78abf35 -r d170f23f70d1 Render.cpp --- a/Render.cpp Sun Mar 24 00:42:55 2013 +0000 +++ b/Render.cpp Sun Mar 24 01:27:34 2013 +0000 @@ -22,19 +22,11 @@ #include "Log.h" #include "TileFrameTable.h" #include "texts.h" - #include "mm7_data.h" - #pragma comment(lib, "lib\\legacy_dx\\lib\\ddraw.lib") #pragma comment(lib, "lib\\legacy_dx\\lib\\dxguid.lib") - - - - - - struct IDirectDrawClipper *pDDrawClipper; struct Render *pRenderer; // idb struct RenderVertexD3D3 pVertices[50]; @@ -43,7 +35,6 @@ unsigned int uNumBillboardsToDraw; int uNumSpritesDrawnThisFrame; // weak - RenderVertexSoft array_507D30[50]; RenderVertexSoft array_508690[50]; RenderVertexSoft array_508FF0[50]; @@ -61,15 +52,8 @@ RenderVertexSoft pVerticesSR_801A10[384]; RenderVertexSoft pVerticesSR_806210[384]; - - - - - - void SetBillboardBlendOptions(RenderBillboardD3D::OpacityType a1); - /* 384 */ #pragma pack(push, 1) struct PCXHeader_1 @@ -98,29 +82,11 @@ }; #pragma pack(pop) - - - - - - - HRESULT __stdcall D3DZBufferFormatEnumerator(DDPIXELFORMAT *Src, DDPIXELFORMAT *Dst); HRESULT __stdcall DDrawDisplayModesEnumerator(DDSURFACEDESC2 *pSurfaceDesc, __int16 *a2); HRESULT __stdcall D3DDeviceEnumerator(const GUID *lpGUID, const char *lpDeviceDesc, const char *lpDeviceName, D3DDEVICEDESC *pHWDesc, D3DDEVICEDESC *pSWDesc, struct RenderD3D_aux *a6); signed int __stdcall RenderD3D__DeviceEnumerator(GUID *lpGUID, const char *lpDevDesc, const char *lpDriverName, RenderD3D__DevInfo *pOut); // idb - - - - - - - - - - - //----- (0049E79F) -------------------------------------------------------- bool __cdecl CheckTextureStages() { @@ -163,18 +129,6 @@ return v0; } - - - - - - - - - - - - //----- (00440CB8) -------------------------------------------------------- void Render::DrawBillboardList_BLV() { @@ -224,10 +178,6 @@ } } - - - - //----- (004A16A5) -------------------------------------------------------- bool __cdecl AreRenderSurfacesOk() { @@ -256,8 +206,6 @@ return result; } - - //----- (00487389) -------------------------------------------------------- __int16 Render::ExecOutdoorDrawSW() { @@ -2476,8 +2424,6 @@ // 4D864C: using guessed type char byte_4D864C; // 76D5C0: using guessed type char static_sub_0048034E_byte_76D5C0__init_flag; - - //----- (00481212) -------------------------------------------------------- void Render::DrawTerrainSW(int a1, int a2, int a3) { @@ -2976,7 +2922,6 @@ } } - //----- (0047BACF) -------------------------------------------------------- void Render::TransformBillboardsAndSetPalettesODM() { @@ -3056,7 +3001,6 @@ } } - //----- (0047AF11) -------------------------------------------------------- void Render::DrawSpriteObjects_ODM() { @@ -3263,7 +3207,6 @@ // 4E94D3: using guessed type char byte_4E94D3; // 5187E4: using guessed type int uNumSpritesDrawnThisFrame; - //----- (0049D9BC) -------------------------------------------------------- signed int __stdcall RenderD3D__DeviceEnumerator(GUID *lpGUID, const char *lpDevDesc, const char *lpDriverName, RenderD3D__DevInfo *pOut) { @@ -3383,7 +3326,6 @@ return 1; } - //----- (0049D784) -------------------------------------------------------- HRESULT __stdcall D3DDeviceEnumerator(const GUID *lpGUID, const char *lpDeviceDesc, const char *lpDeviceName, D3DDEVICEDESC *pHWDesc, D3DDEVICEDESC *pSWDesc, RenderD3D_aux *a6) { @@ -3461,7 +3403,6 @@ return 1; } - //----- (0049D75C) -------------------------------------------------------- HRESULT __stdcall DDrawDisplayModesEnumerator(DDSURFACEDESC2 *pSurfaceDesc, __int16 *a2) { @@ -3479,8 +3420,6 @@ return result; } - - //----- (0047A95E) -------------------------------------------------------- void Render::PrepareDecorationsRenderList_ODM() { @@ -3803,7 +3742,6 @@ // 4E94D0: using guessed type char byte_4E94D0; // 5187EC: using guessed type int uNumDecorationsDrawnThisFrame; - //----- (0049D717) -------------------------------------------------------- HRESULT __stdcall D3DZBufferFormatEnumerator(DDPIXELFORMAT *Src, DDPIXELFORMAT *Dst) { @@ -3836,7 +3774,6 @@ DirectDrawEnumerateA((LPDDENUMCALLBACKA)RenderD3D__DeviceEnumerator, *pOutDevices); } - //----- (0049DC58) -------------------------------------------------------- RenderD3D::RenderD3D() { @@ -3978,7 +3915,6 @@ } } - //----- (0049DE14) -------------------------------------------------------- bool RenderD3D::CreateDevice(unsigned int uDeviceID, int bWindowed, HWND hWnd) { @@ -4254,7 +4190,6 @@ return 1; } - //----- (0049E444) -------------------------------------------------------- unsigned int RenderD3D::GetDeviceCaps() { @@ -4297,7 +4232,6 @@ return result; } - //----- (0049E4FC) -------------------------------------------------------- void RenderD3D::ClearTarget(unsigned int bClearColor, unsigned int uClearColor, unsigned int bClearDepth, float z_clear) { @@ -4313,7 +4247,6 @@ pViewport->Clear2(1, rects, uClearFlags, uClearColor, z_clear, 0); } - //----- (0049E54D) -------------------------------------------------------- void RenderD3D::Present(bool bForceBlit) { @@ -4339,7 +4272,6 @@ pFrontBuffer->Flip(0, 1); } - //----- (0049E5D4) -------------------------------------------------------- bool RenderD3D::CreateTexture(unsigned int uTextureWidth, unsigned int uTextureHeight, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture, bool bAlphaChannel, bool bMipmaps, unsigned int uMinDeviceTexDim) { @@ -4430,8 +4362,6 @@ pSprites_LOD->ReleaseLostHardwareSprites(); } - - //----- (004A2050) -------------------------------------------------------- void Render::DrawPolygon(unsigned int uNumVertices, stru148 *a3, ODMFace *a4, IDirect3DTexture2 *pTexture) { @@ -4693,7 +4623,6 @@ } // 4D864C: using guessed type char byte_4D864C; - //----- (0049EB79) -------------------------------------------------------- Render::~Render() { @@ -4709,8 +4638,6 @@ //nullsub_1(); } - - //----- (0049E756) -------------------------------------------------------- bool Render::IsColorKeySupported(IDirectDraw4 *this_) { @@ -4785,8 +4712,7 @@ hd_water_current_frame = 0; } -bool Render::Initialize(bool bWindowed, uint uDefaultDevice, - bool bColoredLights, uint uDetailLevel, uint bTinting) +bool Render::Initialize(bool bWindowed, uint uDefaultDevice, bool bColoredLights, uint uDetailLevel, uint bTinting) { bUserDirect3D = true;//ReadWindowsRegistryInt("Use D3D", 0); bStartInWindow = bWindowed; @@ -4804,8 +4730,6 @@ return r1 && r2; } - - //----- (0049EBF1) -------------------------------------------------------- void Render::_49EBF1() { @@ -4856,7 +4780,6 @@ } } - //----- (0049ECC4) -------------------------------------------------------- void Render::ClearBlack() { @@ -4869,7 +4792,6 @@ memset(pRenderer->pTargetSurface, 0, 4 * (field_10 * field_14 / 2)); } - //----- (0049ED18) -------------------------------------------------------- void Render::PresentBlackScreen() { @@ -4903,7 +4825,6 @@ pRenderer->Present(); } - //----- (0049EDB6) -------------------------------------------------------- void Render::SavePCXScreenshot() { @@ -5088,7 +5009,6 @@ } // 4EFA80: using guessed type int dword_4EFA80; - //----- (0049F1BC) -------------------------------------------------------- void Render::_49F1BC(const char *a1) { @@ -5283,8 +5203,6 @@ } // 4EFA84: using guessed type int dword_4EFA84; - - //----- (0049F5A2) -------------------------------------------------------- int Render::_49F5A2(int a2, int a3, int a4, void *Dst, int a6, int a7) { @@ -5456,7 +5374,6 @@ return result; } - //----- (0049F8B5) -------------------------------------------------------- FILE *Render::SavePCXImage(const char *Filename, char *a3, int a4, int a5) { @@ -5593,7 +5510,6 @@ return result; } - //----- (0049FBCD) -------------------------------------------------------- void Render::ClearTarget(unsigned int uColor) { @@ -5606,8 +5522,6 @@ memset32(pTargetSurface, uColor, field_10 * field_14 / 2); } - - //----- (0049FC23) -------------------------------------------------------- void Render::Release2() { @@ -5615,7 +5529,6 @@ bWindowMode = 1; } - //----- (0049FC37) -------------------------------------------------------- void Render::Present() { @@ -5694,7 +5607,6 @@ } } - //----- (0049FDBF) -------------------------------------------------------- void Render::CreateZBuffer() { @@ -5706,7 +5618,6 @@ } } - //----- (0049FE05) -------------------------------------------------------- void Render::Release() { @@ -6059,7 +5970,6 @@ } // 6BE3A0: using guessed type float flt_6BE3A0; - //----- (004A05F3) -------------------------------------------------------- bool Render::SwitchToWindow(HWND hWnd) { @@ -6292,7 +6202,6 @@ return 0; } - //----- (004A0BEE) -------------------------------------------------------- char Render::RasterLine2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor) { @@ -6526,16 +6435,12 @@ return v12; } - - //----- (004A0E80) -------------------------------------------------------- void Render::ClearZBuffer(int a2, int a3) { memset32(this->pActiveZBuffer, -65536, 0x4B000u); } - - //----- (004A0E97) -------------------------------------------------------- void Render::SetRasterClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW) { @@ -6545,7 +6450,6 @@ this->raster_clip_w = uW; } - //----- (004A0EB6) -------------------------------------------------------- void Render::ParseTargetPixelFormat() { @@ -6660,7 +6564,6 @@ return result; } - //----- (004A1032) -------------------------------------------------------- bool Render::LockSurface_DDraw2(IDirectDrawSurface2 *pSurface, DDSURFACEDESC *pDesc, unsigned int uLockFlags) { @@ -6991,7 +6894,6 @@ return bUserDirect3D == 0; } - //----- (004A16E1) -------------------------------------------------------- void Render::UnlockBackBuffer() { @@ -7001,7 +6903,6 @@ ErrD3D(pBackBuffer2->Unlock(0)); } - //----- (004A172E) -------------------------------------------------------- void Render::LockFrontBuffer(void **pOutSurface, unsigned int *pOutPixelsPerRow) { @@ -7054,7 +6955,6 @@ ErrD3D(pFront->Unlock(0)); } - //----- (004A1814) -------------------------------------------------------- void Render::RestoreFrontBuffer() { @@ -7067,7 +6967,6 @@ (*v1)->Restore(); } - //----- (004A184C) -------------------------------------------------------- HRESULT Render::_4A184C() { @@ -7121,7 +7020,6 @@ ErrD3D(pFront->Blt(a2, pBack, v6, v7, v8)); } - //----- (004A18F5) -------------------------------------------------------- void Render::BltToFront(RECT *pDstRect, IDirectDrawSurface *pSrcSurface, RECT *pSrcRect, unsigned int uBltFlags) { @@ -7238,7 +7136,6 @@ return v7; } - //----- (004A1E9D) -------------------------------------------------------- unsigned int Render::GetBillboardDrawListSize() { @@ -7312,8 +7209,6 @@ pGame->pStru6Instance->RenderSpecialEffects(); } - - //----- (004A2031) -------------------------------------------------------- unsigned int Render::GetActorTintColor(float a2, int tint, int a4, int a5, RenderBillboard *a6) { @@ -7718,7 +7613,6 @@ pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_D3D_OUTLINES ) pGame->pIndoorCameraD3D->debug_outline_d3d(d3d_vertex_buffer, uNumVertices, 0x00FFFFFF, 0.0); } - // 4A26BC: could not find valid save-restore pair for esi // 4D864C: using guessed type char byte_4D864C; @@ -7766,6 +7660,7 @@ pRenderer->pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, pVertices, uNumVertices, D3DDP_DONOTUPDATEEXTENTS | D3DDP_DONOTLIGHT); } } + //----- (004A2DA3) -------------------------------------------------------- void Render::DrawFan(unsigned int uNumVertices, stru148 *a3, IDirect3DTexture2 *pTexture) { @@ -7810,7 +7705,6 @@ } } - //----- (004A2ED5) -------------------------------------------------------- void Render::_4A2ED5(signed int a2, stru148 *a3, IDirect3DTexture2 *pHwTex) { @@ -7866,8 +7760,6 @@ } } - - //----- (004A2FC0) -------------------------------------------------------- void Render::DrawIndoorPolygon(unsigned int uNumVertices, BLVFace *pFace, IDirect3DTexture2 *pHwTex, Texture *pTex, int uPackedID, unsigned int uColor, int a8) { @@ -8075,7 +7967,6 @@ } // 4D864C: using guessed type char byte_4D864C; - //----- (004A43B1) -------------------------------------------------------- void Render::DrawBillboard_Indoor(RenderBillboardTransform_local0 *pSoftBillboard, Sprite *pSprite, int dimming_level) { @@ -8204,8 +8095,6 @@ } } - - //----- (004A354F) -------------------------------------------------------- void Render::MakeParticleBillboardAndPush_BLV(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle) { @@ -8381,7 +8270,6 @@ } } - //----- (004A3AD9) -------------------------------------------------------- void Render::MakeParticleBillboardAndPush_ODM(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle) { @@ -8554,7 +8442,6 @@ } } - //----- (004A4023) -------------------------------------------------------- void Render::TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int dimming_level, RenderBillboard *pBillboard) { @@ -8660,7 +8547,6 @@ pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Transparent; } - //----- (004A48E4) -------------------------------------------------------- int Render::MakeParticleBillboardAndPush_BLV_Software(int screenSpaceX, int screenSpaceY, int z, int lightColor, int a6) { @@ -8854,7 +8740,6 @@ ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CW)); } - //----- (004A4CC9) -------------------------------------------------------- void Render::_4A4CC9(stru6_stru1_indoor_sw_billboard *a1, int a2) { @@ -8932,7 +8817,6 @@ } } - //----- (004A4DE1) -------------------------------------------------------- bool Render::LoadTexture(const char *pName, unsigned int bMipMaps, IDirectDrawSurface4 **pOutSurface, IDirect3DTexture2 **pOutTexture) { @@ -9186,7 +9070,6 @@ } } - //----- ( ) -------------------------------------------------------- unsigned int Render::_4A52F1(unsigned int this_, float a3) { @@ -9394,8 +9277,6 @@ return result; } - - //----- (004A5B81) -------------------------------------------------------- void Render::SetTextureClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW) { @@ -9406,7 +9287,6 @@ this->uClipZ = uZ; } - //----- (004A5BB6) -------------------------------------------------------- void Render::ResetTextureClipRect() { @@ -9417,7 +9297,6 @@ this->uClipZ = 640; } - //----- (004A5BE3) -------------------------------------------------------- void Render::DrawTextureRGB(unsigned int uOutX, unsigned int uOutY, RGBTexture *a4) { @@ -9521,7 +9400,6 @@ } } - //----- (004A5D33) -------------------------------------------------------- void Render::_4A5D33(unsigned int pX, unsigned int pY, int a4, int a5, RGBTexture *pTexture) { @@ -9634,8 +9512,6 @@ } } - - //----- (004A6E7E) -------------------------------------------------------- void Render::_4A6E7E(unsigned int a2, unsigned int a3, Texture *a4) { @@ -9768,7 +9644,6 @@ } } - //----- (004A6DF5) -------------------------------------------------------- int Render::_4A6DF5(unsigned __int16 *pBitmap, unsigned int uBitmapPitch, Vec2_int_ *pBitmapXY, unsigned __int16 *pTarget, unsigned int uTargetPitch, Vec4_int_ *a7) { @@ -9818,7 +9693,6 @@ return result; } - //----- (004A6D87) -------------------------------------------------------- void Render::FillRectFast(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, unsigned int uColor16) { @@ -9836,8 +9710,6 @@ } } - - //----- (004A6C4F) -------------------------------------------------------- void Render::DrawText(signed int uOutX, signed int uOutY, unsigned __int8 *pFontPixels, unsigned int uCharWidth, unsigned int uCharHeight, unsigned __int16 *pFontPalette, unsigned __int16 uFaceColor, unsigned __int16 uShadowColor) { @@ -9937,8 +9809,6 @@ } } - - //----- (004A6A68) -------------------------------------------------------- void Render::_4A6A68(unsigned int a2, unsigned int a3, Texture *a4, __int16 height) { @@ -9957,8 +9827,6 @@ DrawTextureIndexed(a2, a3, &tex); } - - //----- (004A6AB1) -------------------------------------------------------- void Render::DrawTextPalette(int x, int y, int a4, int a5, unsigned int uFontHeight, unsigned __int16 *pPalette, int a8) { @@ -10209,7 +10077,6 @@ } } - //----- (004A6776) -------------------------------------------------------- void Render::DrawTransparentRedShade(unsigned int a2, unsigned int a3, Texture *a4) { @@ -10425,7 +10292,6 @@ } } - //----- (004A63E6) -------------------------------------------------------- void Render::_4A63E6(unsigned int a2, unsigned int a3, Texture *a4, Texture *a5, int a6, int a7, int a8) { @@ -10549,7 +10415,6 @@ } } - //----- (004A6274) -------------------------------------------------------- void Render::DrawTextureTransparent(unsigned int uX, unsigned int uY, Texture *pTexture) { @@ -10658,7 +10523,6 @@ } } - //----- (004A612A) -------------------------------------------------------- void Render::DrawMaskToZBuffer(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal) { @@ -10764,7 +10628,6 @@ } } - //----- (004A601E) -------------------------------------------------------- void Render::_4A601E(signed int a2, signed int a3, Texture *pTexture, int a5) { @@ -11104,14 +10967,12 @@ // 6BE364: using guessed type int dword_6BE364_game_settings_1; // A74C88: using guessed type int dword_A74C88; - //----- (0044EC20) -------------------------------------------------------- bool RenderD3D::DoesRaiseExceptions() { return true; } - //----- (0040DBD3) -------------------------------------------------------- void __fastcall Render::SetPixel(Vec2_int_ *pTargetXY, unsigned __int16 uColor) { @@ -11142,7 +11003,6 @@ } } - //----- (004524D8) -------------------------------------------------------- HWLTexture *RenderHWLContainer::LoadTexture(const char *pName, int bMipMaps) { @@ -11383,14 +11243,6 @@ return true; } - - - - - - - - //----- (004A1C1E) -------------------------------------------------------- void DoRenderBillboards_D3D() { @@ -11459,10 +11311,6 @@ ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, TRUE)); } - - - - //----- (004A1DA8) -------------------------------------------------------- void SetBillboardBlendOptions(RenderBillboardD3D::OpacityType a1) { diff -r 93c6b78abf35 -r d170f23f70d1 SpriteObject.cpp --- a/SpriteObject.cpp Sun Mar 24 00:42:55 2013 +0000 +++ b/SpriteObject.cpp Sun Mar 24 01:27:34 2013 +0000 @@ -14,17 +14,31 @@ #include "LOD.h" #include "Actor.h" #include "Events.h" - #include "mm7_data.h" - - - size_t uNumSpriteObjects; SpriteObject pSpriteObjects[1000]; - - +//----- (00404828) -------------------------------------------------------- +SpriteObject::SpriteObject() +{ + field_22_glow_radius_multiplier = 1; + uSoundID = 0; + uFacing = 0; + vVelocity.z = 0; + vVelocity.y = 0; + vVelocity.x = 0; + uType = 0; + uObjectDescID = 0; + field_61 = 0; + field_60_distance_related_prolly_lod = 0; + field_20 = 0; + uSpriteFrameID = 0; + field_50 = 0; + field_4C = 0; + field_48 = 0; + field_54 = 0; +} //----- (0042F5ED) -------------------------------------------------------- int SpriteObject::Create(int yaw, int pitch, int a4, int a5) @@ -165,8 +179,6 @@ return v6; } - - //----- (00471C03) -------------------------------------------------------- void SpriteObject::UpdateObject_fn0_ODM(unsigned int uLayingItemID) { @@ -589,8 +601,6 @@ } } - - //----- (0047136C) -------------------------------------------------------- void SpriteObject::UpdateObject_fn0_BLV(unsigned int uLayingItemID) { @@ -975,9 +985,6 @@ } // 46DF1A: using guessed type int __fastcall 46DF1A_collide_against_actor(int, int); - - - //----- (00438E35) -------------------------------------------------------- void SpriteObject::_438E35() { @@ -1070,8 +1077,6 @@ } } - - //----- (0042F933) -------------------------------------------------------- void SpriteObject::OnInteraction(unsigned int uLayingItemID) { diff -r 93c6b78abf35 -r d170f23f70d1 mm7_3.cpp --- a/mm7_3.cpp Sun Mar 24 00:42:55 2013 +0000 +++ b/mm7_3.cpp Sun Mar 24 01:27:34 2013 +0000 @@ -43,16 +43,8 @@ #include "stru298.h" #include "texts.h" #include "Log.h" - #include "mm7_data.h" - - - - - - - //----- (0046E44E) -------------------------------------------------------- int __thiscall _46E44E_collide_against_faces_and_portals(unsigned int b1) { @@ -492,7 +484,6 @@ return result; } - //----- (0046ED1B) -------------------------------------------------------- int _46ED1B_collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID) { @@ -760,7 +751,6 @@ return result; } - //----- (0047050A) -------------------------------------------------------- int stru141::_47050A(int a2) { @@ -1358,9 +1348,6 @@ while ( (signed int)v75 < (signed int)uNumActors ); } - - - //----- (0047253E) -------------------------------------------------------- void UpdateObjects() { @@ -2166,7 +2153,6 @@ EventProcessor(uFaceEvent, 0, 1); } - //----- (00473893) -------------------------------------------------------- void __cdecl ODM_ProcessPartyActions() { @@ -3431,8 +3417,6 @@ return 1; } - - //----- (00475665) -------------------------------------------------------- signed int __thiscall sub_475665(BLVFace *_this, int a2, __int16 a3) { @@ -3836,10 +3820,6 @@ return 1; } - - - - //----- (004760D5) -------------------------------------------------------- PartyAction ActionQueue::Next() { @@ -3853,10 +3833,6 @@ return result; } - - - - // 47730C: using guessed type int __stdcall const_1(int); //----- (0047752B) -------------------------------------------------------- @@ -3882,10 +3858,6 @@ return v1 + v0->uReputation; } - - - - //----- (004775ED) -------------------------------------------------------- int stru6_stru1_indoor_sw_billboard::_4775ED(float a2) { @@ -4491,8 +4463,6 @@ return v16; } - - //----- (004783FA) -------------------------------------------------------- void __cdecl sub_4783FA_construct_global_73D150() { @@ -4510,8 +4480,6 @@ while ( v1 ); } - - //----- (0047840D) -------------------------------------------------------- char Render::DrawBuildingsD3D() { @@ -5407,9 +5375,6 @@ return false; } - - - //----- (00479295) -------------------------------------------------------- int stru148::_479295() { @@ -5551,8 +5516,6 @@ return result; } - - unsigned short *LoadTgaTexture(const wchar_t *filename, int *out_width = nullptr, int *out_height = nullptr) { #pragma pack(push, 1) @@ -5632,8 +5595,10 @@ *skybox_yn, *skybox_yp, *skybox_zn, *skybox_zp; int skybox_width, skybox_height; + IDirect3DTexture2 *skybox_texture; IDirectDrawSurface4 *skybox_surface; + bool Skybox_Initialize(const wchar_t *skybox_name) { wchar_t xn_filename[1024], xp_filename[1024], @@ -5714,15 +5679,16 @@ return true; } - struct vector { float x, y, z; }; + struct matrix { float m[4][4]; }; + void VectorNormalize(vector *v) { float invmag = 1.0f / sqrtf(v->x * v->x + v->y * v->y + v->z * v->z); @@ -5730,6 +5696,7 @@ v->y *= invmag; v->z *= invmag; } + void MatrixRotationAxis(matrix *pout, CONST vector *pv, float angle) { memset(pout, 0, sizeof(matrix)); @@ -5752,6 +5719,7 @@ pout->m[1][2] = (1.0f - cos(angle)) * v.z * v.y + sin(angle) * v.x; pout->m[2][2] = (1.0f - cos(angle)) * v.z * v.z + cos(angle); } + void VectorTransform(const matrix *m, const vector *v, vector *out) { out->x = m->m[0][0] * v->x + m->m[1][0] * v->y + m->m[2][0] * v->z + m->m[3][0]; @@ -5759,7 +5727,6 @@ out->z = m->m[0][2] * v->x + m->m[1][2] * v->y + m->m[2][2] * v->z + m->m[3][2]; } - bool DrawSkyD3D_Skybox() { static bool initialized = false, @@ -6745,8 +6712,6 @@ MM7Initialization(); } - - //----- (0047A825) -------------------------------------------------------- bool LevelDecoration::_47A825() { @@ -6785,8 +6750,6 @@ return v1; } - - //----- (0047BC6F) -------------------------------------------------------- unsigned __int16 *__fastcall GetBillboardPalette(RenderBillboard *a1, int a2, signed int a3, int a4) { @@ -6889,13 +6852,6 @@ // 6BE040: using guessed type int day_fogrange_1; // 6BE044: using guessed type int day_fogrange_2; - - - - - - - //----- (0047BEB1) -------------------------------------------------------- int __fastcall sr_sub_47BEB1(signed int a1, stru148 *a2, int terrain_gamma, int a4, int *a5, int *a6, int a7, int a8) { @@ -7207,10 +7163,8 @@ } return result; } - // 4D864C: using guessed type char byte_4D864C; - //----- (0047C370) -------------------------------------------------------- unsigned int __cdecl GetLevelFogColor() { @@ -7311,7 +7265,6 @@ return (-1 - v7) << 24; } - //----- (0047C4FC) -------------------------------------------------------- signed int __fastcall GetActorTintColor(int max_dimm, int min_dimm, float distance, int a4, RenderBillboard *a5) { @@ -7452,9 +7405,6 @@ } // 6BE3C4: using guessed type char bUnderwater; - - - //----- (0047F44B) -------------------------------------------------------- unsigned int __stdcall WorldPosToGridCellX(signed int sWorldPosX) { @@ -7531,9 +7481,6 @@ //while ( (signed int)v4 < (signed int)arary_77E5C8 ); } - - - //----- (004811A3) -------------------------------------------------------- void stru148::_4811A3() { @@ -7548,8 +7495,6 @@ pRenderer->DrawTerrainPolygon(uNumVertices, this, pBitmaps_LOD->pHardwareTextures[uTileBitmapID], 1, 1); } - - //----- (00481DB2) -------------------------------------------------------- char __fastcall sr_sub_481DB2(RenderVertexSoft *a1, signed int a2, stru148 *a3) { @@ -7588,8 +7533,6 @@ // 50B570: using guessed type int dword_50B570[]; // 50B638: using guessed type int dword_50B638[]; - - //----- (00481E55) -------------------------------------------------------- void OutdoorCamera::Project(unsigned int uNumVertices) { @@ -7720,8 +7663,6 @@ return false; } - - //----- (004823F4) -------------------------------------------------------- bool IsTerrainSlopeTooHigh(int pos_x, int pos_z) { @@ -7814,7 +7755,6 @@ return y3 - v10 > 512;*/ } - //----- (0048257A) -------------------------------------------------------- int __fastcall GetTerrainHeightsAroundParty2(int a1, int a2, int *a3, int a4) { @@ -7886,7 +7826,6 @@ return result; } - //----- (0048276F) -------------------------------------------------------- void stru148::_48276F_sr() { @@ -8070,7 +8009,6 @@ return 1; } - //----- (00482A94) -------------------------------------------------------- int sr_sub_482A94(Span *_this) { @@ -8703,7 +8641,6 @@ return 0; } - //----- (004839BD) -------------------------------------------------------- signed int __fastcall sr_sub_4839BD(Span *ecx0, unsigned __int16 *pTargetSurface) { @@ -9018,8 +8955,6 @@ // 6BE0E8: using guessed type int mipmapping_building_mm2; // 6BE0EC: using guessed type int mipmapping_building_mm3; - - //----- (0048408A) -------------------------------------------------------- signed int sr_sub_48408A_prolly_odm_water_no_waves(Span *_this) { @@ -9199,8 +9134,6 @@ return 1; } - - //----- (00484442) -------------------------------------------------------- signed int sr_sub_484442(Span *_this) { @@ -9365,7 +9298,6 @@ return 1; } - //----- (004847EB) -------------------------------------------------------- int sr_sub_4847EB(Span *_this) { @@ -9740,8 +9672,6 @@ // 80AA1C: using guessed type int dword_80AA1C; // 80AA20: using guessed type int dword_80AA20; - - //----- (00485407) -------------------------------------------------------- signed int __fastcall sr_sub_485407_prolly_odm_water_wavy(Span *a1) { @@ -9947,7 +9877,6 @@ return 1; } - //----- (0048585C) -------------------------------------------------------- signed int __fastcall sr_sub_48585C_mb_DrawSpan(Span *a1, unsigned __int16 *pRenderTarget, int a4) { @@ -10499,8 +10428,6 @@ v->y = 0; } - - //----- (00485F64) -------------------------------------------------------- void OutdoorCamera::_485F64() { @@ -10535,7 +10462,6 @@ camera_rotation_x_int_cosine = stru_5C6E00->Cos(pIndoorCamera->sRotationX); } - //----- (0048607B) -------------------------------------------------------- void stru148::_48607B(stru149 *a2) { @@ -10836,7 +10762,6 @@ return result; } - //----- (00486A28) -------------------------------------------------------- void OutdoorCamera::AllocSoftwareDrawBuffers() { @@ -11085,8 +11010,6 @@ return v7; } - - //----- (0043F953) -------------------------------------------------------- void PrepareBspRenderList_BLV() { @@ -11301,7 +11224,6 @@ } } - //----- (0044028F) -------------------------------------------------------- void PrepareItemsRenderList_BLV() { @@ -11465,8 +11387,6 @@ } } - - //----- (00440639) -------------------------------------------------------- void AddBspNodeToRenderList(unsigned int node_id) { @@ -11615,8 +11535,6 @@ } // 4E28F8: using guessed type int pCurrentScreen; - - //----- (00441A4E) -------------------------------------------------------- __int16 __fastcall sub_441A4E(int a1) { @@ -11692,11 +11610,6 @@ return result; } - - - - - //----- (00443801) -------------------------------------------------------- void Initialize2DA() { @@ -11925,7 +11838,6 @@ } - //----- (00443E31) -------------------------------------------------------- void LoadLevel_InitializeLevelStr() { @@ -11973,7 +11885,6 @@ } } - //----- (00443F95) -------------------------------------------------------- void __cdecl OnMapLeave() { @@ -11993,10 +11904,9 @@ } } - //----- (00443FDC) -------------------------------------------------------- void OnMapLoad() - { +{ stru176 *v3; // esi@7 __int16 v4; // cx@9 __int16 v5; // di@9 @@ -12027,23 +11937,23 @@ __int16 v33; // [sp+4Eh] [bp-2h]@9 for (uint i = 0; i < uLevelEVT_NumEvents; ++i) - { + { auto pEvent = pLevelEVT_Index[i]; auto _evt = (_evt_raw *)(pLevelEVT + pEvent.uEventOffsetInEVT); if (_evt->_e_type == EVENT_PlaySound) - { + { pSoundList->LoadSound(EVT_DWORD(_evt->v5), 0); - } + } else if (_evt->_e_type == EVENT_OnMapReload) - { + { start_event_seq_number = pEvent.event_sequence_num; EventProcessor(pEvent.uEventID, 0, 0); start_event_seq_number = 0; - } + } else if (_evt->_e_type == EVENT_OnTimer || _evt->_e_type == EVENT_OnLongTimer) - { + { v3 = &array_5B5928_timers[dword_5B65C8_timers_count]; v20 = pOutdoor->uLastVisitDay; if (uCurrentlyLoadedLevelType == LEVEL_Indoor) @@ -12066,7 +11976,7 @@ v3->field_C = ((unsigned short)_evt->v12 << 8) + _evt->v11; v3->field_E = ((unsigned short)_evt->v12 << 8) + _evt->v11; if (v3->timer_evt_type == EVENT_OnLongTimer && !(short)v6 ) - { + { if ( v20 ) v18 = pParty->uTimePlayed - v20; else @@ -12074,25 +11984,25 @@ v26 = (signed int)(signed __int64)((double)(signed __int64)v18 * 0.234375) / 60 / 60 / 24; if ( v26 / 7 / 4 / 12 ) - { + { if ( v3->field_10 ) - { + { ++dword_5B65C8_timers_count; v3->field_0_time = 0; continue; - } } + } if (v26 / 7 / 4 != 0 && v3->field_12 != 0 || v26 / 7 != 0 && v3->field_14 != 0 || v26 != 0 || !v20) - { + { ++dword_5B65C8_timers_count; v3->field_0_time = 0; continue; - } } + } else - { + { v8 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375); v9 = v8; v10 = (signed int)v8 / 60; @@ -12118,30 +12028,30 @@ weeks = v15; months = v16 % 12; if ( v3->field_10 ) - { + { ++years; - } + } else - { + { if ( v3->field_12 ) + { + ++months; + } + else + { + if ( v3->field_14 ) { - ++months; + ++weeks; } - else + else { - if ( v3->field_14 ) - { - ++weeks; - } - else - { ++days; minutes = v3->field_18; hours = v3->field_16; seconds = v3->field_1A; - } } } + } v3->field_0_time = (signed __int64)((double)((seconds + 60 * minutes + 3600 * hours @@ -12151,10 +12061,10 @@ * 0.033333335); ++dword_5B65C8_timers_count; - } } } } +} //----- (00444360) -------------------------------------------------------- void __thiscall Level_LoadEvtAndStr(const char *pLevelName) @@ -12361,9 +12271,6 @@ return result; } - - - //----- (00444A51) -------------------------------------------------------- void TransitionUI_Draw() { @@ -12418,7 +12325,6 @@ _unused_5B5924_is_travel_ui_drawn = true; } - //----- (00444C8F) -------------------------------------------------------- GUIWindow *__cdecl UI_CreateTravelDialogue() { @@ -12539,7 +12445,6 @@ } } - //----- (00444FBE) -------------------------------------------------------- void __cdecl DrawBranchlessDialogueUI() { @@ -12644,7 +12549,6 @@ pEventTimer->Resume(); } - //----- (00445308) -------------------------------------------------------- const char *GetProfessionActionText(int a1) { @@ -13018,235 +12922,6 @@ pRenderer->DrawTextureIndexed(471, 445, (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); } -//----- (004459F9) -------------------------------------------------------- -NPCData *__fastcall GetNPCData(signed int npcid) -{ - unsigned int v1; // esi@1 - NPCData *result; // eax@5 - int v3; // esi@9 - int v4; // ecx@9 - //int v5; // edx@9 - //NPCData *v6; // eax@9 - char *v7; // ebx@14 - NPCData *v8; // edi@14 - char v9; // al@22 - char v10; - //std::string v10; // [sp-18h] [bp-2Ch]@4 - int v11; - //const char *v11; // [sp-8h] [bp-1Ch]@4 - int v12; // [sp-4h] [bp-18h]@4 - int v13; - char *v14; - //std::string *v13; // [sp+Ch] [bp-8h]@4 - int a3; // [sp+13h] [bp-1h]@4 - int i; - - /*v1 = npcid; - if ( (npcid & 0x80000000u) == 0 ) - { - if ( (signed int)npcid < 5000 ) - { - if ( (signed int)npcid >= 501 ) - { - MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0); - } - return &pNPCStats->pNewNPCData[v1]; - } - return &pNPCStats->array_13EF4[npcid - 5000]; - } - if ( (signed int)npcid >= 5000 ) - return &pNPCStats->array_13EF4[npcid - 5000]; - if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) - { - result = 0; - } - else - { - v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1; - v4 = 0; - v5 = 0; - v6 = pParty->pHirelings; - do - { - if ( v6->pName ) - pTmpBuf[v4++] = v5; - ++v6; - ++v5; - } - while ( (signed int)v6 < (signed int)&pParty->pPickedItem ); - v13 = 0; - if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) - { - v7 = &pTmpBuf[v4]; - v8 = pNPCStats->pNewNPCData; - do - { - if ( v8->uFlags & 0x80 - && (!pParty->pHirelings[0].pName || strcmp(v8->pName, pParty->pHirelings[0].pName)) - && (!pParty->pHirelings[1].pName || strcmp(v8->pName, pParty->pHirelings[1].pName)) ) - *v7++ = (char)v13 + 2; - v13 = (std::string *)((char *)v13 + 1); - ++v8; - } - while ( (signed int)v13 < (signed int)pNPCStats->uNumNewNPCs ); - } - v9 = pTmpBuf[v3]; - if ( (unsigned __int8)v9 >= 2u ) - result = &pNPCStats->pNPCData[(unsigned __int8)v9 + 499]; - else - result = &pParty->pHirelings[(unsigned __int8)v9]; - } - return result;*/ - v1 = npcid; - if ( npcid >= 0 ) - { - if ( npcid < 5000 ) - { - if ( npcid >= 501 ) - { - MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0); - } - return &pNPCStats->pNewNPCData[v1];// - 1]; - } - return &pNPCStats->pAdditionalNPC[npcid - 5000]; - } - - - if ( npcid >= 5000 ) - return &pNPCStats->pAdditionalNPC[npcid - 5000]; - if (sDialogue_SpeakingActorNPC_ID >= 0) - { - result = 0; - } - else - { - v3 = abs(sDialogue_SpeakingActorNPC_ID) - 1; - v4 = 0; - - for (i = 0; i < 2; ++i) - { - if (pParty->pHirelings[i].pName) - pTmpBuf[v4++] = i; - } - - if (pNPCStats->uNumNewNPCs > 0) - { - for (i = 0; i < pNPCStats->uNumNewNPCs; ++i) - { - if (pNPCStats->pNewNPCData[i].Hired()) - { - if (!pParty->pHirelings[0].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[0].pName)) - { - if (!pParty->pHirelings[1].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[1].pName)) - pTmpBuf[v4++] = i + 2; - } - } - } - } - - v9 = pTmpBuf[v3]; - if ( v9 >= 2 ) - result = &pNPCStats->pNPCData[499 + v9]; - else - result = &pParty->pHirelings[v9]; - } -} - -//----- (00445B2C) -------------------------------------------------------- -NPCData *__fastcall GetNewNPCData(signed int npcid, int a2) -{ - signed int v2; // esi@1 - int v3; // edi@1 - NPCData *result; // eax@5 - int v5; // esi@9 - int v6; // ecx@9 - int v7; // edx@9 - NPCData *v8; // eax@9 - NPCData *v9; // edi@14 - int v10; // ecx@20 - char v11; // al@23 - std::string v12; // [sp-18h] [bp-34h]@4 - const char *v13; // [sp-8h] [bp-24h]@4 - int v14; // [sp-4h] [bp-20h]@4 - std::string *v15; // [sp+Ch] [bp-10h]@1 - char *v16; // [sp+10h] [bp-Ch]@14 - int v17; // [sp+14h] [bp-8h]@13 - int a3; // [sp+1Bh] [bp-1h]@4 - - v2 = npcid; - v3 = a2; - v15 = (std::string *)a2; - if ( npcid >= 0 ) - { - if ( npcid < 5000 ) - { - if ( npcid >= 501 ) - { - MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:2040", 0); - } - *(int *)v3 = v2; - return &pNPCStats->pNewNPCData[v2]; - } -LABEL_7: - *(int *)a2 = npcid - 5000; - return &pNPCStats->pAdditionalNPC[npcid - 5000]; - } - if ( npcid >= 5000 ) - goto LABEL_7; - if ( sDialogue_SpeakingActorNPC_ID >= 0 ) - { - *(int *)a2 = 0; - result = 0; - } - else - { - v5 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1; - v6 = 0; - v7 = 0; - v8 = pParty->pHirelings; - do - { - if ( v8->pName ) - pTmpBuf[v6++] = v7; - ++v8; - ++v7; - } - while ( (signed int)v8 < (signed int)&pParty->pPickedItem ); - v17 = 0; - if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) - { - v9 = pNPCStats->pNewNPCData; - v16 = &pTmpBuf[v6]; - do - { - if ( v9->Hired() - && (!pParty->pHirelings[0].pName || strcmp(v9->pName, pParty->pHirelings[0].pName)) - && (!pParty->pHirelings[1].pName || strcmp(v9->pName, pParty->pHirelings[1].pName)) ) - { - v10 = (int)v16++; - *(char *)v10 = v17 + 2; - } - ++v17; - ++v9; - } - while ( v17 < (signed int)pNPCStats->uNumNewNPCs ); - v3 = (int)v15; - } - v11 = pTmpBuf[v5]; - if ( (unsigned __int8)v11 >= 2u ) - { - *(int *)v3 = (unsigned __int8)v11 - 2; - result = &pNPCStats->pNPCData[(unsigned __int8)pTmpBuf[v5] + 499]; - } - else - { - *(int *)v3 = (unsigned __int8)v11; - result = &pParty->pHirelings[(unsigned __int8)pTmpBuf[v5]]; - } - } - return result; -} - //----- (00445C8B) -------------------------------------------------------- int __fastcall sub_445C8B(signed int a1) { @@ -13298,7 +12973,6 @@ return ((unsigned __int8)pTmpBuf[v3] < 2u) + 1; } - //----- (0044603D) -------------------------------------------------------- void __cdecl sub_44603D() { @@ -13309,7 +12983,6 @@ pEventTimer->Resume(); } - //----- (004465DF) -------------------------------------------------------- int sub_4465DF_check_season(int a1) { @@ -13508,8 +13181,6 @@ return result; } - - //----- (0044861E) -------------------------------------------------------- void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename) { @@ -13635,9 +13306,6 @@ } } - - - //----- (0044882F) -------------------------------------------------------- void __fastcall SetDecorationSprite(unsigned int uCog, int a2, const char *pFileName) { @@ -13676,7 +13344,6 @@ } } - //----- (004488B6) -------------------------------------------------------- unsigned __int16 DecorationList::GetDecorIdByName(const char *pName) { @@ -13706,7 +13373,6 @@ return result; } - //----- (0044892E) -------------------------------------------------------- void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on) { @@ -13785,30 +13451,6 @@ } } - - - -//----- (00448A40) -------------------------------------------------------- -void Actor::ToggleFlag(signed int uActorID, unsigned int uFlag, int bToggle) -{ - if ( uActorID >= 0 && uActorID <= (signed int)(uNumActors - 1) ) - { - if ( bToggle ) - { - pActors[uActorID].uAttributes |= uFlag; - } - else - { - if ( uFlag == 0x10000 ) - { - if (pActors[uActorID].uAIState == Disabled ) - pActors[uActorID].uAIState = Standing; - } - pActors[uActorID].uAttributes &= ~uFlag; - } - } -} - //----- (00448A98) -------------------------------------------------------- void __fastcall ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle) { @@ -13877,7 +13519,6 @@ } } - //----- (00448B45) -------------------------------------------------------- void __thiscall GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide) { @@ -13993,7 +13634,6 @@ v->vWorldViewProjY = (double)pViewport->uScreenCenterY - v2 * v->vWorldViewPosition.z; } - //----- (00448CF4) -------------------------------------------------------- void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName) { @@ -14040,7 +13680,6 @@ } } - //----- (00448DF8) -------------------------------------------------------- void __fastcall sub_448DF8_cast_spell(int spellnum, int rank, int level, int fromx, int fromy, int fromz, int tox, int toy, int toz) { @@ -14846,7 +14485,6 @@ pArray[v3 / 8] &= ~set_bit; } - //----- (0044A56A) -------------------------------------------------------- void __cdecl Party__CountHirelings() { @@ -14864,7 +14502,6 @@ } } - //----- (0044C175) -------------------------------------------------------- void __fastcall ShowStatusBarString(const char *pString, unsigned int uNumSeconds) { @@ -14887,7 +14524,6 @@ ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here } - //----- (0044C28B) -------------------------------------------------------- signed int __cdecl const_2() { @@ -14917,7 +14553,6 @@ return result; } - //----- (0044C2F4) -------------------------------------------------------- int LevelDecoration::IsInteractive() { @@ -14974,11 +14609,6 @@ v1->z = LODWORD(v14); } - - - - - //----- (00401000) -------------------------------------------------------- void __stdcall mm7__vector_constructor(void *a1, int objSize, int numObjs, int (__thiscall *constructor)(int)) { @@ -14999,7 +14629,6 @@ } } - //----- (004014E6) -------------------------------------------------------- void MakeActorAIList_ODM() { @@ -16098,9 +15727,6 @@ } } - - - //----- (0040261D) -------------------------------------------------------- int stru298::Add(__int16 uID, __int16 a3, __int16 x, __int16 y, __int16 z, char a7, char a8) { @@ -16121,10 +15747,6 @@ return result; } - - - - //----- (00402CAE) -------------------------------------------------------- int stru193_math::Cos(int angle) { @@ -16143,19 +15765,6 @@ return pCosTable[v2]; } - - - - - - - - - - - - - //----- (00404544) -------------------------------------------------------- signed int stru262_TurnBased::_404544() { @@ -16305,30 +15914,6 @@ } } - -//----- (00404828) -------------------------------------------------------- -SpriteObject::SpriteObject() -{ - field_22_glow_radius_multiplier = 1; - uSoundID = 0; - uFacing = 0; - vVelocity.z = 0; - vVelocity.y = 0; - vVelocity.x = 0; - uType = 0; - uObjectDescID = 0; - field_61 = 0; - field_60_distance_related_prolly_lod = 0; - field_20 = 0; - uSpriteFrameID = 0; - field_50 = 0; - field_4C = 0; - field_48 = 0; - field_54 = 0; -} - - - //----- (004059DB) -------------------------------------------------------- signed int stru262_TurnBased::Start() { @@ -16545,4 +16130,3 @@ } return v1->_404544(); } - diff -r 93c6b78abf35 -r d170f23f70d1 mm7_6.cpp --- a/mm7_6.cpp Sun Mar 24 00:42:55 2013 +0000 +++ b/mm7_6.cpp Sun Mar 24 01:27:34 2013 +0000 @@ -452,94 +452,6 @@ return result; } - - -//----- (004361EF) -------------------------------------------------------- -IndoorCameraD3D::IndoorCameraD3D() -{ - IndoorCameraD3D *v1; // esi@1 - //double v2; // st7@1 - //double v3; // st6@1 - //double v4; // st5@1 - //double v5; // st7@1 - //double v6; // st6@1 - //double v7; // st5@1 - - v1 = this; - //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&this->field_4); - //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_14); - //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_24); - /*_eh_vector_constructor_iterator_(v1->std__vector_000034_prolly_frustrum, - 24, - 6, - (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4, - (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor);*/ - //v2 = 0;//(double)pBLVRenderParams->vPartyPos.z; - //v3 = 0;//(double)pBLVRenderParams->vPartyPos.y; - //v4 = 0;//(double)pBLVRenderParams->vPartyPos.x; - v1->field_108 = 0.0; - v1->blv_party_x = 0; - v1->blv_party_y = 0; - v1->blv_party_z = 0; - //v5 = 0;//(double)pBLVRenderParams->vPartyPos.z; - //v6 = 0;//(double)pBLVRenderParams->vPartyPos.y; - //v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300); - v1->field_138 = 0.0; - v1->blv_party_x_2 = 300; - v1->blv_party_y_2 = 0; - v1->blv_party_z_2 = 0; - v1->field_168 = 0.0; - v1->field_198 = 0.0; - v1->field_1C8 = 0.0; - v1->field_1F8 = 0.0; - v1->field_228 = 0.0; - v1->field_258 = 0.0; - v1->field_288 = 0.0; - v1->field_2B8 = 0.0; - v1->field_2E8 = 0.0; - v1->field_2BC = 0.0; - v1->field_2C0 = 0.0; - v1->field_2C4 = 0.0; - v1->field_318 = 0.0; - v1->field_2EC = 0.0; - v1->field_2F0 = 0.0; - v1->field_2F4 = 0.0; - v1->field_348 = 0.0; - v1->field_31C = 0.0; - v1->field_320 = 0.0; - v1->field_324 = 0.0; - v1->field_378 = 0.0; - v1->field_34C = 0.0; - v1->field_350 = 0.0; - v1->field_354 = 0.0; - for (uint i = 0; i < 16384; ++i) - { - list_0037C[i].field_0 = 0; - list_0037C[i].flt_30 = 0.0f; - } - - list_0037C_size = 0; - for (uint i = 0; i < 256; ++i) - list_E0380[i].mm7__vector_000004_size = 0; - /*v10 = v1->list_E0380; - v12 = 256; - do - { - v10->mm7__vector_000004_size = 0; - //mm7__vector_constructor( - // v10->mm7__vector_000004, - // 48, - // 64, - // (int (__thiscall *)(int))IndoorCameraD3D_stru1::IndoorCameraD3D_stru1); - //++v10; - --v12; - } - while ( v12 );*/ - list_E0380_size = 0; - //v1->vdestructor_ptr = &stru8_pvdtor; -} - - //----- (004254D2) -------------------------------------------------------- int __fastcall sr_4254D2(signed int a1) { @@ -1243,9 +1155,6 @@ return result; } - - - //----- (004268E3) -------------------------------------------------------- int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor) { @@ -1290,8 +1199,6 @@ // 50C994: using guessed type int dword_50C994; // 50C998: using guessed type int dword_50C998_turnbased_icon_1A; - - //----- (004269A2) -------------------------------------------------------- int __fastcall sub_4269A2_GivePartyExp(unsigned int a1) { @@ -1703,7 +1610,6 @@ return result; } - //----- (0042704B) -------------------------------------------------------- bool stru319::special_ability_use_check(Actor *pActor, int a2) { @@ -2160,7 +2066,6 @@ return result; } - //----- (00427769) -------------------------------------------------------- bool __fastcall sub_427769_spell(unsigned int uSpellID) { @@ -2486,8 +2391,6 @@ } } - - //----- (00427D48) -------------------------------------------------------- void stru277::_427D48(unsigned int uPlayerID) { @@ -7604,15 +7507,12 @@ return v3; } - - //----- (0042EB78) -------------------------------------------------------- int IconFrameTable::GetIconAnimLength(unsigned int uIconID) { return 8 * this->pIcons[uIconID].uAnimLength; } - const wchar_t *UIMessage2String(UIMessageType msg) { #define CASE(xxx) case xxx: _swprintf(b, L"%03X/%s", msg, L#xxx); return b; @@ -7711,7 +7611,6 @@ #undef CASE } - //----- (0042EB8D) -------------------------------------------------------- void GUIMessageQueue::AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file, int line) { @@ -8106,7 +8005,6 @@ return 0; } - //----- (0042F3D6) -------------------------------------------------------- void InitializeTurnBasedAnimations(void *_this) { @@ -8505,8 +8403,6 @@ return result; } - - //----- (0042FB5C) -------------------------------------------------------- bool __fastcall sub_42FB5C(signed int a1) { @@ -9133,4 +9029,3 @@ AsyncKeyboard::LeaveCriticalSection(); } } -