From: <ave...@us...> - 2004-02-29 17:44:01
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12940 Modified Files: Actor.cpp GameScript.cpp Log Message: Added PDIALOG/DPLAYER handling into GameScript Index: Actor.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Actor.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Actor.cpp 28 Feb 2004 18:38:32 -0000 1.30 --- Actor.cpp 29 Feb 2004 17:33:37 -0000 1.31 *************** *** 63,68 **** int i; - //memset(BaseStats, 0, MAX_STATS*sizeof(*BaseStats)); - //memset(Modified, 0, MAX_STATS*sizeof(*Modified)); for (i = 0; i < MAX_STATS; i++) { BaseStats[i] = 0; --- 63,66 ---- *************** *** 110,113 **** --- 108,112 ---- char tmp[7]; sprintf( tmp, "0x%04X", AnimID ); + int AvatarTable = core->LoadTable( "avatars" ); TableMgr* at = core->GetTable( AvatarTable ); *************** *** 308,311 **** --- 307,313 ---- BaseStats[StatIndex] = Value; switch (StatIndex) { + case IE_ANIMATION_ID: + SetAnimationID( Value ); + break; case IE_EA: case IE_UNSELECTABLE: Index: GameScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GameScript.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** GameScript.cpp 28 Feb 2004 18:39:51 -0000 1.79 --- GameScript.cpp 29 Feb 2004 17:33:37 -0000 1.80 *************** *** 3240,3244 **** --- 3240,3252 ---- Actor* act = ( Actor* ) Sender; core->GetGame()->JoinParty( act ); + act->SetStat( IE_EA, PC ); act->SetScript( "DPLAYER2", SCR_DEFAULT ); + if(core->HasFeature( GF_HAS_PDIALOG )) { + int pdtable = core->LoadTable( "pdialog" ); + char* scriptingname = act->GetScriptName(); + act->SetDialog( core->GetTable( pdtable )->QueryField( scriptingname, + "JOIN_DIALOG_FILE" ) ); + core->DelTable( pdtable ); + } } *************** *** 3250,3253 **** --- 3258,3270 ---- Actor* act = ( Actor* ) Sender; core->GetGame()->LeaveParty( act ); + act->SetStat( IE_EA, NEUTRAL ); + act->SetScript( "", SCR_DEFAULT ); + if(core->HasFeature( GF_HAS_PDIALOG )) { + int pdtable = core->LoadTable( "pdialog" ); + char* scriptingname = act->GetScriptName(); + act->SetDialog( core->GetTable( pdtable )->QueryField( scriptingname, + "POST_DIALOG_FILE" ) ); + core->DelTable( pdtable ); + } } *************** *** 3570,3576 **** } int pdtable = core->LoadTable( "pdialog" ); ! Actor* actor = ( Actor* ) Sender; ! char* scriptingname = actor->GetScriptName(); ! actor->SetDialog( core->GetTable( pdtable )->QueryField( scriptingname, "POST_DIALOG_FILE" ) ); core->DelTable( pdtable ); --- 3587,3593 ---- } int pdtable = core->LoadTable( "pdialog" ); ! Actor* act = ( Actor* ) Sender; ! char* scriptingname = act->GetScriptName(); ! act->SetDialog( core->GetTable( pdtable )->QueryField( scriptingname, "POST_DIALOG_FILE" ) ); core->DelTable( pdtable ); |