CScrollingScreenOverlay::AddText
0x00b56410 · 158 bytes · __thiscall
_ZN23CScrollingScreenOverlay7AddTextEPKciii
Decompiled
undefined (5 params)
/* CScrollingScreenOverlay::AddText(char const*, int, int, int) */
void __thiscall
CScrollingScreenOverlay::AddText
(CScrollingScreenOverlay *this,char *param_1,int param_2,int param_3,int param_4)
{
uint uVar1;
int iVar2;
if ((*(ushort *)(this + 0x12) != 0) &&
(*(int *)(this + 0x2c) <= (int)(uint)*(ushort *)(this + 0x12))) {
do {
CUtlLinkedList<CScrollingScreenOverlay::TextLine_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>>
::Free((CUtlLinkedList<CScrollingScreenOverlay::TextLine_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>>
*)this,*(ushort *)(this + 0xc));
if (*(ushort *)(this + 0x12) == 0) break;
} while (*(int *)(this + 0x2c) <= (int)(uint)*(ushort *)(this + 0x12));
}
uVar1 = CUtlLinkedList<CScrollingScreenOverlay::TextLine_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<CScrollingScreenOverlay::TextLine_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>>
*)this,0xffff);
iVar2 = (uVar1 & 0xffff) * 0x24;
CUtlString::operator=((CUtlString *)(*(int *)this + iVar2),param_1);
*(undefined4 *)(*(int *)this + 0x10 + iVar2) = *(undefined4 *)(gpGlobals + 0xc);
*(int *)(*(int *)this + 0x14 + iVar2) = param_2;
*(int *)(*(int *)this + 0x18 + iVar2) = param_3;
*(int *)(*(int *)this + 0x1c + iVar2) = param_4;
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.