# HG changeset patch # User Ritor1 # Date 1364156474 -21600 # Node ID f004c7ceb7bdf171d155dd70f44373787012b3dd # Parent 3a77fbf7d0b885ddc046e0d553b7594f38734a88# Parent b3e08a49677894de2e6c2197b0a42c133ab094c3 Слияние diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Events.cpp --- a/Events.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/Events.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -319,7 +319,7 @@ dword_5B65C4 = 0; if ( !uEventID ) { - if ( !GameUI_StatusBar_TimedStringTimeLeft ) + if ( !GameUI_Footer_TimeLeft ) ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here return; } @@ -1033,7 +1033,7 @@ case EVENT_InputString: if ( !start_event_seq_number ) { - strcpy(GameUI_StatusBar_TimedString, &pLevelStr[pLevelStrOffsets[EVT_DWORD(_evt->v5 )]]); + strcpy(GameUI_Footer_TimedString, &pLevelStr[pLevelStrOffsets[EVT_DWORD(_evt->v5 )]]); v105 = curr_seq_num; v121 = 26; LABEL_295: @@ -1045,8 +1045,8 @@ return; } v84 = _evt->v13 + ((_evt->v14 + ((_evt->v15 + ((uint)_evt->v16 << 8)) << 8)) << 8); - if ( !_strcmpi(GameUI_StatusBar_TimedString, &pLevelStr[pLevelStrOffsets[_evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8)]]) - || !_strcmpi(GameUI_StatusBar_TimedString, &pLevelStr[pLevelStrOffsets[v84]]) ) + if ( !_strcmpi(GameUI_Footer_TimedString, &pLevelStr[pLevelStrOffsets[_evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8)]]) + || !_strcmpi(GameUI_Footer_TimedString, &pLevelStr[pLevelStrOffsets[v84]]) ) { v11 = _evt->v17; LABEL_130: @@ -1349,7 +1349,7 @@ else { pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((activeLevelDecoration == NULL) + 1); - sub_44987B(v99, 0); + sub_44987B(v99, MapStartPoint_Party); v133 = 1; if ( pCurrentScreen == SCREEN_HOUSE ) { diff -r 3a77fbf7d0b8 -r f004c7ceb7bd GUIWindow.cpp --- a/GUIWindow.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/GUIWindow.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -36,6 +36,15 @@ struct GUIMessageQueue *pMessageQueue_50CBD0 = new GUIMessageQueue; +// inlined +//----- (mm6c::00420520) -------------------------------------------------- +void GUIMessageQueue::Flush() +{ + if (uNumMessages) + uNumMessages = pMessages[0].field_8 != 0; +} + + //----- (004356B9) -------------------------------------------------------- void GUIMessageQueue::PopMessage(enum UIMessageType *pType, int *pParam, int *a4) { diff -r 3a77fbf7d0b8 -r f004c7ceb7bd GUIWindow.h --- a/GUIWindow.h Mon Mar 25 02:20:57 2013 +0600 +++ b/GUIWindow.h Mon Mar 25 02:21:14 2013 +0600 @@ -203,7 +203,7 @@ UIMSG_SelectSpell = 0x56, UIMSG_57 = 0x57, UIMSG_58 = 0x58, - UIMSG_5A = 0x5A, + UIMSG_OnTravelByFoot = 0x5A, UIMSG_5B = 0x5B, UIMSG_ShowStatus_DateTime = 0x5C, UIMSG_ShowStatus_ManaHP = 0x5D, @@ -386,6 +386,7 @@ uNumMessages(0) {} + void Flush(); void PopMessage(UIMessageType *pMsg, int *pParam, int *a4); void AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file = nullptr, int line = 0); diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Game.cpp --- a/Game.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/Game.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -125,7 +125,7 @@ if (pOtherOverlayList->bRedraw) viewparams->bRedrawGameUI = true; v4 = viewparams->bRedrawGameUI; - GameUI_DrawStatusBar(); + GameUI_Footer(); if (!viewparams->bRedrawGameUI) { GameUI_DrawRightPanelItems(); @@ -133,7 +133,7 @@ else { GameUI_DrawRightPanelFrames(); - GameUI_DrawStatusBar_2(); + GameUI_Footer_2(); viewparams->bRedrawGameUI = false; } if (!pVideoPlayer->pSmackerMovie) @@ -228,14 +228,13 @@ } LoadPlayerPortraintsAndVoices(); - pIcons_LOD->dword_11B84 = pIcons_LOD->uNumLoadedFiles; + pIcons_LOD->_inlined_sub1(); pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f); while ( 2 ) { v16 = 1; - if (pMessageQueue_50CBD0->uNumMessages) - pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; + pMessageQueue_50CBD0->Flush(); pPartyActionQueue->uNumActions = 0; if (pParty->bTurnBasedModeOn) @@ -317,8 +316,8 @@ } else { - sub_401A91_AI(); - sub_46BDC0_UpdateUserInput_and_MapSpecificStuff(); + UpdateActorAI(); + UpdateUserInput_and_MapSpecificStuff(); } } if ( v16 ) diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Indoor.cpp --- a/Indoor.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/Indoor.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -571,7 +571,7 @@ pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); return; } - //v17 = 0xFFFFFFFF; + v17 = 0xFFFFFFFF; v23 = pFace->uBitmapID; goto LABEL_42; } @@ -3927,7 +3927,7 @@ if ( v1 == 11 || v1 == 19 || v1 == 17 || !v0->uMovementSpeed ) goto LABEL_123; uSectorID = v0->uSectorID; - v2 = _46ED1B_collide_against_floor(v0->vPosition.x, v0->vPosition.y, v0->vPosition.z, &uSectorID, &uFaceID); + v2 = collide_against_floor(v0->vPosition.x, v0->vPosition.y, v0->vPosition.z, &uSectorID, &uFaceID); v0->uSectorID = uSectorID; v3 = v0->pMonsterInfo.uFlying; v56 = v2; @@ -4129,7 +4129,7 @@ v58 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16; v32 = v58 + v0->vPosition.z; } - v33 = _46ED1B_collide_against_floor(v30, v31, v32, &stru_721530.uSectorID, &uFaceID); + v33 = collide_against_floor(v30, v31, v32, &stru_721530.uSectorID, &uFaceID); v34 = pIndoor->pFaces[uFaceID].uAttributes; v35 = v34 & 0x400000; if (v35 && v0->uAIState == Dead) diff -r 3a77fbf7d0b8 -r f004c7ceb7bd MapInfo.h --- a/MapInfo.h Mon Mar 25 02:20:57 2013 +0600 +++ b/MapInfo.h Mon Mar 25 02:21:14 2013 +0600 @@ -1,5 +1,6 @@ #pragma once + enum MAP_TYPE: unsigned __int32 { MAP_INVALID = 0, @@ -23,6 +24,15 @@ //... }; +enum MapStartPoint: unsigned __int32 +{ + MapStartPoint_Party = 0, + MapStartPoint_North = 1, + MapStartPoint_South = 2, + MapStartPoint_East = 3, + MapStartPoint_West = 4 +}; + /* 192 */ #pragma pack(push, 1) @@ -85,4 +95,10 @@ -extern struct MapStats *pMapStats; \ No newline at end of file +extern struct MapStats *pMapStats; + + + + +void TeleportToStartingPoint(MapStartPoint point); // idb +void sub_44987B(const char *pMapName, MapStartPoint point); // idb \ No newline at end of file diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Outdoor.cpp --- a/Outdoor.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/Outdoor.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -5,7 +5,6 @@ #include "SpriteObject.h" #include "LOD.h" #include "Render.h" -#include "MapInfo.h" #include "Allocator.h" #include "Weather.h" #include "PaletteManager.h" @@ -31,6 +30,8 @@ +MapStartPoint uLevel_StartingPointType; // weak + OutdoorLocation *pOutdoor = new OutdoorLocation; OutdoorCamera *pOutdoorCamera; @@ -337,20 +338,83 @@ return true; } + + +char foot_travel_destinations[15][4] = +{ +// north south east west from + {MAP_INVALID, MAP_INVALID, MAP_INVALID, MAP_INVALID}, // MAP_EMERALD_ISLE + {MAP_PIERPONT, MAP_BARROW_DOWNS, MAP_PIERPONT, MAP_STEADWICK}, // MAP_HARMONDALE + {MAP_DEYJA, MAP_BRAKADA_DESERT, MAP_HARMONDALE, MAP_TATALIA}, // MAP_STEADWICK + {MAP_AVLEE, MAP_HARMONDALE, MAP_INVALID, MAP_DEYJA}, // MAP_PIERPONT + {MAP_PIERPONT, MAP_STEADWICK, MAP_PIERPONT, MAP_STEADWICK}, // MAP_DEYJA + {MAP_STEADWICK, MAP_INVALID, MAP_BARROW_DOWNS, MAP_INVALID}, // MAP_BRAKADA_DESERT + {MAP_INVALID, MAP_INVALID, MAP_INVALID, MAP_INVALID}, // MAP_CELESTIA + {MAP_INVALID, MAP_INVALID, MAP_INVALID, MAP_INVALID}, // MAP_THE_PIT + {MAP_INVALID, MAP_INVALID, MAP_INVALID, MAP_INVALID}, // MAP_EVENMORN_ISLE + {MAP_INVALID, MAP_INVALID, MAP_INVALID, MAP_INVALID}, // MAP_MOUNT_NIGHON + {MAP_HARMONDALE, MAP_BRAKADA_DESERT, MAP_HARMONDALE, MAP_BRAKADA_DESERT}, // MAP_BARROW_DOWNS + {MAP_INVALID, MAP_INVALID, MAP_INVALID, MAP_INVALID}, // MAP_LAND_OF_GIANTS + {MAP_INVALID, MAP_INVALID, MAP_STEADWICK, MAP_INVALID}, // MAP_TATALIA + {MAP_INVALID, MAP_PIERPONT, MAP_PIERPONT, MAP_INVALID}, // MAP_AVLEE + {MAP_INVALID, MAP_INVALID, MAP_INVALID, MAP_INVALID} // MAP_SHOALS +}; +unsigned char foot_travel_times[15][4] = +{ +// north south east west from + {0, 0, 0, 0}, // MAP_EMERALD_ISLE + {5, 5, 7, 5}, // MAP_HARMONDALE + {5, 5, 5, 5}, // MAP_STEADWICK + {5, 5, 0, 5}, // MAP_PIERPONT + {7, 5, 5, 4}, // MAP_DEYJA + {5, 0, 5, 0}, // MAP_BRAKADA_DESERT + {0, 0, 0, 0}, // MAP_CELESTIA + {0, 0, 0, 0}, // MAP_THE_PIT + {0, 0, 0, 0}, // MAP_EVENMORN_ISLE + {0, 0, 0, 0}, // MAP_MOUNT_NIGHON + {5, 7, 7, 5}, // MAP_BARROW_DOWNS + {0, 0, 0, 0}, // MAP_LAND_OF_GIANTS + {0, 0, 5, 0}, // MAP_TATALIA + {0, 7, 5, 0}, // MAP_AVLEE + {0, 0, 0, 0}, // MAP_SHOALS +}; + + +MapStartPoint foot_travel_arrival_points[15][4] = +{ +// north south east west from + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party}, // MAP_EMERALD_ISLE + {MapStartPoint_South, MapStartPoint_North, MapStartPoint_South, MapStartPoint_East}, // MAP_HARMONDALE + {MapStartPoint_South, MapStartPoint_North, MapStartPoint_West, MapStartPoint_East}, // MAP_STEADWICK + {MapStartPoint_East, MapStartPoint_North, MapStartPoint_Party, MapStartPoint_East}, // MAP_PIERPONT + {MapStartPoint_West, MapStartPoint_North, MapStartPoint_West, MapStartPoint_North}, // MAP_DEYJA + {MapStartPoint_South, MapStartPoint_Party, MapStartPoint_West, MapStartPoint_Party}, // MAP_BRAKADA_DESERT + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party}, // MAP_CELESTIA + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party}, // MAP_THE_PIT + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party}, // MAP_EVENMORN_ISLE + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party}, // MAP_MOUNT_NIGHON + {MapStartPoint_South, MapStartPoint_East, MapStartPoint_South, MapStartPoint_East}, // MAP_BARROW_DOWNS + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party}, // MAP_LAND_OF_GIANTS + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_West, MapStartPoint_Party}, // MAP_TATALIA + {MapStartPoint_Party, MapStartPoint_North, MapStartPoint_North, MapStartPoint_Party}, // MAP_AVLEE + {MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party, MapStartPoint_Party}, // MAP_SHOALS +}; + + //----- (0048902E) -------------------------------------------------------- bool OutdoorLocation::GetTravelDestination(signed int sPartyX, signed int sPartyZ, char *pOut, signed int a5) { OutdoorLocation *v5; // esi@1 char *v6; // eax@3 int v7; // eax@3 - int v8; // edx@3 + //int v8; // edx@3 signed int v9; // esi@7 - int v10; // esi@23 + //int v10; // esi@23 signed int v11; // eax@23 - int v12; // ST14_4@25 + //int v12; // ST14_4@25 signed int v14; // [sp-4h] [bp-84h]@6 char Str[140]; // [sp+8h] [bp-78h]@3 - int a5a; // [sp+94h] [bp+14h]@3 + //int a5a; // [sp+94h] [bp+14h]@3 auto Source = this; @@ -362,8 +426,8 @@ v6 = strtok(Str, "out"), v6[2] = 0, v7 = atoi(v6), - v8 = v7, - a5a = v7, + //v8 = v7, + //a5a = v7, v7 < 1) || v7 > 15 ) return 0; @@ -390,18 +454,18 @@ LABEL_14: if ( v7 == 14 ) { - if ( v9 == 4 ) + if ( v9 == 4 ) // to & from Shoals { if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(0) ) { uDefaultTravelTime_ByFoot = 1; strcpy(pOut, "out15.odm"); - uLevel_StartingPointType = 3; + uLevel_StartingPointType = MapStartPoint_East; LABEL_18: LOWORD(pParty->uFlags) &= 0xFD7Bu; return 1; } - v8 = a5a; + //v8 = v7; } } else @@ -410,21 +474,24 @@ { uDefaultTravelTime_ByFoot = 1; strcpy(pOut, "out14.odm"); - uLevel_StartingPointType = 4; + uLevel_StartingPointType = MapStartPoint_West; goto LABEL_18; } } - v10 = v9 + 4 * v8; - v11 = (unsigned __int8)aTiletableLoadU[v10 + 39]; - if ( v11 >= 1 && v11 <= 15 ) - { - v12 = (unsigned __int8)aTiletableLoadU[v10 + 39]; - uDefaultTravelTime_ByFoot = (unsigned __int8)byte_4ECA93[v10]; - sprintf(pOut, "out%02d.odm", v12); - uLevel_StartingPointType = (unsigned __int8)byte_4ECACF[v10]; - return 1; - } - return 0; + //v10 = v9 + 4 * v7; + //v11 = (unsigned __int8)aTiletableLoadU[v10 + 39]; + v11 = foot_travel_destinations[v7 - 1][v9 - 1]; + if (v11 == MAP_INVALID) + return false; + + assert(v11 <= MAP_SHOALS); + + uDefaultTravelTime_ByFoot = foot_travel_times[v7 - 1][v9 - 1]; + uLevel_StartingPointType = foot_travel_arrival_points[v7 - 1][v9 - 1]; + sprintf(pOut, "out%02d.odm", v11); + return 1; + //} + //return 0; } // 6BD07C: using guessed type int uDefaultTravelTime_ByFoot; // 6BE35C: using guessed type int uLevel_StartingPointType; diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Outdoor.h --- a/Outdoor.h Mon Mar 25 02:20:57 2013 +0600 +++ b/Outdoor.h Mon Mar 25 02:21:14 2013 +0600 @@ -3,6 +3,7 @@ #include "OutdoorCamera.h" #include "Indoor.h" #include "TileFrameTable.h" +#include "MapInfo.h" @@ -265,6 +266,7 @@ +extern MapStartPoint uLevel_StartingPointType; // weak diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Overlays.cpp --- a/Overlays.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/Overlays.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -26,7 +26,13 @@ - +// inlined +//----- (mm6c::0045BD50) -------------------------------------------------- +void OtherOverlayList::Reset() +{ + for (uint i = 0; i < 50; ++i) + pOverlays[i].Reset(); +} //----- (004418B1) -------------------------------------------------------- int OtherOverlayList::_4418B1(int a2, int a3, int a4, int a5) diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Overlays.h --- a/Overlays.h Mon Mar 25 02:20:57 2013 +0600 +++ b/Overlays.h Mon Mar 25 02:21:14 2013 +0600 @@ -28,6 +28,7 @@ field_3E8(0), bRedraw(false) {} + void Reset(); int _4418B1(int a2, int a3, int a4, int a5); int _4418B6(int uOverlayID, __int16 a3, int a4, int a5, __int16 a6); void DrawTurnBasedIcon(int a2); diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Party.cpp --- a/Party.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/Party.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -28,6 +28,50 @@ +// inlined +//----- (mm6c::004858D0) -------------------------------------------------- +void Party::Zero() +{ + + uFlags2 = 0; + uNumGoldInBank = 0; + + uCurrentYear = 0; + uCurrentMonth = 0; + uCurrentMonthWeek = 0; + uDaysPlayed = 0; + uCurrentHour = 0; + uCurrentMinute = 0; + uCurrentTimeSecond = 0; + + field_6FC = 0; + days_played_without_rest = 0; + + vPosition.y = 0; + vPosition.z = 0; + vPosition.x = 0; + uFallStartY = 0; + sRotationY = 0; + sRotationX = 0; + uFallSpeed = 0; + field_28 = 0; + uDefaultPartyHeight = 120; + field_14 = 37; + y_rotation_granularity = 25; + uWalkSpeed = 384; + y_rotation_speed = 90; + field_24 = 5; + field_6FC = 0; + field_708 = 15; + field_0 = 25; +} + +//inlined +//----- (mm6c::0045BE90) -------------------------------------------------- +void ActionQueue::Reset() +{ + uNumActions = 0; +} //----- (004760C1) -------------------------------------------------------- void ActionQueue::Add(PartyAction action) @@ -530,14 +574,15 @@ //signed int v13; // edi@18 SpellBuff *v14; // ebx@21 signed int v15; // edi@21 + + Zero(); field_708 = 15; sEyelevel = 160; - uFlags2 = 0; uNumGold = 200; - uNumGoldInBank = 0; uNumFoodRations = 7; + alignment = PartyAlignment_Neutral; SetUserInterface(alignment, true); diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Party.h --- a/Party.h Mon Mar 25 02:20:57 2013 +0600 +++ b/Party.h Mon Mar 25 02:21:14 2013 +0600 @@ -97,6 +97,7 @@ struct ActionQueue { void Add(PartyAction action); + void Reset(); PartyAction Next(); unsigned int uNumActions; @@ -144,36 +145,10 @@ Party(): uTimePlayed(0) { - uCurrentYear = 0; - uCurrentMonth = 0; - uCurrentMonthWeek = 0; - uDaysPlayed = 0; - uCurrentHour = 0; - uCurrentMinute = 0; - uCurrentTimeSecond = 0; - - field_6FC = 0; - days_played_without_rest = 0; - - vPosition.y = 0; - vPosition.z = 0; - vPosition.x = 0; - uFallStartY = 0; - sRotationY = 0; - sRotationX = 0; - uFallSpeed = 0; - field_28 = 0; - uDefaultPartyHeight = 120; - field_14 = 37; - y_rotation_granularity = 25; - uWalkSpeed = 384; - y_rotation_speed = 90; - field_24 = 5; - field_6FC = 0; - field_708 = 15; - field_0 = 25; + Zero(); } + void Zero(); void UpdatePlayersAndHirelingsEmotions(); void RestAndHeal(); unsigned int GetPartyFame(); diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Time.cpp --- a/Time.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/Time.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -73,13 +73,12 @@ } //----- (004263B7) -------------------------------------------------------- -int Timer::Update() +void Timer::Update() { Timer *v1; // esi@1 unsigned int v2; // eax@2 signed int v3; // eax@3 char v4; // zf@5 - int result; // eax@8 v1 = this; do @@ -96,9 +95,7 @@ v1->uTimeElapsed = v3; if ( v4 && !v1->bTackGameTime ) v1->uTotalGameTimeElapsed += v3; - result = (v3 << 16) / 128; - v1->dt_in_some_format = result; - return result; + v1->dt_in_some_format = (v3 << 16) / 128; } //----- (00426402) -------------------------------------------------------- diff -r 3a77fbf7d0b8 -r f004c7ceb7bd Time.h --- a/Time.h Mon Mar 25 02:20:57 2013 +0600 +++ b/Time.h Mon Mar 25 02:21:14 2013 +0600 @@ -22,7 +22,7 @@ void Initialize(); unsigned __int64 Time(); - int Update(); + void Update(); void Pause(); void Resume(); void TrackGameTime(); diff -r 3a77fbf7d0b8 -r f004c7ceb7bd UIHouses.cpp --- a/UIHouses.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/UIHouses.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -468,8 +468,8 @@ //v1 = uHouseID; //v25 = uHouseID; - GameUI_StatusBar_TimedString[0] = 0; - pStatusBarString[0] = 0; + GameUI_Footer_TimedString[0] = 0; + pFooterString[0] = 0; ShowStatusBarString("", 2u); if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; diff -r 3a77fbf7d0b8 -r f004c7ceb7bd UIPartyCreation.cpp --- a/UIPartyCreation.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/UIPartyCreation.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -545,7 +545,7 @@ sprintf(pTmpBuf, "%d", v113); pTextCenter = pFontCreate->AlignText_Center(84, pTmpBuf); pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 530, 410, uColorWhite, pTmpBuf, 0, 0, 0); - if ( GameUI_StatusBar_TimedStringTimeLeft > GetTickCount() ) + if ( GameUI_Footer_TimeLeft > GetTickCount() ) { pWindow.Hint = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points." if ( v113 < 0 ) @@ -580,8 +580,8 @@ unsigned int uXc; // [sp+14h] [bp-8h]@13 signed int uXd; // [sp+14h] [bp-8h]@16 - if ( pMessageQueue_50CBD0->uNumMessages ) - pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; + pMessageQueue_50CBD0->Flush(); + pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f); ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) diff -r 3a77fbf7d0b8 -r f004c7ceb7bd UiGame.cpp --- a/UiGame.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/UiGame.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -381,7 +381,7 @@ //----- (0041C047) -------------------------------------------------------- -void __cdecl GameUI_DrawStatusBar_2() +void __cdecl GameUI_Footer_2() { unsigned int v0; // eax@1 char *v1; // edx@2 @@ -391,15 +391,15 @@ int v5; // eax@5 pRenderer->DrawTextureRGB(0, 352u, pTexture_StatusBar); - if ( GameUI_StatusBar_TimedStringTimeLeft ) + if ( GameUI_Footer_TimeLeft ) { - v1 = GameUI_StatusBar_TimedString; + v1 = GameUI_Footer_TimedString; } else { - if ( !pStatusBarString[0] ) + if ( !pFooterString[0] ) return; - v1 = pStatusBarString; + v1 = pFooterString; } LOWORD(v0) = uGameUIFontShadow; v2 = v0; @@ -418,29 +418,29 @@ int j; // eax@11 v1 = pStr; - if ( pStr && strcmp(pStr, "test") && !IsBadStringPtrA(v1, 1u) && (*v1 || GameUI_StatusBar_TimedStringTimeLeft) ) + if ( pStr && strcmp(pStr, "test") && !IsBadStringPtrA(v1, 1u) && (*v1 || GameUI_Footer_TimeLeft) ) { - if ( GameUI_StatusBar_TimedStringTimeLeft ) + if ( GameUI_Footer_TimeLeft ) { - for ( i = pFontLucida->GetLineWidth(GameUI_StatusBar_TimedString); + for ( i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString); i > 450; - i = pFontLucida->GetLineWidth(GameUI_StatusBar_TimedString) ) - byte_5C3427[strlen(GameUI_StatusBar_TimedString)] = 0; + i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString) ) + byte_5C3427[strlen(GameUI_Footer_TimedString)] = 0; } else { - strcpy(pStatusBarString, v1); - for ( j = pFontLucida->GetLineWidth(pStatusBarString); + strcpy(pFooterString, v1); + for ( j = pFontLucida->GetLineWidth(pFooterString); j > 450; - j = pFontLucida->GetLineWidth(pStatusBarString) ) - GameUI_StatusBar_TimedString[strlen(pStatusBarString) + 199] = 0; + j = pFontLucida->GetLineWidth(pFooterString) ) + GameUI_Footer_TimedString[strlen(pFooterString) + 199] = 0; } } } //----- (0041C179) -------------------------------------------------------- -void __cdecl GameUI_DrawStatusBar() - { +void GameUI_Footer() +{ unsigned int v0; // ebp@1 char *v1; // edi@5 int v2; // eax@5 @@ -455,37 +455,37 @@ int v11; // eax@13 v0 = uGameUIFontShadow; - if ( pStatusBarString[0] || GameUI_StatusBar_TimedStringTimeLeft || bForceDrawStatusBar ) + if ( pFooterString[0] || GameUI_Footer_TimeLeft || bForceDrawFooter ) { pRenderer->DrawTextureRGB(0, 352u, pTexture_StatusBar); - if ( GameUI_StatusBar_TimedStringTimeLeft ) + if ( GameUI_Footer_TimeLeft ) { - v1 = GameUI_StatusBar_TimedString; - v2 = pFontLucida->GetLineWidth(GameUI_StatusBar_TimedString); + v1 = GameUI_Footer_TimedString; + v2 = pFontLucida->GetLineWidth(GameUI_Footer_TimedString); v3 = 450; while ( v2 > 450 ) { - v4 = strlen(GameUI_StatusBar_TimedString); + v4 = strlen(GameUI_Footer_TimedString); v5 = pFontLucida; byte_5C3427[v4] = 0; - v2 = pFontLucida->GetLineWidth(GameUI_StatusBar_TimedString); + v2 = pFontLucida->GetLineWidth(GameUI_Footer_TimedString); } } else { - v1 = pStatusBarString; - v6 = pFontLucida->GetLineWidth(pStatusBarString); + v1 = pFooterString; + v6 = pFontLucida->GetLineWidth(pFooterString); v3 = 450; while ( v6 > 450 ) { - v7 = strlen(pStatusBarString); + v7 = strlen(pFooterString); v8 = pFontLucida; - GameUI_StatusBar_TimedString[v7 + 199] = 0; - v6 = pFontLucida->GetLineWidth(pStatusBarString); + GameUI_Footer_TimedString[v7 + 199] = 0; + v6 = pFontLucida->GetLineWidth(pFooterString); } } v9 = *v1 == 0; - bForceDrawStatusBar = 0; + bForceDrawFooter = 0; if ( !v9 ) { v10 = uGameUIFontMain; @@ -494,7 +494,7 @@ } } } -// 5C35BC: using guessed type int bForceDrawStatusBar; +// 5C35BC: using guessed type int bForceDrawFooter; //----- (00420EFF) -------------------------------------------------------- @@ -572,8 +572,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -599,8 +599,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -617,8 +617,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -649,8 +649,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -664,8 +664,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -679,8 +679,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -704,8 +704,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -719,8 +719,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -741,8 +741,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -756,8 +756,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -772,8 +772,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -786,8 +786,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -801,8 +801,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -825,8 +825,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -966,8 +966,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -984,8 +984,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -1002,8 +1002,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -1019,8 +1019,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -1035,8 +1035,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; @@ -1163,8 +1163,8 @@ { if ( uLastPointedObjectID != 0 ) { - pStatusBarString[0] = 0; - bForceDrawStatusBar = 1; + pFooterString[0] = 0; + bForceDrawFooter = 1; } } uLastPointedObjectID = pMouse->uPointingObjectID; diff -r 3a77fbf7d0b8 -r f004c7ceb7bd mm7_2.cpp --- a/mm7_2.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/mm7_2.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -6494,9 +6494,8 @@ } //----- (0046086A) -------------------------------------------------------- -bool Autosave() -{ - int flag; // esi@3 +void Autosave() +{ FILE *v3; // eax@7 LOD::FileHeader this_; // [sp+Ch] [bp-16Ch]@3 LOD::Directory pDir; // [sp+10Ch] [bp-6Ch]@4 @@ -6506,7 +6505,6 @@ if ( pVideoPlayer->AnyMovieLoaded() ) pVideoPlayer->Unload(); - flag = 0; pSave = pAllocator->AllocNamedChunk(0, 0xF4240, 0); pNew_LOD->CloseWriteFile(); remove("data\\new.lod"); @@ -6547,13 +6545,11 @@ pParty->sRotationX = 0; pParty->vPrevPosition.z = 1816; pParty->vPosition.y = 1816; - flag = 1; pParty->sPrevRotationY = 512; pParty->sRotationY = 512; SaveGame(1, (__int16 *)1); } pAllocator->FreeChunk(pSave); - return flag; } //----- (004610AA) -------------------------------------------------------- @@ -6742,7 +6738,7 @@ pIndoorCamera->sRotationY = 0; pIndoorCamera->sRotationX = 0; viewparams->bRedrawGameUI = 1; - uLevel_StartingPointType = 0; + uLevel_StartingPointType = MapStartPoint_Party; pSprites_LOD->_461397(); pPaletteManager->LockTestAll(); if ( pParty->pPickedItem.uItemID != 0 ) @@ -9044,8 +9040,8 @@ if ( pAudioPlayer->hAILRedbook ) AIL_redbook_stop(pAudioPlayer->hAILRedbook); pParty->Reset(); - for (uint k = 0; k < 50; ++k) - pOtherOverlayList->pOverlays[k].Reset(); + pOtherOverlayList->Reset(); + strcpy(pCurrentMapName, pStartingMapName); pParty->CreateDefaultParty(0); PlayerCreationUI_Initialize(); @@ -11394,7 +11390,7 @@ } //----- (0046BDC0) -------------------------------------------------------- -void __cdecl sub_46BDC0_UpdateUserInput_and_MapSpecificStuff() +void __cdecl UpdateUserInput_and_MapSpecificStuff() { if ( dword_6BE364_game_settings_1 & 0x80 ) { @@ -11407,7 +11403,7 @@ else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) ODM_UpdateUserInputAndOther(); - _438F8F_area_of_effect__damage_evaluate(); + area_of_effect__damage_evaluate(); } } @@ -11418,14 +11414,14 @@ BLV_ProcessPartyActions(); UpdateActors_BLV(); BLV_UpdateDoors(); - _46CC4B_check_event_triggers(); + check_event_triggers(); } //----- (0046BE0A) -------------------------------------------------------- void __cdecl ODM_UpdateUserInputAndOther() { bool v0; // eax@5 - int pOut; // [sp+8h] [bp-20h]@5 + char pOut[32]; // [sp+8h] [bp-20h]@5 UpdateObjects(); ODM_ProcessPartyActions(); @@ -11435,7 +11431,7 @@ || pParty->vPosition.y > 22528 ) { strcpy(pOutdoor->pLevelFilename, pCurrentMapName); - v0 = pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, (char *)&pOut, 32); + v0 = pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pOut, 32); if ( !bUnderwater && (pParty->uFlags & (PARTY_FLAGS_1_STANDING_ON_WATER | PARTY_FLAGS_1_FALLING | 0x04) || pParty->uFlags & 0x0200 || pParty->bFlying) || !v0 ) { if ( pParty->vPosition.x < -22528 ) @@ -11454,7 +11450,7 @@ } } UpdateActors_ODM(); - _46CC4B_check_event_triggers(); + check_event_triggers(); } //----- (0046BEF1) -------------------------------------------------------- diff -r 3a77fbf7d0b8 -r f004c7ceb7bd mm7_3.cpp --- a/mm7_3.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/mm7_3.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -485,7 +485,7 @@ } //----- (0046ED1B) -------------------------------------------------------- -int _46ED1B_collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID) +int collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID) { uint uFaceID = -1; int floor_level = BLV_GetFloorLevel(x, y, z, *pSectorID, &uFaceID); @@ -1490,23 +1490,23 @@ v7 = x; v8 = y; *pSectorID = pIndoor->GetSector(x - 2, y, z + 40); - result = _46ED1B_collide_against_floor(v5, v8, z + 40, pSectorID, pFaceID); + result = collide_against_floor(v5, v8, z + 40, pSectorID, pFaceID); if ( result == -30000 || !*pSectorID ) { *pSectorID = pIndoor->GetSector(v7 + 2, v8, z + 40); - result = _46ED1B_collide_against_floor(v7 + 2, v8, z + 40, pSectorID, pFaceID); + result = collide_against_floor(v7 + 2, v8, z + 40, pSectorID, pFaceID); if ( result == -30000 || !*pSectorID ) { *pSectorID = pIndoor->GetSector(v7, v8 - 2, z + 40); - result = _46ED1B_collide_against_floor(v7, v8 - 2, z + 40, pSectorID, pFaceID); + result = collide_against_floor(v7, v8 - 2, z + 40, pSectorID, pFaceID); if ( result == -30000 || !*pSectorID ) { *pSectorID = pIndoor->GetSector(v7, v8 + 2, z + 40); - result = _46ED1B_collide_against_floor(v7, v8 + 2, z + 40, pSectorID, pFaceID); + result = collide_against_floor(v7, v8 + 2, z + 40, pSectorID, pFaceID); if ( result == -30000 || !*pSectorID ) { *pSectorID = pIndoor->GetSector(v7, v8, z + 140); - result = _46ED1B_collide_against_floor(v7, v8, z + 140, pSectorID, pFaceID); + result = collide_against_floor(v7, v8, z + 140, pSectorID, pFaceID); } } } @@ -1606,7 +1606,7 @@ v78 = 0; v71 = 0; bJumping = 0; - v80 = _46ED1B_collide_against_floor(new_party_x, new_party_y, party_z + 40, &uSectorID, &uFaceID); + v80 = collide_against_floor(new_party_x, new_party_y, party_z + 40, &uSectorID, &uFaceID); if ( pParty->bFlying ) { pParty->bFlying = false; @@ -1958,7 +1958,7 @@ uSectorID = new_party_y + ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.y) >> 16); v40 = new_party_z + ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16); } - v42 = _46ED1B_collide_against_floor(v39, uSectorID, v40 + 40, &stru_721530.uSectorID, &uFaceID); + v42 = collide_against_floor(v39, uSectorID, v40 + 40, &stru_721530.uSectorID, &uFaceID); if ( v42 == -30000 || v42 - new_party_z > 128 ) return; if ( stru_721530.field_7C >= stru_721530.field_6C ) @@ -12326,7 +12326,7 @@ } //----- (00444C8F) -------------------------------------------------------- -GUIWindow *__cdecl UI_CreateTravelDialogue() +void UI_CreateTravelDialogue() { //signed int v0; // eax@1 unsigned int v1; // eax@6 @@ -12351,9 +12351,9 @@ LABEL_6:*/ switch (pParty->alignment) { - case PartyAlignment_Good: sprintf(pContainer, "evt%02d-b", const_2()); - case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); - case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); + case PartyAlignment_Good: sprintf(pContainer, "evt%02d-b", const_2()); break; + case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break; + case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); break; default: assert(false); } @@ -12364,9 +12364,7 @@ sprintf(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" else strcpy(sHouseName, pGlobalTXT_LocalizationStrings[79]);// "Exit" - result = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, (int)sHouseName); - pDialogueWindow = result; - return result; + pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ChangeLocation, 0, (int)sHouseName); } //----- (00444D80) -------------------------------------------------------- @@ -12394,7 +12392,6 @@ { unsigned int v0; // edi@1 MapInfo *v1; // edi@2 - char *v2; // ST14_4@2 signed int v3; // eax@2 int v4; // eax@5 const char *v5; // [sp-Ch] [bp-90h]@3 @@ -12410,17 +12407,15 @@ pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); pRenderer->DrawTextureTransparent(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_507B04]); pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); - pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, &pIcons_LOD->pTextures[uTextureID_x_x_u]); - pRenderer->DrawTextureIndexed(0x1DCu, 0x1C3u, - (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); + pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, pIcons_LOD->GetTexture(uTextureID_x_x_u)); + pRenderer->DrawTextureIndexed(0x1DCu, 0x1C3u, pIcons_LOD->GetTexture(uTextureID_x_ok_u)); if ( v0 ) { v1 = &pMapStats->pInfos[v0]; v7.uFrameX = 493; v7.uFrameWidth = 126; - v2 = v1->pName; v7.uFrameZ = 366; - v7.DrawTitleText(pFontCreate, 0, 4u, 0, v2, 3u); + v7.DrawTitleText(pFontCreate, 0, 4u, 0, v1->pName, 3); v7.uFrameX = 483; v7.uFrameWidth = 148; v7.uFrameZ = 334; @@ -12482,7 +12477,7 @@ if ( pGUIWindow2->field_40 == 2 ) { pGUIWindow2->field_40 = 0; - strcpy(GameUI_StatusBar_TimedString, (const char *)pKeyActionMap->pPressedKeysBuffer); + strcpy(GameUI_Footer_TimedString, (const char *)pKeyActionMap->pPressedKeysBuffer); LABEL_16: sub_4452BB(); return; @@ -12491,12 +12486,12 @@ return; pGUIWindow2->field_40 = 0; LABEL_15: - memset(GameUI_StatusBar_TimedString, 0, 0xC8u); + memset(GameUI_Footer_TimedString, 0, 0xC8u); goto LABEL_16; } if ( pGUIWindow2->ptr_1C == (void *)26 ) { - sprintf(Str, "%s %s", GameUI_StatusBar_TimedString, pKeyActionMap->pPressedKeysBuffer); + sprintf(Str, "%s %s", GameUI_Footer_TimedString, pKeyActionMap->pPressedKeysBuffer); v3 = pFontLucida->GetLineWidth(Str); pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, Str, 0, 0, 0); pGUIWindow2->DrawFlashingInputCursor(v3 + 13, 357, pFontLucida); @@ -13522,8 +13517,8 @@ //----- (00448B45) -------------------------------------------------------- void __thiscall GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide) { - if ( bForceHide || GameUI_StatusBar_TimedStringTimeLeft && GetTickCount() >= GameUI_StatusBar_TimedStringTimeLeft ) - GameUI_StatusBar_TimedStringTimeLeft = 0; + if ( bForceHide || GameUI_Footer_TimeLeft && GetTickCount() >= GameUI_Footer_TimeLeft ) + GameUI_Footer_TimeLeft = 0; } //----- (00448B67) -------------------------------------------------------- @@ -14240,31 +14235,28 @@ // 4EE088: using guessed type __int16 word_4EE088_sound_ids[]; //----- (0044987B) -------------------------------------------------------- -char *__fastcall sub_44987B(const char *pMapName, unsigned int uStartingPointType) +void sub_44987B(const char *pMapName, MapStartPoint start_point) { const char *v2; // edi@1 - unsigned int v3; // ebx@1 - char *result; // eax@3 v2 = pMapName; - v3 = uStartingPointType; pAudioPlayer->StopChannels(-1, -1); pGameLoadingUI_ProgressBar->Initialize(GUIProgressBar::TYPE_None); if ( _strcmpi(pCurrentMapName, v2) ) SaveGame(1, 0); + uGameState = 2; - result = strcpy(pCurrentMapName, v2); - uLevel_StartingPointType = v3; - return result; + strcpy(pCurrentMapName, v2); + uLevel_StartingPointType = start_point; } // 6BE35C: using guessed type int uLevel_StartingPointType; //----- (004498D5) -------------------------------------------------------- -void __thiscall TeleportToStartingPoint(unsigned int uPointType) -{ - unsigned int v1; // ecx@2 - int v2; // ecx@3 - int v3; // ecx@4 +void TeleportToStartingPoint(MapStartPoint point) +{ + //unsigned int v1; // ecx@2 + //int v2; // ecx@3 + //int v3; // ecx@4 unsigned __int16 v4; // ax@11 signed int v5; // ecx@12 LevelDecoration *v6; // edx@13 @@ -14274,40 +14266,15 @@ const char *v10; // [sp-4h] [bp-84h]@6 char pName[128]; // [sp+8h] [bp-78h]@11 - if ( uPointType ) - { - v1 = uPointType - 1; - if ( v1 ) - { - v2 = v1 - 1; - if ( v2 ) - { - v3 = v2 - 1; - if ( v3 ) - { - if ( v3 != 1 ) - return; - v10 = "West Start"; - } - else - { - v10 = "East Start"; - } - } - else - { - v10 = "South Start"; - } - } - else - { - v10 = "North Start"; - } - } - else - { - v10 = "Party Start"; - } + switch (point) + { + case MapStartPoint_Party: v10 = "Party Start"; break; + case MapStartPoint_North: v10 = "North Start"; break; + case MapStartPoint_South: v10 = "South Start"; break; + case MapStartPoint_East: v10 = "East Start"; break; + case MapStartPoint_West: v10 = "West Start"; break; + } + strcpy(pName, v10); v4 = pDecorationList->GetDecorIdByName(pName); if ( v4 ) @@ -14509,18 +14476,18 @@ int i; // eax@1 v2 = uNumSeconds; - strcpy(GameUI_StatusBar_TimedString, pString); - GameUI_StatusBar_TimedStringTimeLeft = 1000 * v2 + GetTickCount(); - for ( i = pFontLucida->GetLineWidth(GameUI_StatusBar_TimedString); + strcpy(GameUI_Footer_TimedString, pString); + GameUI_Footer_TimeLeft = 1000 * v2 + GetTickCount(); + for ( i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString); i > 450; - i = pFontLucida->GetLineWidth(GameUI_StatusBar_TimedString) ) - byte_5C3427[strlen(GameUI_StatusBar_TimedString)] = 0; + i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString) ) + byte_5C3427[strlen(GameUI_Footer_TimedString)] = 0; } //----- (0044C1D0) -------------------------------------------------------- void __cdecl ShowNothingHereStatus() { - if ( !GameUI_StatusBar_TimedStringTimeLeft ) + if ( !GameUI_Footer_TimeLeft ) ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here } @@ -14546,7 +14513,7 @@ dword_5B65BC = 0; dword_5B65C0 = 0; pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; - sub_44987B("nwc.blv", 0); + sub_44987B("nwc.blv", MapStartPoint_Party); pCurrentScreen = SCREEN_GAME; result = 1; } @@ -15021,7 +14988,7 @@ // 4F75D8: using guessed type int ai_arrays_size; //----- (00401A91) -------------------------------------------------------- -void __cdecl sub_401A91_AI() +void __cdecl UpdateActorAI() { //unsigned int v0; // esi@4 int v1; // eax@7 diff -r 3a77fbf7d0b8 -r f004c7ceb7bd mm7_4.cpp --- a/mm7_4.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/mm7_4.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -56,7 +56,7 @@ #include "mm7_data.h" //----- (0046CC4B) -------------------------------------------------------- -void __cdecl _46CC4B_check_event_triggers() +void __cdecl check_event_triggers() { int v0; // eax@1 LevelDecoration *v1; // esi@2 @@ -2518,8 +2518,8 @@ v14->ReceiveDamage((signed __int64)v15, 0); if ( pParty->uFlags & 4 ) { - strcpy(GameUI_StatusBar_TimedString, pGlobalTXT_LocalizationStrings[660]); - GameUI_StatusBar_TimedStringTimeLeft = 128; + strcpy(GameUI_Footer_TimedString, pGlobalTXT_LocalizationStrings[660]); + GameUI_Footer_TimeLeft = 128; } goto LABEL_39; } @@ -2547,8 +2547,8 @@ v17->ReceiveDamage((signed __int64)v18, 0); if ( pParty->uFlags & 0x200 ) { - strcpy(GameUI_StatusBar_TimedString, pGlobalTXT_LocalizationStrings[661]); - GameUI_StatusBar_TimedStringTimeLeft = 128; + strcpy(GameUI_Footer_TimedString, pGlobalTXT_LocalizationStrings[661]); + GameUI_Footer_TimeLeft = 128; } ++v16; } diff -r 3a77fbf7d0b8 -r f004c7ceb7bd mm7_5.cpp --- a/mm7_5.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/mm7_5.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -262,9 +262,9 @@ POINT v210; // [sp+80h] [bp-57Ch]@397 POINT v211; // [sp+88h] [bp-574h]@704 __int64 v212; // [sp+90h] [bp-56Ch]@467 - char v213; // [sp+98h] [bp-564h]@385 - char pLevelName; // [sp+9Ch] [bp-560h]@380 - char pOut; // [sp+BCh] [bp-540h]@370 + int v213; // [sp+98h] [bp-564h]@385 + char pLevelName[32]; // [sp+9Ch] [bp-560h]@380 + char pOut[32]; // [sp+BCh] [bp-540h]@370 FrameTableTxtLine v216; // [sp+DCh] [bp-520h]@524 int v217[9]; // [sp+158h] [bp-4A4h]@652 FrameTableTxtLine v218; // [sp+17Ch] [bp-480h]@524 @@ -1056,7 +1056,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -1088,7 +1088,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -1279,7 +1279,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -1328,7 +1328,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -1368,7 +1368,7 @@ } goto LABEL_317; case SCREEN_BRANCHLESS_NPC_DIALOG: - memset(GameUI_StatusBar_TimedString, 0, 0xC8u); + memset(GameUI_Footer_TimedString, 0, 0xC8u); sub_4452BB(); goto LABEL_317; case SCREEN_CHANGE_LOCATION: @@ -1398,7 +1398,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -1426,7 +1426,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -1460,7 +1460,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -1526,7 +1526,7 @@ pWindow3->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); continue; @@ -1606,7 +1606,7 @@ pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)2; dword_5B65C0 = _5B65A8_npcdata_uflags_or_other | _5B65AC_npcdata_fame_or_other | _5B65B0_npcdata_rep_or_other | _5B65B4_npcdata_loword_house_or_other | _5B65B8_npcdata_hiword_house_or_other | v38; OnMapLeave(); - sub_44987B(dword_591164_teleport_map_name, 0); + sub_44987B(dword_591164_teleport_map_name, MapStartPoint_Party); } } else @@ -1628,7 +1628,7 @@ v39 = GetAsyncKeyState(VK_SHIFT); v40 = CycleCharacter(v39); goto LABEL_421; - case UIMSG_5A: + case UIMSG_OnTravelByFoot: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; dword_50CDC8 = v0; @@ -1636,7 +1636,7 @@ pNPCData4 = (NPCData *)GetTravelTime(); strcpy(pOutdoor->pLevelFilename, pCurrentMapName); if ( bUnderwater != 1 && pParty->bFlying - || pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, &pOut, 20) != v0 ) + || pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pOut, 20) != v0 ) { viewparams->bRedrawGameUI = v0; LABEL_387: @@ -1694,12 +1694,12 @@ } pPaletteManager->ResetNonLocked(); pSpriteFrameTable->ResetSomeSpriteFlags(); - strcpy(pCurrentMapName, &pOut); - strcpy(&pLevelName, pCurrentMapName); - v41 = strtok(&pLevelName, "."); - strcpy(&pLevelName, v41); - Level_LoadEvtAndStr(&pLevelName); - pDecalBuilder->Reset( 0); + strcpy(pCurrentMapName, pOut); + strcpy(pLevelName, pCurrentMapName); + v41 = strtok(pLevelName, "."); + strcpy(pLevelName, v41); + Level_LoadEvtAndStr(pLevelName); + pDecalBuilder->Reset(0); LoadLevel_InitializeLevelEvt(); uLevelMapStatsID = pMapStats->GetMapInfo(pCurrentMapName); bUnderwater = 0; @@ -1719,7 +1719,7 @@ OnMapLoad(); pOutdoor->SetFog(); TeleportToStartingPoint(uLevel_StartingPointType); - pParty->vPosition.z = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.y, (int *)&v213, 0); + pParty->vPosition.z = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.y, &v213, 0); pParty->uFallStartY = pParty->vPosition.z; sub_461103(); pEventTimer->Resume(); @@ -1761,7 +1761,7 @@ pWindow3->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); continue; @@ -1782,7 +1782,7 @@ pWindow3->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); continue; @@ -1811,7 +1811,7 @@ pWindow3->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); continue; @@ -1835,7 +1835,7 @@ pWindow3->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); continue; @@ -1875,7 +1875,7 @@ pGUIWindow_Settings = 0; pEventTimer->Resume(); pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; } } @@ -2425,7 +2425,7 @@ pWindow3->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); continue; @@ -3893,7 +3893,7 @@ { GUIWindow::Create(580, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0); if ( PlayerCreation_ComputeAttributeBonus() || !PlayerCreation_Chose4Skills() ) - GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000; + GameUI_Footer_TimeLeft = GetTickCount() + 4000; else uGameState = 6; continue; @@ -4473,7 +4473,7 @@ } //----- (00438F8F) -------------------------------------------------------- -void __cdecl _438F8F_area_of_effect__damage_evaluate() +void __cdecl area_of_effect__damage_evaluate() { int v0; // edx@1 char *v1; // esi@2 diff -r 3a77fbf7d0b8 -r f004c7ceb7bd mm7_6.cpp --- a/mm7_6.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/mm7_6.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -2274,7 +2274,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = nullptr; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } @@ -2409,7 +2409,7 @@ pGUIWindow_Settings->Release(); pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); - GameUI_StatusBar_TimedStringTimeLeft = 0; + GameUI_Footer_TimeLeft = 0; unk_50C9A0 = 0; back_to_game(); } diff -r 3a77fbf7d0b8 -r f004c7ceb7bd mm7_data.cpp --- a/mm7_data.cpp Mon Mar 25 02:20:57 2013 +0600 +++ b/mm7_data.cpp Mon Mar 25 02:21:14 2013 +0600 @@ -956,168 +956,6 @@ int dword_4E98BC_bApplicationActive; // weak //char *off_4EB080; // idb char *pTransitionStrings[465] = {"", nullptr}; // 004EB080 -char aAwards_txt[777]; // idb -char aScroll_txt[777]; // idb -char aMerchant_txt[777]; // idb -char aTrans_txt[777]; // idb -char aTeacher[777]; // idb -char aObelisk[777]; // idb -char aSeer[777]; // idb -char aStat[777]; // idb -char aPotion[777]; // idb -char aAutonote_txt[777]; // idb -char aQuests_txt[777]; // idb -char aNpcdist_txt[777]; // idb -char aNpctopic_txt[777]; // idb -char aNpctext_txt[777]; // idb -char aNpcnews_txt[777]; // idb -char aNpcgroup_txt[777]; // idb -char aNpcgreet_txt[777]; // idb -char aNpcdata_txt[777]; // idb -char aNpcprof_txt[777]; // idb -char aNpcnames_txt[777]; // idb -char aD3dVersionOfRe[777]; // idb -char aEWorkMsdevM_16[777]; // idb -char aLevels_0[777]; // idb -char aDmap[777]; // idb -char aAmap[777]; // idb -char aTmap[777]; // idb -char aHmap[777]; // idb - -char aInvalidGroundT[777]; // idb -char aInvalidSkyTexH[777]; // idb -char aIdlist[777]; // idb -char aOmap[777]; // idb -char aCmap[777]; // idb -char aMm6OutdoorV1_0[777]; // idb -char aI6_odm[777]; // idb -char aBlank[777]; // idb -char aHm005[777]; // idb -char aSky043[777]; // idb -char aDefault_odm[777]; // idb -char aPlansky3[777]; // idb -char aPlanskyD[777]; // idb -char a_ddm[5]; // weak -char aCanTLoadFile[777]; // idb -char aEWorkMsdevM_17[777]; // idb -char a_odm[777]; // idb -char aUnableToFindSI[777]; // idb -char aSpawn[777]; // idb -char aBddata[777]; // idb -char aTernorm[777]; // idb -char aGrastyl[777]; // idb -char aOut09_odm[777]; // idb -char aNewedges[777]; // idb -char aSurfs[777]; // idb -char aEdges[777]; // idb -char aSpans[777]; // idb -char aTheTextureFram[777]; // idb -char aEWorkMsdevM_18[777]; // idb -char aWtrtyla[777]; // idb -char aWtrtyl[777]; // idb -char aUnableToSave_1[777]; // idb -char aDataDtile_bin[777]; // idb -char aTileDescrip[777]; // idb -char aTtattr_transit[777]; // idb -char aTtattr_nodraw[777]; // idb -char aTtattr_wave[777]; // idb -char aTtattr_flat[777]; // idb -char aTtattr_repulse[777]; // idb -char aTtattr_block[777]; // idb -char aTtattr_water2[777]; // idb -char aTtattr_water[777]; // idb -char aTtattr_burn[777]; // idb -char aTtsect_dnw[777]; // idb -char aTtsect_dse[777]; // idb -char aTtsect_dne[777]; // idb -char aTtsect_dsw[777]; // idb -char aTtsect_de[777]; // idb -char aTtsect_dw[777]; // idb -char aTtsect_ds[777]; // idb -char aTtsect_dn[777]; // idb -char aTtsect_wcap[777]; // idb -char aTtsect_scap[777]; // idb -char aTtsect_ecap[777]; // idb -char aTtsect_ncap[777]; // idb -char aTtsect_ew_s[777]; // idb -char aTtsect_ew_n[777]; // idb -char aTtsect_ns_w[777]; // idb -char aTtsect_ns_e[777]; // idb -char aTtsect_s_w[777]; // idb -char aTtsect_s_e[777]; // idb -char aTtsect_n_w[777]; // idb -char aTtsect_n_e[777]; // idb -char aTtsect_ew[777]; // idb -char aTtsect_ns[777]; // idb -char aTtsect_cros[777]; // idb -char aTtsect_xsw1[777]; // idb -char aTtsect_xse1[777]; // idb -char aTtsect_xnw1[777]; // idb -char aTtsect_xne1[777]; // idb -char aTtsect_s1[777]; // idb -char aTtsect_n1[777]; // idb -char aTtsect_w1[777]; // idb -char aTtsect_e1[777]; // idb -char aTtsect_sw1[777]; // idb -char aTtsect_se1[777]; // idb -char aTtsect_nw1[777]; // idb -char aTtsect_ne1[777]; // idb -char aTtsect_speci_6[777]; // idb -char aTtsect_speci_5[777]; // idb -char aTtsect_speci_4[777]; // idb -char aTtsect_speci_3[777]; // idb -char aTtsect_speci_2[777]; // idb -char aTtsect_speci_1[777]; // idb -char aTtsect_speci_0[777]; // idb -char aTtsect_special[777]; // idb -char aTtsect_base4[777]; // idb -char aTtsect_base3[777]; // idb -char aTtsect_base2[777]; // idb -char aTtsect_base1[777]; // idb -char aTtsect_start[777]; // idb -char aTtsect_null[777]; // idb -char aTttype_roadcit[777]; // idb -char aTttype_roads_2[777]; // idb -char aTttype_roadsno[777]; // idb -char aTttype_roadt_0[777]; // idb -char aTttype_roadtro[777]; // idb -char aTttype_roads_1[777]; // idb -char aTttype_roadswa[777]; // idb -char aTttype_roadv_0[777]; // idb -char aTttype_roadvol[777]; // idb -char aTttype_roads_0[777]; // idb -char aTttype_roadsan[777]; // idb -char aTttype_roadc_0[777]; // idb -char aTttype_roadcra[777]; // idb -char aTttype_roadg_0[777]; // idb -char aTttype_roadgra[777]; // idb -char aTttype_city[777]; // idb -char aTttype_swamp[777]; // idb -char aTttype_tropica[777]; // idb -char aTttype_water[777]; // idb -char aTttype_dirt[777]; // idb -char aTttype_volcano[777]; // idb -char aTttype_sand[777]; // idb -char aTttype_snow[777]; // idb -char aTttype_cracked[777]; // idb -char aTttype_grass[777]; // idb -char aTttype_start[777]; // idb -char aTttype_null[777]; // idb -char aTiletableLoadO[777]; // idb -char aTiletableLoadU[777]; // idb -char byte_4ECA93[777]; // weak -char byte_4ECACF[777]; // weak -char aError_0[777]; // idb -char aCouldnTLoadMap[777]; // idb -char aOut02d_odm[777]; // idb -char aOut14_odm[777]; // idb -char aOut[777]; // idb -char aLunSun[777]; // idb -char aLunfull[777]; // idb -char aLun34[777]; // idb -char aLun12[777]; // idb -char aLun14[777]; // idb -char aPal03i[777]; // idb const char *pPlayerPortraitsNames[25] = { "pc01-", "pc02", "pc03", "pc04", "pc05-", @@ -1845,10 +1683,10 @@ int dword_5C341C; // weak int _5C3420_pDecoration; char byte_5C3427[777]; // weak -char GameUI_StatusBar_TimedString[200]; -char pStatusBarString[200]; -unsigned int GameUI_StatusBar_TimedStringTimeLeft; -int bForceDrawStatusBar; // weak +char GameUI_Footer_TimedString[200]; +char pFooterString[200]; +unsigned int GameUI_Footer_TimeLeft; +int bForceDrawFooter; // weak int dword_5C35C0; // weak int bDialogueUI_InitializeActor_NPC_ID; // weak int dword_5C35C8; // weak @@ -1989,7 +1827,6 @@ int dword_6BE340; // weak char pCurrentMapName[20]; // idb unsigned int uLevelMapStatsID; -int uLevel_StartingPointType; // weak int dword_6BE364_game_settings_1 = 0; // weak int dword_6BE368_debug_settings_2 = 0; // weak unsigned __int8 bUseLoResSprites = false; diff -r 3a77fbf7d0b8 -r f004c7ceb7bd mm7_data.h --- a/mm7_data.h Mon Mar 25 02:20:57 2013 +0600 +++ b/mm7_data.h Mon Mar 25 02:21:14 2013 +0600 @@ -799,171 +799,10 @@ extern unsigned int saveload_dlg_ws[2]; extern int dword_4E98BC_bApplicationActive; // weak extern char *pTransitionStrings[]; // 4EB080 -extern char aAwards_txt[]; // idb -extern char aScroll_txt[]; // idb -extern char aMerchant_txt[]; // idb -extern char aTrans_txt[]; // idb -extern char aTeacher[]; // idb -extern char aObelisk[]; // idb -extern char aSeer[]; // idb -extern char aStat[]; // idb -extern char aPotion[]; // idb -extern char aAutonote_txt[]; // idb -extern char aQuests_txt[]; // idb -extern char aNpcdist_txt[]; // idb -extern char aNpctopic_txt[]; // idb -extern char aNpctext_txt[]; // idb -extern char aNpcnews_txt[]; // idb -extern char aNpcgroup_txt[]; // idb -extern char aNpcgreet_txt[]; // idb -extern char aNpcdata_txt[]; // idb -extern char aNpcprof_txt[]; // idb -extern char aNpcnames_txt[]; // idb -extern char aD3dVersionOfRe[]; // idb -extern char aEWorkMsdevM_16[]; // idb -extern char aLevels_0[]; // idb -extern char aDmap[]; // idb -extern char aAmap[]; // idb -extern char aTmap[]; // idb -extern char aHmap[]; // idb extern int dword_4EC268[]; // weak extern int dword_4EC28C[]; // weak extern int dword_4EC2A8; // weak extern int dword_4EC2AC; // weak -extern char aInvalidGroundT[]; // idb -extern char aInvalidSkyTexH[]; // idb -extern char aIdlist[]; // idb -extern char aOmap[]; // idb -extern char aCmap[]; // idb -extern char aMm6OutdoorV1_0[]; // idb -extern char aI6_odm[]; // idb -extern char aBlank[]; // idb -extern char aHm005[]; // idb -extern char aSky043[]; // idb -extern char aDefault_odm[]; // idb -extern char aPlansky3[]; // idb -extern char aPlanskyD[]; // idb -extern char a_ddm[5]; // weak -extern char aCanTLoadFile[]; // idb -extern char aEWorkMsdevM_17[]; // idb -extern char a_odm[]; // idb -extern char aUnableToFindSI[]; // idb -extern char aSpawn[]; // idb -extern char aBddata[]; // idb -extern char aTernorm[]; // idb -extern char aGrastyl[]; // idb -extern char aOut09_odm[]; // idb -extern char aNewedges[]; // idb -extern char aSurfs[]; // idb -extern char aEdges[]; // idb -extern char aSpans[]; // idb -extern char aTheTextureFram[]; // idb -extern char aEWorkMsdevM_18[]; // idb -extern char aWtrtyla[]; // idb -extern char aWtrtyl[]; // idb -extern char aUnableToSave_1[]; // idb -extern char aDataDtile_bin[]; // idb -extern char aTileDescrip[]; // idb -extern char aTtattr_transit[]; // idb -extern char aTtattr_nodraw[]; // idb -extern char aTtattr_wave[]; // idb -extern char aTtattr_flat[]; // idb -extern char aTtattr_repulse[]; // idb -extern char aTtattr_block[]; // idb -extern char aTtattr_water2[]; // idb -extern char aTtattr_water[]; // idb -extern char aTtattr_burn[]; // idb -extern char aTtsect_dnw[]; // idb -extern char aTtsect_dse[]; // idb -extern char aTtsect_dne[]; // idb -extern char aTtsect_dsw[]; // idb -extern char aTtsect_de[]; // idb -extern char aTtsect_dw[]; // idb -extern char aTtsect_ds[]; // idb -extern char aTtsect_dn[]; // idb -extern char aTtsect_wcap[]; // idb -extern char aTtsect_scap[]; // idb -extern char aTtsect_ecap[]; // idb -extern char aTtsect_ncap[]; // idb -extern char aTtsect_ew_s[]; // idb -extern char aTtsect_ew_n[]; // idb -extern char aTtsect_ns_w[]; // idb -extern char aTtsect_ns_e[]; // idb -extern char aTtsect_s_w[]; // idb -extern char aTtsect_s_e[]; // idb -extern char aTtsect_n_w[]; // idb -extern char aTtsect_n_e[]; // idb -extern char aTtsect_ew[]; // idb -extern char aTtsect_ns[]; // idb -extern char aTtsect_cros[]; // idb -extern char aTtsect_xsw1[]; // idb -extern char aTtsect_xse1[]; // idb -extern char aTtsect_xnw1[]; // idb -extern char aTtsect_xne1[]; // idb -extern char aTtsect_s1[]; // idb -extern char aTtsect_n1[]; // idb -extern char aTtsect_w1[]; // idb -extern char aTtsect_e1[]; // idb -extern char aTtsect_sw1[]; // idb -extern char aTtsect_se1[]; // idb -extern char aTtsect_nw1[]; // idb -extern char aTtsect_ne1[]; // idb -extern char aTtsect_speci_6[]; // idb -extern char aTtsect_speci_5[]; // idb -extern char aTtsect_speci_4[]; // idb -extern char aTtsect_speci_3[]; // idb -extern char aTtsect_speci_2[]; // idb -extern char aTtsect_speci_1[]; // idb -extern char aTtsect_speci_0[]; // idb -extern char aTtsect_special[]; // idb -extern char aTtsect_base4[]; // idb -extern char aTtsect_base3[]; // idb -extern char aTtsect_base2[]; // idb -extern char aTtsect_base1[]; // idb -extern char aTtsect_start[]; // idb -extern char aTtsect_null[]; // idb -extern char aTttype_roadcit[]; // idb -extern char aTttype_roads_2[]; // idb -extern char aTttype_roadsno[]; // idb -extern char aTttype_roadt_0[]; // idb -extern char aTttype_roadtro[]; // idb -extern char aTttype_roads_1[]; // idb -extern char aTttype_roadswa[]; // idb -extern char aTttype_roadv_0[]; // idb -extern char aTttype_roadvol[]; // idb -extern char aTttype_roads_0[]; // idb -extern char aTttype_roadsan[]; // idb -extern char aTttype_roadc_0[]; // idb -extern char aTttype_roadcra[]; // idb -extern char aTttype_roadg_0[]; // idb -extern char aTttype_roadgra[]; // idb -extern char aTttype_city[]; // idb -extern char aTttype_swamp[]; // idb -extern char aTttype_tropica[]; // idb -extern char aTttype_water[]; // idb -extern char aTttype_dirt[]; // idb -extern char aTttype_volcano[]; // idb -extern char aTttype_sand[]; // idb -extern char aTttype_snow[]; // idb -extern char aTttype_cracked[]; // idb -extern char aTttype_grass[]; // idb -extern char aTttype_start[]; // idb -extern char aTttype_null[]; // idb -extern char aTiletableLoadO[]; // idb -extern char aTiletableLoadU[]; // idb -extern char byte_4ECA93[]; // weak -extern char byte_4ECACF[]; // weak -extern char aError_0[]; // idb -extern char aCouldnTLoadMap[]; // idb -extern char aOut02d_odm[]; // idb -extern char aOut14_odm[]; // idb -extern char aOut[]; // idb -extern char aLunSun[]; // idb -extern char aLunfull[]; // idb -extern char aLun34[]; // idb -extern char aLun12[]; // idb -extern char aLun14[]; // idb -extern char aPal03i[]; // idb extern const char *pPlayerPortraitsNames[25]; extern const char *dlad_texnames_by_face[25]; extern const char *dlau_texnames_by_face[25]; @@ -1350,10 +1189,10 @@ extern int dword_5C341C; // weak extern int _5C3420_pDecoration; extern char byte_5C3427[]; // weak -extern char GameUI_StatusBar_TimedString[200]; -extern char pStatusBarString[200]; -extern unsigned int GameUI_StatusBar_TimedStringTimeLeft; -extern int bForceDrawStatusBar; // weak +extern char GameUI_Footer_TimedString[200]; +extern char pFooterString[200]; +extern unsigned int GameUI_Footer_TimeLeft; +extern int bForceDrawFooter; // weak extern int dword_5C35C0; // weak extern int bDialogueUI_InitializeActor_NPC_ID; // weak extern int dword_5C35C8; // weak @@ -1497,7 +1336,6 @@ extern int dword_6BE340; // weak extern char pCurrentMapName[20]; // idb extern unsigned int uLevelMapStatsID; -extern int uLevel_StartingPointType; // weak extern int dword_6BE364_game_settings_1; // weak extern int dword_6BE368_debug_settings_2; // weak extern unsigned __int8 bUseLoResSprites; @@ -1738,7 +1576,7 @@ void __stdcall mm7__vector_constructor(void *a1, int objSize, int numObjs, int (__thiscall *constructor)(int)); void MakeActorAIList_ODM(); int __cdecl MakeActorAIList_BLV(); -void __cdecl sub_401A91_AI(); +void __cdecl UpdateActorAI(); bool __fastcall sub_4070EF_prolly_collide_objects(unsigned int uObjID, unsigned int uObj2ID); bool __fastcall sub_4075DB(int a1, int a2, int a3, struct BLVFace *a4); bool __fastcall sub_4077F1(int a1, int a2, int a3, struct ODMFace *a4, struct BSPVertexBuffer *a5); @@ -1874,9 +1712,9 @@ int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall); void __cdecl MainMenuUI_LoadFontsAndSomeStuff(); void __cdecl MainMenuUI_Create(); -void __cdecl GameUI_DrawStatusBar_2(); +void __cdecl GameUI_Footer_2(); void __thiscall sub_41C0B8_set_status_string(const char *pStr); // idb -void __cdecl GameUI_DrawStatusBar(); +void __cdecl GameUI_Footer(); bool __thiscall sub_41CD4F(unsigned int _this); char __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2); void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb @@ -1940,7 +1778,7 @@ void __cdecl nullsub_4(); // idb void __cdecl nullsub_5(); // idb void __cdecl nullsub_6(); // idb -void __cdecl _438F8F_area_of_effect__damage_evaluate(); +void __cdecl area_of_effect__damage_evaluate(); void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, struct Vec3_int_ *pPos, unsigned int a4); void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2); // idb double __fastcall sub_43AE12(signed int a1); @@ -1994,7 +1832,7 @@ char *__thiscall GetEventHintString(unsigned int uEventID); // idb unsigned int __fastcall sub_444839_move_map(unsigned int a1, int a2, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName); // idb void TransitionUI_Draw(); -struct GUIWindow *__cdecl UI_CreateTravelDialogue(); +void UI_CreateTravelDialogue(); signed int __cdecl GetTravelTime(); void __cdecl TravelUI_Draw(); void __cdecl DrawBranchlessDialogueUI(); @@ -2022,8 +1860,6 @@ void __thiscall OnTimer(int a1); void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName); void __fastcall sub_448DF8_cast_spell(int spellnum, int rank, int level, int fromx, int fromy, int fromz, int tox, int toy, int toz); -char *__fastcall sub_44987B(const char *pMapName, unsigned int uStartingPointType); // idb -void __thiscall TeleportToStartingPoint(unsigned int uPointType); // idb __int16 __fastcall sub_449A49_door_switch_animation(unsigned int uDoorID, int a2); // idb bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2); void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle); // idb @@ -2073,7 +1909,7 @@ void __cdecl TryLoadLevelFromLOD(); void __cdecl sub_46080D(); bool __cdecl Initialize_GamesLOD_NewLOD(); -bool Autosave(); +void Autosave(); void __thiscall PrepareToLoadBLV(unsigned int bLoading); void __fastcall PrepareToLoadODM(unsigned int bLoading, struct OutdoorCamera *a2); void __cdecl sub_461103(); @@ -2127,11 +1963,11 @@ int __cdecl sub_46A99B(); void *__thiscall unknown_libname_8(void *_this, char a2); unsigned int __cdecl GetGravityStrength(); -void __cdecl sub_46BDC0_UpdateUserInput_and_MapSpecificStuff(); +void __cdecl UpdateUserInput_and_MapSpecificStuff(); void __cdecl BLV_UpdateUserInputAndOther(); void __cdecl ODM_UpdateUserInputAndOther(); bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2); -void __cdecl _46CC4B_check_event_triggers(); +void __cdecl check_event_triggers(); int BLV_GetFloorLevel(int x, int y, int z, unsigned int uSectorID, unsigned int *pFaceID); int __fastcall ODM_GetFloorLevel(int X, signed int Y, int Z, int a4, int *a5, int *a6, int a7); int __fastcall sub_46D8E3(int a1, signed int a2, int a3, int a4); @@ -2142,7 +1978,7 @@ void __fastcall _46E26D_collide_against_sprites(signed int a1, signed int a2); int __thiscall _46E44E_collide_against_faces_and_portals(unsigned int b1); // idb int __fastcall _46E889_collide_against_bmodels(unsigned int ecx0); -int _46ED1B_collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb +int collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb void __fastcall _46ED8A_collide_against_sprite_objects(unsigned int _this); int __thiscall _46EF01_collision_chech_player(int a1); // idb signed int __cdecl _46F04E_collide_against_portals();