]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_execprogram.h
implemented vid_refreshrate cvar to specify display refresh rate in windows
[xonotic/darkplaces.git] / pr_execprogram.h
index f70f100ebeefad3cacc61e0b5fc7771765d19658..e8886c53c12c918f0b086d225b6178a2a4d8ee07 100644 (file)
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int);
+                                       Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int);
                                        return;
                                }
 #endif
-                               ptr = (prvm_eval_t *)((qbyte *)prog->edictsfields + OPB->_int);
+                               ptr = (prvm_eval_t *)((unsigned char *)prog->edictsfields + OPB->_int);
                                ptr->_int = OPA->_int;
                                break;
                        case OP_STOREP_V:
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int);
+                                       Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int);
                                        return;
                                }
 #endif
-                               ptr = (prvm_eval_t *)((qbyte *)prog->edictsfields + OPB->_int);
+                               ptr = (prvm_eval_t *)((unsigned char *)prog->edictsfields + OPB->_int);
                                ptr->vector[0] = OPA->vector[0];
                                ptr->vector[1] = OPA->vector[1];
                                ptr->vector[2] = OPA->vector[2];
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to address an invalid field (%i) in an edict\n", OPB->_int);
+                                       Host_Error("Progs attempted to address an invalid field (%i) in an edict", OPB->_int);
                                        return;
                                }
 #endif
                                        return;
                                }
                                ed = PRVM_PROG_TO_EDICT(OPA->edict);
-                               OPC->_int = (qbyte *)((int *)ed->v + OPB->_int) - (qbyte *)prog->edictsfields;
+                               OPC->_int = (unsigned char *)((int *)ed->v + OPB->_int) - (unsigned char *)prog->edictsfields;
                                break;
 
                        case OP_LOAD_F:
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int);
+                                       Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int);
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int);
+                                       Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int);
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to write to an out of bounds edict\n");
+                                       Host_Error("Progs attempted to write to an out of bounds edict");
                                        return;
                                }
 #endif
-                               ptr = (prvm_eval_t *)((qbyte *)prog->edictsfields + OPB->_int);
+                               ptr = (prvm_eval_t *)((unsigned char *)prog->edictsfields + OPB->_int);
                                ptr->_int = OPA->_int;
                                break;
                        case OP_LOAD_I:
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to read an out of bounds edict number\n");
+                                       Host_Error("Progs attempted to read an out of bounds edict number");
                                        return;
                                }
                                if (OPB->_int < 0 || OPB->_int >= progs->entityfields)
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to read an invalid field in an edict\n");
+                                       Host_Error("Progs attempted to read an invalid field in an edict");
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to write to an invalid indexed global\n");
+                                       Host_Error("Progs attempted to write to an invalid indexed global");
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to write to an invalid indexed global\n");
+                                       Host_Error("Progs attempted to write to an invalid indexed global");
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to address an out of bounds global\n");
+                                       Host_Error("Progs attempted to address an out of bounds global");
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to read an invalid indexed global\n");
+                                       Host_Error("Progs attempted to read an invalid indexed global");
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs attempted to read an invalid indexed global\n");
+                                       Host_Error("Progs attempted to read an invalid indexed global");
                                        return;
                                }
 #endif
                                        pr_xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        pr_xstatement = st - pr_statements;
-                                       Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d\n", st->b, st->c);
+                                       Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d", st->b, st->c);
                                        return;
                                }
                                break;