Skip to content

Commit

Permalink
DrawScreenFinal --> DrawScreenPost
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Mar 13, 2017
1 parent bd473dc commit d0396c7
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion cont/LuaUI/callins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ CallInsList = {
"DrawWorldReflection",
"DrawWorldRefraction",
"DrawScreenEffects",
"DrawScreenFinal",
"DrawScreenPost",
"DrawScreen",
"DrawInMiniMap",

Expand Down
8 changes: 4 additions & 4 deletions cont/LuaUI/widgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ local flexCallIns = {
'DrawWorldReflection',
'DrawWorldRefraction',
'DrawScreenEffects',
'DrawScreenFinal',
'DrawScreenPost',
'DrawInMiniMap',
'RecvSkirmishAIMessage',
}
Expand Down Expand Up @@ -1307,9 +1307,9 @@ function widgetHandler:DrawScreenEffects(vsx, vsy)
end


function widgetHandler:DrawScreenFinal(vsx, vsy)
for _,w in ripairs(self.DrawScreenFinalList) do
w:DrawScreenFinal(vsx, vsy)
function widgetHandler:DrawScreenPost(vsx, vsy)
for _,w in ripairs(self.DrawScreenPostList) do
w:DrawScreenPost(vsx, vsy)
end
return
end
Expand Down
2 changes: 1 addition & 1 deletion cont/base/springcontent/LuaGadgets/callins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ CALLIN_LIST = {
"DrawUnitsPostDeferred",
"DrawFeaturesPostDeferred",
"DrawScreenEffects",
"DrawScreenFinal",
"DrawScreenPost",
"DrawScreen",
"DrawInMiniMap",

Expand Down
6 changes: 3 additions & 3 deletions cont/base/springcontent/LuaGadgets/gadgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1780,9 +1780,9 @@ function gadgetHandler:DrawScreenEffects(vsx, vsy)
return
end

function gadgetHandler:DrawScreenFinal(vsx, vsy)
for _,g in r_ipairs(self.DrawScreenFinalList) do
g:DrawScreenFinal(vsx, vsy)
function gadgetHandler:DrawScreenPost(vsx, vsy)
for _,g in r_ipairs(self.DrawScreenPostList) do
g:DrawScreenPost(vsx, vsy)
end
return
end
Expand Down
2 changes: 1 addition & 1 deletion doc/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Lua:
AllowDraw() if it returns false, the next draw call is skipped (only active when a game isn't running)
- Add Spring.{Set,Get}VideoCapturingMode() - this doesn't actually record the game in any way,
it just regulates the framerate and interpolations.
- Add DrawScreenFinal(vsx, vsy) unsynced callin. It's used to alter content of the frame after it's been completely rendered (i.e. World, MiniMap, Menu, UI).
- Add DrawScreenPost(vsx, vsy) unsynced callin. It's used to alter content of the frame after it's been completely rendered (i.e. World, MiniMap, Menu, UI).
Basically the frame you would get if you /screenshot it. Use it similarly to DrawScreenEffects (by ivand)

UI:
Expand Down
2 changes: 1 addition & 1 deletion rts/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ bool CGame::Draw() {
mouse->DrawCursor();

if (doDrawWorld)
eventHandler.DrawScreenFinal();
eventHandler.DrawScreenPost();
}

glEnable(GL_DEPTH_TEST);
Expand Down
2 changes: 1 addition & 1 deletion rts/Lua/LuaHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ void CLuaHandle::DrawScreenEffects()
LuaOpenGL::SetDrawingEnabled(L, false);
}

void CLuaHandle::DrawScreenFinal()
void CLuaHandle::DrawScreenPost()
{
LUA_CALL_IN_CHECK(L);
luaL_checkstack(L, 4, __func__);
Expand Down
2 changes: 1 addition & 1 deletion rts/Lua/LuaHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class CLuaHandle : public CEventClient
void DrawUnitsPostDeferred() override;
void DrawFeaturesPostDeferred() override;
void DrawScreenEffects() override;
void DrawScreenFinal() override;
void DrawScreenPost() override;
void DrawScreen() override;
void DrawInMiniMap() override;
void DrawInMiniMapBackground() override;
Expand Down
8 changes: 4 additions & 4 deletions rts/Lua/LuaOpenGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,10 +773,10 @@ void LuaOpenGL::ResetDrawScreenEffects()

/******************************************************************************/
//
// ScreenFinal -- same as Screen
// ScreenPost -- same as Screen
//

void LuaOpenGL::EnableDrawScreenFinal()
void LuaOpenGL::EnableDrawScreenPost()
{
EnableCommon(DRAW_SCREEN);
resetMatrixFunc = ResetScreenMatrices;
Expand All @@ -788,15 +788,15 @@ void LuaOpenGL::EnableDrawScreenFinal()
}


void LuaOpenGL::DisableDrawScreenFinal()
void LuaOpenGL::DisableDrawScreenPost()
{
RevertScreenLighting();
RevertScreenMatrices();
DisableCommon(DRAW_SCREEN);
}


void LuaOpenGL::ResetDrawScreenFinal()
void LuaOpenGL::ResetDrawScreenPost()
{
if (safeMode) {
ResetScreenMatrices();
Expand Down
6 changes: 3 additions & 3 deletions rts/Lua/LuaOpenGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ class LuaOpenGL {
static void ResetDrawScreenEffects();
static void DisableDrawScreenEffects();

static void EnableDrawScreenFinal();
static void ResetDrawScreenFinal();
static void DisableDrawScreenFinal();
static void EnableDrawScreenPost();
static void ResetDrawScreenPost();
static void DisableDrawScreenPost();

static void EnableDrawScreen();
static void ResetDrawScreen();
Expand Down
2 changes: 1 addition & 1 deletion rts/System/EventClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class CEventClient
virtual void DrawUnitsPostDeferred() {}
virtual void DrawFeaturesPostDeferred() {}
virtual void DrawScreenEffects() {}
virtual void DrawScreenFinal() {}
virtual void DrawScreenPost() {}
virtual void DrawScreen() {}
virtual void DrawInMiniMap() {}
virtual void DrawInMiniMapBackground() {}
Expand Down
2 changes: 1 addition & 1 deletion rts/System/EventHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ DRAW_CALLIN(GroundPostDeferred)
DRAW_CALLIN(UnitsPostDeferred)
DRAW_CALLIN(FeaturesPostDeferred)
DRAW_CALLIN(ScreenEffects)
DRAW_CALLIN(ScreenFinal)
DRAW_CALLIN(ScreenPost)
DRAW_CALLIN(Screen)
DRAW_CALLIN(InMiniMap)
DRAW_CALLIN(InMiniMapBackground)
Expand Down
2 changes: 1 addition & 1 deletion rts/System/EventHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class CEventHandler
void DrawGroundPostDeferred();
void DrawUnitsPostDeferred();
void DrawFeaturesPostDeferred();
void DrawScreenFinal();
void DrawScreenPost();
void DrawScreenEffects();
void DrawScreen();
void DrawInMiniMap();
Expand Down
2 changes: 1 addition & 1 deletion rts/System/Events.def
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
SETUP_EVENT(DrawUnitsPostDeferred, MANAGED_BIT | UNSYNCED_BIT)
SETUP_EVENT(DrawFeaturesPostDeferred, MANAGED_BIT | UNSYNCED_BIT)
SETUP_EVENT(DrawScreenEffects, MANAGED_BIT | UNSYNCED_BIT)
SETUP_EVENT(DrawScreenFinal, MANAGED_BIT | UNSYNCED_BIT)
SETUP_EVENT(DrawScreenPost, MANAGED_BIT | UNSYNCED_BIT)
SETUP_EVENT(DrawScreen, MANAGED_BIT | UNSYNCED_BIT)
SETUP_EVENT(DrawInMiniMap, MANAGED_BIT | UNSYNCED_BIT)
SETUP_EVENT(DrawInMiniMapBackground, MANAGED_BIT | UNSYNCED_BIT)
Expand Down

0 comments on commit d0396c7

Please sign in to comment.