mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[gamecode] Improve hops instruction readability
This commit is contained in:
parent
74b7e0a35b
commit
727b490a0c
2 changed files with 13 additions and 4 deletions
|
@ -221,7 +221,7 @@ hops_formats = {
|
|||
"opcode": "OP_HOPS",
|
||||
"mnemonic": "hops",
|
||||
"opname": "hops",
|
||||
"format": "%Ga<%Hb>, %gc",
|
||||
"format": "%Hb %Ga, %gc",
|
||||
"widths": "-1, 0, 1",
|
||||
"types": "ev_void, ev_short, ev_void",
|
||||
}
|
||||
|
|
|
@ -1205,11 +1205,20 @@ extend_string (pr_debug_data_t *data, pr_uint_t ext)
|
|||
static const char *
|
||||
hop_string (pr_debug_data_t *data, pr_uint_t hop)
|
||||
{
|
||||
progs_t *pr = data->pr;
|
||||
prdeb_resources_t *res = pr->pr_debug_resources;
|
||||
static const char *hop_string[] = {
|
||||
"&", "|", "^", "+",
|
||||
"!&", "!|", "!^", "+",
|
||||
"and", "or", "xor", "add",
|
||||
"nad", "nor", "xnor", "add",
|
||||
};
|
||||
return hop_string[hop & 7];
|
||||
static const char *type_string[2][8] = {
|
||||
{"I", "I", "I", "I", "I", "I", "I", "F"},
|
||||
{"L", "L", "L", "L", "L", "L", "L", "D"},
|
||||
};
|
||||
return va (res->va, "%s.%s{%d}",
|
||||
hop_string[hop & 7],
|
||||
type_string[(hop >> 5) & 1][hop & 7],
|
||||
((hop >> 3) & 3) + 1);
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
|
Loading…
Reference in a new issue