Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class W3DDebugIcons : public RenderObjClass
virtual bool Cast_Ray(RayCollisionTestClass & raytest);

virtual void Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const;
virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const;
virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const;

protected:
VertexMaterialClass *m_vertexMaterialClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ class W3DDisplay : public Display
virtual ~W3DDisplay() override;

virtual void init() override; ///< initialize or re-initialize the system
virtual void reset() override; ///< Reset system
virtual void reset() override; ///< Reset system

virtual void setWidth( UnsignedInt width ) override;
virtual void setHeight( UnsignedInt height ) override;
virtual Bool setDisplayMode( UnsignedInt xres, UnsignedInt yres, UnsignedInt bitdepth, Bool windowed ) override;
virtual Int getDisplayModeCount() override; ///<return number of display modes/resolutions supported by video card.
virtual void getDisplayModeDescription(Int modeIndex, Int *xres, Int *yres, Int *bitDepth) override; ///<return description of mode
virtual void setGamma(Real gamma, Real bright, Real contrast, Bool calibrate) override;
virtual void setGamma(Real gamma, Real bright, Real contrast, Bool calibrate) override;
virtual void doSmartAssetPurgeAndPreload(const char* usageFileName) override;
#if defined(RTS_DEBUG)
virtual void dumpAssetUsage(const char* mapname);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class W3DDisplayString : public DisplayString
protected:

void checkForChangedTextData(); /**< called when we need to update our
render sentence and update extents */
render sentence and update extents */
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this on main, and I like it this way more. The goal is to remove leading spaces (convert to semantically the same indentation in tabs) only in this PR - I think aligning multiline things to previous line spots like open parens will be another PR.

void usingResources( UnsignedInt frame ); /**< call this whenever display
resources are in use */
resources are in use */
void computeExtents(); ///< compupte text width and height

Render2DSentenceClass m_textRenderer; ///< for drawing text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class W3DGameClient : public GameClient
/// factory for creating the font library
virtual FontLibrary *createFontLibrary() override { return NEW W3DFontLibrary; }

/// Manager for display strings
/// Manager for display strings
virtual DisplayStringManager *createDisplayStringManager() override { return NEW W3DDisplayStringManager; }
#ifdef RTS_HAS_FFMPEG
virtual VideoPlayerInterface *createVideoPlayer() { return NEW FFmpegVideoPlayer; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MirrorRenderObjClass : public RenderObjClass
// virtual Bool Intersect_OBBox(OBBoxIntersectionTestClass & boxtest);

virtual void Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const;
virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const;
virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const;

///allocate W3D resources needed to render mirror
Int init(Real waterLevel, Real dx, Real dy, SceneClass *parentScene);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class W3DStatusCircle : public RenderObjClass
// virtual Bool Intersect_OBBox(OBBoxIntersectionTestClass & boxtest);

virtual void Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const override;
virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const override;
virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const override;


// virtual int Get_Num_Polys() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class W3DVolumetricShadow : public Shadow
const W3DShadowGeometry *getGeometry() {return m_geometry;}

void setRenderObject( RenderObjClass *robj) {assert(m_robj==nullptr); m_robj=robj;}
void setRenderObjExtent ( Real extent) { m_robjExtent = extent; }
void setRenderObjExtent ( Real extent) { m_robjExtent = extent; }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right


// called once per frame, updates shadow volume when necessary
void Update();
Expand Down Expand Up @@ -156,7 +156,7 @@ class W3DVolumetricShadow : public Shadow
RenderObjClass *m_robj; ///<render object belonging to model casting shadow

Real m_shadowLengthScale; ///<scale factor used to reduce/clamp shadow length
Real m_robjExtent; ///<maximum possible horizontal reach of shadow from center of object.
Real m_robjExtent; ///<maximum possible horizontal reach of shadow from center of object.
Real m_extraExtrusionPadding; ///<amount to extrude shadow beyond where it would normally stop (ground level below object).

//
Expand All @@ -176,11 +176,11 @@ class W3DVolumetricShadow : public Shadow

// silhouette building space
Short *m_silhouetteIndex[MAX_SHADOW_CASTER_MESHES]; // silhouette vertex index list, edges occur
// as disjoint pairs. The actual size of this
// piece of memory must accommodate #vertices*2
// as disjoint pairs. The actual size of this
// piece of memory must accommodate #vertices*2
Short m_numSilhouetteIndices[MAX_SHADOW_CASTER_MESHES]; // total number of edge indices in the index
// array, these are pairs and therefore
// always a multiple of two
// array, these are pairs and therefore
// always a multiple of two
Short m_maxSilhouetteEntries[MAX_SHADOW_CASTER_MESHES]; // how big the silhouette index can hold max

Int m_numIndicesPerMesh[MAX_SHADOW_CASTER_MESHES]; ///<silhouette indices from each mesh.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class W3DWaypointBuffer


private:
void setDefaultLineStyle();
void setDefaultLineStyle();

RenderObjClass *m_waypointNodeRobj;
SegmentedLineClass *m_line;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Win32GameEngine : public GameEngine
protected:

virtual GameLogic *createGameLogic() override; ///< factory for game logic
virtual GameClient *createGameClient() override; ///< factory for game client
virtual GameClient *createGameClient() override; ///< factory for game client
virtual ModuleFactory *createModuleFactory() override; ///< factory for creating modules
virtual ThingFactory *createThingFactory() override; ///< factory for the thing factory
virtual FunctionLexicon *createFunctionLexicon() override; ///< factory for function lexicon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ void W3DMainMenuRandomTextDraw( GameWindow *window, WinInstanceData *instData )
textOutlineColor = window->winGetDisabledTextBorderColor();
// draw the text

if( !(tData->text && (textColor != WIN_COLOR_UNDEFINED)) )
if( !(tData->text && (textColor != WIN_COLOR_UNDEFINED)) )
return;

DisplayString *text = tData->text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void W3DGadgetProgressBarDraw( GameWindow *window, WinInstanceData *instData )
Int progress = (Int)window->winGetUserData();

// get window size and position
window->winGetScreenPosition( &origin.x, &origin.y );
window->winGetScreenPosition( &origin.x, &origin.y );
window->winGetSize( &size.x, &size.y );

// get the right colors to use
Expand Down Expand Up @@ -190,7 +190,7 @@ void W3DGadgetProgressBarImageDrawA( GameWindow *window, WinInstanceData *instDa
Int xOffset, yOffset;
Int i;
// get window size and position
window->winGetScreenPosition( &origin.x, &origin.y );
window->winGetScreenPosition( &origin.x, &origin.y );
window->winGetSize( &size.x, &size.y );

// get offset
Expand Down Expand Up @@ -234,7 +234,7 @@ void W3DGadgetProgressBarImageDraw( GameWindow *window, WinInstanceData *instDat
Int i;

// get window size and position
window->winGetScreenPosition( &origin.x, &origin.y );
window->winGetScreenPosition( &origin.x, &origin.y );
window->winGetSize( &size.x, &size.y );

// get offset
Expand Down Expand Up @@ -385,7 +385,7 @@ void W3DGadgetProgressBarImageDraw( GameWindow *window, WinInstanceData *instDat
barWindowSize.y = size.y;

pieces = barWindowSize.x / barCenter->getImageWidth();
// draw the pieces
// draw the pieces
start.x = origin.x +10;
start.y = origin.y + yOffset +5;
end.y = start.y + size.y - 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ void W3DGadgetPushButtonImageDrawOne( GameWindow *window,
TheDisplay->drawImage( hilitedOverlayIcon, start.x, start.y, start.x + size.x, start.y + size.y );
}
}
else if( BitIsSet( instData->getState(), WIN_STATE_SELECTED ) )
{
//The button appears to be pushed -- CHECK_LIKE buttons that are on.
TheDisplay->drawImage( pushedOverlayIcon, start.x, start.y, start.x + size.x, start.y + size.y );
}
else if( BitIsSet( instData->getState(), WIN_STATE_SELECTED ) )
{
//The button appears to be pushed -- CHECK_LIKE buttons that are on.
TheDisplay->drawImage( pushedOverlayIcon, start.x, start.y, start.x + size.x, start.y + size.y );
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void W3DGadgetStaticTextDraw( GameWindow *window, WinInstanceData *instData )
}

// draw the text
if( tData->text && (textColor != WIN_COLOR_UNDEFINED) )
if( tData->text && (textColor != WIN_COLOR_UNDEFINED) )
drawStaticTextText( window, instData, textColor, textOutlineColor );


Expand Down Expand Up @@ -255,7 +255,7 @@ void W3DGadgetStaticTextImageDraw( GameWindow *window, WinInstanceData *instData
}

// draw the text
if( tData->text && (textColor != WIN_COLOR_UNDEFINED) )
if( tData->text && (textColor != WIN_COLOR_UNDEFINED) )
drawStaticTextText( window, instData, textColor, textOutlineColor );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ typedef struct _NeighborEdge
Short neighborIndex; // index of polygon who is our neighbor, if there is
// not a neighbor it contains NO_NEIGHBOR
Short neighborEdgeIndex[ 2 ]; // the two vertex indices that represent the
// shared edge
// shared edge

} NeighborEdge;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ void W3DCustomEdging::loadEdgingsInVertexAndIndexBuffers(WorldHeightMap *pMap, I
#ifdef FLIP_TRIANGLES // jba - reduces "diamonding" in some cases, not others. Better cliffs, though.
if (flipForBlend) {
*curIb++ = startVertex + 1;
*curIb++ = startVertex + yOffset;
*curIb++ = startVertex + yOffset;
*curIb++ = startVertex ;
*curIb++ = startVertex + 1;
*curIb++ = startVertex + 1+yOffset;
*curIb++ = startVertex + 1;
*curIb++ = startVertex + 1+yOffset;
*curIb++ = startVertex + yOffset;
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void W3DDebugIcons::Render(RenderInfoClass & rinfo)
UnsignedShort *curIb = ib;

// VertexFormatXYZNDUV2 *curVb = vb;
Real shadeR, shadeG, shadeB;
Real shadeR, shadeG, shadeB;
shadeR = 0;
shadeG = 0;
shadeB = 255;
Expand Down
Loading