hudlogstdout as default
This commit is contained in:
parent
79cdf00aff
commit
54a4571f05
3
d1x.ini
3
d1x.ini
|
@ -58,6 +58,5 @@
|
|||
;-hudlog ;Start hudlog immediatly
|
||||
;-hudlog_multi ;Start hudlog upon entering multiplayer games
|
||||
;-hudlogdir <d> ;Log hud messages in directory <d>
|
||||
;-hudlogstdout ;Log hud messages to stdout
|
||||
;-hudlines <l> ;Number of hud messages to show
|
||||
;-msgcolorlevel <c> ;Level of colorization for hud messages (0-3)
|
||||
;-msgcolorlevel <c> ;Level of colorization for hud messages (0-3)
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "d_slash.h"
|
||||
//end this section addition -VR
|
||||
|
||||
int HUD_log_messages = 0;
|
||||
int HUD_log_multi_autostart = 0;
|
||||
int HUD_log_autostart = 0;
|
||||
int fhudmulti = 0;
|
||||
|
@ -116,40 +115,35 @@ void hud_log_message(char * message){
|
|||
}
|
||||
}
|
||||
--recurse_flag;
|
||||
if (HUD_log_messages||fhudlog){
|
||||
time_t t;
|
||||
struct tm *lt;
|
||||
t=time(NULL);
|
||||
lt=localtime(&t);
|
||||
//02/06/99 Matthew Mueller - added zero padding to hour
|
||||
if (HUD_log_messages)
|
||||
printf("%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec);
|
||||
if (fhudlog)
|
||||
fprintf(fhudlog,"%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec);
|
||||
while (*message){
|
||||
if (*message>=0x01 && *message<=0x03){//filter out color codes
|
||||
message++;
|
||||
if (!*message)break;
|
||||
}else if (*message>=0x04 && *message<=0x06){//filter out color reset code
|
||||
}else{
|
||||
if (HUD_log_messages)
|
||||
printf("%c",*message);
|
||||
if (fhudlog)
|
||||
fprintf(fhudlog,"%c",*message);
|
||||
}
|
||||
message++;
|
||||
}
|
||||
if (HUD_log_messages)
|
||||
printf("\n");
|
||||
if (fhudlog){
|
||||
fprintf(fhudlog,"\n");
|
||||
//added 05/17/99 Matt Mueller - flush file to make sure it all gets out there
|
||||
fflush(fhudlog);
|
||||
//end addition -MM
|
||||
|
||||
time_t t;
|
||||
struct tm *lt;
|
||||
t=time(NULL);
|
||||
lt=localtime(&t);
|
||||
//02/06/99 Matthew Mueller - added zero padding to hour
|
||||
printf("%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec);
|
||||
if (fhudlog)
|
||||
fprintf(fhudlog,"%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec);
|
||||
while (*message){
|
||||
if (*message>=0x01 && *message<=0x03){//filter out color codes
|
||||
message++;
|
||||
if (!*message)break;
|
||||
}else if (*message>=0x04 && *message<=0x06){//filter out color reset code
|
||||
}else{
|
||||
printf("%c",*message);
|
||||
if (fhudlog)
|
||||
fprintf(fhudlog,"%c",*message);
|
||||
}
|
||||
//end edit -MM
|
||||
message++;
|
||||
}
|
||||
printf("\n");
|
||||
if (fhudlog){
|
||||
fprintf(fhudlog,"\n");
|
||||
//added 05/17/99 Matt Mueller - flush file to make sure it all gets out there
|
||||
fflush(fhudlog);
|
||||
//end addition -MM
|
||||
}
|
||||
//end edit -MM
|
||||
}
|
||||
|
||||
void kmatrix_print(FILE* out,int *sorted){
|
||||
|
@ -211,7 +205,7 @@ void kmatrix_log(int fhudonly){
|
|||
|
||||
if (fhudlog)
|
||||
kmatrix_print(fhudlog,sorted);
|
||||
if (HUD_log_messages && !fhudonly)
|
||||
if (!fhudonly)
|
||||
kmatrix_print(stdout,sorted);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ void kmatrix_log(int fhudonly);
|
|||
void hud_log_setdir(char *dir);
|
||||
void hud_log_message(char * message);
|
||||
|
||||
extern int HUD_log_messages;
|
||||
extern int HUD_log_multi_autostart;
|
||||
extern int HUD_log_autostart;
|
||||
|
||||
|
|
|
@ -295,7 +295,6 @@ void show_cmdline_help() {
|
|||
printf( " -menu_gameres %s\n", "Set menus to use the same resolution as in game");
|
||||
printf( " -hudlog_multi %s\n", "Start hudlog upon entering multiplayer games");
|
||||
printf( " -hudlogdir <d> %s\n", "Log hud messages in directory <d>");
|
||||
printf( " -hudlogstdout %s\n", "Log hud messages to stdout");
|
||||
printf( " -hudlines <l> %s\n", "Number of hud messages to show");
|
||||
printf( " -msgcolorlevel <c> %s\n", "Level of colorization for hud messages (0-3)");
|
||||
printf( " -nocdaudio %s\n", "Disable cd audio");
|
||||
|
@ -444,9 +443,6 @@ int main(int argc,char **argv)
|
|||
if (FindArg("-hudlog_multi"))
|
||||
HUD_log_multi_autostart = 1;
|
||||
|
||||
if (FindArg("-hudlogstdout"))
|
||||
HUD_log_messages = 1;
|
||||
|
||||
if ((t=FindArg("-hudlogdir")))
|
||||
hud_log_setdir(Args[t+1]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue