Mercurial > mm7
changeset 1396:e6908823897f
Research on #62
author | Nomad |
---|---|
date | Thu, 18 Jul 2013 17:29:20 +0200 |
parents | 8d4ec56416ef |
children | eb02a65e5c82 |
files | Party.cpp UI/UIHouses.cpp UI/UIRest.cpp mm7_5.cpp mm7_data.cpp mm7_data.h |
diffstat | 6 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/Party.cpp Thu Jul 18 17:07:49 2013 +0200 +++ b/Party.cpp Thu Jul 18 17:29:20 2013 +0200 @@ -1216,16 +1216,16 @@ //----- (0041F5BE) -------------------------------------------------------- void __cdecl Sleep6Hours() { - if ( _506F18_num_hours_to_sleep < 6 ) + if ( _506F18_num_minutes_to_sleep < 6 ) { pParty->pPlayers[3].SetAsleep(false); pParty->pPlayers[2].SetAsleep(false); pParty->pPlayers[1].SetAsleep(false); pParty->pPlayers[0].SetAsleep(false); - if ( _506F18_num_hours_to_sleep ) + if ( _506F18_num_minutes_to_sleep ) { - Rest(_506F18_num_hours_to_sleep); - _506F18_num_hours_to_sleep = 0; + Rest(_506F18_num_minutes_to_sleep); + _506F18_num_minutes_to_sleep = 0; LoadActualSkyFrame(); } if ( dword_506F14 == 2 ) @@ -1253,7 +1253,7 @@ else { Rest(6u); - _506F18_num_hours_to_sleep -= 6; + _506F18_num_minutes_to_sleep -= 6; LoadActualSkyFrame(); } viewparams->bRedrawGameUI = 1;
--- a/UI/UIHouses.cpp Thu Jul 18 17:07:49 2013 +0200 +++ b/UI/UIHouses.cpp Thu Jul 18 17:29:20 2013 +0200 @@ -2468,7 +2468,7 @@ pNumActiveItem++; if ( pNumActiveItem >= pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ) { - sprintfex(pTmpBuf.data(), "%s%s%s%s", &pTopic1, &pTopic2, &pTopic3, &pTopic4); + sprintfex(pTmpBuf.data(), "%s%s%s%s", pTopic1, pTopic2, pTopic3, pTopic4); dialog_window.DrawTitleText(pFontArrus, 0, 146, 0, pTmpBuf.data(), 3); } }
--- a/UI/UIRest.cpp Thu Jul 18 17:07:49 2013 +0200 +++ b/UI/UIRest.cpp Thu Jul 18 17:29:20 2013 +0200 @@ -35,7 +35,7 @@ pEventTimer->Pause(); if ( dword_506F14 != 2 ) GUIWindow::Create(518, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_Rest, 0); - _506F18_num_hours_to_sleep = 0; + _506F18_num_minutes_to_sleep = 0; dword_506F14 = 0; uRestUI_FoodRequiredToRest = 2; if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
--- a/mm7_5.cpp Thu Jul 18 17:07:49 2013 +0200 +++ b/mm7_5.cpp Thu Jul 18 17:29:20 2013 +0200 @@ -1245,7 +1245,7 @@ case SCREEN_REST://close rest screen if ( dword_506F14 ) { - Rest(_506F18_num_hours_to_sleep); + Rest(_506F18_num_minutes_to_sleep); pParty->pPlayers[3].pConditions[2] = 0i64; pParty->pPlayers[2].pConditions[2] = 0i64; pParty->pPlayers[1].pConditions[2] = 0i64; @@ -1257,7 +1257,7 @@ pTexture_RestUI_CurrentSkyFrame = 0; pIcons_LOD->SyncLoadedFilesCount(); pIcons_LOD->_4114F2(); - _506F18_num_hours_to_sleep = 0; + _506F18_num_minutes_to_sleep = 0; dword_506F14 = 0; dword_507B94 = 1; if ( pGUIWindow_Settings ) @@ -2463,7 +2463,7 @@ GUIWindow::Create(pButton_RestUI_Wait5Minutes->uX, pButton_RestUI_Wait5Minutes->uY, 0, 0, WINDOW_PressedButton2, (int)pButton_RestUI_Wait5Minutes, pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes" dword_506F14 = 1; - _506F18_num_hours_to_sleep = 5; + _506F18_num_minutes_to_sleep = 5; continue; case UIMSG_Wait1Hour: if ( dword_506F14 == 2 ) @@ -2475,15 +2475,15 @@ GUIWindow::Create(pButton_RestUI_Wait1Hour->uX, pButton_RestUI_Wait1Hour->uY, 0, 0, WINDOW_PressedButton2, (int)pButton_RestUI_Wait1Hour, pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour" dword_506F14 = 1; - _506F18_num_hours_to_sleep = 60; + _506F18_num_minutes_to_sleep = 60; continue; case UIMSG_RentRoom: dword_506F14 = 2; RestUI_Load(); v86 = 60 * (_494820_training_time(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute; - _506F18_num_hours_to_sleep = v86; - if ( uMessageParam == 111 || uMessageParam == 114 || uMessageParam == 116 ) - _506F18_num_hours_to_sleep = v86 + 720; + _506F18_num_minutes_to_sleep = v86; + if ( uMessageParam == 111 || uMessageParam == 114 || uMessageParam == 116 ) // 107 = Emerald Isle tavern + _506F18_num_minutes_to_sleep = v86 + 12 * 60; dword_506F14 = 2; pParty->RestAndHeal(); pParty->days_played_without_rest = 0; @@ -2577,7 +2577,7 @@ HIDWORD(pParty->pPlayers[pPlayerNum].pConditions[2]) = 0; v95 = rand(); Rest(v95 % 6 + 60); - _506F18_num_hours_to_sleep = 0; + _506F18_num_minutes_to_sleep = 0; dword_506F14 = 0; /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) { @@ -2593,7 +2593,7 @@ } } Party::TakeFood(uRestUI_FoodRequiredToRest); - _506F18_num_hours_to_sleep = 480; + _506F18_num_minutes_to_sleep = 480; dword_506F14 = 2; pParty->RestAndHeal(); pParty->days_played_without_rest = 0; @@ -2614,7 +2614,7 @@ (int)pButton_RestUI_WaitUntilDawn, pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn" v97 = _494820_training_time(pParty->uCurrentHour); dword_506F14 = 1; - _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; + _506F18_num_minutes_to_sleep = 60 * v97 - pParty->uCurrentMinute; continue; case UIMSG_HintSelectRemoveQuickSpellBtn: if ( quick_spell_at_page && byte_506550 )
--- a/mm7_data.cpp Thu Jul 18 17:07:49 2013 +0200 +++ b/mm7_data.cpp Thu Jul 18 17:29:20 2013 +0200 @@ -930,7 +930,7 @@ std::array<int, 777> dword_506F0C; // idb int uRestUI_FoodRequiredToRest; int dword_506F14; // weak -int _506F18_num_hours_to_sleep; // weak +int _506F18_num_minutes_to_sleep; // weak int dword_506F1C; // weak std::array<int, 20> pVisibleWindowsIdxs; // weak int uNumVisibleWindows;
--- a/mm7_data.h Thu Jul 18 17:07:49 2013 +0200 +++ b/mm7_data.h Thu Jul 18 17:29:20 2013 +0200 @@ -573,7 +573,7 @@ extern std::array<int, 777> dword_506F0C; // idb extern int uRestUI_FoodRequiredToRest; extern int dword_506F14; // weak -extern int _506F18_num_hours_to_sleep; // weak +extern int _506F18_num_minutes_to_sleep; // weak extern int dword_506F1C; // weak extern std::array<int, 20> pVisibleWindowsIdxs; // weak extern int uNumVisibleWindows;