# HG changeset patch # User Grumpy7 # Date 1383119257 25200 # Node ID c1c74df0a33e0329687c6e006feb1fb9a5b975b2 # Parent 92dfa0cafbe3e9b9ca5cc9727c4e27ac177fe133 changing most of auto types to their actual types diff -r 92dfa0cafbe3 -r c1c74df0a33e Actor.cpp --- a/Actor.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Actor.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -1198,7 +1198,7 @@ void Actor::AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, AIDirection *a4) { assert(uActorID < uNumActors); - auto actor = &pActors[uActorID]; + Actor* actor = &pActors[uActorID]; AIDirection a3; if (!a4) @@ -2052,7 +2052,7 @@ //----- (00402D6E) -------------------------------------------------------- void Actor::Die(unsigned int uActorID) { - auto actor = &pActors[uActorID]; + Actor* actor = &pActors[uActorID]; actor->uCurrentActionTime = 0; actor->uAIState = Dying; @@ -3545,7 +3545,7 @@ Log::Warning(L"%S %S %u", __FILE__, __FUNCTION__, __LINE__); // ai_near_actors_targets_pid[i] for AI_Stand seems always 0; original code behaviour is identical for (uint i = 0; i < uNumActors; ++i) { - auto actor = &pActors[i]; + Actor* actor = &pActors[i]; if (actor->CanAct() || actor->uAIState == Disabled) { diff -r 92dfa0cafbe3 -r c1c74df0a33e Arcomage.cpp --- a/Arcomage.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Arcomage.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -271,7 +271,7 @@ //----- (0040E01A) -------------------------------------------------------- int stru272_stru0::StartFill( stru272_stru2* a2 ) { - auto a1 = this; + stru272_stru0* a1 = this; if ( a1->signature == SIG_trpg ) { a1->field_4 = a2->field_20; @@ -3900,7 +3900,7 @@ if ( !pParty->pArcomageWins[v8-108] ) { pParty->pArcomageWins[v8-108] = 1; - auto _a = (signed int)(p2DEvents[ window_SpeakInHouse->par1C - 1].fPriceMultiplier * 100.0); + signed int _a = (signed int)(p2DEvents[ window_SpeakInHouse->par1C - 1].fPriceMultiplier * 100.0); pParty->PartyFindsGold(_a, 0); } diff -r 92dfa0cafbe3 -r c1c74df0a33e AudioPlayer.cpp --- a/AudioPlayer.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/AudioPlayer.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -165,7 +165,7 @@ return uSoundIdx; - auto pSoundData = pSound->pSoundData[0]; + SoundData* pSoundData = pSound->pSoundData[0]; switch (AIL_file_type((void *)pSoundData->pData, pSoundData->uDataSize)) { default: @@ -404,7 +404,7 @@ for (uint i = 0; i < num_mm6_sounds; ++i) { auto src = (SoundDesc_mm6 *)((char *)data_mm6 + 4) + i; - auto dst = pSounds + num_mm7_sounds + i; + SoundDesc* dst = &pSounds[num_mm7_sounds + i]; memcpy(dst, src, sizeof(SoundDesc_mm6)); dst->p3DSound = nullptr; @@ -723,7 +723,7 @@ end_channel = 0; assert(sound_id < pSoundList->sNumSounds); - auto sound_desc = pSoundList->pSounds + sound_id; + SoundDesc* sound_desc = pSoundList->pSounds + sound_id; if (!b3DSoundInitialized || sound_desc->Is3D()) { if (!a3) // generic sound like from UI @@ -767,7 +767,7 @@ end_channel = 3; assert(object_id < uNumActors); - auto actor = &pActors[object_id]; + Actor* actor = &pActors[object_id]; sample_volume = GetSoundStrengthByDistanceFromParty(actor->vPosition.x, actor->vPosition.y, actor->vPosition.z); if (!sample_volume) @@ -781,7 +781,7 @@ end_channel = 4; assert(object_id < uNumLevelDecorations); - auto decor = &pLevelDecorations[object_id]; + LevelDecoration* decor = &pLevelDecorations[object_id]; sample_volume = GetSoundStrengthByDistanceFromParty(decor->vPosition.x, decor->vPosition.y, decor->vPosition.z); if (!sample_volume) @@ -796,7 +796,7 @@ end_channel = 7; assert(object_id < uNumSpriteObjects); - auto object = &pSpriteObjects[object_id]; + SpriteObject* object = &pSpriteObjects[object_id]; sample_volume = GetSoundStrengthByDistanceFromParty(object->vPosition.x, object->vPosition.y, object->vPosition.z); if (!sample_volume) @@ -821,7 +821,7 @@ LABEL_123: for (uint i = 0; i < uMixerChannels; ++i) { - auto channel = pMixerChannels + i; + MixerChannel* channel = &pMixerChannels[i]; if (channel->source_pid == a3 && AIL_sample_status(channel->hSample) == AIL::Sample::Playing) { @@ -836,7 +836,7 @@ //pAudioPlayer4 = pAudioPlayer; for (v62 = start_channel; v62 <= end_channel; ++v62) { - auto channel = pMixerChannels + v62; + MixerChannel* channel = pMixerChannels + v62; if (AIL_sample_status(channel->hSample) == AIL::Sample::Done) { AIL_end_sample(channel->hSample); @@ -868,7 +868,7 @@ int min_volume = sample_volume; for (uint i = start_channel; i <= end_channel; ++i) { - auto channel = pMixerChannels + i; + MixerChannel* channel = &pMixerChannels[i]; int volume = AIL_sample_volume(channel->hSample); if (volume < min_volume) @@ -903,7 +903,7 @@ v62 = 13; } - auto channel = &pMixerChannels[v62]; + MixerChannel* channel = &pMixerChannels[v62]; AIL_end_sample(channel->hSample); FreeChannel(channel); } @@ -931,7 +931,7 @@ return; //pMixerChannel5 = &pAudioPlayer->pMixerChannels[v62]; - auto channel = &pMixerChannels[v62]; + MixerChannel* channel = &pMixerChannels[v62]; AIL_init_sample(channel->hSample); AIL_set_sample_file(channel->hSample, (char *)pSoundList->pSounds[sound_id].pSoundData[a7] + 4 * (a7 == 0), -1); if (uVolume) @@ -952,7 +952,7 @@ assert(uCurrentlyLoadedLevelType == LEVEL_Indoor); assert(object_id < pIndoor->uNumDoors); - auto door = &pIndoor->pDoors[object_id]; + BLVDoor* door = &pIndoor->pDoors[object_id]; if (!door->uDoorID) return; @@ -967,7 +967,7 @@ else if (object_type == OBJECT_Item) { assert(object_id < uNumSpriteObjects); - auto object = &pSpriteObjects[object_id]; + SpriteObject* object = &pSpriteObjects[object_id]; if (!GetSoundStrengthByDistanceFromParty(object->vPosition.x, object->vPosition.y, object->vPosition.z) ) return; AIL_set_sample_pan(channel->hSample, sub_4AB66C(object->vPosition.x, object->vPosition.y)); @@ -975,7 +975,7 @@ else if (object_type == OBJECT_Actor) { assert(object_id < uNumActors); - auto actor = &pActors[object_id]; + Actor* actor = &pActors[object_id]; if (!GetSoundStrengthByDistanceFromParty(actor->vPosition.x, actor->vPosition.y, actor->vPosition.z)) return; AIL_set_sample_pan(channel->hSample, sub_4AB66C(actor->vPosition.x, actor->vPosition.y)); @@ -983,7 +983,7 @@ else if (object_type == OBJECT_Decoration) { assert(object_id < uNumLevelDecorations); - auto decor = &pLevelDecorations[object_id]; + LevelDecoration* decor = &pLevelDecorations[object_id]; if (!GetSoundStrengthByDistanceFromParty(decor->vPosition.x, decor->vPosition.y, decor->vPosition.z)) return; AIL_set_sample_pan(channel->hSample, sub_4AB66C(decor->vPosition.x, decor->vPosition.y)); @@ -1640,7 +1640,7 @@ continue; } - if (auto sound_strength = GetSoundStrengthByDistanceFromParty(source_x, source_y, source_z)) + if (int sound_strength = GetSoundStrengthByDistanceFromParty(source_x, source_y, source_z)) { AIL_set_sample_volume(pMixerChannels[i].hSample, sound_strength); AIL_set_sample_pan(pMixerChannels[i].hSample, sub_4AB66C(source_x, source_y)); @@ -1656,7 +1656,7 @@ if (pCurrentScreen != SCREEN_GAME) { - auto channel = &pMixerChannels[4]; + MixerChannel* channel = &pMixerChannels[4]; if (AIL_sample_status(channel->hSample) == AIL::Sample::Playing) AIL_end_sample(channel->hSample); return; @@ -1676,13 +1676,13 @@ //v45 = abs(v44->vPosition.z - pParty->vPosition.z); //v46 = abs(v44->vPosition.y - pParty->vPosition.y); //v47 = abs(v44->vPosition.x - pParty->vPosition.x); - auto decor = &pLevelDecorations[_6807B8_level_decorations_ids[i]]; + LevelDecoration* decor = &pLevelDecorations[_6807B8_level_decorations_ids[i]]; if (int_get_vector_length(decor->vPosition.x - pParty->vPosition.x, decor->vPosition.y - pParty->vPosition.y, decor->vPosition.z - pParty->vPosition.z) > 8192) continue; - auto decor_desc = &pDecorationList->pDecorations[decor->uDecorationDescID]; + DecorationDesc* decor_desc = &pDecorationList->pDecorations[decor->uDecorationDescID]; //v48 = &pDecorationList->pDecorations[decor->uDecorationDescID]; //v49 = v48->uFlags; uNumRepeats = (~(unsigned __int8)decor_desc->uFlags & DECORATION_DESC_SLOW_LOOP) >> 6; diff -r 92dfa0cafbe3 -r c1c74df0a33e CastSpellInfo.cpp --- a/CastSpellInfo.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/CastSpellInfo.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -555,7 +555,7 @@ int _v733 = 0; for (uint i = 0; i < uNumSpriteObjects; ++i) { - auto object = &pSpriteObjects[i]; + SpriteObject* object = &pSpriteObjects[i]; if (object->uType && object->spell_id == SPELL_FIRE_FIRE_SPIKE && object->spell_caster_pid == PID(OBJECT_Player, pCastSpell->uPlayerID)) ++_v733; /*v33 = (char *)&pSpriteObjects[0].field_48; @@ -637,7 +637,7 @@ pSpellSprite.vPosition.z = pActors[PID_ID(a2)].vPosition.z; pSpellSprite.vPosition.y = pActors[PID_ID(a2)].vPosition.y; pSpellSprite.spell_target_pid = PID(OBJECT_Actor, PID_ID(a2)); - auto obj_id = pSpellSprite.Create(0, 0, 0, 0); + int obj_id = pSpellSprite.Create(0, 0, 0, 0); DamageMonsterFromParty(PID(OBJECT_Item, obj_id), PID_ID(a2), &v697); LODWORD(v727) = 1; break; @@ -671,7 +671,7 @@ pSpellSprite.vPosition.y = pActors[PID_ID(a2)].vPosition.y; pSpellSprite.vPosition.z = pActors[PID_ID(a2)].vPosition.z; pSpellSprite.spell_target_pid = PID(OBJECT_Actor, PID_ID(a2)); - auto obj_id = pSpellSprite.Create(0, 0, 0, 0); + int obj_id = pSpellSprite.Create(0, 0, 0, 0); DamageMonsterFromParty(PID(OBJECT_Item, obj_id), PID_ID(a2), &v704); LODWORD(v727) = 1; break; @@ -702,7 +702,7 @@ pSpellSprite.uFacing = LOWORD(v715.uYawAngle); pSpellSprite.uAttributes |= 0x80u; pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); - auto obj_id = pSpellSprite.Create(0, 0, 0, 0); + int obj_id = pSpellSprite.Create(0, 0, 0, 0); if ( !MonsterStats::BelongsToSupertype(pActor->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) { ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed @@ -996,7 +996,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; v730c = &pParty->pPlayers[pCastSpell->uPlayerID_2].pInventoryItemList[a2]; - auto _itm = &pItemsTable->pItems[v730c->uItemID]; + ItemDesc* _itm = &pItemsTable->pItems[v730c->uItemID]; v730c->UpdateTempBonus(pParty->uTimePlayed); if ( v730c->uItemID < 64 || v730c->uItemID > 65 && !v730c->IsBroken() @@ -1418,7 +1418,7 @@ } if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; - auto _v726 = _46A6AC_spell_render((int)dword_50BF30.data(), 100, 4096); + int _v726 = _46A6AC_spell_render((int)dword_50BF30.data(), 100, 4096); v700.z = 0; v700.y = 0; v700.x = 0; @@ -1512,7 +1512,7 @@ } if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; - auto _v726 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360; + int _v726 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360; pSpellSprite.stru_24.Reset(); pSpellSprite.spell_id = pCastSpell->uSpellID; pSpellSprite.spell_level = v2; @@ -2393,7 +2393,7 @@ LODWORD(v733) = 300 * v2 + 180; if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; - auto _v726 = _46A6AC_spell_render((int)dword_50BF30.data(), 100, 4096); + int _v726 = _46A6AC_spell_render((int)dword_50BF30.data(), 100, 4096); pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFFFFFFu, 0xC0u); ++pSpellSprite.uType; pSpellSprite.stru_24.Reset(); @@ -2863,7 +2863,7 @@ amount = 180 * v2; if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; - auto _v726 = _46A6AC_spell_render((int)dword_50BF30.data(), 100, 4096); + int _v726 = _46A6AC_spell_render((int)dword_50BF30.data(), 100, 4096); pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xA0A0Au, 0xC0u); ++pSpellSprite.uType; pSpellSprite.stru_24.Reset(); @@ -3313,7 +3313,7 @@ if ( (signed int)uNumActors > 0 ) { v518 = pActors.data();//[0].uAIState; - auto _v726 = uNumActors; + size_t _v726 = uNumActors; do { v519 = v518->uAIState; @@ -3687,7 +3687,7 @@ } if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; - auto _v726 = ((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360); + signed int _v726 = ((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360); pSpellSprite.stru_24.Reset(); pSpellSprite.spell_id = pCastSpell->uSpellID; pSpellSprite.spell_level = v2; @@ -4015,7 +4015,7 @@ ++pPlayer->uNumArmageddonCasts; if ( pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - auto _v726 = 50; + int _v726 = 50; do { v642 = rand() % 4096 - 2048; @@ -4154,7 +4154,7 @@ //v6 = a5; //v7 = &pParty->pPlayers[uPlayerID]; assert(uPlayerID < 4); - auto player = &pParty->pPlayers[uPlayerID]; + Player* player = &pParty->pPlayers[uPlayerID]; if ( !(a5 & 0x10) ) { switch ( a1 ) @@ -4319,7 +4319,7 @@ for (uint i = 0; i < CastSpellInfoCount; ++i) { - auto spell = &pCastSpellInfo[i]; + CastSpellInfo* spell = &pCastSpellInfo[i]; if (!spell->uSpellID) continue; diff -r 92dfa0cafbe3 -r c1c74df0a33e Chest.cpp --- a/Chest.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Chest.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -67,7 +67,7 @@ assert( uChestID < 20 ); if ( ( uChestID < 0 ) && ( uChestID >= 20 ) ) return false; - auto chest = &pChests[uChestID]; + Chest* chest = &pChests[uChestID]; ++pIcons_LOD->uTexturePacksCount; if (!pIcons_LOD->uNumPrevLoadedFiles) @@ -212,7 +212,7 @@ v1 = pRenderer->pActiveZBuffer[v0->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v3)->y]]; if ( v1 ) { - auto _w = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + ItemGen* _w = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18 * *((short *)&pChests[0].igChestItems[139].uExpireTime + v1 + 2662 * (unsigned int)pChestWindow->ptr_1C + 3)); diff -r 92dfa0cafbe3 -r c1c74df0a33e DecalBuilder.cpp --- a/DecalBuilder.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/DecalBuilder.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -454,7 +454,7 @@ if (!pBloodsplatContainer->std__vector_pBloodsplats_size) return true; - auto pFace = &pIndoor->pFaces[uFaceID]; + BLVFace* pFace = &pIndoor->pFaces[uFaceID]; if (pFace->uAttributes & 0x400000) return true; @@ -462,7 +462,7 @@ return true; for (uint i = 0; i < pBloodsplatContainer->std__vector_pBloodsplats_size; ++i) { - auto pBloodsplat = pBloodsplatContainer->std__vector_pBloodsplats + i; + Bloodsplat* pBloodsplat = &pBloodsplatContainer->std__vector_pBloodsplats[i]; if (pFace->pBounding.x1 - pBloodsplat->radius < pBloodsplat->x && pFace->pBounding.x2 + pBloodsplat->radius > pBloodsplat->x && pFace->pBounding.y1 - pBloodsplat->radius < pBloodsplat->y && @@ -741,7 +741,7 @@ ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ONE)); ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, FALSE)); - auto pTex = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("hwsplat04"); + IDirect3DTexture2* pTex = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("hwsplat04"); ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, pTex)); DrawDecals(0.00039999999); diff -r 92dfa0cafbe3 -r c1c74df0a33e DecalBuilder.h --- a/DecalBuilder.h Mon Oct 28 22:16:42 2013 -0700 +++ b/DecalBuilder.h Wed Oct 30 00:47:37 2013 -0700 @@ -140,7 +140,7 @@ char *v2; // eax@1 signed int v3; // ecx@1 - auto v1 = this; + DecalBuilder* v1 = this; /*_eh_vector_constructor_iterator_( this->std__vector_pDecals, 3104, diff -r 92dfa0cafbe3 -r c1c74df0a33e Events.cpp --- a/Events.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Events.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -465,7 +465,7 @@ { //v9 = pSomeEVT_Events[v8].uEventOffsetInEVT; //v10 = (ByteArray *)&v5[v9]; - auto _evt = (_evt_raw *)(pSomeEVT + pSomeEVT_Events[v4].uEventOffsetInEVT); + _evt_raw * _evt = (_evt_raw *)(pSomeEVT + pSomeEVT_Events[v4].uEventOffsetInEVT); switch (_evt->_e_type) { diff -r 92dfa0cafbe3 -r c1c74df0a33e GUIWindow.cpp --- a/GUIWindow.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/GUIWindow.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -809,7 +809,7 @@ //v3 = 0; a2 = 0; - auto chapter = &pPlayer->spellbook.pChapters[pPlayer->lastOpenedSpellbookPage]; + PlayerSpellbookChapter* chapter = &pPlayer->spellbook.pChapters[pPlayer->lastOpenedSpellbookPage]; for (uint i = 0; i < 11; ++i) { if (!chapter->bIsSpellAvailable[i]) @@ -1186,7 +1186,7 @@ const char *v32; // [sp+34h] [bp-4h]@7 size_t pInString; // [sp+4Ch] [bp+14h]@11 - auto a1 = this; + GUIWindow* a1 = this; v29 = 0; v9 = a1; v10 = a2; @@ -1557,7 +1557,7 @@ break; } - auto pWindow = &pWindowList[uNextFreeWindowID]; + GUIWindow* pWindow = &pWindowList[uNextFreeWindowID]; pWindow->uFrameWidth = uWidth; pWindow->uFrameHeight = uHeight; diff -r 92dfa0cafbe3 -r c1c74df0a33e Game.cpp --- a/Game.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Game.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -206,7 +206,7 @@ static uint last_frame_time = GetTickCount(); static uint framerate_time_elapsed = 0; - auto frame_dt = GetTickCount() - last_frame_time; + uint frame_dt = GetTickCount() - last_frame_time; last_frame_time = GetTickCount(); framerate_time_elapsed += frame_dt; @@ -232,7 +232,7 @@ if (uCurrentlyLoadedLevelType == LEVEL_Indoor) { - auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); + int sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); sprintf(pTmpBuf.data(), "Party Sector ID: %u/%u\n", sector_id, pIndoor->uNumSectors); pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); } @@ -242,14 +242,14 @@ if (uCurrentlyLoadedLevelType == LEVEL_Indoor) { uint uFaceID; - auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); - auto floor_level = BLV_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + 40, sector_id, &uFaceID); + int sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); + int floor_level = BLV_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + 40, sector_id, &uFaceID); sprintf(pTmpBuf.data(), "BLV_GetFloorLevel: %d face_id %d\n", floor_level, uFaceID); } else { int on_water, _a6; - auto floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false); + int floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false); sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d on_water: %s a6 = %d\n", floor_level, on_water ? "true" : "false", _a6); } pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); @@ -1145,7 +1145,7 @@ if (!pVisInstance->default_list.uNumPointers) return; - auto object_info = pVisInstance->default_list.object_pointers[0]; + Vis_ObjectInfo* object_info = pVisInstance->default_list.object_pointers[0]; if (object_info) switch (object_info->object_type) { @@ -1159,7 +1159,7 @@ { if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) { - auto face = (ODMFace *)object_info->object; + ODMFace* face = (ODMFace *)object_info->object; if (face->uAttributes & FACE_OUTLINED) face->uAttributes &= ~FACE_OUTLINED; else @@ -1167,7 +1167,7 @@ } else if (uCurrentlyLoadedLevelType == LEVEL_Indoor) { - auto face = (BLVFace *)object_info->object; + BLVFace* face = (BLVFace *)object_info->object; if (face->uAttributes & FACE_OUTLINED) face->uAttributes &= ~FACE_OUTLINED; else @@ -1478,7 +1478,7 @@ //_this = 0; for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) { - auto npc = pNPCStats->pNewNPCData + i; + NPCData* npc = &pNPCStats->pNewNPCData[i]; //do //{ if (npc->Hired() && @@ -3856,7 +3856,7 @@ continue; // uNumSeconds = (unsigned int)pPlayers[uActiveCharacter]; - auto player = pPlayers[uActiveCharacter]; + Player* player = pPlayers[uActiveCharacter]; if (player->spellbook.pChapters[player->lastOpenedSpellbookPage].bIsSpellAvailable[uMessageParam]) //if ( *(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + &lastOpenedSpellbookPage) + uMessageParam + 402) ) { diff -r 92dfa0cafbe3 -r c1c74df0a33e IconFrameTable.cpp --- a/IconFrameTable.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/IconFrameTable.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -98,7 +98,7 @@ FILE *v2; // eax@1 FILE *v3; // edi@1 - auto Str = this; + IconFrameTable* Str = this; v1 = Str; v2 = fopen("data\\dift.bin", "wb"); diff -r 92dfa0cafbe3 -r c1c74df0a33e Indoor.cpp --- a/Indoor.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Indoor.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -508,7 +508,7 @@ static stru154 stru_F7B60C; // idb //v9 = &pIndoor->pFaces[uFaceID]; - auto pFace = &pIndoor->pFaces[uFaceID]; + BLVFace* pFace = &pIndoor->pFaces[uFaceID]; if (pFace->uNumVertices < 3) return; @@ -702,7 +702,7 @@ nodes[num_nodes].viewing_portal_id = -1; //v39 = &pIndoor->pFaces[uFaceID]; - auto pFace = &pIndoor->pFaces[uFaceID]; + BLVFace* pFace = &pIndoor->pFaces[uFaceID]; if (!pFace->Portal()) { @@ -752,13 +752,13 @@ if (v9 >= 0) return; - auto num_vertices = GetPortalScreenCoord(uFaceID); + int num_vertices = GetPortalScreenCoord(uFaceID); if (num_vertices < 2) return; - auto face_min_screenspace_x = PortalFace._screen_space_x[0], + int face_min_screenspace_x = PortalFace._screen_space_x[0], face_max_screenspace_x = PortalFace._screen_space_x[0]; - auto face_min_screenspace_y = PortalFace._screen_space_y[0], + int face_min_screenspace_y = PortalFace._screen_space_y[0], face_max_screenspace_y = PortalFace._screen_space_y[0]; for (uint i = 1; i < num_vertices; ++i) { @@ -1796,14 +1796,14 @@ //v84 = malloc(header.uDecompressedSize); //v85 = v84; //ptr = v84; - auto pRawBLV = malloc(header.uDecompressedSize); + void* pRawBLV = malloc(header.uDecompressedSize); memset(pRawBLV, 0, header.uDecompressedSize); if (header.uCompressedSize == header.uDecompressedSize) fread(pRawBLV, header.uDecompressedSize, 1, File); else if (header.uCompressedSize < header.uDecompressedSize) { - auto pTmpMem = malloc(header.uCompressedSize); + void* pTmpMem = malloc(header.uCompressedSize); { fread(pTmpMem, header.uCompressedSize, 1, File); @@ -1823,7 +1823,7 @@ bLoaded = true; - auto pData = (char *)pRawBLV; + char* pData = (char *)pRawBLV; pGameLoadingUI_ProgressBar->Progress(); @@ -1844,24 +1844,24 @@ for (uint i = 0, j = 0; i < uNumFaces; ++i) { - auto pFace = pFaces + i; - - pFace->pVertexIDs = pLFaces + j; + BLVFace* pFace = &pFaces[i]; + + pFace->pVertexIDs = &pLFaces[j]; j += pFace->uNumVertices + 1; - pFace->pXInterceptDisplacements = (short *)(pLFaces + j); + pFace->pXInterceptDisplacements = (short *)(&pLFaces[j]); j += pFace->uNumVertices + 1; - pFace->pYInterceptDisplacements = (short *)(pLFaces + j); + pFace->pYInterceptDisplacements = (short *)(&pLFaces[j]); j += pFace->uNumVertices + 1; - pFace->pZInterceptDisplacements = (short *)(pLFaces + j); + pFace->pZInterceptDisplacements = (short *)(&pLFaces[j]); j += pFace->uNumVertices + 1; - pFace->pVertexUIDs = (__int16 *)(pLFaces + j); + pFace->pVertexUIDs = (__int16 *)(&pLFaces[j]); j += pFace->uNumVertices + 1; - pFace->pVertexVIDs = (__int16 *)(pLFaces + j); + pFace->pVertexVIDs = (__int16 *)(&pLFaces[j]); j += pFace->uNumVertices + 1; /*v93 = &pFaces[v92]; @@ -1899,7 +1899,7 @@ for (uint i = 0; i < uNumFaces; ++i) { - auto pFace = pFaces + i; + BLVFace* pFace = &pFaces[i]; char pTexName[16]; strncpy(pTexName, pData, 10); @@ -1946,8 +1946,8 @@ for (uint i = 0; i < uNumFaces; ++i) { - auto pFace = pFaces + i; - auto pFaceExtra = pFaceExtras + pFace->uFaceExtraID; + BLVFace* pFace = &pFaces[i]; + BLVFaceExtra* pFaceExtra = &pFaceExtras[pFace->uFaceExtraID]; if (pFaceExtra->uEventID) { @@ -1972,33 +1972,33 @@ for (uint i = 0, j = 0; i < uNumSectors; ++i) { - auto pSector = pSectors + i; - - pSector->pFloors = ptr_0002B0_sector_rdata + j; + BLVSector* pSector = &pSectors[i]; + + pSector->pFloors = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumFloors; - pSector->pWalls = ptr_0002B0_sector_rdata + j; + pSector->pWalls = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumWalls; - pSector->pCeilings = ptr_0002B0_sector_rdata + j; + pSector->pCeilings = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumCeilings; - pSector->pFluids = ptr_0002B0_sector_rdata + j; + pSector->pFluids = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumFluids; - pSector->pPortals = ptr_0002B0_sector_rdata + j; + pSector->pPortals = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumPortals; - pSector->pFaceIDs = ptr_0002B0_sector_rdata + j; + pSector->pFaceIDs = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumFaces; - pSector->pCogs = ptr_0002B0_sector_rdata + j; + pSector->pCogs = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumCogs; - pSector->pDecorationIDs = ptr_0002B0_sector_rdata + j; + pSector->pDecorationIDs = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumDecorations; - pSector->pMarkers = ptr_0002B0_sector_rdata + j; + pSector->pMarkers = &ptr_0002B0_sector_rdata[j]; j += pSector->uNumMarkers; @@ -2135,7 +2135,7 @@ fread(pRawDLV, 1, header.uCompressedSize, File); else if (header.uCompressedSize < header.uDecompressedSize) { - auto pTmpMem = malloc(header.uCompressedSize); + void* pTmpMem = malloc(header.uCompressedSize); { fread(pTmpMem, header.uCompressedSize, 1, File); @@ -2192,9 +2192,9 @@ *(int *)pDest = 1; File = pGames_LOD->FindContainer(pFilename, 0); fread(&header, 0x10u, 1u, File); - auto v155 = header.uCompressedSize; - auto Count = header.uDecompressedSize; - auto Src = (BLVFace *)malloc(header.uDecompressedSize); + uint v155 = header.uCompressedSize; + uint Count = header.uDecompressedSize; + BLVFace* Src = (BLVFace *)malloc(header.uDecompressedSize); pRawDLV = Src; if ( v155 <= Count ) { @@ -2204,7 +2204,7 @@ } else { - auto _uSourceLen = malloc(v155); + void* _uSourceLen = malloc(v155); fread(_uSourceLen, v155, 1u, File); zlib::MemUnzip(Src, &Count, _uSourceLen, v155); free(_uSourceLen); @@ -2231,7 +2231,7 @@ for (uint i = 0; i < pMapOutlines->uNumOutlines; ++i) { - auto pVertex = pMapOutlines->pOutlines + i; + BLVMapOutline* pVertex = &pMapOutlines->pOutlines[i]; if ((unsigned __int8)(1 << (7 - i % 8)) & _visible_outlines[i / 8]) pVertex->uFlags |= 1; } @@ -2239,8 +2239,8 @@ for (uint i = 0; i < uNumFaces; ++i) { - auto pFace = pFaces + i; - auto pFaceExtra = pFaceExtras + pFace->uFaceExtraID; + BLVFace* pFace = &pFaces[i]; + BLVFaceExtra* pFaceExtra = &pFaceExtras[pFace->uFaceExtraID]; memcpy(&pFace->uAttributes, pData, 4); pData += 4; @@ -2279,7 +2279,7 @@ for (uint i = 0; i < uNumSpriteObjects; ++i) { - auto pItem = &pSpriteObjects[i]; + SpriteObject* pItem = &pSpriteObjects[i]; if (pItem->stru_24.uItemID && !(pItem->uAttributes & 0x0100)) { @@ -2321,30 +2321,30 @@ //if (uNumDoors > 0) for (uint i = 0, j = 0; i < uNumDoors; ++i) { - auto pDoor = pDoors + i; - - pDoor->pVertexIDs = ptr_0002B4_doors_ddata + j; + BLVDoor* pDoor = &pDoors[i]; + + pDoor->pVertexIDs = &ptr_0002B4_doors_ddata[j]; j += pDoor->uNumVertices; - pDoor->pFaceIDs = ptr_0002B4_doors_ddata + j; + pDoor->pFaceIDs = &ptr_0002B4_doors_ddata[j]; j += pDoor->uNumFaces; - pDoor->pSectorIDs = ptr_0002B4_doors_ddata + j; + pDoor->pSectorIDs = &ptr_0002B4_doors_ddata[j]; j += pDoor->field_48; - pDoor->pDeltaUs = (short *)(ptr_0002B4_doors_ddata + j); + pDoor->pDeltaUs = (short *)(&ptr_0002B4_doors_ddata[j]); j += pDoor->uNumFaces; - pDoor->pDeltaVs = (short *)(ptr_0002B4_doors_ddata + j); + pDoor->pDeltaVs = (short *)(&ptr_0002B4_doors_ddata[j]); j += pDoor->uNumFaces; - pDoor->pXOffsets = ptr_0002B4_doors_ddata + j; + pDoor->pXOffsets = &ptr_0002B4_doors_ddata[j]; j += pDoor->uNumOffsets; - pDoor->pYOffsets = ptr_0002B4_doors_ddata + j; + pDoor->pYOffsets = &ptr_0002B4_doors_ddata[j]; j += pDoor->uNumOffsets; - pDoor->pZOffsets = ptr_0002B4_doors_ddata + j; + pDoor->pZOffsets = &ptr_0002B4_doors_ddata[j]; j += pDoor->uNumOffsets; /*v173 = pDoors; for ( k = 0; ; v172 = v188 + 2 * *((short *)&v173[k] - 3) ) @@ -2383,12 +2383,12 @@ //v245 = 0; for (uint i = 0; i < uNumDoors; ++i) { - auto pDoor = pDoors + i; + BLVDoor* pDoor = &pDoors[i]; for (uint j = 0; j < pDoor->uNumFaces; ++j) { - auto pFace = pFaces + pDoor->pFaceIDs[j]; - auto pFaceExtra = pFaceExtras + pFace->uFaceExtraID; + BLVFace* pFace = &pFaces[pDoor->pFaceIDs[j]]; + BLVFaceExtra* pFaceExtra = &pFaceExtras[pFace->uFaceExtraID]; pDoor->pDeltaUs[j] = pFaceExtra->sTextureDeltaU; pDoor->pDeltaVs[j] = pFaceExtra->sTextureDeltaV; @@ -2511,7 +2511,7 @@ for (uint i = 1; i < uNumSectors; ++i) { - auto pSector = pSectors + i; + BLVSector* pSector = &pSectors[i]; if (pSector->pBounding.x1 > sX || pSector->pBounding.x2 < sX || pSector->pBounding.y1 > sY || pSector->pBounding.y2 < sY || @@ -2532,7 +2532,7 @@ else uFaceID = pSector->pPortals[j - pSector->uNumFloors]; - auto pFace = pFaces + uFaceID; + BLVFace* pFace = &pFaces[uFaceID]; if (pFace->uPolygonType != POLYGON_Floor && pFace->uPolygonType != POLYGON_InBetweenFloorAndWall) continue; @@ -2547,13 +2547,13 @@ if (v54 >= 2) break; - auto v2 = &pVertices[pFace->pVertexIDs[k]]; + Vec3* v2 = &pVertices[pFace->pVertexIDs[k]]; v50 = v2->y >= sY; if (v59 == v50) continue; - auto v1 = &pVertices[pFace->pVertexIDs[k - 1]]; + Vec3* v1 = &pVertices[pFace->pVertexIDs[k - 1]]; v25 = v2->x >= sX ? 0 : 2; v26 = v25 | (v1->x < sX); @@ -2575,15 +2575,15 @@ //fixpoint_div(v1->x - v2->x, v1->y - v2->y); //_a58 = v33 / (v1->y - v2->y); //_a59 = fixpoint_mul(_a58, sY - v2->y); - auto x_div_y = fixpoint_div(v1->x - v2->x, v1->y - v2->y); - auto res = fixpoint_mul(x_div_y, sY - v2->y); // a / b * c - looks like projection + long long x_div_y = fixpoint_div(v1->x - v2->x, v1->y - v2->y); + long long res = fixpoint_mul(x_div_y, sY - v2->y); // a / b * c - looks like projection if (res + v2->x > sX) ++v54; } else { - auto x_div_y = fixpoint_div(v2->x - v1->x, v2->y - v1->y); - auto res = fixpoint_mul(x_div_y, sY - v1->y); + long long x_div_y = fixpoint_div(v2->x - v1->x, v2->y - v1->y); + long long res = fixpoint_mul(x_div_y, sY - v1->y); if (res + v1->x > sX) ++v54; @@ -2854,7 +2854,7 @@ //if ( pIndoor->uNumDoors > 0 ) for (uint i = 0; i < pIndoor->uNumDoors; ++i) { - auto door = pIndoor->pDoors + i; + BLVDoor* door = &pIndoor->pDoors[i]; //v80 = 0; //do //{ @@ -2897,7 +2897,7 @@ } else { - auto v5 = (signed int)(door->uTimeSinceTriggered * door->uOpenSpeed) / 128; + signed int v5 = (signed int)(door->uTimeSinceTriggered * door->uOpenSpeed) / 128; //v6 = door->uMoveLength; if ( v5 >= door->uMoveLength) { @@ -3755,7 +3755,7 @@ for (uint i = 0; i < pIndoor->uNumDoors; ++i) { - auto pDoor = pIndoor->pDoors + i; + BLVDoor* pDoor = &pIndoor->pDoors[i]; if (pDoor->uAttributes & 0x01) { @@ -3817,7 +3817,7 @@ for (uint i = 0; i < pIndoor->uNumFaces; ++i) { - auto pFace = pIndoor->pFaces + i; + BLVFace* pFace = &pIndoor->pFaces[i]; if (!pFace->uBitmapID != -1) pBitmaps_LOD->pTextures[pFace->uBitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[pFace->uBitmapID].palette_id1); } @@ -3826,7 +3826,7 @@ for (uint i = 0; i < uNumLevelDecorations; ++i) { - auto pDecortaion = &pLevelDecorations[i]; + LevelDecoration* pDecortaion = &pLevelDecorations[i]; pDecorationList->InitializeDecorationSprite(pDecortaion->uDecorationDescID); @@ -3888,10 +3888,10 @@ for (uint i = 0; i < uNumSpriteObjects; ++i) { - auto p = &pSpriteObjects[i]; + SpriteObject* p = &pSpriteObjects[i]; if (p->uObjectDescID) { - auto uItemID = p->stru_24.uItemID; + int uItemID = p->stru_24.uItemID; if (uItemID) { if (uItemID != 220 && pItemsTable->pItems[uItemID].uEquipType == EQUIP_POTION && @@ -4024,11 +4024,11 @@ static __int16 word_721390_ys[104]; // idb static __int16 word_721460_xs[104]; // idb - auto pSector = &pIndoor->pSectors[uSectorID]; + BLVSector* pSector = &pIndoor->pSectors[uSectorID]; v55 = 0; for (uint i = 0; i < pSector->uNumFloors; ++i) { - auto pFloor = &pIndoor->pFaces[pSector->pFloors[i]]; + BLVFace* pFloor = &pIndoor->pFaces[pSector->pFloors[i]]; if (pFloor->Clickable()) continue; @@ -4070,8 +4070,8 @@ ++v53; else { - auto a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]); - auto res = fixpoint_mul((signed int)word_721460_xs[j + 1] - (signed int)word_721460_xs[j], a_div_b); + long long a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]); + long long res = fixpoint_mul((signed int)word_721460_xs[j + 1] - (signed int)word_721460_xs[j], a_div_b); if (res + word_721460_xs[j] >= x) ++v53; @@ -4103,7 +4103,7 @@ { for (uint i = 0; i < pSector->uNumPortals; ++i) { - auto portal = &pIndoor->pFaces[pSector->pPortals[i]]; + BLVFace* portal = &pIndoor->pFaces[pSector->pPortals[i]]; if (portal->uPolygonType != POLYGON_Floor) continue; @@ -4141,8 +4141,8 @@ ++v54; else { - auto a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]); - auto res = fixpoint_mul(word_721460_xs[j + 1] - word_721460_xs[j], a_div_b); + long long a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]); + long long res = fixpoint_mul(word_721460_xs[j + 1] - word_721460_xs[j], a_div_b); if (res + word_721460_xs[j] >= x) ++v54; } @@ -4506,7 +4506,7 @@ for (uint i = 0; i < uNumActors; ++i) { - auto p = &pActors[i]; + Actor* p = &pActors[i]; if (p->uAIState == Removed || p->uAIState == Disabled) @@ -4709,7 +4709,7 @@ for (uint i = 0; i < uNumSpriteObjects; ++i) { - auto p = &pSpriteObjects[i]; + SpriteObject* p = &pSpriteObjects[i]; if (p->uObjectDescID) { v1 = &pObjectList->pObjects[p->uObjectDescID]; @@ -6151,7 +6151,7 @@ face_id = PID_ID(a1) & 0x3F; if (bmodel_id >= pOutdoor->uNumBModels) return 1; - auto face = &pOutdoor->pBModels[bmodel_id].pFaces[face_id]; + ODMFace* face = &pOutdoor->pBModels[bmodel_id].pFaces[face_id]; if (face->uAttributes & 0x100000 || face->sCogTriggeredID == 0 ) return 1; EventProcessor((signed __int16)face->sCogTriggeredID, v2, 1); diff -r 92dfa0cafbe3 -r c1c74df0a33e IndoorCameraD3D.cpp --- a/IndoorCameraD3D.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/IndoorCameraD3D.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -429,7 +429,7 @@ { //ViewTransform_ODM(a1a + i); - auto a1 = a1a + i; + RenderVertexSoft* a1 = &a1a[i]; //----- (00481CCE) -------------------------------------------------------- //void ViewTransform_ODM(RenderVertexSoft *a1) { diff -r 92dfa0cafbe3 -r c1c74df0a33e Keyboard.cpp --- a/Keyboard.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Keyboard.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -990,7 +990,7 @@ if ( pRenderer->pRenderD3D ) { pGame->PickKeyboard(GetAsyncKeyState(VK_CONTROL) & 0x8001, &vis_sprite_filter_3, &vis_door_filter); - auto pid = pGame->pVisInstance->get_picked_object_zbuf_val(); + int pid = pGame->pVisInstance->get_picked_object_zbuf_val(); if ( pid != -1 ) DoInteractionWithTopmostZObject(pid & 0xFFFF, PID_ID(pid)); return; diff -r 92dfa0cafbe3 -r c1c74df0a33e LOD.cpp --- a/LOD.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/LOD.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -2574,7 +2574,7 @@ //v5 = this; //v6 = FindContainer(pContainer, 0); //File = v6; - auto pFile = FindContainer(pContainer, false); + FILE* pFile = FindContainer(pContainer, false); if (!pFile) return -1; v8 = pOutTex; diff -r 92dfa0cafbe3 -r c1c74df0a33e LightmapBuilder.cpp --- a/LightmapBuilder.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/LightmapBuilder.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -566,8 +566,8 @@ //----- (0045C7F6) -------------------------------------------------------- bool LightmapBuilder::ApplyLights_IndoorFace(unsigned int uFaceID) { - auto pFace = &pIndoor->pFaces[uFaceID]; - auto pSector = pIndoor->pSectors + pFace->uSectorID; + BLVFace* pFace = &pIndoor->pFaces[uFaceID]; + BLVSector* pSector = &pIndoor->pSectors[pFace->uSectorID]; stru_F8AD28.uCurrentAmbientLightLevel = (stru_F8AD28.uDefaultAmbientLightLevel + pSector->uMinAmbientLightLevel) << 16; @@ -585,7 +585,7 @@ if (uNumLightsApplied >= 20 ) break; - auto pLight = &pIndoor->pLights[pSector->pLights[i]]; + BLVLightMM7* pLight = &pIndoor->pLights[pSector->pLights[i]]; if (~pLight->uAtributes & 0x08) ApplyLight_BLV((StationaryLight *)pLight, pFace, &uFaceID, false, &byte_4E94D0); } @@ -623,7 +623,7 @@ a2->pFacePlane.dist; if ((bLightBackfaces || v13 >= 0.0f) && fabsf(v13) <= pLight->uRadius) { - auto slot = *pSlot; + unsigned int slot = *pSlot; stru_F8AD28._blv_lights_radii[slot] = pLight->uRadius; stru_F8AD28._blv_lights_inv_radii[slot] = 65536 / pLight->uRadius; @@ -1432,7 +1432,7 @@ arg4.z = 1.0f; if (indices) { - for (auto i = indices; *i != -1; ++i) + for (int* i = indices; *i != -1; ++i) { v28 = &std__vector_000004[*i]; if ( !DrawLightmap(v28, &arg4, 0.0) ) @@ -1441,9 +1441,9 @@ } else { - for (auto i = 0; i < std__vector_000004_size; ++i) + for (unsigned int i = 0; i < std__vector_000004_size; ++i) { - auto _a1 = &std__vector_000004[(int)i]; + Lightmap* _a1 = &std__vector_000004[(int)i]; if ( !DrawLightmap(_a1, &arg4, 0.0) ) { MessageBoxW(nullptr, L"Invalid lightmap detected!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Light.cpp:1238", 0); @@ -1576,7 +1576,7 @@ ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE)); ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, FALSE)); - auto pTex = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("effpar03"); + IDirect3DTexture2* pTex = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("effpar03"); ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, pTex)); ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE)); diff -r 92dfa0cafbe3 -r c1c74df0a33e Lights.h --- a/Lights.h Mon Oct 28 22:16:42 2013 -0700 +++ b/Lights.h Wed Oct 30 00:47:37 2013 -0700 @@ -84,7 +84,7 @@ return false; } - auto pLight = &pLights[uNumLightsActive++]; + StationaryLight* pLight = &pLights[uNumLightsActive++]; pLight->vPosition.x = x; pLight->vPosition.y = y; pLight->vPosition.z = z; diff -r 92dfa0cafbe3 -r c1c74df0a33e Monsters.cpp --- a/Monsters.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Monsters.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -472,7 +472,7 @@ for (uint i = 0; i < num_mm6_monsters; ++i) { auto src = (MonsterDesc_mm6 *)((char *)data_mm6 + 4) + i; - auto dst = pMonsters + num_mm7_monsters + i; + MonsterDesc* dst = &pMonsters[num_mm7_monsters + i]; dst->uMonsterHeight = src->uMonsterHeight; dst->uMonsterRadius = src->uMonsterRadius; diff -r 92dfa0cafbe3 -r c1c74df0a33e Mouse.cpp --- a/Mouse.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Mouse.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -180,7 +180,7 @@ //----- (00469C0D) -------------------------------------------------------- void *Mouse::DoAllocCursorMem() { - auto tex = pIcons_LOD->GetTexture(uCursorTextureID); + Texture* tex = pIcons_LOD->GetTexture(uCursorTextureID); return malloc(4 * tex->uTextureWidth * tex->uTextureHeight); } @@ -329,7 +329,7 @@ if (!pCursorBitmap3_sysmembits_16bit) return; - auto pSrc = pCursorBitmap3_sysmembits_16bit; + ushort* pSrc = pCursorBitmap3_sysmembits_16bit; for (uint y = field_44; y < field_4C; ++y) for (uint x = field_40; x < field_48; ++x) pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + x] = *pSrc++; @@ -583,7 +583,7 @@ v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; v6 = (unsigned __int16)v5; - auto type = PID_TYPE(v6); + uint type = PID_TYPE(v6); if (type == OBJECT_Actor && uActiveCharacter && v5 < 0x2000000 diff -r 92dfa0cafbe3 -r c1c74df0a33e NewUI/MainMenu.cpp --- a/NewUI/MainMenu.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/NewUI/MainMenu.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -28,14 +28,14 @@ bool MainMenuWindow::Initialize() { - auto background_texture = new RGBTexture; + RGBTexture* background_texture = new RGBTexture; background_texture->Load("mm6title.pcx", 0); return true; } MainMenuWindow *MainMenuWindow::Create() { - auto window = new MainMenuWindow; + MainMenuWindow* window = new MainMenuWindow; if (window) if (!window->Initialize()) { diff -r 92dfa0cafbe3 -r c1c74df0a33e OSWindow.cpp --- a/OSWindow.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/OSWindow.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -430,7 +430,7 @@ OSWindow *OSWindow::Create(const wchar_t *title, int window_width, int window_height) { - auto window = new OSWindow; + OSWindow* window = new OSWindow; if (window) if (!window->Initialize(title, window_width, window_height)) { @@ -447,14 +447,14 @@ { if (msg == WM_NCCREATE) { - auto cs = (CREATESTRUCTA *)(lparam); - auto window = (OSWindow *)cs->lpCreateParams; + CREATESTRUCTA* cs = (CREATESTRUCTA *)(lparam); + OSWindow* window = (OSWindow *)cs->lpCreateParams; SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)window); return DefWindowProcW(hwnd, msg, wparam, lparam); } - auto window = (OSWindow *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + OSWindow* window = (OSWindow *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); if (window && window->api_handle == hwnd) { LPARAM result; diff -r 92dfa0cafbe3 -r c1c74df0a33e ObjectList.cpp --- a/ObjectList.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/ObjectList.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -71,7 +71,7 @@ for (uint i = 0; i < num_mm6_objs; ++i) { auto src = (ObjectDesc_mm6 *)((char *)data_mm6 + 4) + i; - auto dst = pObjects + num_mm7_objs + i; + ObjectDesc* dst = &pObjects[num_mm7_objs + i]; memcpy(dst->field_0, src->field_0, sizeof(dst->field_0)); dst->uObjectID = src->uObjectID; dst->uRadius = src->uRadius; diff -r 92dfa0cafbe3 -r c1c74df0a33e Outdoor.cpp --- a/Outdoor.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Outdoor.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -394,7 +394,7 @@ char Str[140]; // [sp+8h] [bp-78h]@3 //int a5a; // [sp+94h] [bp+14h]@3 - auto Source = this; + OutdoorLocation* Source = this; v5 = Source; if ( a5 < 10 @@ -626,7 +626,7 @@ { strcpy(pOutdoor->pLevelFilename, pCurrentMapName); - auto map_id = pMapStats->GetMapInfo(pCurrentMapName); + MAP_TYPE map_id = pMapStats->GetMapInfo(pCurrentMapName); if (map_id == MAP_INVALID || map_id == MAP_CELESTIA || map_id == MAP_THE_PIT || map_id > MAP_SHOALS) return; @@ -1727,13 +1727,13 @@ //v40 = header.uCompressedSize; //pSource = header.uDecompressedSize; //v41 = malloc(header.uDecompressedSize); - auto pSrcMem = (unsigned char *)malloc(header.uDecompressedSize); - auto pSrc = pSrcMem; + uchar* pSrcMem = (unsigned char *)malloc(header.uDecompressedSize); + uchar* pSrc = pSrcMem; //v42 = v41; //HIDWORD(v142) = (uint32)pSrc; if (header.uCompressedSize < header.uDecompressedSize) { - auto pComressedSrc = (char *)malloc(header.uCompressedSize); + char* pComressedSrc = (char *)malloc(header.uCompressedSize); fread(pComressedSrc, header.uCompressedSize, 1, v39); uint actualDecompressedSize = header.uDecompressedSize; @@ -1824,7 +1824,7 @@ for (uint i = 0; i < uNumBModels; ++i) { //v48 = 0; - auto model = &pBModels[i]; + BSPModel* model = &pBModels[i]; model->pVertices.pVertices = nullptr; model->pFaces = nullptr; @@ -1895,7 +1895,7 @@ //memcpy(v59, uSourceLen, (size_t)pFilename); //uSourceLen = (char *)uSourceLen + (int)pFilename; //ptr = (FILE *)malloc(10 * model->uNumFaces); - auto textureFilenames = (const char *)malloc(10 * model->uNumFaces); + const char* textureFilenames = (const char *)malloc(10 * model->uNumFaces); //pFilename = (char *)(10 * pBModels[v48].uNumFaces); memcpy((char *)textureFilenames, pSrc, 10 * model->uNumFaces); pSrc += 10 * model->uNumFaces; @@ -1904,11 +1904,11 @@ //v60 = pBModels; for (uint j = 0; j < model->uNumFaces; ++j) { - auto texFilename = textureFilenames + j * 10; + const char* texFilename = &textureFilenames[j * 10]; //v149 = 0; //Str2 = (char *)ptr; - auto *face = &model->pFaces[j]; + ODMFace* face = &model->pFaces[j]; //pFilename = (char *)v149 + (unsigned int)v60[v48].pFaces; if (~face->uAttributes & FACE_DONT_CACHE_TEXTURE) { @@ -2073,7 +2073,7 @@ fread(pSrc, header.uDecompressedSize, 1u, v39); else if (header.uCompressedSize < header.uDecompressedSize) { - auto compressedMem = malloc(header.uCompressedSize); + void* compressedMem = malloc(header.uCompressedSize); fread(compressedMem, header.uCompressedSize, 1, v39); uint actualDecompressedSize = header.uDecompressedSize; @@ -2143,7 +2143,7 @@ fread(pSrcMem, header.uDecompressedSize, 1, v39); else if (header.uCompressedSize < header.uDecompressedSize) { - auto compressedMem = malloc(header.uCompressedSize); + void* compressedMem = malloc(header.uCompressedSize); fread(compressedMem, header.uCompressedSize, 1u, v39); uint actualDecompressedSize = header.uDecompressedSize; @@ -2181,7 +2181,7 @@ //v151 = 0; for (uint i = 0; i < uNumBModels; ++i) { - auto model = pBModels[i]; + BSPModel model = pBModels[i]; //pNumItems = 0; //do //{ @@ -2190,7 +2190,7 @@ //v87 = (unsigned int)((char *)v86 + pNumItems); for (uint j = 0; j < model.uNumFaces; ++j) { - auto face = model.pFaces[j]; + ODMFace face = model.pFaces[j]; //if ( *(int *)(v87 + 76) > 0 ) //{ @@ -2213,7 +2213,7 @@ //thisa = 0; for (uint j = 0; j < model.uNumFaces; ++j) { - auto face = model.pFaces[j]; + ODMFace face = model.pFaces[j]; //pFilename = 0; //do //{ @@ -2321,7 +2321,7 @@ strcpy(pGroundTileset, byte_6BE124_cfg_textures_DefaultGroundTexture.data()); //v97 = pTileTypes[0].uTileID; //v108 = 0; - auto v98 = pTileTable->GetTileById(pTileTypes[0].uTileID); + TileDesc* v98 = pTileTable->GetTileById(pTileTypes[0].uTileID); //v99 = pBitmaps_LOD->LoadTexture(v98->pTileName, TEXTURE_DEFAULT); uMainTile_BitmapID = pBitmaps_LOD->LoadTexture(v98->pTileName, TEXTURE_DEFAULT); if (uMainTile_BitmapID != -1) @@ -2681,7 +2681,7 @@ for (uint i = 0; i < uNumLevelDecorations; ++i) { - auto decor = &pLevelDecorations[i]; + LevelDecoration* decor = &pLevelDecorations[i]; pDecorationList->InitializeDecorationSprite(decor->uDecorationDescID); v4 = pDecorationList->pDecorations[decor->uDecorationDescID].uSoundID; @@ -2916,7 +2916,7 @@ //v1 = pActors;//[0].vPosition.z; //do //{ - auto actor = &pActors[i]; + Actor* actor = &pActors[i]; //v2 = actor->uAIState; actor->uAttributes &= 0xFFFFFFF7u; @@ -3313,23 +3313,23 @@ //----- (0046DCC8) -------------------------------------------------------- void ODM_GetTerrainNormalAt(int pos_x, int pos_z, Vec3_int_ *out) { - auto grid_x = WorldPosToGridCellX(pos_x); - auto grid_z = WorldPosToGridCellZ(pos_z) - 1; + uint grid_x = WorldPosToGridCellX(pos_x); + uint grid_z = WorldPosToGridCellZ(pos_z) - 1; - auto grid_pos_x1 = GridCellToWorldPosX(grid_x); - auto grid_pos_x2 = GridCellToWorldPosX(grid_x + 1); - auto grid_pos_z1 = GridCellToWorldPosZ(grid_z); - auto grid_pos_z2 = GridCellToWorldPosZ(grid_z + 1); + int grid_pos_x1 = GridCellToWorldPosX(grid_x); + int grid_pos_x2 = GridCellToWorldPosX(grid_x + 1); + int grid_pos_z1 = GridCellToWorldPosZ(grid_z); + int grid_pos_z2 = GridCellToWorldPosZ(grid_z + 1); - auto x1z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z); - auto x2z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z); - auto x2z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z + 1); - auto x1z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z + 1); + int x1z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z); + int x2z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z); + int x2z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z + 1); + int x1z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z + 1); float side1_dx, side1_dy, side1_dz, side2_dx, side2_dy, side2_dz; - auto dx = abs(pos_x - grid_pos_x1), + int dx = abs(pos_x - grid_pos_x1), dz = abs(grid_pos_z1 - pos_z); if (dz >= dx) { @@ -3400,7 +3400,7 @@ ai_arrays_size = 0; for (uint i = 0; i < uNumActors; ++i) { - auto actor = &pActors[i]; + Actor* actor = &pActors[i]; actor->uAttributes &= 0xFFFFFBFF; if (!actor->CanAct()) diff -r 92dfa0cafbe3 -r c1c74df0a33e ParticleEngine.cpp --- a/ParticleEngine.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/ParticleEngine.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -177,7 +177,7 @@ for (uint i = uStartParticle; i <= uEndParticle; ++i) { - auto p = pParticles + i; + Particle* p = &pParticles[i]; if (p->type == ParticleType_Invalid) continue; @@ -531,7 +531,7 @@ //HIDWORD(v8) = fixpoint_sub_unknown(v6->x - pIndoorCamera->pos.x, v5); //v12 = v6->_z + 6.7553994e15; //uIDd = (LODWORD(v12) - pIndoorCamera->pos.z) << 16; - auto _hidword_v12 = fixpoint_mul(v11, v3) + fixpoint_sub_unknown(v6->z - pGame->pIndoorCameraD3D->vPartyPos.z, v44); + long long _hidword_v12 = fixpoint_mul(v11, v3) + fixpoint_sub_unknown(v6->z - pGame->pIndoorCameraD3D->vPartyPos.z, v44); LODWORD(v13) = 0; HIDWORD(v13) = SLOWORD(pODMRenderParams->int_fov_rad); //v14 = v13 / _hidword_v12; @@ -569,7 +569,7 @@ //v21 = v6->_z + 6.7553994e15; LODWORD(v22) = 0; HIDWORD(v22) = SLOWORD(pODMRenderParams->int_fov_rad); - auto _var_123 = fixpoint_sub_unknown(v6->x - pGame->pIndoorCameraD3D->vPartyPos.x, v4) + fixpoint_sub_unknown(v6->y - pGame->pIndoorCameraD3D->vPartyPos.y, v5); + long long _var_123 = fixpoint_sub_unknown(v6->x - pGame->pIndoorCameraD3D->vPartyPos.x, v4) + fixpoint_sub_unknown(v6->y - pGame->pIndoorCameraD3D->vPartyPos.y, v5); //v23 = v22 / _var_123; v6->_screenspace_scale = v22 / _var_123; //v24 = v6->_screenspace_scale; @@ -636,7 +636,7 @@ for (uint i = uStartParticle; i < uEndParticle; ++i) { - auto p = pParticles + i; + Particle* p = &pParticles[i]; if (p->type == ParticleType_Invalid) continue; @@ -755,7 +755,7 @@ //v16 = this->uStartParticle; for (uint i = uStartParticle; i <= uEndParticle; ++i) { - auto particle = pParticles + i; + Particle* particle = &pParticles[i]; if (particle->type == ParticleType_Invalid || !ViewProject_TrueIfStillVisible_ODM(i)) continue; diff -r 92dfa0cafbe3 -r c1c74df0a33e Party.cpp --- a/Party.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Party.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -45,7 +45,7 @@ for (unsigned int i = 0; i < pNPCStats->uNumNewNPCs; ++i) { - auto npc = pNPCStats->pNewNPCData + i; + NPCData* npc = &pNPCStats->pNewNPCData[i]; if (npc->Hired() && (!pHirelings[0].pName || strcmp(npc->pName, pHirelings[0].pName))) { @@ -621,14 +621,14 @@ this->field_708 = 15; this->field_0 = 25; - for (auto playerId = 0; playerId < 4; playerId++) + for (int playerId = 0; playerId < 4; playerId++) { - for (auto buffId = 0; buffId < 24; buffId++) + for (int buffId = 0; buffId < 24; buffId++) { this->pPlayers[playerId].pPlayerBuffs[buffId].Reset(); } } - for (auto buffId = 0; buffId < 20; buffId++) + for (int buffId = 0; buffId < 20; buffId++) { this->pPartyBuffs[buffId].Reset(); } @@ -644,7 +644,7 @@ Player* player = &pPlayers[i]; player->uExpressionTimePassed += (unsigned short)pMiscTimer->uTimeElapsed; - auto condition = player->GetMajorConditionIdx(); + uint condition = player->GetMajorConditionIdx(); if (condition == Condition_Good || condition == Condition_Zombie) { if (player->uExpressionTimePassed < player->uExpressionTimeLength) diff -r 92dfa0cafbe3 -r c1c74df0a33e Player.cpp --- a/Player.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Player.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -1470,7 +1470,7 @@ break; } - auto uConditionMult = pConditionAttributeModifier[attrId][GetMajorConditionIdx()]; + uchar uConditionMult = pConditionAttributeModifier[attrId][GetMajorConditionIdx()]; int magicBonus = GetMagicalBonus(attrId); int itemBonus = GetItemsBonus(attrId); return uConditionMult * uAgeingMultiplier * this->*attrValue / 100 / 100 @@ -1915,7 +1915,7 @@ //----- (0048D6AA) -------------------------------------------------------- bool Player::HasItemEquipped(ITEM_EQUIP_TYPE uEquipIndex) { - auto i = pEquipment.pIndices[uEquipIndex]; + uint i = pEquipment.pIndices[uEquipIndex]; if (i) return !pOwnItems[i - 1].IsBroken(); else @@ -2550,7 +2550,7 @@ uint armour_recovery = 0; if ( HasItemEquipped(EQUIP_ARMOUR) ) { - auto armour_skill_type = GetArmorItem()->GetPlayerSkillType(); + uchar armour_skill_type = GetArmorItem()->GetPlayerSkillType(); uint base_armour_recovery = base_recovery_times_per_weapon_type[armour_skill_type]; float multiplier; @@ -2578,7 +2578,7 @@ uint shield_recovery = 0; if (HasItemEquipped(EQUIP_OFF_HAND) && GetEquippedItemEquipType(EQUIP_OFF_HAND) == EQUIP_SHIELD) { - auto skill_type = GetOffHandItem()->GetPlayerSkillType(); + uchar skill_type = GetOffHandItem()->GetPlayerSkillType(); uint shield_base_recovery = base_recovery_times_per_weapon_type[skill_type]; float multiplier = GetArmorRecoveryMultiplierFromSkillLevel(skill_type, 1.0f, 0, 0, 0); @@ -3849,7 +3849,7 @@ //----- (00490188) -------------------------------------------------------- void Player::SetInitialStats() { - auto v1 = GetRace(); + CHARACTER_RACE v1 = GetRace(); uMight = StatTable[v1][0].uBaseValue; uIntelligence = StatTable[v1][1].uBaseValue; uWillpower = StatTable[v1][2].uBaseValue; diff -r 92dfa0cafbe3 -r c1c74df0a33e Render.cpp --- a/Render.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Render.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -147,7 +147,7 @@ pODMRenderParams->uNumBillboards = ::uNumBillboardsToDraw; for (uint i = 0; i < ::uNumBillboardsToDraw; ++i) { - auto p = pBillboardRenderList + i; + RenderBillboard* p = &pBillboardRenderList[i]; soft_billboard.uScreenSpaceX = p->uScreenSpaceX; soft_billboard.uParentBillboardID = i; @@ -299,7 +299,7 @@ uint norm_idx = pTerrainNormalIndices[2 * (x * 128 + z) + 2]; assert(norm_idx < uNumTerrainNormals); - auto norm = pTerrainNormals + norm_idx; + Vec3_float_* norm = &pTerrainNormals[norm_idx]; float _f = ((norm->x * (float)pOutdoor->vSunlight.x / 65536.0) - (norm->y * (float)pOutdoor->vSunlight.y / 65536.0) - (norm->z * (float)pOutdoor->vSunlight.z / 65536.0)); @@ -390,7 +390,7 @@ for (int i = 0; i < ::uNumBillboardsToDraw; ++i) { - auto pBillboard = pBillboardRenderList + i; + RenderBillboard* pBillboard = &pBillboardRenderList[i]; billboard.uScreenSpaceX = pBillboard->uScreenSpaceX; billboard.uScreenSpaceY = pBillboard->uScreenSpaceY; @@ -489,7 +489,7 @@ //v41 = 0; for (int i = 0; i < uNumSpriteObjects; ++i) { - auto object = &pSpriteObjects[i]; + SpriteObject* object = &pSpriteObjects[i]; //auto v0 = (char *)&pSpriteObjects[i].uSectorID; //v0 = (char *)&pSpriteObjects[0].uSectorID; //do @@ -498,7 +498,7 @@ continue; assert(object->uObjectDescID < pObjectList->uNumObjects); - auto object_desc = pObjectList->pObjects + object->uObjectDescID; + ObjectDesc* object_desc = &pObjectList->pObjects[object->uObjectDescID]; if (object_desc->NoSprite()) continue; @@ -908,13 +908,13 @@ //do for (int i = 0; i < uNumLevelDecorations; ++i) { - auto decor = &pLevelDecorations[i]; - auto v0 = (char *)&pLevelDecorations[i].vPosition.y; + LevelDecoration* decor = &pLevelDecorations[i]; + char* v0 = (char *)&pLevelDecorations[i].vPosition.y; if ((!(decor->uFlags & LEVEL_DECORATION_OBELISK_CHEST) || decor->IsObeliskChestActive()) && !(decor->uFlags & LEVEL_DECORATION_INVISIBLE)) { //v1 = &pDecorationList->pDecorations[decor->uDecorationDescID]; - auto decor_desc = pDecorationList->pDecorations + decor->uDecorationDescID; + DecorationDesc* decor_desc = pDecorationList->pDecorations + decor->uDecorationDescID; v2 = decor_desc->uFlags; if ( (char)v2 >= 0 ) { @@ -2113,8 +2113,8 @@ this->bTinting = bTinting; - auto r1 = pD3DBitmaps.Load(L"data\\d3dbitmap.hwl"); - auto r2 = pD3DSprites.Load(L"data\\d3dsprite.hwl"); + bool r1 = pD3DBitmaps.Load(L"data\\d3dbitmap.hwl"); + bool r2 = pD3DSprites.Load(L"data\\d3dsprite.hwl"); return r1 && r2; } @@ -2949,7 +2949,7 @@ IDirectDrawSurface4 *v4; // ST0C_4@6 RECT v5; // [sp+8h] [bp-10h]@6 - auto a1 = this; + Render* a1 = this; v2 = a1; if ( a1->pRenderD3D ) { @@ -4302,7 +4302,7 @@ signed int v3; // [sp-8h] [bp-Ch]@3 int v4; // [sp-4h] [bp-8h]@3 - auto a5 = this; + Render* a5 = this; if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 ) { pFront = (IDirectDrawSurface *)a5->pFrontBuffer4; @@ -5434,7 +5434,7 @@ //v59 = pGame->pLightmapBuilder; //v9 = v59->std__vector_000004_size; - auto uCorrectedColor = uColor; + uint uCorrectedColor = uColor; if (pGame->pLightmapBuilder->std__vector_000004_size) uCorrectedColor = 0xFFFFFFFF; pGame->AlterGamma_BLV(pFace, &uCorrectedColor); @@ -6390,7 +6390,7 @@ HRESULT v16; // eax@23 stru350 Dst; // [sp+Ch] [bp-F8h]@12 - auto pHWLTexture = pD3DBitmaps.LoadTexture(pName, bMipMaps); + HWLTexture* pHWLTexture = pD3DBitmaps.LoadTexture(pName, bMipMaps); if ( pHWLTexture ) { bMipMaps = !strncmp(pName, "HDWTR", 5); @@ -6651,7 +6651,7 @@ __debugbreak(); - auto ecx0 = this; + Render* ecx0 = this; v3 = 0; if (!this->pRenderD3D) @@ -7168,7 +7168,7 @@ unsigned __int32 twoColors = (uColor16 << 16) | uColor16; for (uint y = 0; y < uHeight; ++y) { - auto pDst = &pTargetSurface[uX + (y + uY) * uTargetSurfacePitch]; + ushort* pDst = &pTargetSurface[uX + (y + uY) * uTargetSurfacePitch]; memset32(pDst, twoColors, uWidth / 2); if (uWidth & 1) @@ -7313,9 +7313,9 @@ unsigned int v29; // [sp+24h] [bp+14h]@22 unsigned int v30; // [sp+24h] [bp+14h]@31 - auto a2 = x; - auto a3 = y; - auto a6 = uFontHeight; + int a2 = x; + int a3 = y; + uint a6 = uFontHeight; if ( this->uNumSceneBegins ) { v8 = a5; @@ -8430,9 +8430,9 @@ idx2 = uNumItems; while (true) { - auto i = idx1 + (idx2 - idx1) / 2; - - auto res = _stricmp(pName, pSpriteNames[i]); + uint i = idx1 + (idx2 - idx1) / 2; + + int res = _stricmp(pName, pSpriteNames[i]); if (!res) { fseek(pFile, pSpriteOffsets[i], SEEK_SET); @@ -8451,7 +8451,7 @@ uint uCompressedSize = 0; fread(&uCompressedSize, 4, 1, pFile); - auto pTex = new HWLTexture; + HWLTexture* pTex = new HWLTexture; fread(&pTex->uBufferWidth, 4, 1, pFile); fread(&pTex->uBufferHeight, 4, 1, pFile); fread(&pTex->uAreaWidth, 4, 1, pFile); @@ -8464,10 +8464,10 @@ pTex->pPixels = new unsigned __int16[pTex->uWidth * pTex->uHeight]; if (uCompressedSize) { - auto pCompressedData = new char[uCompressedSize]; + char* pCompressedData = new char[uCompressedSize]; { fread(pCompressedData, 1, uCompressedSize, pFile); - auto uDecompressedSize = pTex->uWidth * pTex->uHeight * sizeof(short); + uint uDecompressedSize = pTex->uWidth * pTex->uHeight * sizeof(short); zlib::MemUnzip(pTex->pPixels, &uDecompressedSize, pCompressedData, uCompressedSize); } delete [] pCompressedData; @@ -8640,7 +8640,7 @@ for (uint i = pRenderer->uNumBillboardsToDraw - 1; i != (uint)-1; --i) { - auto p = &pRenderer->pBillboardRenderListD3D[i]; + RenderBillboardD3D* p = &pRenderer->pBillboardRenderListD3D[i]; if (p->uOpacity != RenderBillboardD3D::NoBlend) SetBillboardBlendOptions(p->uOpacity); diff -r 92dfa0cafbe3 -r c1c74df0a33e SaveLoad.cpp --- a/SaveLoad.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/SaveLoad.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -97,7 +97,7 @@ int e = GetLastError(); pNew_LOD->LoadFile("data\\new.lod", 0); - auto *f = pNew_LOD->FindContainer("header.bin", 1); + FILE *f = pNew_LOD->FindContainer("header.bin", 1); if (!f) { sprintf(Str, pGlobalTXT_LocalizationStrings[612], 100); @@ -175,7 +175,7 @@ for (uint i = 0; i < 4; ++i) { - auto uQuickspell = pParty->pPlayers[i].uQuickSpell; + uchar uQuickspell = pParty->pPlayers[i].uQuickSpell; if (uQuickspell) stru_AA1058[i]._494836(uQuickspell, i + 9 - 8); @@ -184,7 +184,7 @@ uint uEquipIdx = pParty->pPlayers[i].pEquipment.pIndices[j]; if (uEquipIdx) { - auto uItemID = pParty->pPlayers[i].pInventoryItemList[uEquipIdx - 1].uItemID; + int uItemID = pParty->pPlayers[i].pInventoryItemList[uEquipIdx - 1].uItemID; if (pItemsTable->pItems[uItemID].uEquipType == 12) { __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 @@ -725,10 +725,10 @@ if ( pRenderer->LockSurface_DDraw4(pRenderer->pBackBuffer4, &Dst, DDLOCK_WAIT) ) { - auto src = (unsigned __int16 *)Dst.lpSurface; - auto src_width = (Dst.lPitch / sizeof(short)); - auto src_height = Dst.dwHeight; - auto dst = pPixels; + ushort* src = (unsigned __int16 *)Dst.lpSurface; + ulong src_width = (Dst.lPitch / sizeof(short)); + ulong src_height = Dst.dwHeight; + ushort* dst = pPixels; for (uint y = 0; y < height; ++y) { //uint src_y = (game_viewport_y + y * v25) * (Dst.lPitch / sizeof(short)); diff -r 92dfa0cafbe3 -r c1c74df0a33e SpriteObject.cpp --- a/SpriteObject.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/SpriteObject.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -1054,7 +1054,7 @@ { for (uint i = 0; i < uNumSpriteObjects; ++i) { - auto item = &pSpriteObjects[i]; + SpriteObject* item = &pSpriteObjects[i]; if (item->uType && (item->uSoundID & 8 || pObjectList->pObjects[item->uType].uFlags & 0x10)) diff -r 92dfa0cafbe3 -r c1c74df0a33e Sprites.cpp --- a/Sprites.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Sprites.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -91,7 +91,7 @@ { v3 = uSpriteID; - auto uFlags = pSpriteSFrames[v3].uFlags; + int uFlags = pSpriteSFrames[v3].uFlags; if (!(uFlags & 0x0080)) //not loaded { pSpriteSFrames[v3].uFlags |= 0x80; //set loaded @@ -394,11 +394,11 @@ pSpritePFrames = (SpriteFrame **)malloc(4 * uNumSpriteFrames); - auto mm7_frames_size = num_mm7_frames * sizeof(SpriteFrame); + uint mm7_frames_size = num_mm7_frames * sizeof(SpriteFrame); memcpy(pSpriteSFrames, (char *)data_mm7 + 8, mm7_frames_size); memcpy(pSpriteEFrames, (char *)data_mm7 + 8 + mm7_frames_size, 2 * num_mm7_eframes); - auto mm6_frames_size = num_mm6_frames * sizeof(SpriteFrame_mm6); + uint mm6_frames_size = num_mm6_frames * sizeof(SpriteFrame_mm6); for (uint i = 0; i < num_mm6_frames; ++i) { memcpy(pSpriteSFrames + num_mm7_frames + i, (char *)data_mm6 + 8 + i * sizeof(SpriteFrame_mm6), sizeof(SpriteFrame_mm6)); @@ -406,7 +406,7 @@ } memcpy(pSpriteEFrames + num_mm7_frames, (char *)data_mm6 + 8 + mm6_frames_size, 2 * num_mm6_eframes); - auto mm8_frames_size = num_mm8_frames * sizeof(SpriteFrame); + uint mm8_frames_size = num_mm8_frames * sizeof(SpriteFrame); memcpy(pSpriteSFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8, mm8_frames_size); memcpy(pSpriteEFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 8 + mm8_frames_size, 2 * num_mm8_eframes); diff -r 92dfa0cafbe3 -r c1c74df0a33e Texture.cpp --- a/Texture.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Texture.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -1171,7 +1171,7 @@ - auto pOutPixels = pPixels; + ushort* pOutPixels = pPixels; memset(pOutPixels, 0, uNumPixels * sizeof(__int16)); diff -r 92dfa0cafbe3 -r c1c74df0a33e TileTable.cpp --- a/TileTable.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/TileTable.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -96,7 +96,7 @@ FILE *v2; // eax@1 FILE *v3; // edi@1 - auto Str = this; + TileTable* Str = this; v1 = Str; v2 = fopen("data\\dtile.bin", "wb"); diff -r 92dfa0cafbe3 -r c1c74df0a33e UI/UICharacter.cpp --- a/UI/UICharacter.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/UI/UICharacter.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -479,15 +479,15 @@ int num_skills_drawn = 0; for (int i = 0; i < skill_list_size; ++i) { - auto skill = (PLAYER_SKILL_TYPE)skill_list[i]; + PLAYER_SKILL_TYPE skill = (PLAYER_SKILL_TYPE)skill_list[i]; for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j) { - auto v8 = pGUIWindow_CurrentMenu->pControlsHead; + GUIButton* v8 = pGUIWindow_CurrentMenu->pControlsHead; for (int v7 = j; v7 > 0; --v7) v8 = v8->pNext; - auto v9 = v8->field_1C; + int v9 = v8->field_1C; if ((short)(v8->field_1C) >= 0) continue; if ( (v9 & 0x7FFF) != skill ) @@ -496,8 +496,8 @@ ++num_skills_drawn; y_offset = v8->uY; - auto skill_value = player->pActiveSkills[skill]; - auto skill_level = skill_value & 0x3F; + ushort skill_value = player->pActiveSkills[skill]; + int skill_level = skill_value & 0x3F; uint skill_color = 0; uint skill_mastery_color = 0; @@ -1613,7 +1613,7 @@ static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id) { - auto item_texture = pIcons_LOD->LoadTexturePtr(item->GetIconName(), TEXTURE_16BIT_PALETTE); + Texture* item_texture = pIcons_LOD->LoadTexturePtr(item->GetIconName(), TEXTURE_16BIT_PALETTE); if (item->uAttributes & 0xF0) // enchant animation { @@ -1769,7 +1769,7 @@ memset(byte_5111F6.data(), 0, sizeof(byte_5111F6)); for (uint i = 0; i < 4; ++i) { - auto player = &pParty->pPlayers[i]; + Player* player = &pParty->pPlayers[i]; if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1)) byte_5111F6[0] = 1; if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6[1] = 1; diff -r 92dfa0cafbe3 -r c1c74df0a33e UI/UIPopup.cpp --- a/UI/UIPopup.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/UI/UIPopup.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -576,7 +576,7 @@ { v21 = dst_x; v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x]; - auto _v22_2 = v22; + ushort* _v22_2 = v22; v23 = i - dst_y; v115 = i - dst_y; while ( 1 ) @@ -616,11 +616,11 @@ pDesc.dwSize = 124; if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT) ) { - auto src = (unsigned __int16 *)pDesc.lpSurface; + ushort* src = (unsigned __int16 *)pDesc.lpSurface; uint num_top_scanlines_above_frame_y = i - dst_y; for (uint y = dst_y; y < dst_w; ++y) { - auto dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x]; + ushort* dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x]; uint src_y = num_top_scanlines_above_frame_y + y; for (uint x = dst_x; x < dst_z; ++x) @@ -1604,7 +1604,7 @@ int item_pid = (pRenderer->pActiveZBuffer[cursor.x + pSRZBufferLineOffsets[cursor.y]] & 0xFFFF) - 1; if (item_pid == -1) //added here to avoid crash return; - auto item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid]; + ItemGen* item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid]; if (cursor.x <= 13 || cursor.x >= 462)//items out of inventory(вещи вне инвентаря) { diff -r 92dfa0cafbe3 -r c1c74df0a33e UI/UISaveLoad.cpp --- a/UI/UISaveLoad.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/UI/UISaveLoad.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -85,9 +85,9 @@ } else am = 0; - auto day = aDayNames[full_days % 7]; - auto ampm = aAMPMNames[am]; - auto month = aMonthNames[current_month]; + const char* day = aDayNames[full_days % 7]; + const char* ampm = aAMPMNames[am]; + const char* month = aMonthNames[current_month]; sprintfex(pTmpBuf.data(), "%s %d:%02d %s\n%d %s %d", day, current_hour, current_minutes, aAMPMNames[am], current_day + 1, month, current_year); save_load_window.DrawTitleText(pFontSmallnum, 0, 0, 0, pTmpBuf.data(), 3); diff -r 92dfa0cafbe3 -r c1c74df0a33e UI/UIShops.cpp --- a/UI/UIShops.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/UI/UIShops.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -1602,7 +1602,7 @@ { item = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; pPriceMultiplier = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; - auto _v = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; + ItemGen* _v = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; uPriceItemService = pPlayers[uActiveCharacter]->GetPriceRepair(_v->GetValue(), pPriceMultiplier); if ( item->uAttributes & 2 ) { diff -r 92dfa0cafbe3 -r c1c74df0a33e UI/UiGame.cpp --- a/UI/UiGame.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/UI/UiGame.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -40,10 +40,10 @@ //----- (00421D00) -------------------------------------------------------- void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID) { - auto player = &pParty->pPlayers[uPlayerID - 1]; + Player* player = &pParty->pPlayers[uPlayerID - 1]; if (pParty->pPickedItem.uItemID) { - if (auto slot = player->AddItem(-1, pParty->pPickedItem.uItemID)) + if (int slot = player->AddItem(-1, pParty->pPickedItem.uItemID)) { memcpy(&player->pInventoryItemList[slot-1], &pParty->pPickedItem, 0x24u); viewparams->bRedrawGameUI = true; @@ -437,7 +437,7 @@ } else if (pGreetType == 2)//HiredNPC_greet { - auto prof = pNPCStats->pProfessions + pNPC->uProfession; + NPCProfession* prof = &pNPCStats->pProfessions[pNPC->uProfession]; if (pNPC->Hired()) pInString = BuildDialogueString(prof->pDismissText, uActiveCharacter - 1, 0, 0, 0, 0); @@ -452,7 +452,7 @@ { window.uFrameWidth = game_viewport_width; window.uFrameZ = 452; - auto font = pFontArrus; + GUIFont* font = pFontArrus; pTextHeight = pFontArrus->CalcTextHeight(pInString, &window, 13, 0) + 7; if ( 352 - pTextHeight < 8 ) { @@ -820,7 +820,7 @@ uFramesetIDa = 0; for (uint i = 0; i < 24; ++i) { - auto buff = player->pPlayerBuffs.data() + i; + SpellBuff* buff = &player->pPlayerBuffs[i]; if (buff->uExpireTime > 0) { v36 = uFramesetIDa++ * pFontComic->uFontHeight + 134; @@ -850,7 +850,7 @@ pFontHeight = LOBYTE(pFontArrus->uFontHeight) + 1; for ( uint i = 0; i < 4; ++i ) { - auto player = &pParty->pPlayers[i]; + Player* player = &pParty->pPlayers[i]; pX = 94 * i + 89; if ( i == 0 ) pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 22, 18, 0, pGlobalTXT_LocalizationStrings[149], 60, 0);//Name @@ -1644,7 +1644,7 @@ //v2 = byte_4E5DD8[v1]; if (pParty->pPartyBuffs[byte_4E5DD8[i]].uExpireTime) { - auto tex = pIcons_LOD->GetTexture(pTextureIDs_PartyBuffIcons[i]); + Texture* tex = pIcons_LOD->GetTexture(pTextureIDs_PartyBuffIcons[i]); //v3 = pTextureIDs_PartyBuffIcons[i]; pRenderer->_4A65CC(pPartySpellbuffsUI_XYs[i][0], pPartySpellbuffsUI_XYs[i][1], tex, tex, @@ -1841,8 +1841,8 @@ uCenterX = (uX + uZ) / 2; uCenterY = (uY + uW) / 2; lPitch = pRenderer->uTargetSurfacePitch; - auto bWizardEyeActive = pParty->WizardEyeActive(); - auto uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel(); + bool bWizardEyeActive = pParty->WizardEyeActive(); + int uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel(); if ( CheckHiredNPCSpeciality(Cartographer) ) { bWizardEyeActive = true; @@ -1860,8 +1860,8 @@ if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) { - auto pMapLod0 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask; - auto pPal = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16; + uchar* pMapLod0 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask; + ushort* pPal = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16; v73 = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / (signed int)uZoom; v20 = (double)(pParty->vPosition.x + 32768) / (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2)); uWb = (double)(32768 - pParty->vPosition.y) / (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2)); @@ -1898,12 +1898,12 @@ assert(uWidth == 137 && uHeight == 117); //auto pMinimap = (unsigned __int16 *)pOdmMinimap; - auto mapWidth = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth; + ushort mapWidth = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth; v29 = v70 >> 16; for (int y = 0; y < uHeight; ++y) { - auto pMapLod0Line = &pMapLod0[v27 * mapWidth]; + uchar* pMapLod0Line = &pMapLod0[v27 * mapWidth]; for (int x = 0; x < uWidth; ++x) { //*pMinimap++ = pPal[pMapLod0Line[v29]]; @@ -1934,9 +1934,9 @@ for (uint i = 0; i < (uint)pIndoor->pMapOutlines->uNumOutlines; ++i) { - auto pOutline = &pIndoor->pMapOutlines->pOutlines[i]; - auto pFace1 = pIndoor->pFaces + pOutline->uFace1ID; - auto pFace2 = pIndoor->pFaces + pOutline->uFace2ID; + BLVMapOutline* pOutline = &pIndoor->pMapOutlines->pOutlines[i]; + BLVFace* pFace1 = pIndoor->pFaces + pOutline->uFace1ID; + BLVFace* pFace2 = pIndoor->pFaces + pOutline->uFace2ID; //v9 = pIndoor->pFaces[pMapVertex->uFace1ID].uAttributes; //v10 = pIndoor->pFaces[pMapVertex->uFace2ID].uAttributes; if (pFace1->Visible() && pFace2->Visible()) @@ -1963,9 +1963,9 @@ } else { - auto _a = (uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x); - auto _b = ((unsigned int)((unsigned __int64)_a >> 16) << 16); - auto _c = ((signed int)(_b - uZoom * pParty->vPosition.x) >> 16); + long long _a = (uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x); + uint _b = ((unsigned int)((unsigned __int64)_a >> 16) << 16); + int _c = ((signed int)(_b - uZoom * pParty->vPosition.x) >> 16); pX = uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16); pY = uCenterY - ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16); pZ = uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16); @@ -1979,7 +1979,7 @@ for (uint i = 0; i < uNumBlueFacesInBLVMinimap; ++i) { - auto pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]]; + BLVMapOutline* pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]]; pX = uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16); pY = uCenterY - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16); pZ = uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16); @@ -2119,12 +2119,12 @@ { if (pParty->TorchlightActive()) { - auto icon = pIconsFrameTable->GetFrame((signed __int16)pUIAnum_Torchlight->uIconID, pEventTimer->Time()); + IconFrame* icon = pIconsFrameTable->GetFrame((signed __int16)pUIAnum_Torchlight->uIconID, pEventTimer->Time()); pRenderer->DrawTextureTransparent(pUIAnum_Torchlight->x, pUIAnum_Torchlight->y, pIcons_LOD->GetTexture(icon->uTextureID)); } if (pParty->WizardEyeActive()) { - auto icon = pIconsFrameTable->GetFrame((signed __int16)pUIAnim_WizardEye->uIconID, pEventTimer->Time()); + IconFrame* icon = pIconsFrameTable->GetFrame((signed __int16)pUIAnim_WizardEye->uIconID, pEventTimer->Time()); pRenderer->DrawTextureTransparent(pUIAnim_WizardEye->x, pUIAnim_WizardEye->y, pIcons_LOD->GetTexture(icon->uTextureID)); } } diff -r 92dfa0cafbe3 -r c1c74df0a33e VideoPlayer.cpp --- a/VideoPlayer.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/VideoPlayer.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -117,7 +117,7 @@ v11.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; v11.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; - auto hr = pRenderer->pDirectDraw4->CreateSurface(&v11, &v15, 0); + long hr = pRenderer->pDirectDraw4->CreateSurface(&v11, &v15, 0); ErrD3D(hr); } v5->uWidth = v11.dwWidth; @@ -161,7 +161,7 @@ Dst.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; Dst.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; - auto hr = pRenderer->pDirectDraw2->CreateSurface(&Dst, (LPDIRECTDRAWSURFACE *)&a2, 0); + long hr = pRenderer->pDirectDraw2->CreateSurface(&Dst, (LPDIRECTDRAWSURFACE *)&a2, 0); ErrD3D(hr); } v5->uWidth = Dst.dwWidth; diff -r 92dfa0cafbe3 -r c1c74df0a33e Vis.cpp --- a/Vis.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Vis.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -60,7 +60,7 @@ else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) { uint bmodel_id = pid >> 9; - auto v = (Vec3_int_ *)pOutdoor->pBModels[bmodel_id].pVertices.pVertices; + Vec3_int_* v = (Vec3_int_ *)pOutdoor->pBModels[bmodel_id].pVertices.pVertices; for (uint i = 0; i < face->uNumVertices; ++i) { static_DetermineFacetIntersection_array_F8F200[i].vWorldPosition.x = v[face->pVertexIDs[i]].x; @@ -127,7 +127,7 @@ //v6 = pRenderer->pBillboardRenderListD3D; for (uint i = 0; i < pRenderer->uNumBillboardsToDraw; ++i) { - auto billboard = pRenderer->pBillboardRenderListD3D + i; + RenderBillboardD3D* billboard = &pRenderer->pBillboardRenderListD3D[i]; if (IsPointInsideD3DBillboard(billboard, x, y)) { if (v13 == -1) @@ -155,7 +155,7 @@ //v9 = a1; //do //{ - auto v = vertices + i; + RenderVertexSoft* v = &vertices[i]; if (v->vWorldViewProjX < min_x) min_x = v->vWorldViewProjX; @@ -216,12 +216,12 @@ { for (uint i = 0; i < pRenderer->uNumBillboardsToDraw; ++i) { - auto d3d_billboard = &pRenderer->pBillboardRenderListD3D[i]; + RenderBillboardD3D* d3d_billboard = &pRenderer->pBillboardRenderListD3D[i]; if (is_part_of_selection((void *)i, filter) && IsPointInsideD3DBillboard(d3d_billboard, fX, fY)) { if (DoesRayIntersectBillboard(fPickDepth, i)) { - auto billboard = &pBillboardRenderList[d3d_billboard->uParentBillboardID]; + RenderBillboard* billboard = &pBillboardRenderList[d3d_billboard->uParentBillboardID]; list->AddObject((void *)d3d_billboard->uParentBillboardID, VisObjectType_Sprite, billboard->sZValue); } @@ -322,7 +322,7 @@ { if ( pFaceID < (signed int)pIndoor->uNumFaces ) { - auto face = pIndoor->pFaces + pFaceID; + BLVFace* face = &pIndoor->pFaces[pFaceID]; if ( is_part_of_selection(face, filter) ) { if ( !pGame->pIndoorCameraD3D->IsCulled(face) ) @@ -372,10 +372,10 @@ if (!reachable && only_reachable) continue; - auto bmodel = &pOutdoor->pBModels[i]; + BSPModel* bmodel = &pOutdoor->pBModels[i]; for (uint j = 0; j < bmodel->uNumFaces; ++j) { - auto face = &bmodel->pFaces[j]; + ODMFace* face = &bmodel->pFaces[j]; if (is_part_of_selection(face, filter)) { BLVFace blv_face; @@ -1373,13 +1373,13 @@ { for (int i = 0; i < pRenderer->uNumBillboardsToDraw; ++i) { - auto d3d_billboard = &pRenderer->pBillboardRenderListD3D[i]; + RenderBillboardD3D* d3d_billboard = &pRenderer->pBillboardRenderListD3D[i]; if (is_part_of_selection((void *)i, filter)) { if (DoesRayIntersectBillboard(pick_depth, i)) { - auto billboard = &pBillboardRenderList[d3d_billboard->uParentBillboardID]; + RenderBillboard* billboard = &pBillboardRenderList[d3d_billboard->uParentBillboardID]; list->AddObject((void *)d3d_billboard->uParentBillboardID, VisObjectType_Sprite, billboard->sZValue); } @@ -1467,13 +1467,13 @@ bool no_event = true; if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) { - auto face = (ODMFace *)uD3DBillboardIdx_or_pBLVFace_or_pODMFace; + ODMFace* face = (ODMFace *)uD3DBillboardIdx_or_pBLVFace_or_pODMFace; no_event = face->sCogTriggeredID == 0; face_attrib = face->uAttributes; } else if (uCurrentlyLoadedLevelType == LEVEL_Indoor) { - auto face = (BLVFace *)uD3DBillboardIdx_or_pBLVFace_or_pODMFace; + BLVFace* face = (BLVFace *)uD3DBillboardIdx_or_pBLVFace_or_pODMFace; no_event = pIndoor->pFaceExtras[face->uFaceExtraID].uEventID == 0; face_attrib = face->uAttributes; } @@ -1684,10 +1684,10 @@ if (!v17) continue; - auto bmodel = pOutdoor->pBModels + i; + BSPModel* bmodel = &pOutdoor->pBModels[i]; for (uint j = 0; j < bmodel->uNumFaces; ++j) { - auto face = &bmodel->pFaces[j]; + ODMFace* face = &bmodel->pFaces[j]; if (is_part_of_selection(face, filter) ) { @@ -1695,7 +1695,7 @@ blv_face.FromODM(face); int pid = PID(OBJECT_BModel, j | (i << 6)); - if (auto object_info = DetermineFacetIntersection(&blv_face, pid, pick_depth)) + if (Vis_ObjectInfo* object_info = DetermineFacetIntersection(&blv_face, pid, pick_depth)) list->AddObject(object_info->object, object_info->object_type, object_info->sZValue); } } diff -r 92dfa0cafbe3 -r c1c74df0a33e Weather.cpp --- a/Weather.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Weather.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -217,7 +217,7 @@ screen_x = viewparams->uScreen_topL_X; screen_z_minus_4 = viewparams->uScreen_BttmR_X - 4; - auto _this = this->field_0; + short* _this = this->field_0; while ( 1 ) { v6 = &_this[2 * v4]; diff -r 92dfa0cafbe3 -r c1c74df0a33e mm7_2.cpp --- a/mm7_2.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/mm7_2.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -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); @@ -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(); diff -r 92dfa0cafbe3 -r c1c74df0a33e mm7_3.cpp --- a/mm7_3.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/mm7_3.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -1312,7 +1312,7 @@ //v20 = 0; for (uint i = 0; i < uNumSpriteObjects; ++i) { - auto item = &pSpriteObjects[i]; + SpriteObject* item = &pSpriteObjects[i]; //v2 = (char *)&item->uSpriteFrameID; //do //{ @@ -1544,7 +1544,7 @@ bJumping = 0; uFaceID = -1; - auto floor_level = collide_against_floor(new_party_x, new_party_y, party_z + 40, &uSectorID, &uFaceID); + int floor_level = collide_against_floor(new_party_x, new_party_y, party_z + 40, &uSectorID, &uFaceID); if ( pParty->bFlying ) { @@ -1572,7 +1572,7 @@ blv_prev_party_y = pParty->vPosition.z; if (!pParty->bTurnBasedModeOn) { - auto v67 = GetTickCount() / 500; + int v67 = GetTickCount() / 500; if (dword_720CDC != v67 ) { dword_4F8580[3 * dword_4F8580[1]] = pParty->vPosition.x; @@ -1611,7 +1611,7 @@ pParty->uFlags &= ~PARTY_FLAGS_1_LANDING; else for (uint i = 0; i < 4; ++i) { // receive falling damage - auto player = &pParty->pPlayers[i]; + Player* player = &pParty->pPlayers[i]; if (!player->HasEnchantedItemEquipped(72) && !player->WearsItem(ITEM_ARTIFACT_HERMES_SANDALS, EQUIP_BOOTS)) { player->ReceiveDamage((pParty->uFallStartY - party_z) * (0.1f * player->GetMaxHealth()) / 256, DMGT_PHISYCAL); @@ -1647,7 +1647,7 @@ if (!bJumping && pParty->floor_face_pid != uFaceID) { - auto pFace = &pIndoor->pFaces[uFaceID]; + BLVFace* pFace = &pIndoor->pFaces[uFaceID]; if (pFace->uAttributes & FACE_PRESSURE_PLATE) uFaceEvent = pIndoor->pFaceExtras[pFace->uFaceExtraID].uEventID; } @@ -1806,7 +1806,7 @@ stru_721530.field_70 = 0; stru_721530.prolly_normal_d = pParty->field_14_radius; stru_721530.field_8_radius = pParty->field_14_radius / 2; - auto v83 = 0; + int v83 = 0; stru_721530.field_0 = 1; stru_721530.height = pParty->uPartyHeight - 32; while ( 1 ) @@ -1866,7 +1866,7 @@ v43 = stru_721530.uFaceID; uSectorID = stru_721530.uSectorID; stru_721530.field_70 += stru_721530.field_7C; - auto v87 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.z) >> 16) + new_party_z; + unsigned long long v87 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.z) >> 16) + new_party_z; if ( PID_TYPE(stru_721530.uFaceID) == OBJECT_Actor) { if ( SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) >= 0 @@ -2156,7 +2156,7 @@ pY = pParty->vPosition.y; v113 = pParty->field_6F0; bJumping = 0; - auto partyAtHighSlope = IsTerrainSlopeTooHigh(pParty->vPosition.x, pParty->vPosition.y); + bool partyAtHighSlope = IsTerrainSlopeTooHigh(pParty->vPosition.x, pParty->vPosition.y); v114 = 0; v124 = 0; v102 = 0; @@ -2205,7 +2205,7 @@ } else for (int _i = 0; _i < 4; ++_i) // receive falling damage { - auto player = &pParty->pPlayers[_i]; + Player* player = &pParty->pPlayers[_i]; if ( !player->HasEnchantedItemEquipped(72) && !player->WearsItem(ITEM_ARTIFACT_HERMES_SANDALS, EQUIP_BOOTS) ) { @@ -2637,7 +2637,7 @@ { // falling scream for (int i = 0; i < 4; ++i) { - auto player = &pParty->pPlayers[i]; + Player* player = &pParty->pPlayers[i]; if (!player->HasEnchantedItemEquipped(72) && !player->WearsItem(ITEM_ARTIFACT_HERMES_SANDALS, EQUIP_BOOTS) && player->CanAct()) player->PlaySound(SPEECH_66, 0); } @@ -2702,7 +2702,7 @@ v122 = v40; ODM_GetFloorLevel(_angle_x, _angle_y, v40, pParty->uPartyHeight, &is_on_water, &bmodel_standing_on_pid, 0); v129 = ODM_GetFloorLevel(_angle_x, pY, v40, pParty->uPartyHeight, &is_on_water, &v97, 0); - auto v119 = ODM_GetFloorLevel(pX, _angle_y, v40, pParty->uPartyHeight, &is_on_water, &v110, 0); + int v119 = ODM_GetFloorLevel(pX, _angle_y, v40, pParty->uPartyHeight, &is_on_water, &v110, 0); pModel = (BSPModel *)IsTerrainSlopeTooHigh(_angle_x, pY); v42 = IsTerrainSlopeTooHigh(pX, _angle_y); is_not_on_bmodel = false; @@ -3703,7 +3703,7 @@ if (!uNumActions) return PARTY_INVALID; - auto result = pActions[0]; + PartyAction result = pActions[0]; for (unsigned int i = 0; i < uNumActions - 1; ++i) pActions[i] = pActions[i + 1]; --uNumActions; @@ -4170,7 +4170,7 @@ signed int v9; // [sp+Ch] [bp-8h]@1 float v10; // [sp+10h] [bp-4h]@2 - auto a1 = this; + stru6_stru1_indoor_sw_billboard* a1 = this; v1 = 0; v2 = a1; @@ -4230,7 +4230,7 @@ int a6; // [sp+3Ch] [bp-8h]@5 int a5; // [sp+40h] [bp-4h]@5 - auto a1 = this; + stru6_stru1_indoor_sw_billboard* a1 = this; v16 = 0; if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) @@ -4437,7 +4437,7 @@ *out_height = 0; DWORD w; - auto file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr); + void* file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr); if (file == INVALID_HANDLE_VALUE) return nullptr; @@ -4452,7 +4452,7 @@ } int imgSize = header.tgaWidth * header.tgaHeight * 3; - auto pixels = new unsigned char[imgSize]; + unsigned char* pixels = new unsigned char[imgSize]; ReadFile(file, pixels, imgSize, &w, nullptr); CloseHandle(file); @@ -4467,7 +4467,7 @@ if (out_height) *out_height = header.tgaHeight; - auto pixels_16bit = new unsigned short[imgSize / 3]; + unsigned short* pixels_16bit = new unsigned short[imgSize / 3]; for (int i = 0; i < imgSize / 3; ++i) { pixels_16bit[i] = (pixels[i * 3] / 8 & 0x1F) | @@ -4936,7 +4936,7 @@ //v12 = 0; //while ( 1 ) //{ - auto spawn = pOutdoor->pSpawnPoints + i; + SpawnPointMM7* spawn = pOutdoor->pSpawnPoints + i; //v6 = &pOutdoor->pSpawnPoints[v12 / 0x18]; if (spawn->uKind == 3 ) SpawnEncounter(v4, spawn, 0, 0, 0); @@ -5326,28 +5326,28 @@ //v12 = a1; //v11 = a2; - auto grid_x = WorldPosToGridCellX(pos_x); - auto grid_z = WorldPosToGridCellZ(pos_z) - 1; - - auto party_grid_x1 = GridCellToWorldPosX(grid_x); + unsigned int grid_x = WorldPosToGridCellX(pos_x); + unsigned int grid_z = WorldPosToGridCellZ(pos_z) - 1; + + int party_grid_x1 = GridCellToWorldPosX(grid_x); //dword_76D56C_terrain_cell_world_pos_around_party_x = GridCellToWorldPosX(grid_x + 1); //dword_76D570_terrain_cell_world_pos_around_party_x = GridCellToWorldPosX(grid_x + 1); //dword_76D574_terrain_cell_world_pos_around_party_x = GridCellToWorldPosX(grid_x); - auto party_grid_z1 = GridCellToWorldPosZ(grid_z); + int party_grid_z1 = GridCellToWorldPosZ(grid_z); //dword_76D55C_terrain_cell_world_pos_around_party_z = GridCellToWorldPosZ(grid_z); //dword_76D560_terrain_cell_world_pos_around_party_z = GridCellToWorldPosZ(grid_z + 1); //dword_76D564_terrain_cell_world_pos_around_party_z = GridCellToWorldPosZ(grid_z + 1); - auto party_x1z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z); - auto party_x2z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z); - auto party_x2z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z + 1); - auto party_x1z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z + 1); + int party_x1z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z); + int party_x2z1_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z); + int party_x2z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z + 1); + int party_x1z2_y = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z + 1); //dword_76D554_terrain_cell_world_pos_around_party_y = v4; if (party_x1z1_y == party_x2z1_y && party_x2z1_y == party_x2z2_y && party_x2z2_y == party_x1z2_y ) return false; - auto dx = abs(pos_x - party_grid_x1), + int dx = abs(pos_x - party_grid_x1), dz = abs(party_grid_z1 - pos_z); int y1, y2, y3; @@ -5420,15 +5420,15 @@ //v11 = a1; //v12 = a2; - auto grid_x = WorldPosToGridCellX(a1); - auto grid_z = WorldPosToGridCellZ(a2) - 1; - - auto grid_x1 = GridCellToWorldPosX(grid_x), + unsigned int grid_x = WorldPosToGridCellX(a1); + unsigned int grid_z = WorldPosToGridCellZ(a2) - 1; + + int grid_x1 = GridCellToWorldPosX(grid_x), grid_x2 = GridCellToWorldPosX(grid_x + 1); - auto grid_z1 = GridCellToWorldPosZ(grid_z), + int grid_z1 = GridCellToWorldPosZ(grid_z), grid_z2 = GridCellToWorldPosZ(grid_z + 1); - auto y_x1z1 = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z), + int y_x1z1 = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z), y_x2z1 = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z), y_x2z2 = pOutdoor->DoGetHeightOnTerrain(grid_x + 1, grid_z + 1), y_x1z2 = pOutdoor->DoGetHeightOnTerrain(grid_x, grid_z + 1); @@ -6039,9 +6039,9 @@ for (uint i = 0; i < uLevelEVT_NumEvents; ++i) { - auto pEvent = pLevelEVT_Index[i]; - - auto _evt = (_evt_raw *)(&pLevelEVT[pEvent.uEventOffsetInEVT]); + EventIndex pEvent = pLevelEVT_Index[i]; + + _evt_raw* _evt = (_evt_raw *)(&pLevelEVT[pEvent.uEventOffsetInEVT]); if (_evt->_e_type == EVENT_PlaySound) { @@ -6115,8 +6115,8 @@ v16 = (signed int)(v14 / 4); years = v16 / 12; - auto _1 = (unsigned __int64)((double)pParty->uTimePlayed * 0.234375) >> 32; - auto _2 = ((__int64)v9 << 32) | _1; + unsigned __int64 _1 = (unsigned __int64)((double)pParty->uTimePlayed * 0.234375) >> 32; + __int64 _2 = ((__int64)v9 << 32) | _1; seconds = _2 % 60; //v19 = (signed __int64)__PAIR__((unsigned __int64)(signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) >> 32, @@ -6615,7 +6615,7 @@ if (__unused) _5773C0_unused = 0; - auto v13 = (signed __int64)(pParty->uTimePlayed - _5773B8_event_timer) / 128; + long long v13 = (signed __int64)(pParty->uTimePlayed - _5773B8_event_timer) / 128; if (!v13) return; @@ -6628,7 +6628,7 @@ for (uint i = 0; i < dword_5B65C8_timers_count; ++i) { //v4 = (char *)&array_5B5928_timers[0].field_C; - auto timer = array_5B5928_timers + i; + stru176* timer = &array_5B5928_timers[i]; //while ( 1 ) //{ //v5 = *(short *)v4; diff -r 92dfa0cafbe3 -r c1c74df0a33e mm7_4.cpp --- a/mm7_4.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/mm7_4.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -727,7 +727,7 @@ if ( v21->HasItemEquipped(v22) ) { //v23 = v21->pEquipment.pIndices; - auto _idx = v21->pEquipment.pIndices[v22]; + uint _idx = v21->pEquipment.pIndices[v22]; v24 = v21->pInventoryItemList[_idx].uItemID; if ( v24 > 134 ) { @@ -1326,7 +1326,7 @@ for (uint i = 0; i < 2; ++i) { - auto pBuf = &pParty->pPartyBuffs[dword_4EE07C[i]]; + SpellBuff* pBuf = &pParty->pPartyBuffs[dword_4EE07C[i]]; if (pBuf->uExpireTime == 0) continue; @@ -1525,7 +1525,7 @@ FILE *v2; // eax@1 FILE *v3; // edi@1 - auto Str = this; + PlayerFrameTable* Str = this; v1 = Str; v2 = fopen("data\\dpft.bin", "wb"); @@ -1781,7 +1781,7 @@ npc = GetNPCData(sDialogue_SpeakingActorNPC_ID); //pText = a4; - auto len = strlen(lpsz); + uint len = strlen(lpsz); for (int i = 0, dst = 0; i < len; ++i) { char c = lpsz[i]; @@ -1968,7 +1968,7 @@ break; case 17://текст наёмного НПС { - auto pay_percentage = pNPCStats->pProfessions[npc->uProfession - 1].uHirePrice / 100; + uint pay_percentage = pNPCStats->pProfessions[npc->uProfession - 1].uHirePrice / 100; if ( !pay_percentage ) pay_percentage = 1; sprintf(a1, "%lu", pay_percentage); @@ -2581,8 +2581,8 @@ pDst[x] = pRenderer->uTargetRMask | pRenderer->uTargetBMask; }*/ - auto pSrc = pRenderer->pTargetSurface; - auto pDst = (__int16 *)Dst.lpSurface; + ushort* pSrc = pRenderer->pTargetSurface; + short* pDst = (__int16 *)Dst.lpSurface; for (uint y = 0; y < 8; ++y) memcpy(pDst + y * Dst.lPitch / 2, @@ -2602,9 +2602,9 @@ pSrc + y * 640, 640 * sizeof(__int16)); - auto pSrc_x1y1 = pSrc + 640 * pViewport->uViewportTL_Y + pViewport->uViewportTL_X; + ushort* pSrc_x1y1 = pSrc + 640 * pViewport->uViewportTL_Y + pViewport->uViewportTL_X; //_this = (unsigned int)&pSrc[2 * (((signed int)pViewport->uViewportX >> 1) + 320 * pViewport->uViewportY)]; - auto pDst_x1y1 = pDst + Dst.lPitch * pViewport->uViewportTL_Y + pViewport->uViewportTL_X; + short* pDst_x1y1 = pDst + Dst.lPitch * pViewport->uViewportTL_Y + pViewport->uViewportTL_X; //v23 = (unsigned __int32)((char *)v26 + 4 * (((signed int)pViewport->uViewportX >> 1) + (Dst.lPitch >> 2) * pViewport->uViewportY)); v9 = ((signed int)pViewport->uViewportTL_X >> 1) - ((signed int)pViewport->uViewportBR_X >> 1); //v20 = ((signed int)pViewport->uViewportZ >> 1) - ((signed int)pViewport->uViewportX >> 1); @@ -2615,7 +2615,7 @@ //v26 = (LPVOID)(pViewport->uViewportW - pViewport->uViewportY + 1); v10 = (int)pSrc_x1y1; v11 = (int)pDst_x1y1; - auto uHalfWidth = v20 = (pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2; + int uHalfWidth = v20 = (pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2; v13 = v24; for (uint y = pViewport->uViewportTL_Y; y < pViewport->uViewportBR_Y + 1; ++y) diff -r 92dfa0cafbe3 -r c1c74df0a33e mm7_5.cpp --- a/mm7_5.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/mm7_5.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -525,7 +525,7 @@ { for (uint i = 0; i < uNumBillboardsToDraw; ++i) { - auto p = &pBillboardRenderList[i]; + RenderBillboard* p = &pBillboardRenderList[i]; if (p->field_1E & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !p->uIndoorSectorID) p->dimming_level = 0; @@ -593,15 +593,15 @@ v6 = uBaseLightLevel; for (uint i = 0; i < pMobileLightsStack->uNumLightsActive; ++i) { - auto p = pMobileLightsStack->pLights + i; + MobileLight* p = &pMobileLightsStack->pLights[i]; - auto distX = abs(p->vPosition.x - x); + float distX = abs(p->vPosition.x - x); if ( distX <= p->uRadius) { - auto distY = abs(p->vPosition.y - y); + float distY = abs(p->vPosition.y - y); if ( distY <= p->uRadius) { - auto distZ = abs(p->vPosition.z - z); + float distZ = abs(p->vPosition.z - z); if ( distZ <= p->uRadius) { v8 = distX; @@ -635,7 +635,7 @@ if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) { - auto pSector = pIndoor->pSectors + uSectorID; + BLVSector* pSector = &pIndoor->pSectors[uSectorID]; for (uint i = 0; i < pSector->uNumLights; ++i) { @@ -685,7 +685,7 @@ for (uint i = 0; i < pStationaryLightsStack->uNumLightsActive; ++i) { - auto p = pStationaryLightsStack->pLights + i; + StationaryLight* p = &pStationaryLightsStack->pLights[i]; v26 = abs(p->vPosition.x - x); if ( v26 <= p->uRadius) { diff -r 92dfa0cafbe3 -r c1c74df0a33e mm7_6.cpp --- a/mm7_6.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/mm7_6.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -340,7 +340,7 @@ //v27 = 6972 * uActiveCharacter; //v1 = &pParty->pPlayers[uActiveCharacter-1]; //result = pParty->pPlayers[uActiveCharacter-1].CanAct(); - auto player = &pParty->pPlayers[uActiveCharacter - 1]; + Player* player = &pParty->pPlayers[uActiveCharacter - 1]; if (!player->CanAct()) return; @@ -363,7 +363,7 @@ int main_hand_idx = player->pEquipment.uMainHand; if (main_hand_idx) { - auto item = &player->pInventoryItemList[main_hand_idx - 1]; + ItemGen* item = &player->pInventoryItemList[main_hand_idx - 1]; //v5 = (char *)v1 + 36 * v4; if (!item->IsBroken()) { @@ -396,7 +396,7 @@ target_id = PID_ID(target_pid); } - auto actor = &pActors[target_id]; + Actor* actor = &pActors[target_id]; int actor_distance = 0; if (target_type == OBJECT_Actor) { @@ -992,7 +992,7 @@ int v24; // [sp+4h] [bp-4h]@87 pGame->pKeyboardInstance->EnterCriticalSection(); - auto pKeyboard = pGame->pKeyboardInstance; + Keyboard* pKeyboard = pGame->pKeyboardInstance; if (!bAlwaysRun) { if (pKeyboard->IsShiftHeld()) diff -r 92dfa0cafbe3 -r c1c74df0a33e mm7_data.h --- a/mm7_data.h Mon Oct 28 22:16:42 2013 -0700 +++ b/mm7_data.h Wed Oct 30 00:47:37 2013 -0700 @@ -1342,7 +1342,7 @@ inline int round(float x) { return (int)floor(x + 0.5f); } inline void __fastcall memset32(void *ptr, unsigned __int32 value, int count) { - auto p = (unsigned __int32 *)ptr; + unsigned __int32* p = (unsigned __int32 *)ptr; for ( int i=0; i < count; i++ ) *p++ = value; } diff -r 92dfa0cafbe3 -r c1c74df0a33e stru6.cpp --- a/stru6.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/stru6.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -192,7 +192,7 @@ for (uint i = 0; i < uNumProjectiles; ++i) { - auto p = pProjectiles + i; + ProjectileAnim* p = &pProjectiles[i]; v[0].vWorldPosition.x = p->srcX; v[0].vWorldPosition.y = p->srcY; @@ -1581,7 +1581,7 @@ { for (uint i = 0; i < 4; ++i) { - auto buff = pPlayerBuffs + i; + PlayerBuffAnim* buff = &pPlayerBuffs[i]; if (!buff->bRender) continue; @@ -1592,7 +1592,7 @@ continue; } - auto icon = pIconsFrameTable->GetFrame(buff->uSpellIconID, buff->uSpellAnimTimeElapsed); + IconFrame* icon = pIconsFrameTable->GetFrame(buff->uSpellIconID, buff->uSpellAnimTimeElapsed); pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i], 385, pIcons_LOD->GetTexture(icon->uTextureID)); pOtherOverlayList->bRedraw = true; diff -r 92dfa0cafbe3 -r c1c74df0a33e stru9.cpp --- a/stru9.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/stru9.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -194,7 +194,7 @@ //v9 = a1; //v10 = a5; //v11 = (char *)&a1->vWorldPosition.z; - auto pLineStart = &a1[0]; + RenderVertexSoft* pLineStart = &a1[0]; //pVertices = a3; pLinelength1 = a5->x * a1[0].vWorldPosition.x + a1[0].vWorldPosition.y * a5->y + a1[0].vWorldPosition.z * a5->z; //v20 = v13;