mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 08:11:10 +02:00
Added multiplayer page.
Fixed numerous bugs with the alpha.
This commit is contained in:
@@ -320,7 +320,7 @@ void idGameLocal::Init( void ) {
|
||||
botItemTable = FindEntityDef("bot_itemtable", false);
|
||||
if (botItemTable == NULL)
|
||||
{
|
||||
common->FatalError("Failed to find bot_itemtable decl!\n");
|
||||
common->Warning("Failed to find bot_itemtable decl!\n");
|
||||
}
|
||||
|
||||
// init all the bot systems.
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommand>D:\projects\Doom3\Doom3.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>+set r_fullscreen 0 +set r_mode 9 +set sv_pure 0</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>+set r_fullscreen 0 +set r_mode 9 +set sv_pure 0 +set fs_game e3</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>D:\projects\Doom3</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerCommandArgumentsHistory>+set r_fullscreen 1 +set r_mode 9|+set r_fullscreen 1 +set r_mode 11|+set r_fullscreen0 +set r_mode 9|+set r_fullscreen 0 +set r_mode 9|+set r_fullscreen 0 +set r_mode 9 +set sv_pure 0|</LocalDebuggerCommandArgumentsHistory>
|
||||
<LocalDebuggerCommandArgumentsHistory>+set r_fullscreen 1 +set r_mode 11|+set r_fullscreen0 +set r_mode 9|+set r_fullscreen 0 +set r_mode 9|+set r_fullscreen 0 +set r_mode 9 +set sv_pure 0|+set r_fullscreen 0 +set r_mode 9 +set sv_pure 0 +set fs_game e3|</LocalDebuggerCommandArgumentsHistory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Q4 Debug|x64'">
|
||||
<LocalDebuggerCommand>D:\projects\Doom3\Quake4.exe</LocalDebuggerCommand>
|
||||
|
||||
@@ -257,6 +257,7 @@ public:
|
||||
public:
|
||||
static void MakeNameCanonical(const char* name, char* result, int maxLength);
|
||||
idDeclLocal* FindTypeWithoutParsing(declType_t type, const char* name, bool makeDefault = true);
|
||||
int GetDeclFilePriority(const idDeclFile* declFile) const;
|
||||
|
||||
idDeclType* GetDeclType(int type) const { return declTypes[type]; }
|
||||
const idDeclFile* GetImplicitDeclFile(void) const { return &implicitDecls; }
|
||||
@@ -716,15 +717,24 @@ int idDeclFile::LoadAndParse() {
|
||||
|
||||
declType_t identifiedType = DECL_MAX_TYPES;
|
||||
|
||||
if ( token.Icmp( "clampTable" ) == 0 || token.Icmp( "snapTable" ) == 0 || token.Icmp( "soundtable" ) == 0 ) {
|
||||
identifiedType = DECL_TABLE;
|
||||
}
|
||||
|
||||
// get the decl type from the type name
|
||||
numTypes = declManagerLocal.GetNumDeclTypes();
|
||||
for (i = 0; i < numTypes; i++) {
|
||||
idDeclType* typeInfo = declManagerLocal.GetDeclType(i);
|
||||
if (typeInfo && typeInfo->typeName.Icmp(token) == 0) {
|
||||
identifiedType = (declType_t)typeInfo->type;
|
||||
break;
|
||||
if ( identifiedType == DECL_MAX_TYPES ) {
|
||||
for (i = 0; i < numTypes; i++) {
|
||||
idDeclType* typeInfo = declManagerLocal.GetDeclType(i);
|
||||
if (typeInfo && typeInfo->typeName.Icmp(token) == 0) {
|
||||
identifiedType = (declType_t)typeInfo->type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
i = 0;
|
||||
}
|
||||
|
||||
if (i >= numTypes) {
|
||||
|
||||
@@ -813,11 +823,29 @@ int idDeclFile::LoadAndParse() {
|
||||
newDecl = declManagerLocal.FindTypeWithoutParsing(identifiedType, name, false);
|
||||
if (newDecl) {
|
||||
// update the existing copy
|
||||
if (newDecl->sourceFile != this || newDecl->redefinedInReload) {
|
||||
if (newDecl->sourceFile == this && newDecl->redefinedInReload) {
|
||||
src.Warning("%s '%s' previously defined at %s:%i", declManagerLocal.GetDeclNameFromType(identifiedType),
|
||||
name.c_str(), newDecl->sourceFile->fileName.c_str(), newDecl->sourceLine);
|
||||
continue;
|
||||
}
|
||||
if (newDecl->sourceFile != this) {
|
||||
if (declManagerLocal.GetDeclFilePriority(this) < declManagerLocal.GetDeclFilePriority(newDecl->sourceFile)) {
|
||||
src.Warning("%s '%s' previously defined at %s:%i", declManagerLocal.GetDeclNameFromType(identifiedType),
|
||||
name.c_str(), newDecl->sourceFile->fileName.c_str(), newDecl->sourceLine);
|
||||
continue;
|
||||
}
|
||||
|
||||
idDeclLocal** prev = &newDecl->sourceFile->decls;
|
||||
while (*prev) {
|
||||
if (*prev == newDecl) {
|
||||
*prev = newDecl->nextInFile;
|
||||
break;
|
||||
}
|
||||
prev = &(*prev)->nextInFile;
|
||||
}
|
||||
newDecl->nextInFile = this->decls;
|
||||
this->decls = newDecl;
|
||||
}
|
||||
if (newDecl->declState != DS_UNPARSED) {
|
||||
reparse = true;
|
||||
}
|
||||
@@ -1364,30 +1392,15 @@ void idDeclManagerLocal::RegisterDeclType(const char* typeName, declType_t type,
|
||||
RegisterDeclSubFolder
|
||||
===================
|
||||
*/
|
||||
// jmarshall
|
||||
void idDeclManagerLocal::RegisterDeclSubFolder(const char* folder, const char* extension, idList<idStr>& fileList) {
|
||||
// Find all
|
||||
{
|
||||
idFileList* list = fileSystem->ListFiles(folder, extension, true);
|
||||
idFileList* list = fileSystem->ListFilesTree(folder, extension, false);
|
||||
|
||||
for (int d = 0; d < list->GetNumFiles(); d++)
|
||||
{
|
||||
fileList.Append(va("%s/%s", folder, list->GetFile(d)));
|
||||
}
|
||||
|
||||
fileSystem->FreeFileList(list);
|
||||
for (int i = 0; i < list->GetNumFiles(); i++) {
|
||||
fileList.Append(list->GetFile(i));
|
||||
}
|
||||
|
||||
idFileList* dirList = fileSystem->ListFiles(folder, "/", true);
|
||||
for (int i = 0; i < dirList->GetNumFiles(); i++)
|
||||
{
|
||||
idStr dir = va("%s/%s", folder, dirList->GetFile(i));
|
||||
RegisterDeclSubFolder(dir, extension, fileList);
|
||||
}
|
||||
|
||||
fileSystem->FreeFileList(dirList);
|
||||
fileSystem->FreeFileList(list);
|
||||
}
|
||||
// jmarshall end
|
||||
|
||||
/*
|
||||
===================
|
||||
@@ -1425,7 +1438,7 @@ void idDeclManagerLocal::RegisterDeclFolder(const char* folder, const char* exte
|
||||
// jmarshall end
|
||||
|
||||
// load and parse decl files
|
||||
for (i = 0; i < fileList.Num(); i++) {
|
||||
for (i = fileList.Num() - 1; i >= 0; i--) {
|
||||
// jmarshall
|
||||
//fileName = declFolder->folder + "/" + fileList[ i ];
|
||||
fileName = fileList[i];
|
||||
@@ -1448,6 +1461,25 @@ void idDeclManagerLocal::RegisterDeclFolder(const char* folder, const char* exte
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
idDeclManagerLocal::GetDeclFilePriority
|
||||
===================
|
||||
*/
|
||||
int idDeclManagerLocal::GetDeclFilePriority(const idDeclFile* declFile) const {
|
||||
if (declFile == &implicitDecls) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < loadedFiles.Num(); i++) {
|
||||
if (loadedFiles[i] == declFile) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
idDeclManagerLocal::GetChecksum
|
||||
@@ -3124,4 +3156,4 @@ const rvDeclEffect* idDeclManagerLocal::EffectByIndex(int index, bool forceParse
|
||||
return (const rvDeclEffect*)DeclByIndex(DECL_EFFECT, index, forceParse);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -121,6 +121,13 @@ bool idDeclTable::Parse(const char* text, const int textLength) {
|
||||
snap = false;
|
||||
clamp = false;
|
||||
|
||||
if ( !idStr::Icmpn( text, "snapTable", 9 ) ) {
|
||||
snap = true;
|
||||
}
|
||||
else if ( !idStr::Icmpn( text, "clampTable", 10 ) ) {
|
||||
clamp = true;
|
||||
}
|
||||
|
||||
#ifdef QUAKE4
|
||||
minValue = idMath::INFINITY;
|
||||
maxValue = -1.0e30f;
|
||||
@@ -179,6 +186,45 @@ bool idDeclTable::Parse(const char* text, const int textLength) {
|
||||
}
|
||||
|
||||
}
|
||||
else if ( token.type == TT_NUMBER || token == "." || token == "-" ) {
|
||||
src.UnreadToken( &token );
|
||||
|
||||
while ( 1 ) {
|
||||
bool errorFlag;
|
||||
|
||||
v = src.ParseFloat( &errorFlag );
|
||||
if ( errorFlag ) {
|
||||
MakeDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
values.Append( v );
|
||||
|
||||
#ifdef QUAKE4
|
||||
if ( v < minValue ) {
|
||||
minValue = v;
|
||||
}
|
||||
if ( v > maxValue ) {
|
||||
maxValue = v;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !src.ReadToken( &token ) ) {
|
||||
break;
|
||||
}
|
||||
if ( token == "}" ) {
|
||||
break;
|
||||
}
|
||||
if ( token == "," ) {
|
||||
continue;
|
||||
}
|
||||
src.Warning( "expected comma or brace" );
|
||||
MakeDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else {
|
||||
src.Warning("unknown token '%s'", token.c_str());
|
||||
MakeDefault();
|
||||
|
||||
@@ -487,6 +487,23 @@ static infoParm_t infoParms[] = {
|
||||
|
||||
static const int numInfoParms = sizeof(infoParms) / sizeof(infoParms[0]);
|
||||
|
||||
/*
|
||||
===============
|
||||
idMaterial::ApplySurfaceParm
|
||||
|
||||
Alpha E3 materials commonly use the Quake/id Tech 3-style
|
||||
"surfaceparm <flag>" wrapper instead of Doom 3's direct material flags.
|
||||
===============
|
||||
*/
|
||||
static bool ApplySurfaceParm( idMaterial *material, idToken *token, materialCoverage_t &coverage ) {
|
||||
if ( !token->Icmp( "trans" ) ) {
|
||||
coverage = MC_TRANSLUCENT;
|
||||
return true;
|
||||
}
|
||||
|
||||
return material->CheckSurfaceParm( token );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
@@ -2797,16 +2814,37 @@ void idMaterial::ParseMaterial(idLexer& src) {
|
||||
src.SkipRestOfLine();
|
||||
continue;
|
||||
}
|
||||
else if ( !token.Icmp( "qer_trans" ) ) {
|
||||
src.SkipRestOfLine();
|
||||
continue;
|
||||
}
|
||||
// description
|
||||
else if (!token.Icmp("description")) {
|
||||
src.ReadTokenOnLine(&token);
|
||||
desc = token.c_str();
|
||||
continue;
|
||||
}
|
||||
else if ( !token.Icmp( "surfaceparm" ) ) {
|
||||
if ( src.ReadTokenOnLine( &token ) && ApplySurfaceParm( this, &token, coverage ) ) {
|
||||
src.SkipRestOfLine();
|
||||
continue;
|
||||
}
|
||||
src.Warning( "unknown surfaceparm '%s' in '%s'", token.c_str(), GetName() );
|
||||
src.SkipRestOfLine();
|
||||
continue;
|
||||
}
|
||||
// check for the surface / content bit flags
|
||||
else if (CheckSurfaceParm(&token)) {
|
||||
continue;
|
||||
}
|
||||
else if ( !token.Icmp( "nodraw" ) ) {
|
||||
SetMaterialFlag( MF_NOSHADOWS );
|
||||
continue;
|
||||
}
|
||||
else if ( !token.Icmp( "trans" ) ) {
|
||||
coverage = MC_TRANSLUCENT;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// polygonOffset
|
||||
|
||||
@@ -563,6 +563,8 @@ public:
|
||||
//BSM Nerve: Added for material editor
|
||||
bool Save(const char* fileName = NULL);
|
||||
|
||||
bool CheckSurfaceParm(idToken* token);
|
||||
|
||||
// returns the internal image name for stage 0, which can be used
|
||||
// for the renderer CaptureRenderToImage() call
|
||||
// I'm not really sure why this needs to be virtual...
|
||||
@@ -899,7 +901,6 @@ private:
|
||||
void ParseStage(idLexer& src, const textureRepeat_t trpDefault = TR_REPEAT);
|
||||
void ParseDeform(idLexer& src);
|
||||
void ParseDecalInfo(idLexer& src);
|
||||
bool CheckSurfaceParm(idToken* token);
|
||||
int GetExpressionConstant(float f);
|
||||
int GetExpressionTemporary(void);
|
||||
expOp_t* GetExpressionOp(void);
|
||||
|
||||
Reference in New Issue
Block a user