Mercurial > mm7
comparison mm7_2.cpp @ 711:a5e587c8e30e
some cleaning
author | Gloval |
---|---|
date | Thu, 21 Mar 2013 23:10:57 +0400 |
parents | af08fc9e29c8 |
children | e7c86528a2b3 |
comparison
equal
deleted
inserted
replaced
709:af08fc9e29c8 | 711:a5e587c8e30e |
---|---|
4775 } | 4775 } |
4776 while ( fgets(&Buf, 490, File) ); | 4776 while ( fgets(&Buf, 490, File) ); |
4777 v4 = v24; | 4777 v4 = v24; |
4778 } | 4778 } |
4779 v5 = v2->pTextures; | 4779 v5 = v2->pTextures; |
4780 v2->uNumTextures = v4; | 4780 v2->sNumTextures = v4; |
4781 v6 = pAllocator->AllocNamedChunk(v5, 20 * v4, "Txt Frames"); | 4781 v6 = pAllocator->AllocNamedChunk(v5, 20 * v4, "Txt Frames"); |
4782 v2->pTextures = (TextureFrame *)v6; | 4782 v2->pTextures = (TextureFrame *)v6; |
4783 if ( !v6 ) | 4783 if ( !v6 ) |
4784 Abortf("CTextureFrameTable::load - Out of Memory!"); | 4784 Abortf("CTextureFrameTable::load - Out of Memory!"); |
4785 v7 = File; | 4785 v7 = File; |
4786 v2->uNumTextures = 0; | 4786 v2->sNumTextures = 0; |
4787 fseek(v7, 0, 0); | 4787 fseek(v7, 0, 0); |
4788 for ( i = fgets(&Buf, 490, File); i; i = fgets(&Buf, 490, File) ) | 4788 for ( i = fgets(&Buf, 490, File); i; i = fgets(&Buf, 490, File) ) |
4789 { | 4789 { |
4790 *strchr(&Buf, 10) = 0; | 4790 *strchr(&Buf, 10) = 0; |
4791 memcpy(&v21, txt_file_frametable_parser(&Buf, &v20), 0x7Cu); | 4791 memcpy(&v21, txt_file_frametable_parser(&Buf, &v20), 0x7Cu); |
4792 if ( v21 && *Str1 != 47 ) | 4792 if ( v21 && *Str1 != 47 ) |
4793 { | 4793 { |
4794 strcpy(v2->pTextures[v2->uNumTextures].pTextureName, Str1); | 4794 strcpy(v2->pTextures[v2->sNumTextures].pTextureName, Str1); |
4795 v2->pTextures[v2->uNumTextures].uAnimTime = atoi(Str); | 4795 v2->pTextures[v2->sNumTextures].uAnimTime = atoi(Str); |
4796 v9 = 2; | 4796 v9 = 2; |
4797 for ( v2->pTextures[v2->uNumTextures].uFlags = 0; v9 < v21; ++v9 ) | 4797 for ( v2->pTextures[v2->sNumTextures].uFlags = 0; v9 < v21; ++v9 ) |
4798 { | 4798 { |
4799 if ( !_strcmpi((&Str1)[4 * v9], "New") ) | 4799 if ( !_strcmpi((&Str1)[4 * v9], "New") ) |
4800 { | 4800 { |
4801 v10 = (int)&v2->pTextures[v2->uNumTextures].uFlags; | 4801 v10 = (int)&v2->pTextures[v2->sNumTextures].uFlags; |
4802 *(char *)v10 |= 2u; | 4802 *(char *)v10 |= 2u; |
4803 } | 4803 } |
4804 } | 4804 } |
4805 ++v2->uNumTextures; | 4805 ++v2->sNumTextures; |
4806 } | 4806 } |
4807 } | 4807 } |
4808 fclose(File); | 4808 fclose(File); |
4809 v11 = 0; | 4809 v11 = 0; |
4810 if ( (signed int)(v2->uNumTextures - 1) > 0 ) | 4810 if ( (signed int)(v2->sNumTextures - 1) > 0 ) |
4811 { | 4811 { |
4812 v12 = 0; | 4812 v12 = 0; |
4813 do | 4813 do |
4814 { | 4814 { |
4815 v13 = (int)&v2->pTextures[v12]; | 4815 v13 = (int)&v2->pTextures[v12]; |
4816 if ( !(*(char *)(v13 + 38) & 2) ) | 4816 if ( !(*(char *)(v13 + 38) & 2) ) |
4817 *(char *)(v13 + 18) |= 1u; | 4817 *(char *)(v13 + 18) |= 1u; |
4818 ++v11; | 4818 ++v11; |
4819 ++v12; | 4819 ++v12; |
4820 } | 4820 } |
4821 while ( v11 < (signed int)(v2->uNumTextures - 1) ); | 4821 while ( v11 < (signed int)(v2->sNumTextures - 1) ); |
4822 } | 4822 } |
4823 for ( j = 0; j < (signed int)v2->uNumTextures; *(short *)(Argsa + 16) = v16 ) | 4823 for ( j = 0; j < (signed int)v2->sNumTextures; *(short *)(Argsa + 16) = v16 ) |
4824 { | 4824 { |
4825 v15 = v2->pTextures; | 4825 v15 = v2->pTextures; |
4826 Argsa = (int)&v15[j]; | 4826 Argsa = (int)&v15[j]; |
4827 v16 = *(short *)(Argsa + 14); | 4827 v16 = *(short *)(Argsa + 14); |
4828 if ( *(char *)(Argsa + 18) & 1 ) | 4828 if ( *(char *)(Argsa + 18) & 1 ) |