From: Laszlo T. <ave...@us...> - 2006-08-10 21:34:45
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv25074/Core Modified Files: Actions.cpp Actor.cpp ActorBlock.cpp Button.cpp Button.h CharAnimations.cpp GSUtils.cpp GSUtils.h Interface.cpp Interface.h Inventory.cpp ScriptedAnimation.cpp TextEdit.cpp Video.h Log Message: fixed several leaks/uninitialized memory usage Index: TextEdit.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/TextEdit.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** TextEdit.cpp 16 Apr 2006 23:57:02 -0000 1.33 --- TextEdit.cpp 10 Aug 2006 21:34:40 -0000 1.34 *************** *** 47,52 **** core->FreePalette( palette ); free( Buffer ); ! if( Back ) ! video->FreeSprite( Back ); } --- 47,52 ---- core->FreePalette( palette ); free( Buffer ); ! video->FreeSprite( Back ); ! video->FreeSprite( Cursor ); } *************** *** 88,91 **** --- 88,92 ---- void TextEdit::SetCursor(Sprite2D* cur) { + core->GetVideoDriver()->FreeSprite( Cursor ); if (cur != NULL) { Cursor = cur; Index: GSUtils.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GSUtils.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** GSUtils.h 9 Aug 2006 21:28:27 -0000 1.25 --- GSUtils.h 10 Aug 2006 21:34:40 -0000 1.26 *************** *** 57,60 **** --- 57,61 ---- int MoveItemCore(Scriptable *Sender, Scriptable *target, const char *resref, int flags); void MoveToObjectCore(Scriptable *Sender, Action *parameters, ieDword flags); + void CreateItemCore(CREItem *item, const char *resref, int a, int b, int c); void AttackCore(Scriptable *Sender, Scriptable *target, Action *parameters, int flags); void InitScriptTables(); Index: Interface.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Interface.h,v retrieving revision 1.205 retrieving revision 1.206 diff -C2 -d -r1.205 -r1.206 *** Interface.h 8 Aug 2006 20:25:46 -0000 1.205 --- Interface.h 10 Aug 2006 21:34:40 -0000 1.206 *************** *** 305,309 **** void SetInfoTextColor(Color &color); /** returns a gradient set */ ! Color * GetPalette(int index, int colors); /** Returns a preloaded Font */ Font * GetFont(const char *) const; --- 305,309 ---- void SetInfoTextColor(Color &color); /** returns a gradient set */ ! Color * GetPalette(int index, int colors, Color *buffer); /** Returns a preloaded Font */ Font * GetFont(const char *) const; *************** *** 460,463 **** --- 460,464 ---- /** Gets the WorldMap class, returns the current worldmap or the first worldmap containing the area*/ WorldMap * GetWorldMap(const char *area = NULL); + void SetWindowFrame(int i, Sprite2D *Picture); GameControl *GetGameControl(); Index: GSUtils.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GSUtils.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** GSUtils.cpp 9 Aug 2006 21:28:27 -0000 1.66 --- GSUtils.cpp 10 Aug 2006 21:34:40 -0000 1.67 *************** *** 907,910 **** --- 907,928 ---- } + void CreateItemCore(CREItem *item, const char *resref, int a, int b, int c) + { + strncpy(item->ItemResRef, resref, 8); + if (a==-1) { + Item *origitem = core->GetItem(resref); + for(int i=0;i<3;i++) { + ITMExtHeader *e = origitem->GetExtHeader(i); + item->Usages[i]=e?e->Charges:0; + } + core->FreeItem(origitem, resref, false); + } else { + item->Usages[0]=(ieWord) a; + item->Usages[1]=(ieWord) b; + item->Usages[2]=(ieWord) c; + } + item->Flags=0; + } + //It is possible to attack CONTAINERS/DOORS as well!!! void AttackCore(Scriptable *Sender, Scriptable *target, Action *parameters, int flags) Index: CharAnimations.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/CharAnimations.cpp,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** CharAnimations.cpp 3 Jul 2006 16:02:46 -0000 1.88 --- CharAnimations.cpp 10 Aug 2006 21:34:40 -0000 1.89 *************** *** 142,149 **** } for (unsigned int i = 0; i < Colors[6]; i++) { ! Color* NewPal = core->GetPalette( Colors[i]&255, size ); ! memcpy( &palette->col[dest], NewPal, size*sizeof( Color ) ); dest +=size; ! free( NewPal ); } return; --- 142,150 ---- } for (unsigned int i = 0; i < Colors[6]; i++) { ! core->GetPalette( Colors[i]&255, size, &palette->col[dest]); ! //Color* NewPal = core->GetPalette( Colors[i]&255, size ); ! //memcpy( &palette->col[dest], NewPal, size*sizeof( Color ) ); dest +=size; ! //free( NewPal ); } return; *************** *** 168,207 **** } ! Color* MetalPal = core->GetPalette( Colors[0]&255, 12 ); ! Color* MinorPal = core->GetPalette( Colors[1]&255, 12 ); ! Color* MajorPal = core->GetPalette( Colors[2]&255, 12 ); ! Color* SkinPal = core->GetPalette( Colors[3]&255, 12 ); ! Color* LeatherPal = core->GetPalette( Colors[4]&255, 12 ); ! Color* ArmorPal = core->GetPalette( Colors[5]&255, 12 ); ! Color* HairPal = core->GetPalette( Colors[6]&255, 12 ); ! memcpy( &palette->col[0x04], MetalPal, 12 * sizeof( Color ) ); ! memcpy( &palette->col[0x10], MinorPal, 12 * sizeof( Color ) ); ! memcpy( &palette->col[0x1C], MajorPal, 12 * sizeof( Color ) ); ! memcpy( &palette->col[0x28], SkinPal, 12 * sizeof( Color ) ); ! memcpy( &palette->col[0x34], LeatherPal, 12 * sizeof( Color ) ); ! memcpy( &palette->col[0x40], ArmorPal, 12 * sizeof( Color ) ); ! memcpy( &palette->col[0x4C], HairPal, 12 * sizeof( Color ) ); ! memcpy( &palette->col[0x58], &MinorPal[1], 8 * sizeof( Color ) ); ! memcpy( &palette->col[0x60], &MajorPal[1], 8 * sizeof( Color ) ); ! memcpy( &palette->col[0x68], &MinorPal[1], 8 * sizeof( Color ) ); ! memcpy( &palette->col[0x70], &MetalPal[1], 8 * sizeof( Color ) ); ! memcpy( &palette->col[0x78], &LeatherPal[1], 8 * sizeof( Color ) ); ! memcpy( &palette->col[0x80], &LeatherPal[1], 8 * sizeof( Color ) ); ! memcpy( &palette->col[0x88], &MinorPal[1], 8 * sizeof( Color ) ); int i; //moved here to be compatible with msvc6.0 for (i = 0x90; i < 0xA8; i += 0x08) ! memcpy( &palette->col[i], &LeatherPal[1], 8 * sizeof( Color ) ); ! memcpy( &palette->col[0xB0], &SkinPal[1], 8 * sizeof( Color ) ); for (i = 0xB8; i < 0xFF; i += 0x08) ! memcpy( &palette->col[i], &LeatherPal[1], 8 * sizeof( Color ) ); ! free( MetalPal ); ! free( MinorPal ); ! free( MajorPal ); ! free( SkinPal ); ! free( LeatherPal ); ! free( ArmorPal ); ! free( HairPal ); } --- 169,212 ---- } ! //metal ! core->GetPalette( Colors[0]&255, 12, &palette->col[0x04]); ! //minor ! core->GetPalette( Colors[1]&255, 12, &palette->col[0x10]); ! //major ! core->GetPalette( Colors[2]&255, 12, &palette->col[0x1c]); ! //skin ! core->GetPalette( Colors[3]&255, 12, &palette->col[0x28]); ! //leather ! core->GetPalette( Colors[4]&255, 12, &palette->col[0x34]); ! //armor ! core->GetPalette( Colors[5]&255, 12, &palette->col[0x40]); ! //hair ! core->GetPalette( Colors[6]&255, 12, &palette->col[0x4c]); ! ! //minor ! memcpy( &palette->col[0x58], &palette->col[0x11], 8 * sizeof( Color ) ); ! //major ! memcpy( &palette->col[0x60], &palette->col[0x1d], 8 * sizeof( Color ) ); ! //minor ! memcpy( &palette->col[0x68], &palette->col[0x11], 8 * sizeof( Color ) ); ! //metal ! memcpy( &palette->col[0x70], &palette->col[0x04], 8 * sizeof( Color ) ); ! //leather ! memcpy( &palette->col[0x78], &palette->col[0x35], 8 * sizeof( Color ) ); ! //leather ! memcpy( &palette->col[0x80], &palette->col[0x35], 8 * sizeof( Color ) ); ! //minor ! memcpy( &palette->col[0x88], &palette->col[0x11], 8 * sizeof( Color ) ); int i; //moved here to be compatible with msvc6.0 for (i = 0x90; i < 0xA8; i += 0x08) ! //leather ! memcpy( &palette->col[i], &palette->col[0x35], 8 * sizeof( Color ) ); ! //skin ! memcpy( &palette->col[0xB0], &palette->col[29], 8 * sizeof( Color ) ); for (i = 0xB8; i < 0xFF; i += 0x08) ! //leather ! memcpy( &palette->col[i], &palette->col[0x35], 8 * sizeof( Color ) ); } Index: Button.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Button.cpp,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** Button.cpp 4 Aug 2006 22:50:36 -0000 1.106 --- Button.cpp 10 Aug 2006 21:34:40 -0000 1.107 *************** *** 28,35 **** #include "../../includes/defsounds.h" ! Button::Button(bool Clear) { Unpressed = Pressed = Selected = Disabled = NULL; ! this->Clear = Clear; State = IE_GUI_BUTTON_UNPRESSED; ResetEventHandler( ButtonOnPress ); --- 28,35 ---- #include "../../includes/defsounds.h" ! Button::Button() { Unpressed = Pressed = Selected = Disabled = NULL; ! //this->Clear = Clear; State = IE_GUI_BUTTON_UNPRESSED; ResetEventHandler( ButtonOnPress ); *************** *** 59,79 **** { Video* video = core->GetVideoDriver(); ! if (Clear) { ! if (Unpressed) ! video->FreeSprite( Unpressed ); ! if (Pressed && ( Pressed != Unpressed )) ! video->FreeSprite( Pressed ); ! if (Selected && ! ( ( Selected != Pressed ) && ( Selected != Unpressed ) )) ! video->FreeSprite( Selected ); ! if (Disabled && ! ( ( Disabled != Pressed ) && ! ( Disabled != Unpressed ) && ! ( Disabled != Selected ) )) ! video->FreeSprite( Disabled ); ! } ! if (Picture) { ! video->FreeSprite( Picture ); ! } ClearPictureList(); if (Text) { --- 59,67 ---- { Video* video = core->GetVideoDriver(); ! video->FreeSprite( Disabled ); ! video->FreeSprite( Selected ); ! video->FreeSprite( Pressed ); ! video->FreeSprite( Unpressed ); ! video->FreeSprite( Picture ); ClearPictureList(); if (Text) { *************** *** 94,128 **** case IE_GUI_BUTTON_UNPRESSED: case IE_GUI_BUTTON_LOCKED: ! { ! if (Unpressed && Clear) ! core->GetVideoDriver()->FreeSprite( Unpressed ); ! Unpressed = img; ! } break; case IE_GUI_BUTTON_SECOND: case IE_GUI_BUTTON_PRESSED: ! { ! if (Pressed && Clear) ! core->GetVideoDriver()->FreeSprite( Pressed ); ! Pressed = img; ! } break; case IE_GUI_BUTTON_SELECTED: ! { ! if (Selected && Clear) ! core->GetVideoDriver()->FreeSprite( Selected ); ! Selected = img; ! } break; case IE_GUI_BUTTON_DISABLED: case IE_GUI_BUTTON_THIRD: ! { ! if (Disabled && Clear) ! core->GetVideoDriver()->FreeSprite( Disabled ); ! Disabled = img; ! } break; } --- 82,104 ---- case IE_GUI_BUTTON_UNPRESSED: case IE_GUI_BUTTON_LOCKED: ! core->GetVideoDriver()->FreeSprite( Unpressed ); ! Unpressed = img; break; case IE_GUI_BUTTON_SECOND: case IE_GUI_BUTTON_PRESSED: ! core->GetVideoDriver()->FreeSprite( Pressed ); ! Pressed = img; break; case IE_GUI_BUTTON_SELECTED: ! core->GetVideoDriver()->FreeSprite( Selected ); ! Selected = img; break; case IE_GUI_BUTTON_DISABLED: case IE_GUI_BUTTON_THIRD: ! core->GetVideoDriver()->FreeSprite( Disabled ); ! Disabled = img; break; } *************** *** 544,550 **** void Button::SetPicture(Sprite2D* newpic) { ! if (Picture) { ! core->GetVideoDriver()->FreeSprite( Picture ); ! } if (newpic) { newpic->XPos = 0; --- 520,524 ---- void Button::SetPicture(Sprite2D* newpic) { ! core->GetVideoDriver()->FreeSprite( Picture ); if (newpic) { newpic->XPos = 0; Index: Actions.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Actions.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** Actions.cpp 8 Aug 2006 20:25:45 -0000 1.79 --- Actions.cpp 10 Aug 2006 21:34:40 -0000 1.80 *************** *** 3093,3115 **** } - void CreateItemCore(CREItem *item, const char *resref, int a, int b, int c) - { - strncpy(item->ItemResRef, resref, 8); - if (a==-1) { - Item *origitem = core->GetItem(resref); - for(int i=0;i<3;i++) { - ITMExtHeader *e = origitem->GetExtHeader(i); - item->Usages[i]=e?e->Charges:0; - } - core->FreeItem(origitem, resref, false); - } else { - item->Usages[0]=(ieWord) a; - item->Usages[1]=(ieWord) b; - item->Usages[2]=(ieWord) c; - } - //no need, when Inventory receives it, it will be set - //item->Flags=IE_INV_ITEM_ACQUIRED; //get the flags right - } - //this action creates an item in a container or a creature //if there is an object it works as GiveItemCreate --- 3093,3096 ---- Index: Inventory.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Inventory.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** Inventory.cpp 6 Aug 2006 21:37:33 -0000 1.82 --- Inventory.cpp 10 Aug 2006 21:34:40 -0000 1.83 *************** *** 1004,1008 **** TmpItem->Usages[1]=Charge1; TmpItem->Usages[2]=Charge2; ! TmpItem->Flags=IE_INV_ITEM_ACQUIRED; if (core->ResolveRandomItem(TmpItem) &&core->Exists(TmpItem->ItemResRef, IE_ITM_CLASS_ID)) { AddSlotItem( TmpItem, SlotID ); --- 1004,1008 ---- TmpItem->Usages[1]=Charge1; TmpItem->Usages[2]=Charge2; ! TmpItem->Flags=0; if (core->ResolveRandomItem(TmpItem) &&core->Exists(TmpItem->ItemResRef, IE_ITM_CLASS_ID)) { AddSlotItem( TmpItem, SlotID ); *************** *** 1020,1024 **** TmpItem->Usages[1]=Charge1; TmpItem->Usages[2]=Charge2; ! TmpItem->Flags=IE_INV_ITEM_ACQUIRED; if (core->ResolveRandomItem(TmpItem) &&core->Exists(TmpItem->ItemResRef, IE_ITM_CLASS_ID)) { SetSlotItem( TmpItem, SlotID ); --- 1020,1024 ---- TmpItem->Usages[1]=Charge1; TmpItem->Usages[2]=Charge2; ! TmpItem->Flags=0; if (core->ResolveRandomItem(TmpItem) &&core->Exists(TmpItem->ItemResRef, IE_ITM_CLASS_ID)) { SetSlotItem( TmpItem, SlotID ); Index: ScriptedAnimation.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ScriptedAnimation.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ScriptedAnimation.cpp 24 Jun 2006 11:24:02 -0000 1.33 --- ScriptedAnimation.cpp 10 Aug 2006 21:34:40 -0000 1.34 *************** *** 296,299 **** --- 296,302 ---- } + #define PALSIZE 12 + static Color NewPal[PALSIZE]; + void ScriptedAnimation::SetPalette(int gradient, int start) { *************** *** 311,323 **** start=4; } ! unsigned int size = 12; ! Color* NewPal = core->GetPalette( gradient&255, size ); for(i=0;i<3;i++) { if (palettes[i]) { ! memcpy( &palettes[i]->col[start], NewPal, size*sizeof( Color ) ); } } - free( NewPal ); } --- 314,324 ---- start=4; } ! core->GetPalette( gradient&255, PALSIZE, NewPal ); for(i=0;i<3;i++) { if (palettes[i]) { ! memcpy( &palettes[i]->col[start], NewPal, PALSIZE*sizeof( Color ) ); } } } Index: Actor.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Actor.cpp,v retrieving revision 1.205 retrieving revision 1.206 diff -C2 -d -r1.205 -r1.206 *** Actor.cpp 8 Aug 2006 20:25:45 -0000 1.205 --- Actor.cpp 10 Aug 2006 21:34:40 -0000 1.206 *************** *** 971,975 **** for (unsigned int i=0;i<MAX_STATS;i++) { ! if (first || Modified[i]!=previous[i]) { PostChangeFunctionType f = post_change_functions[i]; if (f) { --- 971,975 ---- for (unsigned int i=0;i<MAX_STATS;i++) { ! if (first || (Modified[i]!=previous[i]) ) { PostChangeFunctionType f = post_change_functions[i]; if (f) { Index: Video.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Video.h,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** Video.h 7 Aug 2006 22:25:11 -0000 1.66 --- Video.h 10 Aug 2006 21:34:40 -0000 1.67 *************** *** 107,111 **** Palette* /*palette*/, int /*transindex*/) { return 0; } ! virtual void FreeSprite(Sprite2D* spr) = 0; virtual void BlitSprite(Sprite2D* spr, int x, int y, bool anchor = false, Region* clip = NULL) = 0; --- 107,111 ---- Palette* /*palette*/, int /*transindex*/) { return 0; } ! virtual void FreeSprite(Sprite2D* &spr) = 0; virtual void BlitSprite(Sprite2D* spr, int x, int y, bool anchor = false, Region* clip = NULL) = 0; Index: Interface.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Interface.cpp,v retrieving revision 1.424 retrieving revision 1.425 diff -C2 -d -r1.424 -r1.425 *** Interface.cpp 9 Aug 2006 19:04:34 -0000 1.424 --- Interface.cpp 10 Aug 2006 21:34:40 -0000 1.425 *************** *** 482,485 **** --- 482,491 ---- } + void Interface::SetWindowFrame(int i, Sprite2D *Picture) + { + video->FreeSprite(WindowFrames[i]); + WindowFrames[i]=Picture; + } + GameControl* Interface::StartGameControl() { *************** *** 699,703 **** ItemDialTable->SetAt(key, value); strnlwrcpy(dlgres,aa->QueryField(idx,1),8); ! ItemDial2Table->SetAt(key, dlgres); } DelTable( table ); --- 705,709 ---- ItemDialTable->SetAt(key, value); strnlwrcpy(dlgres,aa->QueryField(idx,1),8); ! ItemDial2Table->SetAtCopy(key, dlgres); } DelTable( table ); *************** *** 2209,2223 **** /** No descriptions */ ! Color* Interface::GetPalette(int index, int colors) { ! Color* pal = NULL; if (colors == 32) { ! pal = ( Color * ) malloc( colors * sizeof( Color ) ); pal32->GetPalette( index, colors, pal ); } else if (colors <= 32) { ! pal = ( Color * ) malloc( colors * sizeof( Color ) ); pal16->GetPalette( index, colors, pal ); } else if (colors == 256) { ! pal = ( Color * ) malloc( colors * sizeof( Color ) ); pal256->GetPalette( index, colors, pal ); } --- 2215,2229 ---- /** No descriptions */ ! Color* Interface::GetPalette(int index, int colors, Color *pal) { ! //Color* pal = NULL; if (colors == 32) { ! //pal = ( Color * ) malloc( colors * sizeof( Color ) ); pal32->GetPalette( index, colors, pal ); } else if (colors <= 32) { ! //pal = ( Color * ) malloc( colors * sizeof( Color ) ); pal16->GetPalette( index, colors, pal ); } else if (colors == 256) { ! //pal = ( Color * ) malloc( colors * sizeof( Color ) ); pal256->GetPalette( index, colors, pal ); } *************** *** 3822,3837 **** } void Interface::DisplayConstantStringName(int stridx, unsigned int color, Scriptable *speaker) { unsigned int speaker_color; char *name; - Color *tmp; switch (speaker->Type) { case ST_ACTOR: name = ((Actor *) speaker)->GetName(-1); ! tmp = GetPalette( ((Actor *) speaker)->GetStat(IE_MAJOR_COLOR),8 ); ! speaker_color = (tmp[4].r<<16) | (tmp[4].g<<8) | tmp[4].b; ! free(tmp); break; default: --- 3828,3844 ---- } + #define PALSIZE 8 + static Color ActorColor[PALSIZE]; + void Interface::DisplayConstantStringName(int stridx, unsigned int color, Scriptable *speaker) { unsigned int speaker_color; char *name; switch (speaker->Type) { case ST_ACTOR: name = ((Actor *) speaker)->GetName(-1); ! GetPalette( ((Actor *) speaker)->GetStat(IE_MAJOR_COLOR),8, ActorColor ); ! speaker_color = (ActorColor[4].r<<16) | (ActorColor[4].g<<8) | ActorColor[4].b; break; default: *************** *** 3857,3868 **** char *name1; char *name2; - Color *tmp; switch (attacker->Type) { case ST_ACTOR: name1 = ((Actor *) attacker)->GetName(-1); ! tmp = GetPalette( ((Actor *) attacker)->GetStat(IE_MAJOR_COLOR),8 ); ! attacker_color = (tmp[4].r<<16) | (tmp[4].g<<8) | tmp[4].b; ! free(tmp); break; default: --- 3864,3873 ---- char *name1; char *name2; switch (attacker->Type) { case ST_ACTOR: name1 = ((Actor *) attacker)->GetName(-1); ! GetPalette( ((Actor *) attacker)->GetStat(IE_MAJOR_COLOR),8, ActorColor ); ! attacker_color = (ActorColor[4].r<<16) | (ActorColor[4].g<<8) | ActorColor[4].b; break; default: *************** *** 3895,3906 **** unsigned int speaker_color; char *name; - Color *tmp; switch (speaker->Type) { case ST_ACTOR: name = ((Actor *) speaker)->GetName(-1); ! tmp = GetPalette( ((Actor *) speaker)->GetStat(IE_MAJOR_COLOR),8 ); ! speaker_color = (tmp[4].r<<16) | (tmp[4].g<<8) | tmp[4].b; ! free(tmp); break; default: --- 3900,3909 ---- unsigned int speaker_color; char *name; switch (speaker->Type) { case ST_ACTOR: name = ((Actor *) speaker)->GetName(-1); ! GetPalette( ((Actor *) speaker)->GetStat(IE_MAJOR_COLOR),8, ActorColor ); ! speaker_color = (ActorColor[4].r<<16) | (ActorColor[4].g<<8) | ActorColor[4].b; break; default: Index: ActorBlock.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ActorBlock.cpp,v retrieving revision 1.153 retrieving revision 1.154 diff -C2 -d -r1.153 -r1.154 *** ActorBlock.cpp 9 Aug 2006 19:04:33 -0000 1.153 --- ActorBlock.cpp 10 Aug 2006 21:34:40 -0000 1.154 *************** *** 628,631 **** --- 628,632 ---- Destination = Pos; Orientation = 0; + NewOrientation = 0; StanceID = 0; path = NULL; Index: Button.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Button.h,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Button.h 4 Aug 2006 22:50:36 -0000 1.54 --- Button.h 10 Aug 2006 21:34:40 -0000 1.55 *************** *** 120,124 **** class GEM_EXPORT Button : public Control { public: ! Button(bool Clear = false); ~Button(); /** Sets the 'type' Image of the Button to 'img'. --- 120,124 ---- class GEM_EXPORT Button : public Control { public: ! Button(); ~Button(); /** Sets the 'type' Image of the Button to 'img'. *************** *** 180,184 **** void SetPictureClipping(double clip) { Clipping = clip; }; private: // Private attributes - bool Clear; char* Text; bool hasText; --- 180,183 ---- |