by Gez » Sat Nov 10, 2012 3:44 am
I was looking at the code trying to figure out if wrapwidth is a boolean meaning to wrap on the width; or an integer giving a width at which to wrap, and I don't understand how this works at all. It seems not to be actually referenced in code anywhere. It's assigned, and it's serialized, but I don't see any "SomeFunctionWhichUseWrapWidthAsParameter(WrapWidth)" call or "if (WrapWidth)".
I mean, except the obvious:
Code: Select all
if (WrapWidth != 0)
{
msg->SetWrapWidth(WrapWidth);
}
Code: Select all
void SetWrapWidth(int wrap)
{
WrapWidth = wrap;
ResetText(SourceText);
}
But that doesn't help since nothing else happens with it afterwards. It's not referenced in ResetText, for example; which instead uses HUDWidth and/or ClipWidth and/or SCREENWIDTH.
Searching for all references specifically to DHUDMessage::WrapWidth gives only these results:
Code: Select all
WrapWidth = 0;
arc << WrapWidth;
ClipX = ClipY = ClipWidth = ClipHeight = WrapWidth = 0;
WrapWidth = wrap;
int ClipX, ClipY, ClipWidth, ClipHeight, WrapWidth; // in HUD coords
assignation, serialization, assignation, assignation, definition. Never actual use.
I was looking at the code trying to figure out if wrapwidth is a boolean meaning to wrap on the width; or an integer giving a width at which to wrap, and I don't understand how this works at all. It seems not to be actually referenced in code anywhere. It's assigned, and it's serialized, but I don't see any "SomeFunctionWhichUseWrapWidthAsParameter(WrapWidth)" call or "if (WrapWidth)". :?
I mean, except the obvious:
[code] if (WrapWidth != 0)
{
msg->SetWrapWidth(WrapWidth);
}
[/code]
[code] void SetWrapWidth(int wrap)
{
WrapWidth = wrap;
ResetText(SourceText);
}
[/code]
But that doesn't help since nothing else happens with it afterwards. It's not referenced in ResetText, for example; which instead uses HUDWidth and/or ClipWidth and/or SCREENWIDTH.
Searching for all references specifically to DHUDMessage::WrapWidth gives only these results:
[code]
WrapWidth = 0;
arc << WrapWidth;
ClipX = ClipY = ClipWidth = ClipHeight = WrapWidth = 0;
WrapWidth = wrap;
int ClipX, ClipY, ClipWidth, ClipHeight, WrapWidth; // in HUD coords
[/code]
assignation, serialization, assignation, assignation, definition. Never actual use.