[saco] Implement CCmdWindow::AddCmdProc

This commit is contained in:
RD42
2024-02-02 22:47:51 +08:00
parent 99b6dd3eda
commit dc47e22f45
2 changed files with 20 additions and 1 deletions

View File

@ -1,15 +1,21 @@
#pragma once
#define MAX_CMDS 144
#define MAX_CMD_STRLEN 32
typedef void (__cdecl *CMDPROC)(PCHAR);
class CCmdWindow // size: 6908
{
private:
char _gap0[6908];
public:
CMDPROC m_pCmds[MAX_CMDS];
CHAR m_szCmdNames[MAX_CMDS][MAX_CMD_STRLEN+1];
int m_iCmdCount;
CMDPROC m_pDefaultCmd; // used when no command specifier was
// used (ie. a normal chat message)
@ -17,4 +23,5 @@ public:
CCmdWindow();
void AddDefaultCmdProc(CMDPROC cmdDefault);
void AddCmdProc(PCHAR szCmdName, CMDPROC cmdHandler);
};