summaryrefslogtreecommitdiffhomepage
path: root/src/alias.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-07-16 16:37:25 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-07-23 19:02:10 +0100
commit8c8680ad112f3ad1360aa5547392119ed4de6581 (patch)
tree66e4a6f650693dedf20246d083492153724aae10 /src/alias.c
parent5b801b6934bf8361af4cee7556351a7fd43150fa (diff)
Add keybind lookup code
Also centralise NEXT_INSN macro, into its own header at least for now.
Diffstat (limited to 'src/alias.c')
-rw-r--r--src/alias.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/alias.c b/src/alias.c
index 9d53e69..3605800 100644
--- a/src/alias.c
+++ b/src/alias.c
@@ -25,6 +25,7 @@
#include "gametype.h"
#include "mem.h"
#include "x86.h"
+#include "x86util.h"
struct alias **_alias_head;
@@ -68,16 +69,6 @@ DEF_CCMD_HERE(sst_alias_clear, "Remove all command aliases", 0) {
alias_nuke();
}
-// XXX: same as in demorec, might want some abstraction for this
-#define NEXT_INSN(p, tgt) do { \
- int _len = x86_len(p); \
- if (_len == -1) { \
- errmsg_errorx("unknown or invalid instruction looking for %s", tgt); \
- return false; \
- } \
- (p) += _len; \
-} while (0)
-
static bool find_alias_head(con_cmdcb alias_cb) {
#ifdef _WIN32
for (uchar *p = (uchar *)alias_cb; p - (uchar *)alias_cb < 64;) {