From: Jens G. <fi...@us...> - 2013-03-23 17:55:38
|
gemrb: Infinity Engine emulator The branch master has been updated via b844393a280b739aa3f08d68b60a063d7b92d038 (commit) via 21e83e4aa2139f209dfa67a3e7dd567fba6158c1 (commit) via 31e7af1edb94121153a2d48f3d98c29b3d2a3525 (commit) via 830a0459bbcaac9cea5618a7e93509ee71d89716 (commit) via 48035e92fe67d4feae7f6278e1814bd3cde4184c (commit) via a5b759a7d7beac83d8a9dfbb2df931a2b4f1969f (commit) via 5a165f342962de6093f4a886517f28d9d14c903b (commit) Summary of changes: gemrb/GUIScripts/GUIClasses.py | 1 + gemrb/GUIScripts/GUICommonWindows.py | 4 ++-- gemrb/GUIScripts/GUISTORE.py | 1 + gemrb/core/Animation.cpp | 8 ++++---- gemrb/core/CharAnimations.cpp | 5 ----- gemrb/core/Map.h | 3 +-- gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 6 +++++- gemrb/plugins/GUIScript/GUIScript.cpp | 23 +++++++++++++++++++++++ gemrb/unhardcoded/{bg2 => bg1}/hlymite.pro | Bin 512 -> 512 bytes 9 files changed, 37 insertions(+), 14 deletions(-) copy gemrb/unhardcoded/{bg2 => bg1}/hlymite.pro (100%) from f10ef9af635808dd72a02ac3c902be74a0d9f572 (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=b844393a280b739aa3f08d68b60a063d7b92d038 commit b844393a280b739aa3f08d68b60a063d7b92d038 Author: Jens Granseuer <je...@gm...> Date: Sat Mar 23 16:27:09 2013 +0100 also unselect selected items when changing characters Otherwise it's possible through a series of clicks like Identify -> Select item -> Switch Char -> Sell -> Switch Char to end up with the items previously selected for identification preselected for sale. I've sold more than one item by accident that way. diff --git a/gemrb/GUIScripts/GUISTORE.py b/gemrb/GUIScripts/GUISTORE.py index dc02afb..f6db762 100644 --- a/gemrb/GUIScripts/GUISTORE.py +++ b/gemrb/GUIScripts/GUISTORE.py @@ -654,6 +654,7 @@ def GetPC(): GemRB.SetVar ("RightTopIndex", 0) GemRB.SetVar ("Index", 0) GemRB.SetVar ("TopIndex", 0) + UnselectNoRedraw () else: PreviousPC = GemRB.GameGetSelectedPCSingle () pc = PreviousPC http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=21e83e4aa2139f209dfa67a3e7dd567fba6158c1 commit 21e83e4aa2139f209dfa67a3e7dd567fba6158c1 Author: Jens Granseuer <je...@gm...> Date: Fri Mar 22 18:51:33 2013 +0100 fix copy/paste error in fx_set_deaf_state_iwd2 diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index c7f6587..cb55e94 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -2891,7 +2891,7 @@ int fx_set_deaf_state_iwd2 (Scriptable* /*Owner*/, Actor* target, Effect* fx) } STAT_ADD(IE_SPELLFAILUREMAGE, fx->Parameter1); if (!fx->Parameter2) { - fx->Parameter1 = 20; + fx->Parameter2 = 20; } STAT_ADD(IE_SPELLFAILUREPRIEST, fx->Parameter2); EXTSTATE_SET(EXTSTATE_DEAF); //iwd1/how needs this http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=31e7af1edb94121153a2d48f3d98c29b3d2a3525 commit 31e7af1edb94121153a2d48f3d98c29b3d2a3525 Author: Jens Granseuer <je...@gm...> Date: Fri Mar 22 15:28:42 2013 +0100 bg1: add hlymite projectile diff --git a/gemrb/unhardcoded/bg1/hlymite.pro b/gemrb/unhardcoded/bg1/hlymite.pro new file mode 100644 index 0000000..c67eabc Binary files /dev/null and b/gemrb/unhardcoded/bg1/hlymite.pro differ http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=830a0459bbcaac9cea5618a7e93509ee71d89716 commit 830a0459bbcaac9cea5618a7e93509ee71d89716 Author: Jens Granseuer <je...@gm...> Date: Fri Mar 22 12:31:03 2013 +0100 rename A_ANI_32 to A_ANI_RANDOM_START diff --git a/gemrb/core/Map.h b/gemrb/core/Map.h index 6648f26..b376e48 100644 --- a/gemrb/core/Map.h +++ b/gemrb/core/Map.h @@ -78,7 +78,7 @@ class Wall_Polygon; #define A_ANI_NO_SHADOW 4 //lightmap doesn't affect it #define A_ANI_PLAYONCE 8 //stop after endframe #define A_ANI_SYNC 16 //synchronised draw (skip frames if needed) -#define A_ANI_32 32 +#define A_ANI_RANDOM_START 32 //starts with a random frame in the start range #define A_ANI_NO_WALL 64 //draw after walls (walls don't cover it) #define A_ANI_NOT_IN_FOG 0x80 //not visible in fog of war #define A_ANI_BACKGROUND 0x100 //draw before actors (actors cover it) http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=48035e92fe67d4feae7f6278e1814bd3cde4184c commit 48035e92fe67d4feae7f6278e1814bd3cde4184c Author: Jens Granseuer <je...@gm...> Date: Fri Mar 22 11:47:44 2013 +0100 get rid of A_ANI_FROZEN I introduced it for Ankheg animations but the same effect can be achieved more simply without using a new animation flag. diff --git a/gemrb/core/Animation.cpp b/gemrb/core/Animation.cpp index 25ba4f9..5732733 100644 --- a/gemrb/core/Animation.cpp +++ b/gemrb/core/Animation.cpp @@ -144,7 +144,7 @@ Sprite2D* Animation::NextFrame(void) else ret = frames[pos]; - if ((endReached && (Flags&A_ANI_PLAYONCE)) || (Flags&A_ANI_FROZEN)) + if (endReached && (Flags&A_ANI_PLAYONCE)) return ret; unsigned long time; @@ -182,7 +182,7 @@ Sprite2D* Animation::NextFrame(void) Sprite2D* Animation::GetSyncedNextFrame(Animation* master) { if (!(Flags&A_ANI_ACTIVE)) { - Log(MESSAGE, "Sprite2D", "Frame fetched while animation is inactive3!"); + Log(MESSAGE, "Sprite2D", "Frame fetched while animation is inactive!"); return NULL; } Sprite2D* ret; @@ -194,8 +194,8 @@ Sprite2D* Animation::GetSyncedNextFrame(Animation* master) starttime = master->starttime; endReached = master->endReached; - if (!(Flags&A_ANI_FROZEN)) - pos = master->pos; + //return a valid frame even if the master is longer (e.g. ankhegs) + pos = master->pos % indicesCount; return ret; } diff --git a/gemrb/core/CharAnimations.cpp b/gemrb/core/CharAnimations.cpp index 0c43a27..5737147 100644 --- a/gemrb/core/CharAnimations.cpp +++ b/gemrb/core/CharAnimations.cpp @@ -1106,11 +1106,6 @@ Animation** CharAnimations::GetAnimation(unsigned char Stance, unsigned char Ori a->MirrorAnimation( ); } break; - case IE_ANI_TWO_PIECE: - if (part == 1) { - a->Flags |= A_ANI_FROZEN; - } - break; default: break; } diff --git a/gemrb/core/Map.h b/gemrb/core/Map.h index a29c5dd..6648f26 100644 --- a/gemrb/core/Map.h +++ b/gemrb/core/Map.h @@ -86,7 +86,6 @@ class Wall_Polygon; #define A_ANI_PALETTE 0x400 //has own palette set #define A_ANI_MIRROR 0x800 //mirrored #define A_ANI_COMBAT 0x1000 //draw in combat too -#define A_ANI_FROZEN 0x2000 //still frame, does not change //creature area flags #define AF_CRE_NOT_LOADED 1 http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=a5b759a7d7beac83d8a9dfbb2df931a2b4f1969f commit a5b759a7d7beac83d8a9dfbb2df931a2b4f1969f Author: Jens Granseuer <je...@gm...> Date: Thu Mar 21 13:47:07 2013 +0100 make globe of invulnerability vanish on death diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 3fa595e..c7f6587 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -4506,6 +4506,10 @@ int fx_set_entangle_state (Scriptable* /*Owner*/, Actor* target, Effect* fx) int fx_set_minorglobe_state (Scriptable* /*Owner*/, Actor* target, Effect* fx) { if(0) print("fx_set_minorglobe_state(%2d): Mod: %d, Type: %d", fx->Opcode, fx->Parameter1, fx->Parameter2); + //the globe vanishes on death + if (STATE_GET(STATE_DEAD) ) { + return FX_NOT_APPLIED; + } //the resisted levels are stored in minor globe (bit 2-) //the globe effect is stored in the first bit STAT_BIT_OR_PCF( IE_MINORGLOBE, 1); http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=5a165f342962de6093f4a886517f28d9d14c903b commit 5a165f342962de6093f4a886517f28d9d14c903b Author: Jens Granseuer <je...@gm...> Date: Wed Mar 20 18:20:24 2013 +0100 take a little more care to identify the clock button diff --git a/gemrb/GUIScripts/GUIClasses.py b/gemrb/GUIScripts/GUIClasses.py index 216f64e..4ee1303 100644 --- a/gemrb/GUIScripts/GUIClasses.py +++ b/gemrb/GUIScripts/GUIClasses.py @@ -95,6 +95,7 @@ class GControl: __metaclass__ = metaControl methods = { 'GetRect': _GemRB.Control_GetRect, + 'HasAnimation': _GemRB.Control_HasAnimation, 'SetVarAssoc': _GemRB.Control_SetVarAssoc, 'SetPos': _GemRB.Control_SetPos, 'SetSize': _GemRB.Control_SetSize, diff --git a/gemrb/GUIScripts/GUICommonWindows.py b/gemrb/GUIScripts/GUICommonWindows.py index 9a81ce9..040db61 100644 --- a/gemrb/GUIScripts/GUICommonWindows.py +++ b/gemrb/GUIScripts/GUICommonWindows.py @@ -232,7 +232,7 @@ def SetupMenuWindowControls (Window, Gears=None, CloseWindowCallback=None): # FIXME: display all animations: CPEN, CGEAR, CDIAL if how: # how doesn't have this in the right place pos = GemRB.GetSystemVariable (SV_HEIGHT)-71 - Window.CreateButton (9, 6, pos, 64, 71) + Window.CreateButton (OptionControl['Time'], 6, pos, 64, 71) Button = Window.GetControl (OptionControl['Time']) if bg2: Label = Button.CreateLabelOnButton (0x10000009, "NORMAL", 0) @@ -1797,7 +1797,7 @@ def UpdateClock (): elif ActionsWindow and ActionsWindow.HasControl (62): Clock = ActionsWindow.GetControl (62) - if Clock: + if Clock and Clock.HasAnimation("CGEAR"): Hours = (GemRB.GetGameTime () % 7200) / 300 GUICommon.SetGamedaysAndHourToken () Clock.SetBAM ("CDIAL", 0, (Hours + 12) % 24) diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index 4da901d..ac95b48 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -3816,6 +3816,28 @@ static PyObject* GemRB_Control_SetAnimationPalette(PyObject * /*self*/, PyObject return Py_None; } +PyDoc_STRVAR( GemRB_Control_HasAnimation__doc, +"HasAnimation(WindowIndex, ControlIndex, BAMResRef[, Cycle])\n\n" +"Checks whether a Control (usually a Button) has a given animation set."); + +static PyObject* GemRB_Control_HasAnimation(PyObject * /*self*/, PyObject* args) +{ + int wi, ci; + char *ResRef; + int Cycle = 0; + + if (!PyArg_ParseTuple( args, "iis|i", &wi, &ci, &ResRef, &Cycle )) { + return AttributeError( GemRB_Control_HasAnimation__doc ); + } + + Control* ctl = GetControl(wi, ci, -1); + if (ctl && ctl->animation) { + return PyBool_FromLong(ctl->animation->SameResource(ResRef, Cycle)); + } + + return PyBool_FromLong(0); +} + PyDoc_STRVAR( GemRB_Control_SetAnimation__doc, "SetAnimation(WindowIndex, ControlIndex, BAMResRef[, Cycle, Blend])\n\n" "Sets the animation of a Control (usually a Button) from a BAM file. Optionally an animation cycle could be set too."); @@ -10802,6 +10824,7 @@ static PyMethodDef GemRBInternalMethods[] = { METHOD(Button_SetTextColor, METH_VARARGS), METHOD(Control_AttachScrollBar, METH_VARARGS), METHOD(Control_GetRect, METH_VARARGS), + METHOD(Control_HasAnimation, METH_VARARGS), METHOD(Control_QueryText, METH_VARARGS), METHOD(Control_SetAnimation, METH_VARARGS), METHOD(Control_SetAnimationPalette, METH_VARARGS), ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |