Mercurial > mm7
changeset 2392:22cbc67a619e
Слияние
author | Ritor1 |
---|---|
date | Fri, 04 Jul 2014 09:26:50 +0600 |
parents | 5d866ee28376 (current diff) c631b1877204 (diff) |
children | a29d9609f9b2 |
files | Indoor.cpp |
diffstat | 12 files changed, 82 insertions(+), 130 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/GUIWindow.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -1870,8 +1870,8 @@ if ( ptr_507BD0->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) { ptr_507BD0->DrawMessageBox(0); - ptr_507BD0->DrawText(pFontCreate, 30, 40, v27, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); - v31 = pFontCreate->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer); + ptr_507BD0->DrawText(pFontCreate, 30, 40, v27, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); + v31 = pFontCreate->GetLineWidth(pKeyActionMap->pPressedKeysBuffer); ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, pFontCreate); continue; } @@ -1897,7 +1897,7 @@ { pWindow->DrawMessageBox(0); pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); - pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); + pWindow->DrawText(pFontLucida, 10, 40, 0, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); if ( !pKeyActionMap->field_204 ) { ItemGen2.Reset(); @@ -1905,7 +1905,7 @@ pEventTimer->Resume(); pCurrentScreen = 0; viewparams->bRedrawGameUI = true; - v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); + v26 = atoi(pKeyActionMap->pPressedKeysBuffer); if ( v26 > 0 ) { if ( v26 < 800 ) @@ -2088,7 +2088,7 @@ { pWindow->DrawMessageBox(0); pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0); - pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); + pWindow->DrawText(pFontLucida, 10, 40, 0, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0); if ( !pKeyActionMap->field_204 ) { ItemGen2.Reset(); @@ -2096,7 +2096,7 @@ pEventTimer->Resume(); pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; - v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); + v39 = atoi(pKeyActionMap->pPressedKeysBuffer); if ( v39 > 0 ) { if ( v39 < 800 )
--- a/Game.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/Game.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -1513,9 +1513,9 @@ else { pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); - 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); + if ( strcmp(pSavegameHeader[uLoadGameUI_SelectedSlot].pName, pGlobalTXT_LocalizationStrings[72]) )// "Empty" + strcpy(pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName); + pKeyActionMap->uNumKeysPressed = strlen(pKeyActionMap->pPressedKeysBuffer); } continue; case UIMSG_LoadGame: @@ -1530,7 +1530,7 @@ if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_IN_PROGRESS) { pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_NONE); - strcpy((char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], (const char *)pKeyActionMap->pPressedKeysBuffer); + strcpy((char *)&pSavegameHeader[uLoadGameUI_SelectedSlot], pKeyActionMap->pPressedKeysBuffer); } DoSavegame(uLoadGameUI_SelectedSlot); stru_506E40.Release(); @@ -3068,7 +3068,7 @@ continue; for ( thisg = 0; thisg < (signed int)pGames_LOD->uNumSubDirs / 2; ++thisg ) { - if ( !_stricmp((const char *)pGames_LOD->pSubIndices[thisg].pFilename, pCurrentMapName) ) + if ( !_stricmp(pGames_LOD->pSubIndices[thisg].pFilename, pCurrentMapName) ) pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID = thisg; } } @@ -3269,7 +3269,7 @@ case UIMSG_DD: __debugbreak(); sprintf(pTmpBuf.data(), "%s", pKeyActionMap->pPressedKeysBuffer); - memcpy(&v216, txt_file_frametable_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); + memcpy(&v216, txt_file_frametable_parser(pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); if ( v216.uPropCount == 1 ) { pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubDirs / 2); @@ -3284,7 +3284,7 @@ thish = 0; do { - if ( !_stricmp((const char *)&pGames_LOD->pSubIndices[thish], Str2) ) + if ( !_stricmp(pGames_LOD->pSubIndices[thish].pFilename, Str2) ) break; ++thish; pNPCData3 = (NPCData *)((char *)pNPCData3 + 1); @@ -3292,7 +3292,7 @@ while ( (signed int)pNPCData3 < (signed int)pNPCData4 ); if ( (signed int)pNPCData3 < (signed int)pNPCData4 ) { - strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]); + strcpy(pCurrentMapName, pGames_LOD->pSubIndices[(int)pNPCData3].pFilename); dword_6BE364_game_settings_1 |= GAME_SETTINGS_0001; uGameState = GAME_STATE_CHANGE_LOCATION; OnMapLeave(); @@ -4431,8 +4431,8 @@ { //typing in the line pKeyActionMap->EnterText(0, 19, pGUIWindow_CurrentMenu); - strcpy((char *)pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName); - pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer); + strcpy(pKeyActionMap->pPressedKeysBuffer, pSavegameHeader[uLoadGameUI_SelectedSlot].pName); + pKeyActionMap->uNumKeysPressed = strlen(pKeyActionMap->pPressedKeysBuffer); } break; case UIMSG_SaveLoadBtn:
--- a/Indoor.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/Indoor.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -4139,7 +4139,7 @@ this->viewing_angle_from_north_south, this->field_8_party_dir_z); } //----- (00407A1C) -------------------------------------------------------- -bool __fastcall sub_407A1C(int x, int z, int y, Vec3_int_ v) +bool __fastcall sub_407A1C(int x, int y, int z, Vec3_int_ v) { unsigned int v4; // esi@1 int dist_y; // edi@2 @@ -4152,18 +4152,15 @@ int v18; // ST38_4@25 int v19; // eax@25 char v20; // zf@25 - int v21; // ebx@25 + signed int v21; // ebx@25 signed int v23; // edi@26 int v24; // ST34_4@30 - Vec3_int_ v27; // ST08_12@37 - Vec3_int_ v28; // ST08_12@37 signed int v32; // ecx@37 int v33; // eax@37 int v35; // eax@39 ODMFace *odm_face; // esi@54 - int v40; // ebx@60 + signed int v40; // ebx@60 signed int v42; // edi@61 - Vec3_int_ v45; // ST08_12@73 signed int v49; // ecx@73 int v50; // eax@73 int v51; // edx@75 @@ -4174,32 +4171,24 @@ int v63; // ST34_4@98 int v64; // ST30_4@98 int v65; // eax@98 - int v66; // ebx@98 + signed int v66; // ebx@98 signed int v68; // edi@99 int v69; // ST2C_4@103 - Vec3_int_ v72; // ST08_12@111 signed int v77; // ecx@111 int v78; // eax@111 int v79; // edx@113 int v80; // ecx@113 int v81; // eax@113 int v87; // ecx@128 - int v91; // ebx@136 + signed int v91; // ebx@136 signed int v93; // edi@137 Vec3_int_ v97; // [sp-18h] [bp-94h]@1 - int v98; // [sp-Ch] [bp-88h]@88 - int v99; // [sp-Ch] [bp-88h]@126 - int v100; // [sp-8h] [bp-84h]@88 - int v101; // [sp-8h] [bp-84h]@126 - int v102; // [sp-4h] [bp-80h]@88 - int v103; // [sp-4h] [bp-80h]@126 int v107; // [sp+10h] [bp-6Ch]@98 int v108; // [sp+10h] [bp-6Ch]@104 int v109; // [sp+18h] [bp-64h]@25 int v110; // [sp+18h] [bp-64h]@31 signed int v113; // [sp+20h] [bp-5Ch]@1 signed int v114; // [sp+24h] [bp-58h]@1 - unsigned int a4_8; // [sp+30h] [bp-4Ch]@1 int v119; // [sp+34h] [bp-48h]@75 int v120; // [sp+34h] [bp-48h]@113 int v121; // [sp+38h] [bp-44h]@4 @@ -4257,20 +4246,19 @@ //__debugbreak(); - v4 = stru_5C6E00->Atan2(v.x - x, v.y - z); + v4 = stru_5C6E00->Atan2(v.x - x, v.y - y); + + v113 = 0; v114 = 0; - v97.z = y; + + v97.z = z; v97.x = x; - v97.y = z; - v113 = 0; - a4_8 = stru_5C6E00->Atan2(v.x - x, v.y - z); + v97.y = y; + if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) { Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &sX, &sY, &sZ); - v45.z = v.z; - v45.x = v.x; - v45.y = v.y; - Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &outz); + Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v, &outx, &outy, &outz); dist_y = outy - sY; dist_z = outz - sZ; dist_x = outx - sX; @@ -4296,17 +4284,12 @@ { if ( a5b ) { - v102 = sZ; - v100 = sY; - v98 = sX; + v59 = pIndoor->GetSector(sX, sY, sZ); } else { - v102 = outz; - v100 = outy; - v98 = outx; + v59 = pIndoor->GetSector(outx, outy, outz); } - v59 = pIndoor->GetSector(v98, v100, v102); //v60 = pIndoor->pSectors; //v61 = 116 * v59; //i = 116 * v59; @@ -4318,14 +4301,14 @@ v63 = fixpoint_mul(v143, face->pFacePlane_old.vNormal.x); v64 = fixpoint_mul(v53, face->pFacePlane_old.vNormal.z); v65 = fixpoint_mul(v52, face->pFacePlane_old.vNormal.y); - v20 = v63 + v64 + v65; + v20 = v63 + v64 + v65 == 0; v66 = v63 + v64 + v65; v107 = v63 + v64 + v65; if ( face->Portal() || v119 > face->pBounding.x2 || v123 < face->pBounding.x1 || v127 > face->pBounding.y2 || v131 < face->pBounding.y1 || v135 > face->pBounding.z2 || v139 < face->pBounding.z1 - || !v20 ) + || v20 ) continue; v68 = -(face->pFacePlane_old.dist + sX * face->pFacePlane_old.vNormal.x + sY * face->pFacePlane_old.vNormal.y @@ -4369,11 +4352,8 @@ } } - v72.z = y; - v72.x = x; - v72.y = z; - Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v72, &sX, &sY, &sZ); - Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v, &outx, &outy, &outz); + Vec3_int_::Rotate(32, v4 - stru_5C6E00->uIntegerHalfPi, 0, v97, &sX, &sY, &sZ); + Vec3_int_::Rotate(32, v4 - stru_5C6E00->uIntegerHalfPi, 0, v, &outx, &outy, &outz); dist_y = outy - sY; dist_z = outz - sZ; dist_x = outx - sX; @@ -4401,41 +4381,27 @@ return !v114 || !v113; if ( a5c ) { - v103 = sZ; - v101 = sY; - v99 = sX; + v87 = pIndoor->GetSector(sX, sY, sZ); } else { - v103 = outz; - v101 = outy; - v99 = outx; + v87 = pIndoor->GetSector(outx, outy, outz); } - v87 = pIndoor->GetSector(v99, v101, v103); - //v88 = pIndoor->pSectors; - //v89 = 116 * v87; - - //v112 = v89; - //if ( *(__int16 *)((char *)&pIndoor->pSectors->uNumWalls + v89) - //+ 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v89) > 0 ) - //{ - //while ( 1 ) for ( v162 = 0; v162 < pIndoor->pSectors[v87].uNumFaces; v162++) { face = &pIndoor->pFaces[pIndoor->pSectors[v87].pFaceIDs[v162]]; yb = fixpoint_mul(v144, face->pFacePlane_old.vNormal.x); v_4b = fixpoint_mul(v80, face->pFacePlane_old.vNormal.y); vf = fixpoint_mul(v81, face->pFacePlane_old.vNormal.z); - v20 = yb + vf + v_4b; + v20 = yb + vf + v_4b == 0; v91 = yb + vf + v_4b; vc = yb + vf + v_4b; if ( face->Portal() || v120 > face->pBounding.x2 || v124 < face->pBounding.x1 || v128 > face->pBounding.y2 || v132 < face->pBounding.y1 || v136 > face->pBounding.z2 || v140 < face->pBounding.z1 - || !v20 ) + || v20 ) continue; - //v92 = sZ * face->pFacePlane_old.vNormal.z; v93 = -(face->pFacePlane_old.dist + sX * face->pFacePlane_old.vNormal.x + sY * face->pFacePlane_old.vNormal.y + sZ * face->pFacePlane_old.vNormal.z); @@ -4458,10 +4424,6 @@ + sZ * face->pFacePlane_old.vNormal.z)) >> 14; if ( v_4c <= abs(v91) ) { - //LODWORD(v94) = v93 << 16; - //HIDWORD(v94) = v93 >> 16; - //v95 = v94 / vc; - //vd = v94 / vc; vd = fixpoint_div(v93, vc); if ( vd >= 0 ) { @@ -4513,13 +4475,13 @@ v17 = fixpoint_mul(v125, odm_face->pFacePlane.vNormal.x); v18 = fixpoint_mul(v121, odm_face->pFacePlane.vNormal.y); v19 = fixpoint_mul(v12, odm_face->pFacePlane.vNormal.z); - v20 = v17 + v18 + v19; + v20 = v17 + v18 + v19 == 0; v21 = v17 + v18 + v19; v109 = v17 + v18 + v19; if ( v149 > odm_face->pBoundingBox.x2 || v145 < odm_face->pBoundingBox.x1 || v141 > odm_face->pBoundingBox.y2 || v137 < odm_face->pBoundingBox.y1 || v133 > odm_face->pBoundingBox.z2 || v129 < odm_face->pBoundingBox.z1 - || !v20 ) + || v20 ) continue; v23 = -(odm_face->pFacePlane.dist + sX * odm_face->pFacePlane.vNormal.x + sY * odm_face->pFacePlane.vNormal.y @@ -4543,10 +4505,6 @@ + sZ * odm_face->pFacePlane.vNormal.z)) >> 14; if ( v24 <= abs(v21) ) { - //LODWORD(v25) = v23 << 16; - //HIDWORD(v25) = v23 >> 16; - //v26 = v25 / v109; - //v110 = v25 / v109; v110 = fixpoint_div(v23, v109); if ( v110 >= 0 ) { @@ -4565,14 +4523,8 @@ } } - v27.z = y; - v27.x = x; - v27.y = z; - Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v27, &sX, &sY, &sZ); - v28.z = v.z; - v28.x = v.x; - v28.y = v.y; - Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v28, &outx, &outy, &outz); + Vec3_int_::Rotate(32, v4 - stru_5C6E00->uIntegerHalfPi, 0, v97, &sX, &sY, &sZ); + Vec3_int_::Rotate(32, v4 - stru_5C6E00->uIntegerHalfPi, 0, v, &outx, &outy, &outz); dist_y = outy - sY; dist_z = outz - sZ; dist_x = outx - sX;
--- a/Keyboard.h Fri Jul 04 09:26:25 2014 +0600 +++ b/Keyboard.h Fri Jul 04 09:26:50 2014 +0600 @@ -67,7 +67,7 @@ unsigned int pVirtualKeyCodesMapping[30]; KeyToggleType pToggleTypes[30]; int max_input_string_len; - unsigned __int8 pPressedKeysBuffer[257]; + __int8 pPressedKeysBuffer[257]; unsigned __int8 uNumKeysPressed; char field_202; char field_203;
--- a/LOD.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/LOD.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -1862,7 +1862,7 @@ v9 = v4; do { - result = _stricmp((const char *)pContainerName, (const char *)&v10->pSubIndices[v9]); + result = _stricmp(pContainerName, v10->pSubIndices[v9].pFilename); if ( !result ) goto LABEL_21; ++v7; @@ -1886,7 +1886,7 @@ v8 = v4; while ( 1 ) { - result = _stricmp((const char *)pContainerName, (const char *)&v10->pSubIndices[v8]); + result = _stricmp(pContainerName, v10->pSubIndices[v8].pFilename); if ( !result ) break; ++v7; @@ -1919,7 +1919,7 @@ } else { - while ( _stricmp((const char *)pContainer, (const char *)&this_dup->pSubIndices[i]) ) + while ( _stricmp(pContainer, this_dup->pSubIndices[i].pFilename) ) { ++i_dup; ++i;
--- a/UI/Books/UINotesBooks.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/UI/Books/UINotesBooks.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -405,7 +405,7 @@ journal_window.uFrameZ = game_viewport_z; journal_window.uFrameW = game_viewport_w; if ( pStorylineText->StoreLine[achieved_awards[books_primary_item_per_page]].pPageTitle ) - journal_window.DrawTitleText(pBook2Font, 0, 22, ui_book_journal_title_color, (const char *)pStorylineText->StoreLine[achieved_awards[books_primary_item_per_page]].pPageTitle, 3); + journal_window.DrawTitleText(pBook2Font, 0, 22, ui_book_journal_title_color, pStorylineText->StoreLine[achieved_awards[books_primary_item_per_page]].pPageTitle, 3); } //for other text @@ -441,7 +441,7 @@ pDialogueString = BuildDialogueString(pStorylineText->StoreLine[ achieved_awards[books_primary_item_per_page]].pText, uActiveCharacter - 1, 0, 0, 0, &pParty->PartyTimes.HistoryEventTimes[index]); pStringOnPage = pAutonoteFont->GetPageTop(pDialogueString, &journal_window, 1, (unsigned __int8)Journal_limitation_factor[books_primary_item_per_page]); - journal_window.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, (const char *)pStringOnPage, 0, + journal_window.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, pStringOnPage, 0, journal_window.uFrameY + journal_window.uFrameHeight, ui_book_journal_text_shadow); ++num_achieved_awards; }
--- a/UI/UIHouses.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/UI/UIHouses.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -1721,14 +1721,14 @@ { sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[606], pGlobalTXT_LocalizationStrings[112]); // "Pay" "How Much?" townHall_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); - townHall_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); - townHall_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); + townHall_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), pKeyActionMap->pPressedKeysBuffer, 3); + townHall_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth(pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); return; } if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) { - v1 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); - v2 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); + v1 = atoi(pKeyActionMap->pPressedKeysBuffer); + v2 = atoi(pKeyActionMap->pPressedKeysBuffer); if ( v1 <= 0 ) { pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); @@ -1795,13 +1795,13 @@ { sprintf(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[60], pGlobalTXT_LocalizationStrings[112]);//"" "?" bank_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); - bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); - bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); + bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), pKeyActionMap->pPressedKeysBuffer, 3); + bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth(pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); return; } if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) { - entered_sum = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); + entered_sum = atoi(pKeyActionMap->pPressedKeysBuffer); takes_sum = entered_sum; if ( !entered_sum ) { @@ -1837,14 +1837,14 @@ { sprintfex(pTmpBuf.data(), "%s\n%s", pGlobalTXT_LocalizationStrings[244], pGlobalTXT_LocalizationStrings[112]);//"" "?" bank_window.DrawTitleText(pFontArrus, 0, 146, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); - bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), (const char *)pKeyActionMap->pPressedKeysBuffer, 3); - bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); + bank_window.DrawTitleText(pFontArrus, 0, 186, Color16(0xFFu, 0xFFu, 0xFFu), pKeyActionMap->pPressedKeysBuffer, 3); + bank_window.DrawFlashingInputCursor(pFontArrus->GetLineWidth(pKeyActionMap->pPressedKeysBuffer) / 2 + 80, 185, pFontArrus); return; } if ( window_SpeakInHouse->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) { window_SpeakInHouse->receives_keyboard_input_2 = WINDOW_INPUT_NONE; - entered_sum = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); + entered_sum = atoi(pKeyActionMap->pPressedKeysBuffer); takes_sum = entered_sum; if ( entered_sum ) { @@ -2183,14 +2183,14 @@ { pButton = pDialogueWindow->GetControl(pItemNum); pButton->uY = all_text_height + v54; - pTextHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0); + pTextHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0); pButton->uHeight = pTextHeight; v54 = pButton->uY + pTextHeight - 1; pButton->uW = v54; pColorText = Color16(0xFFu, 0xFFu, 0x9Bu); if ( pDialogueWindow->pCurrentPosActiveItem != pItemNum ) pColorText = Color16(0xFFu, 0xFFu, 0xFFu); - dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3); + dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3); ++pNumString; } }
--- a/UI/UIPartyCreation.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/UI/UIPartyCreation.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -154,19 +154,19 @@ switch ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 ) { case WINDOW_INPUT_IN_PROGRESS://press name panel - v17 = pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, 159 * (int)pGUIWindow_CurrentMenu->ptr_1C + 18, 124, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 120, 1); + v17 = pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, 159 * (int)pGUIWindow_CurrentMenu->ptr_1C + 18, 124, 0, pKeyActionMap->pPressedKeysBuffer, 120, 1); pGUIWindow_CurrentMenu->DrawFlashingInputCursor(159 * (unsigned int)pGUIWindow_CurrentMenu->ptr_1C + v17 + 20, 124, pFontCreate); break; case WINDOW_INPUT_CONFIRMED: // press enter pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; v126 = 0; - for ( int i = 0; i < strlen((const char *)pKeyActionMap->pPressedKeysBuffer); ++i )//edit name + for ( int i = 0; i < strlen(pKeyActionMap->pPressedKeysBuffer); ++i )//edit name { if ( pKeyActionMap->pPressedKeysBuffer[i] == ' ' ) ++v126; } - if ( strlen((const char *)pKeyActionMap->pPressedKeysBuffer) && v126 != strlen((const char *)pKeyActionMap->pPressedKeysBuffer) ) - strcpy(pParty->pPlayers[i].pName, (const char *)pKeyActionMap->pPressedKeysBuffer); + if ( strlen(pKeyActionMap->pPressedKeysBuffer) && v126 != strlen(pKeyActionMap->pPressedKeysBuffer) ) + strcpy(pParty->pPlayers[i].pName, pKeyActionMap->pPressedKeysBuffer); pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pIntervalX, 124, 0, pParty->pPlayers[i].pName, 130, 0); pParty->pPlayers[i].field_1988[27] = 1; break;
--- a/UI/UISaveLoad.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/UI/UISaveLoad.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -95,7 +95,7 @@ if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) { pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; - strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, (const char *)pKeyActionMap->pPressedKeysBuffer); + strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pKeyActionMap->pPressedKeysBuffer); pMessageQueue_50CBD0->AddMessage(UIMSG_SaveGame, 0, 0); } else @@ -108,7 +108,7 @@ pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[135]) + 25, 220, 0, pGlobalTXT_LocalizationStrings[135], 0, 0, 0);// pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, pFontSmallnum->AlignText_Center(186, - (const char *)pSavegameHeader.data() + 100 * uLoadGameUI_SelectedSlot) + 25, 0x106, 0, pSavegameHeader[uLoadGameUI_SelectedSlot].pName, 185, 0); + pSavegameHeader[uLoadGameUI_SelectedSlot].pName) + 25, 0x106, 0, pSavegameHeader[uLoadGameUI_SelectedSlot].pName, 185, 0); pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[165]) + 25, 304, 0, pGlobalTXT_LocalizationStrings[165], 0, 0, 0);//", " }
--- a/UI/UIShops.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/UI/UIShops.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -61,13 +61,13 @@ { pButton = pDialogueWindow->GetControl(i); pButton->uY = v103 + v19; - pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0); - v19 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1; + pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0); + v19 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1; pButton->uW = v19; pColorText = Color16(0xE1u, 0xCDu, 0x23u); if ( pDialogueWindow->pCurrentPosActiveItem != i ) pColorText = Color16(0xFFu, 0xFFu, 0xFFu); - dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3); + dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3); ++pNumString; } } @@ -263,13 +263,13 @@ { pButton = pDialogueWindow->GetControl(i); pButton->uY = v103 + v19; - pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0); - v19 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1; + pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0); + v19 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1; pButton->uW = v19; pColorText = Color16(0xE1u, 0xCDu, 0x23u); if ( pDialogueWindow->pCurrentPosActiveItem != i ) pColorText = Color16(0xFFu, 0xFFu, 0xFFu); - dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3); + dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3); ++pNumString; } break; @@ -733,13 +733,13 @@ { pButton = pDialogueWindow->GetControl(i); pButton->uY = v18 + v105; - pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0); - v105 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1; + pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0); + v105 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1; pButton->uW = v105; pColorText = Color16(0xE1u, 0xCDu, 0x23u); if ( pDialogueWindow->pCurrentPosActiveItem != i ) pColorText = Color16(0xFFu, 0xFFu, 0xFFu); - dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3); + dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3); ++pNumString; } } @@ -982,13 +982,13 @@ { pButton = pDialogueWindow->GetControl(i); pButton->uY = v18 + v105; - pButton->uHeight = pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0); - v105 = pButton->uY + pFontArrus->CalcTextHeight((const char *)pShopOptions[pNumString], &dialog_window, 0, 0) - 1; + pButton->uHeight = pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0); + v105 = pButton->uY + pFontArrus->CalcTextHeight(pShopOptions[pNumString], &dialog_window, 0, 0) - 1; pButton->uW = v105; pColorText = Color16(0xE1u, 0xCDu, 0x23u); if ( pDialogueWindow->pCurrentPosActiveItem != i ) pColorText = Color16(0xFFu, 0xFFu, 0xFFu); - dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, (const char *)pShopOptions[pNumString], 3); + dialog_window.DrawTitleText(pFontArrus, 0, pButton->uY, pColorText, pShopOptions[pNumString], 3); ++pNumString; } return;
--- a/UI/UiGame.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/UI/UiGame.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -660,7 +660,7 @@ if ( pGUIWindow2->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) { pGUIWindow2->receives_keyboard_input_2 = WINDOW_INPUT_NONE; - strcpy(GameUI_Footer_TimedString.data(), (const char *)pKeyActionMap->pPressedKeysBuffer); + strcpy(GameUI_Footer_TimedString.data(), pKeyActionMap->pPressedKeysBuffer); sub_4452BB(); return; }
--- a/mm7_5.cpp Fri Jul 04 09:26:25 2014 +0600 +++ b/mm7_5.cpp Fri Jul 04 09:26:50 2014 +0600 @@ -114,7 +114,7 @@ v15 = pActors[target_id].vPosition.y - AttackerInfo.pYs[attacker_id]; a1 = pActors[target_id].vPosition.x - AttackerInfo.pXs[attacker_id]; v44 = pActors[target_id].vPosition.z; - v19 = AttackerInfo.pYs[attacker_id] + pActors[target_id].uActorRadius; + v19 = AttackerInfo.field_324[attacker_id] + pActors[target_id].uActorRadius; v48 = v15; if ( a1 * a1 + v15 * v15 + (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id]) * (pActors[target_id].vPosition.z + (pActors[target_id].uActorHeight >> 1) - AttackerInfo.pZs[attacker_id]) < (unsigned int)(v19 * v19) ) @@ -167,7 +167,7 @@ v48 = pActors[actorID].vPosition.y - AttackerInfo.pYs[attacker_id]; v44 = pActors[actorID].vPosition.z; v32 = (pActors[actorID].uActorHeight / 2) - AttackerInfo.pZs[attacker_id]; - v33 = pActors[actorID].uActorRadius + AttackerInfo.pYs[attacker_id]; + v33 = pActors[actorID].uActorRadius + AttackerInfo.field_324[attacker_id]; if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) ) { attacker_coord.x = AttackerInfo.pXs[attacker_id];