Skip to content

Commit e439eee

Browse files
committed
style: Expand inline function bodies to multi-line for breakpoint-friendly formatting
1 parent a9f47a3 commit e439eee

3 files changed

Lines changed: 49 additions & 14 deletions

File tree

  • Core/GameEngine/Include/GameClient
  • GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient
  • Generals/Code/GameEngineDevice/Include/W3DDevice/GameClient

Core/GameEngine/Include/GameClient/View.h

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -336,18 +336,47 @@ class ViewLocation
336336
class ViewDummy : public View
337337
{
338338
public:
339-
virtual Drawable *pickDrawable( const ICoord2D *screen, Bool forceAttack, PickType pickType ) { return nullptr; }
340-
virtual Int iterateDrawablesInRegion( IRegion2D *screenRegion, Bool (*callback)( Drawable *draw, void *userData ), void *userData ) { return 0; }
341-
virtual void forceRedraw() {}
342-
virtual const Coord3D& get3DCameraPosition() const { static Coord3D zero = {0,0,0}; return zero; }
343-
virtual WorldToScreenReturn worldToScreenTriReturn(const Coord3D *w, ICoord2D *s ) { return WTS_INVALID; }
344-
virtual void screenToWorld( const ICoord2D *s, Coord3D *w ) {}
345-
virtual void screenToTerrain( const ICoord2D *screen, Coord3D *world ) {}
346-
virtual void screenToWorldAtZ( const ICoord2D *s, Coord3D *w, Real z ) {}
347-
virtual void drawView( void ) {}
348-
virtual void updateView(void) {}
349-
virtual void stepView() {}
350-
virtual void setGuardBandBias( const Coord2D *gb ) {}
339+
virtual Drawable *pickDrawable( const ICoord2D *screen, Bool forceAttack, PickType pickType )
340+
{
341+
return nullptr;
342+
}
343+
virtual Int iterateDrawablesInRegion( IRegion2D *screenRegion, Bool (*callback)( Drawable *draw, void *userData ), void *userData )
344+
{
345+
return 0;
346+
}
347+
virtual void forceRedraw()
348+
{
349+
}
350+
virtual const Coord3D& get3DCameraPosition() const
351+
{
352+
static Coord3D zero = {0,0,0};
353+
return zero;
354+
}
355+
virtual WorldToScreenReturn worldToScreenTriReturn(const Coord3D *w, ICoord2D *s )
356+
{
357+
return WTS_INVALID;
358+
}
359+
virtual void screenToWorld( const ICoord2D *s, Coord3D *w )
360+
{
361+
}
362+
virtual void screenToTerrain( const ICoord2D *screen, Coord3D *world )
363+
{
364+
}
365+
virtual void screenToWorldAtZ( const ICoord2D *s, Coord3D *w, Real z )
366+
{
367+
}
368+
virtual void drawView( void )
369+
{
370+
}
371+
virtual void updateView(void)
372+
{
373+
}
374+
virtual void stepView()
375+
{
376+
}
377+
virtual void setGuardBandBias( const Coord2D *gb )
378+
{
379+
}
351380

352381
// TheSuperHackers @bugfix bobtista 03/02/2026 Do not override View::xfer(). The base
353382
// implementation must run to serialize valid view state for save file compatibility.

Generals/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DInGameUI.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ class W3DInGameUI : public InGameUI
7171

7272
/// factory for views
7373
// TheSuperHackers @fix bobtista 31/01/2026 Return dummy in headless mode
74-
virtual View *createView() { return TheGlobalData->m_headless ? static_cast<View*>(NEW ViewDummy) : NEW W3DView; }
74+
virtual View *createView()
75+
{
76+
return TheGlobalData->m_headless ? static_cast<View*>(NEW ViewDummy) : NEW W3DView;
77+
}
7578

7679
virtual void drawSelectionRegion(); ///< draw the selection region on screen
7780
virtual void drawMoveHints( View *view ); ///< draw move hint visual feedback

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ class W3DInGameUI : public InGameUI
7171

7272
/// factory for views
7373
// TheSuperHackers @fix bobtista 31/01/2026 Return dummy in headless mode
74-
virtual View *createView() { return TheGlobalData->m_headless ? static_cast<View*>(NEW ViewDummy) : NEW W3DView; }
74+
virtual View *createView()
75+
{
76+
return TheGlobalData->m_headless ? static_cast<View*>(NEW ViewDummy) : NEW W3DView;
77+
}
7578

7679
virtual void drawSelectionRegion(); ///< draw the selection region on screen
7780
virtual void drawMoveHints( View *view ); ///< draw move hint visual feedback

0 commit comments

Comments
 (0)