Gem A Day 3&4 (Ease Animation for UI) for TGEA 1.8.X
by Jean-louis Amadi · 01/22/2010 (8:42 pm) · 1 comments
original resource:
http://www.torquepowered.com/community/resources/view/14868
I did the port of Gem A Day 3&4 for TGEA 1.8.X, there is even an UI Editor integration. Caution, Not Ease system for mesh animation, just UI.



Make a backup of your work.
www.mediafire.com/file/dyyouzuzul4/AddOn-EaseAnimation.rar
Install Gem A Day 3 resource and Gem A Day 4 resource(just UI part).
After do this change:
In the file "math/mEase.h"
//Add this after all include in order to compile
In the file "gui/core/guiControl.cpp"
Comment out the first "getRoot(...)" definition in order to cancel an additionnal definition
And replace "renderChildControls(...)" methode of same file with the follow definition:
And replace the old Gem A Day guiPlasticBitmapCtrl.h / guiPlasticBitmapCtrl.cpp file with the same in the zip file.
Install emoticon, star and bomb directory in your ./scriptsAndAssets/client/scripts directory
Launch console with ~ and enter the follow command:
Video of demo:
www.dailymotion.com/video/xbydgb_system-anim-ease_creation
http://www.torquepowered.com/community/resources/view/14868
I did the port of Gem A Day 3&4 for TGEA 1.8.X, there is even an UI Editor integration. Caution, Not Ease system for mesh animation, just UI.



Make a backup of your work.
www.mediafire.com/file/dyyouzuzul4/AddOn-EaseAnimation.rar
Install Gem A Day 3 resource and Gem A Day 4 resource(just UI part).
After do this change:
In the file "math/mEase.h"
//Add this after all include in order to compile
ifndef _STRINGFUNCTIONS_H_ include "core/strings/stringFunctions.h" endif
In the file "gui/core/guiControl.cpp"
Comment out the first "getRoot(...)" definition in order to cancel an additionnal definition
And replace "renderChildControls(...)" methode of same file with the follow definition:
void GuiControl::renderChildControls(Point2I offset, const RectI &updateRect)
{
// offset is the upper-left corner of this control in screen coordinates
// updateRect is the intersection rectangle in screen coords of the control
// hierarchy. This can be set as the clip rectangle in most cases.
// move this into loop...
//RectI clipRect = updateRect;
iterator i;
for(i = begin(); i != end(); i++)
{
GuiControl *ctrl = static_cast<GuiControl *>(*i);
if (ctrl->mVisible)
{
ctrl->updateAnimation();
Point2I childPosition;
RectI childClip;
RectI clipRect;
bool draw;
childPosition = offset + ctrl->getPosition();
if (ctrl->mUnitClip.point.x == 0 && ctrl->mUnitClip.point.y == 0 &&
mUnitClip.extent.x == 1 && ctrl->mUnitClip.extent.y == 1)
{
// no unit clipping...
draw = true;
clipRect = updateRect;
}
else
{
// unit clipping...
RectI realClip = getRealClip(ctrl->mUnitClip,childPosition,ctrl->getExtent());
clipRect = updateRect;
draw = clipRect.intersect(realClip);
}
childClip.point = childPosition;
childClip.extent = ctrl->getExtent();
if (draw && childClip.intersect(clipRect))
{
//[add on Ease System 18-01-2010--Begin]
GFXStateBlockDesc sbd;
sbd.cullDefined = true;
sbd.cullMode = GFXCullNone;
sbd.zDefined = true;
sbd.zEnable = false;
mDefaultGuiSB = GFX->createStateBlock(sbd);
//[add on Ease System 18-01-2010--End]
GFX->setClipRect( childClip );
//[add on Ease System 18-01-2010--Begin]
//GFX->setCullMode( GFXCullNone );
GFX->setStateBlock(mDefaultGuiSB);
//[add on Ease System 18-01-2010--End]
ctrl->onRender(childPosition, childClip);
}
}
}
}And replace the old Gem A Day guiPlasticBitmapCtrl.h / guiPlasticBitmapCtrl.cpp file with the same in the zip file.
Install emoticon, star and bomb directory in your ./scriptsAndAssets/client/scripts directory
Launch console with ~ and enter the follow command:
exec("./scriptsAndAssets/client/scripts/bomb/bomb.cs");
exec("./scriptsAndAssets/client/scripts/star/star.cs");
exec("./scriptsAndAssets/client/scripts/emoticon/emoticon.cs");Video of demo:
www.dailymotion.com/video/xbydgb_system-anim-ease_creation
About the author
www.gamealchemy.fr

Associate Anthony Rosenbaum