From ad908070a7a16d2f4783c01d75b92ab9de2040e6 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 13 Jun 2012 23:13:20 +0000 Subject: [PATCH] a.m32: new state "collect_ceilsky_sectors" collecting parallaxed ceilings. git-svn-id: https://svn.eduke32.com/eduke32@2754 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/samples/a.m32 | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/samples/a.m32 b/polymer/eduke32/samples/a.m32 index 018da9f12..6144e55da 100644 --- a/polymer/eduke32/samples/a.m32 +++ b/polymer/eduke32/samples/a.m32 @@ -492,7 +492,7 @@ endevent gamevar ohlsecs 0 0 gamearray collectedsectors MAXSECTORS // shared with 'old-highlighted sectors' -defstate try_nextsector +defstate try_nextsector_teleporting var nexts set nexts RETURN @@ -507,6 +507,13 @@ defstate try_nextsector } ends +defstate try_nextsector_ceilingsky + ifand sector[RETURN].ceilingstat 1 + set RETURN 1 + else + set RETURN 0 +ends + // save or restore highlighted sectors defstate save_restore_hlsectors "Save/restore hl. sectors" @@ -540,7 +547,26 @@ defstate collect_teleporting_sectors // (sec) set ohlsecs 0 // reset old hl'd sectors - collectsectors collectedsectors sec numsects try_nextsector + collectsectors collectedsectors sec numsects try_nextsector_teleporting + for i range numsects + sethighlightsector collectedsectors[i] 1 +ends + +// XXX: CODEDUP +defstate collect_ceilsky_sectors // (sec) + "Collect sky ceilings" + var numsects + + set numsects numsectors, sub numsects 1 + ifinteractive + { + getnumberfromuser sec "starting sectnum: " numsects 8 + ifl sec 0, return + } + + set ohlsecs 0 // reset old hl'd sectors + + collectsectors collectedsectors sec numsects try_nextsector_ceilingsky for i range numsects sethighlightsector collectedsectors[i] 1 ends