mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
[gamecode] Expose value_string as PR_Debug_ValueString
PR_Debug_ValueString prints the value at the given offset using the provided type to format the string. The formatted string is appended to the provided dstring.
This commit is contained in:
parent
a8a8c567a2
commit
aa41e6c4c6
2 changed files with 12 additions and 0 deletions
|
@ -1984,6 +1984,9 @@ int PR_LoadDebug (progs_t *pr);
|
|||
const char *PR_Debug_GetBaseDirectory (progs_t *pr, const char *file);
|
||||
void PR_Debug_Watch (progs_t *pr, const char *expr);
|
||||
void PR_Debug_Print (progs_t *pr, const char *expr);
|
||||
const char *PR_Debug_ValueString (progs_t *pr, pr_ptr_t offset,
|
||||
struct qfot_type_s *type,
|
||||
struct dstring_s *dstr);
|
||||
pr_auxfunction_t *PR_Debug_AuxFunction (progs_t *pr, pr_uint_t func) __attribute__((pure));
|
||||
pr_auxfunction_t *PR_Debug_MappedAuxFunction (progs_t *pr, pr_uint_t func) __attribute__((pure));
|
||||
pr_def_t *PR_Debug_LocalDefs (progs_t *pr, pr_auxfunction_t *aux_function) __attribute__((pure));
|
||||
|
|
|
@ -1168,6 +1168,15 @@ global_string (pr_debug_data_t *data, pr_ptr_t offset, qfot_type_t *type,
|
|||
return dstr->str;
|
||||
}
|
||||
|
||||
const char *
|
||||
PR_Debug_ValueString (progs_t *pr, pr_ptr_t offset, qfot_type_t *type,
|
||||
dstring_t *dstr)
|
||||
{
|
||||
pr_debug_data_t data = {pr, dstr};
|
||||
value_string (&data, type, pr->pr_globals + offset);
|
||||
return dstr->str;
|
||||
}
|
||||
|
||||
static void
|
||||
pr_debug_void_view (qfot_type_t *type, pr_type_t *value, void *_data)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue