Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed from con_console.h, added a proper GPL banner
- Loading branch information
skyjake
committed
Sep 3, 2003
1 parent
58a08a8
commit b9cc326
Showing
1 changed file
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* DE1: $Id$ | ||
* Copyright (C) 2003 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not: http://www.opensource.org/ | ||
*/ | ||
|
||
/* | ||
* con_main.h: Console Subsystem | ||
*/ | ||
|
||
#ifndef __DOOMSDAY_CONSOLE_MAIN_H__ | ||
#define __DOOMSDAY_CONSOLE_MAIN_H__ | ||
|
||
#include <stdio.h> | ||
#include "dd_share.h" | ||
|
||
#define MAX_ARGS 256 | ||
|
||
typedef struct | ||
{ | ||
char cmdLine[2048]; | ||
int argc; | ||
char *argv[MAX_ARGS]; | ||
} cmdargs_t; | ||
|
||
// A console buffer line. | ||
typedef struct | ||
{ | ||
int len; // This is the length of the line (no term). | ||
char *text; // This is the text. | ||
int flags; | ||
} cbline_t; | ||
|
||
// Console commands can set this when they need to return a custom value | ||
// e.g. for the game dll. | ||
extern int CmdReturnValue; | ||
|
||
extern int consoleAlpha, consoleLight; | ||
extern boolean consoleDump, consoleShowFPS, consoleShadowText; | ||
|
||
void Con_Init(); | ||
void Con_Shutdown(); | ||
void Con_WriteAliasesToFile(FILE *file); | ||
void Con_MaxLineLength(void); | ||
void Con_Open(int yes); | ||
void Con_AddCommand(ccmd_t *cmd); | ||
void Con_AddVariable(cvar_t *var); | ||
void Con_AddCommandList(ccmd_t *cmdlist); | ||
void Con_AddVariableList(cvar_t *varlist); | ||
ccmd_t *Con_GetCommand(const char *name); | ||
boolean Con_IsValidCommand(const char *name); | ||
void Con_UpdateKnownWords(void); | ||
void Con_Ticker(void); | ||
boolean Con_Responder(event_t *event); | ||
void Con_Drawer(void); | ||
void Con_DrawRuler(int y, int lineHeight, float alpha); | ||
void Con_Printf(char *format, ...); | ||
void Con_FPrintf(int flags, char *format, ...); // Flagged printf. | ||
void Con_SetFont(ddfont_t *cfont); | ||
cbline_t *Con_GetBufferLine(int num); | ||
int Con_Execute(char *command, int silent); | ||
int Con_Executef(int silent, char *command, ...); | ||
|
||
void Con_Message(char *message, ...); | ||
void Con_Error(char *error, ...); | ||
cvar_t* Con_GetVariable(char *name); | ||
int Con_GetInteger(char *name); | ||
float Con_GetFloat(char *name); | ||
byte Con_GetByte(char *name); | ||
char* Con_GetString(char *name); | ||
|
||
void Con_SetInteger(char *name, int value); | ||
void Con_SetFloat(char *name, float value); | ||
void Con_SetString(char *name, char *text); | ||
|
||
char *TrimmedFloat(float val); | ||
|
||
#endif |