forked from wootguy/bspguy
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed strange code in vis.cpp. Preparing to adding limits configuration.
- Loading branch information
Karaulov
committed
Nov 23, 2022
1 parent
f2ec7ff
commit a199cb0
Showing
8 changed files
with
105 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#include "bsplimits.h" | ||
|
||
|
||
unsigned int MAX_MAP_COORD=32767; // stuff breaks past this point | ||
|
||
float FLT_MAX_COORD=32767.f; | ||
float FLT_MIN_COORD=-32767.f; | ||
|
||
unsigned int MAX_MAP_MODELS=4096; | ||
unsigned int MAX_MAP_NODES=32768; | ||
unsigned int MAX_MAP_CLIPNODES=32767; | ||
unsigned int MAX_MAP_LEAVES=65536; | ||
unsigned int MAX_MAP_TEXDATA=0; | ||
unsigned int MAX_MAP_VISDATA=64 * ( 1024 * 1024 ); // 64 MB | ||
unsigned int MAX_MAP_ENTS=8192; | ||
unsigned int MAX_MAP_SURFEDGES=512000; | ||
unsigned int MAX_MAP_EDGES=256000; | ||
unsigned int MAX_MAP_TEXTURES=4096; | ||
unsigned int MAX_MAP_LIGHTDATA=64 * ( 1024 * 1024 ); // 64 MB | ||
unsigned int MAX_TEXTURE_DIMENSION=1024; | ||
unsigned int MAX_TEXTURE_SIZE=((MAX_TEXTURE_DIMENSION * MAX_TEXTURE_DIMENSION * 2 * 3) / 2); | ||
|
||
unsigned int MAX_KEY_LEN=256; // not sure if this includes the null char | ||
unsigned int MAX_VAL_LEN=4096; // not sure if this includes the null char | ||
|
||
void ResetBspLimits() | ||
{ | ||
MAX_MAP_COORD=32767; // stuff breaks past this point (leafs signed short mins/maxs breaks) | ||
|
||
FLT_MAX_COORD=32767.f; | ||
FLT_MIN_COORD=-32767.f; | ||
|
||
MAX_MAP_MODELS=4096; | ||
MAX_MAP_NODES=32768; | ||
MAX_MAP_CLIPNODES=32767; | ||
MAX_MAP_LEAVES=65536; | ||
MAX_MAP_TEXDATA=0; | ||
MAX_MAP_VISDATA=64 * ( 1024 * 1024 ); // 64 MB | ||
MAX_MAP_ENTS=8192; | ||
MAX_MAP_SURFEDGES=512000; | ||
MAX_MAP_EDGES=256000; | ||
MAX_MAP_TEXTURES=4096; | ||
MAX_MAP_LIGHTDATA=64 * ( 1024 * 1024 ); // 64 MB | ||
MAX_TEXTURE_DIMENSION=1024; | ||
MAX_TEXTURE_SIZE=((MAX_TEXTURE_DIMENSION * MAX_TEXTURE_DIMENSION * 2 * 3) / 2); | ||
|
||
MAX_KEY_LEN=256; | ||
MAX_VAL_LEN=4096; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
#define MAX_MAP_HULLS 4 | ||
#define MAX_MAP_COORD 32767 // stuff breaks past this point | ||
#pragma once | ||
#include <stdint.h> | ||
|
||
#define FLT_MAX_COORD 32767.f | ||
#define FLT_MIN_COORD -32767.f | ||
|
||
#define MAX_MAP_MODELS 4096 | ||
#define MAX_MAP_PLANES 65535 | ||
#define MAX_MAP_VERTS 65535 | ||
#define MAX_MAP_NODES 32768 | ||
#define MAX_MAP_TEXINFOS 32767 | ||
#define MAX_MAP_FACES 65535 // This ought to be 32768, otherwise faces(in world) can become invisible. --vluzacn | ||
#define MAX_MAP_CLIPNODES 32767 | ||
#define MAX_MAP_LEAVES 65536 | ||
#define MAX_MAP_MARKSURFS 65536 | ||
#define MAX_MAP_TEXDATA 0 | ||
#define MAX_MAP_VISDATA (64 * ( 1024 * 1024 )) // 64 MB | ||
#define MAX_MAP_ENTS 8192 | ||
#define MAX_MAP_SURFEDGES 512000 | ||
#define MAX_MAP_EDGES 256000 | ||
#define MAX_MAP_TEXTURES 4096 | ||
#define MAX_MAP_LIGHTDATA (64 * ( 1024 * 1024 )) // 64 MB | ||
#define MAX_TEXTURE_DIMENSION 1024 | ||
#define MAXTEXTURENAME 16 | ||
#define MIPLEVELS 4 | ||
#define MAX_TEXTURE_SIZE ((MAX_TEXTURE_DIMENSION * MAX_TEXTURE_DIMENSION * sizeof(short) * 3) / 2) | ||
#define MAX_MAP_HULLS 4 | ||
#define MAX_MAP_PLANES 65535 | ||
#define MAX_MAP_TEXINFOS 32767 // Can be 65535 if unsigned short? | ||
#define MAX_MAP_MARKSURFS 65535 | ||
#define MAX_MAP_VERTS 65535 | ||
#define MAX_MAP_FACES 65535 // (unsgined short) This ought to be 32768, otherwise faces(in world) can become invisible. --vluzacn | ||
#define MAX_KEYS_PER_ENT 128 | ||
#define MAXLIGHTMAPS 4 | ||
|
||
extern unsigned int MAX_MAP_COORD; // stuff breaks past this point | ||
|
||
#define MAX_KEYS_PER_ENT 64 // just guessing | ||
#define MAX_KEY_LEN 256 // not sure if this includes the null char | ||
#define MAX_VAL_LEN 4096 // not sure if this includes the null char | ||
extern float FLT_MAX_COORD; | ||
extern float FLT_MIN_COORD; | ||
|
||
#define MAXLIGHTMAPS 4 | ||
extern unsigned int MAX_MAP_MODELS; | ||
extern unsigned int MAX_MAP_NODES; | ||
extern unsigned int MAX_MAP_CLIPNODES; | ||
extern unsigned int MAX_MAP_LEAVES; | ||
extern unsigned int MAX_MAP_TEXDATA; | ||
extern unsigned int MAX_MAP_VISDATA; // 64 MB | ||
extern unsigned int MAX_MAP_ENTS; | ||
extern unsigned int MAX_MAP_SURFEDGES; | ||
extern unsigned int MAX_MAP_EDGES; | ||
extern unsigned int MAX_MAP_TEXTURES; | ||
extern unsigned int MAX_MAP_LIGHTDATA; // 64 MB | ||
extern unsigned int MAX_TEXTURE_DIMENSION; | ||
extern unsigned int MAX_TEXTURE_SIZE; | ||
|
||
extern unsigned int MAX_KEY_LEN; // not sure if this includes the null char | ||
extern unsigned int MAX_VAL_LEN; // not sure if this includes the null char | ||
|
||
extern void ResetBspLimits(); // reset all limits to default values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters