Skip to content

Commit fcf59f3

Browse files
committed
style: Fix script edge cases and re-run on Core and Dependencies
Improve conversion script to handle: - Inline assembly blocks (skip entirely) - Tabs-then-spaces alignment (preserve as-is) - Mixed space-before-tab indentation (use tab count) - Mid-line block comment opens (track for next line) Manually fix tree-sitter depth errors in AIPathfind.cpp and TerrainVisual.cpp caused by heavy preprocessor conditionals.
1 parent dc6aec9 commit fcf59f3

149 files changed

Lines changed: 917 additions & 781 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Core/GameEngine/Include/Common/AudioSettings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct AudioSettings
6060
Int m_streamCount;
6161
Bool m_use3DSoundRangeVolumeFade; // TheSuperHackers @feature Enables 3D sound range volume fade as originally intended
6262
Real m_3DSoundRangeVolumeFadeExponent; // TheSuperHackers @feature Sets 3D sound range volume fade exponent for non-linear fade.
63-
// The higher the exponent, the sharper the decline at the max range.
63+
// The higher the exponent, the sharper the decline at the max range.
6464
Int m_globalMinRange;
6565
Int m_globalMaxRange;
6666
Int m_drawableAmbientFrames;

Core/GameEngine/Include/Common/GameAudio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ class AudioManager : public SubsystemInterface
245245

246246
virtual Bool has3DSensitiveStreamsPlaying() const = 0;
247247

248-
virtual void *getHandleForBink() = 0;
249-
virtual void releaseHandleForBink() = 0;
248+
virtual void *getHandleForBink() = 0;
249+
virtual void releaseHandleForBink() = 0;
250250

251251
// this function will play an audio event rts by loading it into memory. It should not be used
252252
// by anything except for the load screens.

Core/GameEngine/Include/Common/crc.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,42 +73,42 @@ class CRC
7373

7474
#if !(defined(_MSC_VER) && _MSC_VER < 1300)
7575
// C++ version left in for reference purposes
76-
for (UnsignedByte *uintPtr=(UnsignedByte *)buf;len>0;len--,uintPtr++)
76+
for (UnsignedByte *uintPtr=(UnsignedByte *)buf;len>0;len--,uintPtr++)
7777
{
7878
int hibit;
7979
if (crc & 0x80000000)
8080
{
81-
hibit = 1;
82-
}
81+
hibit = 1;
82+
}
8383
else
8484
{
85-
hibit = 0;
86-
}
85+
hibit = 0;
86+
}
8787

88-
crc <<= 1;
89-
crc += *uintPtr;
90-
crc += hibit;
88+
crc <<= 1;
89+
crc += *uintPtr;
90+
crc += hibit;
9191
}
9292
#else
9393
// ASM version, verified by comparing resulting data with C++ version data
9494
unsigned *crcPtr=&crc;
95-
_asm
96-
{
97-
mov esi,[buf]
98-
mov ecx,[len]
99-
dec ecx
95+
_asm
96+
{
97+
mov esi,[buf]
98+
mov ecx,[len]
99+
dec ecx
100100
mov edi,[crcPtr]
101-
mov ebx,dword ptr [edi]
102-
xor eax,eax
101+
mov ebx,dword ptr [edi]
102+
xor eax,eax
103103
lp:
104104
mov al,byte ptr [esi]
105-
shl ebx,1
105+
shl ebx,1
106106
inc esi
107107
adc ebx,eax
108108
dec ecx
109109
jns lp
110110
mov dword ptr [edi],ebx
111-
};
111+
};
112112
#endif
113113
}
114114

Core/GameEngine/Include/Common/file.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -141,37 +141,37 @@ class File : public MemoryPoolObject
141141
virtual void close(); ///< Close the file !!! File object no longer valid after this call !!!
142142

143143
virtual Int read( void *buffer, Int bytes ) = 0 ; /**< Read the specified number of bytes from the file in to the
144-
* memory pointed at by buffer. Returns the number of bytes read.
145-
* Returns -1 if an error occurred.
146-
*/
144+
* memory pointed at by buffer. Returns the number of bytes read.
145+
* Returns -1 if an error occurred.
146+
*/
147147
virtual Int readChar() = 0 ; /**< Read a character from the file
148-
* Returns the character converted to an integer.
149-
* Returns EOF if an error occurred.
150-
*/
148+
* Returns the character converted to an integer.
149+
* Returns EOF if an error occurred.
150+
*/
151151
virtual Int readWideChar() = 0 ; /**< Read a wide character from the file
152-
* Returns the wide character converted to an integer.
153-
* Returns wide EOF if an error occurred.
154-
*/
152+
* Returns the wide character converted to an integer.
153+
* Returns wide EOF if an error occurred.
154+
*/
155155
virtual Int write( const void *buffer, Int bytes ) = 0 ; /**< Write the specified number of bytes from the
156-
* memory pointed at by buffer to the file. Returns the number of bytes written.
157-
* Returns -1 if an error occurred.
158-
*/
156+
* memory pointed at by buffer to the file. Returns the number of bytes written.
157+
* Returns -1 if an error occurred.
158+
*/
159159
virtual Int writeFormat( const Char* format, ... ) = 0 ; /**< Write an unterminated formatted string to the file
160-
* Returns the number of bytes written.
161-
* Returns -1 if an error occurred.
162-
*/
160+
* Returns the number of bytes written.
161+
* Returns -1 if an error occurred.
162+
*/
163163
virtual Int writeFormat( const WideChar* format, ... ) = 0 ; /**< Write an unterminated formatted wide character string to the file
164-
* Returns the number of bytes written.
165-
* Returns -1 if an error occurred.
166-
*/
164+
* Returns the number of bytes written.
165+
* Returns -1 if an error occurred.
166+
*/
167167
virtual Int writeChar( const Char* character ) = 0 ; /**< Write a character to the file
168-
* Returns a copy of the character written.
169-
* Returns EOF if an error occurred.
170-
*/
168+
* Returns a copy of the character written.
169+
* Returns EOF if an error occurred.
170+
*/
171171
virtual Int writeChar( const WideChar* character ) = 0 ; /**< Write a wide character to the file
172-
* Returns a copy of the wide character written.
173-
* Returns wide EOF if an error occurred.
174-
*/
172+
* Returns a copy of the wide character written.
173+
* Returns wide EOF if an error occurred.
174+
*/
175175
virtual Int seek( Int bytes, seekMode mode = CURRENT ) = 0; /**< Sets the file position of the next read/write operation. Returns the new file
176176
* position as the number of bytes from the start of the file.
177177
* Returns -1 if an error occurred.

Core/GameEngine/Include/GameClient/GameWindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ friend class GameWindowManager;
250250
Int winActivate(); ///< pop window to top of list and activate
251251
Int winBringToTop(); ///< bring this window to the top of the win list
252252
Int winEnable( Bool enable ); /**< enable/disable a window, a disbled
253-
window can be seen but accepts no input */
253+
window can be seen but accepts no input */
254254
Bool winGetEnabled(); ///< Is window enabled?
255255
Int winHide( Bool hide ); ///< hide/unhide a window
256256
Bool winIsHidden(); ///< is this window hidden/

Core/GameEngine/Include/GameClient/Keyboard.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ class Keyboard : public SubsystemInterface
9999

100100
// you may extend the functionality of these for your device
101101
virtual void init() override; /**< initialize the keyboard, only extend this
102-
functionality, do not replace */
102+
functionality, do not replace */
103103
virtual void reset() override; ///< Reset keyboard system
104104
virtual void update() override; /**< gather current state of all keys, extend
105-
this functionality, do not replace */
105+
this functionality, do not replace */
106106
virtual Bool getCapsState() = 0; ///< get state of caps lock key, return TRUE if down
107107

108108
virtual void createStreamMessages(); /**< given state of device, create

Core/GameEngine/Include/GameClient/Mouse.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ struct MouseIO
103103
UnsignedInt time; ///< The time that this message was posted.
104104

105105
Int wheelPos; /**< mouse wheel position, 0 is no event, + is up/away from
106-
user while - is down/toward user */
106+
user while - is down/toward user */
107107
ICoord2D deltaPos; ///< overall change in mouse pointer this frame
108108

109109
MouseButtonState leftState; // button state: None (no event), Up, Down, DoubleClick
@@ -278,8 +278,8 @@ class Mouse : public SubsystemInterface
278278
virtual void initCursorResources()=0; ///< needed so Win32 cursors can load resources before D3D device created.
279279

280280
virtual void createStreamMessages(); /**< given state of device, create
281-
messages and put them on the
282-
stream for the raw state. */
281+
messages and put them on the
282+
stream for the raw state. */
283283

284284
virtual void draw() override; ///< draw the mouse
285285
virtual void setPosition( Int x, Int y ); ///< set the mouse position

Core/GameEngine/Include/GameClient/ParticleSys.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,14 +840,14 @@ class ParticleSystemManager : public SubsystemInterface,
840840
class ParticleSystemManagerDummy : public ParticleSystemManager
841841
{
842842
public:
843-
Int getOnScreenParticleCount() override { return 0; }
844-
void doParticles(RenderInfoClass &rinfo) override {}
845-
void queueParticleRender() override {}
843+
virtual Int getOnScreenParticleCount() override { return 0; }
844+
virtual void doParticles(RenderInfoClass &rinfo) override {}
845+
virtual void queueParticleRender() override {}
846846

847847
protected:
848-
void crc( Xfer *xfer ) override {}
849-
void xfer( Xfer *xfer ) override {}
850-
void loadPostProcess() override {}
848+
virtual void crc( Xfer *xfer ) override {}
849+
virtual void xfer( Xfer *xfer ) override {}
850+
virtual void loadPostProcess() override {}
851851
};
852852

853853
/// The particle system manager singleton

Core/GameEngine/Include/GameClient/Snow.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ extern OVERRIDE<WeatherSetting> TheWeatherSetting;
8181
class SnowManager : public SubsystemInterface
8282
{
8383
public :
84-
enum{
84+
enum{
8585
SNOW_NOISE_X=64, //dimensions table holding noise function used for initial snow positions.
8686
SNOW_NOISE_Y=64, //dimensions table holding noise function used for initial snow positions.
8787
};
8888

89-
SnowManager();
89+
SnowManager();
9090
virtual ~SnowManager() override;
9191

9292
virtual void init() override;

Core/GameEngine/Include/GameClient/VideoPlayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class VideoStream : public VideoStreamInterface
193193

194194
public:
195195

196-
virtual VideoStreamInterface* next() override; ///< Returns next open stream
196+
virtual VideoStreamInterface* next() override; ///< Returns next open stream
197197
virtual void update() override; ///< Update stream
198198
virtual void close() override; ///< Close and free stream
199199

0 commit comments

Comments
 (0)