TorqueShaderEngine/Yack Pack TGEA 1 7
From TDN
This page provides instructions for "manually" converted the changes indicated in the Yack Pack for TGEA 1.03 to TGEA 1.7. Since the full source of the Yack Pack is under copyright by Filament Games, only what needs to be changes to be TGEA 1.7 compliant will be listed here. The differences listed here are roughly in the order of changes that are documented in the "Merge Guide" that comes with the Yack Pack.
1. Engine files should be extracted into the "T3D" folder, instead of the "game" folder
2. All #include paths that have "game" should be changed to "T3D"
3. Change the TVector path at the top of DialogMemory.h
#ifndef _TVECTOR_H #include "core/tVector.h" #endif
4. Replace the GuiTextListCtrl::onRenderCell function with the following version:
void GuiTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver)
{
Entry* entry = &mList[cell.y];
GuiControlProfile* entryProfile = NULL;
if(entry->profile != NULL)
{
entryProfile = entry->profile;
}
else
{
entryProfile = mProfile;
}
if ( entry->active )
{
if (selected || (mProfile->mMouseOverSelected && mouseOver))
{
RectI highlightRect = RectI(offset.x, offset.y, mCellSize.x, mCellSize.y);
highlightRect.inset( 0, -1 );
renderFilledBorder( highlightRect, entryProfile->mBorderColorHL, entryProfile->mFillColorHL);
GFX->getDrawUtil()->setBitmapModulation(entryProfile->mFontColorHL);
}
else
GFX->getDrawUtil()->setBitmapModulation(mouseOver ? entryProfile->mFontColorHL : entryProfile->mFontColor);
}
else
GFX->getDrawUtil()->setBitmapModulation( entryProfile->mFontColorNA );
const char *text = entry->text;
for(U32 index = 0; index < mColumnOffsets.size(); index++)
{
const char *nextCol = dStrchr(text, '\t');
if(mColumnOffsets[index] >= 0)
{
dsize_t slen;
if(nextCol)
slen = nextCol - text;
else
slen = dStrlen(text);
Point2I pos(offset.x + 4 + mColumnOffsets[index], offset.y);
RectI saveClipRect;
bool clipped = false;
if(mClipColumnText && (index != (mColumnOffsets.size() - 1)))
{
saveClipRect = GFX->getClipRect();
RectI clipRect(pos, Point2I(mColumnOffsets[index+1] - mColumnOffsets[index] - 4, mCellSize.y));
if(clipRect.intersect(saveClipRect))
{
clipped = true;
GFX->setClipRect(clipRect);
}
}
GFX->getDrawUtil()->drawTextN(mFont, pos, text, slen, entryProfile->mFontColors);
if(clipped)
GFX->setClipRect(saveClipRect);
}
if(!nextCol)
break;
text = nextCol+1;
}
}
//END YACK
5. The "mod_files" zip should now be extracted to the scriptsAndAssets folder of your root game folder
6. Also instances of the AudioDescription object should be changed to SFXDescription and "AudioProfile" should become "SFXProfile" (in audioProfiles.cs and Stanley_Sunshine.dla)
7. This line in guiCrosshairHud.cpp:
Con::executef(this, 1, "onRender");
should become:
Con::executef(this, "onRender");
8. In order to hear the speech audio, all SFXDescription in the Stanley_Sunshine.dla file should have their preload value set to TRUE, or implement this bug fix
TGEA 1.8 changes:
(You will need to complete the 1.7 changes first.)
In 'dialogMemory.cc' change the following:
#include "core/bitStream.h"to:
#include "core/stream/bitStream.h"
In 'dialogMemory.h' change the following:
line 15:#include "core/tVector.h"to:
#include "core/util/tVector.h"
Script changes to get the 'portrait' and 'crossHair' working:
In 'aiPlayer.cs' make sure line 38 reads:
dialogImg = "scriptsAndAssets/data/shapes/player/Kork_Portrait.png";
In 'guiCrossHairHud.cs' make sure the following lines read:
line 20:
%this.setBitmap("scriptsAndAssets/client/ui/crossHair_talk.png");
line 24:
%this.setBitmap("scriptsAndAssets/client/ui/crossHair.png");
line 29:
%this.setBitmap("scriptsAndAssets/client/ui/crossHair.png");
Also, I had to make a new 'black.png'. I made it 64 x 64 pixels because the 1 x 1 pixel version wasn't working. Before I did this, there were just white bars showing up at the top and bottom of the YackGui (instead of the black ones).



