From e8f842ac28d53388a2f24805a9444f0d040fc2dd Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 8 Feb 2015 08:04:09 +0000 Subject: [PATCH] CON: Add read-only access to ud.config.MusicToggle through the "musictoggle" member. git-svn-id: https://svn.eduke32.com/eduke32@4970 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 1 + polymer/eduke32/source/gamedef.h | 1 + polymer/eduke32/source/gamestructures.c | 1 + polymer/eduke32/source/lunatic/con_lang.lua | 1 + 4 files changed, 4 insertions(+) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index a41be68f5..d1969a717 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1125,6 +1125,7 @@ const memberlabel_t UserdefsLabels[]= { "weaponscale", USERDEFS_WEAPONSCALE, 0, 0 }, { "textscale", USERDEFS_TEXTSCALE, 0, 0 }, { "runkey_mode", USERDEFS_RUNKEY_MODE, 0, 0 }, + { "musictoggle", USERDEFS_MUSICTOGGLE, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 52874264b..3b9df58e5 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -430,6 +430,7 @@ enum UserdefsLabel_t USERDEFS_M_ORIGIN_X, USERDEFS_M_ORIGIN_Y, USERDEFS_PLAYERBEST, + USERDEFS_MUSICTOGGLE, USERDEFS_END }; diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 85f8873c3..3e2ae1431 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -252,6 +252,7 @@ static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t case USERDEFS_M_ORIGIN_X: lLabelID = ud.m_origin.x; break; case USERDEFS_M_ORIGIN_Y: lLabelID = ud.m_origin.y; break; case USERDEFS_PLAYERBEST: lLabelID = ud.playerbest; break; + case USERDEFS_MUSICTOGGLE: lLabelID = ud.config.MusicToggle; break; default: lLabelID = -1; break; } Gv_SetVarX(lVar2, lLabelID); diff --git a/polymer/eduke32/source/lunatic/con_lang.lua b/polymer/eduke32/source/lunatic/con_lang.lua index fe266a373..2da6dd438 100644 --- a/polymer/eduke32/source/lunatic/con_lang.lua +++ b/polymer/eduke32/source/lunatic/con_lang.lua @@ -875,6 +875,7 @@ local UserdefLabels = { playerbest = UDRO".playerbest", mouseflip = UDRO".mouseflip", multimode = { "1" }, + musictoggle = UDRO".config.MusicToggle", noexits = UDRO".noexits", overhead_on = UD".overhead_on", recstat = UDRO".recstat",