From 501923598360ea16d734a5fac00c5b94a013ff97 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 30 Sep 2006 06:51:48 +0000 Subject: [PATCH] qstrlen git-svn-id: https://svn.eduke32.com/eduke32@305 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 2 ++ polymer/eduke32/source/gamedef.h | 15 ++++++++------- polymer/eduke32/source/gameexec.c | 12 ++++++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index e4985cd0d..ab9cfbe0e 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -443,6 +443,7 @@ char *keyw[] = { "ezshootvar", // 296 "getcurraddress", // 297 "jump", // 298 + "qstrlen", // 299 "" }; @@ -4179,6 +4180,7 @@ repeatcase: case CON_STARTLEVEL: case CON_QSTRCAT: case CON_QSTRCPY: + case CON_QSTRLEN: transmultvars(2); return 0; case CON_SETACTORANGLE: diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 0fac82f2f..a405fb8d4 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -204,7 +204,7 @@ enum playerlabels { PLAYER_MOVEMENT_LOCK, PLAYER_SOUND_PITCH, PLAYER_WEAPONSWITCH, - PLAYER_TEAM + PLAYER_TEAM }; enum userdefslabels { @@ -291,8 +291,8 @@ enum userdefslabels { USERDEFS_AUTOVOTE, USERDEFS_AUTOMSG, USERDEFS_IDPLAYERS, - USERDEFS_TEAM, - // this stuff isn't really userdef stuff, but getuserdef/setuserdef is already set up for what I want to do + USERDEFS_TEAM, + // this stuff isn't really userdef stuff, but getuserdef/setuserdef is already set up for what I want to do USERDEFS_MYX, USERDEFS_OMYX, USERDEFS_MYXVEL, @@ -748,9 +748,10 @@ enum keywords { CON_FINDNEARACTORZVAR, // 292 CON_FINDNEARSPRITEZ, // 293 CON_FINDNEARSPRITEZVAR, // 294 - CON_ZSHOOTVAR, // 295 - CON_EZSHOOTVAR, // 296 - CON_GETCURRADDRESS, // 297 - CON_JUMP, // 298 + CON_ZSHOOTVAR, // 295 + CON_EZSHOOTVAR, // 296 + CON_GETCURRADDRESS, // 297 + CON_JUMP, // 298 + CON_QSTRLEN, // 299 END }; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 7d24a1872..e9759e390 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -4293,6 +4293,18 @@ SKIPJIBS: insertspriteq(g_i); break; + case CON_QSTRLEN: + { + int i,j; + insptr++; + i=*insptr++; + j=GetGameVarID(*insptr++, g_i, g_p); + if(fta_quotes[j] != NULL) + SetGameVarID(i,Bstrlen(fta_quotes[j]),g_i,g_p); + else SetGameVarID(i,-1,g_i,g_p); + break; + } + case CON_GETPNAME: case CON_QSTRCAT: case CON_QSTRCPY: