Skip to content

Commit

Permalink
Merge branch 'lua-fallback-fonts-with-atlasclear' into colored-fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
saurtron committed Dec 17, 2024
2 parents d1e7ab4 + d9ce3a1 commit ec3229f
Show file tree
Hide file tree
Showing 24 changed files with 346 additions and 115 deletions.
1 change: 1 addition & 0 deletions doc/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ Misc:
- Fix when a client that takes too long to connect can potentially trigger a desync.
https://github.com/beyond-all-reason/spring/issues/1406
- Prevent logging general log information before the game engine has started. https://github.com/beyond-all-reason/spring/issues/683
- New modinfo setting to skip issuing newly created units a move command off of the factory pad: insertBuiltUnitMoveCommand.

Sim:
- Improved performance of long-range path finding requests (TKPFS)
Expand Down
2 changes: 1 addition & 1 deletion rts/Game/GameHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void CGameHelper::Kill()

void CGameHelper::Update()
{
RECOIL_DETAILED_TRACY_ZONE;
ZoneScopedC(tracy::Color::Goldenrod);
const int wdIdx = gs->frameNum & (waitingDamages.size() - 1);

// need to use explicit indexing because CUnit::DoDamage
Expand Down
11 changes: 8 additions & 3 deletions rts/Game/PreGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,15 @@ bool CPreGame::Draw()
font->SetTextColor(color.x, color.y, color.z, color.w);

if (!clientNet->Connected()) {
if (clientSetup->isHost)
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for server to start");
else
if (clientSetup->isHost) {
if (clientSetup->hostIP == "localhost")
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for game to start");
else
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for server to start");
}
else {
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Connecting to server (%ds)", (spring_gettime() - connectTimer).toSecsi());
}
} else {
font->glPrint(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for server response");
}
Expand Down
4 changes: 2 additions & 2 deletions rts/Game/UI/MiniMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ void CMiniMap::DrawMinimizedButtonLoop() const

void CMiniMap::DrawForReal(bool useNormalizedCoors, bool updateTex, bool luaCall)
{
ZoneScopedN("MiniMap::DrawForReal");
ZoneScopedNC("MiniMap::DrawForReal", tracy::Color::Goldenrod);
if (minimized)
return;

Expand Down Expand Up @@ -1915,7 +1915,7 @@ void CMiniMap::DrawUnitRanges() const

void CMiniMap::DrawWorldStuff() const
{
RECOIL_DETAILED_TRACY_ZONE;
ZoneScoped;
glPushMatrix();

if (flipped) {
Expand Down
1 change: 1 addition & 0 deletions rts/Lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ set(sources_engine_Lua
"${CMAKE_CURRENT_SOURCE_DIR}/LuaSyncedMoveCtrl.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LuaSyncedRead.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LuaSyncedTable.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LuaTableExtra.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LuaTextures.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LuaAtlasTextures.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/LuaUI.cpp"
Expand Down
3 changes: 2 additions & 1 deletion rts/Lua/LuaConstEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ bool LuaConstEngine::PushEntries(lua_State* L)


lua_pushliteral(L, "FeatureSupport");
lua_createtable(L, 0, 2);
lua_createtable(L, 0, 3);
LuaPushNamedBool(L, "NegativeGetUnitCurrentCommand", true);
LuaPushNamedBool(L, "hasExitOnlyYardmaps", true);
LuaPushNamedNumber(L, "rmlUiApiVersion", 1);
lua_rawset(L, -3);
Expand Down
5 changes: 5 additions & 0 deletions rts/Lua/LuaHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "LuaOpenGL.h"
#include "LuaBitOps.h"
#include "LuaMathExtra.h"
#include "LuaTableExtra.h"
#include "LuaUtils.h"
#include "LuaZip.h"
#include "Game/Game.h"
Expand Down Expand Up @@ -3868,6 +3869,10 @@ bool CLuaHandle::AddBasicCalls(lua_State* L)
LuaMathExtra::PushEntries(L);
lua_pop(L, 1);

lua_getglobal(L, "table");
LuaTableExtra::PushEntries(L);
lua_pop(L, 1);

return true;
}

Expand Down
Loading

0 comments on commit ec3229f

Please sign in to comment.