comparison mm7_4.cpp @ 307:72faa54ff319

Events stuff moved to its file
author Gloval
date Wed, 20 Feb 2013 00:26:17 +0400
parents f16ac5e65438
children 922a96fdcc86
comparison
equal deleted inserted replaced
304:f16ac5e65438 307:72faa54ff319
5738 pTexture_IC_KNIGHT[6] = pIcons_LOD->LoadTexturePtr("IC_CLER", TEXTURE_16BIT_PALETTE); 5738 pTexture_IC_KNIGHT[6] = pIcons_LOD->LoadTexturePtr("IC_CLER", TEXTURE_16BIT_PALETTE);
5739 pTexture_IC_KNIGHT[7] = pIcons_LOD->LoadTexturePtr("IC_DRUID", TEXTURE_16BIT_PALETTE); 5739 pTexture_IC_KNIGHT[7] = pIcons_LOD->LoadTexturePtr("IC_DRUID", TEXTURE_16BIT_PALETTE);
5740 pTexture_IC_KNIGHT[8] = pIcons_LOD->LoadTexturePtr("IC_SORC", TEXTURE_16BIT_PALETTE); 5740 pTexture_IC_KNIGHT[8] = pIcons_LOD->LoadTexturePtr("IC_SORC", TEXTURE_16BIT_PALETTE);
5741 pTexture_MAKETOP = pIcons_LOD->LoadTexturePtr("MAKETOP", TEXTURE_16BIT_PALETTE); 5741 pTexture_MAKETOP = pIcons_LOD->LoadTexturePtr("MAKETOP", TEXTURE_16BIT_PALETTE);
5742 pTexture_MAKESKY = pIcons_LOD->LoadTexturePtr("MAKESKY", TEXTURE_16BIT_PALETTE); 5742 pTexture_MAKESKY = pIcons_LOD->LoadTexturePtr("MAKESKY", TEXTURE_16BIT_PALETTE);
5743 uX = 0; 5743 for(uX=0;uX < 22;++uX ) // load PlayerPortraits texture
5744 do // load PlayerPortraits texture
5745 { 5744 {
5746 sprintf(pTmpBuf, "%s01", pPlayerPortraitsNames[uX]); 5745 sprintf(pTmpBuf, "%s01", pPlayerPortraitsNames[uX]);
5747 v1 = pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE); 5746 v1 = pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE);
5748 v2 = uX * 4; 5747 pPlayerPortraits[uX] = &pIcons_LOD->pTextures[v1];
5749 ++uX; 5748
5750 *(Texture **)((char *)pPlayerPortraits + v2) = &pIcons_LOD->pTextures[v1]; 5749 }
5751 }
5752 while ( uX < 22 );
5753 pTexture_PlayerFaceMask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("FACEMASK", TEXTURE_16BIT_PALETTE)]; 5750 pTexture_PlayerFaceMask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("FACEMASK", TEXTURE_16BIT_PALETTE)];
5754 pTexture_buttminu = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttminu", TEXTURE_16BIT_PALETTE)]; 5751 pTexture_buttminu = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttminu", TEXTURE_16BIT_PALETTE)];
5755 pTexture_buttplus = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttplus", TEXTURE_16BIT_PALETTE)]; 5752 pTexture_buttplus = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttplus", TEXTURE_16BIT_PALETTE)];
5756 pTexture_pressrigh = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presrigh", TEXTURE_16BIT_PALETTE)]; 5753 pTexture_pressrigh = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presrigh", TEXTURE_16BIT_PALETTE)];
5757 pTexture_presleft = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presleft", TEXTURE_16BIT_PALETTE)]; 5754 pTexture_presleft = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presleft", TEXTURE_16BIT_PALETTE)];
14721 LABEL_6: 14718 LABEL_6:
14722 result = 0; 14719 result = 0;
14723 } 14720 }
14724 else 14721 else
14725 { 14722 {
14726 v2 = (char *)&pLevelEVT_Events[0].uEventOffsetInEVT; 14723 v2 = (char *)&pLevelEVT_Index[0].uEventOffsetInEVT;
14727 while ( 1 ) 14724 while ( 1 )
14728 { 14725 {
14729 if ( *((int *)v2 - 2) == uEventID ) 14726 if ( *((int *)v2 - 2) == uEventID )
14730 { 14727 {
14731 v3 = *(int *)v2; 14728 v3 = *(int *)v2;
14747 //result = (char *)p2DEvents_minus1_::04[13 * v6]; 14744 //result = (char *)p2DEvents_minus1_::04[13 * v6];
14748 result = (char *)p2DEvents[v6 - 1].pName; 14745 result = (char *)p2DEvents[v6 - 1].pName;
14749 } 14746 }
14750 else 14747 else
14751 { 14748 {
14752 for ( i = (char *)pLevelEVT_Events + 4 * (3 * v1 + 3); *(int *)i == uEventID; i += 12 ) 14749 for ( i = (char *)pLevelEVT_Index + 4 * (3 * v1 + 3); *(int *)i == uEventID; i += 12 )
14753 { 14750 {
14754 v8 = *((int *)i + 2); 14751 v8 = *((int *)i + 2);
14755 if ( pLevelEVT[v8 + 4] == 2 ) 14752 if ( pLevelEVT[v8 + 4] == 2 )
14756 { 14753 {
14757 v6 = (unsigned __int8)pLevelEVT[v8 + 5] 14754 v6 = (unsigned __int8)pLevelEVT[v8 + 5]