]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
-Added support for 515]'s BX_COLOREDTEXT extension.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 Jun 2005 16:42:43 +0000 (16:42 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 Jun 2005 16:42:43 +0000 (16:42 +0000)
-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

cl_screen.c
prvm_cmds.c
sv_main.c

index 861eed77ccf6b58959142ea896573e859b682d71..5519df6e7a1349371480ddc31246fbcea8605b50 100644 (file)
@@ -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},
index 9930c3318d551dc3844856476b4366799ec9dee4..e06c23f75a94a13390c4c05defba8f4864362633 100644 (file)
@@ -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;
 }
index 4b43a8997c82529f5a9ab7d3432f8a400bd67812..63dd5a81d7767e23814306232899d9243184ce02 100644 (file)
--- 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 );