From: Jaka K. <lyn...@us...> - 2012-04-07 12:22:22
|
gemrb: Infinity Engine emulator The branch master has been updated via 112ac22bf88019e515b133bebfeb2fce434cb643 (commit) via 8a86df76725208475103a9aa84d62948ce6bc334 (commit) via 34bc7926733ac660f9dda6aca214da3c76606971 (commit) Summary of changes: gemrb/GUIScripts/iwd2/CharGen9.py | 18 +++++++++++++++--- gemrb/core/GameScript/Actions.cpp | 1 - gemrb/core/Map.cpp | 5 +++-- gemrb/core/Scriptable/Actor.cpp | 2 +- gemrb/core/Scriptable/Scriptable.cpp | 3 ++- gemrb/plugins/GUIScript/GUIScript.cpp | 18 +++++++++++------- gemrb/plugins/TLKImporter/TlkOverride.cpp | 5 ----- 7 files changed, 32 insertions(+), 20 deletions(-) from 77b06e286a6f6ec4075313dfcf9dbc8cbc88a9b7 (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=112ac22bf88019e515b133bebfeb2fce434cb643 commit 112ac22bf88019e515b133bebfeb2fce434cb643 Author: Jaka Kranjc <lyn...@us...> Date: Sat Apr 7 14:19:05 2012 +0200 fixed compilation with gcc 4.7 diff --git a/gemrb/core/GameScript/Actions.cpp b/gemrb/core/GameScript/Actions.cpp index 231cc64..e4c2f91 100644 --- a/gemrb/core/GameScript/Actions.cpp +++ b/gemrb/core/GameScript/Actions.cpp @@ -6022,7 +6022,6 @@ void GameScript::BashDoor(Scriptable* Sender, Action* parameters) } Scriptable *target = GetActorFromObject(Sender, parameters->objects[1]); - TileMap *tmap = Sender->GetCurrentArea()->TMap; Door *door = NULL; Container *container = NULL; Point *pos; diff --git a/gemrb/core/Map.cpp b/gemrb/core/Map.cpp index fc71bf3..2d4482d 100644 --- a/gemrb/core/Map.cpp +++ b/gemrb/core/Map.cpp @@ -3669,10 +3669,11 @@ void AreaAnimation::Draw(const Region &screen, Map *area) //always draw the animation tinted because tint is also used for //transparency - Color tint = {255,255,255,255-(ieByte) transparency}; + ieByte inverseTransparency = 255-transparency; + Color tint = {255,255,255,inverseTransparency}; if ((Flags&A_ANI_NO_SHADOW)) { tint = area->LightMap->GetPixel( Pos.x / 16, Pos.y / 12); - tint.a = 255-(ieByte) transparency; + tint.a = inverseTransparency; } if (!(Flags&A_ANI_NO_WALL)) { if (!covers) { diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 1bbc2a5..0a530df 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -3849,7 +3849,7 @@ ieDword Actor::GetXPLevel(int modified) const } average = stats[IE_CLASSLEVELSUM] / (float) clscount + 0.5; } else { - int levels[3]={stats[IE_LEVEL], stats[IE_LEVEL2], stats[IE_LEVEL3]}; + unsigned int levels[3]={stats[IE_LEVEL], stats[IE_LEVEL2], stats[IE_LEVEL3]}; average = levels[0]; clscount = 1; if (IsDualClassed()) { diff --git a/gemrb/core/Scriptable/Scriptable.cpp b/gemrb/core/Scriptable/Scriptable.cpp index 42d52b0..968b704 100644 --- a/gemrb/core/Scriptable/Scriptable.cpp +++ b/gemrb/core/Scriptable/Scriptable.cpp @@ -262,7 +262,8 @@ void Scriptable::DrawOverheadText(const Region &screen) } else { time = (MAX_DELAY-time)/10; if (time<256) { - const Color overHeadColor = {time,time,time,time}; + ieByte time2 = time; // shut up narrowing warnings + const Color overHeadColor = {time2,time2,time2,time2}; palette = core->CreatePalette(overHeadColor, black); } } diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index 8aff3b2..fec4cd0 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -373,7 +373,7 @@ PyDoc_STRVAR( GemRB_SetInfoTextColor__doc, static PyObject* GemRB_SetInfoTextColor(PyObject*, PyObject* args) { - int r,g,b,a; + ieByte r,g,b,a; if (!PyArg_ParseTuple( args, "iii|i", &r, &g, &b, &a)) { return AttributeError( GemRB_SetInfoTextColor__doc ); @@ -2071,7 +2071,8 @@ PyDoc_STRVAR( GemRB_Label_SetTextColor__doc, static PyObject* GemRB_Label_SetTextColor(PyObject * /*self*/, PyObject* args) { - int WindowIndex, ControlIndex, r, g, b; + int WindowIndex, ControlIndex; + ieByte r, g, b; if (!PyArg_ParseTuple( args, "iiiii", &WindowIndex, &ControlIndex, &r, &g, &b )) { @@ -2415,8 +2416,8 @@ static PyObject* GemRB_Button_SetOverlay(PyObject * /*self*/, PyObject* args) { int WindowIndex, ControlIndex; double Clipping; - int r1,g1,b1,a1; - int r2,g2,b2,a2; + ieByte r1,g1,b1,a1; + ieByte r2,g2,b2,a2; if (!PyArg_ParseTuple( args, "iidiiiiiiii", &WindowIndex, &ControlIndex, &Clipping, &r1, &g1, &b1, &a1, &r2, &g2, &b2, &a2)) { @@ -2445,7 +2446,8 @@ PyDoc_STRVAR( GemRB_Button_SetBorder__doc, static PyObject* GemRB_Button_SetBorder(PyObject * /*self*/, PyObject* args) { - int WindowIndex, ControlIndex, BorderIndex, dx1, dy1, dx2, dy2, r, g, b, a, enabled = 0, filled = 0; + int WindowIndex, ControlIndex, BorderIndex, dx1, dy1, dx2, dy2, enabled = 0, filled = 0; + ieByte r, g, b, a; if (!PyArg_ParseTuple( args, "iiiiiiiiiii|ii", &WindowIndex, &ControlIndex, &BorderIndex, &dx1, &dy1, &dx2, &dy2, &r, &g, &b, &a, &enabled, &filled)) { @@ -2565,7 +2567,8 @@ PyDoc_STRVAR( GemRB_Button_SetTextColor__doc, static PyObject* GemRB_Button_SetTextColor(PyObject * /*self*/, PyObject* args) { - int WindowIndex, ControlIndex, r, g, b, swap = 0; + int WindowIndex, ControlIndex, swap = 0; + ieByte r, g, b; if (!PyArg_ParseTuple( args, "iiiii|i", &WindowIndex, &ControlIndex, &r, &g, &b, &swap )) { return AttributeError( GemRB_Button_SetTextColor__doc ); @@ -2912,7 +2915,8 @@ PyDoc_STRVAR( GemRB_WorldMap_SetTextColor__doc, static PyObject* GemRB_WorldMap_SetTextColor(PyObject * /*self*/, PyObject* args) { - int WindowIndex, ControlIndex, which, r, g, b, a; + int WindowIndex, ControlIndex, which; + ieByte r, g, b, a; if (!PyArg_ParseTuple( args, "iiiiiii", &WindowIndex, &ControlIndex, &which, &r, &g, &b, &a )) { return AttributeError( GemRB_WorldMap_SetTextColor__doc ); http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=8a86df76725208475103a9aa84d62948ce6bc334 commit 8a86df76725208475103a9aa84d62948ce6bc334 Author: Jaka Kranjc <lyn...@us...> Date: Sat Apr 7 13:50:00 2012 +0200 don't check the tot "signature" or the whole tlk override is disabled if it doesn't exist already diff --git a/gemrb/plugins/TLKImporter/TlkOverride.cpp b/gemrb/plugins/TLKImporter/TlkOverride.cpp index 1afbb6d..164ef94 100644 --- a/gemrb/plugins/TLKImporter/TlkOverride.cpp +++ b/gemrb/plugins/TLKImporter/TlkOverride.cpp @@ -72,11 +72,6 @@ bool CTlkOverride::Init() toh_str->ReadDword( &AuxCount ); tot_str->ReadDword( &FreeOffset ); - tot_str->Read(Signature,4); - if (strncmp( Signature, "\xff\xff\xff\xff",4) !=0) { - Log(ERROR, "TLKImporter", "Not a valid TOT file."); - return false; - } return true; } http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=34bc7926733ac660f9dda6aca214da3c76606971 commit 34bc7926733ac660f9dda6aca214da3c76606971 Author: Jaka Kranjc <lyn...@us...> Date: Sat Apr 7 13:45:25 2012 +0200 iwd2::cg: save the character bio (custom bio still doesn't work though) diff --git a/gemrb/GUIScripts/iwd2/CharGen9.py b/gemrb/GUIScripts/iwd2/CharGen9.py index 76bd560..475c5fb 100644 --- a/gemrb/GUIScripts/iwd2/CharGen9.py +++ b/gemrb/GUIScripts/iwd2/CharGen9.py @@ -26,6 +26,8 @@ import CharOverview import LUCommon BioWindow = 0 +BioData = 0 +BioStrRef = 0 EditControl = 0 AlignmentTable = 0 PortraitName = "" @@ -34,6 +36,7 @@ def OnLoad(): CharOverview.UpdateOverview(9) if CharOverview.CharGenWindow: CharOverview.PersistButtons['Next'].SetState(IE_GUI_BUTTON_UNPRESSED) # Fixes button being pre-pressed + RevertPress() return def SetRaceAbilities(MyChar, racetitle): @@ -85,11 +88,13 @@ def ClearPress(): return def RevertPress(): + global BioStrRef BioTable = GemRB.LoadTable ("bios") Class = GemRB.GetVar ("BaseClass") - StrRef = BioTable.GetValue(Class,1) - GemRB.SetToken ("BIO", GemRB.GetString(StrRef) ) - EditControl.SetText (GemRB.GetToken("BIO") ) + BioStrRef = BioTable.GetValue(Class,1) + GemRB.SetToken ("BIO", GemRB.GetString(BioStrRef) ) + if type (EditControl) != type (7350): # just some int + EditControl.SetText (GemRB.GetToken("BIO") ) return def BioCancelPress(): @@ -209,5 +214,12 @@ def NextPress(): xp = TmpTable.GetValue (racename, "VALUE") GemRB.SetPlayerStat (MyChar, IE_XP, xp ) + BioData = GemRB.GetToken("BIO") + if BioData == GemRB.GetString (BioStrRef): + NewRef = BioStrRef + else: + NewRef = GemRB.CreateString (62015+MyChar, BioData) + GemRB.SetPlayerString (MyChar, 63, NewRef) + LUCommon.ApplyFeats(MyChar) return ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |