CScrollingScreenOverlay::Draw
0x00b4c0c0 · 468 bytes · __thiscall
_ZN23CScrollingScreenOverlay4DrawEv
Decompiled
undefined (1 param)
/* CScrollingScreenOverlay::Draw() */
void __thiscall CScrollingScreenOverlay::Draw(CScrollingScreenOverlay *this)
{
float fVar1;
char *pcVar2;
int iVar3;
int iVar4;
int iVar5;
uint uVar6;
int iVar7;
int in_GS_OFFSET;
float fVar8;
undefined **local_42c;
undefined1 local_428;
char local_427 [1027];
undefined4 local_24;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)(developer._28_4_ + 0x30) != 0) {
uVar6 = (uint)*(ushort *)(this + 0xc);
iVar5 = *(int *)(this + 0x28);
if (*(ushort *)(this + 0xc) != 0xffff) {
iVar3 = *(int *)this;
if (*(float *)(this + 0x24) <=
*(float *)(gpGlobals + 0xc) - *(float *)(iVar3 + 0x10 + uVar6 * 0x24)) {
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)uVar6);
uVar6 = (uint)*(ushort *)(this + 0xc);
if (*(ushort *)(this + 0xc) == 0xffff) goto LAB_00b4c151;
iVar3 = *(int *)this;
} while (*(float *)(this + 0x24) <=
*(float *)(gpGlobals + 0xc) - *(float *)(iVar3 + 0x10 + uVar6 * 0x24));
}
local_42c = &PTR_InitQuietTruncation_00bfa898;
local_428 = 1;
local_427[0] = '\0';
local_24 = 0;
do {
iVar7 = uVar6 * 0x24;
iVar4 = 0xff;
fVar1 = *(float *)((CUtlString *)(iVar3 + iVar7) + 0x10);
fVar8 = *(float *)(gpGlobals + 0xc) - fVar1;
if (*(float *)(this + 0x24) - 1.0 < fVar8) {
iVar4 = (int)((*(float *)(this + 0x24) - fVar8) * 255.0);
}
pcVar2 = CUtlString::operator_cast_to_char_((CUtlString *)(iVar3 + iVar7));
CFmtStrN<1024>::sprintf((CFmtStrN<1024> *)&local_42c,"(%0.2f): %s",(double)fVar1,pcVar2);
iVar3 = *(int *)this + iVar7;
NDebugOverlay::ScreenTextLine
(*(float *)(this + 0x1c),*(float *)(this + 0x20),iVar5,local_427,
*(int *)(iVar3 + 0x14),*(int *)(iVar3 + 0x18),*(int *)(iVar3 + 0x1c),iVar4,
0.01023);
iVar3 = *(int *)this;
uVar6 = (uint)*(ushort *)(iVar3 + 0x22 + iVar7);
iVar5 = iVar5 + 1;
} while (uVar6 != 0xffff);
}
}
LAB_00b4c151:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.