From b5bb86b8e2dc2e66bb7e38650304a6f700028f65 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 6 Jan 2015 19:56:41 +0000 Subject: [PATCH] Mapster32: make sprite duplication examples in m32script_ex.map work again. - Work around a sequencing issue (assignment of searchstat) in M32_DrawRoomsAndMasks() - When having sprites highlighted and changing shade, since r1943 change every highlighted sprite's shade if one of them is aimed at. With this revision, if SHIFT is pressed while doing that, only change the aimed at sprite's shade - a.m32: Use 'break' from a state instead of 'return'. The former may be "sticky" in a way that is not intended. Needs to be debugged later. - Update instructions in m32script_ex.map DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4880 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 14 ++++++++++++++ polymer/eduke32/package/sdk/samples/a.m32 | 2 +- .../package/sdk/samples/m32script_ex.map | Bin 52514 -> 50006 bytes polymer/eduke32/source/astub.c | 2 +- .../eduke32/source/lunatic/doc/lunacon.txt | 4 ++-- polymer/eduke32/source/m32exec.c | 1 + 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index af05c8bac..dd94c693b 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -489,14 +489,28 @@ void M32_ResetFakeRORTiles(void) void M32_DrawRoomsAndMasks(void) { + static int srchwall = -1; + VM_OnEvent(EVENT_PREDRAW3DSCREEN, -1); yax_preparedrawrooms(); drawrooms(pos.x,pos.y,pos.z,ang,horiz,cursectnum); yax_drawrooms(CallExtAnalyzeSprites, cursectnum, 0, 0); + const int osearchwall=searchwall, osearchstat=searchstat; + if (srchwall >= 0) + { + // a.m32 states 'tduprot' and 'tduplin' need searchstat to check for + // whether we've hit a sprite, but these would be only set after the + // drawmasks(). Hence this hackish workaround. + searchstat = 3; + searchwall = srchwall; + } CallExtAnalyzeSprites(0,0,0,0); + searchwall = osearchwall, searchstat=osearchstat; + drawmasks(); + srchwall = (searchstat == 3) ? searchwall : -1; M32_ResetFakeRORTiles(); #ifdef POLYMER diff --git a/polymer/eduke32/package/sdk/samples/a.m32 b/polymer/eduke32/package/sdk/samples/a.m32 index 229fe3f67..a2ba248a5 100644 --- a/polymer/eduke32/package/sdk/samples/a.m32 +++ b/polymer/eduke32/package/sdk/samples/a.m32 @@ -1121,7 +1121,7 @@ defstate respawnpreview ife showrespawn_always 0 { ifaimingsprite ife sprite[searchwall].picnum RESPAWN nullop - else break + else return } set onumtspr spritesortcnt diff --git a/polymer/eduke32/package/sdk/samples/m32script_ex.map b/polymer/eduke32/package/sdk/samples/m32script_ex.map index 87e571ee1db595642f3bc9e3731fde8b5bd20dd5..eb4dac189ad1fc3c3dff8771b6fb333c7be673fc 100644 GIT binary patch delta 3637 zcmY*cYiv|i5I%dcYrVVlE^VRE=k^NQW$jF;uyGNv;zq&>gFun*j^^iid9A zm&_cx@r}FvkULPEeJEe4)JCO7ek1uRcCX6MUWGJ8)pV^(PfDZbyY$bKMq8ISwAn2* zbk4G^CV>>H0p?T{nO{zHJt0(Oo82BffpCroan|}L&ow526)fSlko4lLH(NMBkKmt9^{EbUbv$goCIlrMyi1@nUnB%18*TGz>IkkQ zU_RF40=@}NH!h1YM&goClk)@@G7wag+YT`71wdrd$8hGJ2+dQQZTP64EcRozWMM- zUuod}HA>ZFP{Kp^La35poqB^;qc4jaNlir?G}LV zV3A3_z#N=<(Pp;>F=023G-f+=z8hidFSd~aRD57FT%+N|LpB?hY=iJS5gvZKReV-# zWuKZuIzjz{N1`RO|LrcR`N3_JrO(Oo_4y^hmsCEo1HS9d7{VrgcaTY_f%%Fy@ zYKMlnbe^r$FnK`3VXXBi-=v1P6Kp(9L)Z5_mKu#uIB6Wv(4B49(2ZN6p(}MBOOC#Y zSM(0FGo&5x+F-IaaogZ~+y!;XIYkC^r|e=5FnjKl?O2ErgSvaHG+3i>i(%X`-H4Y7 z*CgD>SP1PqPq@c~YY;9b+!EnVQ-^Zgki@-HxE8T17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%3 z0=EGpe3veU)CkXlU1F^3^^#n~9k}~g`qoJj4xk4{s^BHg;T}jte!gR>+n{{5v5t!8 zuxfQ_QJ3FwE#gIfDfEq)#?)*YYLBObqXP@f7&e@ZP&fGFuD43Y6eL_SV@#-`F*$8C zCbmPi*ELHO%48;J3T%$?q&gHg5{}IAF#J6n=N9OlkpTJ1&^sfT0}MSjf>&{Zu!rHy zh$I*x>iI z;GdJOgUpKAV@L5Cc)xF&S+f0$WcuzKPA?3LEX3?kTLV0WnHBQZn=8nxxO1uq&4Dmp Gk@)`^94+Di diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 113f70b92..75592a09e 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -5021,7 +5021,7 @@ static void Keys3d(void) { if (ASSERT_AIMING) { - if (AIMING_AT_SPRITE && (show2dsprite[searchwall>>3]&(1<<(searchwall&7)))) + if (!eitherSHIFT && AIMING_AT_SPRITE && (show2dsprite[searchwall>>3]&(1<<(searchwall&7)))) { for (i=0; i