X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=progs.h;h=cd692f51dd33640cc3cbcb5c16ff8a438f56c2bb;hb=182f5dd46097dc11b3643dc2376b4dd6a4fa42c7;hp=394fc8809689ef1df6b3c61b5dce47f7913c12dd;hpb=9c1150cfadf8e3210e6e102e9b1c10e6f27678c7;p=xonotic%2Fdarkplaces.git diff --git a/progs.h b/progs.h index 394fc880..cd692f51 100644 --- a/progs.h +++ b/progs.h @@ -57,13 +57,9 @@ typedef struct edict_engineprivate_s // we should avoid extensive checking on entities already encountered int areagridmarknumber; - // old entity protocol, not used -#ifdef QUAKEENTITIES + // PROTOCOL_QUAKE // baseline values entity_state_t baseline; - // LordHavoc: previous frame - entity_state_t deltabaseline; -#endif // LordHavoc: gross hack to make floating items still work int suspendedinairflag; @@ -93,6 +89,8 @@ extern int eval_button5; extern int eval_button6; extern int eval_button7; extern int eval_button8; +extern int eval_buttonuse; +extern int eval_buttonchat; extern int eval_glow_size; extern int eval_glow_trail; extern int eval_glow_color; @@ -127,6 +125,14 @@ extern int eval_light_lev; extern int eval_color; extern int eval_style; extern int eval_pflags; +extern int eval_cursor_active; +extern int eval_cursor_screen; +extern int eval_cursor_trace_start; +extern int eval_cursor_trace_endpos; +extern int eval_cursor_trace_ent; +extern int eval_colormod; +extern int eval_playermodel; +extern int eval_playerskin; #define GETEDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (eval_t *)((qbyte *)ed->v + fieldoffset) : NULL) @@ -153,9 +159,14 @@ extern int pr_edictareasize; // LordHavoc: for bounds checking //============================================================================ void PR_Init (void); +void PR_Shutdown (void); void PR_ExecuteProgram (func_t fnum, const char *errormessage); -void PR_LoadProgs (void); +void PR_LoadProgs (const char *progsname); + +void *PR_Alloc (size_t buffersize); +void PR_Free (void *buffer); +void PR_FreeAll (void); void PR_Profile_f (void); @@ -171,7 +182,7 @@ void ED_ClearEdict (edict_t *e); char *ED_NewString (const char *string); // returns a copy of the string allocated from the server's string heap -void ED_Print (edict_t *ed); +void ED_Print(edict_t *ed); void ED_Write (qfile_t *f, edict_t *ed); const char *ED_ParseEdict (const char *data, edict_t *ent); @@ -185,7 +196,7 @@ edict_t *EDICT_NUM_ERROR(int n, char *filename, int fileline); #define EDICT_NUM_UNSIGNED(n) (((n) < sv.max_edicts) ? sv.edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__)) //int NUM_FOR_EDICT_ERROR(edict_t *e); -#define NUM_FOR_EDICT(e) ((edict_t *)(e) - sv.edicts) +#define NUM_FOR_EDICT(e) ((int)((edict_t *)(e) - sv.edicts)) //int NUM_FOR_EDICT(edict_t *e); #define NEXT_EDICT(e) ((e) + 1) @@ -230,8 +241,8 @@ void PR_Execute_ProgsLoaded(void); void ED_PrintEdicts (void); void ED_PrintNum (int ent); -#define PR_GetString(num) (pr_strings + num) -#define PR_SetString(s) ((int) (s) ? (s - pr_strings) : 0) +#define PR_GetString(num) (pr_strings + num) +#define PR_SetString(s) ((s) != NULL ? (int) (s - pr_strings) : 0) #endif