Skip to content

Commit 19abff2

Browse files
Stubbjaxgithubawn
authored andcommitted
bugfix(battleplan): Battle plans are now transferred to the new owner on capture (TheSuperHackers#2257)
1 parent 90afd63 commit 19abff2

5 files changed

Lines changed: 264 additions & 50 deletions

File tree

GeneralsMD/Code/GameEngine/Include/GameClient/Display.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class Display : public SubsystemInterface
113113
virtual Bool isClippingEnabled() = 0;
114114
virtual void enableClipping( Bool onoff ) = 0;
115115

116+
virtual void beginBatch() { }
117+
virtual void endBatch() { }
118+
virtual Bool isBatching() { return m_isBatching; }
119+
116120
virtual void step() {}; ///< Do one fixed time step
117121
virtual void draw() override; ///< Redraw the entire display
118122
virtual void setTimeOfDay( TimeOfDay tod ) = 0; ///< Set the time of day for this display
@@ -187,6 +191,7 @@ class Display : public SubsystemInterface
187191
UnsignedInt m_width, m_height; ///< Dimensions of the display
188192
UnsignedInt m_bitDepth; ///< bit depth of the display
189193
Bool m_windowed; ///< TRUE when windowed, FALSE when fullscreen
194+
Bool m_isBatching;
190195
View *m_viewList; ///< All of the views into the world
191196

192197
// Cinematic text data

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,6 +1269,8 @@ void GameWindowManager::winRepaint()
12691269
{
12701270
GameWindow *window, *next;
12711271

1272+
TheDisplay->beginBatch();
1273+
12721274
// draw below windows
12731275
for( window = m_windowTail; window; window = next )
12741276
{
@@ -1299,6 +1301,8 @@ void GameWindowManager::winRepaint()
12991301

13001302
if(TheTransitionHandler)
13011303
TheTransitionHandler->draw();
1304+
1305+
TheDisplay->endBatch();
13021306
}
13031307

13041308
//-------------------------------------------------------------------------------------------------

GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DDisplay.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Render2DClass;
4545
class RTS3DScene;
4646
class RTS2DScene;
4747
class RTS3DInterfaceScene;
48+
class TextureClass;
4849

4950

5051
//=============================================================================
@@ -81,6 +82,9 @@ class W3DDisplay : public Display
8182
virtual void step() override; ///< Do one fixed time step
8283
virtual void draw() override; ///< redraw the entire display
8384

85+
virtual void beginBatch();
86+
virtual void endBatch();
87+
8488
/// @todo Replace these light management routines with a LightManager singleton
8589
virtual void createLightPulse( const Coord3D *pos, const RGBColor *color, Real innerRadius,Real outerRadius,
8690
UnsignedInt increaseFrameTime, UnsignedInt decayFrameTime//, Bool donut = FALSE
@@ -168,6 +172,11 @@ class W3DDisplay : public Display
168172
Bool m_isClippedEnabled; ///<used by 2D drawing operations to define clip re
169173
Real m_averageFPS; ///<average fps over the last 30 frames.
170174
Real m_currentFPS; ///<current fps value.
175+
176+
TextureClass *m_batchTexture;
177+
DrawImageMode m_batchMode;
178+
Bool m_batchGrayscale;
179+
171180
#if defined(RTS_DEBUG)
172181
Int64 m_timerAtCumuFPSStart;
173182
#endif

0 commit comments

Comments
 (0)