From c86bd80dd7d488925313ddb9383d13afa2ec99f8 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 8 Mar 2015 07:57:28 +0000 Subject: [PATCH] C-CON: Add read-only userdef members "gametypeflags" and "m_gametypeflags", which return GametypeFlags[ud.coop] and GametypeFlags[ud.m_coop] respectively. git-svn-id: https://svn.eduke32.com/eduke32@5044 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 2 ++ polymer/eduke32/source/gamedef.h | 2 ++ polymer/eduke32/source/gamestructures.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index e29693149..45f6c32fa 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1143,6 +1143,8 @@ const memberlabel_t UserdefsLabels[]= { "textscale", USERDEFS_TEXTSCALE, 0, 0 }, { "runkey_mode", USERDEFS_RUNKEY_MODE, 0, 0 }, { "musictoggle", USERDEFS_MUSICTOGGLE, 0, 0 }, + { "gametypeflags", USERDEFS_GAMETYPEFLAGS, 0, 0 }, + { "m_gametypeflags", USERDEFS_M_GAMETYPEFLAGS, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index cdb88bd28..ccbe5f844 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -438,6 +438,8 @@ enum UserdefsLabel_t USERDEFS_USEVOXELS, USERDEFS_USEHIGHTILE, USERDEFS_USEMODELS, + USERDEFS_GAMETYPEFLAGS, + USERDEFS_M_GAMETYPEFLAGS, USERDEFS_END }; diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 12c3ecbe1..f9aa7d349 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -266,6 +266,8 @@ static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lLabelID = 0; #endif break; + case USERDEFS_GAMETYPEFLAGS: lLabelID = GametypeFlags[ud.coop]; break; + case USERDEFS_M_GAMETYPEFLAGS: lLabelID = GametypeFlags[ud.m_coop]; break; default: lLabelID = -1; break; } Gv_SetVarX(lVar2, lLabelID);