summaryrefslogtreecommitdiff
path: root/src/engine/command.cpp
diff options
context:
space:
mode:
authorxolatile2025-08-17 18:28:28 +0200
committerxolatile2025-08-17 18:28:28 +0200
commitbffe8d11bd1dfec49280fb64a17f0ae529ac3f5d (patch)
tree9f4f7b6f5003585e5a170bd55ccaa335b8f26f90 /src/engine/command.cpp
parentbec4167d29a68efd0cd2da36143e7f1c78a119a0 (diff)
downloadxolatile-badassbug-master.tar.xz
xolatile-badassbug-master.tar.zst
Compiles, removed a lot of code, do not run it...HEADmaster
Diffstat (limited to 'src/engine/command.cpp')
-rw-r--r--src/engine/command.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/engine/command.cpp b/src/engine/command.cpp
index 5248899..20312a7 100644
--- a/src/engine/command.cpp
+++ b/src/engine/command.cpp
@@ -919,23 +919,23 @@ static void compilelookup(vector<uint> &code, const char *&p, int ltype) {
case ID_SVAR: code.add(CODE_SVAR|((ltype >= VAL_ANY ? VAL_STR : ltype)<<CODE_RET)|(id->index<<8)); goto done;
case ID_ALIAS: code.add((id->index < MAXARGS ? CODE_LOOKUPARG : CODE_LOOKUP)|((ltype >= VAL_ANY ? VAL_STR : ltype)<<CODE_RET)|(id->index<<8)); goto done;
case ID_COMMAND: {
- int comtype = CODE_COM, numargs = 0;
+ int comtype = CODE_COM;
code.add(CODE_ENTER);
for(const char *fmt = id->args; *fmt; fmt++) switch(*fmt) {
- case 's': compilestr(code, NULL, 0, true); numargs++; break;
- case 'i': compileint(code); numargs++; break;
- case 'b': compileint(code, INT_MIN); numargs++; break;
- case 'f': compilefloat(code); numargs++; break;
- case 't': compilenull(code); numargs++; break;
- case 'e': compileblock(code); numargs++; break;
- case 'r': compileident(code); numargs++; break;
- case '$': compileident(code, id); numargs++; break;
- case 'N': compileint(code, -1); numargs++; break;
+ case 's': compilestr(code, NULL, 0, true); break;
+ case 'i': compileint(code); break;
+ case 'b': compileint(code, INT_MIN); break;
+ case 'f': compilefloat(code); break;
+ case 't': compilenull(code); break;
+ case 'e': compileblock(code); break;
+ case 'r': compileident(code); break;
+ case '$': compileident(code, id); break;
+ case 'N': compileint(code, -1); break;
#ifndef STANDALONE
- case 'D': comtype = CODE_COMD; numargs++; break;
+ case 'D': comtype = CODE_COMD; break;
#endif
- case 'C': comtype = CODE_COMC; numargs = 1; goto endfmt;
- case 'V': comtype = CODE_COMV; numargs = 2; goto endfmt;
+ case 'C': comtype = CODE_COMC; goto endfmt;
+ case 'V': comtype = CODE_COMV; goto endfmt;
case '1': case '2': case '3': case '4': break;
}
endfmt: