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
(75) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
(3) |
2
(1) |
3
(13) |
4
(5) |
5
(2) |
6
(2) |
7
(3) |
8
(6) |
9
(6) |
10
(4) |
11
(10) |
12
(1) |
13
(2) |
14
(1) |
15
(6) |
16
(2) |
17
(1) |
18
(8) |
19
(2) |
20
(4) |
21
(3) |
22
(1) |
23
|
24
(4) |
25
(5) |
26
(3) |
27
(1) |
28
|
29
|
30
|
31
(3) |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-11 14:05:24
|
gemrb: Infinity Engine emulator The branch master has been updated via 2be36f6a64f85290f6e174a355636f24e79d4f18 (commit) Summary of changes: gemrb/override/{bg2/sanctry.vvc => iwd2/coldh.vvc} | Bin 492 -> 492 bytes gemrb/override/iwd2/damage.2da | 28 ++++++++++---------- .../override/{bg2/sanctry.vvc => iwd2/electrh.vvc} | Bin 492 -> 492 bytes gemrb/override/{bg2/sanctry.vvc => iwd2/fireh.vvc} | Bin 492 -> 492 bytes 4 files changed, 14 insertions(+), 14 deletions(-) copy gemrb/override/{bg2/sanctry.vvc => iwd2/coldh.vvc} (65%) copy gemrb/override/{bg2/sanctry.vvc => iwd2/electrh.vvc} (65%) copy gemrb/override/{bg2/sanctry.vvc => iwd2/fireh.vvc} (65%) from 2eab8acb7dfec4b148c2d28b43822cdf318f0982 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=2be36f6a64f85290f6e174a355636f24e79d4f18 commit 2be36f6a64f85290f6e174a355636f24e79d4f18 Author: Avenger <avenger_teambg@...> Date: Sun Mar 11 15:04:25 2012 +0100 better iwd2 damage effects diff --git a/gemrb/override/iwd2/coldh.vvc b/gemrb/override/iwd2/coldh.vvc new file mode 100644 index 0000000..7bf1f38 Binary files /dev/null and b/gemrb/override/iwd2/coldh.vvc differ diff --git a/gemrb/override/iwd2/damage.2da b/gemrb/override/iwd2/damage.2da index 73527b7..7ef1124 100644 --- a/gemrb/override/iwd2/damage.2da +++ b/gemrb/override/iwd2/damage.2da @@ -1,16 +1,16 @@ 2DA V1.0 * - MAIN SPARKS GRADIENT -CRIT BLOODCR * 47 -SMALL BLOODS * 47 -MEDIUM BLOODM * 47 -LARGE BLOODL * 47 -FIRES SPFIRIMP SPBURN 19 -FIREM SPFIRIMP SPBURN 19 -FIREL SPFIRIMP SPBURN 19 -SPARKS SPSHKIMP SPSPARKS -1 -SPARKM SPSHKIMP SPSPARKS -1 -SPARKL SPSHKIMP SPSPARKS -1 -ICES SPFIRIMP * 71 -ICEM SPFIRIMP * 71 -ICEL SPFIRIMP * 71 + MAIN SPARKS GRADIENT +CRIT BLOODCR * 47 +SMALL BLOODS * 47 +MEDIUM BLOODM * 47 +LARGE BLOODL * 47 +FIRES fireh FIREL 19 +FIREM fireh FIREL 19 +FIREL fireh FIREL 19 +SPARKS ElectrH ElectrL -1 +SPARKM ElectrH ElectrL -1 +SPARKL ElectrH ElectrL -1 +ICES COLDH COLDL 71 +ICEM COLDH COLDL 71 +ICEL COLDH COLDL 71 diff --git a/gemrb/override/iwd2/electrh.vvc b/gemrb/override/iwd2/electrh.vvc new file mode 100644 index 0000000..7d731f2 Binary files /dev/null and b/gemrb/override/iwd2/electrh.vvc differ diff --git a/gemrb/override/iwd2/fireh.vvc b/gemrb/override/iwd2/fireh.vvc new file mode 100644 index 0000000..273f592 Binary files /dev/null and b/gemrb/override/iwd2/fireh.vvc differ ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-11 13:29:20
|
gemrb: Infinity Engine emulator The branch master has been updated via 2eab8acb7dfec4b148c2d28b43822cdf318f0982 (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) from 2b7a580287a56679d5a605c1e7d76450e7609214 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=2eab8acb7dfec4b148c2d28b43822cdf318f0982 commit 2eab8acb7dfec4b148c2d28b43822cdf318f0982 Author: Avenger <avenger_teambg@...> Date: Sun Mar 11 14:27:39 2012 +0100 don't reset the action buttons (messes with iwd2 custom qslots) diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index f3862ca..77161d6 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -871,7 +871,7 @@ void pcf_level (Actor *actor, ieDword oldValue, ieDword newValue) void pcf_class (Actor *actor, ieDword /*oldValue*/, ieDword newValue) { - actor->InitButtons(newValue, true); + actor->InitButtons(newValue, false); int sorcerer=0; if (newValue<(ieDword) classcount) { ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-11 12:59:28
|
gemrb: Infinity Engine emulator The branch master has been updated via 2b7a580287a56679d5a605c1e7d76450e7609214 (commit) Summary of changes: gemrb/override/iwd2/damage.2da | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) from 7ea93bc0c2169756a48cb2ef0a766f9fe9866bf9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=2b7a580287a56679d5a605c1e7d76450e7609214 commit 2b7a580287a56679d5a605c1e7d76450e7609214 Author: Avenger <avenger_teambg@...> Date: Sun Mar 11 13:58:51 2012 +0100 there is no 'firimp' resource in iwd2 diff --git a/gemrb/override/iwd2/damage.2da b/gemrb/override/iwd2/damage.2da index cbb1b63..73527b7 100644 --- a/gemrb/override/iwd2/damage.2da +++ b/gemrb/override/iwd2/damage.2da @@ -5,12 +5,12 @@ CRIT BLOODCR * 47 SMALL BLOODS * 47 MEDIUM BLOODM * 47 LARGE BLOODL * 47 -FIRES FIRIMP SPBURN 19 -FIREM FIRIMP SPBURN 19 -FIREL FIRIMP SPBURN 19 +FIRES SPFIRIMP SPBURN 19 +FIREM SPFIRIMP SPBURN 19 +FIREL SPFIRIMP SPBURN 19 SPARKS SPSHKIMP SPSPARKS -1 SPARKM SPSHKIMP SPSPARKS -1 SPARKL SPSHKIMP SPSPARKS -1 -ICES FIRIMP * 71 -ICEM FIRIMP * 71 -ICEL FIRIMP * 71 +ICES SPFIRIMP * 71 +ICEM SPFIRIMP * 71 +ICEL SPFIRIMP * 71 ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-11 12:07:17
|
gemrb: Infinity Engine emulator The branch master has been updated via 7ea93bc0c2169756a48cb2ef0a766f9fe9866bf9 (commit) Summary of changes: gemrb/core/Store.cpp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) from 3447a6a3f71984d9736df5494fd6dc4b7cfbf40e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=7ea93bc0c2169756a48cb2ef0a766f9fe9866bf9 commit 7ea93bc0c2169756a48cb2ef0a766f9fe9866bf9 Author: Avenger <avenger_teambg@...> Date: Sun Mar 11 13:06:13 2012 +0100 improved store behaviour - bags don't recharge items (see tobex fix) diff --git a/gemrb/core/Store.cpp b/gemrb/core/Store.cpp index e370d89..b257df4 100644 --- a/gemrb/core/Store.cpp +++ b/gemrb/core/Store.cpp @@ -214,10 +214,10 @@ STOItem *Store::FindItem(CREItem *item, bool exact) return NULL; } -//some stores can recharge items +//some stores can recharge items - in original engine apparently all stores +//did this. In gemrb there is a flag. void Store::RechargeItem(CREItem *item) { -//is there any flag which store can recharge? Item *itm = gamedata->GetItem(item->ItemResRef); if (!itm) { return; @@ -226,7 +226,12 @@ void Store::RechargeItem(CREItem *item) item->Flags |= IE_INV_ITEM_IDENTIFIED; } //gemrb extension, some shops won't recharge items - if (!(Flags&IE_STORE_RECHARGE)) { + //containers' behaviour is inverted + //bag 0 1 0 1 + //flag 0 0 1 1 + //recharge 1 0 0 1 + bool bag = (Type==STT_BG2CONT || Type==STT_IWD2CONT); + if (bag != !(Flags&IE_STORE_RECHARGE)) { for (int i=0;i<CHARGE_COUNTERS;i++) { ITMExtHeader *h = itm->GetExtHeader(i); if (!h) { ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Jaka Kranjc <lynxlupodian@us...> - 2012-03-11 10:28:31
|
gemrb: Infinity Engine emulator The branch master has been updated via 3447a6a3f71984d9736df5494fd6dc4b7cfbf40e (commit) via 702a0f555feedb5d5ea51889dafae00ddb64416d (commit) Summary of changes: gemrb/core/EffectQueue.cpp | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) from 9d8335bc20ba67bf9cbf1da35a167c56d385aa6c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=3447a6a3f71984d9736df5494fd6dc4b7cfbf40e commit 3447a6a3f71984d9736df5494fd6dc4b7cfbf40e Author: Jaka Kranjc <lynxlupodian@...> Date: Sun Mar 11 11:25:04 2012 +0100 implemented the iwd2 spell resistance check and spell penetration feat diff --git a/gemrb/core/EffectQueue.cpp b/gemrb/core/EffectQueue.cpp index 7759d03..b739bd1 100644 --- a/gemrb/core/EffectQueue.cpp +++ b/gemrb/core/EffectQueue.cpp @@ -20,6 +20,7 @@ #include "EffectQueue.h" +#include "ie_feats.h" #include "overlays.h" #include "strrefs.h" @@ -1009,7 +1010,21 @@ static bool check_resistance(Actor* actor, Effect* fx) //magic immunity ieDword val = actor->GetStat(IE_RESISTMAGIC); - if( (signed) fx->random_value < (signed) val) { + bool resisted = false; + if (iwd2fx) { + // 3ed style check + // TODO: check if luck really affects it + ieDword check = fx->CasterLevel + actor->LuckyRoll(1, 20, 0); + // +2/+4 level bonus from the (greater) spell penetration feat + if (actor->HasFeat(FEAT_SPELL_PENETRATION)) { + check += 2 * actor->GetStat(IE_FEAT_SPELL_PENETRATION); + } + resisted = (signed) check < (signed) val; + } else { + // 2.5 style check + resisted = (signed) fx->random_value < (signed) val; + } + if (resisted) { // we take care of irresistible spells a few checks above, so selective mr has no impact here anymore displaymsg->DisplayConstantStringName(STR_MAGIC_RESISTED, DMC_WHITE, actor); Log(MESSAGE, "EffectQueue", "effect resisted: %s", (char*) Opcodes[fx->Opcode].Name); http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=702a0f555feedb5d5ea51889dafae00ddb64416d commit 702a0f555feedb5d5ea51889dafae00ddb64416d Author: Jaka Kranjc <lynxlupodian@...> Date: Sun Mar 11 11:21:09 2012 +0100 EffectQueue: only check if it's an iwd2 game once diff --git a/gemrb/core/EffectQueue.cpp b/gemrb/core/EffectQueue.cpp index 4f8b3a4..7759d03 100644 --- a/gemrb/core/EffectQueue.cpp +++ b/gemrb/core/EffectQueue.cpp @@ -49,6 +49,7 @@ static int initialized = 0; static EffectDesc *effectnames = NULL; static int effectnames_count = 0; static int pstflags = false; +static bool iwd2fx = false; bool EffectQueue::match_ids(Actor *target, int table, ieDword value) { @@ -207,6 +208,7 @@ bool Init_EffectQueue() return true; } pstflags = !!core->HasFeature(GF_PST_STATE_FLAGS); + iwd2fx = !!core->HasFeature(GF_ENHANCED_EFFECTS); memset( Opcodes, 0, sizeof( Opcodes ) ); for(i=0;i<MAX_EFFECTS;i++) { @@ -1741,14 +1743,13 @@ int EffectQueue::DisabledSpellcasting(int types) const } unsigned int spelltype_mask = 0; - bool iwd2 = !!core->HasFeature(GF_ENHANCED_EFFECTS); ieDword opcode = fx_disable_spellcasting_ref.opcode; std::list< Effect* >::const_iterator f; for ( f = effects.begin(); f != effects.end(); f++ ) { MATCH_OPCODE(); MATCH_LIVE_FX(); - if (iwd2) { + if (iwd2fx) { switch((*f)->Parameter2) { case 0: // all spelltype_mask |= 7; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Brad Allred <brad-a@us...> - 2012-03-11 03:57:21
|
gemrb: Infinity Engine emulator The branch master has been updated via 9d8335bc20ba67bf9cbf1da35a167c56d385aa6c (commit) Summary of changes: gemrb/plugins/SDLVideo/SDL12Video.cpp | 18 +----------------- gemrb/plugins/SDLVideo/SDL20Video.cpp | 15 --------------- gemrb/plugins/SDLVideo/SDLVideo.cpp | 2 -- 3 files changed, 1 insertions(+), 34 deletions(-) from ac68b2e9b3925ae3ae0cbe511ab0a8a7eb84e81d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=9d8335bc20ba67bf9cbf1da35a167c56d385aa6c commit 9d8335bc20ba67bf9cbf1da35a167c56d385aa6c Author: Brad Allred <bradallred@...> Date: Sat Mar 10 20:56:48 2012 -0700 VideoDrivers: clean out unnecessary includes. diff --git a/gemrb/plugins/SDLVideo/SDL12Video.cpp b/gemrb/plugins/SDLVideo/SDL12Video.cpp index 703e052..7e9d89a 100644 --- a/gemrb/plugins/SDLVideo/SDL12Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL12Video.cpp @@ -20,24 +20,8 @@ #include "SDL12Video.h" -#include "TileRenderer.inl" - -#include "AnimationFactory.h" -#include "Audio.h" -#include "Game.h" // for GetGlobalTint -#include "GameData.h" +#include "Game.h" #include "Interface.h" -#include "Palette.h" -#include "Polygon.h" -#include "SpriteCover.h" -#include "GUI/Console.h" -#include "GUI/GameControl.h" // for TargetMode (contextual information for touch inputs) -#include "GUI/EventMgr.h" -#include "GUI/Window.h" - -#include <cmath> -#include <cassert> -#include <cstdio> using namespace GemRB; diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp index f02b203..6f969ff 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp @@ -20,24 +20,9 @@ #include "SDL20Video.h" -#include "TileRenderer.inl" - -#include "AnimationFactory.h" -#include "Audio.h" -#include "Game.h" // for GetGlobalTint -#include "GameData.h" #include "Interface.h" -#include "Palette.h" -#include "Polygon.h" -#include "SpriteCover.h" #include "GUI/Console.h" #include "GUI/GameControl.h" // for TargetMode (contextual information for touch inputs) -#include "GUI/EventMgr.h" -#include "GUI/Window.h" - -#include <cmath> -#include <cassert> -#include <cstdio> #if TARGET_OS_IPHONE extern "C" { diff --git a/gemrb/plugins/SDLVideo/SDLVideo.cpp b/gemrb/plugins/SDLVideo/SDLVideo.cpp index 4ee3c89..31ad944 100644 --- a/gemrb/plugins/SDLVideo/SDLVideo.cpp +++ b/gemrb/plugins/SDLVideo/SDLVideo.cpp @@ -34,10 +34,8 @@ #include "Polygon.h" #include "SpriteCover.h" #include "GUI/Console.h" -#include "GUI/GameControl.h" // for TargetMode (contextual information for touch inputs) #include "GUI/Window.h" - #include <cmath> #include <cassert> #include <cstdio> ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Brad Allred <brad-a@us...> - 2012-03-11 02:43:07
|
gemrb: Infinity Engine emulator The branch master has been updated via ac68b2e9b3925ae3ae0cbe511ab0a8a7eb84e81d (commit) via 88abf8a5e1c66d51f4cdb28f43ed97d63a5bb555 (commit) via 805af163811d6181eb2d4bfe9bf41efbcfc01b79 (commit) via 7be9ebbb03e2aebef946a28a04317a5b13caaf66 (commit) Summary of changes: gemrb/plugins/SDLVideo/SDL20Video.cpp | 264 ++++++++++++++++----------------- gemrb/plugins/SDLVideo/SDL20Video.h | 19 +-- 2 files changed, 132 insertions(+), 151 deletions(-) from a51fe3b1cdc3e75a4d4d9d9a97172c7bdb14221c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=ac68b2e9b3925ae3ae0cbe511ab0a8a7eb84e81d commit ac68b2e9b3925ae3ae0cbe511ab0a8a7eb84e81d Author: Brad Allred <bradallred@...> Date: Sat Mar 10 19:42:30 2012 -0700 TouchInput: rewrite touch input to be Android compatible (still requires SDL 2.0) removes old disgusting mix of "mouse" and touch events. "Mouse" events on iOS need to be caught and discarded to prevent problems with the new touch code. Things are greatly simplified, better coded, and better commented. However, since I am unable to vigorously test I'm sure there will be a few bugs. diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp index 9bef5a3..f02b203 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp @@ -56,7 +56,6 @@ using namespace GemRB; #define TOUCH_RC_NUM_TICKS 500 SDL20VideoDriver::SDL20VideoDriver(void) - : rightMouseDownEvent(), rightMouseUpEvent() { assert( core->NumFingScroll > 1 && core->NumFingKboard > 1 && core->NumFingInfo > 1); assert( core->NumFingScroll < 5 && core->NumFingKboard < 5 && core->NumFingInfo < 5); @@ -67,20 +66,6 @@ SDL20VideoDriver::SDL20VideoDriver(void) videoPlayer = NULL; // touch input - ignoreNextMouseUp = false; - numFingers = 0; - formationRotation = false; - - touchHold = false; - touchHoldTime = 0; - - rightMouseDownEvent.type = SDL_MOUSEBUTTONDOWN; - rightMouseDownEvent.button = SDL_BUTTON_RIGHT; - rightMouseDownEvent.state = SDL_PRESSED; - - rightMouseUpEvent.type = SDL_MOUSEBUTTONUP; - rightMouseUpEvent.button = SDL_BUTTON_RIGHT; - rightMouseUpEvent.state = SDL_RELEASED; ignoreNextFingerUp = false; firstFingerDown = SDL_TouchFingerEvent(); } @@ -262,31 +247,16 @@ int SDL20VideoDriver::SwapBuffers(void) int SDL20VideoDriver::PollEvents() { - if (touchHold && (SDL_GetTicks() - touchHoldTime) >= TOUCH_RC_NUM_TICKS) { - SDL_Event evtDown = SDL_Event(); - - evtDown.type = SDL_MOUSEBUTTONDOWN; - evtDown.button = rightMouseDownEvent; - - SDL_PushEvent(&evtDown); - - GameControl* gc = core->GetGameControl(); - if (EvntManager->GetMouseFocusedControlType() == IE_GUI_GAMECONTROL && gc && gc->GetTargetMode() == TARGET_MODE_NONE) { - // formation rotation - touchHold = false; - formationRotation = true; - } else { - SDL_Event evtUp = SDL_Event(); - evtUp.type = SDL_MOUSEBUTTONUP; - evtUp.button = rightMouseUpEvent; - SDL_PushEvent(&evtUp); - } - ignoreNextMouseUp = true; - touchHoldTime = 0; - } - if (formationRotation) { - ignoreNextMouseUp = true; + if (firstFingerDown.timestamp + && GetTickCount() - firstFingerDown.timestamp >= TOUCH_RC_NUM_TICKS) { + // enough time has passed to transform firstTouch into a right click event + int x = firstFingerDown.x; + int y = firstFingerDown.y; + ProcessFirstTouch(GEM_MB_MENU); + EvntManager->MouseUp( x, y, GEM_MB_MENU, GetModState(SDL_GetModState())); + ignoreNextFingerUp = true; } + return SDLVideoDriver::PollEvents(); } @@ -310,116 +280,100 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event) SDL_Touch *state = SDL_GetTouch(event.tfinger.touchId); float xScaleFactor = 1.0; float yScaleFactor = 1.0; + int numFingers = 0; if(state){ + numFingers = state->num_fingers; xScaleFactor = state->xres / window->w; yScaleFactor = state->yres / window->h; } - touchHoldTime = 0; - bool ConsolePopped = core->ConsolePopped; switch (event.type) { //!!!!!!!!!!!! - // !!!: currently SDL brodcasts both mouse and touch events on touch - // there is no API to prevent the mouse events so I have hacked the mouse events. - // watch future SDL 1.3 releases to see if/when disabling mouse events from the touchscreen is available + // !!!: currently SDL 2.0 brodcasts both mouse and touch events on touch for iOS + // there is no API to prevent the mouse events so we will be ignoring mouse events on iOS + // there is no way currently to use a mouse anyay. + // watch future SDL releases to see if/when disabling mouse events from the touchscreen is available //!!!!!!!!!!!! +#if TARGET_OS_IPHONE + // don't include SDL_MOUSEWHEEL here + // note that other platforms (non-iOS) needn't implement this + // and should let SDLVideo handle mouse events case SDL_MOUSEMOTION: - if (numFingers > 1) break; - MouseMovement(event.motion.x, event.motion.y); - break; case SDL_MOUSEBUTTONDOWN: - if ((MouseFlags & MOUSE_DISABLED) || !EvntManager) - break; - ignoreNextMouseUp = false; - lastMouseDownTime = EvntManager->GetRKDelay(); - if (lastMouseDownTime != (unsigned long) ~0) { - lastMouseDownTime += lastMouseDownTime + lastTime; - } - if (CursorIndex != VID_CUR_DRAG) - CursorIndex = VID_CUR_DOWN; - CursorPos.x = event.button.x; // - mouseAdjustX[CursorIndex]; - CursorPos.y = event.button.y; // - mouseAdjustY[CursorIndex]; - if (!ConsolePopped) - EvntManager->MouseDown( event.button.x, event.button.y, 1 << ( event.button.button - 1 ), GetModState(SDL_GetModState()) ); - break; case SDL_MOUSEBUTTONUP: - if ((MouseFlags & MOUSE_DISABLED) || !EvntManager || ignoreNextMouseUp) - break; - ignoreNextMouseUp = true; - if (CursorIndex != VID_CUR_DRAG) - CursorIndex = VID_CUR_UP; - CursorPos.x = event.button.x; - CursorPos.y = event.button.y; - if (!ConsolePopped) - EvntManager->MouseUp( event.button.x, event.button.y, 1 << ( event.button.button - 1 ), GetModState(SDL_GetModState()) ); - break; - case SDL_MOUSEWHEEL: - /* - TODO: need a preference for inverting these - */ - short scrollX; - scrollX= event.wheel.x * -1; - short scrollY; - scrollY= event.wheel.y * -1; - EvntManager->MouseWheelScroll( scrollX, scrollY ); break; - case SDL_FINGERMOTION://SDL 1.3+ - //For swipes. gestures needing pinch or rotate need to use SDL_MULTIGESTURE or SDL_DOLLARGESTURE - touchHold = false; - if (EvntManager) { - if (numFingers == core->NumFingScroll || (numFingers != core->NumFingKboard && EvntManager->GetMouseFocusedControlType() == IE_GUI_TEXTAREA)) { - //any # of fingers != NumFingKBoard will scroll a text area - if (EvntManager->GetMouseFocusedControlType() != IE_GUI_TEXTAREA) { - // if focus is IE_GUI_TEXTAREA we need mouseup to clear scrollbar flags so this scrolling doesnt break after interactind with the slider - ignoreNextMouseUp = true; - }else { - // if we are scrolling a text area we dont want the keyboard in the way - HideSoftKeyboard(); - } - //invert the coordinates such that dragging down scrolls up etc. - int scrollX = (event.tfinger.dx / xScaleFactor) * -1; - int scrollY = (event.tfinger.dy / yScaleFactor) * -1; - - EvntManager->MouseWheelScroll( scrollX, scrollY ); - } else if (numFingers == core->NumFingKboard) { - if ((event.tfinger.dy / yScaleFactor) * -1 >= MIN_GESTURE_DELTA_PIXELS){ - // if the keyboard is already up interpret this gesture as console pop - if(softKeyboardShowing && !ConsolePopped && !ignoreNextMouseUp) core->PopupConsole(); - else ShowSoftKeyboard(); - } else if((event.tfinger.dy / yScaleFactor) * -1 <= -MIN_GESTURE_DELTA_PIXELS){ - HideSoftKeyboard(); - } - ignoreNextMouseUp = true; +#endif + // For swipes only. gestures requireing pinch or rotate need to use SDL_MULTIGESTURE or SDL_DOLLARGESTURE + case SDL_FINGERMOTION: + ignoreNextFingerUp = true; + if (numFingers == core->NumFingScroll || (numFingers != core->NumFingKboard && EvntManager->GetMouseFocusedControlType() == IE_GUI_TEXTAREA)) { + //any # of fingers != NumFingKBoard will scroll a text area + if (EvntManager->GetMouseFocusedControlType() == IE_GUI_TEXTAREA) { + // if we are scrolling a text area we dont want the keyboard in the way + HideSoftKeyboard(); + } else { + // ensure the control we touched becomes focused before attempting to scroll it. + ProcessFirstTouch(GEM_MB_ACTION); + } + // invert the coordinates such that dragging down scrolls up etc. + int scrollX = (event.tfinger.dx / xScaleFactor) * -1; + int scrollY = (event.tfinger.dy / yScaleFactor) * -1; + + EvntManager->MouseWheelScroll( scrollX, scrollY ); + } else if (numFingers == core->NumFingKboard) { + if ((event.tfinger.dy / yScaleFactor) * -1 >= MIN_GESTURE_DELTA_PIXELS){ + // if the keyboard is already up interpret this gesture as console pop + if( softKeyboardShowing && !ConsolePopped ) core->PopupConsole(); + else ShowSoftKeyboard(); + } else if((event.tfinger.dy / yScaleFactor) * -1 <= -MIN_GESTURE_DELTA_PIXELS){ + HideSoftKeyboard(); } + } else if (numFingers == 1) { + ProcessFirstTouch(GEM_MB_ACTION); + // standard mouse movement + ignoreNextFingerUp = false; + MouseMovement(event.tfinger.x / xScaleFactor, event.tfinger.y / yScaleFactor); } break; - case SDL_FINGERDOWN://SDL 1.3+ - touchHold = false; - if (++numFingers == 1) { - rightMouseDownEvent.x = event.tfinger.x / xScaleFactor; - rightMouseDownEvent.y = event.tfinger.y / yScaleFactor; - rightMouseUpEvent.x = event.tfinger.x / xScaleFactor; - rightMouseUpEvent.y = event.tfinger.y / yScaleFactor; - - touchHoldTime = SDL_GetTicks(); - touchHold = true; + case SDL_FINGERDOWN: + if (numFingers == 1) { + lastMouseDownTime = EvntManager->GetRKDelay(); + if (lastMouseDownTime != (unsigned long) ~0) { + lastMouseDownTime += lastMouseDownTime + lastTime; + } + // do not send a mouseDown event. we delay firstTouch until we know more about the context. + firstFingerDown = event.tfinger; + firstFingerDown.timestamp = GetTickCount(); + firstFingerDown.x /= xScaleFactor; + firstFingerDown.y /= yScaleFactor; } else if (EvntManager && numFingers == core->NumFingInfo) { + ProcessFirstTouch(GEM_MB_ACTION); EvntManager->OnSpecialKeyPress( GEM_TAB ); EvntManager->OnSpecialKeyPress( GEM_ALT ); } break; - case SDL_FINGERUP://SDL 1.3+ - touchHold = false;//even if there are still fingers in contact - if (numFingers) numFingers--; - if (formationRotation) { - EvntManager->MouseUp( event.tfinger.x, event.tfinger.y, GEM_MB_MENU, GetModState(SDL_GetModState()) ); - formationRotation = false; - ignoreNextMouseUp = false; + case SDL_FINGERUP: + { + // we need to get mouseButton before calling ProcessFirstTouch + int mouseButton = (firstFingerDown.fingerId) ? GEM_MB_ACTION : GEM_MB_MENU; + ProcessFirstTouch(GEM_MB_ACTION); + if (numFingers == 0) { // this event was the last finger that was in contact + if (!ignoreNextFingerUp) { + EvntManager->MouseUp( event.tfinger.x / xScaleFactor, event.tfinger.y / yScaleFactor, + mouseButton, GetModState(SDL_GetModState()) ); + // do mouse movement to ensure any cursor reflects the event location + MouseMovement(event.tfinger.x / xScaleFactor, event.tfinger.y / yScaleFactor); + } + ignoreNextFingerUp = false; + } + if (numFingers != core->NumFingInfo) { + // FIXME: this is "releasing" the ALT key even when it hadn't been previously "pushed" + // this isn't causing a problem currently + EvntManager->KeyRelease( GEM_ALT, 0 ); + } } - if (EvntManager && numFingers != core->NumFingInfo) { - EvntManager->KeyRelease( GEM_ALT, 0 ); break; case SDL_MULTIGESTURE:// use this for pinch or rotate gestures. see also SDL_DOLLARGESTURE // purposely ignore processing first touch here. I think users ould find it annoying @@ -441,10 +395,17 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event) ProcessFirstTouch(GEM_MB_ACTION); } break; + case SDL_MOUSEWHEEL: /* + TODO: need a preference for inverting these */ + short scrollX; + scrollX= event.wheel.x * -1; + short scrollY; + scrollY= event.wheel.y * -1; + EvntManager->MouseWheelScroll( scrollX, scrollY ); break; - /* not user input event */ + /* not user input events */ case SDL_TEXTINPUT: for (size_t i=0; i < strlen(event.text.text); i++) { if (core->ConsolePopped) @@ -465,13 +426,12 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event) break; case SDL_WINDOWEVENT_RESTORED: //SDL 1.3 /* - reset all static variables as if no events have happened yet + reset all input variables as if no events have happened yet restoring from "minimized state" should be a clean slate. */ - numFingers = 0; - touchHoldTime = 0; - touchHold = false; - ignoreNextMouseUp = false; + ignoreNextFingerUp = false; + firstFingerDown = SDL_TouchFingerEvent(); + // should we reset the lastMouseTime vars? #if TARGET_OS_IPHONE // FIXME: this is essentially a hack. // I believe there to be a bug in SDL 1.3 that is causeing the surface to be invalidated on a restore event for iOS diff --git a/gemrb/plugins/SDLVideo/SDL20Video.h b/gemrb/plugins/SDLVideo/SDL20Video.h index 21dff30..d6afaf8 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.h +++ b/gemrb/plugins/SDLVideo/SDL20Video.h @@ -30,18 +30,6 @@ private: SDL_Texture* videoPlayer; SDL_Window* window; SDL_Renderer* renderer; -/* - Ivars for touch input. - Most of these are temporary until touch input is rewritten to be independant of mouse events. -*/ - bool ignoreNextMouseUp; - Uint16 numFingers; - bool formationRotation; - bool touchHold; - Uint32 touchHoldTime; - // fake mouse events - SDL_MouseButtonEvent rightMouseDownEvent; - SDL_MouseButtonEvent rightMouseUpEvent; // touch input vars bool ignoreNextFingerUp; http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=88abf8a5e1c66d51f4cdb28f43ed97d63a5bb555 commit 88abf8a5e1c66d51f4cdb28f43ed97d63a5bb555 Author: Brad Allred <bradallred@...> Date: Sat Mar 10 19:34:57 2012 -0700 TouchInput: implement formation rotation gesture (untested since I only have simulator). It should work by touching with single finger to set pivot point then touch with a second finger that moves the application point when dragged. diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp index 2b14bd0..9bef5a3 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp @@ -420,16 +420,28 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event) } if (EvntManager && numFingers != core->NumFingInfo) { EvntManager->KeyRelease( GEM_ALT, 0 ); + break; + case SDL_MULTIGESTURE:// use this for pinch or rotate gestures. see also SDL_DOLLARGESTURE + // purposely ignore processing first touch here. I think users ould find it annoying + // to attempt a gesture and accidently command a party movement etc + if (firstFingerDown.fingerId && numFingers == 2 + && EvntManager->GetMouseFocusedControlType() == IE_GUI_GAMECONTROL) { + /* formation rotation gesture: + first touch with a single finger to obtain the pivot + then touch and drag with a second finger (while maintaining contact with first) + to move the application point + */ + GameControl* gc = core->GetGameControl(); + if (gc && gc->GetTargetMode() == TARGET_MODE_NONE) { + ProcessFirstTouch(GEM_MB_MENU); + SDL_Finger* secondFinger = state->fingers[1]; + gc->OnMouseOver(secondFinger->x + Viewport.x, secondFinger->y + Viewport.y); + } + } else { + ProcessFirstTouch(GEM_MB_ACTION); } break; - //multitouch gestures - case SDL_MULTIGESTURE://SDL 1.3+ - // use this for pinch or rotate gestures. see also SDL_DOLLARGESTURE - numFingers = event.mgesture.numFingers; /* - // perhaps formation rotation should be implemented here as a rotate gesture. - if (Evnt->GetMouseFocusedControlType() == IE_GUI_GAMECONTROL && numFingers == 2) { - } */ break; /* not user input event */ http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=805af163811d6181eb2d4bfe9bf41efbcfc01b79 commit 805af163811d6181eb2d4bfe9bf41efbcfc01b79 Author: Brad Allred <bradallred@...> Date: Sat Mar 10 19:29:01 2012 -0700 now that compatibility layer is gone i don't know if this error is relevant so i'm commenting it out. diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp index 1a50863..2b14bd0 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp @@ -474,10 +474,12 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event) #endif core->GetAudioDrv()->Resume();//this is for ANDROID mostly break; + /* case SDL_WINDOWEVENT_RESIZED: //SDL 1.2 // this event exists in SDL 1.2, but this handler is only getting compiled under 1.3+ Log(WARNING, "SDL 2 Driver", "Window resized so your window surface is now invalid."); break; + */ } break; default: http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=7be9ebbb03e2aebef946a28a04317a5b13caaf66 commit 7be9ebbb03e2aebef946a28a04317a5b13caaf66 Author: Brad Allred <bradallred@...> Date: Sat Mar 10 19:27:56 2012 -0700 TouchInput: add some ivars and new method ProcessFirstTouch to support touch input rewrite. diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp index b9e42b1..1a50863 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp @@ -81,6 +81,8 @@ SDL20VideoDriver::SDL20VideoDriver(void) rightMouseUpEvent.type = SDL_MOUSEBUTTONUP; rightMouseUpEvent.button = SDL_BUTTON_RIGHT; rightMouseUpEvent.state = SDL_RELEASED; + ignoreNextFingerUp = false; + firstFingerDown = SDL_TouchFingerEvent(); } SDL20VideoDriver::~SDL20VideoDriver(void) @@ -288,6 +290,16 @@ int SDL20VideoDriver::PollEvents() return SDLVideoDriver::PollEvents(); } +void SDL20VideoDriver::ProcessFirstTouch( int mouseButton ) +{ + if (firstFingerDown.fingerId) { + // no need to scale these coordinates. they were scaled previously for us. + EvntManager->MouseDown( firstFingerDown.x, firstFingerDown.y, + mouseButton, GetModState(SDL_GetModState()) ); + firstFingerDown = SDL_TouchFingerEvent(); + ignoreNextFingerUp = false; + } +} int SDL20VideoDriver::ProcessEvent(const SDL_Event & event) { diff --git a/gemrb/plugins/SDLVideo/SDL20Video.h b/gemrb/plugins/SDLVideo/SDL20Video.h index 8013ff4..21dff30 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.h +++ b/gemrb/plugins/SDLVideo/SDL20Video.h @@ -42,6 +42,10 @@ private: // fake mouse events SDL_MouseButtonEvent rightMouseDownEvent; SDL_MouseButtonEvent rightMouseUpEvent; + + // touch input vars + bool ignoreNextFingerUp; + SDL_TouchFingerEvent firstFingerDown; public: SDL20VideoDriver(void); ~SDL20VideoDriver(void); @@ -71,6 +75,9 @@ private: bool SetSurfaceAlpha(SDL_Surface* surface, unsigned short alpha); int ProcessEvent(const SDL_Event & event); + // the first finger touch of a gesture is delayed until another touch event or until + // enough time passes for it to become a right click + void ProcessFirstTouch( int mouseButton ); }; } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Jaka Kranjc <lynxlupodian@us...> - 2012-03-10 21:45:28
|
gemrb: Infinity Engine emulator The branch master has been updated via a51fe3b1cdc3e75a4d4d9d9a97172c7bdb14221c (commit) Summary of changes: gemrb/core/Interface.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) from 1257fd412ff90b78838093db2afcb65e82c30808 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=a51fe3b1cdc3e75a4d4d9d9a97172c7bdb14221c commit a51fe3b1cdc3e75a4d4d9d9a97172c7bdb14221c Author: Jaka Kranjc <lynxlupodian@...> Date: Sat Mar 10 22:41:47 2012 +0100 iwd2 has no regeneration from high constitution diff --git a/gemrb/core/Interface.cpp b/gemrb/core/Interface.cpp index e75673b..9af8cfd 100644 --- a/gemrb/core/Interface.cpp +++ b/gemrb/core/Interface.cpp @@ -5310,8 +5310,11 @@ int Interface::GetDexterityBonus(int column, int value) const int Interface::GetConstitutionBonus(int column, int value) const { - //no conmod in iwd2 + //no conmod in iwd2 and also no regenation bonus if (HasFeature(GF_3ED_RULES)) { + if (column == STAT_CON_HP_REGEN) { + return 0; + } return value/2-5; } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Jaka Kranjc <lynxlupodian@us...> - 2012-03-10 19:19:20
|
gemrb: Infinity Engine emulator The branch master has been updated via 1257fd412ff90b78838093db2afcb65e82c30808 (commit) Summary of changes: gemrb/GUIScripts/GUICommon.py | 29 +++++++++++++++++++++++++++-- gemrb/GUIScripts/GUICommonWindows.py | 2 +- 2 files changed, 28 insertions(+), 3 deletions(-) from 791f8cee118ecc8440fcead3757b91647a5ccb89 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=1257fd412ff90b78838093db2afcb65e82c30808 commit 1257fd412ff90b78838093db2afcb65e82c30808 Author: Jaka Kranjc <lynxlupodian@...> Date: Sat Mar 10 20:15:57 2012 +0100 iwd2: implemented the default hp bar degradation (vs blood overlay) diff --git a/gemrb/GUIScripts/GUICommon.py b/gemrb/GUIScripts/GUICommon.py index f49b149..90c2f35 100644 --- a/gemrb/GUIScripts/GUICommon.py +++ b/gemrb/GUIScripts/GUICommon.py @@ -715,7 +715,7 @@ def IsWarrior (actor): return IsWarrior -def SetupDamageInfo (pc, Button): +def SetupDamageInfo (pc, Button, Window): hp = GemRB.GetPlayerStat (pc, IE_HITPOINTS) hp_max = GemRB.GetPlayerStat (pc, IE_MAXHITPOINTS) state = GemRB.GetPlayerStat (pc, IE_STATE_ID) @@ -727,8 +727,33 @@ def SetupDamageInfo (pc, Button): if hp < 1 or (state & STATE_DEAD): Button.SetOverlay (0, 64,64,64,200, 64,64,64,200) + + if GemRB.GetVar("Old Portrait Health") or not GameIsIWD2(): + # draw the blood overlay + if hp >= 1 and not (state & STATE_DEAD): + Button.SetOverlay (ratio, 160,0,0,200, 60,0,0,190) else: - Button.SetOverlay (ratio, 160,0,0,200, 60,0,0,190) + # scale the hp bar under the portraits and recolor it + # GUIHITPT has 5 frames with different severity colors + # luckily their ids follow a nice pattern + hpBar = Window.GetControl (pc-1 + 50) + if ratio == 1: + # white + hpBar.SetBAM ("GUIHITPT", 0, 0) + elif ratio < 1 and ratio >= 0.75: + # green + hpBar.SetBAM ("GUIHITPT", 1, 0) + elif ratio < 0.75 and ratio >= 0.50: + # yellow + hpBar.SetBAM ("GUIHITPT", 2, 0) + elif ratio < 0.50 and ratio >= 0.25: + # orange + hpBar.SetBAM ("GUIHITPT", 3, 0) + else: + # red + hpBar.SetBAM ("GUIHITPT", 4, 0) + hpBar.SetPictureClipping (ratio) + ratio_str = "\n%d/%d" %(hp, hp_max) Button.SetTooltip (GemRB.GetPlayerName (pc, 1) + ratio_str) diff --git a/gemrb/GUIScripts/GUICommonWindows.py b/gemrb/GUIScripts/GUICommonWindows.py index 805ff32..9a84c6b 100644 --- a/gemrb/GUIScripts/GUICommonWindows.py +++ b/gemrb/GUIScripts/GUICommonWindows.py @@ -1074,7 +1074,7 @@ def UpdatePortraitWindow (): Button.SetState (IE_GUI_BUTTON_LOCKED) Button.SetPicture (pic, "NOPORTSM") - ratio_str = GUICommon.SetupDamageInfo (portid+1, Button) + ratio_str = GUICommon.SetupDamageInfo (portid+1, Button, Window) #add effects on the portrait effects = GemRB.GetPlayerStates (portid+1) ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Jaka Kranjc <lynxlupodian@us...> - 2012-03-10 17:26:49
|
gemrb: Infinity Engine emulator The branch master has been updated via 791f8cee118ecc8440fcead3757b91647a5ccb89 (commit) via 28056fadc438a7382b0873e60ef51f8e84d761a8 (commit) Summary of changes: gemrb/override/iwd2/proftype.2da | 4 ++-- gemrb/plugins/ITMImporter/ITMImporter.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) from 356aee1ee69b7e24b72d2c34c71e9f28ed5d3810 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=791f8cee118ecc8440fcead3757b91647a5ccb89 commit 791f8cee118ecc8440fcead3757b91647a5ccb89 Author: Jaka Kranjc <lynxlupodian@...> Date: Sat Mar 10 18:24:01 2012 +0100 iwd2: fixed weapon proficiency mapping for spears and daggers diff --git a/gemrb/override/iwd2/proftype.2da b/gemrb/override/iwd2/proftype.2da index fe0a28d..e353325 100644 --- a/gemrb/override/iwd2/proftype.2da +++ b/gemrb/override/iwd2/proftype.2da @@ -17,7 +17,7 @@ 13 -1 14 -1 15_BOW 0 -16_DAGGER 7 +16_DAGGER 11 17_MACE 4 18_SLING 2 19_SWORD 11 @@ -30,7 +30,7 @@ 26_STAFF 8 27_XBOW 1 28_HAND -2 -29_SPEAR 3 +29_SPEAR 6 30_HALBERD 6 31 -1 32 -1 http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=28056fadc438a7382b0873e60ef51f8e84d761a8 commit 28056fadc438a7382b0873e60ef51f8e84d761a8 Author: Jaka Kranjc <lynxlupodian@...> Date: Sat Mar 10 18:20:29 2012 +0100 fixed the proftype reading (wrong column -> default value) diff --git a/gemrb/plugins/ITMImporter/ITMImporter.cpp b/gemrb/plugins/ITMImporter/ITMImporter.cpp index 15782cb..b107b08 100644 --- a/gemrb/plugins/ITMImporter/ITMImporter.cpp +++ b/gemrb/plugins/ITMImporter/ITMImporter.cpp @@ -48,7 +48,7 @@ static void Initializer() profcount = tm->GetRowCount(); profs = (int *) calloc( profcount, sizeof(int) ); for (int i = 0; i < profcount; i++) { - profs[i] = atoi(tm->QueryField( i, 1 ) ); + profs[i] = atoi(tm->QueryField( i, 0 ) ); } } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Jaka Kranjc <lynxlupodian@us...> - 2012-03-10 16:49:49
|
gemrb: Infinity Engine emulator The branch master has been updated via 356aee1ee69b7e24b72d2c34c71e9f28ed5d3810 (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) from f9e17955b1d5ebee17d9c9edef52921e64295789 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=356aee1ee69b7e24b72d2c34c71e9f28ed5d3810 commit 356aee1ee69b7e24b72d2c34c71e9f28ed5d3810 Author: Jaka Kranjc <lynxlupodian@...> Date: Sat Mar 10 17:46:22 2012 +0100 don't give a weapon proficiency penalty for fists diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index da01171..f3862ca 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -5206,7 +5206,10 @@ bool Actor::GetCombatDetails(int &tohit, bool leftorright, WeaponInfo& wi, ITMEx //or i just got lost a negation somewhere THAC0Bonus -= 4; } else { - THAC0Bonus += wspecial[stars][0]; + // everyone is proficient with fists + if (Equipped != IW_NO_EQUIPPED) { + THAC0Bonus += wspecial[stars][0]; + } } DamageBonus += wspecial[stars][1]; speed += wspecial[stars][2]; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-09 21:23:22
|
gemrb: Infinity Engine emulator The branch master has been updated via f9e17955b1d5ebee17d9c9edef52921e64295789 (commit) Summary of changes: gemrb/override/iwd2/strings.2da | 294 +++++++++++++++++++------------------- 1 files changed, 147 insertions(+), 147 deletions(-) from 3f1d9e1bcf1631c5f0580e09dd3861d2f03ec062 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=f9e17955b1d5ebee17d9c9edef52921e64295789 commit f9e17955b1d5ebee17d9c9edef52921e64295789 Author: Avenger <avenger_teambg@...> Date: Fri Mar 9 22:22:55 2012 +0100 fixed messed up strings table for iwd2 diff --git a/gemrb/override/iwd2/strings.2da b/gemrb/override/iwd2/strings.2da index 2b055fc..0412ea4 100644 --- a/gemrb/override/iwd2/strings.2da +++ b/gemrb/override/iwd2/strings.2da @@ -1,112 +1,112 @@ 2DA V1.0 -1 STRREF -SCATTERED 55021 -WHOLEPARTY -1 -DOORLOCKED 19309 -MAGICTRAP 19289 -NORMALTRAP 19289 -TRAP -1 -CANNOTGO -1 -TRAPREMOVED 19287 -OVERSTOCKED 19283 -SLEEP -1 -AMBUSH -1 -CONTLOCKED 22031 -NOMONEY -1 -CURSED 50538 -SPELLDISRUPT -1 -DIED -1 -MAYNOTREST 34599 -CANTRESTMONS 34600 -CANTSAVEMONS 34598 -CANTSAVE 34592 -NODIALOG -1 -CANTSAVEDIALOG 34593 -CANTSAVEDIALOG2 -1 -CANTSAVEMOVIE 34594 +SCATTERED 16457 +WHOLEPARTY 16484 +DOORLOCKED 16485 +MAGICTRAP 16486 +NORMALTRAP 16487 +TRAP 16488 +CANNOTGO 16489 +TRAPREMOVED 16490 +OVERSTOCKED 16491 +SLEEP 16492 +AMBUSH 16493 +CONTLOCKED 16494 +NOMONEY 16495 +CURSED 16496 +SPELLDISRUPT 16497 +DIED 16498 +MAYNOTREST 16499 +CANTRESTMONS 16500 +CANTSAVEMONS 16501 +CANTSAVE 16502 +NODIALOG 10945 +CANTSAVEDIALOG 19253 +CANTSAVEDIALOG2 19254 +CANTSAVEMOVIE 19255 TARGETBUSY -1 CANTTALKTRANS -1 -GOTGOLD 19252 -LOSTGOLD 19253 -GOTXP 19254 -LOSTXP 19255 -GOTITEM 19256 -LOSTITEM 19258 -GOTREP 19259 -LOSTREP 19260 -GOTABILITY 19307 -GOTSPELL -1 -GOTSONG -1 +GOTGOLD 17572 +LOSTGOLD 17573 +GOTXP 17574 +LOSTXP 17575 +GOTITEM 17576 +LOSTITEM 17577 +GOTREP 19686 +LOSTREP 19687 +GOTABILITY 10514 +GOTSPELL 10514 +GOTSONG 26320 NOTHINGTOSAY -1 -JOURNALCHANGE 37096 -WORLDMAPCHANGE 19264 -PAUSED 39436 -UNPAUSED -1 -SCRIPTPAUSED 39436 -AP_UNUSABLE 39436 -AP_ATTACKED 39436 -AP_HIT 39436 -AP_WOUNDED 39436 -AP_DEAD 39436 -AP_NOTARGET 39436 -AP_ENDROUND 39436 -AP_ENEMY 39436 -AP_TRAP 39436 -AP_SPELLCAST 39436 -AP_GENERIC 39436 -AP_RESERVED1 39436 -AP_RESERVED2 39436 -AP_RESERVED3 39436 -CHARMED -1 -DIRECHARMED -1 +JOURNALCHANGE 11359 +WORLDMAPCHANGE 11360 +PAUSED 16321 +UNPAUSED 16322 +SCRIPTPAUSED 7666 +AP_UNUSABLE 17113 +AP_ATTACKED 17114 +AP_HIT 17115 +AP_WOUNDED 17116 +AP_DEAD 17117 +AP_NOTARGET 17118 +AP_ENDROUND 10014 +AP_ENEMY 23511 +AP_TRAP -1 +AP_SPELLCAST -1 +AP_GENERIC 17166 +AP_RESERVED1 -1 +AP_RESERVED2 -1 +AP_RESERVED3 -1 +CHARMED 14672 +DIRECHARMED 14780 CONTROLLED -1 -EVIL -1 -GNE_NEUTRAL -1 -GOOD -1 +EVIL 16505 +GNE_NEUTRAL 16504 +GOOD 16503 STR_LAWFUL -1 LNC_NEUTRAL -1 CHAOTIC -1 -ACTION_CAST -1 -ACTION_ATTACK -1 -ACTION_TURN -1 -ACTION_SONG -1 -ACTION_FINDTRAP -1 -MAGICWEAPON -1 -OFFHAND_USED -1 -TWOHANDED_USED -1 -CANNOT_USE_ITEM 50532 -CANT_DROP_ITEM 50569 -NOT_IN_OFFHAND -1 -ITEM_IS_CURSED 50538 -NO_CRITICAL 19273 +ACTION_CAST 16464 +ACTION_ATTACK 16465 +ACTION_TURN 16466 +ACTION_SONG 16467 +ACTION_FINDTRAP 16468 +MAGICWEAPON 10141 +OFFHAND_USED 9380 +TWOHANDED_USED 9381 +CANNOT_USE_ITEM 9382 +CANT_DROP_ITEM 25697 +NOT_IN_OFFHAND 26342 +ITEM_IS_CURSED 16304 +NO_CRITICAL 20696 TRACKING -1 -TRACKINGFAILED -1 +TRACKINGFAILED 19534 DOOR_NOPICK 23169 CONT_NOPICK 23169 CANTSAVECOMBAT -1 CANTSAVENOCTRL -1 -LOCKPICK_DONE 19281 -LOCKPICK_FAILED 19282 -STATIC_DISSIPATE -1 -LIGHTNING_DISSIPATE -1 -HAS_NO_ABILITY 50545 -NEEDS_IDENTIFY 50544 -WRONG_ITEMTYPE 50537 -HAS_ITEMEXCL -1 -PICKPOCKET_DONE -1 -PICKPOCKET_NONE 19304 -PICKPOCKET_FAIL 19303 -PICKPOCKET_EVIL 19302 -PICKPOCKET_ARMOR 19301 -USING_FEAT -1 -STOPPED_FEAT -1 +LOCKPICK_DONE 16517 +LOCKPICK_FAILED 16518 +STATIC_DISSIPATE 26518 +LIGHTNING_DISSIPATE 41008 +HAS_NO_ABILITY 17317 +NEEDS_IDENTIFY 17316 +WRONG_ITEMTYPE 9375 +HAS_ITEMEXCL 20685 +PICKPOCKET_DONE 10072 +PICKPOCKET_NONE 18297 +PICKPOCKET_FAIL 10069 +PICKPOCKET_EVIL 10068 +PICKPOCKET_ARMOR 10067 +USING_FEAT 39823 +STOPPED_FEAT 39853 DISARM_DONE 16520 DISARM_FAIL 1608 -DOORBASH_DONE -1 -DOORBASH_FAIL -1 -CONTBASH_DONE -1 -CONTBASH_FAIL -1 +DOORBASH_DONE 9915 +DOORBASH_FAIL 9913 +CONTBASH_DONE 9916 +CONTBASH_FAIL 9914 MAYNOTSETTRAP -1 SNAREFAILED -1 SNARESUCCEED -1 @@ -114,72 +114,72 @@ NOMORETRAP -1 DISABLEDMAGE -1 SAVESUCCEED 1682 QSAVESUCCEED 10237 -UNINJURED -1 -INJURED1 -1 -INJURED2 -1 -INJURED3 -1 -INJURED4 -1 -HOURS -1 -HOUR -1 -DAYS -1 -DAY -1 -REST -1 -JOURNEY -1 -PST_REST 19262 -PST_HOUR 19312 -PST_HOURS 19313 -DAMAGE_IMMUNITY -1 -DAMAGE_STR1 -1 -DAMAGE_STR2 -1 -DAMAGE_STR3 -1 -DMG_POISON -1 -DMG_MAGIC -1 -DMG_MISSILE -1 -DMG_SLASHING -1 -DMG_PIERCING -1 -DMG_CRUSHING -1 -DMG_FIRE -1 -DMG_ELECTRIC -1 -DMG_COLD -1 -DMG_ACID -1 -DMG_OTHER -1 +UNINJURED 2943 +INJURED1 2944 +INJURED2 2945 +INJURED3 2946 +INJURED4 2947 +HOURS 10700 +HOUR 10701 +DAYS 10697 +DAY 10698 +REST 10690 +JOURNEY 10689 +PST_REST -1 +PST_HOUR -1 +PST_HOURS -1 +DAMAGE_IMMUNITY 25038 +DAMAGE_STR1 25028 +DAMAGE_STR2 25017 +DAMAGE_STR3 26223 +DMG_POISON 25018 +DMG_MAGIC 25019 +DMG_MISSILE 25020 +DMG_SLASHING 25021 +DMG_PIERCING 25022 +DMG_CRUSHING 25023 +DMG_FIRE 25024 +DMG_ELECTRIC 25025 +DMG_COLD 25026 +DMG_ACID 25027 +DMG_OTHER 0 GOTQUESTXP -1 -LEVELUP 4246 -INVFULL_ITEMDROP 37079 -CONT_DUP -1 +LEVELUP 17119 +INVFULL_ITEMDROP 32879 +CONT_DUP 32876 CONT_TRIG -1 CONT_FAIL -1 SEQ_DUP -1 -CRITICAL_HIT 19272 -CRITICAL_MISS 19274 -DEATH -1 +CRITICAL_HIT 16462 +CRITICAL_MISS 16463 +DEATH 14026 BACKSTAB 12128 -BACKSTAB_BAD 19271 -BACKSTAB_FAIL -1 +BACKSTAB_BAD 10013 +BACKSTAB_FAIL 121 CASTER_LVL_INC -1 CASTER_LVL_DEC -1 -CHARS_EXPORTED -1 -PALADIN_FALL -1 -RANGER_FALL -1 -RES_RESISTED -1 +CHARS_EXPORTED 26827 +PALADIN_FALL 19620 +RANGER_FALL 19621 +RES_RESISTED 26818 DEADMAGIC_FAIL -1 MISCASTMAGIC -1 WILDSURGE -1 -FAMBLOCK -1 -FAMPROTAGONIST -1 -MAGIC_RESISTED -1 -CANTSAVESTORE -1 +FAMBLOCK 8537 +FAMPROTAGONIST 8538 +MAGIC_RESISTED 19224 +CANTSAVESTORE 10841 NOSEE_NOCAST -1 -AURACLEANSED -1 -INDOOR_FAIL 19300 -SPELL_DISRUPTED -1 +AURACLEANSED 23797 +INDOOR_FAIL 9744 +SPELL_DISRUPTED 14796 CHAOSSHIELD -1 -RAPIDSHOT -1 -HAMSTRING -1 -ARTERIAL -1 -EXPERTISE -1 -POWERATTACK -1 -CLEAVE -1 -HELD -1 +RAPIDSHOT 35796 +HAMSTRING 35787 +ARTERIAL 35774 +EXPERTISE 35785 +POWERATTACK 35794 +CLEAVE 39846 +HELD 14102 SLOWED 19503 CANTMOVE 19504 ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-09 21:19:32
|
gemrb: Infinity Engine emulator The branch master has been updated via 3f1d9e1bcf1631c5f0580e09dd3861d2f03ec062 (commit) Summary of changes: gemrb/override/pst/strings.2da | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) from 6be0a0de265dd9142dd3cf17f9ef3fecb80a3df9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=3f1d9e1bcf1631c5f0580e09dd3861d2f03ec062 commit 3f1d9e1bcf1631c5f0580e09dd3861d2f03ec062 Author: Avenger <avenger_teambg@...> Date: Fri Mar 9 22:18:19 2012 +0100 missing HELD string diff --git a/gemrb/override/pst/strings.2da b/gemrb/override/pst/strings.2da index 1c3a4de..7e12880 100644 --- a/gemrb/override/pst/strings.2da +++ b/gemrb/override/pst/strings.2da @@ -180,5 +180,6 @@ ARTERIAL -1 EXPERTISE -1 POWERATTACK -1 CLEAVE -1 +HELD -1 SLOWED 36999 CANTMOVE 37007 ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-09 21:08:40
|
gemrb: Infinity Engine emulator The branch master has been updated via 6be0a0de265dd9142dd3cf17f9ef3fecb80a3df9 (commit) Summary of changes: gemrb/override/iwd2/strings.2da | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) from 0f02da12f44334dfa02c4943f70dcb948d1e3be2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=6be0a0de265dd9142dd3cf17f9ef3fecb80a3df9 commit 6be0a0de265dd9142dd3cf17f9ef3fecb80a3df9 Author: Avenger <avenger_teambg@...> Date: Fri Mar 9 22:07:30 2012 +0100 no more remorhaz burrowing through the door (strrefs came from pst) diff --git a/gemrb/override/iwd2/strings.2da b/gemrb/override/iwd2/strings.2da index 1564775..2b055fc 100644 --- a/gemrb/override/iwd2/strings.2da +++ b/gemrb/override/iwd2/strings.2da @@ -112,8 +112,8 @@ SNAREFAILED -1 SNARESUCCEED -1 NOMORETRAP -1 DISABLEDMAGE -1 -SAVESUCCEED 28646 -QSAVESUCCEED 50461 +SAVESUCCEED 1682 +QSAVESUCCEED 10237 UNINJURED -1 INJURED1 -1 INJURED2 -1 ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-09 20:49:57
|
gemrb: Infinity Engine emulator The branch master has been updated via 0f02da12f44334dfa02c4943f70dcb948d1e3be2 (commit) Summary of changes: gemrb/plugins/CREImporter/CREImporter.cpp | 105 +++++++++++++++++++++-------- gemrb/plugins/CREImporter/CREImporter.h | 5 +- 2 files changed, 80 insertions(+), 30 deletions(-) from 895a1058b09bb0fdc8a4cb2ce753b0b38486df88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=0f02da12f44334dfa02c4943f70dcb948d1e3be2 commit 0f02da12f44334dfa02c4943f70dcb948d1e3be2 Author: Avenger <avenger_teambg@...> Date: Fri Mar 9 21:49:01 2012 +0100 iwd2:write spellbooks of creatures properly in saved games/exports diff --git a/gemrb/plugins/CREImporter/CREImporter.cpp b/gemrb/plugins/CREImporter/CREImporter.cpp index 5238a57..0e695d3 100644 --- a/gemrb/plugins/CREImporter/CREImporter.cpp +++ b/gemrb/plugins/CREImporter/CREImporter.cpp @@ -224,7 +224,7 @@ int CREImporter::FindSpellType(char *name, unsigned short &level, unsigned int c return SpellType(name, level, clsmsk); } -/* this is not used, but may be useful later +//int CREImporter::ResolveSpellName(ieResRef name, int level, ieIWD2SpellType type) const int ResolveSpellName(ieResRef name, int level, ieIWD2SpellType type) { int i; @@ -261,11 +261,13 @@ int ResolveSpellName(ieResRef name, int level, ieIWD2SpellType type) } break; default: - return -1; + for(i=0;i<splcount;i++) { + if (spllist[i].Equals(name) ) return i; + } } return -1; } -*/ + //input: index, level, type, kit static const ieResRef *ResolveSpellIndex(int index, int level, ieIWD2SpellType type, int kit) { @@ -1242,7 +1244,7 @@ void CREImporter::ReadInventory(Actor *act, unsigned int Inventory_Size) memorized_spells[k] = NULL; continue; } - print("[CREImporter]: Duplicate memorized spell(%d) in creature!", k); + Log(WARNING, "CREImporter", "Duplicate memorized spell(%d) in creature!", k); } } @@ -2139,9 +2141,17 @@ int CREImporter::GetStoredFileSize(Actor *actor) KnownSpellsOffset = headersize; if (actor->version==IE_CRE_V2_2) { //iwd2 - //adding spellbook header sizes - //class spells, domains, (shapes,songs,innates) - headersize += 7*9*8 + 9*8 + 3*8; + int type, level; + + for (type=IE_IWD2_SPELL_BARD;type<IE_IWD2_SPELL_DOMAIN;type++) for(level=0;level<9;level++) { + headersize += GetIWD2SpellpageSize(actor, (ieIWD2SpellType) type, level)*16+8; + } + for(level=0;level<9;level++) { + headersize += GetIWD2SpellpageSize(actor, IE_IWD2_SPELL_DOMAIN, level)*16+8; + } + for (type=IE_IWD2_SPELL_INNATE;type<NUM_IWD2_SPELLTYPES;type++) { + headersize += GetIWD2SpellpageSize(actor, (ieIWD2SpellType) type, 0)*16+8; + } } else {//others //adding known spells KnownSpellsCount = actor->spellbook.GetTotalKnownSpellsCount(); @@ -2923,6 +2933,39 @@ int CREImporter::PutVariables( DataStream *stream, Actor *actor) return 0; } +//Don't forget to add 8 for the totals/bonus fields +ieDword CREImporter::GetIWD2SpellpageSize(Actor *actor, ieIWD2SpellType type, int level) const +{ + CRESpellMemorization* sm = actor->spellbook.GetSpellMemorization(type, level); + ieDword cnt = sm->known_spells.size(); + return cnt; +} + +int CREImporter::PutIWD2Spellpage(DataStream *stream, Actor *actor, ieIWD2SpellType type, int level) +{ + ieDword ID, max, known; + + CRESpellMemorization* sm = actor->spellbook.GetSpellMemorization(type, level); + for (unsigned int k = 0; k < sm->known_spells.size(); k++) { + CREKnownSpell *ck = sm->known_spells[k]; + ID = ResolveSpellName(ck->SpellResRef, level, type); + stream->WriteDword ( &ID); + max = actor->spellbook.CountSpells(ck->SpellResRef, type, 1); + known = actor->spellbook.CountSpells(ck->SpellResRef, type, 0); + stream->WriteDword ( &max); + stream->WriteDword ( &known); + //unknown field (always 0) + known = 0; + stream->WriteDword (&known); + } + + max = sm->Number; + known = sm->Number2; + stream->WriteDword ( &max); + stream->WriteDword ( &known); + return 0; +} + /* this function expects GetStoredFileSize to be called before */ int CREImporter::PutActor(DataStream *stream, Actor *actor, bool chr) { @@ -2978,30 +3021,35 @@ int CREImporter::PutActor(DataStream *stream, Actor *actor, bool chr) return ret; } - //writing offsets + //writing offsets and counts if (actor->version==IE_CRE_V2_2) { - int i; + int type, level; //class spells - for (i=0;i<7*9;i++) { + for (type=IE_IWD2_SPELL_BARD;type<IE_IWD2_SPELL_DOMAIN;type++) for(level=0;level<9;level++) { + tmpDword = GetIWD2SpellpageSize(actor, (ieIWD2SpellType) type, level); stream->WriteDword(&KnownSpellsOffset); - KnownSpellsOffset+=8; + KnownSpellsOffset+=tmpDword*16+8; } - for (i=0;i<7*9;i++) { + for (type=IE_IWD2_SPELL_BARD;type<IE_IWD2_SPELL_DOMAIN;type++) for(level=0;level<9;level++) { + tmpDword = GetIWD2SpellpageSize(actor, (ieIWD2SpellType) type, level); stream->WriteDword(&tmpDword); } //domain spells - for (i=0;i<9;i++) { + for (level=0;level<9;level++) { + tmpDword = GetIWD2SpellpageSize(actor, IE_IWD2_SPELL_DOMAIN, level); stream->WriteDword(&KnownSpellsOffset); - KnownSpellsOffset+=8; + KnownSpellsOffset+=tmpDword*16+8; } - for (i=0;i<9;i++) { + for (level=0;level<9;level++) { + tmpDword = GetIWD2SpellpageSize(actor, IE_IWD2_SPELL_DOMAIN, level); stream->WriteDword(&tmpDword); } //innates, shapes, songs - for (i=0;i<3;i++) { + for (type=IE_IWD2_SPELL_INNATE;type<NUM_IWD2_SPELLTYPES;type++) { + tmpDword = GetIWD2SpellpageSize(actor, (ieIWD2SpellType) type, 0); stream->WriteDword(&KnownSpellsOffset); - KnownSpellsOffset+=8; + KnownSpellsOffset+=tmpDword*16+8; stream->WriteDword(&tmpDword); } } else { @@ -3023,22 +3071,21 @@ int CREImporter::PutActor(DataStream *stream, Actor *actor, bool chr) //spells, spellbook etc if (actor->version==IE_CRE_V2_2) { - int i; + int type, level; - //putting out book headers - for (i=0;i<7*9;i++) { - stream->WriteDword(&tmpDword); - stream->WriteDword(&tmpDword); + //writing out spell page headers + for (type=IE_IWD2_SPELL_BARD;type<IE_IWD2_SPELL_DOMAIN;type++) for(level=0;level<9;level++) { + PutIWD2Spellpage(stream, actor, (ieIWD2SpellType) type, level); } - //domain headers - for (i=0;i<9;i++) { - stream->WriteDword(&tmpDword); - stream->WriteDword(&tmpDword); + + //writing out domain page headers + for (level=0;level<9;level++) { + PutIWD2Spellpage(stream, actor, IE_IWD2_SPELL_DOMAIN, level); } + //innates, shapes, songs - for (i=0;i<3;i++) { - stream->WriteDword(&tmpDword); - stream->WriteDword(&tmpDword); + for (type = IE_IWD2_SPELL_INNATE; type<NUM_IWD2_SPELLTYPES; type ++) { + PutIWD2Spellpage(stream, actor, (ieIWD2SpellType) type, 0); } } else { assert(stream->GetPos() == CREOffset+KnownSpellsOffset); diff --git a/gemrb/plugins/CREImporter/CREImporter.h b/gemrb/plugins/CREImporter/CREImporter.h index 72bf1df..56a71ea 100644 --- a/gemrb/plugins/CREImporter/CREImporter.h +++ b/gemrb/plugins/CREImporter/CREImporter.h @@ -69,7 +69,8 @@ public: bool Open(DataStream* stream); Actor* GetActor(unsigned char is_in_party); - int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) const; + int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) const; + //returns saved size, updates internal offsets before save int GetStoredFileSize(Actor *ac); //saves file @@ -88,6 +89,7 @@ private: void GetActorBG(Actor *actor); void GetActorIWD1(Actor *actor); void GetActorIWD2(Actor *actor); + ieDword GetIWD2SpellpageSize(Actor *actor, ieIWD2SpellType type, int level) const; void GetIWD2Spellpage(Actor *act, ieIWD2SpellType type, int level, int count); void ReadInventory(Actor*, unsigned int); void ReadEffects(Actor* actor); @@ -106,6 +108,7 @@ private: int PutActorBG(DataStream *stream, Actor *actor); int PutActorIWD1(DataStream *stream, Actor *actor); int PutActorIWD2(DataStream *stream, Actor *actor); + int PutIWD2Spellpage(DataStream *stream, Actor *actor, ieIWD2SpellType type, int level); int PutKnownSpells(DataStream *stream, Actor *actor); int PutSpellPages(DataStream *stream, Actor *actor); int PutMemorizedSpells(DataStream *stream, Actor *actor); ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Jaka Kranjc <lynxlupodian@us...> - 2012-03-09 18:39:07
|
gemrb: Infinity Engine emulator The branch master has been updated via 895a1058b09bb0fdc8a4cb2ce753b0b38486df88 (commit) via 340bd66ae9b508047444915f49b2e0729b79abff (commit) Summary of changes: gemrb/GUIScripts/bg1/GUIOPT.py | 12 ++++++------ gemrb/GUIScripts/bg2/GUIOPT.py | 12 ++++++------ gemrb/GUIScripts/iwd/GUIOPT.py | 12 ++++++------ gemrb/GUIScripts/iwd2/GUIOPT.py | 12 ++++++------ gemrb/core/Scriptable/Actor.cpp | 14 +++++++++----- gemrb/core/Scriptable/Actor.h | 6 ++++-- 6 files changed, 37 insertions(+), 31 deletions(-) from de556b6a2b698050370d2f34f95cd0349502fbf9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=895a1058b09bb0fdc8a4cb2ce753b0b38486df88 commit 895a1058b09bb0fdc8a4cb2ce753b0b38486df88 Author: Evan Shaw <edsrzf@...> Date: Fri Mar 9 13:12:15 2012 +1300 Fix segfault for games with no monk class When an unarmed character attacked, the engine tried to apply monk bonuses even when no monk class was available, causing a segfault. diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 23c4084..da01171 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -5072,7 +5072,7 @@ ieDword Actor::GetNumberOfAttacks() const { int bonus = 0; - if (Equipped == IW_NO_EQUIPPED) { + if (monkbon != NULL && Equipped == IW_NO_EQUIPPED) { unsigned int level = GetMonkLevel(); if (level>=monkbon_cols) level=monkbon_cols-1; if (level>0) { http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=340bd66ae9b508047444915f49b2e0729b79abff commit 340bd66ae9b508047444915f49b2e0729b79abff Author: Evan Shaw <edsrzf@...> Date: Fri Mar 9 10:45:57 2012 +1300 Fix select and command sound issues * Correct the radio button values for CommandSounds and SelectionSounds in all games. * When Selection Sounds Frequency is Seldom, play sound 20% of the time instead of 25% of the time to match the option description. * When Command Sounds Frequency is Seldom, play a sound only once after the character has been selected. diff --git a/gemrb/GUIScripts/bg1/GUIOPT.py b/gemrb/GUIScripts/bg1/GUIOPT.py index 98ac733..cd46db0 100644 --- a/gemrb/GUIScripts/bg1/GUIOPT.py +++ b/gemrb/GUIScripts/bg1/GUIOPT.py @@ -296,12 +296,12 @@ def OpenCharacterSoundsWindow (): OptCheckbox ('Subtitles', Window, 5, 20, 'Subtitles', 1) OptCheckbox ('AttackSounds', Window, 6, 18, 'Attack Sounds', 1) OptCheckbox ('Footsteps', Window, 7, 19, 'Footsteps', 1) - OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 1) - OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 2) - OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 3) - OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 1) - OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 2) - OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 3) + OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 2) + OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 1) + OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 0) + OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 2) + OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 1) + OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 0) Window.ShowModal (MODAL_SHADOW_GRAY) diff --git a/gemrb/GUIScripts/bg2/GUIOPT.py b/gemrb/GUIScripts/bg2/GUIOPT.py index 444925d..40239a4 100644 --- a/gemrb/GUIScripts/bg2/GUIOPT.py +++ b/gemrb/GUIScripts/bg2/GUIOPT.py @@ -292,12 +292,12 @@ def OpenCharacterSoundsWindow (): OptCheckbox ('Subtitles', Window, 5, 20, 'Subtitles', 1) OptCheckbox ('AttackSounds', Window, 6, 18, 'Attack Sounds', 1) OptCheckbox ('Footsteps', Window, 7, 19, 'Footsteps', 1) - OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 1) - OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 2) - OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 3) - OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 1) - OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 2) - OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 3) + OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 2) + OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 1) + OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 0) + OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 2) + OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 1) + OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 0) Window.ShowModal (MODAL_SHADOW_GRAY) diff --git a/gemrb/GUIScripts/iwd/GUIOPT.py b/gemrb/GUIScripts/iwd/GUIOPT.py index ee8e21b..5946b14 100644 --- a/gemrb/GUIScripts/iwd/GUIOPT.py +++ b/gemrb/GUIScripts/iwd/GUIOPT.py @@ -496,12 +496,12 @@ def OpenCharacterSoundsWindow (): OptCheckbox ('Subtitles', Window, 5, 20, 'Subtitles', 1) OptCheckbox ('AttackSounds', Window, 6, 18, 'Attack Sounds', 1) OptCheckbox ('Footsteps', Window, 7, 19, 'Footsteps', 1) - OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 1) - OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 2) - OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 3) - OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 1) - OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 2) - OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 3) + OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 2) + OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 1) + OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 0) + OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 2) + OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 1) + OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 0) Window.ShowModal (MODAL_SHADOW_GRAY) def DisplayHelpSubtitles (): diff --git a/gemrb/GUIScripts/iwd2/GUIOPT.py b/gemrb/GUIScripts/iwd2/GUIOPT.py index 45f8f9c..b400afe 100644 --- a/gemrb/GUIScripts/iwd2/GUIOPT.py +++ b/gemrb/GUIScripts/iwd2/GUIOPT.py @@ -494,12 +494,12 @@ def OpenCharacterSoundsWindow (): OptCheckbox ('Subtitles', Window, 5, 20, 'Subtitles', 1) OptCheckbox ('AttackSounds', Window, 6, 18, 'Attack Sounds', 1) OptCheckbox ('Footsteps', Window, 7, 19, 'Footsteps', 1) - OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 1) - OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 2) - OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 3) - OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 1) - OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 2) - OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 3) + OptRadio ('CommandSounds', Window, 8, 21, 'Command Sounds Frequency', 2) + OptRadio ('CommandSounds', Window, 9, 21, 'Command Sounds Frequency', 1) + OptRadio ('CommandSounds', Window, 10, 21, 'Command Sounds Frequency', 0) + OptRadio ('SelectionSounds', Window, 58, 57, 'Selection Sounds Frequency', 2) + OptRadio ('SelectionSounds', Window, 59, 57, 'Selection Sounds Frequency', 1) + OptRadio ('SelectionSounds', Window, 60, 57, 'Selection Sounds Frequency', 0) Window.ShowModal (MODAL_SHADOW_GRAY) diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index d5ee3df..23c4084 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -382,6 +382,8 @@ Actor::Actor() LongStrRef = (ieStrRef) -1; ShortStrRef = (ieStrRef) -1; + playedCommandSound = false; + PCStats = NULL; LastDamage = 0; LastDamageType = 0; @@ -3109,13 +3111,14 @@ bool Actor::GetPartyComment() } //call this only from gui selects -void Actor::SelectActor() const +void Actor::SelectActor() { + playedCommandSound = false; switch (sel_snd_freq) { case 0: return; case 1: - if (core->Roll(1,100,0) > 25) return; + if (core->Roll(1,100,0) > 20) return; default:; } @@ -3137,13 +3140,14 @@ void Actor::SelectActor() const #define SEL_ACTION_COUNT_ALL 7 //call this when a PC receives a command from GUI -void Actor::CommandActor() const +void Actor::CommandActor() { switch (cmd_snd_freq) { case 0: return; case 1: - if (core->Roll(1,100,0)>25) return; + if (playedCommandSound) return; + playedCommandSound = true; case 2: //PST has 4 states and rare sounds if (raresnd) { diff --git a/gemrb/core/Scriptable/Actor.h b/gemrb/core/Scriptable/Actor.h index a3014ce..648fcde 100644 --- a/gemrb/core/Scriptable/Actor.h +++ b/gemrb/core/Scriptable/Actor.h @@ -337,6 +337,8 @@ private: CharAnimations* anims; SpriteCover* extraCovers[EXTRA_ACTORCOVERS]; ieByte SavingThrow[5]; + // true when command has been played after select + bool playedCommandSound; //true every second round of attack bool secondround; int attacksperround; @@ -485,9 +487,9 @@ public: /* receives undead turning message */ void Turn(Scriptable *cleric, ieDword turnlevel); /* call this on gui selects */ - void SelectActor() const; + void SelectActor(); /* call this when adding actions via gui */ - void CommandActor() const; + void CommandActor(); /** handle panic and other involuntary actions that mess with scripting */ bool OverrideActions(); /** handle idle actions, that shouldn't mess with scripting */ ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-09 17:54:30
|
gemrb: Infinity Engine emulator The branch master has been updated via de556b6a2b698050370d2f34f95cd0349502fbf9 (commit) Summary of changes: gemrb/GUIScripts/iwd2/Movies.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) from 96979ddb640a7ccb8b8e19baaf177e261fd15ad8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=de556b6a2b698050370d2f34f95cd0349502fbf9 commit de556b6a2b698050370d2f34f95cd0349502fbf9 Author: Avenger <avenger_teambg@...> Date: Fri Mar 9 18:53:43 2012 +0100 movies as variables were broken, temporarily removed the check diff --git a/gemrb/GUIScripts/iwd2/Movies.py b/gemrb/GUIScripts/iwd2/Movies.py index 3fd337d..5c60d57 100644 --- a/gemrb/GUIScripts/iwd2/Movies.py +++ b/gemrb/GUIScripts/iwd2/Movies.py @@ -37,7 +37,9 @@ def OnLoad(): MoviesTable = GemRB.LoadTable("MOVIDESC") for i in range(0, MoviesTable.GetRowCount() ): t = MoviesTable.GetRowName(i) - if GemRB.GetVar(t)==1: + #temporarily out + #if GemRB.GetVar(t)==1: + if 1==1: s = MoviesTable.GetValue(i, 0) TextAreaControl.Append(s,-1) TextAreaControl.SetVarAssoc("MovieIndex",0) @@ -57,10 +59,12 @@ def PlayPress(): s = GemRB.GetVar("MovieIndex") for i in range(0, MoviesTable.GetRowCount() ): t = MoviesTable.GetRowName(i) - if GemRB.GetVar(t)==1: + #temporarily out too (change simultaneously with previous) + #if GemRB.GetVar(t)==1: + if 1==1: if s==0: s = MoviesTable.GetRowName(i) - GemRB.PlayMovie(s, 1) + GemRB.PlayMovie(s,0) MovieWindow.Invalidate() return s = s - 1 ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-08 20:37:40
|
gemrb: Infinity Engine emulator The branch master has been updated via 96979ddb640a7ccb8b8e19baaf177e261fd15ad8 (commit) Summary of changes: gemrb/core/ActorMgr.h | 2 +- gemrb/plugins/CREImporter/CREImporter.cpp | 6 +++--- gemrb/plugins/CREImporter/CREImporter.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) from 3320094de8f326a89bfd235d6606f76791fea81a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=96979ddb640a7ccb8b8e19baaf177e261fd15ad8 commit 96979ddb640a7ccb8b8e19baaf177e261fd15ad8 Author: Avenger <avenger_teambg@...> Date: Thu Mar 8 21:37:19 2012 +0100 hopefully better diff --git a/gemrb/core/ActorMgr.h b/gemrb/core/ActorMgr.h index f8e5225..dcd8384 100644 --- a/gemrb/core/ActorMgr.h +++ b/gemrb/core/ActorMgr.h @@ -34,7 +34,7 @@ public: virtual ~ActorMgr(void); virtual bool Open(DataStream* stream) = 0; virtual Actor* GetActor(unsigned char is_in_party) = 0; - virtual int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) = 0; + virtual int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) const = 0; //returns saved size, updates internal offsets before save virtual int GetStoredFileSize(Actor *ac) = 0; diff --git a/gemrb/plugins/CREImporter/CREImporter.cpp b/gemrb/plugins/CREImporter/CREImporter.cpp index 73e15db..5238a57 100644 --- a/gemrb/plugins/CREImporter/CREImporter.cpp +++ b/gemrb/plugins/CREImporter/CREImporter.cpp @@ -67,7 +67,7 @@ public: ~SpellEntry(); SpellEntry(); const ieResRef *FindSpell(unsigned int level, unsigned int kit) const; - const int FindSpell(unsigned int kit) const; + int FindSpell(unsigned int kit) const; bool Equals(const char *spl) const; void SetSpell(const char *spl); void AddLevel(unsigned int level, unsigned int kit); @@ -101,7 +101,7 @@ const ieResRef *SpellEntry::FindSpell(unsigned int level, unsigned int kit) cons return NULL; } -const int SpellEntry::FindSpell(unsigned int kit) const +int SpellEntry::FindSpell(unsigned int kit) const { int i = count; while(i--) { @@ -213,7 +213,7 @@ static int SpellType(ieResRef name, unsigned short &level, unsigned int clsmsk) return 0; } -int CREImporter::FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) +int CREImporter::FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) const { level = 0; if (IsSong(name)>=0) return IE_IWD2_SPELL_SONG; diff --git a/gemrb/plugins/CREImporter/CREImporter.h b/gemrb/plugins/CREImporter/CREImporter.h index 62c40f5..72bf1df 100644 --- a/gemrb/plugins/CREImporter/CREImporter.h +++ b/gemrb/plugins/CREImporter/CREImporter.h @@ -69,7 +69,7 @@ public: bool Open(DataStream* stream); Actor* GetActor(unsigned char is_in_party); - int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit); + int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) const; //returns saved size, updates internal offsets before save int GetStoredFileSize(Actor *ac); //saves file ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-08 20:29:54
|
gemrb: Infinity Engine emulator The branch master has been updated via 3320094de8f326a89bfd235d6606f76791fea81a (commit) Summary of changes: gemrb/plugins/CREImporter/CREImporter.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) from 80781efd401856ec10dbec6a109f0259ee6a4ffe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=3320094de8f326a89bfd235d6606f76791fea81a commit 3320094de8f326a89bfd235d6606f76791fea81a Author: Avenger <avenger_teambg@...> Date: Thu Mar 8 21:29:38 2012 +0100 missing file diff --git a/gemrb/plugins/CREImporter/CREImporter.h b/gemrb/plugins/CREImporter/CREImporter.h index 9b73cb0..62c40f5 100644 --- a/gemrb/plugins/CREImporter/CREImporter.h +++ b/gemrb/plugins/CREImporter/CREImporter.h @@ -69,6 +69,7 @@ public: bool Open(DataStream* stream); Actor* GetActor(unsigned char is_in_party); + int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit); //returns saved size, updates internal offsets before save int GetStoredFileSize(Actor *ac); //saves file ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-08 20:23:21
|
gemrb: Infinity Engine emulator The branch master has been updated via 80781efd401856ec10dbec6a109f0259ee6a4ffe (commit) Summary of changes: gemrb/core/Spellbook.cpp | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) from 8b297d80630574a6d93e4ff0a85066eea8015753 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=80781efd401856ec10dbec6a109f0259ee6a4ffe commit 80781efd401856ec10dbec6a109f0259ee6a4ffe Author: Avenger <avenger_teambg@...> Date: Thu Mar 8 21:22:52 2012 +0100 spaces!!! diff --git a/gemrb/core/Spellbook.cpp b/gemrb/core/Spellbook.cpp index 5e4dd56..7b9528e 100644 --- a/gemrb/core/Spellbook.cpp +++ b/gemrb/core/Spellbook.cpp @@ -448,25 +448,25 @@ int Spellbook::LearnSpell(Spell *spell, int memo, unsigned int clsmsk, unsigned { CREKnownSpell *spl = new CREKnownSpell(); strncpy(spl->SpellResRef, spell->Name, 8); - spl->Level = 0; - if (IWD2Style) { - PluginHolder<ActorMgr> gm(IE_CRE_CLASS_ID); - spl->Type = gm->FindSpellType(spell->Name, spl->Level, clsmsk, kit); - return spell->SpellLevel; - } - - //not IWD2 + spl->Level = 0; + if (IWD2Style) { + PluginHolder<ActorMgr> gm(IE_CRE_CLASS_ID); + spl->Type = gm->FindSpellType(spell->Name, spl->Level, clsmsk, kit); + return spell->SpellLevel; + } + + //not IWD2 if (spell->SpellType<6) { spl->Type = spelltypes[spell->SpellType]; - spl->Level = spell->SpellLevel-1; - } else { - spl->Type = IE_SPELL_TYPE_INNATE; - } + spl->Level = spell->SpellLevel-1; + } else { + spl->Type = IE_SPELL_TYPE_INNATE; + } bool ret=AddKnownSpell(spl, memo); if (!ret) { delete spl; - return 0; + return 0; } return spell->SpellLevel; // return only the spell level (xp is based on xpbonus) } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-08 20:20:03
|
gemrb: Infinity Engine emulator The branch master has been updated via 8b297d80630574a6d93e4ff0a85066eea8015753 (commit) Summary of changes: gemrb/core/ActorMgr.h | 1 + gemrb/core/Scriptable/Actor.cpp | 25 ++++++- gemrb/core/Scriptable/Actor.h | 2 + gemrb/core/Spellbook.cpp | 36 +++++----- gemrb/core/Spellbook.h | 18 ++--- gemrb/plugins/CREImporter/CREImporter.cpp | 107 ++++++++++++++++++++++++++--- 6 files changed, 150 insertions(+), 39 deletions(-) from 15f57f65b5b5f5cff8472641f7bcc2ee39fdf64a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=8b297d80630574a6d93e4ff0a85066eea8015753 commit 8b297d80630574a6d93e4ff0a85066eea8015753 Author: Avenger <avenger_teambg@...> Date: Thu Mar 8 21:18:38 2012 +0100 fixed learning of spells in iwd2 (always select the correct booktypes) diff --git a/gemrb/core/ActorMgr.h b/gemrb/core/ActorMgr.h index 5c46a68..f8e5225 100644 --- a/gemrb/core/ActorMgr.h +++ b/gemrb/core/ActorMgr.h @@ -34,6 +34,7 @@ public: virtual ~ActorMgr(void); virtual bool Open(DataStream* stream) = 0; virtual Actor* GetActor(unsigned char is_in_party) = 0; + virtual int FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) = 0; //returns saved size, updates internal offsets before save virtual int GetStoredFileSize(Actor *ac) = 0; diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 2d62659..d5ee3df 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -183,6 +183,10 @@ static const int levelslotsbg[BGCLASSCNT]={ISFIGHTER, ISMAGE, ISFIGHTER, ISCLERI ISCLASS12, ISCLASS13}; //this map could probably be auto-generated (isClass -> IWD2 class ID) static const unsigned int classesiwd2[ISCLASSES]={5, 11, 9, 1, 2, 3, 4, 6, 7, 8, 10, 12, 13}; +//this map could probably be auto-generated (isClass -> IWD2 book ID) +static const unsigned int booksiwd2[ISCLASSES]={0, 1<<IE_IWD2_SPELL_WIZARD, 0, 0, + 1<<IE_IWD2_SPELL_BARD, 1<<IE_IWD2_SPELL_CLERIC, 1<<IE_IWD2_SPELL_DRUID, 0, + 1<<IE_IWD2_SPELL_PALADIN, 1<<IE_IWD2_SPELL_RANGER, 1<<IE_IWD2_SPELL_SORCEROR, 0, 0}; //stat values are 0-255, so a byte is enough static ieByte featstats[MAX_FEATS]={0 @@ -4861,13 +4865,15 @@ int Actor::LearnSpell(const ieResRef spellname, ieDword flags) flags|=LS_MEMO; } + ieDword kit = GetStat(IE_KIT); + if (flags & LS_STATS) { // chance to learn roll int roll = LuckyRoll(1, 100, 0); // adjust the roll for specialist mages // doesn't work in bg1, since its spells don't have PrimaryType set (0 is NONE) - if (GetKitIndex(BaseStats[IE_KIT]) && spell->PrimaryType) { - if ((signed)BaseStats[IE_KIT] == 1<<(spell->PrimaryType+5)) { // +5 since the kit values start at 0x40 + if (GetKitIndex(kit) && spell->PrimaryType) { + if (kit == (unsigned) 1<<(spell->PrimaryType+5)) { // +5 since the kit values start at 0x40 roll += 15; } else { roll -= 15; @@ -4879,7 +4885,8 @@ int Actor::LearnSpell(const ieResRef spellname, ieDword flags) } } - int explev = spellbook.LearnSpell(spell, flags&LS_MEMO); + int clsmsk = GetBookMask(); + int explev = spellbook.LearnSpell(spell, flags&LS_MEMO, clsmsk, kit ); int tmp = spell->SpellName; if (flags&LS_LEARN) { core->GetTokenDictionary()->SetAt("SPECIALABILITYNAME", core->GetString(tmp)); @@ -8258,6 +8265,18 @@ int Actor::GetClassMask() const return classmask; } +int Actor::GetBookMask() const +{ + int classmask = 0; + for (int i=0; i < ISCLASSES; i++) { + if (Modified[levelslotsiwd2[i]] > 0) { + classmask |= 1<<(booksiwd2[i]-1); + } + } + + return classmask; +} + // returns the combined dexterity and racial bonus to specified thieving skill int Actor::GetSkillBonus(unsigned int col) const { diff --git a/gemrb/core/Scriptable/Actor.h b/gemrb/core/Scriptable/Actor.h index a58d2c5..a3014ce 100644 --- a/gemrb/core/Scriptable/Actor.h +++ b/gemrb/core/Scriptable/Actor.h @@ -794,6 +794,8 @@ public: ieDword GetLevelInClass (const ieDword classid) const; /* computes the actor's classmask (iwd2) */ int GetClassMask() const; + /* computes the actor's usable books (iwd2) */ + int GetBookMask() const; /* computes the thieving skill bonus from race and dexterity */ int GetSkillBonus(unsigned int col) const; /* returns true for party members (and familiars) */ diff --git a/gemrb/core/Spellbook.cpp b/gemrb/core/Spellbook.cpp index d6e96c5..5e4dd56 100644 --- a/gemrb/core/Spellbook.cpp +++ b/gemrb/core/Spellbook.cpp @@ -20,8 +20,10 @@ #include "Spellbook.h" +#include "ActorMgr.h" #include "GameData.h" #include "Interface.h" +#include "PluginMgr.h" #include "Projectile.h" #include "Spell.h" #include "TableMgr.h" @@ -441,30 +443,30 @@ void Spellbook::SetBookType(int bt) //wildshapes are marked as innate, they need some hack to get stored //in the right group //the rest are stored as innate -int Spellbook::GetSpellType(int spelltype) -{ - if (IWD2Style) return spelltype; - - if (spelltype<6) { - return spelltypes[spelltype]; - } - return IE_SPELL_TYPE_INNATE; -} -int Spellbook::LearnSpell(Spell *spell, int memo) +int Spellbook::LearnSpell(Spell *spell, int memo, unsigned int clsmsk, unsigned int kit) { CREKnownSpell *spl = new CREKnownSpell(); strncpy(spl->SpellResRef, spell->Name, 8); - spl->Type = (ieWord) GetSpellType(spell->SpellType); - if ( spl->Type == IE_SPELL_TYPE_INNATE) { - spl->Level = 0; - } - else { - spl->Level = (ieWord) (spell->SpellLevel-1); - } + spl->Level = 0; + if (IWD2Style) { + PluginHolder<ActorMgr> gm(IE_CRE_CLASS_ID); + spl->Type = gm->FindSpellType(spell->Name, spl->Level, clsmsk, kit); + return spell->SpellLevel; + } + + //not IWD2 + if (spell->SpellType<6) { + spl->Type = spelltypes[spell->SpellType]; + spl->Level = spell->SpellLevel-1; + } else { + spl->Type = IE_SPELL_TYPE_INNATE; + } + bool ret=AddKnownSpell(spl, memo); if (!ret) { delete spl; + return 0; } return spell->SpellLevel; // return only the spell level (xp is based on xpbonus) } diff --git a/gemrb/core/Spellbook.h b/gemrb/core/Spellbook.h index 9411eb3..4426f94 100644 --- a/gemrb/core/Spellbook.h +++ b/gemrb/core/Spellbook.h @@ -8,7 +8,7 @@ * 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 + * 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 @@ -99,10 +99,10 @@ struct CREMemorizedSpell { }; struct CRESpellMemorization { - ieWord Level; - ieWord Number; - ieWord Number2; - ieWord Type; + ieWord Level; + ieWord Number; + ieWord Number2; + ieWord Type; std::vector<CREKnownSpell*> known_spells; std::vector<CREMemorizedSpell*> memorized_spells; @@ -111,7 +111,7 @@ struct CRESpellMemorization { struct SpellExtHeader { ieDword level; ieDword count; - ieDword type; //spelltype + ieDword type; //spelltype ieDword headerindex; ieDword slot; //these come from the header @@ -124,7 +124,7 @@ struct SpellExtHeader { ieWord CastingTime; //other data ieResRef spellname; - ieDword strref; //the spell's name + ieDword strref; //the spell's name }; /** @@ -195,10 +195,8 @@ public: /** sets the book type */ void SetBookType(int clss); - /** returns the page number for the spelltype */ - static int GetSpellType(int spelltype); /** adds a spell to the book, returns experience if learned */ - int LearnSpell(Spell *spell, int memo); + int LearnSpell(Spell *spell, int memo, unsigned int clsmsk, unsigned int kit); CREKnownSpell* GetKnownSpell(int type, unsigned int level, unsigned int index) const; unsigned int GetMemorizedSpellsCount(int type, bool real) const; unsigned int GetMemorizedSpellsCount(int type, unsigned int level, bool real) const; diff --git a/gemrb/plugins/CREImporter/CREImporter.cpp b/gemrb/plugins/CREImporter/CREImporter.cpp index 80a0b3e..73e15db 100644 --- a/gemrb/plugins/CREImporter/CREImporter.cpp +++ b/gemrb/plugins/CREImporter/CREImporter.cpp @@ -57,8 +57,8 @@ static int shpcount=-1; struct LevelAndKit { - int level; - int kit; + unsigned int level; + unsigned int kit; }; class SpellEntry @@ -66,10 +66,11 @@ class SpellEntry public: ~SpellEntry(); SpellEntry(); - const ieResRef *FindSpell(int level, int kit) const; + const ieResRef *FindSpell(unsigned int level, unsigned int kit) const; + const int FindSpell(unsigned int kit) const; bool Equals(const char *spl) const; void SetSpell(const char *spl); - void AddLevel(int level, int kit); + void AddLevel(unsigned int level, unsigned int kit); private: ieResRef spell; LevelAndKit *levels; @@ -89,7 +90,7 @@ SpellEntry::~SpellEntry() levels = NULL; } -const ieResRef *SpellEntry::FindSpell(int level, int kit) const +const ieResRef *SpellEntry::FindSpell(unsigned int level, unsigned int kit) const { int i = count; while(i--) { @@ -100,6 +101,17 @@ const ieResRef *SpellEntry::FindSpell(int level, int kit) const return NULL; } +const int SpellEntry::FindSpell(unsigned int kit) const +{ + int i = count; + while(i--) { + if (levels[i].kit==kit) { + return levels[i].level; + } + } + return 0; +} + bool SpellEntry::Equals(const char *spl) const { return !strnicmp(spell, spl, sizeof(ieResRef)); @@ -110,7 +122,7 @@ void SpellEntry::SetSpell(const char *spl) strnlwrcpy(spell, spl, 8); } -void SpellEntry::AddLevel(int level, int kit) +void SpellEntry::AddLevel(unsigned int level,unsigned int kit) { if(!level) { return; @@ -128,6 +140,36 @@ void SpellEntry::AddLevel(int level, int kit) count++; } +static int IsInnate(ieResRef name) +{ + for(int i=0;i<inncount;i++) { + if(!strnicmp(name, innlist[i], 8) ) { + return i; + } + } + return -1; +} + +static int IsSong(ieResRef name) +{ + for(int i=0;i<sngcount;i++) { + if(!strnicmp(name, snglist[i], 8) ) { + return i; + } + } + return -1; +} + +static int IsShape(ieResRef name) +{ + for(int i=0;i<shpcount;i++) { + if(!strnicmp(name, shplist[i], 8) ) { + return i; + } + } + return -1; +} + static SpellEntry* spllist=NULL; static int splcount=-1; static SpellEntry* domlist=NULL; @@ -135,6 +177,53 @@ static int domcount=-1; static SpellEntry* maglist=NULL; static int magcount=-1; +static int IsDomain(ieResRef name, unsigned short &level, unsigned int kit) +{ + for(int i=0;i<domcount;i++) { + if (domlist[i].Equals(name) ) { + level = domlist[i].FindSpell(kit); + return i; + } + } + return -1; +} + +static int IsSpecial(ieResRef name, unsigned short &level, unsigned int kit) +{ + for(int i=0;i<magcount;i++) { + if (maglist[i].Equals(name) ) { + level = maglist[i].FindSpell(kit); + return i; + } + } + return -1; +} + +static int SpellType(ieResRef name, unsigned short &level, unsigned int clsmsk) +{ + for (int i = 0;i<splcount;i++) { + if (spllist[i].Equals(name) ) { + for(int type=0;type<7;type++) { + if (clsmsk & i) { + level = spllist[i].FindSpell(type); + } + } + } + } + return 0; +} + +int CREImporter::FindSpellType(char *name, unsigned short &level, unsigned int clsmsk, unsigned int kit) +{ + level = 0; + if (IsSong(name)>=0) return IE_IWD2_SPELL_SONG; + if (IsShape(name)>=0) return IE_IWD2_SPELL_SHAPE; + if (IsInnate(name)>=0) return IE_IWD2_SPELL_INNATE; + if (IsDomain(name, level, kit)>=0) return IE_IWD2_SPELL_DOMAIN; + if (IsSpecial(name, level, kit)>=0) return IE_IWD2_SPELL_WIZARD; + return SpellType(name, level, clsmsk); +} + /* this is not used, but may be useful later int ResolveSpellName(ieResRef name, int level, ieIWD2SpellType type) { @@ -1089,7 +1178,7 @@ void CREImporter::ReadInventory(Actor *act, unsigned int Inventory_Size) str->ReadWordSigned( &act->Equipped ); //the equipped slot's selected ability is stored here str->ReadWord( &act->EquippedHeader ); - + //read the item entries based on the previously read indices //an item entry may be read multiple times if the indices are repeating for (i = 0;i<Inventory_Size;) { @@ -1498,7 +1587,7 @@ void CREImporter::GetIWD2Spellpage(Actor *act, ieIWD2SpellType type, int level, strnlwrcpy(memory->SpellResRef,*tmp,8); sm->memorized_spells.push_back(memory); } - + while(totalcount--) { CREMemorizedSpell *memory = new CREMemorizedSpell; memory->Flags=0; @@ -2650,7 +2739,7 @@ int CREImporter::PutActorIWD2(DataStream *stream, Actor *actor) tmpByte=(ieByte) actor->BaseStats[IE_AVATARREMOVAL]; stream->Write( &tmpByte, 1); stream->Write( &actor->SetDeathVar, 1); - stream->Write( &actor->IncKillCount, 1); + stream->Write( &actor->IncKillCount, 1); stream->Write( &actor->UnknownField, 1); //unknown for (i=0;i<5;i++) { tmpWord = actor->BaseStats[IE_INTERNAL_0+i]; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Jaka Kranjc <lynxlupodian@us...> - 2012-03-08 18:55:14
|
gemrb: Infinity Engine emulator The branch master has been updated via 15f57f65b5b5f5cff8472641f7bcc2ee39fdf64a (commit) Summary of changes: gemrb/plugins/GUIScript/GUIScript.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) from 1332d404dac53032c342a96f8d19f9bf1bfd85a0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=15f57f65b5b5f5cff8472641f7bcc2ee39fdf64a commit 15f57f65b5b5f5cff8472641f7bcc2ee39fdf64a Author: Jaka Kranjc <lynxlupodian@...> Date: Thu Mar 8 19:52:36 2012 +0100 some more regression fixes diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index e94f9ae..845eace 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -8682,9 +8682,9 @@ static PyObject* GemRB_Window_SetupControls(PyObject * /*self*/, PyObject* args) switch (action) { case ACT_INNATE: if (actor->spellbook.IsIWDSpellBook()) { - type = type = (1<<IE_IWD2_SPELL_INNATE) | (1<<IE_IWD2_SPELL_SHAPE); + type = (1<<IE_IWD2_SPELL_INNATE) | (1<<IE_IWD2_SPELL_SHAPE); } else { - type = type = 1<<IE_SPELL_TYPE_INNATE; + type = 1<<IE_SPELL_TYPE_INNATE; } if (!actor->spellbook.GetSpellInfoSize(type)) { state = IE_GUI_BUTTON_DISABLED; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-08 17:48:25
|
gemrb: Infinity Engine emulator The branch master has been updated via 1332d404dac53032c342a96f8d19f9bf1bfd85a0 (commit) via f7990c751b2aa8dd2f2fc1269dab73db9d1cfcc5 (commit) Summary of changes: gemrb/plugins/GUIScript/GUIScript.cpp | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) from 65cb2ee32b410c97b9b7fe21766e64109e977ce1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=1332d404dac53032c342a96f8d19f9bf1bfd85a0 commit 1332d404dac53032c342a96f8d19f9bf1bfd85a0 Merge: f7990c7 65cb2ee Author: Avenger <avenger_teambg@...> Date: Thu Mar 8 18:48:03 2012 +0100 Merge branch 'master' of ssh://gemrb.git.sourceforge.net/gitroot/gemrb/gemrb http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=f7990c751b2aa8dd2f2fc1269dab73db9d1cfcc5 commit f7990c751b2aa8dd2f2fc1269dab73db9d1cfcc5 Author: Avenger <avenger_teambg@...> Date: Thu Mar 8 18:47:27 2012 +0100 fixed another regression diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index 275534f..e94f9ae 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -8682,11 +8682,11 @@ static PyObject* GemRB_Window_SetupControls(PyObject * /*self*/, PyObject* args) switch (action) { case ACT_INNATE: if (actor->spellbook.IsIWDSpellBook()) { - type = IE_IWD2_SPELL_INNATE; + type = type = (1<<IE_IWD2_SPELL_INNATE) | (1<<IE_IWD2_SPELL_SHAPE); } else { - type = IE_SPELL_TYPE_INNATE; + type = type = 1<<IE_SPELL_TYPE_INNATE; } - if (!actor->spellbook.GetMemorizedSpellsCount(type, true)) { + if (!actor->spellbook.GetSpellInfoSize(type)) { state = IE_GUI_BUTTON_DISABLED; } break; @@ -8742,7 +8742,7 @@ static PyObject* GemRB_Window_SetupControls(PyObject * /*self*/, PyObject* args) break; case ACT_STEALTH: //don't use level control for this, iwd2 allows everyone to sneak - if (!(actor->GetStat(IE_STEALTH)+actor->GetStat(IE_HIDEINSHADOWS) ) ) { + if ((actor->GetStat(IE_STEALTH)+actor->GetStat(IE_HIDEINSHADOWS) )<=0 ) { state = IE_GUI_BUTTON_DISABLED; } else { if (modalstate==MS_STEALTH) { @@ -8759,8 +8759,12 @@ static PyObject* GemRB_Window_SetupControls(PyObject * /*self*/, PyObject* args) } break; case ACT_THIEVING: - //don't use level control for this, iwd2 allows everyone to steal - if (!(actor->GetStat(IE_LOCKPICKING)+actor->GetStat(IE_PICKPOCKET) ) ) { + if ((actor->GetStat(IE_LOCKPICKING)+actor->GetStat(IE_PICKPOCKET) )<=0 ) { + state = IE_GUI_BUTTON_DISABLED; + } + break; + case ACT_TAMING: + if (actor->GetStat(IE_ANIMALS)<=0 ) { state = IE_GUI_BUTTON_DISABLED; } break; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-07 20:19:26
|
gemrb: Infinity Engine emulator The branch master has been updated via 65cb2ee32b410c97b9b7fe21766e64109e977ce1 (commit) Summary of changes: gemrb/core/Interface.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) from f1d185bc807c75b7ff7b2e964315c6d847433e0a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=65cb2ee32b410c97b9b7fe21766e64109e977ce1 commit 65cb2ee32b410c97b9b7fe21766e64109e977ce1 Author: Avenger <avenger_teambg@...> Date: Wed Mar 7 21:19:10 2012 +0100 fixed a typo diff --git a/gemrb/core/Interface.cpp b/gemrb/core/Interface.cpp index 302d72f..e75673b 100644 --- a/gemrb/core/Interface.cpp +++ b/gemrb/core/Interface.cpp @@ -1573,7 +1573,7 @@ int Interface::Init() char ChitinPath[_MAX_PATH]; PathJoin( ChitinPath, GamePath, "chitin.key", NULL ); if (!gamedata->AddSource(ChitinPath, "chitin.key", PLUGIN_RESOURCE_KEY)) { - Log(FATAL, "Core", "Failured to load \"chitin.key\""); + Log(FATAL, "Core", "Failed to load \"chitin.key\""); return GEM_ERROR; } } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |
From: Laszlo Toth <avenger_teambg@us...> - 2012-03-07 20:17:42
|
gemrb: Infinity Engine emulator The branch master has been updated via f1d185bc807c75b7ff7b2e964315c6d847433e0a (commit) Summary of changes: gemrb/GUIScripts/GUICommonWindows.py | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) from 82b2ff1afc4d408e26cc51857cd92574b0a88d56 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=f1d185bc807c75b7ff7b2e964315c6d847433e0a commit f1d185bc807c75b7ff7b2e964315c6d847433e0a Author: Avenger <avenger_teambg@...> Date: Wed Mar 7 21:17:01 2012 +0100 reverted a regression commit diff --git a/gemrb/GUIScripts/GUICommonWindows.py b/gemrb/GUIScripts/GUICommonWindows.py index 36b4e35..805ff32 100644 --- a/gemrb/GUIScripts/GUICommonWindows.py +++ b/gemrb/GUIScripts/GUICommonWindows.py @@ -423,10 +423,10 @@ def SetupBookSelection (): Button.SetActionIcon (globals(), 50+i) return -skillbar=(ACT_SEARCH, ACT_STEALTH, ACT_THIEVING, ACT_BARDSONG, ACT_TAMING, ACT_WILDERNESS, ACT_TURN, 100, 100, 100, 100, 100) - +#you can change this for custom skills, this is the original engine +skillbar=(ACT_STEALTH, ACT_SEARCH, ACT_THIEVING, ACT_WILDERNESS, ACT_TAMING, 100, 100, 100, 100, 100, 100, 100) def SetupSkillSelection (): - pc = GemRB.GameGetSelectedPCSingle () + pc = GemRB.GameGetFirstSelectedActor () CurrentWindow.SetupControls( globals(), pc, ActionBarControlOffset, skillbar) return @@ -498,10 +498,18 @@ def UpdateActionsWindow (): CurrentWindow.SetupEquipmentIcons(globals(), pc, TopIndex, ActionBarControlOffset) elif level == 2: #spells GemRB.SetVar ("Type", 3) - Spellbook.SetupSpellIcons(CurrentWindow, 3, TopIndex, ActionBarControlOffset) + if GUICommon.GameIsIWD2(): + type = 255 + else: + type = 3 + Spellbook.SetupSpellIcons(CurrentWindow, type, TopIndex, ActionBarControlOffset) elif level == 3: #innates GemRB.SetVar ("Type", 4) - Spellbook.SetupSpellIcons(CurrentWindow, 4, TopIndex, ActionBarControlOffset) + if GUICommon.GameIsIWD2(): + type = 256 + 1024 + else: + type = 4 + Spellbook.SetupSpellIcons(CurrentWindow, type, TopIndex, ActionBarControlOffset) elif level == 4: #quick weapon/item ability selection SetupItemAbilities(pc, GemRB.GetVar("Slot") ) elif level == 5: #all known mage spells @@ -510,10 +518,10 @@ def UpdateActionsWindow (): elif level == 6: # iwd2 skills SetupSkillSelection() elif level == 7: # quickspells, but with innates too - GemRB.SetVar ("Type", 511) + GemRB.SetVar ("Type", 3) Spellbook.SetupSpellIcons(CurrentWindow, 511, TopIndex, ActionBarControlOffset) elif level == 8: # shapes selection - GemRB.SetVar ("Type", 1024) + GemRB.SetVar ("Type", 4) Spellbook.SetupSpellIcons(CurrentWindow, 1024, TopIndex, ActionBarControlOffset) elif level == 9: # songs selection GemRB.SetVar ("Type", 5) ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |