From: black Date: Sun, 19 Jun 2005 16:42:43 +0000 (+0000) Subject: -Added support for 515]'s BX_COLOREDTEXT extension. X-Git-Tag: xonotic-v0.1.0preview~4736 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e88a73794afa1f0fe65fc70d318f4e288cabc0d1;p=xonotic%2Fdarkplaces.git -Added support for 515]'s BX_COLOREDTEXT extension. -Changed fopen's and fclose's log ouput a bit (to include the prvm name) -Fixed a stupid bug in the SV VM that caused it to crash on error. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5447 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index 861eed77..5519df6e 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -58,7 +58,10 @@ static vec4_t string_colors[] = {0.0, 0.0, 1.0, 1.0}, // blue {0.0, 1.0, 1.0, 1.0}, // cyan {1.0, 0.0, 1.0, 1.0}, // magenta - {1.0, 1.0, 1.0, 1.0} // white + {1.0, 1.0, 1.0, 1.0}, // white + // [515]'s BX_COLOREDTEXT extension + {1.0, 1.0, 1.0, 0.5}, // half transparent + {0.5, 0.5, 0.5, 1.0} // half brightness // Black's color table //{1.0, 1.0, 1.0, 1.0}, //{1.0, 0.0, 0.0, 1.0}, diff --git a/prvm_cmds.c b/prvm_cmds.c index 9930c331..e06c23f7 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1448,7 +1448,7 @@ void VM_fopen(void) modestring = "wb"; break; default: - Con_Printf("VM_fopen: %s no such mode %i (valid: 0 = read, 1 = append, 2 = write)\n", PRVM_NAME, mode); + Con_Printf("VM_fopen: %s: no such mode %i (valid: 0 = read, 1 = append, 2 = write)\n", PRVM_NAME, mode); PRVM_G_FLOAT(OFS_RETURN) = -3; return; } @@ -1461,13 +1461,13 @@ void VM_fopen(void) if (VM_FILES[filenum] == NULL) { if (developer.integer) - Con_Printf("fopen: %s mode %s failed\n", filename, modestring); + Con_Printf("VM_fopen: %s: %s mode %s failed\n", PRVM_NAME, filename, modestring); PRVM_G_FLOAT(OFS_RETURN) = -1; } else { if (developer.integer) - Con_Printf("fopen: %s mode %s opened as #%i\n", filename, modestring, filenum); + Con_Printf("VM_fopen: %s: %s mode %s opened as #%i\n", PRVM_NAME, filename, modestring, filenum); PRVM_G_FLOAT(OFS_RETURN) = filenum; } } @@ -1498,7 +1498,7 @@ void VM_fclose(void) return; } if (developer.integer) - Con_Printf("fclose #%i\n", filenum); + Con_Printf("VM_fclose: %s: #%i closed\n", PRVM_NAME, filenum); FS_Close(VM_FILES[filenum]); VM_FILES[filenum] = NULL; } diff --git a/sv_main.c b/sv_main.c index 4b43a899..63dd5a81 100644 --- a/sv_main.c +++ b/sv_main.c @@ -2209,7 +2209,7 @@ void SV_VM_Setup(void) prog->load_edict = SV_VM_CB_LoadEdict; prog->init_cmd = VM_SV_Cmd_Init; prog->reset_cmd = VM_SV_Cmd_Reset; - prog->error_cmd = NULL; // change this + prog->error_cmd = Host_Error; // TODO: add a requiredfuncs list (ask LH if this is necessary at all) PRVM_LoadProgs( sv_progs.string, 0, NULL, REQFIELDS, reqfields );