From 6e561cd13c20a9914b124ed188574febc843c968 Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 17:55:27 +0800 Subject: [PATCH 01/11] Font position offset is signed char char is unsigned default on arm --- renderer/Font.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderer/Font.h b/renderer/Font.h index 9bebcf1..ea974d4 100644 --- a/renderer/Font.h +++ b/renderer/Font.h @@ -67,8 +67,9 @@ class idFont { struct glyphInfo_t { byte width; // width of glyph in pixels byte height; // height of glyph in pixels - char top; // distance in pixels from the base line to the top of the glyph - char left; // distance in pixels from the pen to the left edge of the glyph + //karin: char is unsigned on arm + signed char top; // distance in pixels from the base line to the top of the glyph + signed char left; // distance in pixels from the pen to the left edge of the glyph byte xSkip; // x adjustment after rendering this glyph uint16 s; // x offset in image where glyph starts (in pixels) uint16 t; // y offset in image where glyph starts (in pixels) From 61163581244444910da1e2fa0bade25e55899df4 Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 17:56:04 +0800 Subject: [PATCH 02/11] Invalid char checking if char is unsigned on arm --- idlib/Lexer.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/idlib/Lexer.cpp b/idlib/Lexer.cpp index 5e60bfc..79b306d 100644 --- a/idlib/Lexer.cpp +++ b/idlib/Lexer.cpp @@ -290,7 +290,12 @@ int idLexer::ReadWhiteSpace( void ) { while(1) { // skip white space // SM: Don't treat negative values as whitespace (because UTF-8) - while(*idLexer::script_p <= ' ' && *idLexer::script_p >= 0) { +#if defined(__arm__) || defined(__aarch64__) //karin: char is unsigned on arm. Or compile with -fsigned-char option + while(*(const signed char *)idLexer::script_p <= ' ') +#else + while(*idLexer::script_p <= ' ' && *idLexer::script_p >= 0) +#endif + { if (!*idLexer::script_p) { return 0; } @@ -1282,7 +1287,12 @@ const char* idLexer::ReadRestOfLine(idStr& out) { break; } - if(*idLexer::script_p <= ' ') { +#if defined(__arm__) || defined(__aarch64__) //karin: char is unsigned on arm. Or compile with -fsigned-char option + if (*(const signed char *)idLexer::script_p <= ' ') +#else + if(*idLexer::script_p <= ' ') +#endif + { out += " "; } else { out += *idLexer::script_p; From 04e8c17db7bded4084aab2b1b1b77b011501d7d5 Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 17:57:36 +0800 Subject: [PATCH 03/11] Fix wide-characters on idChoiceWindow Only test on Simplified Chinese language --- ui/ChoiceWindow.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/ui/ChoiceWindow.cpp b/ui/ChoiceWindow.cpp index 3e64273..6cf10b1 100644 --- a/ui/ChoiceWindow.cpp +++ b/ui/ChoiceWindow.cpp @@ -384,6 +384,41 @@ void idChoiceWindow::UpdateChoicesAndVals( void ) { src.SetFlags( LEXFL_NOFATALERRORS | LEXFL_ALLOWPATHNAMES | LEXFL_ALLOWMULTICHARLITERALS | LEXFL_ALLOWBACKSLASHSTRINGCONCAT ); src.LoadMemory( choicesStr, choicesStr.Length(), "" ); if ( src.IsLoaded() ) { +#if 1 //def _DIII4A //karin: fix utf8 on choice widget + idStr readStr = choicesStr; + if(idStr::IsValidUTF8(readStr.c_str(), readStr.Length())) + { + int charIndex = 0; + int len = readStr.Length(); + str2 = ""; + + while( charIndex < len ) { + uint32_t textChar = readStr.UTF8Char( charIndex ); + if(textChar == ';') + { + if (str2.Length()) { + str2.StripTrailingWhitespace(); + str2 = common->GetLanguageDict()->GetString(str2); + choices.Append(str2); + str2 = ""; + } + + continue; + } + + // skin leading space chars + if(textChar != ' ' || !str2.IsEmpty()) + str2.AppendUTF8Char(textChar); + } + + if (str2.Length()) { + str2.StripTrailingWhitespace(); + choices.Append(str2); + } + } + else + { +#endif while( src.ReadToken( &token ) ) { if ( token == ";" ) { if ( str2.Length() ) { @@ -401,6 +436,9 @@ void idChoiceWindow::UpdateChoicesAndVals( void ) { str2.StripTrailingWhitespace(); choices.Append( str2 ); } +#if 1 //def _DIII4A //karin: fix utf8 on choice widget + } +#endif } latchedChoices = choicesStr.c_str(); } From 5daa3355e7df720e52baf764c5d2a5ba45545ff6 Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 18:06:40 +0800 Subject: [PATCH 04/11] DrawTextA -> DrawText for linux building --- d3xp/Game_local.cpp | 4 ++-- d3xp/Misc.cpp | 4 ++-- d3xp/ai/AI_events.cpp | 6 +++--- d3xp/bc_gunner.cpp | 8 ++++---- d3xp/bc_interestpoint.cpp | 6 +++--- d3xp/bc_repairbot.cpp | 2 +- d3xp/bc_searchnode.cpp | 2 +- d3xp/bc_vomanager.cpp | 2 +- d3xp/gamesys/SysCmds.cpp | 24 ++++++++++++------------ 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/d3xp/Game_local.cpp b/d3xp/Game_local.cpp index 94ca9cc..4f7260b 100644 --- a/d3xp/Game_local.cpp +++ b/d3xp/Game_local.cpp @@ -7797,8 +7797,8 @@ bool idGameLocal::DoOriginContainmentCheck(idEntity *ent) { #ifdef _DEBUG gameRenderWorld->DebugArrow(colorRed, ent->GetPhysics()->GetOrigin(), ent->GetPhysics()->GetAbsBounds().GetCenter(), 4, 60000); - gameRenderWorld->DrawTextA(va("%s", ent->GetName()), ent->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0, 0, 6), .12f, colorRed, mat3_default, 1, 60000); - gameRenderWorld->DrawTextA("origin is outside of brush.", ent->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0, 0, 2), .12f, colorRed, mat3_default, 1, 60000); + gameRenderWorld->DrawText(va("%s", ent->GetName()), ent->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0, 0, 6), .12f, colorRed, mat3_default, 1, 60000); + gameRenderWorld->DrawText("origin is outside of brush.", ent->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0, 0, 2), .12f, colorRed, mat3_default, 1, 60000); #endif return false; } diff --git a/d3xp/Misc.cpp b/d3xp/Misc.cpp index 40ae71d..a37cdd5 100644 --- a/d3xp/Misc.cpp +++ b/d3xp/Misc.cpp @@ -412,7 +412,7 @@ void idPathCorner::Spawn( void ) if (value <= 0) { common->Warning("pathcorner '%s' is not within an AAS-reachable area (%s).", this->GetName(), aas->GetSettings()->fileExtension.c_str()); - gameRenderWorld->DrawTextA(idStr::Format("'%s' not within AAS reachable area (%s).", this->GetName(), aas->GetSettings()->fileExtension.c_str()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, 70), 1.5f, idVec4(1, 0, 0, 1), mat3_identity, 1, 90000); + gameRenderWorld->DrawText(idStr::Format("'%s' not within AAS reachable area (%s).", this->GetName(), aas->GetSettings()->fileExtension.c_str()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, 70), 1.5f, idVec4(1, 0, 0, 1), mat3_identity, 1, 90000); gameRenderWorld->DebugArrow(colorRed, this->GetPhysics()->GetOrigin() + idVec3(0, 0, 64), this->GetPhysics()->GetOrigin(), 4, 90000); } } @@ -2428,7 +2428,7 @@ void idVacuumSeparatorEntity::Spawn() { if ( !portal ) { gameLocal.Warning("VacuumSeparator '%s' doesn't contact a portal at %.1f %.1f %.1f", this->GetName(), this->GetPhysics()->GetOrigin().x, this->GetPhysics()->GetOrigin().y, this->GetPhysics()->GetOrigin().z); //BC - gameRenderWorld->DrawTextA(va("'%s' doesn't contact a portal", this->GetName()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, 70), 0.5f, idVec4(1, 0, 0, 1), mat3_identity, 1, 90000); + gameRenderWorld->DrawText(va("'%s' doesn't contact a portal", this->GetName()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, 70), 0.5f, idVec4(1, 0, 0, 1), mat3_identity, 1, 90000); gameRenderWorld->DebugArrow(colorRed, this->GetPhysics()->GetOrigin() + idVec3(0, 0, 64), this->GetPhysics()->GetOrigin(), 4, 90000); return; } diff --git a/d3xp/ai/AI_events.cpp b/d3xp/ai/AI_events.cpp index cdac4af..ea6000d 100644 --- a/d3xp/ai/AI_events.cpp +++ b/d3xp/ai/AI_events.cpp @@ -3250,8 +3250,8 @@ void idAI::Event_GetCoverNode(void) if (developer.GetInteger() >= 2) { - gameRenderWorld->DrawTextA(va("%.1f", candidateScore), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 16), .3f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 0, 4000); - //gameRenderWorld->DrawTextA(va("%.2f ", facingDot), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 8), .2f, colorOrange, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 0, 4000); + gameRenderWorld->DrawText(va("%.1f", candidateScore), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 16), .3f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 0, 4000); + //gameRenderWorld->DrawText(va("%.2f ", facingDot), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 8), .2f, colorOrange, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 0, 4000); } if (candidateScore > bestScore) @@ -3827,7 +3827,7 @@ bool idAI::CanHitFromAnim(const char *animname, idVec3 targetPos) if (ai_debugPerception.GetInteger() > 0) { gameRenderWorld->DebugArrow(tr.fraction >= .98f ? colorGreen : colorRed, fromPos, tr.endpos, 4, 1000); - gameRenderWorld->DrawTextA(animname, fromPos, 0.07f, tr.fraction >= .98f ? colorGreen : colorRed, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 1000); + gameRenderWorld->DrawText(animname, fromPos, 0.07f, tr.fraction >= .98f ? colorGreen : colorRed, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 1000); } //gameRenderWorld->DebugArrow(colorRed, fromPos, targetPos + idVec3(0,0,-4), 1, 1000); diff --git a/d3xp/bc_gunner.cpp b/d3xp/bc_gunner.cpp index e834313..676bd63 100644 --- a/d3xp/bc_gunner.cpp +++ b/d3xp/bc_gunner.cpp @@ -834,11 +834,11 @@ void idGunnerMonster::Think(void) { if (this->lastInterest.IsValid()) { - gameRenderWorld->DrawTextA(idStr::Format("%s -- %i", this->lastInterest.GetEntity()->name.c_str(), this->lastInterestPriority), this->GetEyePosition() + idVec3(0, 0, 8), .1f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); + gameRenderWorld->DrawText(idStr::Format("%s -- %i", this->lastInterest.GetEntity()->name.c_str(), this->lastInterestPriority), this->GetEyePosition() + idVec3(0, 0, 8), .1f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); } else { - gameRenderWorld->DrawTextA("No interest", this->GetEyePosition() + idVec3(0, 0, 8), .1f, colorRed, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10); + gameRenderWorld->DrawText("No interest", this->GetEyePosition() + idVec3(0, 0, 8), .1f, colorRed, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10); } } @@ -3919,8 +3919,8 @@ void idGunnerMonster::InterestPointReact(idEntity *interestpoint, int roletype) } gameRenderWorld->DebugArrow(colorWhite, interestpoint->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength), interestpoint->GetPhysics()->GetOrigin(), 4, 30000); - gameRenderWorld->DrawTextA(idStr::Format("%s", intName.c_str()), interestpoint->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 8), .1f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 30000); - gameRenderWorld->DrawTextA(idStr::Format("priority: %d", static_cast(interestpoint)->priority), interestpoint->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 4), .1f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 30000); + gameRenderWorld->DrawText(idStr::Format("%s", intName.c_str()), interestpoint->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 8), .1f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 30000); + gameRenderWorld->DrawText(idStr::Format("priority: %d", static_cast(interestpoint)->priority), interestpoint->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 4), .1f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 30000); } interestWalkableDestination = FindValidPosition(interestpoint->GetPhysics()->GetOrigin()); diff --git a/d3xp/bc_interestpoint.cpp b/d3xp/bc_interestpoint.cpp index c3551ac..67e6531 100644 --- a/d3xp/bc_interestpoint.cpp +++ b/d3xp/bc_interestpoint.cpp @@ -183,15 +183,15 @@ void idInterestPoint::Think() } gameRenderWorld->DebugArrow(debugcolor, this->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength), this->GetPhysics()->GetOrigin(), 4, 100); - gameRenderWorld->DrawTextA(idStr::Format("%s", intName.c_str()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 16), .1f, debugcolor, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); - gameRenderWorld->DrawTextA(idStr::Format("priority: %d", this->priority), this->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 12), .1f, debugcolor, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); + gameRenderWorld->DrawText(idStr::Format("%s", intName.c_str()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 16), .1f, debugcolor, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); + gameRenderWorld->DrawText(idStr::Format("priority: %d", this->priority), this->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 12), .1f, debugcolor, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); idStr ownername; if (this->GetPhysics()->GetClipModel()->GetOwner() == NULL) ownername = "none"; else ownername = this->GetPhysics()->GetClipModel()->GetOwner()->GetName(); - gameRenderWorld->DrawTextA(idStr::Format("owner: %s", ownername.c_str()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 8), .1f, debugcolor, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); + gameRenderWorld->DrawText(idStr::Format("owner: %s", ownername.c_str()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, arrowLength + 8), .1f, debugcolor, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 100); if (this->claimant.IsValid()) diff --git a/d3xp/bc_repairbot.cpp b/d3xp/bc_repairbot.cpp index 888f1f7..da74c85 100644 --- a/d3xp/bc_repairbot.cpp +++ b/d3xp/bc_repairbot.cpp @@ -588,7 +588,7 @@ idVec3 idAI_Repairbot::AttemptGoToRepairPoint(idEntity *ent) #define REPAIRARROW_SHOWTIME 5000 #define REPAIRARROW_LENGTH 24 gameRenderWorld->DebugArrow(colorRed, _repairPos + idVec3(0, 0, REPAIRARROW_LENGTH), _repairPos, 2, REPAIRARROW_SHOWTIME); - gameRenderWorld->DrawTextA("Repairbot can't reach", _repairPos + idVec3(0, 0, REPAIRARROW_LENGTH), .2f, colorRed, mat3_default, 1, REPAIRARROW_SHOWTIME); + gameRenderWorld->DrawText("Repairbot can't reach", _repairPos + idVec3(0, 0, REPAIRARROW_LENGTH), .2f, colorRed, mat3_default, 1, REPAIRARROW_SHOWTIME); } return vec3_zero; //total fail diff --git a/d3xp/bc_searchnode.cpp b/d3xp/bc_searchnode.cpp index 529107f..7ca49b0 100644 --- a/d3xp/bc_searchnode.cpp +++ b/d3xp/bc_searchnode.cpp @@ -50,7 +50,7 @@ void idSearchNode::Spawn(void) { common->Warning("searchnode '%s' is not within an AAS-reachable area.", this->GetName()); - gameRenderWorld->DrawTextA(idStr::Format("'%s' not within AAS reachable area.", this->GetName()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, 70), 1.5f, idVec4(1, 0, 0, 1), mat3_identity, 1, 90000); + gameRenderWorld->DrawText(idStr::Format("'%s' not within AAS reachable area.", this->GetName()), this->GetPhysics()->GetOrigin() + idVec3(0, 0, 70), 1.5f, idVec4(1, 0, 0, 1), mat3_identity, 1, 90000); gameRenderWorld->DebugArrow(colorRed, this->GetPhysics()->GetOrigin() + idVec3(0, 0, 64), this->GetPhysics()->GetOrigin(), 4, 90000); } } diff --git a/d3xp/bc_vomanager.cpp b/d3xp/bc_vomanager.cpp index 7969563..4e7f029 100644 --- a/d3xp/bc_vomanager.cpp +++ b/d3xp/bc_vomanager.cpp @@ -63,7 +63,7 @@ int idVOManager::SayVO(idEntity *speaker, const char *soundname, int lineCategor drawPos.x += gameLocal.random.RandomInt(-POS_RANDVARIANCE, POS_RANDVARIANCE); drawPos.y += gameLocal.random.RandomInt(-POS_RANDVARIANCE, POS_RANDVARIANCE); drawPos.z += gameLocal.random.RandomInt(-POS_RANDVARIANCE, POS_RANDVARIANCE); - gameRenderWorld->DrawTextA(soundname, drawPos, .2f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10000); + gameRenderWorld->DrawText(soundname, drawPos, .2f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10000); } } diff --git a/d3xp/gamesys/SysCmds.cpp b/d3xp/gamesys/SysCmds.cpp index f09ca48..0f7b169 100644 --- a/d3xp/gamesys/SysCmds.cpp +++ b/d3xp/gamesys/SysCmds.cpp @@ -2871,7 +2871,7 @@ static void Cmd_ListEntitiesVisible_f(const idCmdArgs &args) gameRenderWorld->DebugArrow(colorRed, gameLocal.GetLocalPlayer()->GetEyePosition(), check->GetPhysics()->GetOrigin(), 2, 60000); - gameRenderWorld->DrawTextA(check->name.c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 4), .15f, colorRed, gameLocal.GetLocalPlayer()->viewAxis, 1, 60000); + gameRenderWorld->DrawText(check->name.c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 4), .15f, colorRed, gameLocal.GetLocalPlayer()->viewAxis, 1, 60000); count++; @@ -3085,8 +3085,8 @@ static void Cmd_EntityNumber_f(const idCmdArgs &args) { if (gameLocal.entities[tr.c.entityNum]) { - gameRenderWorld->DrawTextA(gameLocal.entities[tr.c.entityNum]->GetName(), gameLocal.entities[tr.c.entityNum]->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0,0,12), 0.3f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10000); - gameRenderWorld->DrawTextA(va("%d", tr.c.entityNum), gameLocal.entities[tr.c.entityNum]->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0,0,-12), 0.7f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10000); + gameRenderWorld->DrawText(gameLocal.entities[tr.c.entityNum]->GetName(), gameLocal.entities[tr.c.entityNum]->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0,0,12), 0.3f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10000); + gameRenderWorld->DrawText(va("%d", tr.c.entityNum), gameLocal.entities[tr.c.entityNum]->GetPhysics()->GetAbsBounds().GetCenter() + idVec3(0,0,-12), 0.7f, colorWhite, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 10000); gameRenderWorld->DebugBounds(colorGreen, gameLocal.entities[tr.c.entityNum]->GetPhysics()->GetBounds(), gameLocal.entities[tr.c.entityNum]->GetPhysics()->GetOrigin(), 10000); success = true; @@ -3342,7 +3342,7 @@ void Cmd_LocateEntityViaName(const idCmdArgs& args) idBounds entityBounds = check->GetPhysics()->GetAbsBounds(); gameRenderWorld->DebugBounds(colorGreen, entityBounds, vec3_origin, 500000); idAngles drawAngle = gameLocal.GetLocalPlayer()->viewAngles; - gameRenderWorld->DrawTextA(check->name.c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 60), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string + gameRenderWorld->DrawText(check->name.c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 60), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string common->Printf("%d. Found match: %s\n", counter+1, check->name.c_str()); counter++; @@ -3353,7 +3353,7 @@ void Cmd_LocateEntityViaName(const idCmdArgs& args) { if (check->GetEntityDefName()[0] != '\0') { - gameRenderWorld->DrawTextA(idStr::Format("entitydef: %s", check->GetEntityDefName()).c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 60), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string + gameRenderWorld->DrawText(idStr::Format("entitydef: %s", check->GetEntityDefName()).c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 60), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string } } @@ -3361,14 +3361,14 @@ void Cmd_LocateEntityViaName(const idCmdArgs& args) { if (check->GetClassname()[0] != '\0') { - gameRenderWorld->DrawTextA(idStr::Format("classname: %s", check->GetClassname()).c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 50), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string + gameRenderWorld->DrawText(idStr::Format("classname: %s", check->GetClassname()).c_str(), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 50), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string } } idStr modelname = check->spawnArgs.GetString("model"); if (modelname.Length() > 0) { - gameRenderWorld->DrawTextA(idStr::Format("model: %s", modelname.c_str()), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 40), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string + gameRenderWorld->DrawText(idStr::Format("model: %s", modelname.c_str()), check->GetPhysics()->GetOrigin() + idVec3(0, 0, 40), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 500000); //text string } @@ -3471,7 +3471,7 @@ void Cmd_DebugFuseboxCodes_f(const idCmdArgs& args) drawDir.yaw += 180; drawDir.pitch = 0; - gameRenderWorld->DrawTextA(ent->spawnArgs.GetString("code"), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 4), .5f, colorGreen, drawDir.ToMat3(), 1, 9000000); + gameRenderWorld->DrawText(ent->spawnArgs.GetString("code"), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 4), .5f, colorGreen, drawDir.ToMat3(), 1, 9000000); } } @@ -4002,7 +4002,7 @@ void TeleportToViaEntityNumber(int entityNumber) idVec3 viewUp; player->viewAngles.ToVectors(nullptr, nullptr, &viewUp); - gameRenderWorld->DrawTextA(noteEnt->locID.c_str(), noteEnt->GetPhysics()->GetOrigin() + viewUp * 8, 0.1f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 2000); + gameRenderWorld->DrawText(noteEnt->locID.c_str(), noteEnt->GetPhysics()->GetOrigin() + viewUp * 8, 0.1f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 2000); gameRenderWorld->DebugBounds(colorGreen, idBounds(idVec3(-6, -6, -6), idVec3(6, 6, 6)), noteEnt->GetPhysics()->GetOrigin(), 2000); } @@ -4047,7 +4047,7 @@ void TeleportToNote(int orderIndex) player->viewAngles.ToVectors(nullptr, nullptr, &viewUp); common->Printf("#%-2d: %s\n", gameLocal.lastDebugNoteIndex + 1, noteEnt->locID.c_str()); - gameRenderWorld->DrawTextA(noteEnt->locID.c_str(), noteEnt->GetPhysics()->GetOrigin() + viewUp * 8, 0.1f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 2000); + gameRenderWorld->DrawText(noteEnt->locID.c_str(), noteEnt->GetPhysics()->GetOrigin() + viewUp * 8, 0.1f, colorGreen, gameLocal.GetLocalPlayer()->viewAngles.ToMat3(), 1, 2000); gameRenderWorld->DebugBounds(colorGreen, idBounds(idVec3(-6, -6, -6), idVec3(6, 6, 6)), noteEnt->GetPhysics()->GetOrigin(), 2000); } @@ -4150,9 +4150,9 @@ void Cmd_DebugNotesLocate_f(const idCmdArgs& args) idAngles drawAngle = gameLocal.GetLocalPlayer()->viewAngles; drawAngle.pitch = 0; drawAngle.roll = 0; - gameRenderWorld->DrawTextA(idStr::Format("#%d", count + 1).c_str(), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 90), 1.5f, colorGreen, drawAngle.ToMat3(), 1, 90000000); //number. + gameRenderWorld->DrawText(idStr::Format("#%d", count + 1).c_str(), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 90), 1.5f, colorGreen, drawAngle.ToMat3(), 1, 90000000); //number. - gameRenderWorld->DrawTextA(stringName.c_str(), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 65), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 90000000); //text string + gameRenderWorld->DrawText(stringName.c_str(), ent->GetPhysics()->GetOrigin() + idVec3(0, 0, 65), 0.2f, colorGreen, drawAngle.ToMat3(), 1, 90000000); //text string count++; } From 21ceb9e55e7be48eb780a4642a878f9aef22995c Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 18:11:06 +0800 Subject: [PATCH 05/11] Files name case for linux building --- d3xp/Actor.h | 2 +- d3xp/Game_local.cpp | 4 ++-- d3xp/Item.cpp | 2 +- d3xp/Misc.cpp | 2 +- d3xp/Player.cpp | 2 +- d3xp/Projectile.cpp | 2 +- d3xp/bc_asteroid.cpp | 2 +- d3xp/bc_baffler.cpp | 2 +- d3xp/bc_beaconlogic.cpp | 2 +- d3xp/bc_beaconlogic.h | 2 +- d3xp/bc_camerasplice.cpp | 2 +- d3xp/bc_carepackage.cpp | 2 +- d3xp/bc_cat.cpp | 2 +- d3xp/bc_chembomb.cpp | 2 +- d3xp/bc_cryointerior.cpp | 2 +- d3xp/bc_diagnosticbox.cpp | 4 ++-- d3xp/bc_engineer.cpp | 2 +- d3xp/bc_exteriorstrut.cpp | 2 +- d3xp/bc_fireball.cpp | 2 +- d3xp/bc_flyingbarrel.cpp | 4 ++-- d3xp/bc_food.cpp | 2 +- d3xp/bc_ftl.cpp | 2 +- d3xp/bc_ftl_charger.cpp | 2 +- d3xp/bc_gunner.cpp | 2 +- d3xp/bc_highlighter.cpp | 6 +++--- d3xp/bc_highlighter.h | 2 +- d3xp/bc_idletask.cpp | 2 +- d3xp/bc_interestpoint.cpp | 2 +- d3xp/bc_keypad.cpp | 2 +- d3xp/bc_lever.cpp | 4 ++-- d3xp/bc_librarian.cpp | 2 +- d3xp/bc_lifeboat.cpp | 2 +- d3xp/bc_lifeboat_catpod.cpp | 6 +++--- d3xp/bc_meta.cpp | 4 ++-- d3xp/bc_meta.h | 2 +- d3xp/bc_moneypile.h | 2 +- d3xp/bc_oxygenbubble.cpp | 2 +- d3xp/bc_pepperbag.cpp | 2 +- d3xp/bc_pirateship.cpp | 2 +- d3xp/bc_radio.cpp | 2 +- d3xp/bc_radiocheckin.cpp | 8 ++++---- d3xp/bc_radiocheckin.h | 2 +- d3xp/bc_radiowall.cpp | 2 +- d3xp/bc_repairbot.cpp | 2 +- d3xp/bc_sabotagepoint.cpp | 4 ++-- d3xp/bc_soap.cpp | 2 +- d3xp/bc_spacemine.cpp | 2 +- d3xp/bc_spearbot.cpp | 2 +- d3xp/bc_spearprojectile.cpp | 4 ++-- d3xp/bc_spectatenode.cpp | 4 ++-- d3xp/bc_spectatetimeline.cpp | 4 ++-- d3xp/bc_stresstester.cpp | 4 ++-- d3xp/bc_trigger_confinedarea.cpp | 2 +- d3xp/bc_trigger_confinedarea.h | 2 +- d3xp/bc_trigger_deodorant.cpp | 2 +- d3xp/bc_trigger_deodorant.h | 2 +- d3xp/bc_trigger_enginewash.cpp | 2 +- d3xp/bc_trigger_enginewash.h | 2 +- d3xp/bc_trigger_gascloud.cpp | 2 +- d3xp/bc_trigger_gascloud.h | 2 +- d3xp/bc_trigger_healcloud.cpp | 2 +- d3xp/bc_trigger_healcloud.h | 2 +- d3xp/bc_trigger_sneeze.cpp | 2 +- d3xp/bc_trigger_sneeze.h | 2 +- d3xp/bc_vacuumspline.cpp | 4 ++-- d3xp/bc_vacuumspline.h | 2 +- d3xp/bc_vomanager.cpp | 4 ++-- d3xp/bc_walkietalkie.cpp | 2 +- d3xp/bc_windowseal.cpp | 2 +- d3xp/bc_yarnboard.cpp | 2 +- d3xp/gamesys/SysCmds.cpp | 2 +- d3xp/physics/Physics_Player.cpp | 2 +- 72 files changed, 91 insertions(+), 91 deletions(-) diff --git a/d3xp/Actor.h b/d3xp/Actor.h index 9950e92..bc26ef9 100644 --- a/d3xp/Actor.h +++ b/d3xp/Actor.h @@ -33,7 +33,7 @@ If you have questions concerning this license or the applicable additional terms #include "IK.h" #include "PlayerView.h" -#include "trigger.h" +#include "Trigger.h" diff --git a/d3xp/Game_local.cpp b/d3xp/Game_local.cpp index 4f7260b..489dc40 100644 --- a/d3xp/Game_local.cpp +++ b/d3xp/Game_local.cpp @@ -53,10 +53,10 @@ If you have questions concerning this license or the applicable additional terms #include "bc_ventpeek.h" #include "sw_skycontroller.h" -#include "securitycamera.h" +#include "SecurityCamera.h" #include "BrittleFracture.h" -#include "misc.h" +#include "Misc.h" #include "bc_infostation.h" #include "bc_trigger_deodorant.h" diff --git a/d3xp/Item.cpp b/d3xp/Item.cpp index 4444ff8..8aafa10 100644 --- a/d3xp/Item.cpp +++ b/d3xp/Item.cpp @@ -40,7 +40,7 @@ If you have questions concerning this license or the applicable additional terms #include "Misc.h" #include "framework/DeclEntityDef.h" -#include "worldspawn.h" +#include "WorldSpawn.h" #include "idlib/LangDict.h" #include "bc_catcage.h" diff --git a/d3xp/Misc.cpp b/d3xp/Misc.cpp index a37cdd5..94cc731 100644 --- a/d3xp/Misc.cpp +++ b/d3xp/Misc.cpp @@ -43,7 +43,7 @@ Various utility objects and functions. #include "Moveable.h" #include "SmokeParticles.h" -#include "fx.h" +#include "Fx.h" #include "Misc.h" /* diff --git a/d3xp/Player.cpp b/d3xp/Player.cpp index 24987a4..e38f4ff 100644 --- a/d3xp/Player.cpp +++ b/d3xp/Player.cpp @@ -229,7 +229,7 @@ If you have questions concerning this license or the applicable additional terms #include "bc_cryointerior.h" #include "bc_cryospawn.h" #include "bc_trashchute.h" -#include "securitycamera.h" +#include "SecurityCamera.h" #include "bc_electricalbox.h" #include "bc_skullsaver.h" #include "bc_interestpoint.h" diff --git a/d3xp/Projectile.cpp b/d3xp/Projectile.cpp index db6175a..e4caef3 100644 --- a/d3xp/Projectile.cpp +++ b/d3xp/Projectile.cpp @@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms #include "BrittleFracture.h" #include "bc_lever.h" -#include "fx.h" +#include "Fx.h" #include "bc_gunner.h" #include "bc_frobcube.h" diff --git a/d3xp/bc_asteroid.cpp b/d3xp/bc_asteroid.cpp index ccd5d61..ce031e1 100644 --- a/d3xp/bc_asteroid.cpp +++ b/d3xp/bc_asteroid.cpp @@ -1,7 +1,7 @@ #include "framework/DeclEntityDef.h" #include "SmokeParticles.h" -#include "fx.h" +#include "Fx.h" #include "bc_asteroid.h" diff --git a/d3xp/bc_baffler.cpp b/d3xp/bc_baffler.cpp index 4221589..83d2058 100644 --- a/d3xp/bc_baffler.cpp +++ b/d3xp/bc_baffler.cpp @@ -9,7 +9,7 @@ #include "WorldSpawn.h" #include "SmokeParticles.h" #include "framework/DeclEntityDef.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_baffler.h" diff --git a/d3xp/bc_beaconlogic.cpp b/d3xp/bc_beaconlogic.cpp index 475457e..7b527c1 100644 --- a/d3xp/bc_beaconlogic.cpp +++ b/d3xp/bc_beaconlogic.cpp @@ -1,7 +1,7 @@ #include "script/Script_Thread.h" #include "framework/DeclEntityDef.h" -#include "player.h" +#include "Player.h" #include "bc_meta.h" #include "bc_lifeboat.h" #include "bc_beaconlogic.h" diff --git a/d3xp/bc_beaconlogic.h b/d3xp/bc_beaconlogic.h index 27b5e77..8f71d41 100644 --- a/d3xp/bc_beaconlogic.h +++ b/d3xp/bc_beaconlogic.h @@ -1,5 +1,5 @@ #include "Misc.h" -#include "target.h" +#include "Target.h" class idBeaconLogic : public idEntity { diff --git a/d3xp/bc_camerasplice.cpp b/d3xp/bc_camerasplice.cpp index a1e0831..5ab8ffb 100644 --- a/d3xp/bc_camerasplice.cpp +++ b/d3xp/bc_camerasplice.cpp @@ -11,7 +11,7 @@ #include "bc_meta.h" #include "bc_notewall.h" #include "bc_frobcube.h" -#include "securitycamera.h" +#include "SecurityCamera.h" #include "bc_camerasplice.h" const int ANIM_OPENTIME = 500; //Delay before camera switches allegience diff --git a/d3xp/bc_carepackage.cpp b/d3xp/bc_carepackage.cpp index da4e30b..96833a1 100644 --- a/d3xp/bc_carepackage.cpp +++ b/d3xp/bc_carepackage.cpp @@ -2,7 +2,7 @@ #include "Entity.h" #include "Player.h" -#include "fx.h" +#include "Fx.h" #include "bc_carepackage.h" const int LANDING_DISTANCE_FROM_POD = 384; diff --git a/d3xp/bc_cat.cpp b/d3xp/bc_cat.cpp index 0ef8b42..95441ca 100644 --- a/d3xp/bc_cat.cpp +++ b/d3xp/bc_cat.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_cat.h" diff --git a/d3xp/bc_chembomb.cpp b/d3xp/bc_chembomb.cpp index 2677ac7..829d2e6 100644 --- a/d3xp/bc_chembomb.cpp +++ b/d3xp/bc_chembomb.cpp @@ -9,7 +9,7 @@ #include "WorldSpawn.h" #include "SmokeParticles.h" #include "framework/DeclEntityDef.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_glasspiece.h" #include "bc_chembomb.h" diff --git a/d3xp/bc_cryointerior.cpp b/d3xp/bc_cryointerior.cpp index ff30cba..82bb1c2 100644 --- a/d3xp/bc_cryointerior.cpp +++ b/d3xp/bc_cryointerior.cpp @@ -8,7 +8,7 @@ #include "WorldSpawn.h" -#include "target.h" +#include "Target.h" #include "bc_frobcube.h" #include "bc_ventpeek.h" #include "bc_meta.h" diff --git a/d3xp/bc_diagnosticbox.cpp b/d3xp/bc_diagnosticbox.cpp index da35293..fba1a40 100644 --- a/d3xp/bc_diagnosticbox.cpp +++ b/d3xp/bc_diagnosticbox.cpp @@ -8,11 +8,11 @@ //#include "Moveable.h" //#include "trigger.h" \ -#include "ai\AI.h" +#include "ai/AI.h" #include "WorldSpawn.h" #include "framework/DeclEntityDef.h" -#include "securitycamera.h" +#include "SecurityCamera.h" #include "bc_sabotagepoint.h" #include "bc_meta.h" #include "bc_diagnosticbox.h" diff --git a/d3xp/bc_engineer.cpp b/d3xp/bc_engineer.cpp index 635d2f9..cac9a58 100644 --- a/d3xp/bc_engineer.cpp +++ b/d3xp/bc_engineer.cpp @@ -1,7 +1,7 @@ #include "Fx.h" #include "WorldSpawn.h" #include "gamesys/SysCvar.h" -#include "player.h" +#include "Player.h" #include "framework/DeclEntityDef.h" #include "bc_vomanager.h" diff --git a/d3xp/bc_exteriorstrut.cpp b/d3xp/bc_exteriorstrut.cpp index 17d5f46..7197779 100644 --- a/d3xp/bc_exteriorstrut.cpp +++ b/d3xp/bc_exteriorstrut.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_exteriorstrut.h" diff --git a/d3xp/bc_fireball.cpp b/d3xp/bc_fireball.cpp index 680d08c..477631a 100644 --- a/d3xp/bc_fireball.cpp +++ b/d3xp/bc_fireball.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_fireball.h" diff --git a/d3xp/bc_flyingbarrel.cpp b/d3xp/bc_flyingbarrel.cpp index 227a417..9db4884 100644 --- a/d3xp/bc_flyingbarrel.cpp +++ b/d3xp/bc_flyingbarrel.cpp @@ -1,7 +1,7 @@ #include "framework/DeclEntityDef.h" -#include "trigger.h" -#include "fx.h" +#include "Trigger.h" +#include "Fx.h" #include "Light.h" #include "bc_flyingbarrel.h" diff --git a/d3xp/bc_food.cpp b/d3xp/bc_food.cpp index 8632073..9352b5a 100644 --- a/d3xp/bc_food.cpp +++ b/d3xp/bc_food.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "idlib/LangDict.h" //#include "item.h" diff --git a/d3xp/bc_ftl.cpp b/d3xp/bc_ftl.cpp index e091389..969fb16 100644 --- a/d3xp/bc_ftl.cpp +++ b/d3xp/bc_ftl.cpp @@ -9,7 +9,7 @@ //#include "trigger.h" #include "WorldSpawn.h" -#include "misc.h" +#include "Misc.h" #include "bc_skullsaver.h" #include "bc_bossmonster.h" #include "bc_sabotagelever.h" diff --git a/d3xp/bc_ftl_charger.cpp b/d3xp/bc_ftl_charger.cpp index 8c9b972..065d1b7 100644 --- a/d3xp/bc_ftl_charger.cpp +++ b/d3xp/bc_ftl_charger.cpp @@ -5,7 +5,7 @@ #include "Fx.h" #include "Item.h" -#include "player.h" +#include "Player.h" #include "bc_frobcube.h" #include "bc_ftl_charger.h" diff --git a/d3xp/bc_gunner.cpp b/d3xp/bc_gunner.cpp index 676bd63..0d87767 100644 --- a/d3xp/bc_gunner.cpp +++ b/d3xp/bc_gunner.cpp @@ -11,7 +11,7 @@ #include "WorldSpawn.h" #include "gamesys/SysCvar.h" -#include "player.h" +#include "Player.h" #include "framework/DeclEntityDef.h" #include "idlib/LangDict.h" diff --git a/d3xp/bc_highlighter.cpp b/d3xp/bc_highlighter.cpp index 7bdc703..c53cc26 100644 --- a/d3xp/bc_highlighter.cpp +++ b/d3xp/bc_highlighter.cpp @@ -3,9 +3,9 @@ #include "gamesys/SysCvar.h" #include "idlib/LangDict.h" -#include "worldspawn.h" -#include "player.h" -#include "actor.h" +#include "WorldSpawn.h" +#include "Player.h" +#include "Actor.h" #include "bc_meta.h" #include "bc_highlighter.h" diff --git a/d3xp/bc_highlighter.h b/d3xp/bc_highlighter.h index 6df468a..3788f28 100644 --- a/d3xp/bc_highlighter.h +++ b/d3xp/bc_highlighter.h @@ -3,7 +3,7 @@ #include "Mover.h" #include "Camera.h" #include "Misc.h" -#include "target.h" +#include "Target.h" #define MAX_ARROWS 2 diff --git a/d3xp/bc_idletask.cpp b/d3xp/bc_idletask.cpp index d379835..2f29fbb 100644 --- a/d3xp/bc_idletask.cpp +++ b/d3xp/bc_idletask.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" -#include "ai\AI.h" +#include "ai/AI.h" #include "bc_gunner.h" #include "bc_idletask.h" diff --git a/d3xp/bc_interestpoint.cpp b/d3xp/bc_interestpoint.cpp index 67e6531..8de0d30 100644 --- a/d3xp/bc_interestpoint.cpp +++ b/d3xp/bc_interestpoint.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" -#include "ai\AI.h" +#include "ai/AI.h" #include "bc_gunner.h" #include "bc_interestpoint.h" #include "bc_meta.h" diff --git a/d3xp/bc_keypad.cpp b/d3xp/bc_keypad.cpp index d0a9e51..694e182 100644 --- a/d3xp/bc_keypad.cpp +++ b/d3xp/bc_keypad.cpp @@ -6,7 +6,7 @@ #include "Entity.h" #include "Misc.h" -#include "player.h" +#include "Player.h" //#include "Game_local.h" #include "framework/DeclEntityDef.h" diff --git a/d3xp/bc_lever.cpp b/d3xp/bc_lever.cpp index 28e0457..5a3c20e 100644 --- a/d3xp/bc_lever.cpp +++ b/d3xp/bc_lever.cpp @@ -1,7 +1,7 @@ #include "script/Script_Thread.h" -#include "player.h" -#include "ai\AI.h" +#include "Player.h" +#include "ai/AI.h" #include "bc_lever.h" const idEventDef EV_Button_Enable("enableButton", "d"); diff --git a/d3xp/bc_librarian.cpp b/d3xp/bc_librarian.cpp index 6a855e5..249c0d8 100644 --- a/d3xp/bc_librarian.cpp +++ b/d3xp/bc_librarian.cpp @@ -4,7 +4,7 @@ #include "Player.h" #include "idlib/LangDict.h" -#include "securitycamera.h" +#include "SecurityCamera.h" #include "bc_turret.h" #include "bc_dozerhatch.h" diff --git a/d3xp/bc_lifeboat.cpp b/d3xp/bc_lifeboat.cpp index a8d83a3..ad8480f 100644 --- a/d3xp/bc_lifeboat.cpp +++ b/d3xp/bc_lifeboat.cpp @@ -1,6 +1,6 @@ #include "framework/DeclEntityDef.h" -#include "fx.h" +#include "Fx.h" #include "bc_ftl.h" #include "bc_skullsaver.h" #include "bc_meta.h" diff --git a/d3xp/bc_lifeboat_catpod.cpp b/d3xp/bc_lifeboat_catpod.cpp index ea7a0f1..4718891 100644 --- a/d3xp/bc_lifeboat_catpod.cpp +++ b/d3xp/bc_lifeboat_catpod.cpp @@ -1,8 +1,8 @@ #include "framework/DeclEntityDef.h" -#include "worldspawn.h" -#include "player.h" -#include "fx.h" +#include "WorldSpawn.h" +#include "Player.h" +#include "Fx.h" #include "bc_ftl.h" #include "bc_skullsaver.h" #include "bc_meta.h" diff --git a/d3xp/bc_meta.cpp b/d3xp/bc_meta.cpp index d969b4b..0bd60a4 100644 --- a/d3xp/bc_meta.cpp +++ b/d3xp/bc_meta.cpp @@ -5,9 +5,9 @@ #include "script/Script_Thread.h" #include "Fx.h" -#include "player.h" +#include "Player.h" #include "Actor.h" -#include "ai\AI.h" +#include "ai/AI.h" #include "framework/DeclEntityDef.h" #include "framework/FileSystem.h" diff --git a/d3xp/bc_meta.h b/d3xp/bc_meta.h index e5b129f..66dac47 100644 --- a/d3xp/bc_meta.h +++ b/d3xp/bc_meta.h @@ -1,6 +1,6 @@ #include "Entity.h" -#include "target.h" +#include "Target.h" #include "ai/AI.h" // Be careful adding includes here if you don't need them (you can forward declare instead) diff --git a/d3xp/bc_moneypile.h b/d3xp/bc_moneypile.h index 7b8b1be..2e4b273 100644 --- a/d3xp/bc_moneypile.h +++ b/d3xp/bc_moneypile.h @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" class idTrigger_moneypile : public idTrigger_Multi { diff --git a/d3xp/bc_oxygenbubble.cpp b/d3xp/bc_oxygenbubble.cpp index 986b3bd..0fc3e9b 100644 --- a/d3xp/bc_oxygenbubble.cpp +++ b/d3xp/bc_oxygenbubble.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_oxygenbubble.h" diff --git a/d3xp/bc_pepperbag.cpp b/d3xp/bc_pepperbag.cpp index f622a23..37e0a5e 100644 --- a/d3xp/bc_pepperbag.cpp +++ b/d3xp/bc_pepperbag.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" //#include "bc_trigger_deodorant.h" //#include "bc_trigger_sneeze.h" diff --git a/d3xp/bc_pirateship.cpp b/d3xp/bc_pirateship.cpp index 85978d2..30dc9e8 100644 --- a/d3xp/bc_pirateship.cpp +++ b/d3xp/bc_pirateship.cpp @@ -4,7 +4,7 @@ #include "Light.h" #include "Fx.h" #include "framework/DeclEntityDef.h" -#include "player.h" +#include "Player.h" #include "idlib/LangDict.h" #include "bc_airlock_accumulator.h" diff --git a/d3xp/bc_radio.cpp b/d3xp/bc_radio.cpp index b60ed20..ff0126f 100644 --- a/d3xp/bc_radio.cpp +++ b/d3xp/bc_radio.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "idlib/LangDict.h" diff --git a/d3xp/bc_radiocheckin.cpp b/d3xp/bc_radiocheckin.cpp index 68684aa..e6167f7 100644 --- a/d3xp/bc_radiocheckin.cpp +++ b/d3xp/bc_radiocheckin.cpp @@ -1,10 +1,10 @@ //#include "script/Script_Thread.h" #include "framework/DeclEntityDef.h" -#include "worldspawn.h" -#include "actor.h" -#include "mover.h" -#include "player.h" +#include "WorldSpawn.h" +#include "Actor.h" +#include "Mover.h" +#include "Player.h" #include "bc_meta.h" #include "bc_radiocheckin.h" diff --git a/d3xp/bc_radiocheckin.h b/d3xp/bc_radiocheckin.h index 2f25311..f6fc90a 100644 --- a/d3xp/bc_radiocheckin.h +++ b/d3xp/bc_radiocheckin.h @@ -1,7 +1,7 @@ #pragma once #include "Misc.h" -#include "target.h" +#include "Target.h" #define RADIOCHECK_MAX 12 //this needs to match up with the amount of nato alphabet letter states we have. Refer to the UNIT_ enum in this file. diff --git a/d3xp/bc_radiowall.cpp b/d3xp/bc_radiowall.cpp index 5185f2b..82a9674 100644 --- a/d3xp/bc_radiowall.cpp +++ b/d3xp/bc_radiowall.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_meta.h" #include "bc_radiowall.h" diff --git a/d3xp/bc_repairbot.cpp b/d3xp/bc_repairbot.cpp index da74c85..34f0115 100644 --- a/d3xp/bc_repairbot.cpp +++ b/d3xp/bc_repairbot.cpp @@ -6,7 +6,7 @@ #include "Mover.h" #include "Fx.h" #include "bc_meta.h" -#include "player.h" +#include "Player.h" #include "idlib/LangDict.h" #include "bc_dozerhatch.h" diff --git a/d3xp/bc_sabotagepoint.cpp b/d3xp/bc_sabotagepoint.cpp index b7cbdc6..a99852b 100644 --- a/d3xp/bc_sabotagepoint.cpp +++ b/d3xp/bc_sabotagepoint.cpp @@ -1,5 +1,5 @@ -#include "player.h" -#include "worldspawn.h" +#include "Player.h" +#include "WorldSpawn.h" #include "bc_meta.h" #include "bc_sabotagepoint.h" #include "bc_ftl.h" diff --git a/d3xp/bc_soap.cpp b/d3xp/bc_soap.cpp index f17b857..e1a53cc 100644 --- a/d3xp/bc_soap.cpp +++ b/d3xp/bc_soap.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" //#include "item.h" diff --git a/d3xp/bc_spacemine.cpp b/d3xp/bc_spacemine.cpp index 0e2ffa8..2acfabe 100644 --- a/d3xp/bc_spacemine.cpp +++ b/d3xp/bc_spacemine.cpp @@ -1,7 +1,7 @@ #include "framework/DeclEntityDef.h" #include "SmokeParticles.h" -#include "fx.h" +#include "Fx.h" #include "bc_spacemine.h" diff --git a/d3xp/bc_spearbot.cpp b/d3xp/bc_spearbot.cpp index c525def..0637056 100644 --- a/d3xp/bc_spearbot.cpp +++ b/d3xp/bc_spearbot.cpp @@ -8,7 +8,7 @@ #include "SmokeParticles.h" #include "framework/DeclEntityDef.h" #include "bc_meta.h" -#include "player.h" +#include "Player.h" #include "bc_spearprojectile.h" #include "bc_spearbot.h" diff --git a/d3xp/bc_spearprojectile.cpp b/d3xp/bc_spearprojectile.cpp index 5c02d97..049f575 100644 --- a/d3xp/bc_spearprojectile.cpp +++ b/d3xp/bc_spearprojectile.cpp @@ -6,10 +6,10 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "SmokeParticles.h" #include "framework/DeclEntityDef.h" -#include "projectile.h" +#include "Projectile.h" #include "ai/AI.h" diff --git a/d3xp/bc_spectatenode.cpp b/d3xp/bc_spectatenode.cpp index 622f08f..32fbac1 100644 --- a/d3xp/bc_spectatenode.cpp +++ b/d3xp/bc_spectatenode.cpp @@ -1,7 +1,7 @@ #include "Entity.h" -#include "actor.h" -#include "player.h" +#include "Actor.h" +#include "Player.h" #include "bc_spectatenode.h" CLASS_DECLARATION(idEntity, idSpectateNode) diff --git a/d3xp/bc_spectatetimeline.cpp b/d3xp/bc_spectatetimeline.cpp index 7932893..df6c52a 100644 --- a/d3xp/bc_spectatetimeline.cpp +++ b/d3xp/bc_spectatetimeline.cpp @@ -1,7 +1,7 @@ #include "Entity.h" -#include "actor.h" -#include "player.h" +#include "Actor.h" +#include "Player.h" #include "bc_spectatenode.h" diff --git a/d3xp/bc_stresstester.cpp b/d3xp/bc_stresstester.cpp index 44bb835..f526696 100644 --- a/d3xp/bc_stresstester.cpp +++ b/d3xp/bc_stresstester.cpp @@ -6,12 +6,12 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "framework/Session_local.h" #include "WorldSpawn.h" -#include "mover.h" +#include "Mover.h" #include "bc_meta.h" #include "bc_cryointerior.h" #include "bc_doorbarricade.h" diff --git a/d3xp/bc_trigger_confinedarea.cpp b/d3xp/bc_trigger_confinedarea.cpp index 6ab3895..e6b6f68 100644 --- a/d3xp/bc_trigger_confinedarea.cpp +++ b/d3xp/bc_trigger_confinedarea.cpp @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" #include "Player.h" #include "bc_meta.h" diff --git a/d3xp/bc_trigger_confinedarea.h b/d3xp/bc_trigger_confinedarea.h index ea9d16a..aa83fd2 100644 --- a/d3xp/bc_trigger_confinedarea.h +++ b/d3xp/bc_trigger_confinedarea.h @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" class idTrigger_confinedarea : public idTrigger_Multi { diff --git a/d3xp/bc_trigger_deodorant.cpp b/d3xp/bc_trigger_deodorant.cpp index 3ee7751..bbe9b3d 100644 --- a/d3xp/bc_trigger_deodorant.cpp +++ b/d3xp/bc_trigger_deodorant.cpp @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" #include "framework/DeclEntityDef.h" #include "Player.h" #include "idlib/LangDict.h" diff --git a/d3xp/bc_trigger_deodorant.h b/d3xp/bc_trigger_deodorant.h index 07387c8..b99bfba 100644 --- a/d3xp/bc_trigger_deodorant.h +++ b/d3xp/bc_trigger_deodorant.h @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" class idTrigger_deodorant : public idTrigger_Multi { diff --git a/d3xp/bc_trigger_enginewash.cpp b/d3xp/bc_trigger_enginewash.cpp index 6a0c0cb..7720f74 100644 --- a/d3xp/bc_trigger_enginewash.cpp +++ b/d3xp/bc_trigger_enginewash.cpp @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" #include "Player.h" #include "bc_meta.h" diff --git a/d3xp/bc_trigger_enginewash.h b/d3xp/bc_trigger_enginewash.h index 9cb7b8b..8ad72a1 100644 --- a/d3xp/bc_trigger_enginewash.h +++ b/d3xp/bc_trigger_enginewash.h @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" class idTrigger_enginewash : public idTrigger_Multi { diff --git a/d3xp/bc_trigger_gascloud.cpp b/d3xp/bc_trigger_gascloud.cpp index 2a1886f..043f3a2 100644 --- a/d3xp/bc_trigger_gascloud.cpp +++ b/d3xp/bc_trigger_gascloud.cpp @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" #include "Player.h" #include "ai/AI.h" diff --git a/d3xp/bc_trigger_gascloud.h b/d3xp/bc_trigger_gascloud.h index afe6c1c..14ec83c 100644 --- a/d3xp/bc_trigger_gascloud.h +++ b/d3xp/bc_trigger_gascloud.h @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" class idTrigger_gascloud : public idTrigger_Multi { diff --git a/d3xp/bc_trigger_healcloud.cpp b/d3xp/bc_trigger_healcloud.cpp index fa8f94c..638cbb6 100644 --- a/d3xp/bc_trigger_healcloud.cpp +++ b/d3xp/bc_trigger_healcloud.cpp @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" #include "framework/DeclEntityDef.h" #include "Player.h" #include "Fx.h" diff --git a/d3xp/bc_trigger_healcloud.h b/d3xp/bc_trigger_healcloud.h index f07b922..21e186f 100644 --- a/d3xp/bc_trigger_healcloud.h +++ b/d3xp/bc_trigger_healcloud.h @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" class idTrigger_healcloud : public idTrigger_Multi { diff --git a/d3xp/bc_trigger_sneeze.cpp b/d3xp/bc_trigger_sneeze.cpp index 1ed9a23..4e84733 100644 --- a/d3xp/bc_trigger_sneeze.cpp +++ b/d3xp/bc_trigger_sneeze.cpp @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" #include "Player.h" #include "ai/AI.h" diff --git a/d3xp/bc_trigger_sneeze.h b/d3xp/bc_trigger_sneeze.h index 1f8152b..98547c6 100644 --- a/d3xp/bc_trigger_sneeze.h +++ b/d3xp/bc_trigger_sneeze.h @@ -1,4 +1,4 @@ -#include "trigger.h" +#include "Trigger.h" class idTrigger_sneeze : public idTrigger_Multi { diff --git a/d3xp/bc_vacuumspline.cpp b/d3xp/bc_vacuumspline.cpp index 089f481..ce742a7 100644 --- a/d3xp/bc_vacuumspline.cpp +++ b/d3xp/bc_vacuumspline.cpp @@ -1,8 +1,8 @@ //#include "script/Script_Thread.h" #include "framework/DeclEntityDef.h" -#include "player.h" -#include "mover.h" +#include "Player.h" +#include "Mover.h" #include "bc_vacuumspline.h" //TODO: particle trail path diff --git a/d3xp/bc_vacuumspline.h b/d3xp/bc_vacuumspline.h index 8801e72..9cbd1e7 100644 --- a/d3xp/bc_vacuumspline.h +++ b/d3xp/bc_vacuumspline.h @@ -1,5 +1,5 @@ #include "Misc.h" -#include "target.h" +#include "Target.h" class idVacuumSpline : public idEntity { diff --git a/d3xp/bc_vomanager.cpp b/d3xp/bc_vomanager.cpp index 4e7f029..072b38c 100644 --- a/d3xp/bc_vomanager.cpp +++ b/d3xp/bc_vomanager.cpp @@ -1,7 +1,7 @@ #include "Entity.h" -#include "actor.h" -#include "player.h" +#include "Actor.h" +#include "Player.h" #include "bc_vomanager.h" diff --git a/d3xp/bc_walkietalkie.cpp b/d3xp/bc_walkietalkie.cpp index b7582b1..fd8760f 100644 --- a/d3xp/bc_walkietalkie.cpp +++ b/d3xp/bc_walkietalkie.cpp @@ -6,7 +6,7 @@ #include "Player.h" #include "Fx.h" #include "Moveable.h" -#include "trigger.h" +#include "Trigger.h" #include "bc_radiocheckin.h" #include "bc_idletask.h" diff --git a/d3xp/bc_windowseal.cpp b/d3xp/bc_windowseal.cpp index 0aebe8f..01b7513 100644 --- a/d3xp/bc_windowseal.cpp +++ b/d3xp/bc_windowseal.cpp @@ -9,7 +9,7 @@ #include "idlib/LangDict.h" #include "SmokeParticles.h" #include "Game_local.h" -#include "trigger.h" +#include "Trigger.h" #include "Misc.h" #include "BrittleFracture.h" diff --git a/d3xp/bc_yarnboard.cpp b/d3xp/bc_yarnboard.cpp index 790da80..790a360 100644 --- a/d3xp/bc_yarnboard.cpp +++ b/d3xp/bc_yarnboard.cpp @@ -4,7 +4,7 @@ #include "Entity.h" //#include "Light.h" #include "Player.h" -#include "trigger.h" +#include "Trigger.h" #include "framework/DeclEntityDef.h" diff --git a/d3xp/gamesys/SysCmds.cpp b/d3xp/gamesys/SysCmds.cpp index 0f7b169..5dc6652 100644 --- a/d3xp/gamesys/SysCmds.cpp +++ b/d3xp/gamesys/SysCmds.cpp @@ -49,7 +49,7 @@ If you have questions concerning this license or the applicable additional terms #include "bc_maintpanel.h" #include "bc_tablet.h" #include "bc_notewall.h" -#include "securitycamera.h" +#include "SecurityCamera.h" #include "bc_catcage.h" #include "bc_glasspiece.h" #include "bc_meta.h" diff --git a/d3xp/physics/Physics_Player.cpp b/d3xp/physics/Physics_Player.cpp index 7df1338..243f819 100644 --- a/d3xp/physics/Physics_Player.cpp +++ b/d3xp/physics/Physics_Player.cpp @@ -33,7 +33,7 @@ If you have questions concerning this license or the applicable additional terms #include "Player.h" #include "bc_acropoint.h" #include "Fx.h" -#include "Worldspawn.h" +#include "WorldSpawn.h" #include "physics/Physics_Player.h" From 3db5cccadd6b4be668119e9f3149e12dcfabd5ff Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 18:12:38 +0800 Subject: [PATCH 06/11] Replace TRUE and FALSE for linux building --- d3xp/Player.cpp | 2 +- d3xp/bc_refinery.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/d3xp/Player.cpp b/d3xp/Player.cpp index e38f4ff..38bc182 100644 --- a/d3xp/Player.cpp +++ b/d3xp/Player.cpp @@ -35164,7 +35164,7 @@ bool idPlayer::isInZoomMode() bool idPlayer::isInLabelInspectMode() { - return (zoominspect_LabelmodeActive == TRUE); + return (zoominspect_LabelmodeActive/* == TRUE*/); } void idPlayer::SetDrawIngressPoints(bool value) diff --git a/d3xp/bc_refinery.cpp b/d3xp/bc_refinery.cpp index a389f7c..da069a8 100644 --- a/d3xp/bc_refinery.cpp +++ b/d3xp/bc_refinery.cpp @@ -121,7 +121,7 @@ void idRefinery::Spawn(void) rotationCounter = 0; - if (spawnArgs.GetBool("start_on") == FALSE) + if (spawnArgs.GetBool("start_on") == false) { refineryState = REFINERY_STATIC; } From 8849adebf60e6691b29e681467f9ccb83cf6102e Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 18:14:46 +0800 Subject: [PATCH 07/11] fix id_attribute((format)) --- d3xp/gamesys/SaveGame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d3xp/gamesys/SaveGame.cpp b/d3xp/gamesys/SaveGame.cpp index 6c79f29..93872d7 100644 --- a/d3xp/gamesys/SaveGame.cpp +++ b/d3xp/gamesys/SaveGame.cpp @@ -252,7 +252,7 @@ void SG_DumpStack() { } #endif -void SG_Warn( const char* fmt, ... ) id_attribute((format(printf,2,3))) { +void SG_Warn( const char* fmt, ... ) id_attribute((format(printf,1,2))) { va_list args; va_start(args, fmt); @@ -270,7 +270,7 @@ void SG_Warn( const char* fmt, ... ) id_attribute((format(printf,2,3))) { va_end(args); } -void SG_Error( const char *fmt, ... ) id_attribute((format(printf,2,3))) { +void SG_Error( const char *fmt, ... ) id_attribute((format(printf,1,2))) { va_list args; va_start(args, fmt); @@ -287,7 +287,7 @@ void SG_Error( const char *fmt, ... ) id_attribute((format(printf,2,3))) { } -void SG_Print( const char *fmt, ... ) id_attribute((format(printf,2,3))) { +void SG_Print( const char *fmt, ... ) id_attribute((format(printf,1,2))) { va_list args; va_start(args, fmt); gameLocal.Printf(fmt, args); From bdf05d4fa1e2326323226ab8ab18da84b5e52795 Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 18:15:06 +0800 Subject: [PATCH 08/11] Fix ambiguous error on clang/gcc --- d3xp/Game_local.cpp | 4 ++-- d3xp/Game_local.h | 10 ++++++++++ d3xp/anim/Anim_Blend.cpp | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/d3xp/Game_local.cpp b/d3xp/Game_local.cpp index 489dc40..839597e 100644 --- a/d3xp/Game_local.cpp +++ b/d3xp/Game_local.cpp @@ -6827,7 +6827,7 @@ idEntity* idGameLocal::DoParticleAng(const char* particleName, idVec3 position, idleSmoke->PostEventMS(&EV_Remove, 5000); } - idleSmoke->PostEventMS(&EV_Activate, 0, NULL); + idleSmoke->PostEventMS(&EV_Activate, 0, (idEntity *)NULL); return idleSmoke; } @@ -6862,7 +6862,7 @@ idEntity * idGameLocal::DoParticle(const char *particleName, idVec3 position, id idleSmoke->PostEventMS(&EV_Remove, 5000); } - idleSmoke->PostEventMS(&EV_Activate, 0, NULL); + idleSmoke->PostEventMS(&EV_Activate, 0, (idEntity *)NULL); return idleSmoke; } diff --git a/d3xp/Game_local.h b/d3xp/Game_local.h index b1df3e6..bd4f93d 100644 --- a/d3xp/Game_local.h +++ b/d3xp/Game_local.h @@ -380,6 +380,9 @@ class idEntityPtr { idEntityPtr & operator=( type *ent ); bool operator==(idEntityPtr& other) const; +#if !defined(_MSC_VER) + bool operator==(const idEntityPtr& other) const; +#endif // synchronize entity pointers over the network int GetSpawnId( void ) const { return spawnId; } @@ -1061,6 +1064,13 @@ ID_INLINE bool idEntityPtr::operator==(idEntityPtr& other) const { return spawnId == other.spawnId; } +#if !defined(_MSC_VER) +template< class type > +ID_INLINE bool idEntityPtr::operator==(const idEntityPtr& other) const { + return spawnId == other.spawnId; +} +#endif + template< class type > ID_INLINE bool idEntityPtr::SetSpawnId( int id ) { // the reason for this first check is unclear: diff --git a/d3xp/anim/Anim_Blend.cpp b/d3xp/anim/Anim_Blend.cpp index e0ff1f5..7d71d78 100644 --- a/d3xp/anim/Anim_Blend.cpp +++ b/d3xp/anim/Anim_Blend.cpp @@ -1187,7 +1187,7 @@ void idAnim::CallFrameCommands( idEntity *ent, int from, int to, int animChannel idleSmoke->SetAxis(axis); idleSmoke->BindToJoint(ent, jointNum, true); idleSmoke->PostEventMS(&EV_Remove, 8000); //Delete particle effect after XX seconds. - idleSmoke->PostEventMS(&EV_Activate, 0, NULL); + idleSmoke->PostEventMS(&EV_Activate, 0, (idEntity *)NULL); //gameRenderWorld->DebugArrowSimple(offset); } From 4e9d3c17d0fbd15d4277c3e2183200c81620f071 Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 18:15:36 +0800 Subject: [PATCH 09/11] alloca on linux --- d3xp/gamesys/SaveGame.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/d3xp/gamesys/SaveGame.cpp b/d3xp/gamesys/SaveGame.cpp index 93872d7..3b6094c 100644 --- a/d3xp/gamesys/SaveGame.cpp +++ b/d3xp/gamesys/SaveGame.cpp @@ -1644,7 +1644,11 @@ void idSaveGame::WriteFloatArr( const float * arr, int num ) { int size = num * sizeof(float); float * fArr; +#if !defined(WIN32) //karin: alloca in stack on non-win + fArr = (float*)alloca( size ); +#else fArr = (float*)_malloca( size ); +#endif memcpy(fArr, arr, size); LittleRevBytes( fArr, sizeof(float), num ); From a0615fa6a5cfc0f35920017ea799fcbd788a5034 Mon Sep 17 00:00:00 2001 From: Zhao Date: Thu, 5 Feb 2026 18:16:27 +0800 Subject: [PATCH 10/11] Fix idMoveableItem::Restore error --- d3xp/Item.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/d3xp/Item.cpp b/d3xp/Item.cpp index 8aafa10..7e05bd6 100644 --- a/d3xp/Item.cpp +++ b/d3xp/Item.cpp @@ -2124,7 +2124,13 @@ void idMoveableItem::Restore( idRestoreGame *savefile ) { savefile->ReadInt( collideFrobTimer ); // int collideFrobTimer +#if !defined(_WIN32) //karin: write int, but read long here. long is 4 bytes in win64 only, others 64-bits is 8bytes + int i_spawnTime; + savefile->ReadInt( i_spawnTime ); // int spawnTime + spawnTime = i_spawnTime; +#else savefile->ReadLong( spawnTime ); // int spawnTime +#endif savefile->ReadBool( showItemLine ); // bool showItemLine savefile->ReadInt( itemLineHandle ); // int itemLineHandle savefile->ReadVec3( itemLineColor ); // idVec3 itemLineColor From fd31e68fd972a7ac7a65649cc94360250134316b Mon Sep 17 00:00:00 2001 From: Zhao Date: Mon, 9 Feb 2026 15:48:40 +0800 Subject: [PATCH 11/11] should be idList --- d3xp/bc_cassetteplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d3xp/bc_cassetteplayer.cpp b/d3xp/bc_cassetteplayer.cpp index b637241..cc2d066 100644 --- a/d3xp/bc_cassetteplayer.cpp +++ b/d3xp/bc_cassetteplayer.cpp @@ -115,7 +115,7 @@ void idCassettePlayer::Save(idSaveGame *savefile) const void idCassettePlayer::Restore(idRestoreGame *savefile) { tracklist->Restore( savefile ); // idListGUI* tracklist - SaveFileReadArray( soundshaderList, ReadString ); // idList soundshaderList + SaveFileReadList( soundshaderList, ReadString ); // idList soundshaderList } void idCassettePlayer::Think(void)