2023-11-14 22:58:51 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-02-02 22:47:51 +08:00
|
|
|
#define MAX_CMDS 144
|
|
|
|
#define MAX_CMD_STRLEN 32
|
|
|
|
|
2024-02-02 22:47:18 +08:00
|
|
|
typedef void (__cdecl *CMDPROC)(PCHAR);
|
|
|
|
|
2023-11-14 22:58:51 +08:00
|
|
|
class CCmdWindow // size: 6908
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
public:
|
2024-02-02 22:47:18 +08:00
|
|
|
|
2024-02-02 22:47:51 +08:00
|
|
|
CMDPROC m_pCmds[MAX_CMDS];
|
|
|
|
CHAR m_szCmdNames[MAX_CMDS][MAX_CMD_STRLEN+1];
|
|
|
|
int m_iCmdCount;
|
|
|
|
|
2024-02-02 22:47:18 +08:00
|
|
|
CMDPROC m_pDefaultCmd; // used when no command specifier was
|
|
|
|
// used (ie. a normal chat message)
|
|
|
|
|
|
|
|
|
2023-11-14 22:58:51 +08:00
|
|
|
CCmdWindow();
|
2024-02-02 22:47:18 +08:00
|
|
|
|
|
|
|
void AddDefaultCmdProc(CMDPROC cmdDefault);
|
2024-02-02 22:47:51 +08:00
|
|
|
void AddCmdProc(PCHAR szCmdName, CMDPROC cmdHandler);
|
2023-11-14 22:58:51 +08:00
|
|
|
};
|