From: <ave...@us...> - 2003-12-30 19:29:36
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript In directory sc8-pr-cvs1:/tmp/cvs-serv4307/plugins/GUIScript Modified Files: GUIScript.cpp Log Message: Fix: removed a pst specific piece of code, side effect: nameless one's animation isn't hardcoded (at least here) Index: GUIScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** GUIScript.cpp 29 Dec 2003 20:09:28 -0000 1.101 --- GUIScript.cpp 30 Dec 2003 19:29:32 -0000 1.102 *************** *** 1757,1795 **** MyActor->SetPortrait(poi); } ! if(strcmp(core->GameType, "pst") != 0) { ! int mastertable=core->LoadTable("avprefix"); ! TableMgr * mtm = core->GetTable(mastertable); ! int count=mtm->GetRowCount(); ! if(count<4 || count>8) { ! printMessage("GUIScript","Table is invalid.\n",LIGHT_RED); ! return NULL; ! } ! poi=mtm->QueryField(0); ! int AnimID=strtoul(poi,NULL,0); ! printf("Avatar animation base: 0x%0x",AnimID); ! for(int i=1;i<count;i++) ! { ! poi = mtm->QueryField(i); ! printf("Part table: %s\n",poi); ! int table = core->LoadTable(poi); ! printf("Part table id:%d\n",table); ! TableMgr * tm = core->GetTable(table); ! printf("Loaded part table\n"); ! int StatID = atoi(tm->QueryField() ); ! printf("Stat ID:%d\n",StatID); ! StatID=MyActor->GetBase(StatID); ! printf("Value:%d\n",StatID); ! poi = tm->QueryField(StatID); ! printf("Part: %s\n",poi); ! AnimID+=strtoul(poi,NULL,0); ! core->DelTable(table); ! } ! core->DelTable(mastertable); ! printf("Set animation complete: 0x%0x\n",AnimID); ! MyActor->SetAnimationID(AnimID); } ! else { ! MyActor->AnimID = IE_ANI_PST_START; } MyActor->Init(); int saindex = core->LoadTable("STARTPOS"); --- 1757,1790 ---- MyActor->SetPortrait(poi); } ! int mastertable=core->LoadTable("avprefix"); ! TableMgr * mtm = core->GetTable(mastertable); ! int count=mtm->GetRowCount(); ! if(count<4 || count>8) { ! printMessage("GUIScript","Table is invalid.\n",LIGHT_RED); ! return NULL; } ! poi=mtm->QueryField(0); ! int AnimID=strtoul(poi,NULL,0); ! printf("Avatar animation base: 0x%0x",AnimID); ! for(int i=1;i<count;i++) ! { ! poi = mtm->QueryField(i); ! printf("Part table: %s\n",poi); ! int table = core->LoadTable(poi); ! printf("Part table id:%d\n",table); ! TableMgr * tm = core->GetTable(table); ! printf("Loaded part table\n"); ! int StatID = atoi(tm->QueryField() ); ! printf("Stat ID:%d\n",StatID); ! StatID=MyActor->GetBase(StatID); ! printf("Value:%d\n",StatID); ! poi = tm->QueryField(StatID); ! printf("Part: %s\n",poi); ! AnimID+=strtoul(poi,NULL,0); ! core->DelTable(table); } + core->DelTable(mastertable); + printf("Set animation complete: 0x%0x\n",AnimID); + MyActor->SetAnimationID(AnimID); MyActor->Init(); int saindex = core->LoadTable("STARTPOS"); |