mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-29 16:31:43 +00:00
- added an intermediate data structure to decouple the rendering from the immediate map data.
This will be needed for sectors consisting of disjoint parts and for providing some help with addressing rendering anomalies
This commit is contained in:
parent
8003ab6fa3
commit
30b1b046e4
7 changed files with 152 additions and 31 deletions
31
source/core/rendering/hw_sections.h
Normal file
31
source/core/rendering/hw_sections.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include "build.h"
|
||||
|
||||
struct SectionLine
|
||||
{
|
||||
int16_t section;
|
||||
int16_t partnersection;
|
||||
int16_t startpoint;
|
||||
int16_t endpoint;
|
||||
int16_t wall;
|
||||
int16_t partner;
|
||||
int16_t point2index;
|
||||
};
|
||||
|
||||
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.
|
||||
TArray<int16_t> lines;
|
||||
};
|
||||
|
||||
// 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();
|
Loading…
Add table
Add a link
Reference in a new issue