Shipwright/soh/soh/Enhancements/gameconsole.h
M4xw 39cc86c260 git subrepo clone https://github.com/HarbourMasters/soh.git
subrepo:
  subdir:   "soh"
  merged:   "ba904bbd0"
upstream:
  origin:   "https://github.com/HarbourMasters/soh.git"
  branch:   "master"
  commit:   "ba904bbd0"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-22 02:51:23 +01:00

42 lines
741 B
C

#ifndef _GAMECONSOLE_H_
#define _GAMECONSOLE_H_
#include <ultra64.h>
#include <z64.h>
#include "cvar.h"
#define MAX_CVARS 2048
#ifdef __cplusplus
extern "C"
{
#endif
typedef enum
{
CONSOLECOMMAND_RESULT_SUCCESS,
CONSOLECOMMAND_RESULT_INVALIDARGS,
CONSOLECOMMAND_RESULT_INVALIDCOMMAND,
CONSOLECOMMAND_RESULT_FAILURE
} ConsoleCommandResult;
typedef ConsoleCommandResult(*ConsoleCommandFunc)(char** argv, s32 argc); // Returns the number of arguments it read
typedef struct ConsoleCommand
{
char* name;
ConsoleCommandFunc func;
char* description;
} ConsoleCommand;
extern GlobalContext* gGlobalCtx;
void GameConsole_Init();
s32 GameConsole_Split(char* str, char** argv);
#ifdef __cplusplus
}
#endif
#endif