mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
This commit is contained in:
parent
a2bde2d6c5
commit
bee83fb3e4
20
console.h
20
console.h
|
@ -101,12 +101,12 @@ typedef struct IConsoleAlias {
|
||||||
char *cmdline; // command(s) that is/are being aliased
|
char *cmdline; // command(s) that is/are being aliased
|
||||||
} IConsoleAlias;
|
} IConsoleAlias;
|
||||||
|
|
||||||
// ** console parser ** //
|
/* console parser */
|
||||||
VARDEF IConsoleCmd *_iconsole_cmds; // list of registred commands
|
VARDEF IConsoleCmd *_iconsole_cmds; // list of registred commands
|
||||||
VARDEF IConsoleVar *_iconsole_vars; // list of registred vars
|
VARDEF IConsoleVar *_iconsole_vars; // list of registred vars
|
||||||
VARDEF IConsoleAlias *_iconsole_aliases; // list of registred aliases
|
VARDEF IConsoleAlias *_iconsole_aliases; // list of registred aliases
|
||||||
|
|
||||||
// ** console colors/modes ** //
|
/* console colors/modes */
|
||||||
VARDEF byte _icolour_def;
|
VARDEF byte _icolour_def;
|
||||||
VARDEF byte _icolour_err;
|
VARDEF byte _icolour_err;
|
||||||
VARDEF byte _icolour_warn;
|
VARDEF byte _icolour_warn;
|
||||||
|
@ -114,7 +114,7 @@ VARDEF byte _icolour_dbg;
|
||||||
VARDEF byte _icolour_cmd;
|
VARDEF byte _icolour_cmd;
|
||||||
VARDEF IConsoleModes _iconsole_mode;
|
VARDEF IConsoleModes _iconsole_mode;
|
||||||
|
|
||||||
// ** console functions ** //
|
/* console functions */
|
||||||
void IConsoleInit(void);
|
void IConsoleInit(void);
|
||||||
void IConsoleFree(void);
|
void IConsoleFree(void);
|
||||||
void IConsoleClearBuffer(void);
|
void IConsoleClearBuffer(void);
|
||||||
|
@ -123,38 +123,38 @@ void IConsoleSwitch(void);
|
||||||
void IConsoleClose(void);
|
void IConsoleClose(void);
|
||||||
void IConsoleOpen(void);
|
void IConsoleOpen(void);
|
||||||
|
|
||||||
// ** console output ** //
|
/* console output */
|
||||||
void IConsolePrint(uint16 color_code, const char *string);
|
void IConsolePrint(uint16 color_code, const char *string);
|
||||||
void CDECL IConsolePrintF(uint16 color_code, const char *s, ...);
|
void CDECL IConsolePrintF(uint16 color_code, const char *s, ...);
|
||||||
void IConsoleDebug(const char *string);
|
void IConsoleDebug(const char *string);
|
||||||
void IConsoleWarning(const char *string);
|
void IConsoleWarning(const char *string);
|
||||||
void IConsoleError(const char *string);
|
void IConsoleError(const char *string);
|
||||||
|
|
||||||
// *** Commands *** //
|
/* Commands */
|
||||||
void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc);
|
void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc);
|
||||||
void IConsoleAliasRegister(const char *name, const char *cmd);
|
void IConsoleAliasRegister(const char *name, const char *cmd);
|
||||||
IConsoleCmd *IConsoleCmdGet(const char *name);
|
IConsoleCmd *IConsoleCmdGet(const char *name);
|
||||||
IConsoleAlias *IConsoleAliasGet(const char *name);
|
IConsoleAlias *IConsoleAliasGet(const char *name);
|
||||||
|
|
||||||
// *** Variables *** //
|
/* Variables */
|
||||||
void IConsoleVarRegister(const char *name, void *addr, IConsoleVarTypes type, const char *help);
|
void IConsoleVarRegister(const char *name, void *addr, IConsoleVarTypes type, const char *help);
|
||||||
void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help);
|
void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help);
|
||||||
IConsoleVar* IConsoleVarGet(const char *name);
|
IConsoleVar* IConsoleVarGet(const char *name);
|
||||||
void IConsoleVarPrintGetValue(const IConsoleVar *var);
|
void IConsoleVarPrintGetValue(const IConsoleVar *var);
|
||||||
void IConsoleVarPrintSetValue(const IConsoleVar *var);
|
void IConsoleVarPrintSetValue(const IConsoleVar *var);
|
||||||
|
|
||||||
// *** Parser *** //
|
/* Parser */
|
||||||
void IConsoleCmdExec(const char *cmdstr);
|
void IConsoleCmdExec(const char *cmdstr);
|
||||||
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
|
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
|
||||||
|
|
||||||
// ** console std lib (register ingame commands/aliases/variables) ** //
|
/* console std lib (register ingame commands/aliases/variables) */
|
||||||
void IConsoleStdLibRegister(void);
|
void IConsoleStdLibRegister(void);
|
||||||
|
|
||||||
// ** Hooking code ** //
|
/* Hooking code */
|
||||||
void IConsoleCmdHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);
|
void IConsoleCmdHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);
|
||||||
void IConsoleVarHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);
|
void IConsoleVarHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);
|
||||||
void IConsoleVarProcAdd(const char *name, IConsoleCmdProc *proc);
|
void IConsoleVarProcAdd(const char *name, IConsoleCmdProc *proc);
|
||||||
|
|
||||||
// ** Supporting functions **//
|
/* Supporting functions */
|
||||||
bool GetArgumentInteger(uint32 *value, const char *arg);
|
bool GetArgumentInteger(uint32 *value, const char *arg);
|
||||||
#endif /* CONSOLE_H */
|
#endif /* CONSOLE_H */
|
||||||
|
|
2
engine.c
2
engine.c
|
@ -75,7 +75,7 @@ void DeleteCustomEngineNames(void)
|
||||||
|
|
||||||
void LoadCustomEngineNames(void)
|
void LoadCustomEngineNames(void)
|
||||||
{
|
{
|
||||||
// XXX: not done */
|
/* XXX: not done */
|
||||||
DEBUG(misc, 1) ("LoadCustomEngineNames: not done");
|
DEBUG(misc, 1) ("LoadCustomEngineNames: not done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
functions.h
18
functions.h
|
@ -63,15 +63,15 @@ void NORETURN CDECL error(const char *str, ...);
|
||||||
|
|
||||||
/* openttd.c */
|
/* openttd.c */
|
||||||
|
|
||||||
// **************
|
/**************
|
||||||
// * Warning: DO NOT enable this unless you understand what it does
|
* Warning: DO NOT enable this unless you understand what it does
|
||||||
// *
|
*
|
||||||
// * If enabled, in a network game all randoms will be dumped to the
|
* If enabled, in a network game all randoms will be dumped to the
|
||||||
// * stdout if the first client joins (or if you are a client). This
|
* stdout if the first client joins (or if you are a client). This
|
||||||
// * is to help finding desync problems.
|
* is to help finding desync problems.
|
||||||
// *
|
*
|
||||||
// * Warning: DO NOT enable this unless you understand what it does
|
* Warning: DO NOT enable this unless you understand what it does
|
||||||
// **************
|
**************/
|
||||||
|
|
||||||
//#define RANDOM_DEBUG
|
//#define RANDOM_DEBUG
|
||||||
|
|
||||||
|
|
28
lzoconf.h
28
lzoconf.h
|
@ -53,8 +53,8 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
// LZO requires a conforming <limits.h>
|
* LZO requires a conforming <limits.h>
|
||||||
************************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
|
#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
|
||||||
# error "invalid CHAR_BIT"
|
# error "invalid CHAR_BIT"
|
||||||
|
@ -79,8 +79,8 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
// architecture defines
|
* architecture defines
|
||||||
************************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#if !defined(__LZO_WIN) && !defined(__LZO_DOS) && !defined(__LZO_OS2)
|
#if !defined(__LZO_WIN) && !defined(__LZO_DOS) && !defined(__LZO_OS2)
|
||||||
# if defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
|
# if defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
|
||||||
|
@ -146,8 +146,8 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
// integral and pointer types
|
* integral and pointer types
|
||||||
************************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
/* Integral types with 32 bits or more */
|
/* Integral types with 32 bits or more */
|
||||||
#if !defined(LZO_UINT32_MAX)
|
#if !defined(LZO_UINT32_MAX)
|
||||||
|
@ -191,8 +191,8 @@ typedef int lzo_bool;
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
// memory models
|
* memory models
|
||||||
************************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
/* Memory model for the public code segment. */
|
/* Memory model for the public code segment. */
|
||||||
#if !defined(__LZO_CMODEL)
|
#if !defined(__LZO_CMODEL)
|
||||||
|
@ -250,8 +250,8 @@ typedef int lzo_bool;
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
// calling conventions and function types
|
* calling conventions and function types
|
||||||
************************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
/* linkage */
|
/* linkage */
|
||||||
#if !defined(__LZO_EXTERN_C)
|
#if !defined(__LZO_EXTERN_C)
|
||||||
|
@ -332,8 +332,8 @@ typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint);
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
// export information
|
* export information
|
||||||
************************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
/* DLL export information */
|
/* DLL export information */
|
||||||
#if !defined(__LZO_EXPORT1)
|
#if !defined(__LZO_EXPORT1)
|
||||||
|
@ -376,8 +376,8 @@ typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint);
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
// error codes and prototypes
|
* error codes and prototypes
|
||||||
************************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
/* Error codes for the compression/decompression functions. Negative
|
/* Error codes for the compression/decompression functions. Negative
|
||||||
* values are errors, positive values will be used for special but
|
* values are errors, positive values will be used for special but
|
||||||
|
|
|
@ -282,9 +282,11 @@ static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e)
|
||||||
SelectSongToPlay();
|
SelectSongToPlay();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//case 12: /* save */
|
#if 0
|
||||||
// ShowInfo("MusicTrackSelectionWndProc:save not implemented\n");
|
case 12: /* save */
|
||||||
// break;
|
ShowInfo("MusicTrackSelectionWndProc:save not implemented\n");
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case 5: case 6: case 7: case 8: case 9: case 10: /* set playlist */
|
case 5: case 6: case 7: case 8: case 9: case 10: /* set playlist */
|
||||||
msf.playlist = e->click.widget - 5;
|
msf.playlist = e->click.widget - 5;
|
||||||
|
|
|
@ -1593,7 +1593,7 @@ static void AdvanceWagons(Vehicle *v, bool before)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// find pairwise matching wagon
|
// find pairwise matching wagon
|
||||||
// start<>end, start+1<>end-1, ... */
|
// start<>end, start+1<>end-1, ...
|
||||||
last = first;
|
last = first;
|
||||||
for (i = length - 3; i > 0; i--) last = last->next;
|
for (i = length - 3; i > 0; i--) last = last->next;
|
||||||
|
|
||||||
|
|
|
@ -494,11 +494,13 @@ static void train_engine_drawing_loop(int *x, int *y, int *pos, int *sel, Engine
|
||||||
|| !(rvi->flags & RVI_WAGON) != is_engine ||
|
|| !(rvi->flags & RVI_WAGON) != is_engine ||
|
||||||
!HASBIT(e->player_avail, _local_player))
|
!HASBIT(e->player_avail, _local_player))
|
||||||
continue;
|
continue;
|
||||||
} /*else {
|
#if 0
|
||||||
// TODO find a nice red colour for vehicles being replaced
|
} else {
|
||||||
|
// TODO find a nice red colour for vehicles being replaced
|
||||||
if ( _autoreplace_array[i] != i )
|
if ( _autoreplace_array[i] != i )
|
||||||
colour = *sel == 0 ? 0x44 : 0x45;
|
colour = *sel == 0 ? 0x44 : 0x45;
|
||||||
} */
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_INT_INSIDE(--*pos, -lines_drawn, 0)) {
|
if (IS_INT_INSIDE(--*pos, -lines_drawn, 0)) {
|
||||||
DrawString(*x + 59, *y + 2, GetCustomEngineName(i),
|
DrawString(*x + 59, *y + 2, GetCustomEngineName(i),
|
||||||
|
|
Loading…
Reference in New Issue