Mercurial > mm7
diff mm7_3.cpp @ 811:d6e84d158052
Merge
author | Gloval |
---|---|
date | Tue, 26 Mar 2013 00:58:16 +0400 |
parents | f5156b8c61ad 7bb33867d2cb |
children | d37b03507b3b |
line wrap: on
line diff
--- a/mm7_3.cpp Tue Mar 26 00:57:54 2013 +0400 +++ b/mm7_3.cpp Tue Mar 26 00:58:16 2013 +0400 @@ -1729,113 +1729,74 @@ v82 = (unsigned __int64)(pEventTimer->dt_in_some_format * (signed __int64)((signed int)(pParty->y_rotation_speed * stru_5C6E00->uIntegerPi) / 180)) >> 16; -LABEL_87: +//LABEL_87: while ( pPartyActionQueue->uNumActions ) { switch ( pPartyActionQueue->Next() ) { case PARTY_TurnLeft: - v12 = uTurnSpeed; if ( uTurnSpeed ) - goto LABEL_58; - v13 = (double)v82 * fTurnSpeedMultiplier; - v14 = angle + (unsigned __int64)(signed __int64)v13; + { + v14 = angle + uTurnSpeed; + angle = stru_5C6E00->uDoublePiMask & v14; + break; + } + v14 = angle + (unsigned __int64)(signed __int64)(double)v82 * fTurnSpeedMultiplier; angle = stru_5C6E00->uDoublePiMask & v14; - goto LABEL_87; + break; case PARTY_TurnRight: - LODWORD(v15) = uTurnSpeed; if ( uTurnSpeed ) { - angle = stru_5C6E00->uDoublePiMask & (angle - v15); - goto LABEL_87; + angle = stru_5C6E00->uDoublePiMask & (angle - uTurnSpeed); + break; } v16 = (double)v82 * fTurnSpeedMultiplier; - //{ - v15 = (signed __int64)v16; - angle = stru_5C6E00->uDoublePiMask & (angle - v15); - goto LABEL_87; - //} + angle = stru_5C6E00->uDoublePiMask & (angle - (signed __int64)v16); + break; case PARTY_FastTurnLeft: - v12 = uTurnSpeed; if ( uTurnSpeed ) { -LABEL_58: - v14 = angle + v12; + v14 = angle + uTurnSpeed; } else { - v13 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; - v14 = angle + (unsigned __int64)(signed __int64)v13; + v14 = angle + (unsigned __int64)(signed __int64)(fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; } angle = stru_5C6E00->uDoublePiMask & v14; - goto LABEL_87; + break; case PARTY_FastTurnRight: LODWORD(v15) = uTurnSpeed; if ( !uTurnSpeed ) { - v16 = (fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; - v15 = (signed __int64)v16; + v15 = (signed __int64)(fTurnSpeedMultiplier + fTurnSpeedMultiplier) * (double)v82; } angle = stru_5C6E00->uDoublePiMask & (angle - v15); - goto LABEL_87; - case PARTY_StrafeLeft://Ctrl + <- - __debugbreak(); - v17 = stru_5C6E00->Sin(angle); - v18 = (double)v81; - //v88 = v18; - v78 = (unsigned __int64)(v17 * (signed __int64)((signed int)(signed __int64)(v18 * fWalkSpeedMultiplier) >> 1)) >> 16; - v2 -= v78; - v19 = stru_5C6E00->Cos(angle); - v78 = (unsigned __int64)(v19 * (signed __int64)((signed int)(signed __int64)(v18 * fWalkSpeedMultiplier) >> 1)) >> 16; - v1 += v78; + break; + case PARTY_StrafeLeft: + v2 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; + v1 += (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; v78 = 1; - goto LABEL_87; + break; case PARTY_StrafeRight: - __debugbreak(); - v20 = stru_5C6E00->Sin(angle); - v21 = (double)v81; - //v88 = v21; - v78 = (unsigned __int64)(v20 * (signed __int64)((signed int)(signed __int64)(v21 * fWalkSpeedMultiplier) >> 1)) >> 16; - v2 += v78; - v22 = stru_5C6E00->Cos(angle); - v78 = (unsigned __int64)(v22 * (signed __int64)((signed int)(signed __int64)(v21 * fWalkSpeedMultiplier) >> 1)) >> 16; - //goto LABEL_68; - v1 -= v78; + v2 += (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; + v1 -= (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)((signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier) >> 1)) >> 16; v78 = 1; - goto LABEL_87; + break; case PARTY_WalkForward: - __debugbreak(); - v23 = stru_5C6E00->Cos(angle); - v24 = (double)v81; - //v88 = v24; - v78 = (unsigned __int64)(v23 * (signed __int64)(signed int)(signed __int64)(v24 * fWalkSpeedMultiplier)) >> 16; - v2 += v78; - v25 = stru_5C6E00->Sin(angle); - v78 = (unsigned __int64)(v25 * (signed __int64)(signed int)(signed __int64)(v24 * fWalkSpeedMultiplier)) >> 16; - v1 += v78; + v2 += (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier)) >> 16; + v1 += (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fWalkSpeedMultiplier)) >> 16; v78 = 1; - goto LABEL_87; + break; case PARTY_WalkBackward: - __debugbreak(); - v26 = stru_5C6E00->Cos(angle); - v27 = (double)v81; - //v88 = v27; - v78 = (unsigned __int64)(v26 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16; - v2 -= v78; - v28 = stru_5C6E00->Sin(angle); - v78 = (unsigned __int64)(v28 * (signed __int64)(signed int)(signed __int64)(v27 * fBackwardWalkSpeedMultiplier)) >> 16; - v1 -= v78; + v2 -= (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; + v1 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; v78 = 1; - goto LABEL_87; + break; case PARTY_RunForward: - //v29 = stru_5C6E00->Cos(angle); - //v30 = (double)v81; - //v88 = (double)v81; v2 += (unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)(signed int)(2 * (unsigned __int64)(signed __int64)((double)v81 * fWalkSpeedMultiplier))) >> 16; - //v31 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); v1 += (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(2 * (unsigned __int64)(signed __int64)((double)v81 * fWalkSpeedMultiplier))) >> 16; v72 = 1; - goto LABEL_87; + break; case PARTY_RunBackward: //v32 = stru_5C6E00->SinCos(angle); //v33 = (double)v81; @@ -1844,15 +1805,14 @@ //v34 = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi); v1 -= (unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)(signed int)(signed __int64)((double)v81 * fBackwardWalkSpeedMultiplier)) >> 16; v72 = 1; - goto LABEL_87; + break; case PARTY_LookUp: _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * 25.0); if ( _view_angle > 128 ) _view_angle = 128; v35 = uActiveCharacter; - if ( !uActiveCharacter ) - goto LABEL_87; - pPlayers[v35]->PlaySound((PlayerSpeech)SPEECH_63, 0); + if ( uActiveCharacter ) + pPlayers[v35]->PlaySound((PlayerSpeech)SPEECH_63, 0); break; case PARTY_LookDown: _view_angle += (signed __int64)(flt_6BE150_look_up_down_dangle * -25.0); @@ -1873,7 +1833,7 @@ } break; default: - goto LABEL_87; + break; } } v36 = 0; @@ -12324,7 +12284,7 @@ } else if ( v10 ) { - sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[409], pMapInfo->pName);// "Do you wish to leave %s?" v4 = (212 - pFontCreate->CalcTextHeight(pTmpBuf, &v8, 0, 0)) / 2 + 101; v8.DrawTitleText(pFontCreate, 0, v4, 0, pTmpBuf, 3); } @@ -12369,7 +12329,7 @@ pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)]; v1 = pMapStats->GetMapInfo(pCurrentMapName); if ( v1 ) - sprintf(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" + sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" else strcpy(sHouseName, pGlobalTXT_LocalizationStrings[79]);// "Exit" pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, (int)sHouseName); @@ -12438,9 +12398,9 @@ v6 = v3; v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s." } - sprintf(pTmpBuf, v5, v6, v1->pName); + sprintfex(pTmpBuf, v5, v6, v1->pName); strcat(pTmpBuf, "\n \n"); - sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); + sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName); strcat(pTmpBuf, pTmpBuf2); v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0); v7.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u);