Mercurial > mm7
changeset 45:e753d08b78ec
Слияние
author | Ritor1 |
---|---|
date | Mon, 21 Jan 2013 09:19:28 +0600 |
parents | 968e681bcceb (current diff) 196847ece26a (diff) |
children | 9b4f8fe32a6e |
files | Player.cpp |
diffstat | 21 files changed, 216 insertions(+), 191 deletions(-) [+] |
line wrap: on
line diff
--- a/AIL.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/AIL.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -10,11 +10,13 @@ int (__stdcall *mss32_AIL_get_preference)(unsigned int) = 0; int (__stdcall *mss32_AIL_digital_configuration)(HDIGDRIVER, int *, int *, char *) = 0; HSAMPLE (__stdcall *mss32_AIL_allocate_sample_handle)(HDIGDRIVER) = 0; +void (__stdcall *mss32_AIL_3D_provider_attribute)(HPROVIDER, char *, void *) = 0; unsigned int (__stdcall *mss32_AIL_redbook_tracks)(HREDBOOK) = 0; int (__stdcall *mss32_AIL_redbook_volume)(HREDBOOK) = 0; unsigned int (__stdcall *mss32_AIL_redbook_stop)(HREDBOOK) = 0; void (__stdcall *mss32_AIL_set_digital_master_volume)(HDIGDRIVER, float) = 0; int (__stdcall *mss32_AIL_redbook_set_volume)(HREDBOOK, int) = 0; +void (__stdcall *mss32_AIL_waveOutClose)(HDIGDRIVER) = 0; unsigned int (__stdcall *mss32_AIL_redbook_pause)(HREDBOOK) = 0; void (__stdcall *mss32_AIL_redbook_track_info)(HREDBOOK, unsigned int, unsigned int *, unsigned int *) = 0; unsigned int (__stdcall *mss32_AIL_redbook_play)(HREDBOOK, unsigned int, unsigned int) = 0; @@ -38,6 +40,7 @@ int (__stdcall *mss32_AIL_WAV_info)(void *, AILSOUNDINFO *) = 0; int (__stdcall *mss32_AIL_decompress_ADPCM)(AILSOUNDINFO *, void *, void *) = 0; HREDBOOK (__stdcall *mss32_AIL_redbook_open)(int) = 0; +void (__stdcall *mss32_AIL_release_sample_handle)(HSAMPLE) = 0; void MSS32_DLL_Initialize() { HMODULE pDll = LoadLibraryW(L"mss32.dll"); @@ -49,11 +52,13 @@ mss32_AIL_get_preference = (int (__stdcall *)(unsigned int))GetProcAddress(pDll, "_AIL_get_preference@4"); mss32_AIL_digital_configuration = (int (__stdcall *)(HDIGDRIVER, int *, int *, char *))GetProcAddress(pDll, "_AIL_digital_configuration@16"); mss32_AIL_allocate_sample_handle = (HSAMPLE (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_AIL_allocate_sample_handle@4"); + mss32_AIL_3D_provider_attribute = (void (__stdcall *)(HPROVIDER,char *, void *))GetProcAddress(pDll, "_AIL_3D_provider_attribute@12"); mss32_AIL_redbook_tracks = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_tracks@4"); mss32_AIL_redbook_volume = (int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_volume@4"); mss32_AIL_redbook_stop = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_stop@4"); mss32_AIL_set_digital_master_volume = (void (__stdcall *)(HDIGDRIVER, float))GetProcAddress(pDll, "_AIL_set_digital_master_volume@8"); mss32_AIL_redbook_set_volume = (int (__stdcall *)(HREDBOOK, int))GetProcAddress(pDll, "_AIL_redbook_set_volume@8"); + mss32_AIL_waveOutClose = (void (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_AIL_waveOutClose@4"); mss32_AIL_redbook_pause = (unsigned int (__stdcall *)(HREDBOOK))GetProcAddress(pDll, "_AIL_redbook_pause@4"); mss32_AIL_redbook_track_info = (void (__stdcall *)(HREDBOOK, unsigned int, unsigned int *, unsigned int *))GetProcAddress(pDll, "_AIL_redbook_track_info@16"); mss32_AIL_redbook_play = (unsigned int (__stdcall *)(HREDBOOK, unsigned int, unsigned int))GetProcAddress(pDll, "_AIL_redbook_play@12"); @@ -77,6 +82,7 @@ mss32_AIL_WAV_info = (int (__stdcall *)(void *, AILSOUNDINFO *))GetProcAddress(pDll, "_AIL_WAV_info@8"); mss32_AIL_decompress_ADPCM = (int (__stdcall *)(AILSOUNDINFO *, void *, void *))GetProcAddress(pDll, "_AIL_decompress_ADPCM@12"); mss32_AIL_redbook_open = (HREDBOOK (__stdcall *)(int))GetProcAddress(pDll, "_AIL_redbook_open@4"); + mss32_AIL_release_sample_handle = (void (__stdcall *)(HSAMPLE))GetProcAddress(pDll, "_AIL_release_sample_handle@4"); } @@ -164,10 +170,12 @@ return (mss32_AIL_open_3D_provider)(a2); } -int __stdcall AIL_3D_provider_attribute(HPROVIDER a1, const char *a2, int *a3) +void __stdcall AIL_3D_provider_attribute(HPROVIDER lib, char *name, void *val) { - __asm int 3 - return 0; + //__asm int 3 + //return 0; + + (mss32_AIL_3D_provider_attribute)(lib,name,val); } // sub_4D8374: using guessed type int __stdcall AIL_redbook_tracks(_DWORD); @@ -200,10 +208,12 @@ return (mss32_AIL_get_preference)(number); } -int __stdcall AIL_waveOutClose(_DIG_DRIVER *) +void __stdcall AIL_waveOutClose(HDIGDRIVER drvr) { - __asm int 3 - return 0; + //__asm int 3 + //return 0; + + (mss32_AIL_waveOutClose)(drvr); } // sub_4D8320: using guessed type int __stdcall AIL_redbook_pause(_DWORD); @@ -236,10 +246,12 @@ return 0; } -int __stdcall AIL_release_sample_handle(void *a1) +void __stdcall AIL_release_sample_handle(HSAMPLE s) { //__asm int 3 - return 0; + //return 0; + + (mss32_AIL_release_sample_handle)(s); } int __stdcall AIL_release_3D_sample_handle(void *a1)
--- a/AIL.h Mon Jan 21 09:19:13 2013 +0600 +++ b/AIL.h Mon Jan 21 09:19:28 2013 +0600 @@ -246,13 +246,13 @@ unsigned int __stdcall AIL_redbook_resume(HREDBOOK); int __stdcall AIL_enumerate_3D_providers(int *a1, HPROVIDER *pOutProv, char **pOutName); DWORD __stdcall AIL_open_3D_provider(HPROVIDER a2); -int __stdcall AIL_3D_provider_attribute(HPROVIDER a1, const char *a2, int *a3); +void __stdcall AIL_3D_provider_attribute(HPROVIDER lib, char *name, void *val); int __stdcall AIL_set_3D_provider_preference(HPROVIDER a1, const char *a2, int *a3); -int __stdcall AIL_waveOutClose(_DIG_DRIVER *); +void __stdcall AIL_waveOutClose(HDIGDRIVER drvr); int __stdcall AIL_allocate_3D_sample_handle(HPROVIDER); int __stdcall AIL_set_3D_sample_float_distances(void *a1, long a2, long a3, long a4, long a5); int __stdcall AIL_set_3D_sample_volume(void *a1, long a2); -int __stdcall AIL_release_sample_handle(void *a1); +void __stdcall AIL_release_sample_handle(HSAMPLE s); int __stdcall AIL_3D_position(void *a1, int *a2, float *a3, long *a4); int __stdcall AIL_set_3D_sample_file(long a1, void *a2); int __stdcall AIL_set_3D_sample_loop_count(long a1, long a2);
--- a/Actor.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/Actor.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -2489,7 +2489,7 @@ v1 = uActiveCharacter; v7 = uActorID; - pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552]; + pPlayer = &pParty->pPlayers[uActiveCharacter-1];//(Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552]; result = pPlayer->CanAct(); if ( result ) { @@ -4078,7 +4078,7 @@ //while ( v10 ); uActorHeight = v3->uMonsterHeight; uActorRadius = v3->uMonsterRadius; - uMovementSpeed = LOWORD(v9->uBaseSpeed); + uMovementSpeed = v9->uBaseSpeed; if ( !(load_sounds_if_bit1_set & 1) ) { v5 = pSoundSampleIDs;
--- a/AudioPlayer.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/AudioPlayer.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -2525,7 +2525,7 @@ { v2 += 128; ++pID; - if ( (signed int)v2 >= (signed int)&pAudioPlayer->p3DSamples[6].field_8 ) + if ( v2 > (void *)&pSounds[2999].pSoundData)//(signed int)&pAudioPlayer->p3DSamples[6].field_8 ) return; } pAllocator->FreeChunk(_this);
--- a/Autonotes.h Mon Jan 21 09:19:13 2013 +0600 +++ b/Autonotes.h Mon Jan 21 09:19:28 2013 +0600 @@ -22,5 +22,5 @@ enum AUTONOTE_TYPE eType; }; #pragma pack(pop) -extern Autonote stru_723720[195]; // weak +extern Autonote pAutonoteTxt[195]; // weak
--- a/GameUIs.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/GameUIs.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -98,7 +98,7 @@ if ( v4 ) fread(&pSavegameHeader[i], 0x64, 1, v4); if ( !_strcmpi(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[613]) )// "AutoSave.MM7" - strcpy(pSavegameList->pSavesNames[i], pGlobalTXT_LocalizationStrings[16]);// "Autosave" + strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[16]);// "Autosave" v5 = pLODFile.FindContainer("image.pcx", true); if ( !v5 ) {
--- a/LOD.h Mon Jan 21 09:19:13 2013 +0600 +++ b/LOD.h Mon Jan 21 09:19:28 2013 +0600 @@ -183,7 +183,7 @@ int uTextureBlueBits; int uNumPrevLoadedFiles; int uTexturePacksCount; - int dword_011BA0; + int pFacesLock; int dword_011BA4; int dword_011BA8; struct IDirectDrawSurface **pHardwareSurfaces;
--- a/OSAPI.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/OSAPI.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -35,6 +35,6 @@ if (hPrevWindow) SetActiveWindow(hPrevWindow); - __debugbreak(); + //__debugbreak(); return 0; }
--- a/Outdoor.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/Outdoor.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -102,7 +102,7 @@ //LABEL_14: pRenderer->DrawSkyD3D(); pRenderer->DrawBuildingsD3D(); - pRenderer->DrawBezierTerrain(); + //pRenderer->DrawBezierTerrain(); goto LABEL_16; } pRenderer->DrawBuildingsSW();
--- a/ParticleEngine.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/ParticleEngine.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -518,7 +518,7 @@ + ((unsigned __int64)(v45 * (signed __int64)v3) >> 16); if ( X_4 < 262144 ) return 0; - v16 = ((unsigned __int64)(v47 * (signed __int64)v4) >> 16) - v43; + v16 = ((unsigned __int64)(v47 * (signed __int64)v4) >> 16); //- v43;Ritor1:it's temporarily v17 = ((unsigned __int64)(uIDa * (signed __int64)v3) >> 16) - ((unsigned __int64)(v45 * (signed __int64)v44) >> 16); } @@ -726,7 +726,7 @@ v14.uParentBillboardID = -1; v1 = this; v2 = this->uStartParticle; - v5 = __OFSUB__(v2, this->uEndParticle); + v5 = v2 > this->uEndParticle;// v5 = __OFSUB__(v2, this->uEndParticle); v3 = v2 == this->uEndParticle; v4 = v2 - this->uEndParticle < 0; v16 = this->uStartParticle; @@ -837,7 +837,7 @@ } v7 += 104; v2 = v16 + 1; - v5 = __OFSUB__(v16 + 1, v1->uEndParticle); + v5 = v16 + 1 > v1->uEndParticle;// v5 = __OFSUB__(v16 + 1, v1->uEndParticle); v3 = v16 + 1 == v1->uEndParticle; v4 = v16++ + 1 - v1->uEndParticle < 0; }
--- a/Player.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/Player.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -6959,7 +6959,7 @@ unsigned int thisa; // [sp+28h] [bp-4h]@22 thisb = this; - v3 = (Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552]; + v3 = &pParty->pPlayers[a2-1];//(Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552]; v73 = 1; if ( pParty->bTurnBasedModeOn == 1 && (pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3) ) return; @@ -6987,7 +6987,7 @@ } v69 = 2; LABEL_111: - ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->Heal(v69); + pParty->pPlayers[a2-1].Heal(v69);//((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->Heal(v69); } LABEL_112: v3->PlaySound(36, 0); @@ -7160,7 +7160,7 @@ v33 = HIDWORD(v3->pConditions[15]); v34 = LODWORD(v3->pConditions[16]); v35 = HIDWORD(v3->pConditions[16]); - memset(&stru_AA1058[3].pSounds[6972 * a2 + 40552], 0, 0xA0u); + memset(&pParty->pPlayers[a2-1],0,0xA0u);//memset(&stru_AA1058[3].pSounds[6972 * a2 + 40552], 0, 0xA0u); HIDWORD(v3->pConditions[14]) = v31; LODWORD(v3->pConditions[15]) = v32; HIDWORD(v3->pConditions[15]) = v33; @@ -7531,7 +7531,7 @@ pMouse->RemoveHoldingItem(); return; } - if ( ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) + if ( pParty->pPlayers[a2-1].CanAct() )//if ( ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) { sub_467F48(pParty->pPickedItem.uItemID); v65 = 0; @@ -7575,7 +7575,7 @@ pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61); return; } - if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) + if ( !pParty->pPlayers[a2-1].CanAct() )//if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) { v66 = aCharacterConditionNames[v3->GetMajorConditionIdx()]; v57 = pGlobalTXT_LocalizationStrings[382]; @@ -7687,7 +7687,7 @@ } if ( pCurrentScreen == 23 ) return; - if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) + if ( !pParty->pPlayers[a2-1].CanAct() )//if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) goto LABEL_89; if ( bUnderwater == 1 ) {
--- a/Render.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/Render.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -7083,7 +7083,7 @@ if (pRenderD3D) { pGame->draw_debug_outlines(); - //DoRenderBillboards_D3D(); Ritor1: it's temporarily + //DoRenderBillboards_D3D(); //Ritor1: it's temporarily pGame->pStru6Instance->RenderSpecialEffects(); pRenderD3D->pDevice->EndScene(); }
--- a/Vis.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/Vis.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -323,14 +323,14 @@ } v9 = x + 1.0; //UNDEF(v8); - v10 = v9 < v5; - v11 = 0; - v12 = v9 == v5; - BYTE1(result) = HIBYTE(v8);//crash + //v10 = v9 < v5; + //v11 = 0; + //v12 = v9 == v5; + //BYTE1(result) = HIBYTE(v8);//crash if ( v9 >= v5 - && (v14 = x - 1.0, /*UNDEF(v13),*/ v15 = v14 < a1a, v16 = 0, v17 = v14 == a1a, BYTE1(result) = HIBYTE(v13), v15 | v17) - && (v19 = y + 1.0, /*UNDEF(v18),*/ v20 = v19 < v29, v21 = 0, v22 = v19 == v29, BYTE1(result) = HIBYTE(v18), v19 >= v29) - && (v24 = y - 1.0, /*UNDEF(v23),*/ v25 = v24 < v28, v26 = 0, v27 = v24 == v28, BYTE1(result) = HIBYTE(v23), v25 | v27) ) + && (v14 = x - 1.0, v14<=a1a)///*UNDEF(v13),*/ v15 = v14 < a1a, v16 = 0, v17 = v14 == a1a, BYTE1(result) = HIBYTE(v13), v15 | v17) + && (v19 = y + 1.0, v19>=v29)///*UNDEF(v18),*/ v20 = v19 < v29, v21 = 0, v22 = v19 == v29, BYTE1(result) = HIBYTE(v18), v19 >= v29) + && (v24 = y - 1.0, v24<=v28))///*UNDEF(v23),*/ v25 = v24 < v28, v26 = 0, v27 = v24 == v28, BYTE1(result) = HIBYTE(v23), v25 | v27) ) LOBYTE(result) = 1; else LABEL_14: @@ -1345,17 +1345,16 @@ bool result; // eax@1 RenderVertexD3D3 *v5; // edx@2 RenderVertexD3D3 *v6; // esi@2 - RenderVertexD3D3 v7; // qdi@2 + void *v7; // edi@2 unsigned int v8; // ebx@2 - int v9; // ecx@3 - int v10; // ecx@5 - float v11; // eax@8 + float *v9; // ecx@3 + float *v10; // ecx@5 + RenderVertexD3D3 *v11; // eax@8 RenderVertexD3D3 v12; // [sp+4h] [bp-4Ch]@8 - char v13; // [sp+24h] [bp-2Ch]@2 - float v14; // [sp+28h] [bp-28h]@4 + RenderVertexD3D3 v13; // [sp+24h] [bp-2Ch]@2 Vis *thisa; // [sp+44h] [bp-Ch]@1 - RenderVertexD3D3 *v16; // [sp+48h] [bp-8h]@2 - unsigned int v17; // [sp+4Ch] [bp-4h]@2 + RenderVertexD3D3 *v15; // [sp+48h] [bp-8h]@2 + unsigned int v16; // [sp+4Ch] [bp-4h]@2 result = uEnd; thisa = this; @@ -1363,41 +1362,41 @@ { v5 = a2; v6 = &a2[uEnd]; - LODWORD(v7.pos.x) = (int)&v13; - v16 = &a2[uEnd]; + v7 = &v13; + v15 = &a2[uEnd]; v8 = uStart - 1; - v17 = uEnd; + v16 = uEnd; while ( 1 ) { - memcpy(*(void **)&v7.pos.x, v6, 0x20u); - v9 = (int)&v5[v8].pos.y; + memcpy(v7, v6, 0x20u); + v9 = &v5[v8].pos.y; do { - v9 += 32; + v9+=8; ++v8; } - while ( *(float *)v9 < (double)v14 ); - v10 = (int)&v5[v17].pos.y; + while ( *v9 < (double)v13.pos.y ); + v10 = &v5[v16].pos.y; do { - v10 -= 32; - --v17; + v10-=8; + --v16; } - while ( *(float *)v10 > (double)v14 ); - if ( (signed int)v8 >= (signed int)v17 ) + while ( *v10 > (double)v13.pos.y ); + if ( (signed int)v8 >= (signed int)v16 ) break; - LODWORD(v11) = (int)&v5[v17]; + v11 = &v5[v16]; memcpy(&v12, &a2[v8], sizeof(v12)); v5 = a2; - memcpy(&a2[v8], *(void **)&v11, sizeof(a2[v8])); + memcpy(&a2[v8], v11, sizeof(a2[v8])); v6 = &v12; - v7.pos.x = v11; + v7 = v11; } memcpy(&v12, &v5[v8], sizeof(v12)); - memcpy(&v5[v8], v16, sizeof(v5[v8])); - memcpy(v16, &v12, 0x20u); - SortVerticesByY(v5, uStart, v8 - 1); - SortVerticesByY(a2, v8 + 1, uEnd); + memcpy(&v5[v8], v15, sizeof(v5[v8])); + memcpy(v15, &v12, 0x20u); + SortVerticesByX(v5, uStart, v8 - 1); + SortVerticesByX(a2, v8 + 1, uEnd); } return true; }
--- a/mm7_1.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_1.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -206,7 +206,7 @@ v85 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem; v86 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); v79 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); - pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * v1 + 40552]; + pPlayer = &pParty->pPlayers[v1-1];//(Player *)&stru_AA1058[3].pSounds[6972 * v1 + 40552]; v3 = pIcons_LOD->LoadTexture("fr_skill", TEXTURE_16BIT_PALETTE); pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0)); v4 = v79; @@ -214,7 +214,7 @@ v4 = 65535; sprintf( pTmpBuf, - "%s ", + "%s \f%05d%s\f00000\r177%s: \f%05d%d\f00000", pGlobalTXT_LocalizationStrings[206], // Skills for a5, pPlayer->pName, @@ -409,7 +409,7 @@ pGUIWindow_CurrentMenu->DrawText(pFontArrus, 248, v27, a5, pTmpBuf, 0, 0, 0); v28 = pGUIWindow_CurrentMenu; v72 = 0; - v82 = dword_4E2A18; + v82 = pArmorSkills; do { v29 = 0; @@ -623,8 +623,8 @@ sprintf( Source, pGlobalTXT_LocalizationStrings[429], - &stru_AA1058[3].pSounds[6972 * v1 + 40720], - pClassNames[stru_AA1058[3].pSounds[6972 * v1 + 40737]]); + &pParty->pPlayers[v1-1].pName,//&stru_AA1058[3].pSounds[6972 * v1 + 40720], + &pClassNames[pParty->pPlayers[v1-1].uClass]);//&pClassNames[stru_AA1058[3].pSounds[6972 * v1 + 40737]]); strcat(pTmpBuf, Source); strcat(pTmpBuf, "\xC" "00000"); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); @@ -1198,7 +1198,7 @@ if ( dword_507CC0 != uActiveCharacter ) { sub_4196A0(); - sub_419401(); + CharacterUI_SkillScreen_Draw(); } sub_419379(); CharacterUI_SkillsTab_Draw(v1); @@ -4771,7 +4771,7 @@ { v11 = (unsigned __int8)pTmpBuf[v2]; v12 = &pNPCStats->pNPCData[v11 + 499]; - if ( (unsigned __int8)pTmpBuf[v2] < 2u ) + if ( (unsigned __int8)pTmpBuf[v2] < 2 ) v12 = &pParty->pHirelings[v11]; v13 = v12->uProfession; if ( v13 )
--- a/mm7_2.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_2.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -13005,7 +13005,7 @@ hKey = 0; phkResult = 0; cbData = 4; - if ( !RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, 0x2001Fu, &hKey) ) + if ( !RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE", 0, KEY_READ|KEY_WOW64_32KEY, &hKey) )// for 64 bit { if ( !RegCreateKeyExA(hKey, "New World Computing", 0, "", 0, 0xF003Fu, 0, &phkResult, &dwDisposition) ) {
--- a/mm7_3.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_3.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -5039,7 +5039,7 @@ pAutonoteTXT_Raw = 0; pAutonoteTXT_Raw = (char *)pEvents_LOD->LoadRaw("autonote.txt", 0); strtok(pAutonoteTXT_Raw, "\r"); - v0 = (char *)&stru_723720[0].eType; + v0 = (char *)&pAutonoteTxt[0].eType; for (uint i = 0; i < 195; ++i) { v1 = 0; @@ -13926,9 +13926,7 @@ { //v16 = (uint *)&pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[uZb]]; auto pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]]; - pRenderer->Line2D( - uCenterX - + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom + pRenderer->Line2D(uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16), uCenterY @@ -13999,9 +13997,7 @@ } v35 = v57; LABEL_66: - pRenderer->DrawTextureTransparent( - uCenterX - 3, - uCenterY - 3, + pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, (Texture *)(pTextureIDs_pMapDirs[v35] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v35]] : 0)); v36 = 255; flagsb = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0xFFu); @@ -14168,17 +14164,11 @@ while ( uZg < (signed int)uNumLevelDecorations ); v33 = 0; } - pRenderer->DrawTextureTransparent( - 0x1D4u, - v33, - (Texture *)(dword_5079D8 != -1 ? &pIcons_LOD->pTextures[dword_5079D8] : 0)); + pRenderer->DrawTextureTransparent(0x1D4u, v33, (Texture *)(dword_5079D8 != -1 ? &pIcons_LOD->pTextures[dword_5079D8] : 0)); uZooma = (double)pParty->sRotationY * 0.1171875; v50 = uZooma + 6.7553994e15; pRenderer->Clip(0x21Du, v33, 0x237u, 0x1E0u); - pRenderer->DrawTextureIndexed( - LODWORD(v50) + 285, - 0x88u, - (Texture *)(dword_5079B4 != -1 ? &pIcons_LOD->pTextures[dword_5079B4] : 0)); + pRenderer->DrawTextureIndexed(LODWORD(v50) + 285, 0x88u, (Texture *)(dword_5079B4 != -1 ? &pIcons_LOD->pTextures[dword_5079B4] : 0)); pRenderer->ResetClip(); } @@ -18154,14 +18144,14 @@ ptr_507BC0->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0); } goto LABEL_291; - default: - goto LABEL_291; case EVENT_PressAnyKey: v121 = 33; v105 = v122 + 1; goto LABEL_295; case EVENT_Exit: goto LABEL_301; + default: + goto LABEL_291; } } //++v4; @@ -18618,7 +18608,7 @@ v8 = (v9 & 0x7E900) + 86400; } } - v10 = __PAIR__(v7, *((int *)v4 - 3)) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335); + v10 = v7 + *((int *)v4 - 3) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335);//v10 = __PAIR__(v7, *((int *)v4 - 3)) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335); *((int *)v4 - 3) = v10; *((int *)v4 - 2) = HIDWORD(v10); if ( HIDWORD(v10) <= v3 && (HIDWORD(v10) < v3 || *((int *)v4 - 3) < v2) ) @@ -18679,7 +18669,7 @@ unsigned int v10; // eax@1 size_t v11; // ebx@2 signed int v12; // esi@2 - char *v13;//Actor_uYawAngle_cr *v13; // ebx@3 + Actor *pActor;//Actor_uYawAngle_cr *v13; // ebx@3 AIDirection a3; // [sp+Ch] [bp-50h]@2 AIDirection v15; // [sp+28h] [bp-34h]@2 //SpawnPointMM7 v16; // [sp+44h] [bp-18h]@1 @@ -18706,16 +18696,13 @@ v12 = v11; if ( (signed int)v11 < (signed int)uNumActors ) { - v13 = (char *)&pActors[v11].uYawAngle; - do - { - ((Actor *)((char *)v13 - 154))->PrepareSprites(0); + for ( pActor = &pActors[v11]; v12 < (signed int)uNumActors; ++pActor ) + { + pActor->PrepareSprites(0); ++v12; - *(short *)v13/*->uYawAngle*/ = LOWORD(v15.uYawAngle); - *(int *)(v13+666)/*->dword_000334_unique_name*/ = uUniqueName; - ++v13; - } - while ( v12 < (signed int)uNumActors ); + pActor->uYawAngle = v15.uYawAngle; + pActor->dword_000334_unique_name = uUniqueName; + } } } }
--- a/mm7_4.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_4.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -2908,7 +2908,7 @@ char *v3; // esi@5 char *v4; // [sp+10h] [bp-4h]@1 - pIcons_LOD->dword_011BA0 = pIcons_LOD->uNumLoadedFiles; + pIcons_LOD->pFacesLock = pIcons_LOD->uNumLoadedFiles; for (uint i = 0; i < 4; ++i) for (uint j = 0; j < 56; ++j) @@ -3017,7 +3017,7 @@ } while ( (signed int)v0 < (signed int)pParty->pHirelings ); v6 = pIcons_LOD->uNumLoadedFiles - 1; - if ( v6 >= pIcons_LOD->dword_011BA0 ) + if ( v6 >= pIcons_LOD->pFacesLock ) { v7 = &pIcons_LOD->pTextures[v6]; do @@ -3046,10 +3046,10 @@ --v6; --v7; } - while ( v6 >= pIcons_LOD->dword_011BA0 ); - } - v12 = pIcons_LOD->dword_011BA0; - pIcons_LOD->dword_011BA0 = 0; + while ( v6 >= pIcons_LOD->pFacesLock ); + } + v12 = pIcons_LOD->pFacesLock; + pIcons_LOD->pFacesLock = 0; pIcons_LOD->uNumLoadedFiles = v12; } // 4ED498: using guessed type char byte_4ED498; @@ -3192,7 +3192,6 @@ if (pPlayer->Eradicated()) { pFace = pTexture_PlayerFaceEradicated; -LABEL_27: pPortrait = pFace; v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i]; if ( pParty->pPartyBuffs[11].uExpireTime ) @@ -3208,12 +3207,27 @@ v13 = pPlayer->pPlayerBuffs[13].uExpireTime > 0; if ( v13 | v12 | v11 | _v1 | v10 ) sub_441A4E(i); - goto LABEL_50; + continue; } if (pPlayer->Dead()) { pFace = pTexture_PlayerFaceDead; - goto LABEL_27; + pPortrait = pFace; + v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i]; + if ( pParty->pPartyBuffs[11].uExpireTime ) + pRenderer->_4A6E7E(v9, 0x183u, pPortrait); + else + pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, pPortrait); + auto _v1 = 0; + v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0; + if (pPlayer->pPlayerBuffs[1].uExpireTime > 0) + _v1 = 1; + v11 = pPlayer->pPlayerBuffs[8].uExpireTime > 0; + v12 = pPlayer->pPlayerBuffs[7].uExpireTime > 0; + v13 = pPlayer->pPlayerBuffs[13].uExpireTime > 0; + if ( v13 | v12 | v11 | _v1 | v10 ) + sub_441A4E(i); + continue; } v7 = 0; for (uint j = 0; j < pPlayerFrameTable->uNumFrames; ++j) @@ -3231,11 +3245,24 @@ if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 ) { pPlayer->field_1AA2 = pFrame->uTextureID - 1; - pFace = (Texture *)pTextures_PlayerFaces[i][pFrame->uTextureID]; - goto LABEL_27; - } -LABEL_50: - ; + pFace = (Texture *)pTextures_PlayerFaces[i][pPlayer->field_1AA2]; + pPortrait = pFace; + v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i]; + if ( pParty->pPartyBuffs[11].uExpireTime ) + pRenderer->_4A6E7E(v9, 0x183u, pPortrait); + else + pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, pPortrait); + auto _v1 = 0; + v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0; + if (pPlayer->pPlayerBuffs[1].uExpireTime > 0) + _v1 = 1; + v11 = pPlayer->pPlayerBuffs[8].uExpireTime > 0; + v12 = pPlayer->pPlayerBuffs[7].uExpireTime > 0; + v13 = pPlayer->pPlayerBuffs[13].uExpireTime > 0; + if ( v13 | v12 | v11 | _v1 | v10 ) + sub_441A4E(i); + continue; + } } if ( pParty->bTurnBasedModeOn == 1 ) {
--- a/mm7_5.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_5.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -546,8 +546,8 @@ else { pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); - if ( strcmp((const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pGlobalTXT_LocalizationStrings[72]) )// "Empty" - strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot); + if ( strcmp((const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], pGlobalTXT_LocalizationStrings[72]) )// "Empty" + strcpy((char *)pKeyActionMap->pPressedKeysBuffer, (const char *)&pSavegameHeader[uLoadGameUI_SelectedSlot]); pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); } continue; @@ -1208,6 +1208,7 @@ else { if ( pCurrentScreen >= 14 || pCurrentScreen == 4 || pCurrentScreen == 10 ) + { //goto LABEL_229; if ( dword_50CDC8 ) goto LABEL_232; @@ -1215,6 +1216,7 @@ //goto LABEL_231; uMessageParam = v0; goto LABEL_232; + } if ( pCurrentScreen == 13 && !dword_50CDC8 && !dword_5C35C8 ) { CloseWindowBackground(); @@ -3312,7 +3314,7 @@ pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101; sub_4196A0(); sub_419379(); - sub_419401(); + CharacterUI_SkillScreen_Draw(); pButton = pCharacterScreen_SkillsBtn; //goto LABEL_716; v163 = 0; @@ -5649,9 +5651,9 @@ int v40; // eax@77 int v41; // eax@77 int v42; // eax@78 - char *v43; // eax@81 + Player *v43; // eax@81 Actor *v44; // esi@82 - char *v45; // edi@84 + Player *v45; // edi@84 unsigned __int16 v46; // ax@84 int v47; // ebx@105 int v48; // eax@107 @@ -5898,18 +5900,18 @@ v44 = &pActors[v39]; if ( a4 == -1 ) a4 = stru_50C198.which_player_would_attack(v44); - v45 = (char *)&pParty->pPlayers[a4]; + v45 = &pParty->pPlayers[a4]; v77 = Actor::_43B3E0_CalcDamage(v44, v74); v46 = v37->uItemType; if ( v37->uItemType == 545 ) { - LOBYTE(v51) = ((Player *)v45)->GetActualSkillLevel(PLAYER_SKILL_UNARMED); + LOBYTE(v51) = v45->GetActualSkillLevel(PLAYER_SKILL_UNARMED); v52 = v51; if ( (signed int)SkillToMastery(v51) >= 4 && rand() % 100 < (v52 & 0x3F) ) { - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45 + 168); + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45->pName); ShowStatusBarString(pTmpBuf, 2u); - ((Player *)v45)->PlaySound(6, 0); + v45->PlaySound(6, 0); return; } } @@ -5927,29 +5929,29 @@ && v46 != 540 ) goto LABEL_115; } - if ( !stru_50C198.ActorHitOrMiss(v44, (Player *)v45) ) + if ( !stru_50C198.ActorHitOrMiss(v44, v45) ) return; - if ( *((_QWORD *)v45 + 782) > 0i64 ) + if ( (signed __int64)v45->pPlayerBuffs[13].uExpireTime > 0 ) v77 >>= 1; - if ( ((Player *)v45)->HasEnchantedItemEquipped(36) ) + if ( v45->HasEnchantedItemEquipped(36) ) v77 >>= 1; - if ( ((Player *)v45)->HasEnchantedItemEquipped(69) ) + if ( v45->HasEnchantedItemEquipped(69) ) v77 >>= 1; - if ( ((Player *)v45)->HasItemEquipped(EQUIP_ARMOUR) - && *(int *)&v45[36 * *((int *)v45 + 1621) + 496] == 504 ) + if ( v45->HasItemEquipped(EQUIP_ARMOUR) + && *(_DWORD *)&v45->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v45->pEquipment.uBody + 5] == 504 ) v77 >>= 1; v75 = 0; - v47 = (int)(v45 + 6472); + v47 = (int)&v45->pEquipment; do { - if ( ((Player *)v45)->HasItemEquipped((ITEM_EQUIP_TYPE)v75) ) + if ( v45->HasItemEquipped((ITEM_EQUIP_TYPE)v75) ) { v48 = *(int *)&v45[36 * *(int *)v47 + 496]; if ( v48 == 520 ) v77 >>= 1; if ( v48 == 531 ) v77 >>= 1; - if ( ((Player *)v45)->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(*((short *)v45 + 140)) == 4 ) + if ( v45->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(v45->pActiveSkills[8]) == 4 ) v77 >>= 1; } ++v75; @@ -5988,10 +5990,10 @@ LABEL_133: if ( !(dword_6BE368_debug_settings_2 & 0x10) ) { - v54 = ((Player *)v45)->ReceiveDamage(v77, v50); - if ( *((int *)v45 + 1553) >= 0 ) - { - if ( *((int *)v45 + 1553) > 0 || *((int *)v45 + 1552) ) + v54 = v45->ReceiveDamage(v77, v50); + if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) >= 0 ) + { + if ( SHIDWORD(v45->pPlayerBuffs[10].uExpireTime) > 0 || LODWORD(v45->pPlayerBuffs[10].uExpireTime) ) { v55 = v44->uAIState; if ( v55 != 5 ) @@ -6038,7 +6040,7 @@ v64 = 51; if ( rand() % 100 < 20 ) v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1; - ((Player *)v45)->PlaySound(v64, 0); + v45->PlaySound(v64, 0); } } } @@ -6050,14 +6052,14 @@ && !(dword_6BE368_debug_settings_2 & 0x10) && v44->pMonsterInfo.uSpecialAttack && rand() % 100 < v44->pMonsterInfo.uLevel * v44->pMonsterInfo.uSpecialAttackType ) - ((Player *)v45)->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44); + v45->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44); if ( !pParty->bTurnBasedModeOn ) { - v65 = ((Player *)v45)->GetActualEndurance(); - v66 = (double)(20 - ((Player *)v45)->_48EA1B_get_static_effect(v65)) + v65 = v45->GetActualEndurance(); + v66 = (double)(20 - v45->_48EA1B_get_static_effect(v65)) * flt_6BE3A4_debug_recmod1 * 2.133333333333333; - ((Player *)v45)->SetRecoveryTime((signed __int64)v66); + v45->SetRecoveryTime((signed __int64)v66); } return; } @@ -6071,12 +6073,12 @@ LABEL_80: if ( a4 != -1 ) { - v43 = (char *)&pParty->pPlayers[a4]; + v43 = &pParty->pPlayers[a4]; LABEL_168: - a4b = (Player *)v43; + a4b = v43; if ( v38 != 4 || v37->field_48 != 100 ) { - v70 = ((Player *)v43)->GetMaxHealth(); + v70 = v43->GetMaxHealth(); v68 = _43AFE3_calc_spell_damage(v37->field_48, v37->field_4C, v37->field_50, v70); v69 = LOBYTE(pSpellStats->pInfos[v37->field_48].uSchool); } @@ -6108,7 +6110,7 @@ while ( a4a <= 4 ); if ( v74 ) { - v43 = &stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552]; + v43 = &pParty->pPlayers[*(&v72+rand()%v74)-1];//&stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552]; goto LABEL_168; } } @@ -17376,7 +17378,7 @@ int v137; // [sp+1Ch] [bp-4h]@27 int v138; // [sp+1Ch] [bp-4h]@33 - pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552]; + pPlayer = &pParty->pPlayers[uPlayerID-1];//(Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552]; v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE); pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0)); v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); @@ -17395,7 +17397,7 @@ v7 = pPlayer->GetBaseStrength(); v8 = pPlayer->GetActualMight(); v9 = UI_GetHealthManaStringColor(v8, v7); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v6, v5); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0); v10 = LOBYTE(pFontArrus->uFontHeight) + 51; v11 = pPlayer->GetBaseIntelligence(); @@ -17403,7 +17405,7 @@ v13 = pPlayer->GetBaseIntelligence(); v14 = pPlayer->GetActualIntelligence(); v15 = UI_GetHealthManaStringColor(v14, v13); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v12, v11); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0); v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2; v17 = pPlayer->GetBaseWillpower(); @@ -17411,7 +17413,7 @@ v19 = pPlayer->GetBaseWillpower(); v20 = pPlayer->GetActualWillpower(); v21 = UI_GetHealthManaStringColor(v20, v19); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v18, v17); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0); v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2; v23 = pPlayer->GetBaseEndurance(); @@ -17419,7 +17421,7 @@ v25 = pPlayer->GetBaseEndurance(); v26 = pPlayer->GetActualEndurance(); v27 = UI_GetHealthManaStringColor(v26, v25); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v24, v23); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0); v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2; v29 = pPlayer->GetBaseAccuracy(); @@ -17427,7 +17429,7 @@ v31 = pPlayer->GetBaseAccuracy(); v32 = pPlayer->GetActualAccuracy(); v33 = UI_GetHealthManaStringColor(v32, v31); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v30, v29); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0); v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2; v35 = pPlayer->GetBaseSpeed(); @@ -17435,7 +17437,7 @@ v37 = pPlayer->GetBaseSpeed(); v38 = pPlayer->GetActualSpeed(); v39 = UI_GetHealthManaStringColor(v38, v37); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v36, v35); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0); v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2; v41 = pPlayer->GetBaseLuck(); @@ -17443,22 +17445,22 @@ v43 = pPlayer->GetBaseLuck(); v44 = pPlayer->GetActualLuck(); v45 = UI_GetHealthManaStringColor(v44, v43); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v42, v41); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0); - a2 = "%s"; + a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n"; v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5; if ( pPlayer->GetMaxHealth() >= 1000 ) - a2 = (const char *)&unk_4E2EB8; + a2 = "%s\f%05u\r388%d\f00000 / %d\n"; v47 = pPlayer->GetMaxHealth(); v48 = pPlayer->sHealth; v49 = pPlayer->GetMaxHealth(); v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49); sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0); - a2a = "%s"; + a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n"; uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2; if ( pPlayer->GetMaxMana() >= 1000 ) - a2a = (const char *)&unk_4E2EB8; + a2a = "%s\f%05u\r388%d\f00000 / %d\n"; v51 = pPlayer->GetMaxMana(); v52 = pPlayer->sMana; v53 = pPlayer->GetMaxMana(); @@ -17471,13 +17473,13 @@ v58 = pPlayer->GetBaseAC(); v59 = pPlayer->GetActualAC(); v60 = UI_GetHealthManaStringColor(v59, v58); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56); + sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v57, v56); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0); v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2; v62 = pPlayer->GetMajorConditionIdx(); v63 = aCharacterConditionNames[v62]; v64 = GetConditionDrawColor(v62); - sprintf(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[47], v64, v63); + sprintf(pTmpBuf, "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, v63); pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0); v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1; v66 = pPlayer->uQuickSpell; @@ -17492,9 +17494,9 @@ v70 = pPlayer->GetBaseAge(); v71 = pPlayer->GetActualAge(); v72 = UI_GetHealthManaStringColor(v71, v70); - sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68); + sprintf(pTmpBuf, "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v69, v68); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0); - a2b = "%s"; + a2b = "%s\f%05u\t100%d\f00000 / %d\n"; uYa = LOBYTE(pFontArrus->uFontHeight) + 48; if ( pPlayer->GetBaseLevel() > 99 ) a2b = format_4E2E68; @@ -17513,7 +17515,7 @@ v79 = LODWORD(pPlayer->uExperience); v80 = v78; v81 = pPlayer->GetExperienceDisplayColor(); - sprintf(pTmpBuf, "%s\r180", v80, v81, v79); + sprintf(pTmpBuf, "%s\r180\f%05d%lu\f00000\n\n", v80, v81, v79); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0); v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight); v83 = pPlayer->GetActualAttack(0); @@ -17787,7 +17789,7 @@ //----- (00419401) -------------------------------------------------------- -void __cdecl sub_419401() +void __cdecl CharacterUI_SkillScreen_Draw() { unsigned int v0; // ecx@3 GUIButton *pButton; // eax@3 @@ -17803,11 +17805,11 @@ int a2; // [sp+10h] [bp-14h]@1 int v12; // [sp+14h] [bp-10h]@8 int v13; // [sp+14h] [bp-10h]@19 - unsigned int *v14; // [sp+18h] [bp-Ch]@8 - unsigned int *v15; // [sp+18h] [bp-Ch]@14 - unsigned int *v16; // [sp+18h] [bp-Ch]@19 - unsigned int *v17; // [sp+18h] [bp-Ch]@25 - char *v18; // [sp+1Ch] [bp-8h]@8 + int *v14; // [sp+18h] [bp-Ch]@8 + int *v15; // [sp+18h] [bp-Ch]@14 + int *v16; // [sp+18h] [bp-Ch]@19 + int *v17; // [sp+18h] [bp-Ch]@25 + Player *v18; // [sp+1Ch] [bp-8h]@8 int a5; // [sp+20h] [bp-4h]@8 a2 = 0; @@ -17832,13 +17834,13 @@ } v12 = 0; a5 = pGUIWindow_CurrentMenu->uNumControls; - v18 = &stru_AA1058[3].pSounds[6972 * v0 + 40552]; + v18 = &pParty->pPlayers[v0-1]; //&stru_AA1058[3].pSounds[6972 * v0 + 40552]; v2 = pFontLucida; - v14 = (unsigned int *)dword_4E2A2C; + v14 = dword_4E2A2C; v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13; do { - if ( v18[2 * *v14 + 264] & 0x3F )//crash + if ( v18->pActiveSkills[*v14] & 0x3F )//crash { v4 = LOBYTE(v2->uFontHeight); v3 = v3 + v4 - 3; @@ -17849,14 +17851,14 @@ } ++v14; } - while ( (signed int)v14 < (signed int)dword_4E2A50 ); + while ( v14 <= &dword_4E2A2C[8] ); if ( !v12 ) v3 = v3 + LOBYTE(v2->uFontHeight) - 3; - v15 = (unsigned int *)_4E2A80_skills; + v15 = _4E2A80_skills; v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6; do { - if ( v18[2 * *v15 + 264] & 0x3F && a2 < 15 ) + if ( v18->pActiveSkills[*v15] & 0x3F && a2 < 15 ) { v6 = LOBYTE(v2->uFontHeight); v5 = v5 + v6 - 3; @@ -17866,13 +17868,13 @@ } ++v15; } - while ( (signed int)v15 < (signed int)pAwardsTextColors ); + while ( v15 <= &_4E2A80_skills[8] ); v13 = 0; - v16 = (unsigned int *)dword_4E2A18; + v16 = pArmorSkills; v7 = 2 * LOBYTE(v2->uFontHeight) + 13; do { - if ( v18[2 * *v16 + 264] & 0x3F ) + if ( v18->pActiveSkills[*v16] & 0x3F ) { v8 = LOBYTE(v2->uFontHeight); v7 = v7 + v8 - 3; @@ -17883,14 +17885,14 @@ } ++v16; } - while ( (signed int)v16 < (signed int)dword_4E2A2C ); + while ( v16 <= &pArmorSkills[4] ); if ( !v13 ) v7 = v7 + LOBYTE(v2->uFontHeight) - 3; - v17 = (unsigned int *)dword_4E2A50; + v17 = dword_4E2A50; v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6; do { - if ( v18[2 * *v17 + 264] & 0x3F ) + if ( v18->pActiveSkills[*v17] & 0x3F ) { v10 = LOBYTE(v2->uFontHeight); v9 = v9 + v10 - 3; @@ -17900,7 +17902,7 @@ } ++v17; } - while ( (signed int)v17 < (signed int)_4E2A80_skills ); + while ( v17 <= &dword_4E2A50[11] ); if ( a2 ) pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5); } \ No newline at end of file
--- a/mm7_6.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_6.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -7856,8 +7856,8 @@ v0 = uActiveCharacter; v27 = 6972 * uActiveCharacter; - v1 = (Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552]; - result = ((Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552])->CanAct(); + v1 = &pParty->pPlayers[uActiveCharacter-1];//(Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552]; + result = pParty->pPlayers[uActiveCharacter-1].CanAct();//((Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552])->CanAct(); if ( result ) { pStru277->_427D48(v0);
--- a/mm7_data.cpp Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_data.cpp Mon Jan 21 09:19:28 2013 +0600 @@ -67,7 +67,7 @@ stru287 stru_5E4C50; #include "Autonotes.h" -Autonote stru_723720[195]; // weak +Autonote pAutonoteTxt[195]; // weak #include "Awards.h" Award pAwards[104]; @@ -478,10 +478,10 @@ __int16 RightClickPortraitXmin[4]; __int16 RightClickPortraitXmax[4]; void *off_4E2A12; // weak -int dword_4E2A18[5]; -int dword_4E2A2C[9]; -int dword_4E2A50[12]; -int _4E2A80_skills[9]; +int pArmorSkills[5]={ 9, 10, 11, 8, 30}; +int dword_4E2A2C[9]={3, 5, 2, 6, 4, 0, 1, 31, 7}; +int dword_4E2A50[12]={35, 33, 24, 21, 32, 36, 29, 25, 22, 26, 23, 34}; +int _4E2A80_skills[9]={12, 13, 14, 15, 16, 17, 18, 19, 20}; unsigned __int8 pAwardsTextColors[20]; unsigned int pHealthBarPos[4] = {22, 137, 251, 366}; unsigned int pManaBarPos[4] = {102, 217, 331, 447}; @@ -543,7 +543,6 @@ char aS_6[2]; // idb char aSS_0[777]; // idb char aS_5[4]; // idb -_UNKNOWN unk_4E2EB8; // weak char string_4E3294[8]; char Format[777]; // idb char aMem03i_txt[777]; // idb
--- a/mm7_data.h Mon Jan 21 09:19:13 2013 +0600 +++ b/mm7_data.h Mon Jan 21 09:19:28 2013 +0600 @@ -464,7 +464,7 @@ extern __int16 RightClickPortraitXmin[4]; extern __int16 RightClickPortraitXmax[4]; extern void *off_4E2A12; // weak -extern int dword_4E2A18[5]; +extern int pArmorSkills[5]; extern int dword_4E2A2C[9]; extern int dword_4E2A50[12]; extern int _4E2A80_skills[9]; @@ -529,7 +529,6 @@ extern char aS_6[2]; // idb extern char aSS_0[]; // idb extern char aS_5[4]; // idb -extern _UNKNOWN unk_4E2EB8; // weak extern char string_4E3294[8]; extern char Format[]; // idb extern char aMem03i_txt[]; // idb @@ -1860,7 +1859,7 @@ int __cdecl sub_419100(); void __cdecl sub_419220(); void __cdecl sub_419379(); -void __cdecl sub_419401(); +void __cdecl CharacterUI_SkillScreen_Draw(); void __cdecl sub_4196A0(); char __fastcall CharacterUI_SkillsTab_Draw(unsigned int uPlayerID); // idb unsigned int __fastcall CharacterUI_AwardsTab_Draw(unsigned int uPlayerID); // idb