From 9d0916b6b7f0ae4ba2ce2cf75903b98de40048c6 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 27 Aug 2016 01:40:15 +0000 Subject: [PATCH] Mapster32: add home/end modifier keys to 3d mode slope keys ([ and ]), plus a third increment modifier (home and end at the same time) git-svn-id: https://svn.eduke32.com/eduke32@5823 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/astub.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 05e4df0d2..dd112a35b 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -5212,7 +5212,9 @@ static void Keys3d(void) } - if (keystatus[KEYSC_HOME]) + if (keystatus[KEYSC_HOME] && keystatus[KEYSC_END]) + updownunits = 128; + else if (keystatus[KEYSC_HOME]) updownunits = 256; else if (keystatus[KEYSC_END]) updownunits = 512; @@ -5455,7 +5457,13 @@ static void Keys3d(void) if ((bstatus&(4|2|1))==4 && !unrealedlook) //PK Bsprintf(tempbuf,"VIEW"); else if ((bstatus&(2|1))==2) - Bsprintf(tempbuf,"Z%s", keystatus[KEYSC_HOME]?" 256":keystatus[KEYSC_END]?" 512":""); + Bsprintf(tempbuf, "Z%s", keystatus[KEYSC_HOME] && keystatus[KEYSC_END] + ? " 128" + : keystatus[KEYSC_HOME] + ? " 256" + : keystatus[KEYSC_END] + ? " 512" + : ""); if ((bstatus&(2|1))==1 || (keystatus[KEYSC_SPACE])) Bsprintf(tempbuf,"LOCK"); @@ -5863,8 +5871,18 @@ static void Keys3d(void) // ---------- i = 512; - if (keystatus[KEYSC_RSHIFT]) i = 8; - if (keystatus[KEYSC_LSHIFT]) i = 1; + + if (keystatus[KEYSC_RSHIFT]) + i = 8; + else if (keystatus[KEYSC_LSHIFT]) + i = 1; + else if (keystatus[KEYSC_HOME] && keystatus[KEYSC_END]) + i = 64; + else if (keystatus[KEYSC_HOME]) + i = 128; + else if (keystatus[KEYSC_END]) + i = 256; + mouseaction=0; if (eitherCTRL && !eitherSHIFT && (bstatus&1) && AIMING_AT_CEILING_OR_FLOOR)