2021-05-03 00:04:36 +02:00
# pragma once
# include "build.h"
struct SectionLine
{
2021-12-05 21:18:55 +01:00
int section ;
int partnersection ;
int startpoint ;
int endpoint ;
int wall ;
int partner ;
int point2index ;
2021-05-03 00:04:36 +02:00
} ;
struct Section
{
int sector ;
// this is the whole point of sections - instead of just having a start index and count, we have an explicit list of lines that's a lot easier to change when needed.
2021-12-05 21:26:34 +01:00
TArray < int > lines ;
2021-05-03 00:04:36 +02:00
} ;
// giving 25% more may be a bit high as normally this should be small numbers only.
extern SectionLine sectionLines [ MAXWALLS + ( MAXWALLS > > 2 ) ] ;
extern Section sections [ MAXSECTORS + ( MAXSECTORS > > 2 ) ] ;
extern TArray < int > sectionspersector [ MAXSECTORS ] ; // reverse map, mainly for the automap
extern int numsections ;
extern int numsectionlines ;
void hw_BuildSections ( ) ;
2021-05-03 17:48:35 +02:00
void hw_SetSplitSector ( int sector , int startpos , int endpos ) ;
2021-05-23 17:06:47 +02:00
void hw_ClearSplitSector ( ) ;