Thread: progress
View Single Post
Re: progress
Old
  (#184)
tschumann
Moderator
 
tschumann's Avatar
 
Status: Offline
Posts: 270
Join Date: Apr 2011
Location: Australia
Default Re: progress - 01-06-2019

Quote:
Originally Posted by RoboCop View Post
Also I've been looking at your src code and didn't find anything wrong. But I've figured that the optimisation flags may need altered a bit.

Code:
-O2 -march=i686 -mtune=generic -msse2 -mfpmath=sse -fomit-frame-pointer -finline-functions \
-falign-loops=2 -falign-jumps=2 -falign-functions=2 -pipe -m32 \
As for Windows builds, I've been using the newer VS 2019 as well been analysing any potential coding issues. It seems possible that the bot.cpp is not dependant on the 'cbase.h' header. Plus my VS2019 gave me some warning messages on 'bot_t::bot_t()' in line 1832 contains uninitialised members, for whatever it means to me... But my ReSharper C++ suggested on the solution to fix that warning message by typing this into this line:-

Or by using a different method for Sandbot. Also I've noticed h_export.cpp had depreciation warnings on 'strcmpi' but I think the best way is to add near h_export line 22 is this:-

Code:
#ifdef WIN32
#define strcmpi _strcmpi
#endif
Even though those alterations to the code didn't effect the VS2019 compiler as it gave less warning messages, but I cannot guarantee that it will work better for Windows Servers. Besides it was tricky and painful as Sandbot Linux had problems with the CXX ABI errors as having Sandbot not compiled with GCC/G++ 4.8 or earlier caused those CXX ABI errors. Due to the Steam Runtime Libs being outdated, unlike Sven Coop v5 that has most of the up to date libs and its own custom modified Svengine from GoldSrc.
Thanks - why remove -mmmx and -msse though? Are they implied by something else?
There's an init function that sets all those things that the constructor should set - it's a change I'll get around to sooner or later. There's plenty of messy and non-performant code that I want to fix but I've been concentrating on features for now (converting HBP Bot which was mostly C to C++ is still in progress).

Quote:
Originally Posted by The Storm View Post
The C++ runtime can be statically linked to the binary. This will resolve all problems with
the ABI. It will also increase the binary size of the final .so file but nowadays that is really not as issue.
Yeah I couldn't figure out how to do this last time I looked into it.

Quote:
Originally Posted by RoboCop View Post
@tschumann

Also I've been using the trial version of PVS Studio Analyser on SandBot and spotted a few performance issues here:-
I'm not sure about some of those changes - they may be possible but for safety I think the declarations are compatible with how the engine has them declared.
  
Reply With Quote