Mercurial > mm7
changeset 701:d5b16a44d9b3
frame_table parser, new files for UI func
author | Gloval |
---|---|
date | Mon, 18 Mar 2013 22:53:56 +0400 |
parents | 1d05543f522d |
children | efde64b3e147 a9c1fb7483c2 |
files | AudioPlayer.cpp Chest.cpp FrameTableInc.cpp FrameTableInc.h Monsters.cpp Overlays.cpp Sprites.cpp UIBooks.cpp UICharacter.cpp UIMainMenu.cpp UIMsgProc.cpp UIOptions.cpp UISaveLoad.cpp UiGame.cpp mm7_2.cpp mm7_4.cpp mm7_5.cpp mm7_data.cpp mm7_data.h |
diffstat | 12 files changed, 194 insertions(+), 249 deletions(-) [+] |
line wrap: on
line diff
--- a/AudioPlayer.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/AudioPlayer.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -470,7 +470,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v19, texture_frame_table_txt_parser(&Buf, &v18), sizeof(v19)); - if ( v19.field_0 && *v19.pProperties[0] != 47 ) + if ( v19.uPropCount && *v19.pProperties[0] != 47 ) ++Argsa; } while ( fgets(&Buf, 490, File) ); @@ -490,7 +490,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v19, texture_frame_table_txt_parser(&Buf, &v18), sizeof(v19)); - if ( v19.field_0 && *v19.pProperties[0] != 47 ) + if ( v19.uPropCount && *v19.pProperties[0] != 47 ) { sprintf(v2->pSounds[v2->uNumSounds].pSoundName, "%s", v19.pProperties[0]); v9 = atoi(v19.pProperties[1]); @@ -518,7 +518,7 @@ { v2->pSounds[v2->uNumSounds].eType = SOUND_DESC_SYSTEM; } - if ( v19.field_0 >= 4 && !_strcmpi(v19.pProperties[3], "3D") ) + if ( v19.uPropCount >= 4 && !_strcmpi(v19.pProperties[3], "3D") ) { v15 = (int)&v2->pSounds[v2->uNumSounds].uFlags; *(int *)v15 |= SOUND_DESC_SWAP;
--- a/Chest.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/Chest.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -687,7 +687,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v17, texture_frame_table_txt_parser(&Buf, &v16), sizeof(v17)); - if ( v17.field_0 && *v17.pProperties[0] != 47 ) + if ( v17.uPropCount && *v17.pProperties[0] != 47 ) ++Argsa; } while ( fgets(&Buf, 490, File) ); @@ -708,7 +708,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v17, texture_frame_table_txt_parser(&Buf, &v16), sizeof(v17)); - if ( v17.field_0 && *v17.pProperties[0] != 47 ) + if ( v17.uPropCount && *v17.pProperties[0] != 47 ) { strcpy(v2->pChests[v2->uNumChests].pName, v17.pProperties[0]); v10 = atoi(v17.pProperties[1]);
--- a/FrameTableInc.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/FrameTableInc.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -1,3 +1,137 @@ #include "FrameTableInc.h" -struct FrameTableTxtLine stru_F8B5E8; // weak +#include <memory.h> +//identical function to work in differnt threads + +//----- (004BE3BF) -------------------------------------------------------- +FrameTableTxtLine *texture_frame_table_txt_parser(const char *str_to_parse, FrameTableTxtLine *tokens_table) + { + bool new_token_flag; // edx@3 + bool in_quotes; // [sp+Ch] [bp-4h]@3 + char* parse_pos; + unsigned char test_char; + int i; + + static char tokens_buff1[1000]; + static struct FrameTableTxtLine temp_tokens_table1; // weak + + temp_tokens_table1.uPropCount = 0; + if ( str_to_parse && *str_to_parse ) + { + parse_pos=(char*)str_to_parse; + new_token_flag = true; + in_quotes = false; + for(i = 0; (i<1000)&&(temp_tokens_table1.uPropCount < 30) ; ++i) + { + test_char=*parse_pos; + tokens_buff1[i]=test_char; + if ( !test_char ) + break; + if ( (test_char != ' ') && (test_char != ',') && (test_char != '\t') || in_quotes ) + { + if ( test_char == '"' ) + { + tokens_buff1[i]= '\0'; + new_token_flag = true; + if ( in_quotes ) + in_quotes = false; + else + { + in_quotes = true; + if ( *(parse_pos+1) == '"' ) + { + temp_tokens_table1.pProperties[temp_tokens_table1.uPropCount] = &tokens_buff1[i]; + ++temp_tokens_table1.uPropCount; + } + } + } + else + { + if ( new_token_flag ) + { + temp_tokens_table1.pProperties[temp_tokens_table1.uPropCount] = &tokens_buff1[i]; + ++temp_tokens_table1.uPropCount; + } + new_token_flag = false; + } + } + else + { + tokens_buff1[i]= '\0'; + new_token_flag = true; + } + ++parse_pos; + } + tokens_buff1[i]= '\0'; + } + memcpy(tokens_table, &temp_tokens_table1, sizeof(FrameTableTxtLine)); + return tokens_table; + } +// F8BA58: using guessed type FrameTableTxtLine static_stru_F8BA58; + +//----- (004BE485) -------------------------------------------------------- +FrameTableTxtLine * frame_table_txt_parser(const char *str_to_parse, FrameTableTxtLine *tokens_table) + { + bool new_token_flag; // edx@3 + bool in_quotes; // [sp+Ch] [bp-4h]@3 + char* parse_pos; + unsigned char test_char; + int i; + + static char tokens_buff2[1000]; + static struct FrameTableTxtLine temp_tokens_table2; // weak + temp_tokens_table2.uPropCount = 0; + + if ( str_to_parse && *str_to_parse ) + { + parse_pos=(char*)str_to_parse; + new_token_flag = true; + in_quotes = false; + for(i = 0; (i<1000)&&(temp_tokens_table2.uPropCount < 30); ++i) + { + test_char=*parse_pos; + tokens_buff2[i]=test_char; + if ( !test_char ) + break; + if ( (test_char != ' ') && (test_char != ',') && (test_char != '\t') || in_quotes ) + { + if ( test_char == '"' ) + { + tokens_buff2[i]= '\0'; + new_token_flag = true; + if ( in_quotes ) + in_quotes = false; + else + { + in_quotes = true; + if ( *(parse_pos+1) == '"' ) + { + temp_tokens_table2.pProperties[temp_tokens_table2.uPropCount] = &tokens_buff2[i]; + ++temp_tokens_table2.uPropCount; + } + } + } + else + { + if ( new_token_flag ) + { + temp_tokens_table2.pProperties[temp_tokens_table2.uPropCount] = &tokens_buff2[i]; + ++temp_tokens_table2.uPropCount; + } + new_token_flag = false; + } + } + else + { + tokens_buff2[i]= '\0'; + new_token_flag = true; + } + ++parse_pos; + } + + tokens_buff2[i]= '\0'; + } + memcpy(tokens_table, &temp_tokens_table2, sizeof(FrameTableTxtLine)); + return tokens_table; + } +
--- a/FrameTableInc.h Sun Mar 17 22:46:18 2013 +0200 +++ b/FrameTableInc.h Mon Mar 18 22:53:56 2013 +0400 @@ -15,12 +15,14 @@ #pragma pack(push, 1) struct FrameTableTxtLine { - int field_0; - const char *pProperties[13]; - const char *pProperties2[16]; - int field_78; + int uPropCount; + const char *pProperties[31]; + // const char *pProperties2[16]; + // int field_78; }; #pragma pack(pop) -FrameTableTxtLine *texture_frame_table_txt_parser(const char *_this, FrameTableTxtLine *a2); \ No newline at end of file +FrameTableTxtLine *texture_frame_table_txt_parser(const char *_this, FrameTableTxtLine *a2); + +FrameTableTxtLine *frame_table_txt_parser(const char *pString, FrameTableTxtLine *a2); \ No newline at end of file
--- a/Monsters.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/Monsters.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -24,7 +24,7 @@ int ParseSpecialAttack(const char *spec_att_str); //----- (004548E2) -------------------------------------------------------- - unsigned int __fastcall ParseSpellType(FrameTableTxtLine *a1, int a2) +unsigned int __fastcall ParseSpellType(FrameTableTxtLine *a1, int a2) { int v2; // edi@1 int v3; // esi@1 @@ -459,7 +459,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v25, frame_table_txt_parser(&Buf, &v24), sizeof(v25)); - if ( v25.field_0 && *v25.pProperties[0] != 47 ) + if ( v25.uPropCount && *v25.pProperties[0] != 47 ) ++Argsa; } while ( fgets(&Buf, 490, File) ); @@ -478,7 +478,7 @@ *strchr(&Buf, 10) = 0; memcpy(&v25, frame_table_txt_parser(&Buf, &v24), sizeof(v25)); v8 = 0; - if ( v25.field_0 && *v25.pProperties[0] != 47 ) + if ( v25.uPropCount && *v25.pProperties[0] != 47 ) { strcpy(v2->pMonsters[v2->uNumMonsters].pMonsterName, v25.pProperties[0]); v35 = 0; @@ -518,16 +518,16 @@ v16 = v25.pProperties[12]; v2->pMonsters[v2->uNumMonsters].uToHitRadius = v15; v17 = (unsigned __int8)atoi(v16); - Argsb = atoi(v25.pProperties2[0]) & 0xFF; - v26 = atoi(v25.pProperties2[1]) & 0xFF; - v18 = atoi(v25.pProperties2[2]); + Argsb = atoi(v25.pProperties[13]) & 0xFF; + v26 = atoi(v25.pProperties[14]) & 0xFF; + v18 = atoi(v25.pProperties[15]); v2->pMonsters[v2->uNumMonsters].uTintColor = v18 | ((v26 | ((Argsb | (v17 << 8)) << 8)) << 8); v19 = 0; do { - v20 = atoi(v25.pProperties2[v19 + 4]); - v21 = v19++ + 76 * v2->uNumMonsters; - v2->pMonsters->pSoundSampleIDs[v21] = v20; + v20 = atoi(v25.pProperties[v19 + 16]); + v21 = v19++ ; + v2->pMonsters[v2->uNumMonsters].pSoundSampleIDs[v21] = v20; } while ( v19 < 4 ); ++v2->uNumMonsters;
--- a/Overlays.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/Overlays.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -220,7 +220,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v19, texture_frame_table_txt_parser(&Buf, &v18), sizeof(v19)); - if ( v19.field_0 && *v19.pProperties[0] != 47 ) + if ( v19.uPropCount && *v19.pProperties[0] != 47 ) ++Argsa; } while ( fgets(&Buf, 490, File) ); @@ -241,7 +241,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v19, texture_frame_table_txt_parser(&Buf, &v18), sizeof(v19)); - if ( v19.field_0 && *v19.pProperties[0] != 47 ) + if ( v19.uPropCount && *v19.pProperties[0] != 47 ) { v10 = atoi(v19.pProperties[0]); v11 = v19.pProperties[1];
--- a/Sprites.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/Sprites.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -466,7 +466,7 @@ { *strchr(Buf, '\n') = 0; memcpy(&v43, frame_table_txt_parser(Buf, &v42), sizeof(v43)); - if ( v43.field_0 && *v43.pProperties[0] != '/' ) + if ( v43.uPropCount && *v43.pProperties[0] != '/' ) ++Argsa; } while ( fgets(Buf, 490, File) ); @@ -485,7 +485,7 @@ { *strchr(Buf, 10) = 0; memcpy(&v43, frame_table_txt_parser(Buf, &v42), sizeof(v43)); - if ( v43.field_0 && *v43.pProperties[0] != '/' ) + if ( v43.uPropCount && *v43.pProperties[0] != '/' ) { v8 = v43.pProperties[0]; v2->pSpriteSFrames[v2->uNumSpriteFrames].uFlags = 0; @@ -542,7 +542,7 @@ v22 = (int)&v2->pSpriteSFrames[v2->uNumSpriteFrames].uFlags; *(int *)v22 |= 0x10u; } - for ( j = 13; j < v43.field_0; ++j ) + for ( j = 13; j < v43.uPropCount; ++j ) { v24 = v43.pProperties[j]; if ( _strcmpi(v43.pProperties[j], "Luminous") )
--- a/mm7_2.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/mm7_2.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -2491,196 +2491,6 @@ } } -//----- (004BE3BF) -------------------------------------------------------- -FrameTableTxtLine *texture_frame_table_txt_parser(const char *_this, FrameTableTxtLine *a2) -{ - char *v2; // eax@3 - signed int v3; // edx@3 - unsigned int v4; // edi@3 - char v5; // cl@4 - FrameTableTxtLine *result; // eax@21 - signed int v7; // [sp+Ch] [bp-4h]@3 - - static struct FrameTableTxtLine static_stru_F8BA58; // weak - static_stru_F8BA58.field_0 = 0; - if ( _this && *_this ) - { - int i = 0; - v2 = (char *)&array_F8B668; - v3 = 1; - v7 = 0; - v4 = _this - (char *)&array_F8B668; - do - { - v5 = v2[v4]; - *v2 = v5; - if ( !v5 ) - break; - if ( v5 != 32 && v5 != 44 && v5 != 9 || v7 ) - { - if ( v5 == 34 ) - { - *v2 = 0; - v3 = 1; - if ( v7 ) - { - v7 = 0; - } - else - { - v7 = 1; - if ( v2[v4 + 1] == 34 ) - { - static_stru_F8BA58.pProperties[static_stru_F8BA58.field_0] = v2; - ++static_stru_F8BA58.field_0; - } - } - } - else - { - if ( v3 ) - { - static_stru_F8BA58.pProperties[static_stru_F8BA58.field_0] = v2; - ++static_stru_F8BA58.field_0; - } - v3 = 0; - } - } - else - { - *v2 = 0; - v3 = 1; - } - if ( static_stru_F8BA58.field_0 >= 30 ) - break; - ++v2; - ++i; - } - while (i < 1000); - *v2 = 0; - } - result = a2; - memcpy(a2, &static_stru_F8BA58, 0x7Cu); - return result; -} -// F8BA58: using guessed type FrameTableTxtLine static_stru_F8BA58; - -//----- (004BE485) -------------------------------------------------------- -FrameTableTxtLine *__thiscall frame_table_txt_parser(const char *pString, FrameTableTxtLine *a2) -{ - char *v2; // eax@3 - signed int v3; // edi@3 - signed int v4; // edx@3 - char v5; // cl@4 - FrameTableTxtLine *result; // eax@24 - unsigned int v7; // [sp+Ch] [bp-4h]@3 - - stru_F8B5E8.field_0 = 0; - if ( pString && *pString ) - { - v2 = (char *)&unk_F8B1F8; - v3 = 0; - v7 = pString - (const char *)&unk_F8B1F8; - v4 = 1; - while ( 1 ) - { - v5 = v2[v7]; - *v2 = v5; - if ( !v5 ) - { -//LABEL_23: - *v2 = 0; - break; - } - if ( v5 == ',' ) - { - if ( v3 ) - { - if ( v4 ) - { - stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; - ++stru_F8B5E8.field_0; - } - v4 = 0; - } - else - { - *v2 = 0; - v4 = 1; - } - } - else - { - if ( v5 != '\t' ) - { - if ( v5 == '"' ) - { - *v2 = 0; - v4 = 1; - if ( v3 ) - { - v3 = 0; - } - else - { - v3 = 1; - if ( v2[v7 + 1] == 34 ) - { - stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; - ++stru_F8B5E8.field_0; - } - } - } - else - { -//LABEL_18: - if ( v4 ) - { - stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; - ++stru_F8B5E8.field_0; - } - v4 = 0; - } - } - else - { - if ( v3 ) - { - if ( v4 ) - { - stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; - ++stru_F8B5E8.field_0; - } - v4 = 0; - } - else - { - *v2 = 0; - if ( v4 ) - { - stru_F8B5E8.pProperties[stru_F8B5E8.field_0] = v2; - ++stru_F8B5E8.field_0; - } - v4 = 1; - } - } - } -//LABEL_21: - if ( stru_F8B5E8.field_0 < 30 ) - { - ++v2; - if ( (unsigned int)v2 < (unsigned int)&unk_F8B5E0 ) - continue; - } - *v2 = 0; - break; - } - } - result = a2; - memcpy(a2, &stru_F8B5E8, 0x7Cu); - return result; -} -// F8B5E8: using guessed type FrameTableTxtLine stru_F8B5E8; @@ -7263,7 +7073,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v42, frame_table_txt_parser(&Buf, &v41), sizeof(v42)); - if ( v42.field_0 && *v42.pProperties[0] != 47 && v42.field_0 >= 3 ) + if ( v42.uPropCount && *v42.pProperties[0] != 47 && v42.uPropCount >= 3 ) ++Argsa; } while ( fgets(&Buf, 490, File) ); @@ -7281,7 +7091,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v42, frame_table_txt_parser(&Buf, &v38), sizeof(v42)); - if ( v42.field_0 && *v42.pProperties[0] != 47 && v42.field_0 >= 3 ) + if ( v42.uPropCount && *v42.pProperties[0] != 47 && v42.uPropCount >= 3 ) { strcpy(v2->pDecorations[v2->uNumDecorations].pName, v42.pProperties[1]); v8 = pSpriteFrameTable->FastFindSprite(v2->pDecorations[v2->uNumDecorations].pName); @@ -7309,15 +7119,15 @@ v22 = v42.pProperties[9]; v2->pDecorations[v2->uNumDecorations].uColoredLightBlue = v21; v2->pDecorations[v2->uNumDecorations].uSoundID = atoi(v22); - v25 = __OFSUB__(v42.field_0, 10); - v23 = v42.field_0 == 10; - v24 = v42.field_0 - 10 < 0; + v25 = __OFSUB__(v42.uPropCount, 10); + v23 = v42.uPropCount == 10; + v24 = v42.uPropCount - 10 < 0; v2->pDecorations[v2->uNumDecorations].uFlags = 0; if ( !((unsigned __int8)(v24 ^ v25) | v23) ) { strcpy(&Dest, v42.pProperties[10]); memcpy(&v41, frame_table_txt_parser(&Dest, &v37), sizeof(v41)); - for ( j = 0; j < v41.field_0; ++j ) + for ( j = 0; j < v41.uPropCount; ++j ) { v27 = v41.pProperties[j]; if ( _strcmpi(v41.pProperties[j], "NBM") ) @@ -7505,7 +7315,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v45, frame_table_txt_parser(&Buf, &v44), sizeof(v45)); - if ( v45.field_0 && *v45.pProperties[0] != '/' ) + if ( v45.uPropCount && *v45.pProperties[0] != '/' ) ++Argsa; } while ( fgets(&Buf, 490, File) ); @@ -7525,7 +7335,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v45, frame_table_txt_parser(&Buf, &v41), sizeof(v45)); - if ( v45.field_0 && *v45.pProperties[0] != 47 ) + if ( v45.uPropCount && *v45.pProperties[0] != 47 ) { strcpy(v2->pObjects[v2->uNumObjects].field_0, v45.pProperties[0]); v9 = pSpriteFrameTable->FastFindSprite((char *)v45.pProperties[1]); @@ -7548,9 +7358,9 @@ v2->pObjects[v2->uNumObjects].uSpeed = v19; strcpy(&Dest, v20); memcpy(&v44, frame_table_txt_parser(&Dest, &v40), sizeof(v44)); - if ( v45.field_0 > 7 ) - { - for ( Argsb = 0; Argsb < v44.field_0; ++Argsb ) + if ( v45.uPropCount > 7 ) + { + for ( Argsb = 0; Argsb < v44.uPropCount; ++Argsb ) { v21 = Argsb; v22 = v44.pProperties[Argsb];
--- a/mm7_4.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/mm7_4.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -1944,7 +1944,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v84, texture_frame_table_txt_parser(&Buf, &v85), sizeof(v84)); - if ( v84.field_0 && *v84.pProperties[0] != 47 ) + if ( v84.uPropCount && *v84.pProperties[0] != 47 ) ++v4; } v2->uNumTiles = v4; @@ -1961,7 +1961,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v84, texture_frame_table_txt_parser(&Buf, &v85), sizeof(v84)); - if ( v84.field_0 ) + if ( v84.uPropCount ) { if ( *v84.pProperties[0] != 47 ) break; @@ -2192,7 +2192,7 @@ { LOBYTE(v2->pTiles[v2->uNumTiles].uSection) = -1; LABEL_152: - for ( j = 5; j < v84.field_0; ++j ) + for ( j = 5; j < v84.uPropCount; ++j ) { v72 = v84.pProperties[j]; if ( _strcmpi(v84.pProperties[j], "TTattr_Burn") ) @@ -4427,9 +4427,9 @@ { *strchr(&Buf, 10) = 0; memcpy(&v24, texture_frame_table_txt_parser(&Buf, &v23), sizeof(v24)); - if ( v24.field_0 && *v24.pProperties[0] != 47 ) - { - if ( v24.field_0 < 3 ) + if ( v24.uPropCount && *v24.pProperties[0] != 47 ) + { + if ( v24.uPropCount < 3 ) Abortf("PlayerFrameTable::load, too few arguments, %s line %i.", Args, v26); ++v25; } @@ -4450,7 +4450,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v24, texture_frame_table_txt_parser(&Buf, &v23), sizeof(v24)); - if ( v24.field_0 && *v24.pProperties[0] != 47 ) + if ( v24.uPropCount && *v24.pProperties[0] != 47 ) { v8 = atoi(v24.pProperties[0]); v9 = v24.pProperties[1]; @@ -4461,7 +4461,7 @@ v2->pFrames[v2->uNumFrames].uAnimTime = atoi(v11); v2->pFrames[v2->uNumFrames].uAnimLength = 0; v2->pFrames[v2->uNumFrames].uFlags = 0; - for ( j = 3; j < v24.field_0; ++j ) + for ( j = 3; j < v24.uPropCount; ++j ) { if ( !_strcmpi(v24.pProperties[j], "New") ) { @@ -4664,9 +4664,9 @@ { *strchr(&Buf, 10) = 0; memcpy(&v20, frame_table_txt_parser(&Buf, &v19), sizeof(v20)); - if ( v20.field_0 && *v20.pProperties[0] != 47 ) - { - if ( v20.field_0 < 3 ) + if ( v20.uPropCount && *v20.pProperties[0] != 47 ) + { + if ( v20.uPropCount < 3 ) Abortf("IconFrameTable::loadText, too few arguments, %s line %i.", Args, v22); ++v21; } @@ -4687,7 +4687,7 @@ { *strchr(&Buf, 10) = 0; memcpy(&v20, frame_table_txt_parser(&Buf, &v19), sizeof(v20)); - if ( v20.field_0 && *v20.pProperties[0] != 47 ) + if ( v20.uPropCount && *v20.pProperties[0] != 47 ) { strcpy(v2->pIcons[v2->uNumIcons].pAnimationName, v20.pProperties[0]); strcpy(v2->pIcons[v2->uNumIcons].pTextureName, v20.pProperties[1]);
--- a/mm7_5.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/mm7_5.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -2285,7 +2285,7 @@ LABEL_524: sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); memcpy(&v216, texture_frame_table_txt_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); - if ( v216.field_0 == 1 ) + if ( v216.uPropCount == 1 ) { pNPCData4 = (NPCData *)((signed int)pGames_LOD->uNumSubIndices / 2); v70 = atoi(v216.pProperties[0]); @@ -2328,7 +2328,7 @@ } else { - if ( v216.field_0 != 3 ) + if ( v216.uPropCount != 3 ) //goto LABEL_90; { v1 = "";
--- a/mm7_data.cpp Sun Mar 17 22:46:18 2013 +0200 +++ b/mm7_data.cpp Mon Mar 18 22:53:56 2013 +0400 @@ -2180,9 +2180,9 @@ char byte_F8B1EF[777]; // weak char byte_F8B1F0[4]; int dword_F8B1F4; // weak -_UNKNOWN unk_F8B1F8; // weak -_UNKNOWN unk_F8B5E0; // weak -char array_F8B668[1000]; // weak + + + //_UNKNOWN unk_F8BA50; // weak char byte_F8BC0C; // weak int bGameoverLoop = 0; // weak
--- a/mm7_data.h Sun Mar 17 22:46:18 2013 +0200 +++ b/mm7_data.h Mon Mar 18 22:53:56 2013 +0400 @@ -1704,10 +1704,10 @@ extern char byte_F8B1EF[]; // weak extern char byte_F8B1F0[4]; extern int dword_F8B1F4; // weak -extern _UNKNOWN unk_F8B1F8; // weak -extern _UNKNOWN unk_F8B5E0; // weak -extern struct FrameTableTxtLine stru_F8B5E8; // weak -extern char array_F8B668[]; // weak + + + + //extern _UNKNOWN unk_F8BA50; // weak extern char byte_F8BC0C; // weak extern int bGameoverLoop; // weak @@ -2326,8 +2326,7 @@ signed int __cdecl sub_4BD8B5(); bool __fastcall sub_4BDAAF(ItemGen *a1, int _2da_idx); void __cdecl sub_4BDB56_buy_skill____(); -struct FrameTableTxtLine *__thiscall texture_frame_table_txt_parser(const char *_this, FrameTableTxtLine *a2); -struct FrameTableTxtLine *__thiscall frame_table_txt_parser(const char *pString, FrameTableTxtLine *a2); + void __cdecl ShowIntroVideo_and_LoadingScreen(); unsigned int __thiscall GameOverMenu(void *ecx0);