Mercurial > might-and-magic-trilogy
comparison mm7_2.cpp @ 117:a64b244da76c
some things lod
author | Nomad |
---|---|
date | Tue, 13 Nov 2012 17:29:38 +0200 |
parents | 430786d916d6 |
children | 05b2d9653abc 6d1f537a1346 |
comparison
equal
deleted
inserted
replaced
116:918dca162239 | 117:a64b244da76c |
---|---|
11278 v30 = width; | 11278 v30 = width; |
11279 v2 = height; | 11279 v2 = height; |
11280 v27 = height; | 11280 v27 = height; |
11281 v23 = 452.0 / (double)width; | 11281 v23 = 452.0 / (double)width; |
11282 v25 = 336.0 / (double)height; | 11282 v25 = 336.0 / (double)height; |
11283 pPixels = (unsigned __int16 *)operator new(2 * height * width); | 11283 pPixels = (unsigned __int16 *)malloc(2 * height * width); |
11284 v3 = pPixels; | 11284 v3 = pPixels; |
11285 if ( pRenderer->pRenderD3D ) | 11285 if ( pRenderer->pRenderD3D ) |
11286 { | 11286 { |
11287 pRenderer->BeginSceneD3D(); | 11287 pRenderer->BeginSceneD3D(); |
11288 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 11288 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
11752 if ( pNew_LOD->LoadFile("data\\new.lod", 0) ) | 11752 if ( pNew_LOD->LoadFile("data\\new.lod", 0) ) |
11753 { | 11753 { |
11754 pNew_LOD->CreateTempFile(); | 11754 pNew_LOD->CreateTempFile(); |
11755 pNew_LOD->uNumSubIndices = 0; | 11755 pNew_LOD->uNumSubIndices = 0; |
11756 pDir.Reset(); | 11756 pDir.Reset(); |
11757 for (int i = pGames_LOD->uNumSubIndices / 2; i < pGames_LOD->uNumSubIndices; ++i) | 11757 |
11758 { | 11758 for (int i = pGames_LOD->uNumSubIndices / 2; i < pGames_LOD->uNumSubIndices; ++i) |
11759 memcpy(&pDir, (char *)&pGames_LOD->pSubIndices[i], sizeof(pDir)); | 11759 { |
11760 v3 = pGames_LOD->FindContainer((const char *)&pGames_LOD->pSubIndices[i], 1); | 11760 memcpy(&pDir, &pGames_LOD->pSubIndices[i], sizeof(pDir)); |
11761 fread(pSave, pGames_LOD->pSubIndices[i].uDataSize, 1, v3); | 11761 v3 = pGames_LOD->FindContainer(pGames_LOD->pSubIndices[i].pFilename, 1); |
11762 pNew_LOD->AppendDirectory(&pDir, pSave); | 11762 fread(pSave, pGames_LOD->pSubIndices[i].uDataSize, 1, v3); |
11763 } | 11763 pNew_LOD->AppendDirectory(&pDir, pSave); |
11764 } | |
11764 v7.Reset(); | 11765 v7.Reset(); |
11765 strcpy(pSavegameHeader->pLocationName, "out01.odm"); | 11766 strcpy(pSavegameHeader->pLocationName, "out01.odm"); |
11766 strcpy((char *)&v7, "header.bin"); | 11767 strcpy(v7.pFilename, "header.bin"); |
11767 v7.uDataSize = 100; | 11768 v7.uDataSize = 100; |
11768 pNew_LOD->AppendDirectory(&v7, &pSavegameHeader); | 11769 pNew_LOD->AppendDirectory(&v7, &pSavegameHeader); |
11769 pNew_LOD->Save(); | 11770 pNew_LOD->Save(); |
11770 pParty->vPrevPosition.y = 0; | 11771 pParty->vPrevPosition.y = 0; |
11771 pParty->vPrevPosition.x = 12552; | 11772 pParty->vPrevPosition.x = 12552; |