Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(559) |
Nov
(772) |
Dec
(914) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(291) |
Feb
(312) |
Mar
(215) |
Apr
(243) |
May
(150) |
Jun
(18) |
Jul
(131) |
Aug
(436) |
Sep
(171) |
Oct
(233) |
Nov
(222) |
Dec
(141) |
2005 |
Jan
(74) |
Feb
(220) |
Mar
(326) |
Apr
(142) |
May
(165) |
Jun
(187) |
Jul
(246) |
Aug
(116) |
Sep
(10) |
Oct
(30) |
Nov
(257) |
Dec
(247) |
2006 |
Jan
(165) |
Feb
(38) |
Mar
(58) |
Apr
(135) |
May
(18) |
Jun
(102) |
Jul
(228) |
Aug
(250) |
Sep
(47) |
Oct
(26) |
Nov
(69) |
Dec
(263) |
2007 |
Jan
(120) |
Feb
(268) |
Mar
(50) |
Apr
(64) |
May
(49) |
Jun
(39) |
Jul
(22) |
Aug
(56) |
Sep
(9) |
Oct
(2) |
Nov
(47) |
Dec
(115) |
2008 |
Jan
(57) |
Feb
(81) |
Mar
(26) |
Apr
(10) |
May
(19) |
Jun
(69) |
Jul
(10) |
Aug
(6) |
Sep
(111) |
Oct
(105) |
Nov
(11) |
Dec
(19) |
2009 |
Jan
(92) |
Feb
(159) |
Mar
(86) |
Apr
(59) |
May
(320) |
Jun
(443) |
Jul
(103) |
Aug
(315) |
Sep
(221) |
Oct
(122) |
Nov
(13) |
Dec
(46) |
2010 |
Jan
(6) |
Feb
(1) |
Mar
(65) |
Apr
(100) |
May
(83) |
Jun
(171) |
Jul
(145) |
Aug
(223) |
Sep
(107) |
Oct
(89) |
Nov
(123) |
Dec
(86) |
2011 |
Jan
(66) |
Feb
(101) |
Mar
(140) |
Apr
(80) |
May
(68) |
Jun
(45) |
Jul
(97) |
Aug
(119) |
Sep
(46) |
Oct
(45) |
Nov
(74) |
Dec
(89) |
2012 |
Jan
(124) |
Feb
(156) |
Mar
(102) |
Apr
(56) |
May
(25) |
Jun
(16) |
Jul
(73) |
Aug
(82) |
Sep
(53) |
Oct
(59) |
Nov
(90) |
Dec
(112) |
2013 |
Jan
(191) |
Feb
(58) |
Mar
(68) |
Apr
(49) |
May
(28) |
Jun
(42) |
Jul
(25) |
Aug
(15) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
(58) |
2014 |
Jan
(100) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(24) |
Jun
(8) |
Jul
(3) |
Aug
(9) |
Sep
(2) |
Oct
(90) |
Nov
(56) |
Dec
(44) |
2015 |
Jan
(51) |
Feb
(40) |
Mar
(7) |
Apr
(11) |
May
(6) |
Jun
(23) |
Jul
(46) |
Aug
(63) |
Sep
(58) |
Oct
(32) |
Nov
(32) |
Dec
(9) |
2016 |
Jan
(5) |
Feb
(8) |
Mar
(12) |
Apr
(24) |
May
(13) |
Jun
(7) |
Jul
(6) |
Aug
(18) |
Sep
(6) |
Oct
(9) |
Nov
(4) |
Dec
(5) |
2017 |
Jan
(6) |
Feb
(3) |
Mar
(13) |
Apr
(2) |
May
(2) |
Jun
(77) |
Jul
(13) |
Aug
(42) |
Sep
(92) |
Oct
(39) |
Nov
(35) |
Dec
(27) |
2018 |
Jan
(20) |
Feb
(17) |
Mar
(47) |
Apr
(71) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(6) |
2
|
3
(2) |
4
(14) |
5
(12) |
6
(4) |
7
|
8
(7) |
9
(4) |
10
(2) |
11
(3) |
12
(2) |
13
(11) |
14
(5) |
15
(11) |
16
(3) |
17
(1) |
18
(2) |
19
|
20
|
21
(3) |
22
|
23
(2) |
24
(3) |
25
|
26
(5) |
27
|
28
|
29
(3) |
30
|
31
|
|
From: <avenger_teambg@us...> - 2008-10-29 22:22:07
|
Revision: 5475 http://gemrb.svn.sourceforge.net/gemrb/?rev=5475&view=rev Author: avenger_teambg Date: 2008-10-29 21:34:33 +0000 (Wed, 29 Oct 2008) Log Message: ----------- new feature: CreatePlayer("",slot|0x8000) will destroy an existing character fixed cancelling of character generation in iwd2 Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py 2008-10-26 22:16:25 UTC (rev 5474) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py 2008-10-29 21:34:33 UTC (rev 5475) @@ -222,6 +222,9 @@ return def CancelPress(): + #destroy the half generated character + slot = GemRB.GetVar("Slot") + GemRB.CreatePlayer("", slot|0x8000) GemRB.UnloadWindow(CharGenWindow) GemRB.UnloadWindow(StartOverWindow) GemRB.SetNextScript('SPPartyFormation') Modified: gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-10-26 22:16:25 UTC (rev 5474) +++ gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-10-29 21:34:33 UTC (rev 5475) @@ -4229,7 +4229,7 @@ PyDoc_STRVAR( GemRB_CreatePlayer__doc, "CreatePlayer(CREResRef, Slot [,Import] ) => PlayerSlot\n\n" -"Creates a player slot. If import is nonzero, then reads a CHR instead of a CRE." ); +"Creates or removes a player character in a given party slot. If import is nonzero, then reads a CHR instead of a CRE." ); static PyObject* GemRB_CreatePlayer(PyObject * /*self*/, PyObject* args) { @@ -4254,14 +4254,18 @@ if (PlayerSlot >= 0) { game->DelPC(PlayerSlot, true); } - PlayerSlot = core->LoadCreature( CreResRef, Slot, (bool) Import ); } else { PlayerSlot = game->FindPlayer( PlayerSlot ); if (PlayerSlot >= 0) { return RuntimeError("Slot is already filled!"); } - PlayerSlot = core->LoadCreature( CreResRef, Slot, (bool) Import ); //inparty flag } + if (CreResRef[0]) { + PlayerSlot = core->LoadCreature( CreResRef, Slot, (bool) Import ); + } else { + //just destroyed the previous actor, not going to create one + PlayerSlot = 0; + } if (PlayerSlot < 0) { return RuntimeError("File not found!"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-29 22:15:56
|
Revision: 5477 http://gemrb.svn.sourceforge.net/gemrb/?rev=5477&view=rev Author: avenger_teambg Date: 2008-10-29 22:15:50 +0000 (Wed, 29 Oct 2008) Log Message: ----------- half implemented disarming of traps Modified Paths: -------------- gemrb/trunk/gemrb/plugins/Core/Actions.cpp gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp gemrb/trunk/gemrb/plugins/Core/ActorBlock.h gemrb/trunk/gemrb/plugins/Core/GameControl.cpp gemrb/trunk/gemrb/plugins/Core/GameScript.cpp gemrb/trunk/gemrb/plugins/Core/GameScript.h Modified: gemrb/trunk/gemrb/plugins/Core/Actions.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Actions.cpp 2008-10-29 21:37:48 UTC (rev 5476) +++ gemrb/trunk/gemrb/plugins/Core/Actions.cpp 2008-10-29 22:15:50 UTC (rev 5477) @@ -1981,6 +1981,87 @@ } } +void GameScript::RemoveTraps(Scriptable* Sender, Action* parameters) +{ + //only actors may try to pick a lock + if (Sender->Type != ST_ACTOR) { + Sender->ReleaseCurrentAction(); + return; + } + Scriptable* tar = GetActorFromObject( Sender, parameters->objects[1] ); + if (!tar) { + Sender->ReleaseCurrentAction(); + return; + } + unsigned int distance; + Point *p, *otherp; + Door *door = NULL; + Container *container = NULL; + InfoPoint *trigger = NULL; + ScriptableType type = tar->Type; + ieDword flags; + + switch (type) { + case ST_DOOR: + door = ( Door* ) tar; + if (door->IsOpen()) { + //door is already open + Sender->ReleaseCurrentAction(); + return; + } + p = door->toOpen; + otherp = door->toOpen+1; + distance = FindNearPoint( Sender, p, otherp); + flags = door->Trapped && door->TrapDetected; + break; + case ST_CONTAINER: + container = (Container *) tar; + p = &container->Pos; + otherp = p; + distance = Distance(*p, Sender); + flags = container->Trapped && container->TrapDetected; + break; + case ST_PROXIMITY: + trigger = (InfoPoint *) tar; + distance = Distance(tar, Sender); + flags = trigger->Trapped && trigger->TrapDetected; + break; + default: + Sender->ReleaseCurrentAction(); + return; + } + Actor * actor = (Actor *) Sender; + actor->SetOrientation( GetOrient( *otherp, actor->Pos ), false); + if (distance <= MAX_OPERATING_DISTANCE) { + if (flags) { + switch(type) { + case ST_DOOR: +printf("RemoveTraps on door\n"); + door->TryDisarm(actor); + break; + case ST_CONTAINER: +printf("RemoveTraps on container\n"); + container->TryDisarm(actor); + break; + case ST_PROXIMITY: +printf("RemoveTraps on trap\n"); + trigger->TryDisarm(actor); + break; + default: + //not gonna happen! + assert(false); + } + } else { + //no trap here + //core->DisplayString(STR_NOT_TRAPPED); + } + } else { + GoNearAndRetry(Sender, *p, MAX_OPERATING_DISTANCE); + } + Sender->SetWait(1); + Sender->ReleaseCurrentAction(); +} + void GameScript::PickLock(Scriptable* Sender, Action* parameters) { //only actors may try to pick a lock Modified: gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp 2008-10-29 21:37:48 UTC (rev 5476) +++ gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp 2008-10-29 22:15:50 UTC (rev 5477) @@ -1430,6 +1430,16 @@ } } +void Door::TryDisarm(Actor *actor) +{ +//first lets do this automatically succeeding +//TODO: skill check, set off + Trapped = 0; + TrapDetected = 0; + LastDisarmed = actor->GetID(); + ImmediateEvent(); +} + void Door::TryPickLock(Actor *actor) { if (Trapped) { @@ -1523,6 +1533,16 @@ return CT_ACTIVE; } +void InfoPoint::TryDisarm(Actor *actor) +{ +//first lets do this automatically succeeding +//TODO: skill check, set off + Trapped = 0; + TrapDetected = 0; + LastDisarmed = actor->GetID(); + ImmediateEvent(); +} + //detect this trap, using a skill, skill could be set to 256 for 'sure' //skill is the all around modified trap detection skill //a trapdetectiondifficulty of 100 means impossible detection short of a spell @@ -1626,7 +1646,7 @@ break; } printf( "TrapDetected: %d, Trapped: %s\n", TrapDetected, YESNO(Trapped)); - printf( "Trap detection: %d, Trap removal: %d\n", TrapDetectionDiff, + printf( "Trap detection: %d%%, Trap removal: %d%%\n", TrapDetectionDiff, TrapRemovalDiff ); const char *name = "NONE"; if (Scripts[0]) { @@ -1818,6 +1838,16 @@ return true; } +void Container::TryDisarm(Actor *actor) +{ +//first lets do this automatically succeeding +//TODO: skill check, set off + Trapped = 0; + TrapDetected = 0; + LastDisarmed = actor->GetID(); + ImmediateEvent(); +} + void Container::TryPickLock(Actor *actor) { if (Trapped) { @@ -1851,8 +1881,8 @@ { printf( "Debugdump of Container %s\n", GetScriptName() ); printf( "Type: %d, LockDifficulty: %d\n", Type, LockDifficulty ); - printf( "Flags: %d, Trapped: %d\n", Flags, Trapped ); - printf( "Trap detection: %d, Trap removal: %d\n", TrapDetectionDiff, + printf( "Flags: %d, Trapped: %s, Detected: %d\n", Flags, YESNO(Trapped), TrapDetected ); + printf( "Trap detection: %d%%, Trap removal: %d%%\n", TrapDetectionDiff, TrapRemovalDiff ); const char *name = "NONE"; if (Scripts[0]) { Modified: gemrb/trunk/gemrb/plugins/Core/ActorBlock.h =================================================================== --- gemrb/trunk/gemrb/plugins/Core/ActorBlock.h 2008-10-29 21:37:48 UTC (rev 5476) +++ gemrb/trunk/gemrb/plugins/Core/ActorBlock.h 2008-10-29 22:15:50 UTC (rev 5477) @@ -458,6 +458,7 @@ void SetDoorOpen(bool Open, bool playsound, ieDword ID); void SetPolygon(bool Open, Gem_Polygon* poly); bool IsOpen() const; + void TryDisarm(Actor *actor); void TryPickLock(Actor *actor); void DebugDump(); }; @@ -478,6 +479,7 @@ //returns dithering option int WantDither(); bool IsOpen() const; + void TryDisarm(Actor *actor); void TryPickLock(Actor *actor); void DebugDump(); private: @@ -506,6 +508,7 @@ public: InfoPoint(void); ~InfoPoint(void); + void TryDisarm(Actor *actor); //detect trap, set skill to 256 if you want sure fire void DetectTrap(int skill); //returns true if trap is visible, only_detected must be true Modified: gemrb/trunk/gemrb/plugins/Core/GameControl.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/GameControl.cpp 2008-10-29 21:37:48 UTC (rev 5476) +++ gemrb/trunk/gemrb/plugins/Core/GameControl.cpp 2008-10-29 22:15:50 UTC (rev 5477) @@ -911,6 +911,10 @@ int GameControl::GetCursorOverDoor(Door *overDoor) { overDoor->Highlight = true; + if (overDoor->TrapDetected && overDoor->Trapped) { + overDoor->outlineColor = red; + return IE_CURSOR_TRAP; + } overDoor->outlineColor = cyan; if (overDoor->Flags & DOOR_LOCKED) { return IE_CURSOR_LOCK; @@ -1100,7 +1104,11 @@ source->ClearPath(); source->ClearActions(); - snprintf(Tmp, sizeof(Tmp), "PickLock(\"%s\")", tgt->GetScriptName() ); + if (tgt->TrapDetected) { + snprintf(Tmp, sizeof(Tmp), "RemoveTraps(\"%s\")", tgt->GetScriptName() ); + } else { + snprintf(Tmp, sizeof(Tmp), "PickLock(\"%s\")", tgt->GetScriptName() ); + } source->AddAction( GenerateAction( Tmp ) ); } @@ -1110,7 +1118,11 @@ source->ClearPath(); source->ClearActions(); - snprintf(Tmp, sizeof(Tmp), "PickLock(\"%s\")", tgt->GetScriptName() ); + if (tgt->TrapDetected) { + snprintf(Tmp, sizeof(Tmp), "RemoveTraps(\"%s\")", tgt->GetScriptName() ); + } else { + snprintf(Tmp, sizeof(Tmp), "PickLock(\"%s\")", tgt->GetScriptName() ); + } source->AddAction( GenerateAction( Tmp ) ); } @@ -1246,7 +1258,7 @@ return; } - if (target_mode&TARGET_MODE_PICK) { + if ((target_mode&TARGET_MODE_PICK) || container->TrapDetected) { TryToPick(actor, container); return; } @@ -1273,7 +1285,7 @@ return; } - if (target_mode&TARGET_MODE_PICK) { + if ( (target_mode&TARGET_MODE_PICK) || door->TrapDetected) { TryToPick(actor, door); return; } Modified: gemrb/trunk/gemrb/plugins/Core/GameScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/GameScript.cpp 2008-10-29 21:37:48 UTC (rev 5476) +++ gemrb/trunk/gemrb/plugins/Core/GameScript.cpp 2008-10-29 22:15:50 UTC (rev 5477) @@ -708,6 +708,7 @@ {"removepaladinhood", GameScript::RemovePaladinHood, 0}, {"removerangerhood", GameScript::RemoveRangerHood, 0}, {"removespell", GameScript::RemoveSpell, 0}, + {"removetraps", GameScript::RemoveTraps, AF_BLOCKING}, {"reputationinc", GameScript::ReputationInc, 0}, {"reputationset", GameScript::ReputationSet, 0}, {"resetfogofwar", GameScript::UndoExplore, 0}, //pst Modified: gemrb/trunk/gemrb/plugins/Core/GameScript.h =================================================================== --- gemrb/trunk/gemrb/plugins/Core/GameScript.h 2008-10-29 21:37:48 UTC (rev 5476) +++ gemrb/trunk/gemrb/plugins/Core/GameScript.h 2008-10-29 22:15:50 UTC (rev 5477) @@ -1257,6 +1257,7 @@ static void RemovePaladinHood(Scriptable* Sender, Action* parameters); static void RemoveRangerHood(Scriptable* Sender, Action* parameters); static void RemoveSpell(Scriptable* Sender, Action* parameters); + static void RemoveTraps(Scriptable* Sender, Action* parameters); static void ReputationInc(Scriptable* Sender, Action* parameters); static void ReputationSet(Scriptable* Sender, Action* parameters); static void RestorePartyLocation(Scriptable *Sender, Action* parameters); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-29 21:42:38
|
Revision: 5476 http://gemrb.svn.sourceforge.net/gemrb/?rev=5476&view=rev Author: avenger_teambg Date: 2008-10-29 21:37:48 +0000 (Wed, 29 Oct 2008) Log Message: ----------- aborting the chargen process will now work in bg2 too Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGenCommon.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGenCommon.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGenCommon.py 2008-10-29 21:34:33 UTC (rev 5475) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGenCommon.py 2008-10-29 21:37:48 UTC (rev 5476) @@ -291,6 +291,9 @@ step = GemRB.GetVar ("Step") if step == 1: + #free up the slot before exiting + MyChar = GemRB.GetVar ("Slot") + GemRB.CreatePlayer ("", MyChar | 0x8000 ) GemRB.SetNextScript ("Start") else: GemRB.SetNextScript ("CharGen") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-26 22:16:29
|
Revision: 5474 http://gemrb.svn.sourceforge.net/gemrb/?rev=5474&view=rev Author: avenger_teambg Date: 2008-10-26 22:16:25 +0000 (Sun, 26 Oct 2008) Log Message: ----------- new displaystring function with format <charname> - action : name improved some iwd2 opcodes Modified Paths: -------------- gemrb/trunk/gemrb/plugins/Core/Interface.cpp gemrb/trunk/gemrb/plugins/Core/Interface.h gemrb/trunk/gemrb/plugins/IWDOpcodes/IWDOpc.cpp Modified: gemrb/trunk/gemrb/plugins/Core/Interface.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Interface.cpp 2008-10-26 21:11:36 UTC (rev 5473) +++ gemrb/trunk/gemrb/plugins/Core/Interface.cpp 2008-10-26 22:16:25 UTC (rev 5474) @@ -4105,16 +4105,44 @@ ta->AppendText( Text, -1 ); } +#define PALSIZE 8 +static Color ActorColor[PALSIZE]; static const char* DisplayFormatName = "[color=%lX]%s - [/color][p][color=%lX]%s[/color][/p]"; static const char* DisplayFormatAction = "[color=%lX]%s - [/color][p][color=%lX]%s %s[/color][/p]"; static const char* DisplayFormat = "[/color][p][color=%lX]%s[/color][/p]"; static const char* DisplayFormatValue = "[/color][p][color=%lX]%s: %d[/color][/p]"; +static const char* DisplayFormatNameString = "[color=%lX]%s - [/color][p][color=%lX]%s: %s[/color][/p]"; ieStrRef Interface::GetStringReference(int stridx) const { return strref_table[stridx]; } + +unsigned int Interface::GetSpeakerColor(const char *&name, Scriptable *&speaker) const +{ + unsigned int speaker_color; + + switch (speaker->Type) { + case ST_ACTOR: + name = ((Actor *) speaker)->GetName(-1); + GetPalette( ((Actor *) speaker)->GetStat(IE_MAJOR_COLOR), PALSIZE, ActorColor ); + speaker_color = (ActorColor[4].r<<16) | (ActorColor[4].g<<8) | ActorColor[4].b; + break; + case ST_TRIGGER: case ST_PROXIMITY: case ST_TRAVEL: + name = GetString( ((InfoPoint *) speaker)->DialogName ); + speaker_color = 0xc0c0c0; + break; + default: + name = ""; + speaker_color = 0x800000; + break; + } + return speaker_color; +} + + +//simply displaying a constant string void Interface::DisplayConstantString(int stridx, unsigned int color) const { if (stridx<0) return; @@ -4133,12 +4161,14 @@ char* text = GetString( stridx, flags); int newlen = (int)(strlen( DisplayFormat) + strlen( text ) + 10); char* newstr = ( char* ) malloc( newlen ); - sprintf( newstr, DisplayFormat, color, text ); + snprintf( newstr, newlen, DisplayFormat, color, text ); FreeString( text ); DisplayString( newstr ); free( newstr ); } +// String format is +// blah : whatever void Interface::DisplayConstantStringValue(int stridx, unsigned int color, ieDword value) const { if (stridx<0) return; @@ -4151,36 +4181,44 @@ free( newstr ); } -#define PALSIZE 8 -static Color ActorColor[PALSIZE]; +// String format is +// <charname> - blah blah : whatever +void Interface::DisplayConstantStringNameString(int stridx, unsigned int color, int stridx2, Scriptable *actor) const +{ + unsigned int actor_color; + const char *name; + if (stridx<0) return; + actor_color = GetSpeakerColor(name, actor); + char* text = GetString( strref_table[stridx], IE_STR_SOUND ); + char* text2 = GetString( strref_table[stridx2], IE_STR_SOUND ); + int newlen = (int)(strlen( DisplayFormat ) + strlen(name) + strlen( text ) + strlen(text2) + 18); + char* newstr = ( char* ) malloc( newlen ); + if (strlen(text2)) { + snprintf( newstr, newlen, DisplayFormatNameString, actor_color, name, color, text, text2 ); + } else { + snprintf( newstr, newlen, DisplayFormatName, color, name, color, text ); + } + FreeString( text ); + FreeString( text2 ); + DisplayString( newstr ); + free( newstr ); +} + +// String format is +// <charname> - blah blah void Interface::DisplayConstantStringName(int stridx, unsigned int color, Scriptable *speaker) const { unsigned int speaker_color; const char *name; if (stridx<0) return; - switch (speaker->Type) { - case ST_ACTOR: - name = ((Actor *) speaker)->GetName(-1); - GetPalette( ((Actor *) speaker)->GetStat(IE_MAJOR_COLOR), PALSIZE, ActorColor ); - speaker_color = (ActorColor[4].r<<16) | (ActorColor[4].g<<8) | ActorColor[4].b; - break; - case ST_TRIGGER: case ST_PROXIMITY: case ST_TRAVEL: - name = GetString( ((InfoPoint *) speaker)->DialogName ); - speaker_color = 0xc0c0c0; - break; - default: - name = ""; - speaker_color = 0x800000; - break; - } - + speaker_color = GetSpeakerColor(name, speaker); char* text = GetString( strref_table[stridx], IE_STR_SOUND|IE_STR_SPEECH ); int newlen = (int)(strlen( DisplayFormatName ) + strlen( name ) + + strlen( text ) + 18); char* newstr = ( char* ) malloc( newlen ); - sprintf( newstr, DisplayFormatName, speaker_color, name, color, + snprintf( newstr, newlen, DisplayFormatName, speaker_color, name, color, text ); FreeString( text ); DisplayString( newstr ); @@ -4194,6 +4232,10 @@ const char *name2; if (stridx<0) return; + + GetSpeakerColor(name2, target); + attacker_color = GetSpeakerColor(name1, attacker); +/* switch (attacker->Type) { case ST_ACTOR: name1 = ((Actor *) attacker)->GetName(-1); @@ -4213,12 +4255,12 @@ name2 = ""; break; } - +*/ char* text = GetString( strref_table[stridx], IE_STR_SOUND|IE_STR_SPEECH ); int newlen = (int)(strlen( DisplayFormatAction ) + strlen( name1 ) + + strlen( name2 ) + strlen( text ) + 18); char* newstr = ( char* ) malloc( newlen ); - sprintf( newstr, DisplayFormatAction, attacker_color, name1, color, + snprintf( newstr, newlen, DisplayFormatAction, attacker_color, name1, color, text, name2); FreeString( text ); DisplayString( newstr ); @@ -4251,8 +4293,7 @@ int newlen = (int)(strlen( DisplayFormatName ) + strlen( name ) + + strlen( text ) + 10); char* newstr = ( char* ) malloc( newlen ); - sprintf( newstr, DisplayFormatName, speaker_color, name, color, - text ); + snprintf( newstr, newlen, DisplayFormatName, speaker_color, name, color, text ); FreeString( text ); DisplayString( newstr ); free( newstr ); Modified: gemrb/trunk/gemrb/plugins/Core/Interface.h =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Interface.h 2008-10-26 21:11:36 UTC (rev 5473) +++ gemrb/trunk/gemrb/plugins/Core/Interface.h 2008-10-26 22:16:25 UTC (rev 5474) @@ -395,10 +395,14 @@ TextArea *GetMessageTextArea() const; /** returns a string reference from a string reference index constant*/ ieStrRef GetStringReference(int stridx) const; + /** returns the speaker's color and name */ + unsigned int GetSpeakerColor(const char *&name, Scriptable *&speaker) const; /** displays any string in the textarea */ void DisplayString(const char *txt) const; /** displays a string constant in the textarea */ void DisplayConstantString(int stridx, unsigned int color) const; + /** displays actor name - action : parameter */ + void DisplayConstantStringNameString(int stridx, unsigned int color, int stridx2, Scriptable *actor) const; /** displays a string constant followed by a number in the textarea */ void DisplayConstantStringValue(int stridx, unsigned int color, ieDword value) const; /** displays a string constant in the textarea, starting with speaker's name */ Modified: gemrb/trunk/gemrb/plugins/IWDOpcodes/IWDOpc.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/IWDOpcodes/IWDOpc.cpp 2008-10-26 21:11:36 UTC (rev 5473) +++ gemrb/trunk/gemrb/plugins/IWDOpcodes/IWDOpc.cpp 2008-10-26 22:16:25 UTC (rev 5474) @@ -22,6 +22,7 @@ #include "../../includes/win32def.h" #include "../../includes/overlays.h" #include "../../includes/opcode_params.h" +#include "../../includes/ie_feats.h" //cannot avoid declaring these #include "../Core/Actor.h" #include "../Core/EffectQueue.h" #include "../Core/Interface.h" @@ -2397,6 +2398,10 @@ } //417 AreaEffect +//move these flags to a header file if used by elsewhere +#define AE_REPEAT 1 +#define AE_TARGETEXCL 2 + int fx_area_effect (Actor* Owner, Actor* target, Effect* fx) { if (0) printf( "fx_area_effect (%2d) Type: %d\n", fx->Opcode, fx->Parameter2); @@ -2410,11 +2415,12 @@ EffectQueue *fxqueue = spell->GetEffectBlock(0); fxqueue->SetOwner(Owner); - fxqueue->AffectAllInRange(target->GetCurrentArea(), pos, 0, 0,fx->Parameter1, target); - + //bit 2 original target is excluded or not excluded + fxqueue->AffectAllInRange(target->GetCurrentArea(), pos, 0, 0,fx->Parameter1, fx->Parameter2&AE_TARGETEXCL?target:NULL); delete fxqueue; - if (fx->Parameter2&1) { + //bit 1 repeat or only once + if (fx->Parameter2&AE_REPEAT) { return FX_APPLIED; } return FX_NOT_APPLIED; @@ -2978,38 +2984,94 @@ } //453 PowerAttack +static EffectRef fx_expertise_ref={"Expertise",NULL,-1}; + int fx_power_attack (Actor* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_power_attack (%2d)\n", fx->Opcode); - if (target->SetSpellState( SS_POWERATTACK)) return FX_APPLIED; - //TODO: + + if (fx->FirstApply) { + if (target->HasSpellState(SS_EXPERTISE)) { + //stopped using feat: Expertise + target->fxqueue.RemoveAllEffects(fx_expertise_ref); + } + } + unsigned int x; + x = target->GetFeat(FEAT_POWER_ATTACK); + if (x>5) x=5; + for(unsigned int i = 0;i<5;i++) { + if (i<x) { + target->SetSpellState( SS_POWERATTACK); + } else { + //FIXME: doubt we need UnSetSpellState + //target->UnSetSpellState(SS_POWERATTACK+x); + } + } return FX_APPLIED; } //454 Expertise +static EffectRef fx_powerattack_ref={"PowerAttack",NULL,-1}; + int fx_expertise (Actor* /*Owner*/, Actor* target, Effect* fx) { +//expertise feat: +//convert positive base attack bonus into AC (dodge bonus) +//up to feat_expertise count (player's choice) if (0) printf( "fx_expertise (%2d)\n", fx->Opcode); - if (target->SetSpellState( SS_EXPERTISE)) return FX_APPLIED; - //TODO: + if (fx->FirstApply) { + if (target->HasSpellState(SS_POWERATTACK)) { + target->fxqueue.RemoveAllEffects(fx_powerattack_ref); + } + } + unsigned int x; + + x = target->GetFeat(FEAT_EXPERTISE); + if (x>5) x=5; + for(unsigned int i = 0;i<5;i++) { + if (i<x) { + target->SetSpellState(SS_EXPERTISE+x); + } else { + //FIXME: doubt we need UnSetSpellState + //target->UnSetSpellState(SS_EXPERTISE+x); + } + } return FX_APPLIED; } //455 ArterialStrike +static EffectRef fx_hamstring_ref={"HamString",NULL,-1}; + int fx_arterial_strike (Actor* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_arterial_strike (%2d)\n", fx->Opcode); - if (target->SetSpellState( SS_ARTERIAL)) return FX_APPLIED; - //TODO: + if (fx->FirstApply) { + if (target->HasSpellState(SS_HAMSTRING)) { + target->fxqueue.RemoveAllEffects(fx_hamstring_ref); + } + } + if (target->SetSpellState( SS_ARTERIAL)) { + //TODO:display using feat arterial strike + return FX_APPLIED; + } return FX_APPLIED; } //456 HamString +static EffectRef fx_arterialstrike_ref={"ArterialStrike",NULL,-1}; + int fx_hamstring (Actor* /*Owner*/, Actor* target, Effect* fx) { if (0) printf( "fx_hamstring (%2d)\n", fx->Opcode); - if (target->SetSpellState( SS_HAMSTRING)) return FX_APPLIED; - //TODO: + if (fx->FirstApply) { + if (target->HasSpellState(SS_ARTERIAL)) { + target->fxqueue.RemoveAllEffects(fx_arterialstrike_ref); + } + } + if (target->SetSpellState( SS_HAMSTRING)) { + //TODO:display using feat hamstring + return FX_APPLIED; + } return FX_APPLIED; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-26 21:11:41
|
Revision: 5473 http://gemrb.svn.sourceforge.net/gemrb/?rev=5473&view=rev Author: avenger_teambg Date: 2008-10-26 21:11:36 +0000 (Sun, 26 Oct 2008) Log Message: ----------- implemented flashing of feetcircle when mouse is over an actor Modified Paths: -------------- gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp Modified: gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp 2008-10-26 21:01:52 UTC (rev 5472) +++ gemrb/trunk/gemrb/plugins/Core/ActorBlock.cpp 2008-10-26 21:11:36 UTC (rev 5473) @@ -702,20 +702,23 @@ BBox = newBBox; } +static const unsigned long tp_steps[8]={3,2,1,0,1,2,3,4}; + void Selectable::DrawCircle(Region &vp) { - /* TODO: BG2 colours ground circles as follows: - dark green for unselected party members - bright green for selected party members - flashing green/white for a party member the mouse is over - bright red for enemies - flashing red/white for enemies the mouse is over - flashing cyan/white for neutrals the mouse is over + /* BG2 colours ground circles as follows: + dark green for unselected party members + bright green for selected party members + flashing green/white for a party member the mouse is over + bright red for enemies + flashing red/white for enemies the mouse is over + flashing cyan/white for neutrals the mouse is over */ if (size<=0) { return; } + Color mix; Color* col = NULL; Sprite2D* sprite = circleBitmap[0]; @@ -723,7 +726,16 @@ col = &selectedColor; sprite = circleBitmap[1]; } else if (Over) { - col = &overColor; + //doing a time dependent flashing of colors + //if it is too fast, increase the 6 to 7 + unsigned long step; + GetTime( step ); + step = tp_steps [(step >> 6) & 7]; + mix.a=overColor.a; + mix.r=(overColor.r*step+selectedColor.r*(8-step))/8; + mix.g=(overColor.g*step+selectedColor.g*(8-step))/8; + mix.b=(overColor.b*step+selectedColor.b*(8-step))/8; + col = &mix; } else { return; } @@ -1126,8 +1138,6 @@ //don't call ReleaseCurrentAction } -static const unsigned long tp_steps[8]={3,2,1,0,1,2,3,4}; - void Movable::DrawTargetPoint(Region &vp) { if (!path || !Selected || (InternalFlags&IF_NORECTICLE) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-26 21:01:56
|
Revision: 5472 http://gemrb.svn.sourceforge.net/gemrb/?rev=5472&view=rev Author: avenger_teambg Date: 2008-10-26 21:01:52 +0000 (Sun, 26 Oct 2008) Log Message: ----------- fixed typo in SetCreatureAreaFlag(s) Modified Paths: -------------- gemrb/trunk/gemrb/plugins/Core/Actions.cpp gemrb/trunk/gemrb/plugins/Core/GameScript.cpp gemrb/trunk/gemrb/plugins/Core/GameScript.h Modified: gemrb/trunk/gemrb/plugins/Core/Actions.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Actions.cpp 2008-10-26 20:59:40 UTC (rev 5471) +++ gemrb/trunk/gemrb/plugins/Core/Actions.cpp 2008-10-26 21:01:52 UTC (rev 5472) @@ -3253,7 +3253,7 @@ } /*iwd2 sets the high MC bits this way*/ -void GameScript::SetCreatureAreaFlags(Scriptable* Sender, Action* parameters) +void GameScript::SetCreatureAreaFlag(Scriptable* Sender, Action* parameters) { if (Sender->Type != ST_ACTOR) { return; Modified: gemrb/trunk/gemrb/plugins/Core/GameScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/GameScript.cpp 2008-10-26 20:59:40 UTC (rev 5471) +++ gemrb/trunk/gemrb/plugins/Core/GameScript.cpp 2008-10-26 21:01:52 UTC (rev 5472) @@ -745,7 +745,7 @@ {"setbeeninpartyflags", GameScript::SetBeenInPartyFlags, 0}, {"setbestweapon", GameScript::SetBestWeapon, 0}, {"setcorpseenabled", GameScript::AmbientActivate, 0},//another weird name - {"setcreatureareaflags", GameScript::SetCreatureAreaFlags, 0}, + {"setcreatureareaflag", GameScript::SetCreatureAreaFlag, 0}, {"setcriticalpathobject", GameScript::SetCriticalPathObject, 0}, {"setdialog", GameScript::SetDialogue,0}, {"setdialogrange", GameScript::SetDialogueRange, 0}, Modified: gemrb/trunk/gemrb/plugins/Core/GameScript.h =================================================================== --- gemrb/trunk/gemrb/plugins/Core/GameScript.h 2008-10-26 20:59:40 UTC (rev 5471) +++ gemrb/trunk/gemrb/plugins/Core/GameScript.h 2008-10-26 21:01:52 UTC (rev 5472) @@ -1289,7 +1289,7 @@ static void SetArmourLevel(Scriptable* Sender, Action* parameters); static void SetBeenInPartyFlags(Scriptable* Sender, Action* parameters); static void SetBestWeapon(Scriptable *Sender, Action *parameters); - static void SetCreatureAreaFlags(Scriptable* Sender, Action* parameters); + static void SetCreatureAreaFlag(Scriptable* Sender, Action* parameters); static void SetCriticalPathObject(Scriptable* Sender, Action* parameters); static void SetDialogue(Scriptable* Sender, Action* parameters); static void SetDialogueRange(Scriptable* Sender, Action* parameters); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-26 20:59:50
|
Revision: 5471 http://gemrb.svn.sourceforge.net/gemrb/?rev=5471&view=rev Author: avenger_teambg Date: 2008-10-26 20:59:40 +0000 (Sun, 26 Oct 2008) Log Message: ----------- dltcep update (allow editing of iwd2 creature spells, levels) Modified Paths: -------------- chitem/trunk/2da.cpp chitem/trunk/2da.h chitem/trunk/Chitem.cpp chitem/trunk/Chitem.h chitem/trunk/CreatureProperties.cpp chitem/trunk/CreatureProperties.h chitem/trunk/chitem.clw chitem/trunk/chitem.dsp chitem/trunk/chitem.rc chitem/trunk/chitemDlg.cpp chitem/trunk/creature.cpp chitem/trunk/creature.h chitem/trunk/resource.h Added Paths: ----------- chitem/trunk/CreatureLevels.cpp chitem/trunk/CreatureLevels.h Modified: chitem/trunk/2da.cpp =================================================================== --- chitem/trunk/2da.cpp 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/2da.cpp 2008-10-26 20:59:40 UTC (rev 5471) @@ -563,6 +563,64 @@ return Read2daIntFromFile(fhandle, refs, entry.size); } +int Read2daResRefFromFile(int fhandle, CIntMapString &refs, int length, int column) +{ + char tmpref[MAXIDSIZE]; + CString ref; + FILE *fpoi; + int ret, val; + + if(length<0) maxlength=filelength(fhandle); + else maxlength=length; + fpoi=fdopen(fhandle,"rb"); + if(!fpoi) + { + close(fhandle); + return -1; + } + read_string(fpoi, "\n"); //skipping crap + read_string(fpoi, "\n"); //skipping crap + read_string(fpoi, "\n"); //skipping crap + do + { + if(read_string(fpoi, " ",tmpref,sizeof(tmpref)) ) + { + tmpref[MAXIDSIZE-1]=0; + val=atoi(tmpref); + int c = column; + while(c--) + { + if(!read_string(fpoi, " ",tmpref,sizeof(tmpref))) + { + fclose(fpoi); + return -1; + } + } + ret=read_string(fpoi,"\n", tmpref,sizeof(tmpref)); + if(!ret) break; + tmpref[MAXIDSIZE-1]=0; + ref=tmpref; + ref.MakeUpper(); + refs[val]=ref; + } + else break; + } + while(1); + fclose(fpoi); + return 0; +} + +int Read2daResRef(loc_entry entry, CIntMapString &refs, int removeall, int skipcolumn) +{ + int fhandle; + + if(removeall) refs.RemoveAll(); + xorflag=position=0; + fhandle=locate_file(entry, 0); + if(fhandle<1) return -1; + return Read2daResRefFromFile(fhandle, refs, entry.size, skipcolumn); +} + int Read2daField(CString daname, int line, int column) { char tmpref[MAXIDSIZE]; Modified: chitem/trunk/2da.h =================================================================== --- chitem/trunk/2da.h 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/2da.h 2008-10-26 20:59:40 UTC (rev 5471) @@ -185,6 +185,7 @@ int Read2daStrref(loc_entry entry, CIntMapInt &refs, int column); int Read2daArray(loc_entry entry, CStringMapArray &refs, int columns); //maximum 3 int Read2daInt(loc_entry entry, CStringMapInt &refs, int removeall); +int Read2daResRef(loc_entry entry, CIntMapString &refs, int removeall, int skipcolumn=0); int Read2daField(CString daname, int line, int column); int Read2daColumn(loc_entry entry, CStringList &refs, int column, bool caps); int ReadIds(loc_entry entry, CStringList &refs, int add); Modified: chitem/trunk/Chitem.cpp =================================================================== --- chitem/trunk/Chitem.cpp 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/Chitem.cpp 2008-10-26 20:59:40 UTC (rev 5471) @@ -188,6 +188,11 @@ CString action_defs[MAX_ACTION]; CString trigger_defs[MAX_TRIGGER]; CStringMapCStringMapInt idsmaps; //this is a cstring map to a cstringmapint +CIntMapString listspells; //iwd2 spell list (number to resref mapping) +CIntMapString listdomains; //iwd2 domain spell list (number to resref mapping) +CIntMapString listinnates; //iwd2 innate list (number to resref mapping) +CIntMapString listsongs; //iwd2 song list (number to resref mapping) +CIntMapString listshapes; //iwd2 wildshape list (number to resref mapping) CColorPicker colordlg; CItemPicker pickerdlg; Modified: chitem/trunk/Chitem.h =================================================================== --- chitem/trunk/Chitem.h 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/Chitem.h 2008-10-26 20:59:40 UTC (rev 5471) @@ -743,6 +743,11 @@ extern int has_duration[]; extern CStringMapGameProps allgameprops; extern CStringMapCStringMapInt idsmaps; +extern CIntMapString listspells; +extern CIntMapString listdomains; +extern CIntMapString listinnates; +extern CIntMapString listsongs; +extern CIntMapString listshapes; //area animation flags #define AA_MIRROR 2048 Added: chitem/trunk/CreatureLevels.cpp =================================================================== --- chitem/trunk/CreatureLevels.cpp (rev 0) +++ chitem/trunk/CreatureLevels.cpp 2008-10-26 20:59:40 UTC (rev 5471) @@ -0,0 +1,87 @@ +// CreatureLevels.cpp : implementation file +// + +#include "stdafx.h" +#include "chitem.h" +#include "CreatureLevels.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCreatureLevels dialog + + +CCreatureLevels::CCreatureLevels(CWnd* pParent /*=NULL*/) + : CDialog(CCreatureLevels::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCreatureLevels) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + + +void CCreatureLevels::DoDataExchange(CDataExchange* pDX) +{ + int i; + + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCreatureLevels) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP + + DDX_Text(pDX, IDC_U1, the_creature.iwd2header.totlevel); + + for(i=0;i<11;i++) + { + DDX_Text(pDX, IDC_U2+i, the_creature.iwd2header.levels[i]); + } +} + + +BEGIN_MESSAGE_MAP(CCreatureLevels, CDialog) + //{{AFX_MSG_MAP(CCreatureLevels) + ON_EN_KILLFOCUS(IDC_U1, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U2, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U3, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U4, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U5, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U6, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U7, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U8, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U9, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U10, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U11, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_U12, OnDefaultKillfocus) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCreatureLevels message handlers + +BOOL CCreatureLevels::OnInitDialog() +{ + CDialog::OnInitDialog(); + + GetDlgItem(IDC_U1)->EnableWindow(0); + + UpdateData(UD_DISPLAY); + return TRUE; +} + +void CCreatureLevels::OnDefaultKillfocus() +{ + int i, sum; + + UpdateData(UD_RETRIEVE); + sum=0; + for(i=0;i<11;i++) + { + sum+=the_creature.iwd2header.levels[i]; + } + the_creature.iwd2header.totlevel=(unsigned char) sum; + UpdateData(UD_DISPLAY); +} Added: chitem/trunk/CreatureLevels.h =================================================================== --- chitem/trunk/CreatureLevels.h (rev 0) +++ chitem/trunk/CreatureLevels.h 2008-10-26 20:59:40 UTC (rev 5471) @@ -0,0 +1,47 @@ +#if !defined(AFX_CREATURELEVELS_H__A9D27295_914D_4D8D_B376_6176E32F6382__INCLUDED_) +#define AFX_CREATURELEVELS_H__A9D27295_914D_4D8D_B376_6176E32F6382__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// CreatureLevels.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCreatureLevels dialog + +class CCreatureLevels : public CDialog +{ +// Construction +public: + CCreatureLevels(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCreatureLevels) + enum { IDD = IDD_CREATURELEVELS }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCreatureLevels) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCreatureLevels) + virtual BOOL OnInitDialog(); + afx_msg void OnDefaultKillfocus(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CREATURELEVELS_H__A9D27295_914D_4D8D_B376_6176E32F6382__INCLUDED_) Modified: chitem/trunk/CreatureProperties.cpp =================================================================== --- chitem/trunk/CreatureProperties.cpp 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/CreatureProperties.cpp 2008-10-26 20:59:40 UTC (rev 5471) @@ -10,6 +10,7 @@ #include "TormentCre.h" #include "IcewindCre.h" #include "IWD2Creature.h" +#include "CreatureLevels.h" #include "2da.h" #include "tbg.h" #include "options.h" @@ -69,6 +70,7 @@ CString tmpstr; creature_header tmpheader; int value; + int i, flg; memcpy(&tmpheader,&the_creature.header,sizeof(creature_header) ); CPropertyPage::DoDataExchange(pDX); @@ -218,6 +220,14 @@ tmpstr=FindKit(the_creature.header.kit); DDX_Text(pDX,IDC_KIT,tmpstr); the_creature.header.kit=strtonum(tmpstr); + + flg =(the_creature.revision==22); + for(i=0;i<3;i++) + { + GetDlgItem(IDC_LEVEL1+i)->ShowWindow(!flg); + } + GetDlgItem(IDC_LEVELSLOT)->ShowWindow(flg); + if(memcmp(&tmpheader,&the_creature.header,sizeof(creature_header) )) { the_creature.m_changed=true; @@ -351,6 +361,7 @@ ON_BN_CLICKED(IDC_NEW1, OnNew1) ON_BN_CLICKED(IDC_NEW2, OnNew2) ON_CBN_KILLFOCUS(IDC_KIT, OnKillfocusKit) + ON_BN_CLICKED(IDC_LEVELSLOT, OnLevelslot) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -607,23 +618,35 @@ void CCreatureGeneral::OnV10() { the_creature.revision=10; + UpdateData(UD_DISPLAY); } void CCreatureGeneral::OnV22() { the_creature.revision=22; + UpdateData(UD_DISPLAY); } void CCreatureGeneral::OnV90() { the_creature.revision=90; + UpdateData(UD_DISPLAY); } void CCreatureGeneral::OnV12() { the_creature.revision=12; + UpdateData(UD_DISPLAY); } +//iwd2 levels +void CCreatureGeneral::OnLevelslot() +{ + CCreatureLevels dlg; + + dlg.DoModal(); +} + BOOL CCreatureGeneral::PreTranslateMessage(MSG* pMsg) { m_tooltip.RelayEvent(pMsg); @@ -2382,7 +2405,7 @@ static int flagboxids[]={IDC_IDENTIFIED, IDC_NOSTEAL, IDC_STOLEN, IDC_UNDROPPABLE, 0}; -static int spellboxids[]={IDC_SPELLPICKER, IDC_MEMORISED, IDC_FORGET, +static int spellboxids[]={IDC_SPELLPICKER, IDC_MEMORISED, IDC_FORGET, IDC_MEMORISED2, IDC_TOTAL, 0}; static int levelboxids[]={ @@ -2390,6 +2413,16 @@ IDC_MEMORISE, IDC_SPELLRES, IDC_BROWSE2, 0}; +static int noiwd2levelboxids[]={ + IDC_BOOKPICKER, IDC_BROWSE3, IDC_ADD, IDC_REMOVE, IDC_SPELLRES2, IDC_SPELLTYPE2, IDC_LEVEL2, + IDC_STATIC4, IDC_STATIC5, IDC_STATIC6, IDC_BOOK, IDC_BOOK2, + IDC_LEVEL, IDC_SPELLTYPE, IDC_DELSLOT,IDC_ADDSLOT, IDC_MEMORISED, IDC_STATIC1, +0}; + +static int nobg2levelboxids[]={ + IDC_MEMORISED2, IDC_TOTAL, IDC_STATIC2, IDC_STATIC3, +0}; + static int bookboxids[]={IDC_LEVEL2, IDC_SPELLTYPE2, IDC_REMOVE, IDC_BOOK2, IDC_BOOKPICKER, 0}; @@ -2409,6 +2442,42 @@ return pos; } +CIntMapString *CCreatureItem::GetIWD2SpellList(int pos) +{ + if(pos<9*7) return &listspells; + if(pos<9*8) return &listdomains; + if(pos==9*8) return &listinnates; + if(pos==9*8+1) return &listshapes; + if(pos==9*8+2) return &listsongs; + abort(); +} + +CString CCreatureItem::ResolveIWD2SpellResRef(int spid, int type) +{ + CIntMapString *list = GetIWD2SpellList(type); + if (!list) return ""; + return (*list)[spid]; +} + +int CCreatureItem::ResolveIWD2SpellID(CString resref, int type) +{ + POSITION pos; + + CIntMapString *list = GetIWD2SpellList(type); + if (!list) return -1; + + pos=list->GetStartPosition(); + while(pos) + { + CString resource; + int key; + + list->GetNextAssoc(pos, key, resource); + if(!resource.CompareNoCase(resref)) return key; + } + return -1; +} + CString CCreatureItem::ResolveSpellName(CString key) { Cspell tmpspell; @@ -2511,68 +2580,92 @@ //spells section pos=m_levelpicker.GetCurSel(); - flg=(pos>=0) && (pos<the_creature.selectcount); + if(the_creature.revision==22) + { + flg=(pos>=0) && (pos<IWD2_SPELLCOUNT); + } + else + { + flg=(pos>=0) && (pos<the_creature.selectcount); + } if(flg) { - DDX_Text(pDX,IDC_MIN, the_creature.selects[pos].num1); - DDX_Text(pDX,IDC_MAX, the_creature.selects[pos].num2); - j=the_creature.selects[pos].spelltype; - DDX_CBIndex(pDX, IDC_SPELLTYPE, j); - the_creature.selects[pos].spelltype=(short) j; - j=the_creature.selects[pos].level+1; - DDX_Text(pDX, IDC_LEVEL,j); - //range checks - /* - if(iwd2_structures()) + if(the_creature.revision==22) { - DDV_MinMaxInt(pDX,j,1,9); + //DDX_Text(pDX,IDC_MIN, the_creature.iwd2_counts[pos]); + DDX_Text(pDX,IDC_MIN, the_creature.iwd2_free[pos].free); + DDX_Text(pDX,IDC_MAX, the_creature.iwd2_free[pos].maximum); + j=pos; + DDX_CBIndex(pDX, IDC_SPELLTYPE, j); + if(pos<8*9) j=pos%9+1; + else j=1; + DDX_Text(pDX, IDC_LEVEL,j); } else { - switch(the_creature.selects[pos].spelltype) - { - case 0: - DDV_MinMaxInt(pDX,j,1,7); - break; - case 1: - DDV_MinMaxInt(pDX,j,1,9); - break; - default: - DDV_MinMaxInt(pDX,j,1,1); - } + DDX_Text(pDX,IDC_MIN, the_creature.selects[pos].num1); + DDX_Text(pDX,IDC_MAX, the_creature.selects[pos].num2); + j=the_creature.selects[pos].spelltype; + DDX_CBIndex(pDX, IDC_SPELLTYPE, j); + the_creature.selects[pos].spelltype=(short) j; + j=the_creature.selects[pos].level+1; + DDX_Text(pDX, IDC_LEVEL,j); + DDV_MinMaxInt(pDX,j,1,9); //simplified range check + the_creature.selects[pos].level=(short) (j-1); } - */ - DDV_MinMaxInt(pDX,j,1,9); //simplified range check - the_creature.selects[pos].level=(short) (j-1); pos2=m_spellpicker.GetCurSel(); - flg2=(pos2>=0) && (pos2<the_creature.selects[pos].count); - if(flg2) + if(the_creature.revision==22) { -/* - m_spellslot=pos2+the_creature.selects[pos].index; - RetrieveResref(tmpstr,the_creature.memos[m_spellslot].resref); - DDX_Text(pDX, IDC_SPELLRES,tmpstr); - DDV_MaxChars(pDX, tmpstr, 8); - StoreResref(tmpstr,the_creature.memos[m_spellslot].resref); -*/ - - tmpstr=ResolveSpellName(m_spellres); - DDX_Text(pDX, IDC_SPELLNAME, tmpstr); - + flg2=(pos2>=0) && (pos2<the_creature.iwd2_counts[pos]); + if(flg2) + { + tmpstr=ResolveSpellName(m_spellres); + DDX_Text(pDX, IDC_SPELLNAME, tmpstr); + DDX_Text(pDX, IDC_TOTAL, the_creature.iwd2_spells[pos][pos2].total); + DDX_Text(pDX, IDC_MEMORISED2, the_creature.iwd2_spells[pos][pos2].remaining); + } + } + else + { cb=(CButton *) GetDlgItem(IDC_MEMORISED); - cb->SetCheck(!!the_creature.memos[m_spellslot].flags); - } + flg2=(pos2>=0) && (pos2<the_creature.selects[pos].count); + if(flg2) + { + tmpstr=ResolveSpellName(m_spellres); + DDX_Text(pDX, IDC_SPELLNAME, tmpstr); + + cb->SetCheck(!!the_creature.memos[m_spellslot].flags); + } + } } else flg2=0; for(i=0;levelboxids[i];i++) { GetDlgItem(levelboxids[i])->EnableWindow(flg); } + for(i=0;spellboxids[i];i++) { GetDlgItem(spellboxids[i])->EnableWindow(flg2); } + + if(the_creature.revision==22) + { + for(i=0;noiwd2levelboxids[i];i++) + { + GetDlgItem(noiwd2levelboxids[i])->ShowWindow(0); + } + GetDlgItem(IDC_MIN)->EnableWindow(0); + } + else + { + for(i=0;i<nobg2levelboxids[i];i++) + { + GetDlgItem(nobg2levelboxids[i])->ShowWindow(0); + } + } + //books pos=m_bookpicker.GetCurSel(); flg=(pos>=0) && (pos<the_creature.bookcount); @@ -2694,13 +2787,27 @@ pos=m_levelpicker.GetCurSel(); if(pos<0) pos=0; m_levelpicker.ResetContent(); - m_maxslot.Format("/ %d", the_creature.selectcount); - for(i=0;i<the_creature.selectcount;i++) + if(the_creature.revision==22) { - idx=the_creature.selects[i].level; - tmpstr.Format("%d %s level %d (%d)",i+1, format_spellslot(the_creature.selects[i].spelltype),idx+1, the_creature.selects[i].count ); - m_levelpicker.AddString(tmpstr); + m_maxslot.Format("/ %d", IWD2_SPELLCOUNT); + for(i=0;i<IWD2_SPELLCOUNT;i++) + { + if(i<8*9) idx=i%9; + else idx=0; + tmpstr.Format("%d %s level %d (%d)",i+1, format_spellslot(i),idx+1, the_creature.iwd2_counts[i] ); + m_levelpicker.AddString(tmpstr); + } } + else + { + m_maxslot.Format("/ %d", the_creature.selectcount); + for(i=0;i<the_creature.selectcount;i++) + { + idx=the_creature.selects[i].level; + tmpstr.Format("%d %s level %d (%d)",i+1, format_spellslot(the_creature.selects[i].spelltype),idx+1, the_creature.selects[i].count ); + m_levelpicker.AddString(tmpstr); + } + } if(pos>=i) pos=i-1; pos=m_levelpicker.SetCurSel(pos); if(pos>=0) //got a valid level @@ -2716,27 +2823,54 @@ int pos2; int idx; int i; + unsigned int spid; if(pos<0) return; pos2=m_spellpicker.GetCurSel(); if(pos2<0) pos2=0; m_spellpicker.ResetContent(); - idx=the_creature.selects[pos].index; - m_maxspell.Format("/ %d", the_creature.selects[pos].count); - for(i=0;i<the_creature.selects[pos].count;i++) + if(the_creature.revision==22) { - RetrieveResref(tmp,the_creature.memos[idx+i].resref); - tmptext=ResolveSpellName(tmp); - tmpstr.Format("%d %s %s",i+1, tmp, tmptext); - m_spellpicker.AddString(tmpstr); + for(i=0;i<the_creature.iwd2_counts[pos];i++) + { + spid = the_creature.iwd2_spells[pos][i].type; + tmp = ResolveIWD2SpellResRef(spid, pos); + tmptext=ResolveSpellName(tmp); + tmpstr.Format("%d %s %s",i+1, tmp, tmptext); + m_spellpicker.AddString(tmpstr); + } } + else + { + idx=the_creature.selects[pos].index; + for(i=0;i<the_creature.selects[pos].count;i++) + { + RetrieveResref(tmp,the_creature.memos[idx+i].resref); + tmptext=ResolveSpellName(tmp); + tmpstr.Format("%d %s %s",i+1, tmp, tmptext); + m_spellpicker.AddString(tmpstr); + } + } + m_maxspell.Format("/ %d", i); if(pos2>=i) pos2=i-1; pos2=m_spellpicker.SetCurSel(pos2); if(pos2<0) m_spellslot=-1; - else m_spellslot=pos2+the_creature.selects[pos].index; + else + { + if(the_creature.revision==22) m_spellslot=pos2; + else m_spellslot=pos2+the_creature.selects[pos].index; + } if(m_spellslot>=0) { - RetrieveResref(m_spellres,the_creature.memos[m_spellslot].resref); + if(the_creature.revision==22) + { + spid = the_creature.iwd2_spells[pos][m_spellslot].type; + m_spellres = ResolveIWD2SpellResRef(spid, pos); + } + else + { + RetrieveResref(m_spellres,the_creature.memos[m_spellslot].resref); + } } else m_spellres=""; } @@ -2810,7 +2944,6 @@ ON_EN_KILLFOCUS(IDC_LEVEL, OnKillfocusLevel) ON_EN_KILLFOCUS(IDC_MIN, OnKillfocusMin) ON_EN_KILLFOCUS(IDC_MAX, OnKillfocusMax) - ON_EN_KILLFOCUS(IDC_SPELLRES, OnKillfocusSpellres) ON_BN_CLICKED(IDC_ADD, OnAdd) ON_BN_CLICKED(IDC_BROWSE2, OnBrowse2) ON_CBN_KILLFOCUS(IDC_SPELLPICKER, OnKillfocusSpellpicker) @@ -2833,6 +2966,10 @@ ON_CBN_KILLFOCUS(IDC_SELECTED, OnKillfocusSelected) ON_BN_CLICKED(IDC_UNDROPPABLE, OnUndroppable) ON_BN_CLICKED(IDC_CLEARALL, OnClearall) + ON_BN_CLICKED(IDC_MEMORISED, OnMemorised) + ON_EN_KILLFOCUS(IDC_SPELLRES, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_TOTAL, OnDefaultKillfocus) + ON_EN_KILLFOCUS(IDC_MEMORISED2, OnDefaultKillfocus) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -3020,12 +3157,19 @@ { int i; + the_creature.KillIwd2Spells(); the_creature.KillBooks(); the_creature.KillMemos(); the_creature.KillSelects(); the_creature.header.bookcnt=0; the_creature.header.memcnt=0; the_creature.header.selectcnt=0; + for(i=0;i<IWD2_SPELLCOUNT;i++) + { + the_creature.iwd2_free[i].free=0; + the_creature.iwd2_free[i].maximum=0; + } + the_creature.selects=new creature_select[BG2_SELECTCOUNT]; if(!the_creature.selects) return; the_creature.selectcount=the_creature.header.selectcnt=BG2_SELECTCOUNT; @@ -3161,40 +3305,66 @@ return ret; } +int CCreatureItem::CalculateIWD2Slots() +{ + int i, pos; + long sum; + + for(pos = 0; pos<8*9+3; pos++) + { + sum = 0; + for(i=0;i<the_creature.iwd2_counts[pos];i++) + { + sum+=the_creature.iwd2_spells[pos][i].total; + } + //this line is not correct, we need the possible maximum number, not the actual + the_creature.iwd2_free[pos].maximum=sum; + the_creature.iwd2_free[pos].free=the_creature.iwd2_free[pos].maximum-sum; + } + return 0; +} + void CCreatureItem::OnClass() { int flg; - switch(the_creature.header.idsclass) + if(the_creature.revision==22) { - case MAGE_THIEF: - case CLASS_MAGE: flg=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[0]); break; - case CLERIC_THIEF: - case CLASS_CLERIC: flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[0]); break; - case CLASS_BARD: flg=SetMemoryByClass("MXSPLBRD",1,the_creature.header.levels[0]); break; - case CLASS_PALADIN: flg=SetMemoryByClass("MXSPLPAL",0,the_creature.header.levels[0]); break; - case CLASS_DRUID: flg=SetMemoryByClass("MXSPLDRU",0,the_creature.header.levels[0]); break; - case CLASS_RANGER: flg=SetMemoryByClass("MXSPLRAN",0,the_creature.header.levels[0]); break; - case CLASS_SORCEROR: flg=SetMemoryByClass("SPLSRCKN",1,the_creature.header.levels[0]); break; - case FIGHTER_MAGE: flg=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[1]); break; - case FIGHTER_CLERIC: flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[1]); break; - case CLERIC_MAGE: - flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[0]); - flg|=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[1]); - break; - case CLERIC_RANGER: - flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[0]); - flg|=SetMemoryByClass("MXSPLRAN",0,the_creature.header.levels[1]); - break; - case FIGHTER_DRUID: flg=SetMemoryByClass("MXSPLDRU",0,the_creature.header.levels[1]); break; - case FIGHTER_MAGE_CLERIC: - flg=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[1]); - flg|=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[2]); - break; - default: - MessageBox("Not spellcaster player class.","Creature editor",MB_OK); - return; + flg = CalculateIWD2Slots(); } + else + { + switch(the_creature.header.idsclass) + { + case MAGE_THIEF: + case CLASS_MAGE: flg=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[0]); break; + case CLERIC_THIEF: + case CLASS_CLERIC: flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[0]); break; + case CLASS_BARD: flg=SetMemoryByClass("MXSPLBRD",1,the_creature.header.levels[0]); break; + case CLASS_PALADIN: flg=SetMemoryByClass("MXSPLPAL",0,the_creature.header.levels[0]); break; + case CLASS_DRUID: flg=SetMemoryByClass("MXSPLDRU",0,the_creature.header.levels[0]); break; + case CLASS_RANGER: flg=SetMemoryByClass("MXSPLRAN",0,the_creature.header.levels[0]); break; + case CLASS_SORCEROR: flg=SetMemoryByClass("SPLSRCKN",1,the_creature.header.levels[0]); break; + case FIGHTER_MAGE: flg=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[1]); break; + case FIGHTER_CLERIC: flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[1]); break; + case CLERIC_MAGE: + flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[0]); + flg|=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[1]); + break; + case CLERIC_RANGER: + flg=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[0]); + flg|=SetMemoryByClass("MXSPLRAN",0,the_creature.header.levels[1]); + break; + case FIGHTER_DRUID: flg=SetMemoryByClass("MXSPLDRU",0,the_creature.header.levels[1]); break; + case FIGHTER_MAGE_CLERIC: + flg=SetMemoryByClass("MXSPLWIZ",1,the_creature.header.levels[1]); + flg|=SetMemoryByClass("MXSPLPRS",0,the_creature.header.levels[2]); + break; + default: + MessageBox("Not spellcaster player class.","Creature editor",MB_OK); + return; + } + } if(flg) { MessageBox("Failed to set spell limits.","Creature editor",MB_OK); @@ -3202,7 +3372,7 @@ UpdateData(UD_DISPLAY); } -void CCreatureItem::OnKillfocusSpellres() +void CCreatureItem::OnDefaultKillfocus() { UpdateData(UD_RETRIEVE); UpdateData(UD_DISPLAY); @@ -3288,6 +3458,15 @@ int level, type; if(m_spellres.IsEmpty()) return; + + if (the_creature.revision==22) + { + AddIWD2Spell(m_spellres); + RefreshItem(); + UpdateData(UD_DISPLAY); + return; + } + xpos=ResolveTypeAndLevel(m_spellres); if(xpos<7) { level=xpos; type=0; } else if(xpos<16) { level=xpos-7; type=1; } @@ -3311,24 +3490,94 @@ MessageBox(tmpstr,"Creature editor",MB_OK); } +void CCreatureItem::OnMemorised() +{ + CButton *cb; + + if(m_spellslot>=0) + { + cb=(CButton *) GetDlgItem(IDC_MEMORISED); + the_creature.memos[m_spellslot].flags=cb->GetCheck(); + } +} + void CCreatureItem::OnForget() { - int pos; + int i, size, pos, pos2; m_spellres.Empty(); - for(pos=0;pos<the_creature.selectcount;pos++) + if(the_creature.revision==22) { - if( (the_creature.selects[pos].index<=m_spellslot) && - the_creature.selects[pos].index+the_creature.selects[pos].count>m_spellslot) + pos = m_levelpicker.GetCurSel(); + pos2 = m_spellpicker.GetCurSel(); + if(pos2>=0) { - RemoveSpell(pos); - break; + size = --the_creature.iwd2_counts[pos]; + creature_iwd2_spell *tmpspell=new creature_iwd2_spell[size]; + for(i=0;i<pos2;i++) + { + tmpspell[i]=the_creature.iwd2_spells[pos][i]; + } + for(i=pos2+1;i<=size;i++) + { + tmpspell[i-1]=the_creature.iwd2_spells[pos][i]; + } + delete [] the_creature.iwd2_spells[pos]; + the_creature.iwd2_spells[pos]=tmpspell; } } + else + { + for(pos=0;pos<the_creature.selectcount;pos++) + { + if( (the_creature.selects[pos].index<=m_spellslot) && + the_creature.selects[pos].index+the_creature.selects[pos].count>m_spellslot) + { + RemoveSpell(pos); + break; + } + } + } RefreshItem(); UpdateData(UD_DISPLAY); } +void CCreatureItem::AddIWD2Spell(CString res) +{ + unsigned int spid; + int i, size, pos, pos2; + + pos = m_levelpicker.GetCurSel(); + pos2 = m_spellpicker.GetCurSel(); + + spid = ResolveIWD2SpellID(m_spellres, pos); + if(spid<0) + { + MessageBox("Couldn't resolve this spell name, please make sure it is on the appropriate list.","Creature editor",MB_OK|MB_ICONWARNING); + } + else + { + if(pos2<0) + { + size = the_creature.iwd2_counts[pos]++; + pos2=size; + creature_iwd2_spell *tmpspell=new creature_iwd2_spell[size+1]; + for(i=0;i<size;i++) + { + tmpspell[i]=the_creature.iwd2_spells[pos][i]; + } + + delete [] the_creature.iwd2_spells[pos]; + tmpspell[i].remaining=1; + tmpspell[i].total=1; + tmpspell[i].unknown=0; + the_creature.iwd2_spells[pos]=tmpspell; + } + + the_creature.iwd2_spells[pos][pos2].type=spid; + } +} + void CCreatureItem::OnBrowse2() { pickerdlg.m_restype=REF_SPL; @@ -3337,6 +3586,7 @@ { m_spellres=pickerdlg.m_picked; } + UpdateData(UD_DISPLAY); } Modified: chitem/trunk/CreatureProperties.h =================================================================== --- chitem/trunk/CreatureProperties.h 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/CreatureProperties.h 2008-10-26 20:59:40 UTC (rev 5471) @@ -83,6 +83,7 @@ afx_msg void OnNew1(); afx_msg void OnNew2(); afx_msg void OnKillfocusKit(); + afx_msg void OnLevelslot(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; @@ -474,11 +475,16 @@ CToolTipCtrl m_tooltip; void RefreshSpellPicker(int pos); + CIntMapString *GetIWD2SpellList(int pos); + CString ResolveIWD2SpellResRef(int spid, int pos); + int ResolveIWD2SpellID(CString resref, int pos); int ResolveTypeAndLevel(CString key); CString ResolveSpellName(CString key); int AddBook(int level, int type); + void AddIWD2Spell(CString spellres); void AddSpell(int slot, CString spellres); void RemoveSpell(int slot); + int CalculateIWD2Slots(); int SetMemoryByClass(CString daname, int type, int level); // Generated message map functions //{{AFX_MSG(CCreatureItem) @@ -501,7 +507,6 @@ afx_msg void OnKillfocusLevel(); afx_msg void OnKillfocusMin(); afx_msg void OnKillfocusMax(); - afx_msg void OnKillfocusSpellres(); afx_msg void OnAdd(); afx_msg void OnBrowse2(); afx_msg void OnKillfocusSpellpicker(); @@ -524,6 +529,8 @@ afx_msg void OnKillfocusSelected(); afx_msg void OnUndroppable(); afx_msg void OnClearall(); + afx_msg void OnMemorised(); + afx_msg void OnDefaultKillfocus(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Modified: chitem/trunk/chitem.clw =================================================================== --- chitem/trunk/chitem.clw 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/chitem.clw 2008-10-26 20:59:40 UTC (rev 5471) @@ -2,17 +2,17 @@ [General Info] Version=1 -LastClass=C2DAEdit +LastClass=CCreatureItem LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "chitem.h" -ClassCount=103 +ClassCount=104 Class1=CChitemApp Class2=CChitemDlg Class3=CAboutDlg -ResourceCount=249 +ResourceCount=250 Resource1=IDD_AREASPAWN Resource2=IDR_MAINFRAME Resource3=IDD_STOREITEMS @@ -232,136 +232,138 @@ Resource123=IDD_GAMEGENERAL Class98=IcewindCre Resource124=IDR_SHORTCUT -Resource125=IDD_BAMEDIT (English (U.S.)) -Resource126=IDD_SPELLDESC (English (U.S.)) -Resource127=IDD_AREATRIGGER (English (U.S.)) -Resource128=IDR_CHITIN (English (U.S.)) -Resource129=IDD_CREATURESTRINGS (English (U.S.)) -Resource130=IDD_IMAGEVIEW (English (U.S.)) -Resource131=IDD_CREATUREIWD (English (U.S.)) -Resource132=IDD_FINDITEM (English (U.S.)) -Resource133=IDD_AREASONGS (English (U.S.)) -Resource134=IDR_GAME (English (U.S.)) -Resource135=IDD_ITEMUSE (English (U.S.)) -Resource136=IDR_MUSIC (English (U.S.)) -Resource137=IDD_AREAENTRANCE (English (U.S.)) -Resource138=IDD_STORERENTAL (English (U.S.)) -Resource139=IDD_EXTRACT (English (U.S.)) -Resource140=IDD_WEDEDIT (English (U.S.)) -Resource141=IDD_AREAINT (English (U.S.)) -Resource142=IDD_ANIMDIALOG -Resource143=IDD_GAMEEDIT (English (U.S.)) -Resource144=IDR_SCRIPT (English (U.S.)) -Resource145=IDD_SPELLTOOL (English (U.S.)) -Resource146=IDR_TLKMENU (English (U.S.)) -Resource147=IDD_CREATURESKILLS (English (U.S.)) -Resource148=IDR_SPELL (English (U.S.)) -Resource149=IDD_SPELLEQUIP (English (U.S.)) -Resource150=IDD_AREAEDIT (English (U.S.)) -Resource151=IDD_SEARCHNODE (English (U.S.)) -Resource152=IDD_AREADOOR (English (U.S.)) -Resource153=IDD_CREATURERES (English (U.S.)) -Resource154=IDD_MASSCLEAR (English (U.S.)) -Resource155=IDD_ITEMGENERAL (English (U.S.)) -Resource156=IDD_CREATUREUNKNOWN (English (U.S.)) -Resource157=IDD_AREATRIGGERSTRINGS (English (U.S.)) -Resource158=IDR_2DA (English (U.S.)) -Resource159=IDD_WEIDU (English (U.S.)) -Resource160=IDR_ITEM (English (U.S.)) -Resource161=IDD_ADDLINK (English (U.S.)) -Resource162=IDR_PROJECT (English (U.S.)) -Resource163=IDD_SPELLGENERAL (English (U.S.)) -Resource164=IDD_MOSEDIT (English (U.S.)) -Resource165=IDD_GAMESTATS (English (U.S.)) -Resource166=IDD_CREATUREGENERAL (English (U.S.)) -Resource167=IDD_SAVHANDLE (English (U.S.)) -Resource168=IDR_VVC (English (U.S.)) -Resource169=IDD_CHECK (English (U.S.)) -Resource170=IDD_CREATUREOVR (English (U.S.)) -Resource171=IDD_SPELLEXTRA (English (U.S.)) -Resource172=IDD_EFFEDIT (English (U.S.)) -Resource173=IDD_AREAVARIABLE (English (U.S.)) -Resource174=IDD_AREAAMBIENT (English (U.S.)) -Resource175=IDR_WORLDMAP (English (U.S.)) -Resource176=IDR_TREEMENU (English (U.S.)) -Resource177=IDD_ABOUTBOX (English (U.S.)) -Resource178=IDR_AREA (English (U.S.)) -Resource179=IDD_ITEMEXTRA (English (U.S.)) -Resource180=IDD_ITEMEQUIP (English (U.S.)) -Resource181=IDD_AREACONTAINER (English (U.S.)) -Resource182=IDR_STORE (English (U.S.)) -Resource183=IDD_ITEMPICKER (English (U.S.)) -Resource184=IDR_MENUBAR (English (U.S.)) -Resource185=IDD_2DAEDIT (English (U.S.)) -Resource186=IDD_SCHEDULE (English (U.S.)) -Resource187=IDD_SCRIPTEDIT (English (U.S.)) -Resource188=IDD_ITEMEDIT (English (U.S.)) -Resource189=IDD_ITEMDESC (English (U.S.)) -Resource190=IDR_CHUI (English (U.S.)) -Resource191=IDD_SPELLEFFECT (English (U.S.)) -Resource192=IDD_KEYEDIT (English (U.S.)) -Resource193=IDD_CREATUREPST (English (U.S.)) -Resource194=IDD_VVCEDIT (English (U.S.)) -Resource195=IDD_MAPLINK (English (U.S.)) -Resource196=IDD_EDIT (English (U.S.)) -Resource197=IDD_IDSEDIT (English (U.S.)) -Resource198=IDD_PALETTE (English (U.S.)) -Resource199=IDD_AREAANIM (English (U.S.)) -Resource200=IDD_EXTRACT2 (English (U.S.)) -Resource201=IDD_ITEMICONS (English (U.S.)) -Resource202=IDD_COLORPICKER (English (U.S.)) -Resource203=IDR_EFFECT (English (U.S.)) -Resource204=IDD_CFB (English (U.S.)) -Resource205=IDR_CREATURE (English (U.S.)) -Resource206=IDR_SRC (English (U.S.)) -Resource207=IDD_ITEMEFFECT (English (U.S.)) -Resource208=IDR_TILE (English (U.S.)) -Resource209=IDD_PANICBUTTON (English (U.S.)) -Resource210=IDD_SPELLEDIT (English (U.S.)) -Resource211=IDD_CREATUREEDIT (English (U.S.)) -Resource212=IDD_GAMEPCINFO (English (U.S.)) -Resource213=IDD_AREAGENERAL (English (U.S.)) -Resource214=IDD_MUSEDIT (English (U.S.)) -Resource215=IDD_CREATUREIWD2 (English (U.S.)) -Resource216=IDD_GAMEGENERAL (English (U.S.)) -Resource217=IDD_STOREEXTRA (English (U.S.)) -Resource218=IDD_SHOWLOG (English (U.S.)) -Resource219=IDD_SRCEDIT (English (U.S.)) -Resource220=IDD_PROGRESS (English (U.S.)) -Resource221=IDD_POLYGON (English (U.S.)) -Resource222=IDD_TEXTVIEW (English (U.S.)) -Resource223=IDD_STOREDRINKS (English (U.S.)) -Resource224=IDR_IDS (English (U.S.)) -Resource225=IDD_MAPEDIT (English (U.S.)) -Resource226=IDD_STRREFDLG (English (U.S.)) -Resource227=IDD_WEDTILE (English (U.S.)) -Resource228=IDD_PROJEXT (English (U.S.)) -Resource229=IDD_AREASPAWN (English (U.S.)) -Resource230=IDR_WEDMENU (English (U.S.)) -Resource231=IDD_CHUIEDIT (English (U.S.)) -Resource232=IDD_COMPAT (English (U.S.)) -Resource233=IDD_AREAACTOR (English (U.S.)) -Resource234=IDD_DIALOGEDIT (English (U.S.)) -Resource235=IDD_STOREITEMS (English (U.S.)) -Resource236=IDD_TISDIALOG (English (U.S.)) -Resource237=IDD_STOREGENERAL (English (U.S.)) -Resource238=IDD_AREAMAP (English (U.S.)) -Resource239=IDD_CREATUREICONS (English (U.S.)) -Resource240=IDD_CHITEM_DIALOG (English (U.S.)) -Resource241=IDR_BAMMENU (English (U.S.)) -Resource242=IDD_VARIABLES (English (U.S.)) -Resource243=IDD_IAPDIALOG (English (U.S.)) -Resource244=IDD_CREATUREEFF (English (U.S.)) -Resource245=IDD_PROJEDIT (English (U.S.)) +Resource125=IDD_STOREGENERAL (English (U.S.)) +Resource126=IDD_CREATURERES (English (U.S.)) +Resource127=IDD_TISDIALOG (English (U.S.)) +Resource128=IDD_CREATUREIWD2 (English (U.S.)) +Resource129=IDD_PROGRESS (English (U.S.)) +Resource130=IDD_AREAENTRANCE (English (U.S.)) +Resource131=IDR_TLKMENU (English (U.S.)) +Resource132=IDD_EDIT (English (U.S.)) +Resource133=IDD_IDSEDIT (English (U.S.)) +Resource134=IDD_IMAGEVIEW (English (U.S.)) +Resource135=IDD_ITEMDESC (English (U.S.)) +Resource136=IDD_ITEMGENERAL (English (U.S.)) +Resource137=IDD_DIALOGEDIT (English (U.S.)) +Resource138=IDD_SPELLTOOL (English (U.S.)) +Resource139=IDD_AREAINT (English (U.S.)) +Resource140=IDD_GAMEPCINFO (English (U.S.)) +Resource141=IDD_CREATUREGENERAL (English (U.S.)) +Resource142=IDD_WEDPOLY (English (U.S.)) +Resource143=IDD_MUSEDIT (English (U.S.)) +Resource144=IDD_CHITEM_DIALOG (English (U.S.)) +Resource145=IDR_MENUBAR (English (U.S.)) +Resource146=IDD_ABOUTBOX (English (U.S.)) +Resource147=IDD_POLYGON (English (U.S.)) +Resource148=IDR_CHUI (English (U.S.)) +Resource149=IDD_CREATUREICONS (English (U.S.)) +Resource150=IDD_ITEMUSE (English (U.S.)) +Resource151=IDD_WEDEDIT (English (U.S.)) +Resource152=IDD_ITEMEFFECT (English (U.S.)) +Resource153=IDD_CREATUREEFF (English (U.S.)) +Resource154=IDD_SHOWLOG (English (U.S.)) +Resource155=IDD_STOREDRINKS (English (U.S.)) +Resource156=IDD_MAPLINK (English (U.S.)) +Resource157=IDR_SCRIPT (English (U.S.)) +Resource158=IDD_FINDITEM (English (U.S.)) +Resource159=IDD_STOREEDIT (English (U.S.)) +Resource160=IDR_TILE (English (U.S.)) +Resource161=IDD_AREASONGS (English (U.S.)) +Resource162=IDD_MOSEDIT (English (U.S.)) +Resource163=IDD_AREASPAWN (English (U.S.)) +Resource164=IDD_STORERENTAL (English (U.S.)) +Resource165=IDR_CREATURE (English (U.S.)) +Resource166=IDD_CFB (English (U.S.)) +Resource167=IDD_TEXTVIEW (English (U.S.)) +Resource168=IDD_CHECK (English (U.S.)) +Resource169=IDD_CREATUREEDIT (English (U.S.)) +Resource170=IDR_PROJECT (English (U.S.)) +Resource171=IDD_KEYEDIT (English (U.S.)) +Resource172=IDD_EXTRACT2 (English (U.S.)) +Resource173=IDD_CREATUREIWD (English (U.S.)) +Resource174=IDD_COMPAT (English (U.S.)) +Resource175=IDD_WEIDU (English (U.S.)) +Resource176=IDR_MUSIC (English (U.S.)) +Resource177=IDD_PROJEDIT (English (U.S.)) +Resource178=IDR_CHITIN (English (U.S.)) +Resource179=IDD_CREATUREOVR (English (U.S.)) +Resource180=IDD_CREATUREUNKNOWN (English (U.S.)) +Resource181=IDD_COLORPICKER (English (U.S.)) +Resource182=IDR_SRC (English (U.S.)) +Resource183=IDD_IAPDIALOG (English (U.S.)) +Resource184=IDR_2DA (English (U.S.)) +Resource185=IDD_SEARCHNODE (English (U.S.)) +Resource186=IDD_VVCEDIT (English (U.S.)) +Resource187=IDD_AREAMAP (English (U.S.)) +Resource188=IDD_CREATURESKILLS (English (U.S.)) +Resource189=IDD_VARIABLES (English (U.S.)) +Resource190=IDD_STOREEXTRA (English (U.S.)) +Resource191=IDD_CREATURESTRINGS (English (U.S.)) +Resource192=IDD_SCHEDULE (English (U.S.)) +Resource193=IDR_AREA (English (U.S.)) +Resource194=IDD_SPELLEQUIP (English (U.S.)) +Resource195=IDD_AREADOOR (English (U.S.)) +Resource196=IDD_WEDTILE (English (U.S.)) +Resource197=IDD_ITEMEXTRA (English (U.S.)) +Resource198=IDD_AREATRIGGER (English (U.S.)) +Resource199=IDD_SRCEDIT (English (U.S.)) +Resource200=IDD_SAVHANDLE (English (U.S.)) +Resource201=IDD_BAMEDIT (English (U.S.)) +Resource202=IDD_CHUIEDIT (English (U.S.)) +Resource203=IDR_WEDMENU (English (U.S.)) +Resource204=IDD_SPELLEXTRA (English (U.S.)) +Resource205=IDD_ANIMDIALOG +Resource206=IDD_ITEMPICKER (English (U.S.)) +Resource207=IDD_SPELLGENERAL (English (U.S.)) +Resource208=IDD_ITEMEQUIP (English (U.S.)) +Resource209=IDD_SPELLDESC (English (U.S.)) +Resource210=IDD_PALETTE (English (U.S.)) +Resource211=IDD_PROJEXT (English (U.S.)) +Resource212=IDR_GAME (English (U.S.)) +Resource213=IDD_AREAAMBIENT (English (U.S.)) +Resource214=IDD_SPELLEFFECT (English (U.S.)) +Resource215=IDR_VVC (English (U.S.)) +Resource216=IDR_WORLDMAP (English (U.S.)) +Resource217=IDD_CREATUREITEMS (English (U.S.)) +Resource218=IDD_AREAANIM (English (U.S.)) +Resource219=IDR_TREEMENU (English (U.S.)) +Resource220=IDD_MASSCLEAR (English (U.S.)) +Resource221=IDR_STORE (English (U.S.)) +Resource222=IDR_EFFECT (English (U.S.)) +Resource223=IDR_SPELL (English (U.S.)) +Resource224=IDD_ITEMEDIT (English (U.S.)) +Resource225=IDD_STOREITEMS (English (U.S.)) +Resource226=IDD_2DAEDIT (English (U.S.)) +Resource227=IDD_CREATURELEVELS (English (U.S.)) +Resource228=IDD_PANICBUTTON (English (U.S.)) +Resource229=IDD_ADDLINK (English (U.S.)) +Resource230=IDD_EXTRACT (English (U.S.)) +Resource231=IDR_BAMMENU (English (U.S.)) +Resource232=IDD_STRREFDLG (English (U.S.)) +Resource233=IDD_AREACONTAINER (English (U.S.)) +Resource234=IDD_CREATUREPST (English (U.S.)) +Resource235=IDD_SPELLEDIT (English (U.S.)) +Resource236=IDD_AREAACTOR (English (U.S.)) +Resource237=IDD_GAMESTATS (English (U.S.)) +Resource238=IDR_ITEM (English (U.S.)) +Resource239=IDD_MAPEDIT (English (U.S.)) +Resource240=IDD_EFFEDIT (English (U.S.)) +Resource241=IDR_IDS (English (U.S.)) +Resource242=IDD_AREAGENERAL (English (U.S.)) +Resource243=IDD_GAMEEDIT (English (U.S.)) +Resource244=IDD_GAMEGENERAL (English (U.S.)) +Resource245=IDD_AREATRIGGERSTRINGS (English (U.S.)) Class99=CAreaTriggerString Class100=CPCInfo -Resource246=IDD_CREATUREITEMS (English (U.S.)) +Resource246=IDD_AREAEDIT (English (U.S.)) Class101=CCreatureOverlay -Resource247=IDD_WEDPOLY (English (U.S.)) +Resource247=IDD_SCRIPTEDIT (English (U.S.)) Class102=IWD2Creature -Resource248=IDD_STOREEDIT (English (U.S.)) +Resource248=IDD_AREAVARIABLE (English (U.S.)) Class103=CAnimDialog -Resource249=IDR_SHORTCUT (English (U.S.)) +Resource249=IDD_ITEMICONS (English (U.S.)) +Class104=CCreatureLevels +Resource250=IDR_SHORTCUT (English (U.S.)) [CLS:CChitemApp] Type=0 @@ -2760,7 +2762,7 @@ BaseClass=CPropertyPage Filter=D VirtualFilter=dWC -LastObject=IDC_KIT +LastObject=CCreatureGeneral [DLG:IDD_CREATUREICONS] Type=1 @@ -4000,7 +4002,7 @@ ImplementationFile=CreatureProperties.cpp BaseClass=CPropertyPage Filter=D -LastObject=IDC_SLOTPICKER +LastObject=IDC_MEMORISED2 VirtualFilter=idWC [DLG:IDD_MOSEDIT] @@ -4555,7 +4557,7 @@ BaseClass=CDialog Filter=D VirtualFilter=dWC -LastObject=ID_FILE_SAVE +LastObject=ID_CLEAR [MNU:IDR_GAME] Type=1 @@ -7458,7 +7460,7 @@ [DLG:IDD_CREATUREGENERAL (English (U.S.))] Type=1 Class=CCreatureGeneral -ControlCount=67 +ControlCount=68 Control1=IDC_LONGNAMEREF,edit,1350631552 Control2=IDC_LONGNAME,edit,1350631552 Control3=IDC_LONGNAMETAG,button,1342242851 @@ -7526,6 +7528,7 @@ Control65=IDC_NEW1,button,1342242816 Control66=IDC_NEW2,button,1342242816 Control67=IDC_KIT,combobox,1344340034 +Control68=IDC_LEVELSLOT,button,1342242816 [DLG:IDD_CREATUREICONS (English (U.S.))] Type=1 @@ -8442,7 +8445,7 @@ [DLG:IDD_CREATUREITEMS (English (U.S.))] Type=1 Class=CCreatureItem -ControlCount=60 +ControlCount=64 Control1=IDC_SLOTPICKER,combobox,1344339971 Control2=IDC_SELECTED,combobox,1344339970 Control3=IDC_ITEMRES,edit,1350631560 @@ -8489,20 +8492,24 @@ Control44=IDC_STATIC,static,1342308352 Control45=IDC_STATIC,static,1342308352 Control46=IDC_STATIC,static,1342308352 -Control47=IDC_STATIC,static,1342308352 +Control47=IDC_STATIC1,static,1342308352 Control48=IDC_STATIC,static,1342308352 Control49=IDC_STATIC,static,1342308352 Control50=IDC_STATIC,static,1342308352 Control51=IDC_STATIC,static,1342308352 -Control52=IDC_STATIC,button,1342210055 +Control52=IDC_STATIC4,button,1342210055 Control53=IDC_MAXSPELL,static,1342308352 Control54=IDC_MAXSLOT,static,1342308352 Control55=IDC_STATIC,button,1342210055 Control56=IDC_STATIC,static,1342308352 -Control57=IDC_STATIC,static,1342308352 -Control58=IDC_STATIC,static,1342308352 +Control57=IDC_STATIC5,static,1342308352 +Control58=IDC_STATIC6,static,1342308352 Control59=IDC_STATIC,static,1342308352 Control60=IDC_UNDROPPABLE,button,1342242819 +Control61=IDC_TOTAL,edit,1350631552 +Control62=IDC_STATIC2,static,1342308352 +Control63=IDC_MEMORISED2,edit,1350631552 +Control64=IDC_STATIC3,static,1342308352 [DLG:IDD_MOSEDIT (English (U.S.))] Type=1 @@ -9838,7 +9845,7 @@ [MNU:IDR_TLKMENU (English (U.S.))] Type=1 -Class=? +Class=CStrRefDlg Command1=IDC_RELOAD Command2=ID_FILE_SAVE Command3=IDCANCEL @@ -10173,3 +10180,42 @@ LastObject=IDC_FILTER VirtualFilter=dWC +[DLG:IDD_CREATURELEVELS (English (U.S.))] +Type=1 +Class=CCreatureLevels +ControlCount=25 +Control1=IDCANCEL,button,1342242816 +Control2=IDC_U1,edit,1350631552 +Control3=IDC_U2,edit,1350631552 +Control4=IDC_U3,edit,1350631552 +Control5=IDC_U4,edit,1350631552 +Control6=IDC_U5,edit,1350631552 +Control7=IDC_U6,edit,1350631552 +Control8=IDC_U7,edit,1350631552 +Control9=IDC_U8,edit,1350631552 +Control10=IDC_U9,edit,1350631552 +Control11=IDC_U10,edit,1350631552 +Control12=IDC_U11,edit,1350631552 +Control13=IDC_U12,edit,1350631552 +Control14=IDC_STATIC,static,1342308352 +Control15=IDC_STATIC,static,1342308352 +Control16=IDC_STATIC,static,1342308352 +Control17=IDC_STATIC,static,1342308352 +Control18=IDC_STATIC,static,1342308352 +Control19=IDC_STATIC,static,1342308352 +Control20=IDC_STATIC,static,1342308352 +Control21=IDC_STATIC,static,1342308352 +Control22=IDC_STATIC,static,1342308352 +Control23=IDC_STATIC,static,1342308352 +Control24=IDC_STATIC,static,1342308352 +Control25=IDC_STATIC,static,1342308352 + +[CLS:CCreatureLevels] +Type=0 +HeaderFile=CreatureLevels.h +ImplementationFile=CreatureLevels.cpp +BaseClass=CDialog +Filter=D +VirtualFilter=dWC +LastObject=IDC_U1 + Modified: chitem/trunk/chitem.dsp =================================================================== --- chitem/trunk/chitem.dsp 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/chitem.dsp 2008-10-26 20:59:40 UTC (rev 5471) @@ -193,6 +193,10 @@ # End Source File # Begin Source File +SOURCE=.\CreatureLevels.cpp +# End Source File +# Begin Source File + SOURCE=.\CreatureOverlay.cpp # End Source File # Begin Source File @@ -594,6 +598,10 @@ # End Source File # Begin Source File +SOURCE=.\CreatureLevels.h +# End Source File +# Begin Source File + SOURCE=.\CreatureOverlay.h # End Source File # Begin Source File Modified: chitem/trunk/chitem.rc =================================================================== --- chitem/trunk/chitem.rc 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/chitem.rc 2008-10-26 20:59:40 UTC (rev 5471) @@ -145,7 +145,7 @@ BEGIN ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 LTEXT "",IDC_VERSION,40,10,119,8,SS_NOPREFIX - LTEXT "Copyright (C) 2002-2007 Avenger",IDC_STATIC,40,23,119,8 + LTEXT "Copyright (C) 2002-2008 Avenger",IDC_STATIC,40,23,119,8 DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP LTEXT "Source: http://gemrb.sourceforge.net",IDC_STATIC,40,36, 119,8 @@ -2548,6 +2548,7 @@ PUSHBUTTON "New string",IDC_NEW2,254,6,51,11 COMBOBOX IDC_KIT,300,113,93,79,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "IWD2 levels",IDC_LEVELSLOT,7,69,88,27 END IDD_CREATUREICONS DIALOG DISCARDABLE 0, 0, 400, 199 @@ -3753,11 +3754,11 @@ CONTROL "Memorised ?",IDC_MEMORISED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,151,159,56,10 EDITTEXT IDC_SPELLNAME,50,176,138,14,ES_AUTOHSCROLL | ES_READONLY - PUSHBUTTON "Add level slot",IDC_ADDSLOT,223,79,50,14 - PUSHBUTTON "Remove slot",IDC_DELSLOT,223,97,50,14 - PUSHBUTTON "Set limits",IDC_CLASS,223,115,50,14 - PUSHBUTTON "New spell",IDC_MEMORISE,223,139,50,14 - PUSHBUTTON "Forget spell",IDC_FORGET,223,157,50,14 + PUSHBUTTON "Add level slot",IDC_ADDSLOT,223,76,50,14 + PUSHBUTTON "Remove slot",IDC_DELSLOT,223,94,50,14 + PUSHBUTTON "Set limits",IDC_CLASS,223,112,50,14 + PUSHBUTTON "New spell",IDC_MEMORISE,223,130,50,14 + PUSHBUTTON "Forget spell",IDC_FORGET,223,148,50,14 COMBOBOX IDC_BOOKPICKER,283,82,102,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_SPELLRES2,283,112,54,14,ES_UPPERCASE | @@ -3778,23 +3779,27 @@ LTEXT "Item flags",IDC_STATIC,160,35,31,8 LTEXT "Expiration",IDC_STATIC,356,9,32,8 LTEXT "Itemname",IDC_STATIC,7,34,32,8 - LTEXT "Spell level && type",IDC_STATIC,121,107,54,8 + LTEXT "Spell level && type",IDC_STATIC1,121,107,54,8 LTEXT "Icon",IDC_STATIC,284,8,15,8 LTEXT "Number of memorisable spells",IDC_STATIC,121,79,94,8 LTEXT "Spellname",IDC_STATIC,9,177,34,8 LTEXT "Choose spell",IDC_STATIC,9,128,41,8 - GROUPBOX "Known spells && innates",IDC_STATIC,275,68,118,108, + GROUPBOX "Known spells && innates",IDC_STATIC4,275,68,118,108, BS_FLAT LTEXT "/ 0",IDC_MAXSPELL,196,141,21,8 LTEXT "/ 0",IDC_MAXSLOT,98,91,21,8 GROUPBOX "Memorised spells && innates",IDC_STATIC,7,68,269,124, BS_FLAT LTEXT "Resource",IDC_STATIC,9,159,32,8 - LTEXT "Resource",IDC_STATIC,283,100,32,8 - LTEXT "Spell level && type",IDC_STATIC,283,130,54,8 + LTEXT "Resource",IDC_STATIC5,283,100,32,8 + LTEXT "Spell level && type",IDC_STATIC6,283,130,54,8 LTEXT "Selected slot",IDC_STATIC,320,42,42,8 CONTROL "No drop",IDC_UNDROPPABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,248,48,41,10 + EDITTEXT IDC_TOTAL,194,176,26,14,ES_AUTOHSCROLL + LTEXT "Count",IDC_STATIC2,194,166,20,8 + EDITTEXT IDC_MEMORISED2,233,176,40,14,ES_AUTOHSCROLL + LTEXT "Memorised",IDC_STATIC3,233,166,35,8 END IDD_MOSEDIT DIALOG DISCARDABLE 0, 0, 349, 149 @@ -5235,7 +5240,39 @@ LTEXT "Duration",IDC_STATIC,96,80,28,8 END +IDD_CREATURELEVELS DIALOG DISCARDABLE 0, 0, 183, 190 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Icewind Dale II levels" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Back",IDCANCEL,126,169,50,14 + EDITTEXT IDC_U1,18,16,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U2,18,46,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U3,18,76,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U4,18,106,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U5,18,136,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U6,18,166,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U7,78,16,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U8,78,46,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U9,78,76,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U10,78,106,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U11,78,136,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_U12,78,166,40,14,ES_AUTOHSCROLL + LTEXT "Bard",IDC_STATIC,18,64,16,8 + LTEXT "Barbarian",IDC_STATIC,18,34,31,8 + LTEXT "Cleric",IDC_STATIC,18,94,18,8 + LTEXT "Druid",IDC_STATIC,18,124,18,8 + LTEXT "Total",IDC_STATIC,18,4,17,8 + LTEXT "Fighter",IDC_STATIC,18,154,22,8 + LTEXT "Monk",IDC_STATIC,78,4,19,8 + LTEXT "Paladin",IDC_STATIC,78,34,24,8 + LTEXT "Ranger",IDC_STATIC,78,64,24,8 + LTEXT "Rogue",IDC_STATIC,78,94,22,8 + LTEXT "Sorcerer",IDC_STATIC,78,124,28,8 + LTEXT "Wizard",IDC_STATIC,78,154,23,8 +END + ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -6043,6 +6080,14 @@ TOPMARGIN, 7 BOTTOMMARGIN, 130 END + + IDD_CREATURELEVELS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 176 + TOPMARGIN, 7 + BOTTOMMARGIN, 183 + END END #endif // APSTUDIO_INVOKED Modified: chitem/trunk/chitemDlg.cpp =================================================================== --- chitem/trunk/chitemDlg.cpp 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/chitemDlg.cpp 2008-10-26 20:59:40 UTC (rev 5471) @@ -736,6 +736,14 @@ val=Read2daInt(tmploc, rnditems, 1); //removeall=1 darefs.Lookup("RT_NORM", tmploc); val|=Read2daInt(tmploc, rnditems, 0); //adding more items + darefs.Lookup("LISTSPLL", tmploc); + val|=Read2daResRef(tmploc, listspells, 1, 7); + darefs.Lookup("LISTINNT", tmploc); + val|=Read2daResRef(tmploc, listinnates, 1); + darefs.Lookup("LISTSONG", tmploc); + val|=Read2daResRef(tmploc, listsongs, 1); + darefs.Lookup("LISTSHAP", tmploc); + val|=Read2daResRef(tmploc, listshapes, 1); //this is the slot setup for(i=0;i<IWD2_SLOT_COUNT;i++) slot_names[i]=iwd2_slot_names[i]; Modified: chitem/trunk/creature.cpp =================================================================== --- chitem/trunk/creature.cpp 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/creature.cpp 2008-10-26 20:59:40 UTC (rev 5471) @@ -36,6 +36,7 @@ pst_overlay_size=0; revision=10; memset(iwd2_spells,0,sizeof(iwd2_spells)); + memset(iwd2_free,0,sizeof(iwd2_free)); m_savechanges=true; } @@ -256,7 +257,7 @@ if(revision==22) { - write_iwd2_spells(); + write_iwd2_spells(fhandle); } else { @@ -499,7 +500,7 @@ return flg; } -int Ccreature::write_iwd2_spells() +int Ccreature::write_iwd2_spells(int fhandle) { int position, esize; Modified: chitem/trunk/creature.h =================================================================== --- chitem/trunk/creature.h 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/creature.h 2008-10-26 20:59:40 UTC (rev 5471) @@ -16,7 +16,7 @@ typedef struct { - long unknown; + long maximum; long free; } iwd2_trail; @@ -146,7 +146,7 @@ int adjust_actpoint(long offset); int handle_iwd2_spells(int position, long offset, long count); int handle_iwd2(); - int write_iwd2_spells(); + int write_iwd2_spells(int fhandle); int calculate_iwd2_spells(int position, long &offset, long &maxcount); int calculate_iwd2(); inline long myseek(long pos) Modified: chitem/trunk/resource.h =================================================================== --- chitem/trunk/resource.h 2008-10-26 20:56:37 UTC (rev 5470) +++ chitem/trunk/resource.h 2008-10-26 20:59:40 UTC (rev 5471) @@ -264,6 +264,7 @@ #define IDS_VVCFLAG 231 #define IDD_ANIMDIALOG 231 #define IDS_SEQFLAG 232 +#define IDD_CREATURELEVELS 232 #define IDS_MINIMAP 233 #define IDS_TISEXTRACT 234 #define IDS_OVERLAY 235 @@ -1629,6 +1630,9 @@ #define IDC_SHADOW 2322 #define IDC_BREAKABLE 2331 #define IDC_BUTTON1 2333 +#define IDC_TOTAL 2336 +#define IDC_MEMORISED2 2337 +#define IDC_STATIC1 2338 #define ID_RESCAN 32771 #define ID_RESCAN2 32772 #define ID_EDIT_ITEM 32773 @@ -1851,7 +1855,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 233 #define _APS_NEXT_COMMAND_VALUE 33046 -#define _APS_NEXT_CONTROL_VALUE 2334 +#define _APS_NEXT_CONTROL_VALUE 2339 #define _APS_NEXT_SYMED_VALUE 120 #endif #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-26 20:56:41
|
Revision: 5470 http://gemrb.svn.sourceforge.net/gemrb/?rev=5470&view=rev Author: avenger_teambg Date: 2008-10-26 20:56:37 +0000 (Sun, 26 Oct 2008) Log Message: ----------- fixed const warnings, added some iwd2 creature field names Modified Paths: -------------- ielister/trunk/ielister.cpp Modified: ielister/trunk/ielister.cpp =================================================================== --- ielister/trunk/ielister.cpp 2008-10-24 20:13:35 UTC (rev 5469) +++ ielister/trunk/ielister.cpp 2008-10-26 20:56:37 UTC (rev 5470) @@ -94,7 +94,7 @@ #endif #define SLOT_COUNT 38 -char *bg2_slot_names[SLOT_COUNT]={"0-Helmet","1-Armor","2-Shield","3-Gloves","4-L.Ring","5-R.Ring","6-Amulet", +const char *bg2_slot_names[SLOT_COUNT]={"0-Helmet","1-Armor","2-Shield","3-Gloves","4-L.Ring","5-R.Ring","6-Amulet", "7-Belt","8-Boots","9-Weapon 1","10-Weapon 2","11-Weapon 3","12-Weapon 4","13-Quiver 1","14-Quiver 2", "15-Quiver 3","16-Unknown","17-Cloak","18-Quick item 1","19-Quick item 2","20-Quick item 3", "21-Inventory 1","22-Inventory 2","23-Inventory 3","24-Inventory 4","25-Inventory 5","26-Inventory 6", @@ -102,7 +102,7 @@ "33-Inventory 13","34-Inventory 14","35-Inventory 15","36-Inventory 16","37-Magic"}; #define PST_SLOT_COUNT 46 -char *pst_slot_names[PST_SLOT_COUNT]={"0-Earring","1-Armor","2-L.Tattoo","3-Gloves","4-L.Ring","5-R.Ring","6-Eyeball", +const char *pst_slot_names[PST_SLOT_COUNT]={"0-Earring","1-Armor","2-L.Tattoo","3-Gloves","4-L.Ring","5-R.Ring","6-Eyeball", "7-R.Tattoo","8-Boots","9-Weapon 1","10-Weapon 2","11-Weapon 3","12-Weapon 4","13-Quiver 1","14-Quiver 2", "15-Quiver 3","16-Quiver 4","17-Quiver 5","18-Unknown","19-Cloak","20-Quick item 1","21-Quick item 2","22-Quick item 3", "23-Quick item 4","24-Quick item 5","25-Inventory 1","26-Inventory 2","27-Inventory 3","28-Inventory 4","29-Inventory 5","30-Inventory 6", @@ -111,7 +111,7 @@ "43-Inventory 19","44-Inventory 20","45-Magic"}; #define IWD2_SLOT_COUNT 50 -char *iwd2_slot_names[IWD2_SLOT_COUNT]={"0-Helmet","1-Armor","2-Shield","3-Gloves","4-L.Ring","5-R.Ring","6-Amulet", +const char *iwd2_slot_names[IWD2_SLOT_COUNT]={"0-Helmet","1-Armor","2-Shield","3-Gloves","4-L.Ring","5-R.Ring","6-Amulet", "7-Belt","8-Boots","9-Weapon 1","10-Shield 1","11-Weapon 2","12-Shield 2","13-Weapon 3","14-Shield 3","15-Weapon 4","16-Shield 4", "17-Cloak","18-Quiver 1","19-Quiver 2","20-Quiver 3","21-Unknown","22-Quick item 1","23-Quick item 2","24-Quick item 3", "25-Inventory 1","26-Inventory 2","27-Inventory 3","28-Inventory 4","29-Inventory 5","30-Inventory 6", @@ -120,8 +120,8 @@ "41-Inventory 17","42-Inventory 18","43-Inventory 19","44-Inventory 20","45-Inventory 21","46-Inventory 22", "47-Inventory 23","48-Inventory 24","49-Magic"}; -char *classstr[7]={"Bard", "Cleric", "Druid", "Paladin", "Ranger", "Sorceror", "Wizard"}; -char *otherstr[3]={"Innates","Songs","Shapes"}; +const char *classstr[7]={"Bard", "Cleric", "Druid", "Paladin", "Ranger", "Sorceror", "Wizard"}; +const char *otherstr[3]={"Innates","Songs","Shapes"}; class OutStream { public: int indent; @@ -140,16 +140,16 @@ ~OutStream(); int OpenStream(char *filename); int CloseStream(); - int AddString(int length, char *label); - int AddBitmap(int length, char *label); - int AddDword(char *label); - int AddWord(char *label); - int AddByte(char *label); - int AddPoint(char *label); + int AddString(int length, const char *label); + int AddBitmap(int length, const char *label); + int AddDword(const char *label); + int AddWord(const char *label); + int AddByte(const char *label); + int AddPoint(const char *label); int AddIndent(); int EndIndent(); int AddSignature(); - int Prefetch(char *signature, int length); + int Prefetch(const char *signature, int length); private: int ReallocBuffer(); int DrawIndent(); @@ -309,7 +309,7 @@ return 0; } -int OutStream::Prefetch(char *signature, int length) +int OutStream::Prefetch(const char *signature, int length) { char tmpstr[20]; @@ -326,7 +326,7 @@ return AddString(RESREFSIZE,"Signature"); } -int OutStream::AddString(int length, char *label) +int OutStream::AddString(int length, const char *label) { char tmpstr[VARSIZE]; memset(tmpstr,0,sizeof(tmpstr)); @@ -375,7 +375,7 @@ return 0; } -int OutStream::AddBitmap(int length, char *label) +int OutStream::AddBitmap(int length, const char *label) { lseek(fhandle, length, SEEK_CUR); DrawIndent(); @@ -393,7 +393,7 @@ return 0; } -int OutStream::AddDword(char *label) +int OutStream::AddDword(const char *label) { unsigned int tmpdword; if (read(fhandle, &tmpdword, 4)!=4) @@ -415,7 +415,7 @@ return tmpdword; } -int OutStream::AddWord(char *label) +int OutStream::AddWord(const char *label) { unsigned short tmpword; if (read(fhandle, &tmpword, 2)!=2) @@ -437,7 +437,7 @@ return tmpword; } -int OutStream::AddPoint(char *label) +int OutStream::AddPoint(const char *label) { unsigned short tmpword1, tmpword2; read(fhandle, &tmpword1, 2); @@ -457,7 +457,7 @@ return (tmpword2<<16) | tmpword1; } -int OutStream::AddByte(char *label) +int OutStream::AddByte(const char *label) { unsigned char tmpbyte; read(fhandle, &tmpbyte, 1); @@ -1064,8 +1064,8 @@ os.AddDword("UNKNOWN"); os.EndIndent(); } - os.AddDword("Free"); - os.AddDword("UNKNOWN"); + os.AddDword("Total"); + os.AddDword("Bonus"); os.EndIndent(); } else @@ -1091,7 +1091,7 @@ os.EndIndent(); } os.AddDword("Free"); - os.AddDword("UNKNOWN"); + os.AddDword("Total"); os.EndIndent(); } else @@ -1191,7 +1191,7 @@ bool pst, iwd, iwd2; int i,j,k; int effver; - char **slotnames; + const char **slotnames; ovroffset=0; ovrcount=0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-24 20:13:45
|
Revision: 5469 http://gemrb.svn.sourceforge.net/gemrb/?rev=5469&view=rev Author: avenger_teambg Date: 2008-10-24 20:13:35 +0000 (Fri, 24 Oct 2008) Log Message: ----------- dltcep source update Modified Paths: -------------- chitem/trunk/2DAEdit.cpp chitem/trunk/2DAEdit.h chitem/trunk/AreaProperties.cpp chitem/trunk/Chitem.cpp chitem/trunk/CreatureProperties.cpp chitem/trunk/Script.cpp chitem/trunk/ScriptEdit.cpp chitem/trunk/chitem.clw chitem/trunk/chitem.rc chitem/trunk/chitemDlg.cpp chitem/trunk/resource.h Modified: chitem/trunk/2DAEdit.cpp =================================================================== --- chitem/trunk/2DAEdit.cpp 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/2DAEdit.cpp 2008-10-24 20:13:35 UTC (rev 5469) @@ -101,12 +101,13 @@ ON_COMMAND(ID_TOOLS_CAPITALIZEENTRIES, OnToolsCapitalize) ON_COMMAND(ID_TOOLS_LOOKUPSTRREF, OnToolsLookupstrref) ON_BN_CLICKED(IDC_ORDER, OnOrder) + ON_COMMAND(ID_TOOLS_ADDSPARKDATA, OnToolsAddsparkdata) ON_EN_KILLFOCUS(IDC_DEFAULT, DefaultKillfocus) ON_COMMAND(ID_FILE_NEW, OnNew) ON_COMMAND(ID_FILE_LOAD, OnLoad) ON_COMMAND(ID_FILE_LOADEXTERNALSCRIPT, OnLoadex) ON_COMMAND(ID_FILE_SAVEAS, OnSaveas) - ON_COMMAND(ID_TOOLS_ADDSPARKDATA, OnToolsAddsparkdata) + ON_COMMAND(ID_TOOLS_PLAYSOUND, OnToolsPlaysound) //}}AFX_MSG_MAP ON_EN_KILLFOCUS(IDC_EDITLINK,OnKillfocusEditlink) ON_NOTIFY(NM_CUSTOMDRAW, IDC_2DA, OnCustomdrawMyList) @@ -752,7 +753,7 @@ CString *tmppoi; CString tmpstr; int i; - + if (m_item<0) { return; @@ -770,7 +771,7 @@ if(colordlg.DoModal()==IDOK) { unsigned long colors[5]; - + MakeGradientArray(colors, (unsigned char) colordlg.m_picked); for (i=0;i<5;i++) { @@ -786,13 +787,13 @@ POSITION pos; int i,j; CString *tmppoi; - + pos=the_2da.data->GetHeadPosition(); for(j=0;j<the_2da.cols;j++) { the_2da.collabels[j].MakeUpper(); } - for(i=0;i<the_2da.rows;i++) + for(i=0;i<the_2da.rows;i++) { tmppoi=(CString *) the_2da.data->GetNext(pos); for(j=0;j<the_2da.cols;j++) @@ -805,13 +806,22 @@ void C2DAEdit::OnToolsLookupstrref() { - CStrRefDlg dlg; - + CStrRefDlg dlg; + if(IsWindow(m_edit)) m_edit.DestroyWindow(); dlg.DoModal(); RefreshDialog(); } +void C2DAEdit::OnToolsPlaysound() +{ + CString tmpstr; + + tmpstr=m_2da_control.GetItemText(m_item,m_subitem); + tmpstr.MakeUpper(); + play_acm(tmpstr,false,false); +} + BOOL C2DAEdit::PreTranslateMessage(MSG* pMsg) { m_tooltip.RelayEvent(pMsg); @@ -1957,3 +1967,4 @@ m_tooltip.RelayEvent(pMsg); return CDialog::PreTranslateMessage(pMsg); } + Modified: chitem/trunk/2DAEdit.h =================================================================== --- chitem/trunk/2DAEdit.h 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/2DAEdit.h 2008-10-24 20:13:35 UTC (rev 5469) @@ -73,6 +73,7 @@ afx_msg void OnToolsLookupstrref(); afx_msg void OnOrder(); afx_msg void OnToolsAddsparkdata(); + afx_msg void OnToolsPlaysound(); //}}AFX_MSG afx_msg void OnKillfocusEditlink(); afx_msg void OnCustomdrawMyList ( NMHDR* pNMHDR, LRESULT* pResult ); Modified: chitem/trunk/AreaProperties.cpp =================================================================== --- chitem/trunk/AreaProperties.cpp 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/AreaProperties.cpp 2008-10-24 20:13:35 UTC (rev 5469) @@ -5911,8 +5911,8 @@ } static int animboxids[]={IDC_ANIMPICKER, IDC_POSX, IDC_POSY, IDC_BAM, -IDC_FRAME, IDC_CYCLE, IDC_FLAGS, IDC_U36, IDC_U38, IDC_U3A, IDC_U3C, -IDC_U3E, IDC_SKIPEXT, IDC_BMP, IDC_FLAG1, IDC_FLAG2, IDC_FLAG3, +IDC_FRAME, IDC_CYCLE, IDC_FLAGS, IDC_U36, IDC_U38, IDC_TRANSPARENT, IDC_U3C, +IDC_CHANCE, IDC_SKIPEXT, IDC_BMP, IDC_FLAG1, IDC_FLAG2, IDC_FLAG3, IDC_FLAG4, IDC_FLAG5, IDC_FLAG6, IDC_FLAG7, IDC_FLAG8, IDC_FLAG9, IDC_FLAG10, IDC_FLAG11, IDC_FLAG12, IDC_FLAG13, IDC_FLAG14, IDC_FLAG15, IDC_FLAG16, IDC_BAMFRAME, IDC_PLAY, IDC_SCHEDULE, IDC_REMOVE, IDC_COPY, @@ -5976,9 +5976,9 @@ DDX_Text(pDX, IDC_FLAGS, the_area.animheaders[m_animnum].flags); DDX_Text(pDX, IDC_U36,the_area.animheaders[m_animnum].unknown36); DDX_Text(pDX, IDC_U38,the_area.animheaders[m_animnum].height); - DDX_Text(pDX, IDC_U3A,the_area.animheaders[m_animnum].transparency); + DDX_Text(pDX, IDC_TRANSPARENT,the_area.animheaders[m_animnum].transparency); DDX_Text(pDX, IDC_U3C,the_area.animheaders[m_animnum].current); - DDX_Text(pDX, IDC_U3E,the_area.animheaders[m_animnum].progress); + DDX_Text(pDX, IDC_CHANCE,the_area.animheaders[m_animnum].progress); DDX_Text(pDX, IDC_SKIPEXT,the_area.animheaders[m_animnum].skipcycle); RetrieveResref(tmpstr, the_area.animheaders[m_animnum].bmp); @@ -6048,6 +6048,22 @@ m_tooltip.SetTipBkColor(RGB(240,224,160)); m_tooltip.AddTool(GetDlgItem(IDC_ANIMPICKER), IDS_LABEL); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG1), IDS_AVISIBLE); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG2), IDS_ABLEND); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG3), IDS_ANOLIGHT); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG4), IDS_APARTIAL); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG5), IDS_ASYNC); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG7), IDS_ANOWALL); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG8), IDS_AFOG); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG9), IDS_GROUND); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG10), IDS_AALL); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG11), IDS_APALETTE); + m_tooltip.AddTool(GetDlgItem(IDC_BMP), IDS_APALETTE); + m_tooltip.AddTool(GetDlgItem(IDC_BROWSE2), IDS_APALETTE); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG12), IDS_AMIRROR); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG13), IDS_ACOMBAT); + m_tooltip.AddTool(GetDlgItem(IDC_FLAG14), IDS_CHANCE); + m_tooltip.AddTool(GetDlgItem(IDC_TRANSPARENT), IDS_ATRANSP); } RefreshAnim(); return TRUE; @@ -6093,9 +6109,9 @@ ON_EN_KILLFOCUS(IDC_U38, DefaultKillfocus) ON_EN_KILLFOCUS(IDC_U3C, DefaultKillfocus) ON_EN_KILLFOCUS(IDC_BMP, DefaultKillfocus) - ON_EN_KILLFOCUS(IDC_U3A, DefaultKillfocus) + ON_EN_KILLFOCUS(IDC_TRANSPARENT, DefaultKillfocus) ON_EN_KILLFOCUS(IDC_SKIPEXT, DefaultKillfocus) - ON_EN_KILLFOCUS(IDC_U3E, DefaultKillfocus) + ON_EN_KILLFOCUS(IDC_CHANCE, DefaultKillfocus) //}}AFX_MSG_MAP END_MESSAGE_MAP() Modified: chitem/trunk/Chitem.cpp =================================================================== --- chitem/trunk/Chitem.cpp 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/Chitem.cpp 2008-10-24 20:13:35 UTC (rev 5469) @@ -821,7 +821,7 @@ pos=1; do { - len=temp.Find('\\',pos); + len=filename.Find('\\',pos); if(len<0) temp = filename; else { @@ -2761,7 +2761,7 @@ "specific","gender","alignment" }; -char *idsname[NUM_IDS]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGN"}; +char *idsname[NUM_IDS]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGNMEN"}; char *base_idsname_iwd[NUM_IDS]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGNMEN"}; char *base_idsname_iwd2[NUM_IDS]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGNMNT"}; Modified: chitem/trunk/CreatureProperties.cpp =================================================================== --- chitem/trunk/CreatureProperties.cpp 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/CreatureProperties.cpp 2008-10-24 20:13:35 UTC (rev 5469) @@ -297,7 +297,7 @@ cb=(CComboBox *) GetDlgItem(IDC_IDSALIGNMENT); if(pst_compatible_var()) FillCombo("ALIGN",cb,2); - else FillCombo(IDSName(ALIGN,false),cb,2); + else FillCombo(IDSName2(ALIGN,false),cb,2); cb=(CComboBox *) GetDlgItem(IDC_HATED); FillCombo("RACE",cb,2); Modified: chitem/trunk/Script.cpp =================================================================== --- chitem/trunk/Script.cpp 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/Script.cpp 2008-10-24 20:13:35 UTC (rev 5469) @@ -15,9 +15,9 @@ #endif static CString oidPST[9]={"FACTION","TEAM","EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGN"}; -static CString oidIWD[8]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGN"}; +static CString oidIWD[8]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGNMEN"}; static CString oidIWD2[10]={"EA","GENERAL","RACE","SUBRAC","CLASS","SPECIFIC","GENDER","ALIGN","",""}; -static CString oidBG[7]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGN"}; +static CString oidBG[7]={"EA","GENERAL","RACE","CLASS","SPECIFIC","GENDER","ALIGNMEN"}; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Modified: chitem/trunk/ScriptEdit.cpp =================================================================== --- chitem/trunk/ScriptEdit.cpp 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/ScriptEdit.cpp 2008-10-24 20:13:35 UTC (rev 5469) @@ -274,8 +274,7 @@ } chdir(bgfolder); outpath.Format("override"); - mkdir(outpath); - if(!dir_exists(outpath)) + if(!assure_dir_exists(bgfolder+outpath)) { tmpstr.Format("%s cannot be created as output path.",outpath); MessageBox(tmpstr,"Dialog editor",MB_OK|MB_ICONSTOP); @@ -352,8 +351,7 @@ } } chdir(bgfolder); - mkdir(weidudecompiled); - if(!dir_exists(weidudecompiled)) + if(!assure_dir_exists(bgfolder+weidudecompiled)) { tmpstr.Format("%s cannot be created as output path.",weidudecompiled); MessageBox(tmpstr,"Dialog editor",MB_OK|MB_ICONSTOP); @@ -1127,7 +1125,7 @@ if(tmpstart==-1) ch=0; else { - line.Delete(tmpstart,len); + line.Delete(tmpstart,search.GetLength()); line.Insert(tmpstart,replace); found=true; } Modified: chitem/trunk/chitem.clw =================================================================== --- chitem/trunk/chitem.clw 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/chitem.clw 2008-10-24 20:13:35 UTC (rev 5469) @@ -2,7 +2,7 @@ [General Info] Version=1 -LastClass=CChitemDlg +LastClass=C2DAEdit LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "chitem.h" @@ -232,134 +232,134 @@ Resource123=IDD_GAMEGENERAL Class98=IcewindCre Resource124=IDR_SHORTCUT -Resource125=IDD_CREATUREEFF (English (U.S.)) -Resource126=IDD_SPELLTOOL (English (U.S.)) -Resource127=IDD_GAMEPCINFO (English (U.S.)) -Resource128=IDD_AREASONGS (English (U.S.)) -Resource129=IDR_TREEMENU (English (U.S.)) -Resource130=IDR_EFFECT (English (U.S.)) -Resource131=IDD_SRCEDIT (English (U.S.)) -Resource132=IDD_ADDLINK (English (U.S.)) -Resource133=IDR_SPELL (English (U.S.)) -Resource134=IDD_CREATUREGENERAL (English (U.S.)) -Resource135=IDD_TISDIALOG (English (U.S.)) -Resource136=IDD_CREATUREICONS (English (U.S.)) -Resource137=IDD_GAMEGENERAL (English (U.S.)) -Resource138=IDD_STRREFDLG (English (U.S.)) -Resource139=IDD_2DAEDIT (English (U.S.)) -Resource140=IDD_ITEMGENERAL (English (U.S.)) -Resource141=IDD_AREACONTAINER (English (U.S.)) -Resource142=IDD_AREAAMBIENT (English (U.S.)) -Resource143=IDR_PROJECT (English (U.S.)) -Resource144=IDD_AREAENTRANCE (English (U.S.)) -Resource145=IDD_VVCEDIT (English (U.S.)) -Resource146=IDD_PROJEDIT (English (U.S.)) -Resource147=IDR_MENUBAR (English (U.S.)) -Resource148=IDD_SPELLEFFECT (English (U.S.)) -Resource149=IDD_KEYEDIT (English (U.S.)) -Resource150=IDD_AREAACTOR (English (U.S.)) -Resource151=IDR_TLKMENU (English (U.S.)) -Resource152=IDR_CREATURE (English (U.S.)) -Resource153=IDD_ITEMUSE (English (U.S.)) -Resource154=IDD_ITEMEQUIP (English (U.S.)) -Resource155=IDD_ANIMDIALOG -Resource156=IDR_ITEM (English (U.S.)) -Resource157=IDD_PALETTE (English (U.S.)) -Resource158=IDD_CREATUREEDIT (English (U.S.)) -Resource159=IDD_AREAINT (English (U.S.)) -Resource160=IDD_SPELLDESC (English (U.S.)) -Resource161=IDR_SCRIPT (English (U.S.)) -Resource162=IDD_AREASPAWN (English (U.S.)) -Resource163=IDD_WEDPOLY (English (U.S.)) -Resource164=IDR_TILE (English (U.S.)) -Resource165=IDD_WEDTILE (English (U.S.)) -Resource166=IDD_CREATUREIWD2 (English (U.S.)) -Resource167=IDD_CHECK (English (U.S.)) -Resource168=IDD_AREAMAP (English (U.S.)) -Resource169=IDD_DIALOGEDIT (English (U.S.)) -Resource170=IDD_POLYGON (English (U.S.)) -Resource171=IDD_COMPAT (English (U.S.)) -Resource172=IDD_SCRIPTEDIT (English (U.S.)) -Resource173=IDR_WORLDMAP (English (U.S.)) -Resource174=IDR_STORE (English (U.S.)) -Resource175=IDD_ITEMDESC (English (U.S.)) -Resource176=IDD_GAMESTATS (English (U.S.)) -Resource177=IDD_AREADOOR (English (U.S.)) -Resource178=IDD_AREAGENERAL (English (U.S.)) -Resource179=IDD_PANICBUTTON (English (U.S.)) -Resource180=IDD_MAPLINK (English (U.S.)) -Resource181=IDR_AREA (English (U.S.)) -Resource182=IDD_SPELLEDIT (English (U.S.)) -Resource183=IDD_MOSEDIT (English (U.S.)) -Resource184=IDR_BAMMENU (English (U.S.)) -Resource185=IDR_CHUI (English (U.S.)) -Resource186=IDD_CREATUREPST (English (U.S.)) -Resource187=IDD_IMAGEVIEW (English (U.S.)) -Resource188=IDD_PROJEXT (English (U.S.)) -Resource189=IDD_MASSCLEAR (English (U.S.)) -Resource190=IDD_CREATURERES (English (U.S.)) -Resource191=IDD_CHUIEDIT (English (U.S.)) -Resource192=IDD_ITEMPICKER (English (U.S.)) -Resource193=IDD_STORERENTAL (English (U.S.)) -Resource194=IDD_IDSEDIT (English (U.S.)) -Resource195=IDR_IDS (English (U.S.)) -Resource196=IDD_IAPDIALOG (English (U.S.)) -Resource197=IDR_SRC (English (U.S.)) -Resource198=IDD_WEDEDIT (English (U.S.)) -Resource199=IDD_WEIDU (English (U.S.)) -Resource200=IDD_AREATRIGGER (English (U.S.)) -Resource201=IDD_MAPEDIT (English (U.S.)) -Resource202=IDR_2DA (English (U.S.)) -Resource203=IDD_EXTRACT2 (English (U.S.)) -Resource204=IDD_EDIT (English (U.S.)) -Resource205=IDD_AREAEDIT (English (U.S.)) -Resource206=IDD_CREATURESTRINGS (English (U.S.)) -Resource207=IDD_CREATUREITEMS (English (U.S.)) -Resource208=IDD_CREATURESKILLS (English (U.S.)) -Resource209=IDD_PROGRESS (English (U.S.)) -Resource210=IDD_BAMEDIT (English (U.S.)) -Resource211=IDD_AREATRIGGERSTRINGS (English (U.S.)) -Resource212=IDD_STOREEXTRA (English (U.S.)) -Resource213=IDD_STOREDRINKS (English (U.S.)) -Resource214=IDD_FINDITEM (English (U.S.)) -Resource215=IDD_SPELLGENERAL (English (U.S.)) -Resource216=IDD_ITEMEXTRA (English (U.S.)) -Resource217=IDD_MUSEDIT (English (U.S.)) -Resource218=IDD_ABOUTBOX (English (U.S.)) -Resource219=IDD_STOREEDIT (English (U.S.)) -Resource220=IDD_SEARCHNODE (English (U.S.)) -Resource221=IDD_EFFEDIT (English (U.S.)) -Resource222=IDD_VARIABLES (English (U.S.)) -Resource223=IDD_STOREITEMS (English (U.S.)) -Resource224=IDD_TEXTVIEW (English (U.S.)) -Resource225=IDD_GAMEEDIT (English (U.S.)) -Resource226=IDD_CHITEM_DIALOG (English (U.S.)) -Resource227=IDD_EXTRACT (English (U.S.)) -Resource228=IDR_VVC (English (U.S.)) -Resource229=IDD_CREATUREIWD (English (U.S.)) -Resource230=IDD_CREATUREUNKNOWN (English (U.S.)) -Resource231=IDD_CFB (English (U.S.)) -Resource232=IDD_SAVHANDLE (English (U.S.)) -Resource233=IDD_SCHEDULE (English (U.S.)) -Resource234=IDR_GAME (English (U.S.)) -Resource235=IDD_AREAANIM (English (U.S.)) -Resource236=IDD_ITEMEFFECT (English (U.S.)) -Resource237=IDD_COLORPICKER (English (U.S.)) -Resource238=IDD_STOREGENERAL (English (U.S.)) -Resource239=IDD_CREATUREOVR (English (U.S.)) -Resource240=IDD_AREAVARIABLE (English (U.S.)) -Resource241=IDD_SPELLEQUIP (English (U.S.)) -Resource242=IDD_SHOWLOG (English (U.S.)) -Resource243=IDR_CHITIN (English (U.S.)) -Resource244=IDD_ITEMEDIT (English (U.S.)) -Resource245=IDD_SPELLEXTRA (English (U.S.)) +Resource125=IDD_BAMEDIT (English (U.S.)) +Resource126=IDD_SPELLDESC (English (U.S.)) +Resource127=IDD_AREATRIGGER (English (U.S.)) +Resource128=IDR_CHITIN (English (U.S.)) +Resource129=IDD_CREATURESTRINGS (English (U.S.)) +Resource130=IDD_IMAGEVIEW (English (U.S.)) +Resource131=IDD_CREATUREIWD (English (U.S.)) +Resource132=IDD_FINDITEM (English (U.S.)) +Resource133=IDD_AREASONGS (English (U.S.)) +Resource134=IDR_GAME (English (U.S.)) +Resource135=IDD_ITEMUSE (English (U.S.)) +Resource136=IDR_MUSIC (English (U.S.)) +Resource137=IDD_AREAENTRANCE (English (U.S.)) +Resource138=IDD_STORERENTAL (English (U.S.)) +Resource139=IDD_EXTRACT (English (U.S.)) +Resource140=IDD_WEDEDIT (English (U.S.)) +Resource141=IDD_AREAINT (English (U.S.)) +Resource142=IDD_ANIMDIALOG +Resource143=IDD_GAMEEDIT (English (U.S.)) +Resource144=IDR_SCRIPT (English (U.S.)) +Resource145=IDD_SPELLTOOL (English (U.S.)) +Resource146=IDR_TLKMENU (English (U.S.)) +Resource147=IDD_CREATURESKILLS (English (U.S.)) +Resource148=IDR_SPELL (English (U.S.)) +Resource149=IDD_SPELLEQUIP (English (U.S.)) +Resource150=IDD_AREAEDIT (English (U.S.)) +Resource151=IDD_SEARCHNODE (English (U.S.)) +Resource152=IDD_AREADOOR (English (U.S.)) +Resource153=IDD_CREATURERES (English (U.S.)) +Resource154=IDD_MASSCLEAR (English (U.S.)) +Resource155=IDD_ITEMGENERAL (English (U.S.)) +Resource156=IDD_CREATUREUNKNOWN (English (U.S.)) +Resource157=IDD_AREATRIGGERSTRINGS (English (U.S.)) +Resource158=IDR_2DA (English (U.S.)) +Resource159=IDD_WEIDU (English (U.S.)) +Resource160=IDR_ITEM (English (U.S.)) +Resource161=IDD_ADDLINK (English (U.S.)) +Resource162=IDR_PROJECT (English (U.S.)) +Resource163=IDD_SPELLGENERAL (English (U.S.)) +Resource164=IDD_MOSEDIT (English (U.S.)) +Resource165=IDD_GAMESTATS (English (U.S.)) +Resource166=IDD_CREATUREGENERAL (English (U.S.)) +Resource167=IDD_SAVHANDLE (English (U.S.)) +Resource168=IDR_VVC (English (U.S.)) +Resource169=IDD_CHECK (English (U.S.)) +Resource170=IDD_CREATUREOVR (English (U.S.)) +Resource171=IDD_SPELLEXTRA (English (U.S.)) +Resource172=IDD_EFFEDIT (English (U.S.)) +Resource173=IDD_AREAVARIABLE (English (U.S.)) +Resource174=IDD_AREAAMBIENT (English (U.S.)) +Resource175=IDR_WORLDMAP (English (U.S.)) +Resource176=IDR_TREEMENU (English (U.S.)) +Resource177=IDD_ABOUTBOX (English (U.S.)) +Resource178=IDR_AREA (English (U.S.)) +Resource179=IDD_ITEMEXTRA (English (U.S.)) +Resource180=IDD_ITEMEQUIP (English (U.S.)) +Resource181=IDD_AREACONTAINER (English (U.S.)) +Resource182=IDR_STORE (English (U.S.)) +Resource183=IDD_ITEMPICKER (English (U.S.)) +Resource184=IDR_MENUBAR (English (U.S.)) +Resource185=IDD_2DAEDIT (English (U.S.)) +Resource186=IDD_SCHEDULE (English (U.S.)) +Resource187=IDD_SCRIPTEDIT (English (U.S.)) +Resource188=IDD_ITEMEDIT (English (U.S.)) +Resource189=IDD_ITEMDESC (English (U.S.)) +Resource190=IDR_CHUI (English (U.S.)) +Resource191=IDD_SPELLEFFECT (English (U.S.)) +Resource192=IDD_KEYEDIT (English (U.S.)) +Resource193=IDD_CREATUREPST (English (U.S.)) +Resource194=IDD_VVCEDIT (English (U.S.)) +Resource195=IDD_MAPLINK (English (U.S.)) +Resource196=IDD_EDIT (English (U.S.)) +Resource197=IDD_IDSEDIT (English (U.S.)) +Resource198=IDD_PALETTE (English (U.S.)) +Resource199=IDD_AREAANIM (English (U.S.)) +Resource200=IDD_EXTRACT2 (English (U.S.)) +Resource201=IDD_ITEMICONS (English (U.S.)) +Resource202=IDD_COLORPICKER (English (U.S.)) +Resource203=IDR_EFFECT (English (U.S.)) +Resource204=IDD_CFB (English (U.S.)) +Resource205=IDR_CREATURE (English (U.S.)) +Resource206=IDR_SRC (English (U.S.)) +Resource207=IDD_ITEMEFFECT (English (U.S.)) +Resource208=IDR_TILE (English (U.S.)) +Resource209=IDD_PANICBUTTON (English (U.S.)) +Resource210=IDD_SPELLEDIT (English (U.S.)) +Resource211=IDD_CREATUREEDIT (English (U.S.)) +Resource212=IDD_GAMEPCINFO (English (U.S.)) +Resource213=IDD_AREAGENERAL (English (U.S.)) +Resource214=IDD_MUSEDIT (English (U.S.)) +Resource215=IDD_CREATUREIWD2 (English (U.S.)) +Resource216=IDD_GAMEGENERAL (English (U.S.)) +Resource217=IDD_STOREEXTRA (English (U.S.)) +Resource218=IDD_SHOWLOG (English (U.S.)) +Resource219=IDD_SRCEDIT (English (U.S.)) +Resource220=IDD_PROGRESS (English (U.S.)) +Resource221=IDD_POLYGON (English (U.S.)) +Resource222=IDD_TEXTVIEW (English (U.S.)) +Resource223=IDD_STOREDRINKS (English (U.S.)) +Resource224=IDR_IDS (English (U.S.)) +Resource225=IDD_MAPEDIT (English (U.S.)) +Resource226=IDD_STRREFDLG (English (U.S.)) +Resource227=IDD_WEDTILE (English (U.S.)) +Resource228=IDD_PROJEXT (English (U.S.)) +Resource229=IDD_AREASPAWN (English (U.S.)) +Resource230=IDR_WEDMENU (English (U.S.)) +Resource231=IDD_CHUIEDIT (English (U.S.)) +Resource232=IDD_COMPAT (English (U.S.)) +Resource233=IDD_AREAACTOR (English (U.S.)) +Resource234=IDD_DIALOGEDIT (English (U.S.)) +Resource235=IDD_STOREITEMS (English (U.S.)) +Resource236=IDD_TISDIALOG (English (U.S.)) +Resource237=IDD_STOREGENERAL (English (U.S.)) +Resource238=IDD_AREAMAP (English (U.S.)) +Resource239=IDD_CREATUREICONS (English (U.S.)) +Resource240=IDD_CHITEM_DIALOG (English (U.S.)) +Resource241=IDR_BAMMENU (English (U.S.)) +Resource242=IDD_VARIABLES (English (U.S.)) +Resource243=IDD_IAPDIALOG (English (U.S.)) +Resource244=IDD_CREATUREEFF (English (U.S.)) +Resource245=IDD_PROJEDIT (English (U.S.)) Class99=CAreaTriggerString Class100=CPCInfo -Resource246=IDR_MUSIC (English (U.S.)) +Resource246=IDD_CREATUREITEMS (English (U.S.)) Class101=CCreatureOverlay -Resource247=IDD_ITEMICONS (English (U.S.)) +Resource247=IDD_WEDPOLY (English (U.S.)) Class102=IWD2Creature -Resource248=IDR_WEDMENU (English (U.S.)) +Resource248=IDD_STOREEDIT (English (U.S.)) Class103=CAnimDialog Resource249=IDR_SHORTCUT (English (U.S.)) @@ -4165,7 +4165,7 @@ ImplementationFile=2DAEdit.cpp BaseClass=CDialog Filter=D -LastObject=IDC_2DA +LastObject=ID_TOOLS_PLAYSOUND VirtualFilter=dWC [DLG:IDD_IDSEDIT] @@ -8711,8 +8711,8 @@ Control51=IDC_STATIC,static,1342308352 Control52=IDC_STATIC,static,1342308352 Control53=IDC_STATIC,static,1342308352 -Control54=IDC_U3A,edit,1350631552 -Control55=IDC_U3E,edit,1350631552 +Control54=IDC_TRANSPARENT,edit,1350631552 +Control55=IDC_CHANCE,edit,1350631552 Control56=IDC_STATIC,static,1342308352 [DLG:IDD_SCRIPTEDIT (English (U.S.))] @@ -9905,7 +9905,7 @@ [MNU:IDR_2DA (English (U.S.))] Type=1 -Class=? +Class=C2DAEdit Command1=ID_FILE_NEW Command2=ID_FILE_LOAD Command3=ID_FILE_LOADEXTERNALSCRIPT @@ -9917,7 +9917,8 @@ Command9=ID_TOOLS_ADDSPARKDATA Command10=ID_TOOLS_CAPITALIZEENTRIES Command11=ID_TOOLS_LOOKUPSTRREF -CommandCount=11 +Command12=ID_TOOLS_PLAYSOUND +CommandCount=12 [MNU:IDR_IDS (English (U.S.))] Type=1 Modified: chitem/trunk/chitem.rc =================================================================== --- chitem/trunk/chitem.rc 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/chitem.rc 2008-10-24 20:13:35 UTC (rev 5469) @@ -3496,7 +3496,7 @@ EXSTYLE WS_EX_CONTROLPARENT CAPTION "Edit game:" MENU IDR_GAME -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN COMBOBOX IDC_NPCPICKER,11,13,145,230,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP @@ -4038,8 +4038,8 @@ WS_TABSTOP,13,126,79,10 CONTROL "Invisible in fog",IDC_FLAG8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,137,61,10 - CONTROL "Transparent",IDC_FLAG9,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,93,60,54,10 + CONTROL "Ground",IDC_FLAG9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + 93,60,39,10 CONTROL "Draw all cycles",IDC_FLAG10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,71,63,10 CONTROL "Use palette BMP",IDC_FLAG11,"Button",BS_AUTOCHECKBOX | @@ -4088,8 +4088,8 @@ LTEXT "Skip cycles",IDC_STATIC,373,33,37,8 LTEXT "Palette BMP",IDC_STATIC,171,33,40,8 LTEXT "Transparency",IDC_STATIC,373,7,44,8 - EDITTEXT IDC_U3A,373,17,40,14,ES_AUTOHSCROLL - EDITTEXT IDC_U3E,307,43,20,14,ES_AUTOHSCROLL + EDITTEXT IDC_TRANSPARENT,373,17,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_CHANCE,307,43,20,14,ES_AUTOHSCROLL LTEXT "Chance of progress",IDC_STATIC,307,33,62,8 END @@ -6092,8 +6092,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 7,0,0,11 - PRODUCTVERSION 7,0,0,11 + FILEVERSION 7,1,0,1 + PRODUCTVERSION 7,1,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -6111,14 +6111,14 @@ VALUE "Comments", "www.dragonlancetc.com\0" VALUE "CompanyName", "GemRB Project (gemrb.sourceforge.net)\0" VALUE "FileDescription", "DragonLance Total Conversion Editor Pro\0" - VALUE "FileVersion", "7, 0, 0, 11\0" + VALUE "FileVersion", "7, 1, 0, 1\0" VALUE "InternalName", "dltcep\0" - VALUE "LegalCopyright", "Copyright (C) 2002-2007 Avenger\0" + VALUE "LegalCopyright", "Copyright (C) 2002-2008 Avenger\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "chitem.EXE\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "DLTC Editor Pro 7.0k\0" - VALUE "ProductVersion", "7, 0, 0, 11\0" + VALUE "ProductName", "DLTC Editor Pro 7.1b\0" + VALUE "ProductVersion", "7, 1, 0, 1\0" VALUE "SpecialBuild", "\0" END END @@ -6724,6 +6724,7 @@ MENUITEM "&Add spark data", ID_TOOLS_ADDSPARKDATA MENUITEM "&Capitalize entries", ID_TOOLS_CAPITALIZEENTRIES MENUITEM "&Edit strings", ID_TOOLS_LOOKUPSTRREF + MENUITEM "&Play sound", ID_TOOLS_PLAYSOUND END END @@ -7472,8 +7473,26 @@ IDS_FIELDS "1-creature isn't embedded\n8-creature's scripting name overridden" IDS_LABEL "To edit this field, remove the number from the beginning." IDS_EXPIRATION "This field exists in bg2, the item will expire after x hours." + IDS_AVISIBLE "Set it to make the animation visible." + IDS_ABLEND "Per pixel transparency. The darker the pixel, the more transparent it is." + IDS_ANOLIGHT "The animation will be affected by darkness effects (weather, time of day)" + IDS_APARTIAL "The animation will stop after the last frame, it won't restart." + IDS_ASYNC "The animation will start synchronised with other similarly flagged animations. Otherwise its beginning is random." + IDS_ANOWALL "The animation will be always drawn over wall covers." + IDS_AFOG "???" + IDS_ATRANSP "Per surface transparency, 255=invisible. Cannot use with blending." + IDS_AALL "Used for very large animations where a single BAM contains multiple cycles." + IDS_APALETTE "Uses a separate BMP palette, see the palette field." + IDS_AMIRROR "Mirror the animation on the X-axis." + IDS_ACOMBAT "Don't remove the animation in combat, on low settings." + IDS_CHANCE "The chance of drawing the animation. (default:100)" END +STRINGTABLE DISCARDABLE +BEGIN + IDS_GROUND "The animation is covered by actors." +END + #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// Modified: chitem/trunk/chitemDlg.cpp =================================================================== --- chitem/trunk/chitemDlg.cpp 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/chitemDlg.cpp 2008-10-24 20:13:35 UTC (rev 5469) @@ -3,7 +3,7 @@ #include "stdafx.h" -#define PRG_VERSION "7.1" +#define PRG_VERSION "7.1b" #include <fcntl.h> #include <direct.h> @@ -798,6 +798,8 @@ MessageBox("trigger.ids is wrong, triggers won't be resolved.","Warning",MB_ICONEXCLAMATION|MB_OK); break; } + + get_idsfile("ALIGNMEN",1); /* idrefs.Lookup("RACE",tmploc); val=ReadIds(tmploc, race_names,1); Modified: chitem/trunk/resource.h =================================================================== --- chitem/trunk/resource.h 2008-10-24 20:12:02 UTC (rev 5468) +++ chitem/trunk/resource.h 2008-10-24 20:13:35 UTC (rev 5469) @@ -306,6 +306,20 @@ #define IDS_FIELDS 272 #define IDS_LABEL 273 #define IDS_EXPIRATION 274 +#define IDS_AVISIBLE 275 +#define IDS_ABLEND 276 +#define IDS_ANOLIGHT 277 +#define IDS_APARTIAL 278 +#define IDS_ASYNC 279 +#define IDS_ANOWALL 280 +#define IDS_AFOG 281 +#define IDS_ATRANSP 282 +#define IDS_AALL 283 +#define IDS_APALETTE 284 +#define IDS_AMIRROR 285 +#define IDS_ACOMBAT 286 +#define IDS_CHANCE 287 +#define IDS_GROUND 288 #define IDC_RESCAN 1000 #define IDC_RESCAN2 1001 #define IDC_ICONCHK 1002 @@ -1828,6 +1842,7 @@ #define ID_OPTIONS_LOGGING 33042 #define ID_FILE_TP2 33043 #define ID_EXTRACTION_RECOMPRESSSAV 33044 +#define ID_TOOLS_PLAYSOUND 33045 #define ID_CONTEXT 0xF180 // Next default values for new objects @@ -1835,7 +1850,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 233 -#define _APS_NEXT_COMMAND_VALUE 33045 +#define _APS_NEXT_COMMAND_VALUE 33046 #define _APS_NEXT_CONTROL_VALUE 2334 #define _APS_NEXT_SYMED_VALUE 120 #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-24 20:12:06
|
Revision: 5468 http://gemrb.svn.sourceforge.net/gemrb/?rev=5468&view=rev Author: avenger_teambg Date: 2008-10-24 20:12:02 +0000 (Fri, 24 Oct 2008) Log Message: ----------- removed executable flag Property Changed: ---------------- chitem/trunk/tispack.cpp Property changes on: chitem/trunk/tispack.cpp ___________________________________________________________________ Deleted: svn:executable - * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <edheldil@us...> - 2008-10-24 09:01:45
|
Revision: 5467 http://gemrb.svn.sourceforge.net/gemrb/?rev=5467&view=rev Author: edheldil Date: 2008-10-24 08:57:22 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Added some trivial scripts using the infinity module Some work on dialog debugger BCS file parsing Modified Paths: -------------- ie_shell/branches/iesh-infinity/Makefile ie_shell/branches/iesh-infinity/README ie_shell/branches/iesh-infinity/TODO ie_shell/branches/iesh-infinity/iesh ie_shell/branches/iesh-infinity/infinity/builtins.py ie_shell/branches/iesh-infinity/infinity/core.py ie_shell/branches/iesh-infinity/infinity/defaults.py ie_shell/branches/iesh-infinity/infinity/dlg_debugger.py ie_shell/branches/iesh-infinity/infinity/format.py ie_shell/branches/iesh-infinity/infinity/formats/__init__.py ie_shell/branches/iesh-infinity/infinity/formats/bam.py ie_shell/branches/iesh-infinity/infinity/formats/dlg.py ie_shell/branches/iesh-infinity/infinity/formats/ids.py ie_shell/branches/iesh-infinity/infinity/formats/spl.py ie_shell/branches/iesh-infinity/infinity/stream.py Added Paths: ----------- ie_shell/branches/iesh-infinity/ieparse.py ie_shell/branches/iesh-infinity/infinity/formats/bcs.py ie_shell/branches/iesh-infinity/mos2tis.py Modified: ie_shell/branches/iesh-infinity/Makefile =================================================================== --- ie_shell/branches/iesh-infinity/Makefile 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/Makefile 2008-10-24 08:57:22 UTC (rev 5467) @@ -15,5 +15,5 @@ if test -d $(FULLNAME) ; then rm -rf $(FULLNAME); fi clean: - rm -f *.pyc */*.pyc */*/*.pyc *~ */*~ */*/*~ $(FULLNAME).tar.gz MANIFEST + rm -f *.pyc */*.pyc */*/*.pyc *~ */*~ */*/*~ *.tmp *.core $(FULLNAME).tar.gz MANIFEST rm -rf build dist Modified: ie_shell/branches/iesh-infinity/README =================================================================== --- ie_shell/branches/iesh-infinity/README 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/README 2008-10-24 08:57:22 UTC (rev 5467) @@ -99,7 +99,19 @@ to exit the program. +Struc format: +------------- +key - field name, used as a key in the resulting object +type - data type used for read/write and presentation +off - field offset, relative to struc's offset 0x0000 +enum - map of field values to their descriptions or IDS filename +mask - map of bit masks[FIXME: or bit nums?] to their descriptions +size - num of bytes for BYTES data type +count - count of fields of the same type and description +label - label printed for this field + + License, disclaimer and similar stuff: -------------------------------------- Modified: ie_shell/branches/iesh-infinity/TODO =================================================================== --- ie_shell/branches/iesh-infinity/TODO 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/TODO 2008-10-24 08:57:22 UTC (rev 5467) @@ -14,3 +14,7 @@ 4. Strip trailing garbage from strings 5. Signed data types (SWORD, SDWORD,...). Ugly, Adding unsigned ones would be better 6. allow for name enums desc items with count > 1 (e.g. 100 strrefs in CRE) +7. change all *_desc tuples to lists to allow patching in subclasses for other versions of data file + +Streams: +1. Base streams on Python's native file interface, so normal files can be used for reading structures and also the streams can be used with normal python functions. This would require moving the read_(resref|word|...) functions elsewhere, though Added: ie_shell/branches/iesh-infinity/ieparse.py =================================================================== --- ie_shell/branches/iesh-infinity/ieparse.py (rev 0) +++ ie_shell/branches/iesh-infinity/ieparse.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +import sys + +from infinity import core, stream +from infinity.formats import * + +if len (sys.argv) > 1 and sys.argv[1] == '-v': + core.set_option ('format.mos.print_tiles', True) + core.set_option ('format.mos.print_palettes', True) + core.set_option ('format.tis.print_tiles', True) + core.set_option ('format.tis.print_palettes', True) + sys.argv.pop (1) + +if len (sys.argv) > 1: + ffile = sys.argv[1] +else: + raise ValueError ("missing arg!") + + +src = stream.FileStream ().open (ffile) +f = src.load_object () +f.printme () Property changes on: ie_shell/branches/iesh-infinity/ieparse.py ___________________________________________________________________ Added: svn:executable + * Modified: ie_shell/branches/iesh-infinity/iesh =================================================================== --- ie_shell/branches/iesh-infinity/iesh 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/iesh 2008-10-24 08:57:22 UTC (rev 5467) @@ -157,6 +157,9 @@ return commands.pop (0) else: try: return raw_input (prompt) + except KeyboardInterrupt: + print + return '' except EOFError: print return 'quit' @@ -271,10 +274,13 @@ # try to avoid the situation. Ugly hack, there might be other such commands # and moreover it's too easily fooled. + save_stdout = sys.stdout + save_stderr = sys.stdout + if core.get_option ('pager') and not current_command.startswith ('help') and not current_command.startswith ('load_game'): pager = subprocess.Popen (core.get_option ('pager'), shell = True, stdin=subprocess.PIPE) - save_stdout = sys.stdout sys.stdout = pager.stdin + sys.stderr = pager.stdin try: exec (current_command) @@ -287,6 +293,7 @@ pager.stdin.close () pager.wait () sys.stdout = save_stdout + sys.stderr = save_stderr pager = None Modified: ie_shell/branches/iesh-infinity/infinity/builtins.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/builtins.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/builtins.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -23,6 +23,7 @@ namespace on startup.""" import os.path +import traceback from infinity import core from infinity.stream import ResourceStream, FileStream @@ -101,7 +102,7 @@ stream.close () ################################################### -def iterate_objects_by_type (type, fn): +def iterate_objects (fn, filter_fn = None, sort_fn = None, error_fn = None): """Execute function for each object of specified type.""" # FIXME: this function opens and decodes a bif file EACH time some @@ -112,13 +113,40 @@ # print res['resref_name'] # return ResourceStream (res['resref_name'], type).load_object () - for res in filter (lambda res: res['type'] == type, core.keys.resref_list): - print res['resref_name'] - obj = ResourceStream ().open (res['resref_name'], type).load_object () - fn (obj) + resrefs = [] + resrefs.extend (core.keys.resref_list) + if callable (filter_fn): + resrefs = filter (filter_fn, resrefs) + if callable (sort_fn): + resrefs.sort (sort_fn) + for res in resrefs: + print res['resref_name'] + obj = None + + if error_fn in ['msg', 'traceback'] or callable (error_fn): + try: + obj = ResourceStream ().open (res['resref_name'], res['type']).load_object () + fn (res, obj) + except Exception, e: + if callable (error_fn): + error_fn (res, obj, e) + elif error_fn == 'msg': + print e + elif error_fn == 'traceback': + traceback.print_exc () + else: + obj = ResourceStream ().open (res['resref_name'], res['type']).load_object () + fn (res, obj) + + ################################################### +def iterate_objects_by_type (type, fn, filter_fn = None, sort_fn = None, error_fn = None): + """Execute function for each object of specified type.""" + return iterate_objects (fn, filter_fn = lambda r: r['type'] == type, sort_fn = sort_fn, error_fn = error_fn) + +################################################### def find_str (regexp): """Find all strings in core.strrefs matching regular expression. @@ -130,11 +158,11 @@ ################################################### -def sprintf (format_str, params): +def sprintf (format_str, *params): return format_str %(params) -def printf (format_str, params): - print sprintf (format_str, params) +def printf (format_str, *params): + print sprintf (format_str, *params) ################################################### Modified: ie_shell/branches/iesh-infinity/infinity/core.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/core.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/core.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -22,6 +22,8 @@ """ import string +import sys + import defaults global formats @@ -207,6 +209,35 @@ except: return None +def id_to_symbol (idsfile, id): + # FIXME: ugly + import traceback + from stream import ResourceStream + idsfile = idsfile.upper () + + if not ids.has_key (idsfile): + try: + # FIXME: ugly & should use 'IDS' instead of 0x3F0 + idsobj = ResourceStream ().open (idsfile, 0x03F0).load_object () + #idsobj.read () + ids[idsfile] = idsobj + except Exception, e: + traceback.print_exc() + print e + return id + + try: + return ids[idsfile].ids[id] + except KeyError, e: + sys.stderr.write ("Warning: No such id %d in %s\n" %(id, idsfile)) + return id + + #try: + # return core.ids[idsfile.upper ()].ids[id] + #except: + # return None + + def get_option (key): try: return options[key][0] Modified: ie_shell/branches/iesh-infinity/infinity/defaults.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/defaults.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/defaults.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -35,15 +35,18 @@ 'format.biff.read_data': [False, "When reading BIFF file read its data too"], - 'format.key.tick_size': [ 100, "" ], - 'format.key.tack_size': [ 5000, "" ], + 'format.key.tick_size': [ 100, "# of RESREFs read to print a dot" ], + 'format.key.tack_size': [ 5000, "# of RESREFs read to print a number" ], 'format.key.max_read_resrefs': [None, "Max # of RESREFs to read from KEY file"], 'format.mos.print_tiles': [True, "Print MOS tiles"], 'format.mos.print_palettes': [False, "Print MOS palettes"], - 'format.tlk.tick_size': [ 100, "" ], - 'format.tlk.tack_size': [ 5000, "" ], + 'format.tis.print_tiles': [False, "Print TIS tiles"], + 'format.tis.print_palettes': [False, "Print TIS palettes"], + + 'format.tlk.tick_size': [ 100, "# of STRREFs read to print a dot" ], + 'format.tlk.tack_size': [ 5000, "# of STRREFs read to print a number" ], 'format.tlk.decode_strrefs': [True, "Read TLK strrefs, not only header"], } Modified: ie_shell/branches/iesh-infinity/infinity/dlg_debugger.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/dlg_debugger.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/dlg_debugger.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -113,7 +113,7 @@ #print expr if fn in ('global', 'globallt', 'globalgt'): - key = 'global:' + args[1] + ':' + args[0] + key = 'global:' + args[1].upper () + ':' + args[0] if is_merge: value = 0 else: @@ -124,6 +124,14 @@ value = args[2] > value elif fn == 'globalgt': value = args[2] < value + + elif fn == 'globalorglobal': + key = ['global:' + args[1].upper () + ':' + args[0], + 'global:' + args[3].upper () + ':' + args[2]] + if is_merge: + value = [0, 0] + else: + value = values[key[0]] or values[key[1]] elif fn in ('moralelt', 'moralegt'): key = 'PC:morale:' + args[0].upper () @@ -269,6 +277,24 @@ value = True break + elif fn in ('partyitemcountlt', 'partyitemcountgt'): + items[args[0]] = 1 + + if is_merge: + key = [] + value = [] + else: + value = 0 + for pc in get_value ('Party', []): + key = 'actor:' + pc.upper () + ':inv' + inv = get_value (key, {}) + if inv.has_key (args[0]): + value += inv[args[0]] + + if fn.endswith ('lt'): + value = value < args[1] + elif fn.endswith ('gt'): + value = value > args[1] elif fn == 'true': key = 'true' @@ -453,6 +479,19 @@ print "\nIE DLG debugger\n" print "Type '?' or 'h' to print help on debugger commands\n" + self.commands = [ + ('env', '', 'print values of known triggers'), + ('step', '', 'step dialog'), + ('continue', '', 'continue with dialog'), + ('run', '', 'rerun the dialog'), + ('where', '', 'print current dialog, state and phase'), + ('ps', '[num]', 'print state'), + ('help', '[cmd]', 'print help on usage or commands'), + ('quit', '', 'quit the debugger'), + ] + + + while True: #debugger_shell (name, state) if next_dlg is None: @@ -474,21 +513,36 @@ cmd, args = re.split ("\\s+", cmd, 1) except ValueError: args = None + + cmd = cmd.lower () - if cmd == 'q': + # Find which command matches user input + fcmds = [] + for c in self.commands: + if c[0].startswith (cmd): + fcmds.append (c[0]) + + # FIXME: allow bare numbers for transitions!!! + if len (fcmds) == 0: + print 'Unknown command:', cmd + continue + + elif len (fcmds) > 1: + print "Command '%s' may be:", ', '.join (fcmds) + continue + + else: + cmd = fcmds[0] + + + if cmd == 'quit': return None, 0 elif cmd == '': continue - elif cmd == '?' or cmd == 'h': + elif cmd == '?' or cmd == 'help': if args is None: - print """ -env - print values of known triggers -step - step dialog -continue - continue with dialog -run - rerun the dialog -where - print current dialog, state and phase -quit - quit the debugger -""" + for c in self.commands: + print "%-10s\t%-5s\t%s" %(c[0], c[1], c[2]) else: print "help on " + args elif cmd in ('e', 'en', 'env'): @@ -512,7 +566,34 @@ pass set_condition_value (cond, value) + + elif cmd == 'ps': + if args is None: + s = state + else: + s = int (args[0]) + + print "State #%d:" %s + state_obj = d.state_list[s] + d.print_struc (state_obj, d.state_desc) + + if state_obj['trigger_index'] != 0xffffffff: + print "State trigger:" + script_obj = d.state_trigger_list[state_obj['trigger_index']] + d.print_script (script_obj) + try: + print 'Evals to:', eval_function (script_obj['code']) + except KeyError: + print "Unknown trigger" + + j = 0 + for transition in d.transition_list[state_obj['first_transition_index']:state_obj['first_transition_index']+state_obj['transition_cnt']]: + print '\n Trans %d:' %j + d.print_transition (transition) + print "\n" + j = j + 1 + elif cmd == 'r': # FIXME: optional arguments! # FIXME: return to the last run dlg instead of the first one? @@ -523,11 +604,13 @@ d = get_dialog (name) state = 0 address = A_GET_STATE + elif cmd in ('trigger'): try: print eval_function (args) except KeyError: print "Unknown trigger:", args + elif cmd == 'c': step = False break Modified: ie_shell/branches/iesh-infinity/infinity/format.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/format.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/format.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -134,6 +134,9 @@ # { 'key': '', 'type': '', 'off': 0x00, 'label': '' }, + def get_struc_field (self, desc, key, value): + return None + def reset_struc (self, desc, obj): for d in desc: key = d['key'] @@ -455,7 +458,7 @@ - +# FIXME: should be in chui.py ctltype_hash = { 0 : 'button/pixmap', 2 : 'slider', @@ -467,8 +470,8 @@ -def register_format (signature, version, klass): - core.register_format (signature, version, klass) +def register_format (signature, version, klass, desc = None): + core.register_format (signature, version, klass, desc) # End of file format.py Modified: ie_shell/branches/iesh-infinity/infinity/formats/__init__.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/formats/__init__.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/formats/__init__.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -2,6 +2,7 @@ import are import bam +import bcs import biff import chui import cre Modified: ie_shell/branches/iesh-infinity/infinity/formats/bam.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/formats/bam.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/formats/bam.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -161,7 +161,7 @@ self.frame_list = [] self.cycle_list = [] self.palette_entry_list = [] - self.frame_lut_entry_list = [] + self.frame_lut = None def read (self, stream): @@ -183,6 +183,56 @@ self.read_palette (stream, self.header['palette_off']) + def write (self, stream): + # FIXME: incomplete + frame_size = self.get_struc_size (self.frame_desc) + cycle_size = self.get_struc_size (self.cycle_desc) + + self.header['frame_cnt'] = len (self.frame_list) + self.header['cycle_cnt'] = len (self.cycle_list) + self.header['frame_off'] = self.get_struc_size (self.header_desc) + self.header['palette_off'] = self.header['frame_off'] + frame_size * len (self.frame_list) + cycle_size * len (self.cycle_list) + self.header['frame_lut_off'] = self.header['palette_off'] + 4 * 256 + + # NOTE: if self.frame_lut is None, we construct a new one from frames in cycles. + # If it is not None, we assume the LUT has already been constructed and that + # the frame_cnt and frame_lut_ndx data are valid as well + if self.frame_lut is None: + self.frame_lut = [] + for obj in self.cycle_list: + obj['frame_cnt'] = len (obj['frame_list']) + obj['frame_lut_ndx'] = len (self.frame_lut) + self.frame_lut.extend (obj['frame_list']) + + frame_data_off = self.header['frame_lut_off'] + 2 * len (self.frame_lut) + + self.write_header (stream) + + off = self.header['frame_off'] + off2 = frame_data_off + + for obj in self.frame_list: + # FIXME: RLE is encoded in the offset + obj['frame_data_off'] = off2 + self.write_struc (stream, off, self.frame_desc, obj) + # FIXME: rle + off2 += self.write_frame_data (stream, off2, obj) + off += frame_size + + for obj in self.cycle_list: + self.write_struc (stream, off, self.cycle_desc, obj) + off += cycle_size + + for obj in self.palette_entry_list: + self.write_struc (stream, off, self.palette_entry_desc, obj) + off += 4 # FIXME + + for l in self.frame_lut: + stream.write_word (l, off) + off += 2 + + + def printme (self): self.print_header () @@ -274,8 +324,10 @@ if pix == compressed_color: off = off + 1 cnt = struct.unpack ('B', stream.get_char (off))[0] - for j in range (cnt + 1): - data.append (compressed_color) + # FIXME: that's strange, only one color is compressed? + data.extend ([compressed_color] * (cnt + 1)) +# for j in range (cnt + 1): +# data.append (compressed_color) else: data.append (pix) @@ -283,6 +335,68 @@ obj['frame_data'] = data + + def write_frame_data (self, stream, off, obj): + #data = obj['frame_data'] + # FIXME: allow writing uncompressed + data = self.compress_frame_data (obj) + data = struct.pack ('%dB' %len (data), *data) + stream.write_blob (data, off) + return len (data) + + + + def find_compressed_color (self, stream, off, obj): + """Find color which benefits most from compression""" + comp_data = [] + last_pixel = obj['frame_data'][0] + count = 0 + + for pixel in obj['frame_data']: + if pixel == last_pixel: + count += 1 + elif count < min_count: + ### FIXME: count! + # FIXME: split if count > 255 + comp_data.extend ([last_pixel] * count) + last_pixel = pixel + count = 1 + else: + comp_data.extend ([]) + + data = struct.pack ('%dB' %len (obj['frame_data']), *obj['frame_data']) + stream.write_blob (data, off) + return len (data) + + + def compress_frame_data (self, obj): + comp_data = [] + count = 0 + compressed_color = self.header['comp_color_ndx'] + # FIXME: check if orig IE BAMs do not split compressed run on pixel row end + for pixel in obj['frame_data']: + if pixel != compressed_color: + if count > 0: + comp_data.append (compressed_color) + comp_data.append (count - 1) + count = 0 + comp_data.append(pixel) + + else: + count += 1 + if count == 256: + comp_data.append (compressed_color) + comp_data.append (count - 1) + count = 0 + + if count > 0: + comp_data.append (compressed_color) + comp_data.append (count - 1) + + + return comp_data + + def print_frame_data (self, obj): ndx = 0 for i in range (obj['height']): @@ -313,9 +427,55 @@ ndx = ndx + 1 print print + + + # FIXME: use stream instead of fh? + def write_frame_ppm (self, fh, obj): + fh.write ("P6\n") + fh.write ("# ie_shell BAM frame %d %d\n" %(obj['xcenter'], obj['ycenter'])); + #fh.write ("# ie_shell BAM2 frame %d %d\n" %(obj['xcenter'], obj['ycenter'])); + fh.write ("%d %d\n" %(obj['width'], obj['height'])); + fh.write ("255\n"); + ndx = 0 + for i in range (obj['height']): + for j in range (obj['width']): + pix = obj['frame_data'][ndx] + #if pix == transparent_color: + # ..... + + col= self.palette_entry_list[pix] + fh.write ('%c%c%c' %(col['r'], col['g'], col['b'])) + ndx = ndx + 1 + def read_frame_ppm (self, fh): + line = fh.readline () + if line != 'P6\n': + print "Not PNM P6 header" + return None + + line = fh.readline () + while line.startswith ('#'): + line = fh.readline () + + try: + width, height = map (int, line.split(" ")) + except e: + print "Not PNM" + return None + + buf = fh.read () + print len(buf) + ndx = 0 + for i in range (height): + for j in range (width): + print buf[ndx], buf[ndx+1], buf[ndx+2] + r, g, b = map (int, (buf[ndx], buf[ndx+1], buf[ndx+2])) + print r, g, b + + ndx += 3 + class BAMC_Format (BAM_Format): envelope_desc = ( { 'key': 'signature', Added: ie_shell/branches/iesh-infinity/infinity/formats/bcs.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/formats/bcs.py (rev 0) +++ ie_shell/branches/iesh-infinity/infinity/formats/bcs.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -0,0 +1,469 @@ +# -*-python-*- +# ie_shell.py - Simple shell for Infinity Engine-based game files +# Copyright (C) 2004-2008 by Jaroslav Benkovsky, <edheldil@...> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import re + +from infinity import core +from infinity.format import Format, register_format + + +class BCS_Format (Format): + fn_spec_re = re.compile ('([A-Za-z0-9_]+)\s*\((.*)\)') + + def __init__ (self): + self.c = None + self.token = None + self.lineno = 1 + self.ids_codes = {} + + + def read_token (self, stream): + def getc (): + if self.c is None: + return stream.get_char () + else: + c = self.c + self.c = None + return c + + def nextc (): + if self.c is None: + self.c = stream.get_char () + return self.c + else: + return self.c + + # Skip over spaces and newlines + c = getc () + while c.isspace (): + if c == "\n": + self.lineno += 1 + c = getc () + + if c == '': + return None + + elif c == '[': + res = c + while True: + c = getc () + res = res + c + if c == ']': + break + return res + + elif c == '"': + res = c + while True: + c = getc () + res = res + c + if c == '"': + break + return res + + elif c.isdigit () or (c == '-' and nextc ().isdigit ()): + if c == '-': + signum = -1 + c = getc () + else: + signum = 1 + + res = c + while nextc ().isdigit (): + res = res + getc () + res = signum * int (res) + return res + + elif c.isupper (): + res = c + while nextc ().isalpha (): + res = res + getc () + return res + + else: + raise ValueError ("Unknown token: %s (at line %d)" %(c, self.lineno)) + + + def get_token (self, stream): + if self.token is None: + tok = self.read_token (stream) + #p='.' + else: + tok = self.token + self.token = None + #p='x' + + #print '>>' + p+':'+repr(tok) + '<<' + return tok + + def next_token (self, stream): + if self.token is None: + self.token = self.read_token (stream) + return self.token + else: + return self.token + + def expect_token (self, stream, tok): + rtok = self.get_token (stream) + if rtok != tok: + raise ValueError ("Expected %s, got %s (at line %d)" %(tok, str (rtok), self.lineno)) + return rtok + + + def read (self, stream): + ### <SC> -> SC <SCtail> + ### <SCtail> -> <CR> <SCtail> + ### <SCtail> -> SC + + obj = [] + + obj.append (self.expect_token (stream, 'SC')) + while self.next_token (stream) == 'CR': + obj.append (self.read_condition_response_block (stream)) + self.expect_token (stream, 'SC') + + self.script = obj + return self + + + def read_condition_response_block (self, stream): + ### <CR> -> CR <CRtail> + ### <CRtail> -> <CO> <RS> <CRtail> + ### <CRtail> -> CR + + obj = [] + + obj.append (self.expect_token (stream, 'CR')) + while self.next_token (stream) == 'CO': + obj.append (self.read_condition (stream)) + obj.append (self.read_response_set (stream)) + self.expect_token (stream, 'CR') + + return obj + + + def read_condition (self, stream): + ### <CO> -> CO <COtail> + ### <COtail> -> <TR> <COtail> + ### <COtail> -> CO + + obj = [] + + obj.append (self.expect_token (stream, 'CO')) + while self.next_token (stream) == 'TR': + obj.append (self.read_trigger (stream)) + self.expect_token (stream, 'CO') + + return obj + + def read_trigger (self, stream): + # pst: id, 4*I, point, 2*S, O + # FIXME: not correct, one of the ints is flags field + obj = [] + + obj.append (self.expect_token (stream, 'TR')) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.read_object (stream)) + self.expect_token (stream, 'TR') + + self.add_ids_code('TRIGGER', obj[1]) + #print core.id_to_symbol ('TRIGGER', obj[1]) + return obj + + def read_response_set (self, stream): + ### <RS> -> RS <RStail> + ### <RStail> -> <RE> <RStail> + ### <RStail> -> RS + + obj = [] + obj.append (self.expect_token (stream, 'RS')) + while self.next_token (stream) == 'RE': + obj.append (self.read_response (stream)) + self.expect_token (stream, 'RS') + + return obj + + def read_response (self, stream): + ### <RE> -> RE int <AC> <REtail> + ### <REtail> -> <AC> <REtail> + ### <REtail> -> RE + # FIXME: this is different from what is described in IESDP, where + # each response has only one action, but e.g. look at PST's 0202FD1.BCS + + obj = [] + obj.append (self.expect_token (stream, 'RE')) + obj.append (self.get_token (stream)) + while self.next_token (stream) == 'AC': + obj.append (self.read_action (stream)) + self.expect_token (stream, 'RE') + + return obj + + def read_action (self, stream): + #pst: id, 3*O, 5*I, 2*S + obj = [] + obj.append (self.expect_token (stream, 'AC')) + obj.append (self.get_token (stream)) + obj.append (self.read_object (stream)) + obj.append (self.read_object (stream)) + obj.append (self.read_object (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + self.expect_token (stream, 'AC') + self.add_ids_code('ACTION', obj[1]) + return obj + + + def read_object (self, stream): + obj = [] + # PST: id, 13*I, rect, S + obj.append (self.expect_token (stream, 'OB')) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + #print obj + #if self.next_token (stream) == 'OB': + # print "short object" + # self.get_token (stream) + # return obj + + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + obj.append (self.get_token (stream)) + self.expect_token (stream, 'OB') + + #print core.id_to_symbol ('OBJECT', obj[10]) + return obj + + def printme (self): + odef = { + 'pst_tr': { + 'id': (0,), + 'I': (1, 3), + 'not': (2,), + 'P': (5,), + 'S': (6,7), + 'O': (8,), + }, + 'pst_ac': { + 'id': (0,), + 'O': (2,3,1), + 'I': (4, 7, 8), + 'P': (5,), # actually, it consists of two integers + 'S': (9, 10), + }, + } + + # FIXME: globalsetglobal, globalorglobal, ... + split_string_fns = ('global', + 'globalgt', + 'globallt', + 'globalband', + 'globalbor', + 'globalmin', + 'globalmax', + 'globalshl', + 'globalshr', + 'globalxor', + 'bitcheck', + 'bitcheckexact', + + 'globalset', + 'setglobal', + 'incrementglobal', + 'bitset', + 'bitclear') + + game_type = 'pst' + + def resolve_object (obj): + res = [] + if obj[1] != 0: + res.append (core.id_to_symbol ('EA', obj[1])) + if obj[2] != 0: + res.append (core.id_to_symbol ('FACTION', obj[2])) + if obj[3] != 0: + res.append (core.id_to_symbol ('TEAM', obj[3])) + if obj[4] != 0: + res.append (core.id_to_symbol ('GENERAL', obj[4])) + if obj[5] != 0: + res.append (core.id_to_symbol ('RACE', obj[5])) + if obj[6] != 0: + res.append (core.id_to_symbol ('CLASS', obj[6])) + if obj[7] != 0: + res.append (core.id_to_symbol ('SPECIFIC', obj[7])) + if obj[8] != 0: + res.append (core.id_to_symbol ('GENDER', obj[8])) + if obj[9] != 0: + res.append (core.id_to_symbol ('ALIGNMEN', obj[9])) + + if res: + res = '[' + '.'.join (res) + ']' + else: + res = None + + res2 = None + if obj[10] != 0: + res2 = core.id_to_symbol ('OBJECT', obj[10]) + if obj[11] != 0: + res2 = core.id_to_symbol ('OBJECT', obj[11]) + '(' + res2 +')' + if obj[12] != 0: + res2 = core.id_to_symbol ('OBJECT', obj[12]) + '(' + res2 +')' + if obj[13] != 0: + res2 = core.id_to_symbol ('OBJECT', obj[13]) + '(' + res2 +')' + if obj[14] != 0: + res2 = core.id_to_symbol ('OBJECT', obj[14]) + '(' + res2 +')' + + # FIXME: what about area?? [-1.-1.-1.-1] (15) + res3 = None + if obj[16] != '""': + res3 = obj[16] + + if (res and res2) or (res and res3) or (res2 and res3): + raise ValueError ("Error: More values for object: " + repr (res) + '//' + repr (res2) + '//' + repr (res3)) + + if res: + return res + elif res2: + return res2 + elif res3: + return res3 + else: + return "'OBJ" + + + def resolve_args (fn_spec, obj_type, obj): + mo = self.fn_spec_re.match (fn_spec) + fn_name = mo.groups ()[0] + args = mo.groups ()[1].split (",") + arg_indices = {} + res_args = [] + + split_string_arg = fn_name.lower () in split_string_fns + + for arg in args: + #print 'arg', fn_spec, arg + if arg == '': + break + type, name = arg.split (':') + name, file = name.split ('*') + + if arg_indices.has_key (type): + arg_indices[type] = index = arg_indices[type] + 1 + else: + arg_indices[type] = index = 0 + + #print 'ot:', obj_type, 'type;', type, 'index:', index + if not split_string_arg or type != 'S' or index == 0: + aindex = odef[game_type + '_' + obj_type][type][index] + 1 + else: + aindex = odef[game_type + '_' + obj_type][type][index-1] + 1 + + + if type == 'I': + v = str (obj[aindex]) + #print 'Lookup', file, tr[index + 1] + if file: + v = core.id_to_symbol (file, obj[aindex]) + res_args.append (v) + + elif type == 'P': + res_args.append ('[%d.%d]' %(obj[aindex], obj[aindex+1])) + + elif type == 'S': + if split_string_arg: + if index == 0: + res_args.append ('"' + obj[aindex][7:]) + res_args.append (obj[aindex][0:7] + '"') + elif index == 1: + pass + else: + res_args.append (obj[aindex]) + else: + res_args.append (obj[aindex]) + + elif type == 'O': + res_args.append (resolve_object (obj[aindex])) + + return fn_name, res_args + + + + + for cr in self.script[1:]: + co = cr[1] + rs = cr[2] + print 'IF' + for tr in co[1:]: + fn_spec = core.id_to_symbol ('TRIGGER', tr[1]) + neg = ('!', '')[not tr[3]] # FIXME: hack, use odef[] + + #print tr_decl + fn_name, res_args = resolve_args (fn_spec, 'tr', tr) + print ' ' + neg + fn_name + '(' + ','.join (res_args) + ')' + #print ' TR', tr_name + '#0x%04x' %tr[1] + print 'THEN' + for re in rs[1:]: + print ' RESPONSE #%d' %re[1] + for ac in re[2:]: + #print 'AC', ac[1] + fn_spec = core.id_to_symbol ('ACTION', ac[1]) + fn_name, res_args = resolve_args (fn_spec, 'ac', ac) + print ' ' + fn_name + '(' + ','.join (res_args) + ')' + print 'END\n' + + + def add_ids_code (self, ids, id): + ids = ids.upper () + if not self.ids_codes.has_key (ids): + self.ids_codes[ids] = {} + if not self.ids_codes[ids].has_key (id): + self.ids_codes[ids][id] = 1 + else: + self.ids_codes[ids][id] += 1 + + def uses_ids_code (self, ids, code): + try: + return self.ids_codes[ids.upper ()][code] + except: + return False + + +register_format ('BCS', '', BCS_Format) Modified: ie_shell/branches/iesh-infinity/infinity/formats/dlg.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/formats/dlg.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/formats/dlg.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -21,7 +21,7 @@ from infinity.format import Format, register_format class DLG_Format (Format): - header_desc = ( + header_desc = [ { 'key': 'signature', 'type': 'STR4', 'off': 0x0000, @@ -85,7 +85,7 @@ 'off': 0x002C, 'label': 'Number of actions'}, - ) + ] state_desc = ( { 'key': 'npc_text', @@ -183,19 +183,22 @@ def read (self, stream): self.read_header (stream) - off = self.header['state_off'] - for i in range (self.header['state_cnt']): - obj = {} - self.read_state (stream, off, obj) - self.state_list.append (obj) - off = off + 16 + self.read_list (stream, 'state') + self.read_list (stream, 'transition') + +# off = self.header['state_off'] +# for i in range (self.header['state_cnt']): +# obj = {} +# self.read_state (stream, off, obj) +# self.state_list.append (obj) +# off = off + 16 - off = self.header['transition_off'] - for i in range (self.header['transition_cnt']): - obj = {} - self.read_transition (stream, off, obj) - self.transition_list.append (obj) - off = off + 32 +# off = self.header['transition_off'] +# for i in range (self.header['transition_cnt']): +# obj = {} +# self.read_transition (stream, off, obj) +# self.transition_list.append (obj) +# off = off + 32 off = self.header['state_trigger_off'] @@ -231,17 +234,20 @@ def printme (self): self.print_header () - i = 0 - for obj in self.state_list: - print 'State #%d' %i - self.print_state (obj) - i = i + 1 + self.print_list ('state') + self.print_list ('transition') + +# i = 0 +# for obj in self.state_list: +# print 'State #%d' %i +# self.print_state (obj) +# i = i + 1 - i = 0 - for obj in self.transition_list: - print 'Transition #%d' %i - self.print_transition (obj) - i = i + 1 +# i = 0 +# for obj in self.transition_list: +# print 'Transition #%d' %i +# self.print_transition (obj) +# i = i + 1 i = 0 for obj in self.state_trigger_list: @@ -262,12 +268,12 @@ i = i + 1 - def read_state (self, stream, offset, obj): - self.read_struc (stream, offset, self.state_desc, obj) +# def read_state (self, stream, offset, obj): +# self.read_struc (stream, offset, self.state_desc, obj) +# +# def read_transition (self, stream, offset, obj): +# self.read_struc (stream, offset, self.transition_desc, obj) - def read_transition (self, stream, offset, obj): - self.read_struc (stream, offset, self.transition_desc, obj) - def read_script (self, stream, offset, obj): self.read_struc (stream, offset, self.script_desc, obj) @@ -285,12 +291,12 @@ # obj['feature_list'].append (obj2) # off2 = off2 + 48 - def print_state (self, obj): - self.print_struc (obj, self.state_desc) +# def print_state (self, obj): +# self.print_struc (obj, self.state_desc) +# +# def print_transition (self, obj): +# self.print_struc (obj, self.transition_desc) - def print_transition (self, obj): - self.print_struc (obj, self.transition_desc) - def print_script (self, obj): self.print_struc (obj, self.script_desc) @@ -310,27 +316,45 @@ j = 0 for transition in self.transition_list[state['first_transition_index']:state['first_transition_index']+state['transition_cnt']]: print '\n Trans %d:' %j - if (transition['flags'] & 0x02) and transition['trigger_index'] != 0xffffffff: - print ' Trigger:', self.transition_trigger_list[transition['trigger_index']]['code'] - - if (transition['flags'] & 0x01) and transition['pc_text'] != 0xffffffff: - if core.strrefs: - print ' Text:', core.strrefs.strref_list[transition['pc_text']]['string'] - else: - print ' Text:', transition['pc_text'] - - if (transition['flags'] & 0x04) and transition['action_index'] != 0xffffffff: - print ' Action:', self.action_list[transition['action_index']]['code'] - - if not (transition['flags'] & 0x08): - print ' ->', transition['next_dialog'], ":", transition['next_state'] - else: - print ' -> FIN' - + self.print_transition (transition) print "\n" j = j + 1 i = i + 1 + def print_transition (self, transition): + if (transition['flags'] & 0x02) and transition['trigger_index'] != 0xffffffff: + print ' Trigger:', self.transition_trigger_list[transition['trigger_index']]['code'] + + if (transition['flags'] & 0x01) and transition['pc_text'] != 0xffffffff: + if core.strrefs: + print ' Text:', core.strrefs.strref_list[transition['pc_text']]['string'] + else: + print ' Text:', transition['pc_text'] + + if (transition['flags'] & 0x04) and transition['action_index'] != 0xffffffff: + print ' Action:', self.action_list[transition['action_index']]['code'] + + if not (transition['flags'] & 0x08): + print ' ->', transition['next_dialog'], ":", transition['next_state'] + else: + print ' -> FIN' + + + +class DLG_V19_Format (DLG_Format): + """Referenced in IESDP, but where is it used? And what's the signature???""" + + # FIXME: struc descs are not inherited from parent class!!! +# DLG_V19_Format.header_desc.append ( +# { 'key': 'flags', +# 'type': 'DWORD', +# 'off': 0x0030, +# 'label': 'Flags'}, +# ) + + def __init__ (self): + DLG_Format.__init__ (self) register_format ('DLG', 'V1.0', DLG_Format) +#register_format ('DLG', 'V1.09', DLG_V19_Format) # What's the signature???? Modified: ie_shell/branches/iesh-infinity/infinity/formats/ids.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/formats/ids.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/formats/ids.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -33,19 +33,19 @@ def read (self, stream): s = "" line_no = 0 - + while s is not None: s = stream.get_line () if s is None: break - + line_no = line_no + 1 s = s.strip () if s == '': continue - if line_no == 1 and (re.match ("^[0-9]+$", s) or re.match ("^IDS", s)): + if line_no == 1 and (re.match ("^-?[0-9]+$", s) or re.match ("^IDS", s)): continue key, value = s.split (None, 1) Modified: ie_shell/branches/iesh-infinity/infinity/formats/spl.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/formats/spl.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/formats/spl.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -20,7 +20,7 @@ from infinity.format import Format, register_format class SPL_Format (Format): - header_desc = ( + header_desc = [ { 'key': 'signature', 'type': 'STR4', 'off': 0x0000, @@ -188,7 +188,7 @@ 'off': 0x0070, 'label': 'Casting feature count'}, - ) + ] extended_header_desc = ( { 'key': 'spell_form', @@ -435,5 +435,32 @@ def print_feature (self, obj): self.print_struc (obj, self.feature_desc) - -register_format ('SPL', 'V1', SPL_Format) + + +class SPL_V20_Format (SPL_Format): + SPL_Format.header_desc.extend ([ + { 'key': 'duration_modifier_level', + 'type': 'BYTE', + 'off': 0x0072, + 'label': 'Duration modifier (level)' }, + + { 'key': 'duration_modifier_rounds', + 'type': 'BYTE', + 'off': 0x0073, + 'label': 'Duration modifier (rounds)' }, + + { 'key': 'unknown_73', + 'type': 'BYTES', + 'off': 0x0074, + 'size': 14, + 'label': 'Unknown 0x73' }, + ]) + + ###Format.get_struc_field (None, SPL_Format.extended_header_desc, 'off', 0x24)['enum'] = { 0: 'None' } + + def __init__ (self): + SPL_Format.__init__ (self) + + +register_format ('SPL', 'V1', SPL_Format, "Should be done except of enums") +register_format ('SPL', 'V2.0', SPL_V20_Format, "Should be done except of enums") Modified: ie_shell/branches/iesh-infinity/infinity/stream.py =================================================================== --- ie_shell/branches/iesh-infinity/infinity/stream.py 2008-10-23 16:00:48 UTC (rev 5466) +++ ie_shell/branches/iesh-infinity/infinity/stream.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -234,6 +234,9 @@ if re.match ("[0-9]{1,4}[\r\n ]", s) or re.match ("0[xX][0-9A-Fa-f]{1,4} ", s) or re.match ("-1[\r\n]", s): signature = "IDS" version = "" + elif s == "SC\nCR\nCO" or s == "SC\r\nCR\r\n": + signature = "BCS" + version = "" else: signature = s[0:4].strip () version = s[4:8].strip () @@ -253,6 +256,7 @@ def load_object (self, type = 0): fmt = self.get_format () obj = fmt () + self.seek (0) obj.read (self) return obj @@ -414,7 +418,7 @@ if core.keys is None: raise RuntimeError, "Core game files are not loaded. See load_game ()." - oo = core.keys.get_resref_by_name_re (self.resref) + oo = core.keys.get_resref_by_name (self.resref) if self.type is not None: oo = filter (lambda o: o['type'] == self.type, oo) @@ -447,6 +451,6 @@ def open (self, membuffer, name = '<compressed stream>'): return MemoryStream.open (self, gzip.zlib.decompress (membuffer), name) - + # End of file stream.py Added: ie_shell/branches/iesh-infinity/mos2tis.py =================================================================== --- ie_shell/branches/iesh-infinity/mos2tis.py (rev 0) +++ ie_shell/branches/iesh-infinity/mos2tis.py 2008-10-24 08:57:22 UTC (rev 5467) @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +"""Convert Infinity Engine MOS file to TIS file""" + +import sys + +from infinity import core +from infinity.formats import mos, tis +from infinity import stream + +ifile = stream.FileStream ().open (sys.argv[1]) +mos_fmt = mos.MOS_Format ().read (ifile) + +tis_fmt = tis.TIS_Format ().read (stream.MemoryStream ().open ('TIS V1 ' + 32 * '\0')) +tis_fmt.from_mos (mos_fmt) + +ofile = stream.FileStream ().open (sys.argv[2], 'w') +tis_fmt.write (ofile) Property changes on: ie_shell/branches/iesh-infinity/mos2tis.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-23 16:00:55
|
Revision: 5466 http://gemrb.svn.sourceforge.net/gemrb/?rev=5466&view=rev Author: avenger_teambg Date: 2008-10-23 16:00:48 +0000 (Thu, 23 Oct 2008) Log Message: ----------- added custom portrait feature (with all the updates to iwd/how) Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/how/CharGen.py gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py Modified: gemrb/trunk/gemrb/GUIScripts/how/CharGen.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/how/CharGen.py 2008-10-23 14:58:07 UTC (rev 5465) +++ gemrb/trunk/gemrb/GUIScripts/how/CharGen.py 2008-10-23 16:00:48 UTC (rev 5466) @@ -39,7 +39,7 @@ GenderDoneButton = 0 Portrait = 0 -PortraitTable = 0 +PortraitsTable = 0 PortraitPortraitButton = 0 RaceButton = 0 @@ -385,7 +385,11 @@ SetColorStat (MyChar, IE_LEATHER_COLOR, 0x16 ) SetColorStat (MyChar, IE_ARMOR_COLOR, 0x17 ) - GemRB.FillPlayerInfo(MyChar, PortraitName+"L", PortraitName+"S") + #does all the rest + LargePortrait = GemRB.GetToken ("LargePortrait") + SmallPortrait = GemRB.GetToken ("SmallPortrait") + GemRB.FillPlayerInfo (MyChar, LargePortrait, SmallPortrait) + #10 is a weapon slot (see slottype.2da row 10) GemRB.CreateItem(MyChar, "staf01", 10, 1, 0, 0) GemRB.SetEquippedQuickSlot(MyChar, 0) @@ -589,13 +593,13 @@ return def PortraitSelect(): - global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitTable + global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitsTable GemRB.SetVisible (CharGenWindow, 0) PortraitWindow = GemRB.LoadWindow (11) # this is not the correct one, but I don't know which is - PortraitTable = GemRB.LoadTable ("PICTURES") + PortraitsTable = GemRB.LoadTable ("PICTURES") Portrait = 0 PortraitPortraitButton = GemRB.GetControl (PortraitWindow, 1) @@ -627,43 +631,155 @@ GemRB.SetEvent (PortraitWindow, PortraitCancelButton, IE_GUI_BUTTON_ON_PRESS, "PortraitCancelPress") GemRB.SetText (PortraitWindow, PortraitCancelButton, 13727) - while GemRB.GetTableValue (PortraitTable, Portrait, 0) != GemRB.GetVar ("Gender"): + while GemRB.GetTableValue (PortraitsTable, Portrait, 0) != GemRB.GetVar ("Gender"): Portrait = Portrait + 1 - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") GemRB.SetVisible (PortraitWindow, 1) return def PortraitLeftPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait - 1 if Portrait < 0: - Portrait = GemRB.GetTableRowCount (PortraitTable) - 1 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + Portrait = GemRB.GetTableRowCount (PortraitsTable) - 1 + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return def PortraitRightPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait + 1 - if Portrait == GemRB.GetTableRowCount (PortraitTable): + if Portrait == GemRB.GetTableRowCount (PortraitsTable): Portrait = 0 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return +def CustomDone(): + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton + + Window = CustomWindow + + PortraitName = GemRB.QueryText (Window, PortraitList2) + GemRB.SetToken ("SmallPortrait", PortraitName) + PortraitName = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", PortraitName) + GemRB.UnloadWindow (Window) + + GemRB.UnloadWindow (PortraitWindow) + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, PortraitName) + GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) + GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) + GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) + GemRB.SetButtonFlags (CharGenWindow, RaceButton, IE_GUI_BUTTON_DEFAULT, OP_OR) + CharGenState = 1 + Portrait = -1 + SetCharacterDescription() + GemRB.SetVisible (CharGenWindow, 1) + return + +def CustomAbort(): + GemRB.UnloadWindow (CustomWindow) + return + +def LargeCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList1) + #small hack + if GemRB.GetVar ("Row1") == RowCount1: + return + + Label = GemRB.GetControl (Window, 0x10000007) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTMD" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList2)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 0) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTMD") + return + +def SmallCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList2) + #small hack + if GemRB.GetVar ("Row2") == RowCount2: + return + + Label = GemRB.GetControl (Window, 0x10000008) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTSM" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList1)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 1) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTSM") + return + def PortraitCustomPress(): + global PortraitList1, PortraitList2 + global RowCount1, RowCount2 + global CustomWindow + + CustomWindow = Window = GemRB.LoadWindow (18) + PortraitList1 = GemRB.GetControl (Window, 2) + RowCount1 = GemRB.GetPortraits (Window, PortraitList1, 0) + GemRB.SetEvent (Window, PortraitList1, IE_GUI_TEXTAREA_ON_CHANGE, "LargeCustomPortrait") + GemRB.SetVar ("Row1", RowCount1) + GemRB.SetVarAssoc (Window, PortraitList1, "Row1",RowCount1) + + PortraitList2 = GemRB.GetControl (Window, 4) + RowCount2 = GemRB.GetPortraits (Window, PortraitList2, 1) + GemRB.SetEvent (Window, PortraitList2, IE_GUI_TEXTAREA_ON_CHANGE, "SmallCustomPortrait") + GemRB.SetVar ("Row2", RowCount2) + GemRB.SetVarAssoc (Window, PortraitList2, "Row2",RowCount2) + + Button = GemRB.GetControl (Window, 6) + GemRB.SetText (Window, Button, 11973) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomDone") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + + Button = GemRB.GetControl (Window, 7) + GemRB.SetText (Window, Button, 15416) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomAbort") + + Button = GemRB.GetControl (Window, 0) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"L" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTMD") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + Button = GemRB.GetControl (Window, 1) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"S" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTSM") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + GemRB.ShowModal (Window, MODAL_SHADOW_NONE) return def PortraitDonePress(): - global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitTable, Portrait, GenderButton, RaceButton + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton - GemRB.UnloadWindow (PortraitWindow) - GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "L") + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait ) + GemRB.SetToken ("SmallPortrait", PortraitName+"S") + GemRB.SetToken ("LargePortrait", PortraitName+"L") + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "L") GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) @@ -671,6 +787,7 @@ CharGenState = 1 SetCharacterDescription() GemRB.SetVisible (CharGenWindow, 1) + GemRB.UnloadWindow (PortraitWindow) return def PortraitCancelPress(): @@ -2049,16 +2166,21 @@ def AppearancePress(): global CharGenWindow, AppearanceWindow, AppearanceTable - global PortraitTable, Portrait, AppearanceAvatarButton, PortraitName + global PortraitsTable, Portrait, AppearanceAvatarButton, PortraitName global AppearanceHairButton, AppearanceSkinButton global AppearanceMajorButton, AppearanceMinorButton global HairColor, SkinColor, MajorColor, MinorColor GemRB.SetVisible (CharGenWindow, 0) AppearanceWindow = GemRB.LoadWindow (13) - PortraitName = GemRB.GetTableRowName (PortraitTable, Portrait) AppearanceTable = GemRB.LoadTable ("PORTCOLR") - PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + + if Portrait<0: + PortraitIndex = 0 + else: + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait) + PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + HairColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 1) GemRB.SetVar ("HairColor", HairColor) SkinColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 2) Modified: gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py 2008-10-23 14:58:07 UTC (rev 5465) +++ gemrb/trunk/gemrb/GUIScripts/iwd/CharGen.py 2008-10-23 16:00:48 UTC (rev 5466) @@ -39,7 +39,7 @@ GenderDoneButton = 0 Portrait = 0 -PortraitTable = 0 +PortraitsTable = 0 PortraitPortraitButton = 0 RaceButton = 0 @@ -385,7 +385,11 @@ SetColorStat (MyChar, IE_LEATHER_COLOR, 0x16 ) SetColorStat (MyChar, IE_ARMOR_COLOR, 0x17 ) - GemRB.FillPlayerInfo(MyChar, PortraitName+"L", PortraitName+"S") + #does all the rest + LargePortrait = GemRB.GetToken ("LargePortrait") + SmallPortrait = GemRB.GetToken ("SmallPortrait") + GemRB.FillPlayerInfo (MyChar, LargePortrait, SmallPortrait) + #10 is a weapon slot (see slottype.2da row 10) GemRB.CreateItem(MyChar, "staf01", 10, 1, 0, 0) GemRB.SetEquippedQuickSlot(MyChar, 0) @@ -589,13 +593,13 @@ return def PortraitSelect(): - global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitTable + global CharGenWindow, PortraitWindow, Portrait, PortraitPortraitButton, PortraitsTable GemRB.SetVisible (CharGenWindow, 0) PortraitWindow = GemRB.LoadWindow (11) # this is not the correct one, but I don't know which is - PortraitTable = GemRB.LoadTable ("PICTURES") + PortraitsTable = GemRB.LoadTable ("PICTURES") Portrait = 0 PortraitPortraitButton = GemRB.GetControl (PortraitWindow, 1) @@ -627,43 +631,155 @@ GemRB.SetEvent (PortraitWindow, PortraitCancelButton, IE_GUI_BUTTON_ON_PRESS, "PortraitCancelPress") GemRB.SetText (PortraitWindow, PortraitCancelButton, 13727) - while GemRB.GetTableValue (PortraitTable, Portrait, 0) != GemRB.GetVar ("Gender"): + while GemRB.GetTableValue (PortraitsTable, Portrait, 0) != GemRB.GetVar ("Gender"): Portrait = Portrait + 1 - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") GemRB.SetVisible (PortraitWindow, 1) return def PortraitLeftPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait - 1 if Portrait < 0: - Portrait = GemRB.GetTableRowCount (PortraitTable) - 1 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + Portrait = GemRB.GetTableRowCount (PortraitsTable) - 1 + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return def PortraitRightPress(): - global PortraitWindow, Portrait, PortraitTable, PortraitPortraitButton + global PortraitWindow, Portrait, PortraitsTable, PortraitPortraitButton while True: Portrait = Portrait + 1 - if Portrait == GemRB.GetTableRowCount (PortraitTable): + if Portrait == GemRB.GetTableRowCount (PortraitsTable): Portrait = 0 - if GemRB.GetTableValue (PortraitTable, Portrait, 0) == GemRB.GetVar ("Gender"): - GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "G") + if GemRB.GetTableValue (PortraitsTable, Portrait, 0) == GemRB.GetVar ("Gender"): + GemRB.SetButtonPicture(PortraitWindow, PortraitPortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "G") return +def CustomDone(): + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton + + Window = CustomWindow + + PortraitName = GemRB.QueryText (Window, PortraitList2) + GemRB.SetToken ("SmallPortrait", PortraitName) + PortraitName = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", PortraitName) + GemRB.UnloadWindow (Window) + + GemRB.UnloadWindow (PortraitWindow) + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, PortraitName) + GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) + GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) + GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) + GemRB.SetButtonFlags (CharGenWindow, RaceButton, IE_GUI_BUTTON_DEFAULT, OP_OR) + CharGenState = 1 + Portrait = -1 + SetCharacterDescription() + GemRB.SetVisible (CharGenWindow, 1) + return + +def CustomAbort(): + GemRB.UnloadWindow (CustomWindow) + return + +def LargeCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList1) + #small hack + if GemRB.GetVar ("Row1") == RowCount1: + return + + Label = GemRB.GetControl (Window, 0x10000007) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTMD" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList2)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 0) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTMD") + return + +def SmallCustomPortrait(): + Window = CustomWindow + + Portrait = GemRB.QueryText (Window, PortraitList2) + #small hack + if GemRB.GetVar ("Row2") == RowCount2: + return + + Label = GemRB.GetControl (Window, 0x10000008) + GemRB.SetText (Window, Label, Portrait) + + Button = GemRB.GetControl (Window, 6) + if Portrait=="": + Portrait = "NOPORTSM" + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + else: + if GemRB.QueryText (Window, PortraitList1)!="": + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) + + Button = GemRB.GetControl (Window, 1) + GemRB.SetButtonPicture (Window, Button, Portrait, "NOPORTSM") + return + def PortraitCustomPress(): + global PortraitList1, PortraitList2 + global RowCount1, RowCount2 + global CustomWindow + + CustomWindow = Window = GemRB.LoadWindow (18) + PortraitList1 = GemRB.GetControl (Window, 2) + RowCount1 = GemRB.GetPortraits (Window, PortraitList1, 0) + GemRB.SetEvent (Window, PortraitList1, IE_GUI_TEXTAREA_ON_CHANGE, "LargeCustomPortrait") + GemRB.SetVar ("Row1", RowCount1) + GemRB.SetVarAssoc (Window, PortraitList1, "Row1",RowCount1) + + PortraitList2 = GemRB.GetControl (Window, 4) + RowCount2 = GemRB.GetPortraits (Window, PortraitList2, 1) + GemRB.SetEvent (Window, PortraitList2, IE_GUI_TEXTAREA_ON_CHANGE, "SmallCustomPortrait") + GemRB.SetVar ("Row2", RowCount2) + GemRB.SetVarAssoc (Window, PortraitList2, "Row2",RowCount2) + + Button = GemRB.GetControl (Window, 6) + GemRB.SetText (Window, Button, 11973) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomDone") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) + + Button = GemRB.GetControl (Window, 7) + GemRB.SetText (Window, Button, 15416) + GemRB.SetEvent (Window, Button, IE_GUI_BUTTON_ON_PRESS, "CustomAbort") + + Button = GemRB.GetControl (Window, 0) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"L" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTMD") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + Button = GemRB.GetControl (Window, 1) + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait)+"S" + GemRB.SetButtonPicture (Window, Button, PortraitName, "NOPORTSM") + GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_LOCKED) + + GemRB.ShowModal (Window, MODAL_SHADOW_NONE) return def PortraitDonePress(): - global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitTable, Portrait, GenderButton, RaceButton + global CharGenWindow, CharGenState, PortraitWindow, PortraitButton, PortraitsTable, Portrait, GenderButton, RaceButton - GemRB.UnloadWindow (PortraitWindow) - GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitTable, Portrait) + "L") + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait ) + GemRB.SetToken ("SmallPortrait", PortraitName+"S") + GemRB.SetToken ("LargePortrait", PortraitName+"L") + GemRB.SetButtonPicture(CharGenWindow, PortraitButton, GemRB.GetTableRowName (PortraitsTable, Portrait) + "L") GemRB.SetButtonState (CharGenWindow, GenderButton, IE_GUI_BUTTON_DISABLED) GemRB.SetButtonFlags (CharGenWindow, GenderButton, IE_GUI_BUTTON_DEFAULT, OP_NAND) GemRB.SetButtonState (CharGenWindow, RaceButton, IE_GUI_BUTTON_ENABLED) @@ -671,6 +787,7 @@ CharGenState = 1 SetCharacterDescription() GemRB.SetVisible (CharGenWindow, 1) + GemRB.UnloadWindow (PortraitWindow) return def PortraitCancelPress(): @@ -2049,16 +2166,21 @@ def AppearancePress(): global CharGenWindow, AppearanceWindow, AppearanceTable - global PortraitTable, Portrait, AppearanceAvatarButton, PortraitName + global PortraitsTable, Portrait, AppearanceAvatarButton, PortraitName global AppearanceHairButton, AppearanceSkinButton global AppearanceMajorButton, AppearanceMinorButton global HairColor, SkinColor, MajorColor, MinorColor GemRB.SetVisible (CharGenWindow, 0) AppearanceWindow = GemRB.LoadWindow (13) - PortraitName = GemRB.GetTableRowName (PortraitTable, Portrait) AppearanceTable = GemRB.LoadTable ("PORTCOLR") - PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + + if Portrait<0: + PortraitIndex = 0 + else: + PortraitName = GemRB.GetTableRowName (PortraitsTable, Portrait) + PortraitIndex = GemRB.GetTableRowIndex (AppearanceTable, PortraitName + "L") + HairColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 1) GemRB.SetVar ("HairColor", HairColor) SkinColor = GemRB.GetTableValue (AppearanceTable, PortraitIndex, 2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-23 14:58:23
|
Revision: 5465 http://gemrb.svn.sourceforge.net/gemrb/?rev=5465&view=rev Author: avenger_teambg Date: 2008-10-23 14:58:07 +0000 (Thu, 23 Oct 2008) Log Message: ----------- fixed custom portrait problems in bg1/bg2 (portrait sizes/color problem) Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py Modified: gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg1/GUICG12.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -88,9 +88,9 @@ Window = CustomWindow Portrait = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", Portrait) + Portrait = GemRB.QueryText (Window, PortraitList2) GemRB.SetToken ("SmallPortrait", Portrait) - Portrait = GemRB.QueryText (Window, PortraitList2) - GemRB.SetToken ("LargePortrait", Portrait) GemRB.UnloadWindow (Window) GemRB.UnloadWindow (AppearanceWindow) GemRB.SetNextScript ("CharGen2") Modified: gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg1/GUICG13.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -28,7 +28,6 @@ AnimID = AnimID+GemRB.GetTableValue(table, GemRB.GetVar("Class"),0) table = GemRB.LoadTable("avprefg") AnimID = AnimID+GemRB.GetTableValue(table, GemRB.GetVar("Gender"),0) - print "AnimID:",hex(AnimID) ResRef = GemRB.GetTableValue(PDollTable,hex(AnimID), "LEVEL1") GemRB.SetButtonPLT(ColorWindow, PDollButton, ResRef, 0, MinorColor, MajorColor, SkinColor, 0, 0, HairColor, 0) @@ -49,11 +48,17 @@ PortraitName = GemRB.GetToken("LargePortrait") PortraitName = PortraitName[0:len(PortraitName)-1] PortraitIndex = GemRB.GetTableRowIndex(PortraitTable, PortraitName) - HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) - SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) - MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) - MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) - print HairColor, SkinColor, MinorColor, MajorColor + if PortraitIndex<0: + HairColor=GemRB.GetTableValue(PortraitTable,0,1) + SkinColor=GemRB.GetTableValue(PortraitTable,0,2) + MinorColor=GemRB.GetTableValue(PortraitTable,0,3) + MajorColor=GemRB.GetTableValue(PortraitTable,0,4) + else: + HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) + SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) + MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) + MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) + PDollButton = GemRB.GetControl(ColorWindow, 1) GemRB.SetButtonFlags(ColorWindow, PDollButton, IE_GUI_BUTTON_PICTURE,OP_OR) Modified: gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg2/GUICG12.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -92,9 +92,9 @@ Window = CustomWindow Portrait = GemRB.QueryText (Window, PortraitList1) + GemRB.SetToken ("LargePortrait", Portrait) + Portrait = GemRB.QueryText (Window, PortraitList2) GemRB.SetToken ("SmallPortrait", Portrait) - Portrait = GemRB.QueryText (Window, PortraitList2) - GemRB.SetToken ("LargePortrait", Portrait) GemRB.UnloadWindow (Window) GemRB.UnloadWindow (AppearanceWindow) GemRB.SetNextScript ("CharGen2") Modified: gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py 2008-10-21 21:53:43 UTC (rev 5464) +++ gemrb/trunk/gemrb/GUIScripts/bg2/GUICG13.py 2008-10-23 14:58:07 UTC (rev 5465) @@ -31,7 +31,6 @@ AnimID = AnimID+GemRB.GetTableValue(table, Class, 0) table = GemRB.LoadTable("avprefg") AnimID = AnimID+GemRB.GetTableValue(table, GemRB.GetVar("Gender"),0) - print "AnimID:",hex(AnimID) ResRef = GemRB.GetTableValue(PDollTable,hex(AnimID), "LEVEL1") GemRB.SetButtonPLT(ColorWindow, PDollButton, ResRef, @@ -52,12 +51,18 @@ PortraitName = GemRB.GetToken("LargePortrait") PortraitName = PortraitName[0:len(PortraitName)-1] PortraitIndex = GemRB.GetTableRowIndex(PortraitTable, PortraitName) - HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) - SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) - MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) - MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) + if PortraitIndex<0: + HairColor=GemRB.GetTableValue(PortraitTable,0,1) + SkinColor=GemRB.GetTableValue(PortraitTable,0,2) + MinorColor=GemRB.GetTableValue(PortraitTable,0,3) + MajorColor=GemRB.GetTableValue(PortraitTable,0,4) + else: + HairColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,1) + SkinColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,2) + MinorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,3) + MajorColor=GemRB.GetTableValue(PortraitTable,PortraitIndex,4) + PDollButton = GemRB.GetControl(ColorWindow, 1) - print HairColor, SkinColor, MajorColor, MinorColor GemRB.SetButtonFlags(ColorWindow, PDollButton, IE_GUI_BUTTON_PICTURE,OP_OR) HairButton = GemRB.GetControl(ColorWindow, 2) @@ -193,5 +198,5 @@ GemRB.SetVar("SkinColor",SkinColor) GemRB.SetVar("MinorColor",MinorColor) GemRB.SetVar("MajorColor",MajorColor) - GemRB.SetNextScript("GUICG19") + GemRB.SetNextScript("GUICG19") #sounds return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-21 21:53:54
|
Revision: 5464 http://gemrb.svn.sourceforge.net/gemrb/?rev=5464&view=rev Author: avenger_teambg Date: 2008-10-21 21:53:43 +0000 (Tue, 21 Oct 2008) Log Message: ----------- removed duplicate strings.2da entries Modified Paths: -------------- gemrb/trunk/gemrb/includes/strrefs.h gemrb/trunk/gemrb/override/bg1/strings.2da gemrb/trunk/gemrb/override/bg2/strings.2da gemrb/trunk/gemrb/override/how/strings.2da gemrb/trunk/gemrb/override/iwd/strings.2da gemrb/trunk/gemrb/override/iwd2/strings.2da gemrb/trunk/gemrb/override/pst/strings.2da gemrb/trunk/gemrb/plugins/Core/Actor.cpp gemrb/trunk/gemrb/plugins/Core/Interface.cpp Modified: gemrb/trunk/gemrb/includes/strrefs.h =================================================================== --- gemrb/trunk/gemrb/includes/strrefs.h 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/includes/strrefs.h 2008-10-21 21:53:43 UTC (rev 5464) @@ -123,17 +123,15 @@ // // #define STR_WRONGITEMTYPE 90 -#define STR_OFFHANDINUSE 91 -#define STR_2HANDEDEQUIP 92 -#define STR_CANNOTUSEITEM 93 -#define STR_2HANDEDOFFHAND 94 -#define STR_ITEMEXCL 95 -#define STR_PICKPOCKET_DONE 96 //done -#define STR_PICKPOCKET_NONE 97 //no items to steal -#define STR_PICKPOCKET_FAIL 98 //failed, noticed -#define STR_PICKPOCKET_EVIL 99 //can't pick hostiles -#define STR_PICKPOCKET_ARMOR 100 //armor restriction +#define STR_ITEMEXCL 91 +#define STR_PICKPOCKET_DONE 92 //done +#define STR_PICKPOCKET_NONE 93 //no items to steal +#define STR_PICKPOCKET_FAIL 94 //failed, noticed +#define STR_PICKPOCKET_EVIL 95 //can't pick hostiles +#define STR_PICKPOCKET_ARMOR 96 //armor restriction +#define STR_USING_FEAT 97 +#define STR_STOPPED_FEAT 98 -#define STRREF_COUNT 101 +#define STRREF_COUNT 99 #endif //! IE_STRINGS_H Modified: gemrb/trunk/gemrb/override/bg1/strings.2da =================================================================== --- gemrb/trunk/gemrb/override/bg1/strings.2da 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/override/bg1/strings.2da 2008-10-21 21:53:43 UTC (rev 5464) @@ -77,7 +77,7 @@ TWOHANDED_USED 9381 CANNOT_USE_ITEM 9382 CANT_DROP_ITEM 25697 -NOT_IN_OFFHAND -1 +NOT_IN_OFFHAND 9375 ITEM_IS_CURSED 16304 NO_CRITICAL 20696 TRACKING -1 @@ -92,13 +92,11 @@ X -1 Y -1 WRONG_ITEMTYPE 9375 -OFFHAND_IN_USE 9380 -2HANDED_EQUIPPED 9381 -CANNOT_USE_ITEM 9382 -2HANDED_OFFHAND 9375 HAS_ITEMEXCL 20685 PICKPOCKET_DONE 10072 PICKPOCKET_NONE 10070 PICKPOCKET_FAIL 10069 PICKPOCKET_EVIL 10068 PICKPOCKET_ARMOR 10067 +USING_FEAT -1 +STOPPED_FEAT -1 Modified: gemrb/trunk/gemrb/override/bg2/strings.2da =================================================================== --- gemrb/trunk/gemrb/override/bg2/strings.2da 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/override/bg2/strings.2da 2008-10-21 21:53:43 UTC (rev 5464) @@ -92,13 +92,11 @@ X -1 Y -1 WRONG_ITEMTYPE 9375 -OFFHAND_IN_USE 9380 -2HANDED_EQUIPPED 9381 -CANNOT_USE_ITEM 9382 -2HANDED_OFFHAND 26342 HAS_ITEMEXCL 20685 PICKPOCKET_DONE 10072 PICKPOCKET_NONE 55369 PICKPOCKET_FAIL 10069 PICKPOCKET_EVIL 10068 PICKPOCKET_ARMOR 10067 +USING_FEAT -1 +STOPPED_FEAT -1 Modified: gemrb/trunk/gemrb/override/how/strings.2da =================================================================== --- gemrb/trunk/gemrb/override/how/strings.2da 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/override/how/strings.2da 2008-10-21 21:53:43 UTC (rev 5464) @@ -92,13 +92,11 @@ X -1 Y -1 WRONG_ITEMTYPE 9375 -OFFHAND_IN_USE 9380 -2HANDED_EQUIPPED 9381 -CANNOT_USE_ITEM 9382 -2HANDED_OFFHAND 26342 HAS_ITEMEXCL 20685 PICKPOCKET_DONE 10072 PICKPOCKET_NONE 18297 PICKPOCKET_FAIL 10069 PICKPOCKET_EVIL 10068 PICKPOCKET_ARMOR 10067 +USING_FEAT -1 +STOPPED_FEAT -1 Modified: gemrb/trunk/gemrb/override/iwd/strings.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd/strings.2da 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/override/iwd/strings.2da 2008-10-21 21:53:43 UTC (rev 5464) @@ -92,13 +92,11 @@ X -1 Y -1 WRONG_ITEMTYPE 9375 -OFFHAND_IN_USE 9380 -2HANDED_EQUIPPED 9381 -CANNOT_USE_ITEM 9382 -2HANDED_OFFHAND 26342 HAS_ITEMEXCL 20685 PICKPOCKET_DONE 10072 PICKPOCKET_NONE 18297 PICKPOCKET_FAIL 10069 PICKPOCKET_EVIL 10068 PICKPOCKET_ARMOR 10067 +USING_FEAT -1 +STOPPED_FEAT -1 Modified: gemrb/trunk/gemrb/override/iwd2/strings.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd2/strings.2da 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/override/iwd2/strings.2da 2008-10-21 21:53:43 UTC (rev 5464) @@ -93,13 +93,11 @@ X -1 Y -1 WRONG_ITEMTYPE 9375 -OFFHAND_IN_USE 9380 -2HANDED_EQUIPPED 9381 -CANNOT_USE_ITEM 9382 -2HANDED_OFFHAND 26342 HAS_ITEMEXCL 20685 PICKPOCKET_DONE 10072 PICKPOCKET_NONE 18297 PICKPOCKET_FAIL 10069 PICKPOCKET_EVIL 10068 PICKPOCKET_ARMOR 10067 +USING_FEAT -1 +STOPPED_FEAT -1 Modified: gemrb/trunk/gemrb/override/pst/strings.2da =================================================================== --- gemrb/trunk/gemrb/override/pst/strings.2da 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/override/pst/strings.2da 2008-10-21 21:53:43 UTC (rev 5464) @@ -75,10 +75,10 @@ MAGICWEAPON -1 OFFHAND_USED -1 TWOHANDED_USED -1 -CANNOT_USE_ITEM -1 -CANT_DROP_ITEM -1 +CANNOT_USE_ITEM 50532 +CANT_DROP_ITEM 50569 NOT_IN_OFFHAND -1 -ITEM_IS_CURSED -1 +ITEM_IS_CURSED 50538 NO_CRITICAL 19273 TRACKING -1 TRACKINGFAILED -1 @@ -92,14 +92,12 @@ LIGHTNING_DISSIPATE -1 X -1 Y -1 -WRONG_ITEMTYPE 9375 -OFFHAND_IN_USE 9380 -2HANDED_EQUIPPED 9381 -CANNOT_USE_ITEM 9382 -2HANDED_OFFHAND 9375 +WRONG_ITEMTYPE 50537 HAS_ITEMEXCL -1 PICKPOCKET_DONE -1 -PICKPOCKET_NONE 37071 -PICKPOCKET_FAIL 37074 -PICKPOCKET_EVIL -1 -PICKPOCKET_ARMOR -1 +PICKPOCKET_NONE 19304 +PICKPOCKET_FAIL 19303 +PICKPOCKET_EVIL 19302 +PICKPOCKET_ARMOR 19301 +USING_FEAT -1 +STOPPED_FEAT -1 Modified: gemrb/trunk/gemrb/plugins/Core/Actor.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Actor.cpp 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/plugins/Core/Actor.cpp 2008-10-21 21:53:43 UTC (rev 5464) @@ -3948,7 +3948,7 @@ stat = ResolveTableValue(itemuse[i].table, stat, mcol, itemuse[i].vcol); } if (stat&itemvalue) { - return STR_CANNOTUSEITEM; + return STR_CANNOT_USE_ITEM; } } Modified: gemrb/trunk/gemrb/plugins/Core/Interface.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Interface.cpp 2008-10-21 20:37:04 UTC (rev 5463) +++ gemrb/trunk/gemrb/plugins/Core/Interface.cpp 2008-10-21 21:53:43 UTC (rev 5464) @@ -4030,7 +4030,7 @@ //switch for IE_INV_ITEM_* if it is a CREItem if (item->Flags&IE_ITEM_TWO_HANDED) { //cannot equip twohanded in offhand - if (feedback) DisplayConstantString(STR_2HANDEDOFFHAND, 0xf0f0f0); + if (feedback) DisplayConstantString(STR_NOT_IN_OFFHAND, 0xf0f0f0); return 0; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-21 20:37:08
|
Revision: 5463 http://gemrb.svn.sourceforge.net/gemrb/?rev=5463&view=rev Author: avenger_teambg Date: 2008-10-21 20:37:04 +0000 (Tue, 21 Oct 2008) Log Message: ----------- done multiline editboxes already Modified Paths: -------------- gemrb/trunk/TODO Modified: gemrb/trunk/TODO =================================================================== --- gemrb/trunk/TODO 2008-10-21 20:15:20 UTC (rev 5462) +++ gemrb/trunk/TODO 2008-10-21 20:37:04 UTC (rev 5463) @@ -49,7 +49,7 @@ 2. (PARTLY) implement class based (but customisable) action button bar. Generally port the IWD2 system to all engines 3. implement grabbing mouse pointer by a control to fix dragging of PST Float menu window -4. Fix multi line editboxes. Allow attaching of scrollbar. +4. (DONE) Fix multi line editboxes. Allow attaching of scrollbar. - Avenger, i think it is done 5. (PARTLY) Fix drop capitals (initials) Calculate text height/width correctly, display it correctly too. 6. (PARTLY) Fix unwanted screen shake (especially when on bottom of area) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-21 20:15:24
|
Revision: 5462 http://gemrb.svn.sourceforge.net/gemrb/?rev=5462&view=rev Author: avenger_teambg Date: 2008-10-21 20:15:20 +0000 (Tue, 21 Oct 2008) Log Message: ----------- list of iwd2 feats Added Paths: ----------- gemrb/trunk/gemrb/includes/ie_feats.h Added: gemrb/trunk/gemrb/includes/ie_feats.h =================================================================== --- gemrb/trunk/gemrb/includes/ie_feats.h (rev 0) +++ gemrb/trunk/gemrb/includes/ie_feats.h 2008-10-21 20:15:20 UTC (rev 5462) @@ -0,0 +1,75 @@ +#define FEAT_AEGIS_OF_RIME 0 +#define FEAT_AMBIDEXTERITY 1 +#define FEAT_AQUA_MORTIS 2 +#define FEAT_ARMORED_ARCANA 3 +#define FEAT_ARMOUR_PROFICIENCY 4 +#define FEAT_ARTERIAL_STRIKE 5 +#define FEAT_BLIND_FIGHT 6 +#define FEAT_BULLHEADED 7 +#define FEAT_CLEAVE 8 +#define FEAT_COMBAT_CASTING 9 +#define FEAT_COURTEOUS_MAGOCRACY 10 +#define FEAT_CRIPPLING_STRIKE 11 +#define FEAT_DASH 12 +#define FEAT_DEFLECT_ARROWS 13 +#define FEAT_DIRTY_FIGHTING 14 +#define FEAT_DISCIPLINE 15 +#define FEAT_DODGE 16 +#define FEAT_ENVENOM_WEAPON 17 +#define FEAT_EXOTIC_BASTARD 18 +#define FEAT_EXPERTISE 19 +#define FEAT_EXTRA_RAGE 20 +#define FEAT_EXTRA_SHAPESHIFTING 21 +#define FEAT_EXTRA_SMITING 22 +#define FEAT_EXTRA_TURNING 23 +#define FEAT_FIENDSLAYER 24 +#define FEAT_FORESTER 25 +#define FEAT_GREAT_FORTITUDE 26 +#define FEAT_HAMSTRING 27 +#define FEAT_HERETICS_BANE 28 +#define FEAT_HEROIC_INSPIRATION 29 +#define FEAT_IMPROVED_CRITICAL 30 +#define FEAT_IMPROVED_EVASION 31 +#define FEAT_IMPROVED_INITIATIVE 32 +#define FEAT_IMPROVED_TURNING 33 +#define FEAT_IRON_WILL 34 +#define FEAT_LIGHTNING_REFLEXES 35 +#define FEAT_LINGERING_SONG 36 +#define FEAT_LUCK_OF_HEROES 37 +#define FEAT_MARTIAL_AXE 38 +#define FEAT_MARTIAL_BOW 39 +#define FEAT_MARTIAL_FLAIL 40 +#define FEAT_MARTIAL_GREATSWORD 41 +#define FEAT_MARTIAL_HAMMER 42 +#define FEAT_MARTIAL_LARGESWORD 43 +#define FEAT_MARTIAL_POLEARM 44 +#define FEAT_MAXIMIZED_ATTACKS 45 +#define FEAT_MERCANTILE_BACKGROUND 46 +#define FEAT_POWER_ATTACK 47 +#define FEAT_PRECISE_SHOT 48 +#define FEAT_RAPID_SHOT 49 +#define FEAT_RESIST_POISON 50 +#define FEAT_SCION_OF_STORMS 51 +#define FEAT_SHIELD_PROF 52 +#define FEAT_SIMPLE_CROSSBOW 53 +#define FEAT_SIMPLE_MACE 54 +#define FEAT_SIMPLE_MISSILE 55 +#define FEAT_SIMPLE_QUARTERSTAFF 56 +#define FEAT_SIMPLE_SMALLBLADE 57 +#define FEAT_SLIPPERY_MIND 58 +#define FEAT_SNAKE_BLOOD 59 +#define FEAT_SPELL_FOCUS_ENCHANTMENT 60 +#define FEAT_SPELL_FOCUS_EVOCATION 61 +#define FEAT_SPELL_FOCUS_NECROMANCY 62 +#define FEAT_SPELL_FOCUS_TRANSMUTE 63 +#define FEAT_SPELL_PENETRATION 64 +#define FEAT_SPIRIT_OF_FLAME 65 +#define FEAT_STRONG_BACK 66 +#define FEAT_STUNNING_FIST 67 +#define FEAT_SUBVOCAL_CASTING 68 +#define FEAT_TOUGHNESS 69 +#define FEAT_TWO_WEAPON_FIGHTING 70 +#define FEAT_WEAPON_FINESSE 71 +#define FEAT_WILDSHAPE_BOAR 72 +#define FEAT_WILDSHAPE_PANTHER 73 +#define FEAT_WILDSHAPE_SHAMBLER 74 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-18 16:59:49
|
Revision: 5461 http://gemrb.svn.sourceforge.net/gemrb/?rev=5461&view=rev Author: avenger_teambg Date: 2008-10-18 16:59:40 +0000 (Sat, 18 Oct 2008) Log Message: ----------- fixed wrong wraps in clowncol Modified Paths: -------------- gemrb/trunk/gemrb/override/iwd2/clowncol.2da Modified: gemrb/trunk/gemrb/override/iwd2/clowncol.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd2/clowncol.2da 2008-10-18 16:47:05 UTC (rev 5460) +++ gemrb/trunk/gemrb/override/iwd2/clowncol.2da 2008-10-18 16:59:40 UTC (rev 5461) @@ -1,13 +1,7 @@ 2DA V1.0 * - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 -HAIR 0 1 2 3 4 5 6 - 7 79 80 81 82 110 111 - * * * * * * * - * * * * * * * * * * -SKIN 8 9 10 11 12 13 14 - 15 16 17 18 19 20 83 - 84 85 86 87 88 89 90 - 105 106 107 108 109 112 113 114 * * -MAJOR 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 -MINOR 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 + 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 +HAIR 0 1 2 3 4 5 6 7 79 80 81 82 110 111 * * * * * * * * * * * * * * * * * +SKIN 8 9 10 11 12 13 14 15 16 17 18 19 20 83 84 85 86 87 88 89 90 105 106 107 108 109 112 113 114 * * +MAJOR 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 +MINOR 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-18 16:47:12
|
Revision: 5460 http://gemrb.svn.sourceforge.net/gemrb/?rev=5460&view=rev Author: avenger_teambg Date: 2008-10-18 16:47:05 +0000 (Sat, 18 Oct 2008) Log Message: ----------- hacked ControlAnimation to handle clown colors flag for centering the animation now works for control animations fixed iwd2 inventory screen to display the animated avatar correctly Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/iwd2/GUIINV.py gemrb/trunk/gemrb/plugins/Core/AnimationFactory.h gemrb/trunk/gemrb/plugins/Core/Button.cpp gemrb/trunk/gemrb/plugins/Core/CharAnimations.cpp gemrb/trunk/gemrb/plugins/Core/Control.cpp gemrb/trunk/gemrb/plugins/Core/ControlAnimation.cpp gemrb/trunk/gemrb/plugins/Core/ControlAnimation.h gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/GUIINV.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/GUIINV.py 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/GUIINV.py 2008-10-18 16:47:05 UTC (rev 5460) @@ -289,7 +289,9 @@ Color6 = GemRB.GetPlayerStat (pc, IE_ARMOR_COLOR) Color7 = GemRB.GetPlayerStat (pc, IE_HAIR_COLOR) + GemRB.SetButtonFlags (Window, Button, IE_GUI_BUTTON_CENTER_PICTURES, OP_OR) GemRB.SetAnimation (Window, Button, GetActorPaperDoll (pc)+"G11") + GemRB.SetAnimationPalette (Window, Button, Color1, Color2, Color3, Color4, Color5, Color6, Color7, 0) # portrait Button = GemRB.GetControl (Window, 84) Modified: gemrb/trunk/gemrb/plugins/Core/AnimationFactory.h =================================================================== --- gemrb/trunk/gemrb/plugins/Core/AnimationFactory.h 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/plugins/Core/AnimationFactory.h 2008-10-18 16:47:05 UTC (rev 5460) @@ -44,7 +44,7 @@ std::vector< CycleEntry> cycles; unsigned short* FLTable; // Frame Lookup Table unsigned char* FrameData; - int datarefcount; + int datarefcount; public: AnimationFactory(const char* ResRef); ~AnimationFactory(void); @@ -62,8 +62,8 @@ Sprite2D* GetPaperdollImage(ieDword *Colors, Sprite2D *&Picture2, unsigned int type); - void IncDataRefCount(); - void DecDataRefCount(); + void IncDataRefCount(); + void DecDataRefCount(); }; #endif Modified: gemrb/trunk/gemrb/plugins/Core/Button.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Button.cpp 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/plugins/Core/Button.cpp 2008-10-18 16:47:05 UTC (rev 5460) @@ -239,7 +239,12 @@ int xOffs = ( Width / 2 ) - ( AnimPicture->Width / 2 ); int yOffs = ( Height / 2 ) - ( AnimPicture->Height / 2 ); Region r( x + XPos + xOffs, y + YPos + yOffs, (int)(AnimPicture->Width * Clipping), AnimPicture->Height ); - video->BlitSprite( AnimPicture, x + XPos + xOffs, y + YPos + yOffs, true, &r ); + + if (Flags & IE_GUI_BUTTON_CENTER_PICTURES) { + video->BlitSprite( AnimPicture, x + XPos + xOffs + AnimPicture->XPos, y + YPos + yOffs + AnimPicture->YPos, true, &r ); + } else { + video->BlitSprite( AnimPicture, x + XPos + xOffs, y + YPos + yOffs, true, &r ); + } } // Button label Modified: gemrb/trunk/gemrb/plugins/Core/CharAnimations.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/CharAnimations.cpp 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/plugins/Core/CharAnimations.cpp 2008-10-18 16:47:05 UTC (rev 5460) @@ -753,8 +753,7 @@ AnimationFactory* af = ( AnimationFactory* ) core->GetResourceMgr()->GetFactoryResource( NewResRef, - IE_BAM_CLASS_ID, - IE_NORMAL ); + IE_BAM_CLASS_ID, IE_NORMAL ); if (!af) { if (part < actorPartCount) { Modified: gemrb/trunk/gemrb/plugins/Core/Control.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Control.cpp 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/plugins/Core/Control.cpp 2008-10-18 16:47:05 UTC (rev 5460) @@ -221,7 +221,11 @@ { core->GetVideoDriver()->FreeSprite(AnimPicture); AnimPicture = newpic; - Changed = true; + //apparently this is needed too, so the artifacts are not visible + if (Owner->Visible==WINDOW_VISIBLE) { + Changed = true; + Owner->Invalidate(); + } } /** Sets the Scroll Bar Pointer. If 'ptr' is NULL no Scroll Bar will be linked Modified: gemrb/trunk/gemrb/plugins/Core/ControlAnimation.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/ControlAnimation.cpp 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/plugins/Core/ControlAnimation.cpp 2008-10-18 16:47:05 UTC (rev 5460) @@ -23,9 +23,10 @@ #include "ControlAnimation.h" #include "Interface.h" #include "ResourceMgr.h" +#include "Video.h" /* needed only for paperdoll palettes */ +#include "Palette.h" /* needed only for paperdoll palettes */ #include "Button.h" - ControlAnimation::ControlAnimation(Control* ctl, const ieResRef ResRef, int Cycle) { control = NULL; @@ -34,15 +35,15 @@ frame = 0; anim_phase = 0; - bam = ( AnimationFactory* ) - core->GetResourceMgr()->GetFactoryResource( ResRef, - IE_BAM_CLASS_ID, - IE_NORMAL ); + bam = ( AnimationFactory* ) core->GetResourceMgr()->GetFactoryResource( ResRef, + IE_BAM_CLASS_ID, IE_NORMAL ); + if (! bam) return; control = ctl; control->animation = this; + has_palette = false; } //freeing the bitmaps only once, but using an intelligent algorithm @@ -93,7 +94,11 @@ } } else { frame ++; - time = 15; + if (has_palette) { + time = 100; //hack for slower movement + } else { + time = 15; + } } Sprite2D* pic = bam->GetFrame( (unsigned short) frame, (unsigned char) Cycle ); @@ -106,9 +111,28 @@ } anim_phase = 0; frame = 0; - pic = bam->GetFrame( 0, 0 ); + pic = bam->GetFrame( 0, (unsigned char) Cycle ); } + if (pic == NULL) { + return; + } + + if (has_palette) { + Video *video = core->GetVideoDriver(); + Palette* palette = video->GetPalette(pic); + palette->SetupPaperdollColours(colors, 0); + video->SetPalette(pic, palette); + palette->Release(); + } + control->SetAnimPicture( pic ); core->timer->AddAnimation( this, time ); } + +void ControlAnimation::SetPaletteGradients(ieDword *col) +{ + memcpy(colors, col, 8*sizeof(ieDword)); + has_palette = true; +} + Modified: gemrb/trunk/gemrb/plugins/Core/ControlAnimation.h =================================================================== --- gemrb/trunk/gemrb/plugins/Core/ControlAnimation.h 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/plugins/Core/ControlAnimation.h 2008-10-18 16:47:05 UTC (rev 5460) @@ -53,12 +53,15 @@ unsigned int cycle; unsigned int frame; unsigned int anim_phase; + bool has_palette; + ieDword colors[8]; public: ControlAnimation(Control* ctl, const ieResRef ResRef, int Cycle = 0); ~ControlAnimation(void); void UpdateAnimation(); //report if the current resource is the same as descripted by the params bool SameResource(const ieResRef ResRef, int Cycle); + void SetPaletteGradients(ieDword *col); }; #endif Modified: gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-10-17 16:01:31 UTC (rev 5459) +++ gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-10-18 16:47:05 UTC (rev 5460) @@ -3151,6 +3151,37 @@ return ret; } +PyDoc_STRVAR( GemRB_SetAnimationPalette__doc, +"SetAnimationPalette(WindowIndex, ControlIndex, col1, col2, col3, col4, col5, col6, col7, col8)\n\n" +"Sets the palette of an animation already assigned to the button."); + +static PyObject* GemRB_SetAnimationPalette(PyObject * /*self*/, PyObject* args) +{ + int wi, ci; + ieDword col[8]; + + memset(col,-1,sizeof(col)); + if (!PyArg_ParseTuple( args, "iiiiiiiiii", &wi, &ci, + &(col[0]), &(col[1]), &(col[2]), &(col[3]), + &(col[4]), &(col[5]), &(col[6]), &(col[7])) ) { + return AttributeError( GemRB_SetAnimationPalette__doc ); + } + + Control* ctl = GetControl(wi, ci, -1); + if (!ctl) { + return NULL; + } + + ControlAnimation* anim = ctl->animation; + if (!anim) { + return RuntimeError("No animation!"); + } + + anim->SetPaletteGradients(col); + Py_INCREF( Py_None ); + return Py_None; +} + PyDoc_STRVAR( GemRB_SetAnimation__doc, "SetAnimation(WindowIndex, ControlIndex, BAMResRef[, Cycle])\n\n" "Sets the animation of a Control (usually a Button) from a BAM file. Optionally an animation cycle could be set too."); @@ -8661,6 +8692,7 @@ METHOD(SaveGame, METH_VARARGS), METHOD(SetActionIcon, METH_VARARGS), METHOD(SetAnimation, METH_VARARGS), + METHOD(SetAnimationPalette, METH_VARARGS), METHOD(SetBufferLength, METH_VARARGS), METHOD(SetButtonSprites, METH_VARARGS), METHOD(SetButtonBorder, METH_VARARGS), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-17 16:01:41
|
Revision: 5459 http://gemrb.svn.sourceforge.net/gemrb/?rev=5459&view=rev Author: avenger_teambg Date: 2008-10-17 16:01:31 +0000 (Fri, 17 Oct 2008) Log Message: ----------- update even more stats during character generation (to help feat conditions) fixed a bug in CheckFeatCondition Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py gemrb/trunk/gemrb/plugins/CREImporter/CREImp.cpp gemrb/trunk/gemrb/plugins/Core/Actor.cpp gemrb/trunk/gemrb/plugins/Core/Actor.h gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py 2008-10-16 21:51:08 UTC (rev 5458) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py 2008-10-17 16:01:31 UTC (rev 5459) @@ -54,8 +54,6 @@ d_op = GemRB.GetTableValue(FeatReqTable, feat, "D_OP") slot = GemRB.GetVar("Slot") - print "Stats:",a_stat, b_stat, c_stat, d_stat - print "Vals :",a_value, b_value, c_value, d_value return GemRB.CheckFeatCondition(slot, a_stat, a_value, b_stat, b_value, c_stat, c_value, d_stat, d_value, a_op, b_op, c_op, d_op) # checks if a feat was granted due to class/kit/race and returns the number @@ -318,7 +316,6 @@ #Custom feat check functions def Check_AnyOfThree(pl, ass, a, bs, b, cs, c, *garbage): - print a,ass,b,bs,c,cs if GemRB.GetPlayerStat(pl, ass)==a: return True if GemRB.GetPlayerStat(pl, bs)==b: return True if GemRB.GetPlayerStat(pl, cs)==c: return True @@ -327,7 +324,6 @@ #Custom feat check functions def Check_AnyOfThreeGE(pl, ass, a, bs, b, cs, c, *garbage): - print a,ass,b,bs,c,cs if GemRB.GetPlayerStat(pl, ass)>=a: return True if GemRB.GetPlayerStat(pl, bs)>=b: return True if GemRB.GetPlayerStat(pl, cs)>=c: return True @@ -335,7 +331,6 @@ def Check_AllOfThreeGE(pl, ass, a, bs, b, cs, c, *garbage): - print a,ass,b,bs,c,cs if GemRB.GetPlayerStat(pl, ass) < a: return False if GemRB.GetPlayerStat(pl, bs) < b: return False if GemRB.GetPlayerStat(pl, cs) < c: return False Modified: gemrb/trunk/gemrb/plugins/CREImporter/CREImp.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/CREImporter/CREImp.cpp 2008-10-16 21:51:08 UTC (rev 5458) +++ gemrb/trunk/gemrb/plugins/CREImporter/CREImp.cpp 2008-10-17 16:01:31 UTC (rev 5459) @@ -514,11 +514,7 @@ act->BaseStats[IE_HITPOINTS]=hp; } act->inventory.CalculateWeight(); - if (act->BaseStats[IE_CLASSLEVELSUM]) { - act->CreateDerivedStatsIWD2(); - } else { - act->CreateDerivedStatsBG(); - } + act->CreateDerivedStats(); return act; } Modified: gemrb/trunk/gemrb/plugins/Core/Actor.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Actor.cpp 2008-10-16 21:51:08 UTC (rev 5458) +++ gemrb/trunk/gemrb/plugins/Core/Actor.cpp 2008-10-17 16:01:31 UTC (rev 5459) @@ -4143,3 +4143,12 @@ BaseStats[IE_BACKSTABDAMAGEMULTIPLIER]=backstabdamagemultiplier; BaseStats[IE_LAYONHANDSAMOUNT]=(ieDword) layonhandsamount; } + +void Actor::CreateDerivedStats() +{ + if (BaseStats[IE_CLASSLEVELSUM]) { + CreateDerivedStatsIWD2(); + } else { + CreateDerivedStatsBG(); + } +} Modified: gemrb/trunk/gemrb/plugins/Core/Actor.h =================================================================== --- gemrb/trunk/gemrb/plugins/Core/Actor.h 2008-10-16 21:51:08 UTC (rev 5458) +++ gemrb/trunk/gemrb/plugins/Core/Actor.h 2008-10-17 16:01:31 UTC (rev 5459) @@ -234,6 +234,10 @@ void CheckWeaponQuickSlot(unsigned int which); /* helper for usability checks */ int CheckUsability(Item *item) const; + /* Set up all the missing stats on load time, or after level up */ + void CreateDerivedStatsBG(); + /* Set up all the missing stats on load time, or after level up */ + void CreateDerivedStatsIWD2(); public: Actor(void); ~Actor(void); @@ -514,9 +518,7 @@ ieDword ImmuneToProjectile(ieDword projectile) const; /* Sets projectile immunity */ void AddProjectileImmunity(ieDword projectile); - /* Set up all the missing stats on load time, or after level up */ - void CreateDerivedStatsBG(); - /* Set up all the missing stats on load time, or after level up */ - void CreateDerivedStatsIWD2(); + /* Set up all the missing stats on load time, chargen, or after level up */ + void CreateDerivedStats(); }; #endif Modified: gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-10-16 21:51:08 UTC (rev 5458) +++ gemrb/trunk/gemrb/plugins/GUIScript/GUIScript.cpp 2008-10-17 16:01:31 UTC (rev 5459) @@ -270,7 +270,10 @@ //ieDword stat = core->TranslateStat(stat_name); //some stats should check for exact value //return actor->GetBase(stat)>=value; - return DiffCore(actor->GetBase(stat), value, op); + //return DiffCore(actor->GetBase(stat), value, op); + int dc = DiffCore(actor->GetBase(stat), value, op); + printf ("diffcore - %d %d %d: %d\n",actor->GetBase(stat), value, op, dc); + return dc; } static int GetCreatureStat(unsigned int Slot, unsigned int StatID, int Mod) @@ -293,6 +296,7 @@ return 0; } actor->SetBase( StatID, StatValue ); + actor->CreateDerivedStats(); return 1; } @@ -7041,7 +7045,7 @@ const char *callback = NULL; PyObject* p[13]; int v[13]; - for(i=10;i<13;i++) { + for(i=9;i<13;i++) { p[i]=NULL; v[i]=GREATER_OR_EQUALS; } @@ -7068,13 +7072,22 @@ } v[0]=PyInt_AsLong( p[0] ); - for(i=2;i<10;i++) { + for(i=2;i<9;i++) { if (!PyObject_TypeCheck( p[i], &PyInt_Type )) { return AttributeError( GemRB_CheckFeatCondition__doc ); } v[i]=PyInt_AsLong( p[i] ); } + if (p[9]) { + for(i=9;i<13;i++) { + if (!PyObject_TypeCheck( p[i], &PyInt_Type )) { + return AttributeError( GemRB_CheckFeatCondition__doc ); + } + v[i]=PyInt_AsLong( p[i] ); + } + } + Game *game = core->GetGame(); if (!game) { return RuntimeError( "No game loaded!" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-16 21:51:13
|
Revision: 5458 http://gemrb.svn.sourceforge.net/gemrb/?rev=5458&view=rev Author: avenger_teambg Date: 2008-10-16 21:51:08 +0000 (Thu, 16 Oct 2008) Log Message: ----------- fixed classlevel presets, so class dependent feats are working Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen4.py gemrb/trunk/gemrb/GUIScripts/iwd2/Class.py gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen4.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen4.py 2008-10-16 21:50:31 UTC (rev 5457) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen4.py 2008-10-16 21:51:08 UTC (rev 5458) @@ -2,6 +2,27 @@ import GemRB from CharOverview import * +#this is the same list as in GUIREC +#barbarian, bard, cleric, druid, fighter, monk, paladin, ranger, rogue, sorcerer, wizard +Classes = [IE_LEVELBARBARIAN, IE_LEVELBARD, IE_LEVELCLERIC, IE_LEVELDRUID, \ +IE_LEVEL, IE_LEVELMONK, IE_LEVELPALADIN, IE_LEVELRANGER, IE_LEVEL3, \ +IE_LEVELSORCEROR, IE_LEVEL2] + def OnLoad(): + MyChar = GemRB.GetVar ("Slot") + #base class + Class=GemRB.GetVar ("BaseClass") + GemRB.SetPlayerStat (MyChar, IE_CLASS, Class) + #kit + GemRB.SetPlayerStat (MyChar, IE_KIT, GemRB.GetVar ("Class") ) + + #works only for the first level character generation + #if this code ever needs to be more versatile, consider saving the + #class values somewhere + for i in range(len(Classes)): + GemRB.SetPlayerStat (MyChar, Classes[i], 0) + + GemRB.SetPlayerStat (MyChar, Classes[Class-1], 1) + print "Set class stat ",Classes[Class-1], " to 1" UpdateOverview(4) - return \ No newline at end of file + return Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/Class.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/Class.py 2008-10-16 21:50:31 UTC (rev 5457) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/Class.py 2008-10-16 21:51:08 UTC (rev 5458) @@ -154,6 +154,8 @@ GemRB.UnloadWindow(ClassWindow) GemRB.SetNextScript("CharGen3") GemRB.SetVar("Class",0) #scrapping the class value + MyChar = GemRB.GetVar("Slot") + GemRB.SetPlayerStat (IE_CLASS, 0) return def NextPress(): Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py 2008-10-16 21:50:31 UTC (rev 5457) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/Feats.py 2008-10-16 21:51:08 UTC (rev 5458) @@ -53,6 +53,9 @@ c_op = GemRB.GetTableValue(FeatReqTable, feat, "C_OP") d_op = GemRB.GetTableValue(FeatReqTable, feat, "D_OP") slot = GemRB.GetVar("Slot") + + print "Stats:",a_stat, b_stat, c_stat, d_stat + print "Vals :",a_value, b_value, c_value, d_value return GemRB.CheckFeatCondition(slot, a_stat, a_value, b_stat, b_value, c_stat, c_value, d_stat, d_value, a_op, b_op, c_op, d_op) # checks if a feat was granted due to class/kit/race and returns the number @@ -313,13 +316,26 @@ return #Custom feat check functions -def Check_AnyOfThree(pl, a, ass, b, bs, c, cs, *garbage): +def Check_AnyOfThree(pl, ass, a, bs, b, cs, c, *garbage): + + print a,ass,b,bs,c,cs if GemRB.GetPlayerStat(pl, ass)==a: return True if GemRB.GetPlayerStat(pl, bs)==b: return True if GemRB.GetPlayerStat(pl, cs)==c: return True return False -def Check_AllOfThreeGE(pl, a, ass, b, bs, c, cs, *garbage): +#Custom feat check functions +def Check_AnyOfThreeGE(pl, ass, a, bs, b, cs, c, *garbage): + + print a,ass,b,bs,c,cs + if GemRB.GetPlayerStat(pl, ass)>=a: return True + if GemRB.GetPlayerStat(pl, bs)>=b: return True + if GemRB.GetPlayerStat(pl, cs)>=c: return True + return False + +def Check_AllOfThreeGE(pl, ass, a, bs, b, cs, c, *garbage): + + print a,ass,b,bs,c,cs if GemRB.GetPlayerStat(pl, ass) < a: return False if GemRB.GetPlayerStat(pl, bs) < b: return False if GemRB.GetPlayerStat(pl, cs) < c: return False This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-16 21:50:36
|
Revision: 5457 http://gemrb.svn.sourceforge.net/gemrb/?rev=5457&view=rev Author: avenger_teambg Date: 2008-10-16 21:50:31 +0000 (Thu, 16 Oct 2008) Log Message: ----------- fixed heroic inspiration Modified Paths: -------------- gemrb/trunk/gemrb/override/iwd2/featreq.2da Modified: gemrb/trunk/gemrb/override/iwd2/featreq.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd2/featreq.2da 2008-10-16 20:45:21 UTC (rev 5456) +++ gemrb/trunk/gemrb/override/iwd2/featreq.2da 2008-10-16 21:50:31 UTC (rev 5457) @@ -30,7 +30,7 @@ GREAT_FORTITUDE 0 1 0 0 0 0 0 0 0 0 * * * * HAMSTRING 0 1 CLASSLEVELTHIEF 3 0 0 0 0 0 0 * * * * HERETICS_BANE 0 1 CLASSLEVELCLERIC 1 CLASSLEVELPALADIN 3 HITBONUS 4 0 0 * * * * -HEROIC_INSPIRATION 0 1 CLASSLEVELPALADIN 1 CLASSLEVELBARBARIAN 1 0 0 0 0 * * * * +HEROIC_INSPIRATION 0 1 AnyOfThreeGE -1 CLASSLEVELPALADIN 1 CLASSLEVELBARBARIAN 1 CLASSLEVELBARD 1 * * * * IMPROVED_CRITICAL 0 1 HITBONUS 8 0 0 0 0 0 0 * * * * IMPROVED_EVASION 0 1 CLASSLEVELTHIEF 10 0 0 0 0 0 0 * * * * IMPROVED_INITIATIVE 0 1 0 0 0 0 0 0 0 0 * * * * @@ -46,7 +46,7 @@ MARTIAL_HAMMER FEAT_HAMMER 3 CLASSLEVELFIGHTER 4 FEAT_HAMMER 2 0 0 0 0 * 0 * * MARTIAL_LARGESWORD FEAT_LARGE_SWORD 3 CLASSLEVELFIGHTER 4 FEAT_LARGE_SWORD 2 0 0 0 0 * 0 * * MARTIAL_POLEARM FEAT_POLEARM 3 CLASSLEVELFIGHTER 4 FEAT_POLEARM 2 0 0 0 0 * 0 * * -MAXIMIZED_ATTACKS 0 1 MaximizedAttacks -1 CONCENTRATION 4 0 0 0 0 * * * * +MAXIMIZED_ATTACKS 0 1 MaximizedAttacks -1 CONCENTRATION 4 0 0 0 0 * * * * MERCANTILE_BACKGROUND 0 1 AnyOfThree -1 SUBRACE 0x40002 SUBRACE 0x60002 RACE 1 * * * * POWER_ATTACK 0 1 STR 13 0 0 0 0 0 0 * * * * PRECISE_SHOT 0 1 0 0 0 0 0 0 0 0 * * * * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-16 20:45:32
|
Revision: 5456 http://gemrb.svn.sourceforge.net/gemrb/?rev=5456&view=rev Author: avenger_teambg Date: 2008-10-16 20:45:21 +0000 (Thu, 16 Oct 2008) Log Message: ----------- setting some base stats on the character sheet so feat requirements work better (this is just for testing the theory) Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/iwd2/Abilities.py gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen3.py gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen6.py gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py gemrb/trunk/gemrb/GUIScripts/iwd2/GUIMA.py gemrb/trunk/gemrb/GUIScripts/iwd2/Skills.py Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/Abilities.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/Abilities.py 2008-10-15 20:17:56 UTC (rev 5455) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/Abilities.py 2008-10-16 20:45:21 UTC (rev 5456) @@ -215,7 +215,7 @@ GemRB.SetRepeatClickFlags(GEM_RK_DISABLE, OP_NAND) GemRB.UnloadWindow(AbilityWindow) GemRB.SetNextScript("CharGen5") - for i in range(0,6): + for i in range(6): GemRB.SetVar("Ability "+str(i),0) #scrapping the abilities return Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen3.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen3.py 2008-10-15 20:17:56 UTC (rev 5455) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen3.py 2008-10-16 20:45:21 UTC (rev 5456) @@ -3,5 +3,10 @@ from CharOverview import * def OnLoad(): + MyChar = GemRB.GetVar("Slot") + GemRB.SetPlayerStat (MyChar, IE_SEX, GemRB.GetVar ("Gender") ) + GemRB.SetPlayerStat (MyChar, IE_RACE, GemRB.GetVar ("BaseRace") ) + race = GemRB.GetVar ("Race") + GemRB.SetPlayerStat (MyChar, IE_SUBRACE, race & 255 ) UpdateOverview(3) - return \ No newline at end of file + return Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen6.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen6.py 2008-10-15 20:17:56 UTC (rev 5455) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/CharGen6.py 2008-10-16 20:45:21 UTC (rev 5456) @@ -3,5 +3,13 @@ from CharOverview import * def OnLoad(): + #setting the stats so the feat code will work + MyChar = GemRB.GetVar("Slot") + GemRB.SetPlayerStat (MyChar, IE_STR, GemRB.GetVar ("Ability 1")) + GemRB.SetPlayerStat (MyChar, IE_DEX, GemRB.GetVar ("Ability 2")) + GemRB.SetPlayerStat (MyChar, IE_CON, GemRB.GetVar ("Ability 3")) + GemRB.SetPlayerStat (MyChar, IE_INT, GemRB.GetVar ("Ability 4")) + GemRB.SetPlayerStat (MyChar, IE_WIS, GemRB.GetVar ("Ability 5")) + GemRB.SetPlayerStat (MyChar, IE_CHR, GemRB.GetVar ("Ability 6")) UpdateOverview(6) - return \ No newline at end of file + return Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py 2008-10-15 20:17:56 UTC (rev 5455) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/CharOverview.py 2008-10-16 20:45:21 UTC (rev 5456) @@ -9,6 +9,7 @@ import GemRB from GUIDefines import * +from ie_stats import * CharGenWindow = 0 TextAreaControl = 0 Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/GUIMA.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/GUIMA.py 2008-10-15 20:17:56 UTC (rev 5455) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/GUIMA.py 2008-10-16 20:45:21 UTC (rev 5456) @@ -207,14 +207,14 @@ def QueryText (): Data = "" row = 0 - while 1: - GemRB.SetVar ("row", row) - GemRB.SetVarAssoc (NoteWindow, NoteLabel, "row", row) - line = GemRB.QueryText (NoteWindow, NoteLabel) - if len(line)<=0: - break - Data += line+"\n" - row += 1 + while 1: + GemRB.SetVar ("row", row) + GemRB.SetVarAssoc (NoteWindow, NoteLabel, "row", row) + line = GemRB.QueryText (NoteWindow, NoteLabel) + if len(line)<=0: + break + Data += line+"\n" + row += 1 return Data def SetMapNote (): Modified: gemrb/trunk/gemrb/GUIScripts/iwd2/Skills.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/iwd2/Skills.py 2008-10-15 20:17:56 UTC (rev 5455) +++ gemrb/trunk/gemrb/GUIScripts/iwd2/Skills.py 2008-10-16 20:45:21 UTC (rev 5456) @@ -22,7 +22,7 @@ GemRB.SetLabelTextColor(SkillWindow,SumLabel, 255, 255, 0) GemRB.SetText(SkillWindow, SumLabel, str(PointsLeft) ) - for i in range(0,10): + for i in range(10): Pos=TopIndex+i Cost = GemRB.GetTableValue(CostTable, Pos, ClassColumn) # Skill cost is currently restricted to base classes. This means it is fairly easy @@ -130,7 +130,7 @@ for i in range(0,RowCount): GemRB.SetVar("Skill "+str(i),0) # Racial/Class bonuses don't factor in char-gen or leveling - # so can be safely ignored + # so can be safely ignored GemRB.SetToken("number",str(PointsLeft) ) @@ -217,13 +217,26 @@ return def BackPress(): + MyChar = GemRB.GetVar("Slot") + TmpTable = GemRB.LoadTable ("skillsta") + for i in range(GemRB.GetTableRowCount(TmpTable)): + GemRB.SetVar("Skill "+str(i),0) + StatID=GemRB.GetTableValue (TmpTable, i, 2) + GemRB.SetPlayerStat (MyChar, StatID, 0) + GemRB.UnloadTable (TmpTable) GemRB.UnloadWindow(SkillWindow) - for i in range(GemRB.GetTableRowCount(SkillTable)): - GemRB.SetVar("Skill "+str(i),0) GemRB.SetNextScript("CharGen6") return def NextPress(): + MyChar = GemRB.GetVar("Slot") + #setting skills + TmpTable = GemRB.LoadTable ("skillsta") + SkillCount = GemRB.GetTableRowCount (TmpTable) + for i in range (SkillCount): + StatID=GemRB.GetTableValue (TmpTable, i, 2) + GemRB.SetPlayerStat (MyChar, StatID, GemRB.GetVar ("Skill "+str(i) ) ) + GemRB.UnloadTable (TmpTable) GemRB.UnloadWindow(SkillWindow) GemRB.SetNextScript("Feats") #feats return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lynxlupodian@us...> - 2008-10-15 20:18:00
|
Revision: 5455 http://gemrb.svn.sourceforge.net/gemrb/?rev=5455&view=rev Author: lynxlupodian Date: 2008-10-15 20:17:56 +0000 (Wed, 15 Oct 2008) Log Message: ----------- itemsnd.2da: fixed the 2da signature Modified Paths: -------------- gemrb/trunk/gemrb/override/how/itemsnd.2da gemrb/trunk/gemrb/override/iwd/itemsnd.2da gemrb/trunk/gemrb/override/iwd2/itemsnd.2da Modified: gemrb/trunk/gemrb/override/how/itemsnd.2da =================================================================== --- gemrb/trunk/gemrb/override/how/itemsnd.2da 2008-10-15 19:58:33 UTC (rev 5454) +++ gemrb/trunk/gemrb/override/how/itemsnd.2da 2008-10-15 20:17:56 UTC (rev 5455) @@ -1,4 +1,4 @@ -2da V1.0 +2DA V1.0 * TAKE DROP AMULET G_NECK1 G_NECK2 Modified: gemrb/trunk/gemrb/override/iwd/itemsnd.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd/itemsnd.2da 2008-10-15 19:58:33 UTC (rev 5454) +++ gemrb/trunk/gemrb/override/iwd/itemsnd.2da 2008-10-15 20:17:56 UTC (rev 5455) @@ -1,4 +1,4 @@ -2da V1.0 +2DA V1.0 * TAKE DROP AMULET G_NECK1 G_NECK2 Modified: gemrb/trunk/gemrb/override/iwd2/itemsnd.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd2/itemsnd.2da 2008-10-15 19:58:33 UTC (rev 5454) +++ gemrb/trunk/gemrb/override/iwd2/itemsnd.2da 2008-10-15 20:17:56 UTC (rev 5455) @@ -1,4 +1,4 @@ -2da V1.0 +2DA V1.0 * TAKE DROP AMULET G_NECK1 G_NECK2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lynxlupodian@us...> - 2008-10-15 19:58:39
|
Revision: 5454 http://gemrb.svn.sourceforge.net/gemrb/?rev=5454&view=rev Author: lynxlupodian Date: 2008-10-15 19:58:33 +0000 (Wed, 15 Oct 2008) Log Message: ----------- slottype.2da: changed the default value from 0 to *, which is handled by the scripts (since the 2da fix it was failing when looking for 0.bam) Modified Paths: -------------- gemrb/trunk/gemrb/override/bg1/slottype.2da gemrb/trunk/gemrb/override/bg2/slottype.2da gemrb/trunk/gemrb/override/how/slottype.2da gemrb/trunk/gemrb/override/iwd/slottype.2da gemrb/trunk/gemrb/override/iwd2/slottype.2da gemrb/trunk/gemrb/override/pst/slottype.2da gemrb/trunk/gemrb/override/test1/slottype.2da Modified: gemrb/trunk/gemrb/override/bg1/slottype.2da =================================================================== --- gemrb/trunk/gemrb/override/bg1/slottype.2da 2008-10-15 18:36:40 UTC (rev 5453) +++ gemrb/trunk/gemrb/override/bg1/slottype.2da 2008-10-15 19:58:33 UTC (rev 5454) @@ -1,5 +1,5 @@ 2DA V1.0 -0 +* BITS SCRIPT ICON STRREF EFFECT 10 0 0 * 0 2 6 1 13 STONHELM 11999 7 Modified: gemrb/trunk/gemrb/override/bg2/slottype.2da =================================================================== --- gemrb/trunk/gemrb/override/bg2/slottype.2da 2008-10-15 18:36:40 UTC (rev 5453) +++ gemrb/trunk/gemrb/override/bg2/slottype.2da 2008-10-15 19:58:33 UTC (rev 5454) @@ -1,5 +1,5 @@ 2DA V1.0 -0 +* BITS SCRIPT ICON STRREF EFFECT 10 0 0 * 0 2 6 1 13 STONHELM 11999 7 Modified: gemrb/trunk/gemrb/override/how/slottype.2da =================================================================== --- gemrb/trunk/gemrb/override/how/slottype.2da 2008-10-15 18:36:40 UTC (rev 5453) +++ gemrb/trunk/gemrb/override/how/slottype.2da 2008-10-15 19:58:33 UTC (rev 5454) @@ -1,5 +1,5 @@ 2DA V1.0 -0 +* BITS SCRIPT ICON STRREF EFFECT 10 0 0 * 0 2 6 1 13 STONHELM 11999 7 Modified: gemrb/trunk/gemrb/override/iwd/slottype.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd/slottype.2da 2008-10-15 18:36:40 UTC (rev 5453) +++ gemrb/trunk/gemrb/override/iwd/slottype.2da 2008-10-15 19:58:33 UTC (rev 5454) @@ -1,5 +1,5 @@ 2DA V1.0 -0 +* BITS SCRIPT ICON STRREF EFFECT 10 0 0 * 0 2 6 1 13 STONHELM 11999 7 Modified: gemrb/trunk/gemrb/override/iwd2/slottype.2da =================================================================== --- gemrb/trunk/gemrb/override/iwd2/slottype.2da 2008-10-15 18:36:40 UTC (rev 5453) +++ gemrb/trunk/gemrb/override/iwd2/slottype.2da 2008-10-15 19:58:33 UTC (rev 5454) @@ -1,5 +1,5 @@ 2DA V1.0 -0 +* BITS SCRIPT ICON STRREF EFFECT 10 0 0 * 0 2 6 1 13 STONHELM 11999 7 Modified: gemrb/trunk/gemrb/override/pst/slottype.2da =================================================================== --- gemrb/trunk/gemrb/override/pst/slottype.2da 2008-10-15 18:36:40 UTC (rev 5453) +++ gemrb/trunk/gemrb/override/pst/slottype.2da 2008-10-15 19:58:33 UTC (rev 5454) @@ -1,5 +1,5 @@ 2DA V1.0 -0 +* BITS SCRIPT ICON STRREF EFFECTS 10 0 -1 * 0 2 7 1 5 IVPIEARL 31580 1 Modified: gemrb/trunk/gemrb/override/test1/slottype.2da =================================================================== --- gemrb/trunk/gemrb/override/test1/slottype.2da 2008-10-15 18:36:40 UTC (rev 5453) +++ gemrb/trunk/gemrb/override/test1/slottype.2da 2008-10-15 19:58:33 UTC (rev 5454) @@ -1,5 +1,5 @@ 2DA V1.0 -0 +* BITS SCRIPT ICON STRREF EFFECT 10 0 0 * 0 2 6 1 13 STONHELM 11999 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avenger_teambg@us...> - 2008-10-15 18:36:49
|
Revision: 5453 http://gemrb.svn.sourceforge.net/gemrb/?rev=5453&view=rev Author: avenger_teambg Date: 2008-10-15 18:36:40 +0000 (Wed, 15 Oct 2008) Log Message: ----------- today's fixes in news Modified Paths: -------------- gemrb/trunk/NEWS Modified: gemrb/trunk/NEWS =================================================================== --- gemrb/trunk/NEWS 2008-10-15 18:34:37 UTC (rev 5452) +++ gemrb/trunk/NEWS 2008-10-15 18:36:40 UTC (rev 5453) @@ -15,8 +15,12 @@ - magic item exclusion - stores and bags - feat prerequisites in iwd2 + - fixed attack loop when target dies - bugfixes + Applied patches: + #2159734 Zefklop (Mouse activity during movies) + GemRB V0.3.1 (2008-09-25): New features: - mouse scroll support This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |