diff mm7_2.cpp @ 1982:2647e2f820a6

Слияние
author Ritor1
date Fri, 01 Nov 2013 14:44:06 +0600
parents c1c74df0a33e
children b00f5bb7d930
line wrap: on
line diff
--- a/mm7_2.cpp	Fri Nov 01 14:43:54 2013 +0600
+++ b/mm7_2.cpp	Fri Nov 01 14:44:06 2013 +0600
@@ -115,7 +115,7 @@
     {
       for (int i = 0; i < 4; ++i)
       {
-        auto player = &pParty->pPlayers[i];
+        Player* player = &pParty->pPlayers[i];
         player->sHealth = player->GetMaxHealth();
 
         for (int j = 0; j < 14; ++j)
@@ -129,11 +129,11 @@
     {
       for (int i = 0; i < 4; ++i)
       {
-        auto player = &pParty->pPlayers[i];
+        Player* player = &pParty->pPlayers[i];
         player->sHealth = player->GetMaxHealth();
 
-        auto v5 = LODWORD(player->pConditions[19]);//*((int *)v4 - 32);
-        auto v6 = HIDWORD(player->pConditions[19]);//*((int *)v4 - 31);
+        int v5 = LODWORD(player->pConditions[19]);//*((int *)v4 - 32);
+        int v6 = HIDWORD(player->pConditions[19]);//*((int *)v4 - 31);
         memset(player->pConditions.data(), 0, 0xA0u);
 
         __debugbreak();
@@ -173,7 +173,7 @@
       }
       else
       {
-        auto v19 = pOtherOverlayList->_4418B1(10008, 203, 0, 65536);
+        int v19 = pOtherOverlayList->_4418B1(10008, 203, 0, 65536);
         pParty->pPartyBuffs[PARTY_BUFF_FLY].Apply(pParty->uTimePlayed + 60 * (256 * 2), 3, 1, v19, 0);
         pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags |= 1u;
         pAudioPlayer->PlaySound(SOUND_11090, 0, 0, -1, 0, 0, 0, 0);
@@ -183,7 +183,7 @@
 
     case WaterMaster:
     {
-      auto v20 = pOtherOverlayList->_4418B1(10005, 201, 0, 65536);
+      int v20 = pOtherOverlayList->_4418B1(10005, 201, 0, 65536);
       pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].Apply(pParty->uTimePlayed + 60 * (256 * (2 + 1)), 3, 0, v20, 0);
       pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags |= 1u;
       pAudioPlayer->PlaySound(SOUND_12040, 0, 0, -1, 0, 0, 0, 0);
@@ -451,7 +451,7 @@
       pViewport->uViewportBR_Y - pViewport->uViewportTL_Y + 1,
       pRenderer->uTargetGMask | pRenderer->uTargetBMask);
 
-  auto pTex = pIcons_LOD->GetTexture(uTextureID_Leather);
+  Texture* pTex = pIcons_LOD->GetTexture(uTextureID_Leather);
   pRenderer->GetLeather(8, 352 - v0, pTex, pTex->uTextureHeight - v0);
 
   pRenderer->DrawTextureIndexed(8u, 347 - v0, pTexture_591428);
@@ -1409,7 +1409,7 @@
       if ( v20 == uNumActors )
         ++uNumActors;
       v6->uSummonerID = PID(OBJECT_Player, a1);
-      result = v6->pActorBuffs[2].Apply(pParty->uTimePlayed + (a3 * 128) / 30.0f,
+      result = v6->pActorBuffs[ACTOR_BUFF_SUMMONED].Apply(pParty->uTimePlayed + (a3 * 128) / 30.0f,
                  a2,
                  a1,
                  0,
@@ -1779,7 +1779,7 @@
   uint decorEventIdx = 0;
   for (uint i = 0; i < uNumLevelDecorations; ++i)
   {
-    auto decor = &pLevelDecorations[i];
+    LevelDecoration* decor = &pLevelDecorations[i];
 
     if (!decor->uEventID)
     {
@@ -2142,8 +2142,8 @@
   int highIdx;
   int angle;
 
-  auto X = x;
-  auto Y = y;
+  int X = x;
+  int Y = y;
 
   if ( abs(X) < 65536 )
   {
@@ -2867,7 +2867,7 @@
   for (uint i = 0; i < uNumActors; ++i)
   //if ( (signed int)uNumActors > 0 )
   {
-    auto pActor = &pActors[i];
+    Actor* pActor = &pActors[i];
     //v2 = (char *)&pActors[0].uNPC_ID;
     //do
     //{
@@ -2918,7 +2918,7 @@
 
   for (uint i = 0; i < uNumActors; ++i)
   {
-    auto pActor = &pActors[i];
+    Actor* pActor = &pActors[i];
     //v7 = (char *)&pActors[0].pMonsterInfo;
     //do
     //{
@@ -2958,7 +2958,7 @@
       v18 = 4;
       v10 = &pMonsterStats->pInfos[v9 + 1];
       //v11 = (int *)pMonsterList->pMonsters[v9].pSoundSampleIDs;
-      auto v11 = &pMonsterList->pMonsters[v9];
+      MonsterDesc* v11 = &pMonsterList->pMonsters[v9];
       do
       {
         pSoundList->LoadSound(v11->pSoundSampleIDs[4 - v18], 0);
@@ -3032,10 +3032,10 @@
   pIcons_LOD->_inlined_sub2();
 
   pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0);
-  auto pNew = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE);
-  auto pLoad = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE);
-  auto pCredits = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE);
-  auto pExit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE);
+  Texture* pNew = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE);
+  Texture* pLoad = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE);
+  Texture* pCredits = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE);
+  Texture* pExit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE);
 
   pMainMenu_BtnNew     = pWindow_MainMenu->CreateButton(495, 172, pNew->uTextureWidth,     pNew->uTextureHeight,     1, 0, UIMSG_MainMenu_ShowPartyCreationWnd, 0, 'N', "", pNew, 0);
   pMainMenu_BtnLoad    = pWindow_MainMenu->CreateButton(495, 227, pLoad->uTextureWidth,    pLoad->uTextureHeight,    1, 0, UIMSG_MainMenu_ShowLoadWindow,       1, 'L', "", pLoad, 0);
@@ -3508,7 +3508,7 @@
   memcpy(Filename, "X:\\anims\\magic7.vid", sizeof(Filename));
   *Filename = c;
 
-  auto f = fopen(Filename, "rb");
+  FILE* f = fopen(Filename, "rb");
   if (!f)
     return false;
 
@@ -3883,7 +3883,7 @@
   {
     void *sft_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dsft.bin", 1) : nullptr,
          *sft_mm8 = nullptr;
-    auto  sft_mm7 = pEvents_LOD->LoadRaw("dsft.bin", 1);
+    void*  sft_mm7 = pEvents_LOD->LoadRaw("dsft.bin", 1);
     pSpriteFrameTable = new SpriteFrameTable;
     pSpriteFrameTable->FromFile(sft_mm6, sft_mm7, sft_mm8);
     free(sft_mm6);
@@ -3892,7 +3892,7 @@
     
     void *tft_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dtft.bin", 1) : nullptr,
          *tft_mm8 = nullptr;
-    auto  tft_mm7 = pEvents_LOD->LoadRaw("dtft.bin", 1);
+    void*  tft_mm7 = pEvents_LOD->LoadRaw("dtft.bin", 1);
     pTextureFrameTable = new TextureFrameTable;
     pTextureFrameTable->FromFile(tft_mm6, tft_mm7, tft_mm8);
     free(tft_mm6);
@@ -3901,7 +3901,7 @@
 
     void *tiles_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dtile.bin", 1) : nullptr,
          *tiles_mm8 = nullptr;
-    auto  tiles_mm7 = pEvents_LOD->LoadRaw("dtile.bin", 1);
+    void*  tiles_mm7 = pEvents_LOD->LoadRaw("dtile.bin", 1);
     pTileTable = new TileTable;
     pTileTable->FromFile(tiles_mm6, tiles_mm7, tiles_mm8);
     free(tiles_mm6);
@@ -3910,7 +3910,7 @@
     
     void *pft_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dpft.bin", 1) : nullptr,
          *pft_mm8 = nullptr;
-    auto  pft_mm7 = pEvents_LOD->LoadRaw("dpft.bin", 1);
+    void*  pft_mm7 = pEvents_LOD->LoadRaw("dpft.bin", 1);
     pPlayerFrameTable = new PlayerFrameTable;
     pPlayerFrameTable->FromFile(pft_mm6, pft_mm7, pft_mm8);
     free(pft_mm6);
@@ -3919,7 +3919,7 @@
 
     void *ift_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dift.bin", 1) : nullptr,
          *ift_mm8 = nullptr;
-    auto  ift_mm7 = pEvents_LOD->LoadRaw("dift.bin", 1);
+    void*  ift_mm7 = pEvents_LOD->LoadRaw("dift.bin", 1);
     pIconsFrameTable = new IconFrameTable;
     pIconsFrameTable->FromFile(ift_mm6, ift_mm7, ift_mm8);
     free(ift_mm6);
@@ -3928,7 +3928,7 @@
 
     void *decs_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("ddeclist.bin", 1) : nullptr,
          *decs_mm8 = nullptr;
-    auto  decs_mm7 = pEvents_LOD->LoadRaw("ddeclist.bin", 1);
+    void*  decs_mm7 = pEvents_LOD->LoadRaw("ddeclist.bin", 1);
     pDecorationList = new DecorationList;
     pDecorationList->FromFile(decs_mm6, decs_mm7, decs_mm8);
     free(decs_mm6);
@@ -3937,7 +3937,7 @@
 
     void *objs_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dobjlist.bin", 1) : nullptr,
          *objs_mm8 = nullptr;
-    auto  objs_mm7 = pEvents_LOD->LoadRaw("dobjlist.bin", 1);
+    void*  objs_mm7 = pEvents_LOD->LoadRaw("dobjlist.bin", 1);
     pObjectList = new ObjectList;
     pObjectList->FromFile(objs_mm6, objs_mm7, objs_mm8);
     free(objs_mm6);
@@ -3946,7 +3946,7 @@
 
     void *mons_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dmonlist.bin", 1) : nullptr,
          *mons_mm8 = nullptr;
-    auto  mons_mm7 = pEvents_LOD->LoadRaw("dmonlist.bin", 1);
+    void*  mons_mm7 = pEvents_LOD->LoadRaw("dmonlist.bin", 1);
     pMonsterList = new MonsterList;
     pMonsterList->FromFile(mons_mm6, mons_mm7, mons_mm8);
     free(mons_mm6);
@@ -3955,7 +3955,7 @@
     
     void *chests_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dchest.bin", 1) : nullptr,
          *chests_mm8 = nullptr;
-    auto  chests_mm7 = pEvents_LOD->LoadRaw("dchest.bin", 1);
+    void*  chests_mm7 = pEvents_LOD->LoadRaw("dchest.bin", 1);
     pChestList = new ChestList;
     pChestList->FromFile(chests_mm6, chests_mm7, chests_mm8);
     free(chests_mm6);
@@ -3964,7 +3964,7 @@
 
     void *overlays_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("doverlay.bin", 1) : nullptr,
          *overlays_mm8 = nullptr;
-    auto  overlays_mm7 = pEvents_LOD->LoadRaw("doverlay.bin", 1);
+    void*  overlays_mm7 = pEvents_LOD->LoadRaw("doverlay.bin", 1);
     pOverlayList = new OverlayList;
     pOverlayList->FromFile(overlays_mm6, overlays_mm7, overlays_mm8);
     free(overlays_mm6);
@@ -3973,7 +3973,7 @@
 
     void *sounds_mm6 = pIcons_LOD_mm6 ? pIcons_LOD_mm6->LoadRaw("dsounds.bin", 1) : nullptr,
          *sounds_mm8 = nullptr;
-    auto  sounds_mm7 = pEvents_LOD->LoadRaw("dsounds.bin", 1);
+    void*  sounds_mm7 = pEvents_LOD->LoadRaw("dsounds.bin", 1);
     pSoundList = new SoundList;
     pSoundList->FromFile(sounds_mm6, sounds_mm7, sounds_mm8);
     free(sounds_mm6);
@@ -4372,7 +4372,7 @@
     Log::Warning(L"MM: entering main loop");
     while ( 1 )
     {
-      auto main_menu_window = MainMenuWindow::Create();
+      MainMenuWindow* main_menu_window = MainMenuWindow::Create();
       window->AddControl(main_menu_window);
 
       MainMenu_Loop();