| |
| |
| |
| |
| |
| |
| |
| |
|
|
| local sampapi = require 'sampapi' |
| local shared = sampapi.shared |
| local mt = require 'sampapi.metatype' |
| local ffi = require 'ffi' |
|
|
| shared.ffi.cdef[[ |
| typedef struct SCTextDrawSelection SCTextDrawSelection; |
| #pragma pack(push, 1) |
| struct SCTextDrawSelection { |
| BOOL m_bIsActive; |
| D3DCOLOR m_hoveredColor; |
| ID m_nHoveredId; |
| }; |
| #pragma pack(pop) |
| ]] |
|
|
| shared.validate_size('struct SCTextDrawSelection', 0xa) |
|
|
| local SCTextDrawSelection_mt = { |
| ResetTextDraws = ffi.cast('void(__thiscall*)(SCTextDrawSelection*)', sampapi.GetAddress(0x712B0)), |
| RawProcess = ffi.cast('void(__thiscall*)(SCTextDrawSelection*)', sampapi.GetAddress(0x71310)), |
| Process = ffi.cast('void(__thiscall*)(SCTextDrawSelection*)', sampapi.GetAddress(0x71410)), |
| Enable = ffi.cast('void(__thiscall*)(SCTextDrawSelection*, D3DCOLOR)', sampapi.GetAddress(0x71440)), |
| SendNotification = ffi.cast('void(__thiscall*)(SCTextDrawSelection*)', sampapi.GetAddress(0x71480)), |
| Disable = ffi.cast('void(__thiscall*)(SCTextDrawSelection*)', sampapi.GetAddress(0x71520)), |
| MsgProc = ffi.cast('BOOL(__thiscall*)(SCTextDrawSelection*, int, int, int)', sampapi.GetAddress(0x71570)), |
| } |
| mt.set_handler('struct SCTextDrawSelection', '__index', SCTextDrawSelection_mt) |
|
|
| local function RefTextDrawSelection() return ffi.cast('SCTextDrawSelection**', sampapi.GetAddress(0x26EB68))[0] end |
|
|
| return { |
| RefTextDrawSelection = RefTextDrawSelection, |
| } |