Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27094
Modified Files:
Actions.cpp Actor.cpp ActorBlock.cpp GSUtils.cpp GameScript.h
Log Message:
Actor: fixed compilation
implemented iwd2 createcreature (with optional scripting name)
Index: GameScript.h
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GameScript.h,v
retrieving revision 1.247
retrieving revision 1.248
diff -C2 -d -r1.247 -r1.248
*** GameScript.h 24 Jun 2006 11:24:02 -0000 1.247
--- GameScript.h 25 Jun 2006 10:33:15 -0000 1.248
***************
*** 545,548 ****
--- 545,549 ----
#define CC_CHECK_OVERLAP 32 //other actors
#define CC_COPY 64 //copy appearance
+ #define CC_SCRIPTNAME 128 //scriptname in 2nd string
//begindialog flags
Index: GSUtils.cpp
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GSUtils.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** GSUtils.cpp 22 May 2006 16:39:25 -0000 1.54
--- GSUtils.cpp 25 Jun 2006 10:33:15 -0000 1.55
***************
*** 538,541 ****
--- 538,546 ----
}
Actor *ab = core->GetCreature(ds);
+
+ if (flags & CC_SCRIPTNAME) {
+ ab->SetScriptName(parameters->string1Parameter);
+ }
+
int radius;
Point pnt;
Index: ActorBlock.cpp
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ActorBlock.cpp,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** ActorBlock.cpp 24 Jun 2006 11:24:01 -0000 1.143
--- ActorBlock.cpp 25 Jun 2006 10:33:15 -0000 1.144
***************
*** 66,69 ****
--- 66,70 ----
Pos.x = 0;
Pos.y = 0;
+ scriptName[0] = 0;
locals = new Variables();
***************
*** 93,97 ****
void Scriptable::SetScriptName(const char* text)
{
! strnspccpy( scriptName, text, 32 );
}
--- 94,100 ----
void Scriptable::SetScriptName(const char* text)
{
! if (text && text[0]) {
! strnspccpy( scriptName, text, 32 );
! }
}
Index: Actions.cpp
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Actions.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** Actions.cpp 24 Jun 2006 11:24:01 -0000 1.69
--- Actions.cpp 25 Jun 2006 10:33:15 -0000 1.70
***************
*** 525,529 ****
void GameScript::CreateCreature(Scriptable* Sender, Action* parameters)
{
! CreateCreatureCore( Sender, parameters, CC_CHECK_IMPASSABLE|CC_CHECK_OVERLAP );
}
--- 525,529 ----
void GameScript::CreateCreature(Scriptable* Sender, Action* parameters)
{
! CreateCreatureCore( Sender, parameters, CC_CHECK_IMPASSABLE|CC_CHECK_OVERLAP|CC_SCRIPTNAME );
}
Index: Actor.cpp
===================================================================
RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Actor.cpp,v
retrieving revision 1.187
retrieving revision 1.188
diff -C2 -d -r1.187 -r1.188
*** Actor.cpp 24 Jun 2006 11:24:01 -0000 1.187
--- Actor.cpp 25 Jun 2006 10:33:15 -0000 1.188
***************
*** 742,748 ****
switch(type) {
case 0: case 1: case 2: case 3: //blood
! int b_gr = (int) GetStat(IE_ANIMATION_ID)>>16;
! if (!b_gr) b_gr = d_gradient[type];
! add_animation(d_main[type], b_gr, 0, true);
break;
case 4: case 5: case 7: //fire
--- 742,748 ----
switch(type) {
case 0: case 1: case 2: case 3: //blood
! i = (int) GetStat(IE_ANIMATION_ID)>>16;
! if (!i) i = d_gradient[type];
! add_animation(d_main[type], i, 0, true);
break;
case 4: case 5: case 7: //fire
|