mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 17:01:03 +00:00
- extended walltype to directly manage Blood's XWALL.
Unfortunately this had to be done in the base class so that we can still maintain the walls in a global array. The tradeoffs of better abstractions would be far too costly here than the added 16 bytes to the wall struct.
This commit is contained in:
parent
6217623c24
commit
94a37dfcdc
11 changed files with 301 additions and 262 deletions
|
@ -46,6 +46,7 @@
|
|||
#include "render.h"
|
||||
#include "hw_sections.h"
|
||||
#include "interpolate.h"
|
||||
#include "games/blood/src/mapstructs.h"
|
||||
|
||||
// needed for skipping over to get the map size first.
|
||||
enum
|
||||
|
@ -58,6 +59,16 @@ enum
|
|||
wallsize7 = 32,
|
||||
};
|
||||
|
||||
// This arena stores the larger allocated game-specific extension data. Since this can be freed in bulk a memory arena is better suited than malloc.
|
||||
static FMemArena mapDataArena;
|
||||
|
||||
void walltype::allocX()
|
||||
{
|
||||
using XWALL = BLD_NS::XWALL;
|
||||
_xw = (XWALL*)mapDataArena.Alloc(sizeof(XWALL));
|
||||
memset(_xw, 0, sizeof(XWALL));
|
||||
}
|
||||
|
||||
|
||||
static void ReadSectorV7(FileReader& fr, sectortype& sect)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue