Source/main.cpp: In function 'void chdirToAppPath(const char*)':
Source/main.cpp:581:14: warning: ignoring return value of 'int chdir(const char*)', declared with attribute warn_unused_result [-Wunused-result]
chdir(dir);
~~~~~^~~~~
CMake: Remove OggVorbis CMake module and use pkg_check_modules
We've long since moved from CMake 2.6 and require at least
CMake 3.0, which includes support for leveraging pkgconfig
modules. Let's use that for the Ogg Vorbis libraries.
Côme Chilliet [Sat, 19 Aug 2017 10:55:56 +0000 (12:55 +0200)]
Added methods for hasWeapon and isPlayerControlled
Some tests on id == 0 may be replaced by isPlayerControlled as well, but
it does not always makes sense
(I’d say stuff specific to main player should still test id == 0)
Based on some hints by the automatic dependency checking in Debian
packaging[0], it appears that, at least on Debian GNU/Linux, quite a few
of the libs that lugaru links against are not needed.
Remove linking to those libs, and use of related unneeded headers.
* For ogg/vorbis, it seems like libogg is not needed unless handling
container metadata?
* For opengl, there seems to be only a subset of the libs that are
required. Notably the glext.h header seems to only be needed on
windows for GL_GENERATE_MIPMAP, but not otherwise.
* For zlib it seems to be unused, but removing zlib.h exposed a
dependency on unistd.h which is now included directly on non-windows.
[0]
dpkg-shlibdeps: warning: package could avoid a useless dependency if
debian/lugaru/usr/games/lugaru was not linked against libz.so.1 (it uses
none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if
debian/lugaru/usr/games/lugaru was not linked against libSM.so.6 (it
uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if
debian/lugaru/usr/games/lugaru was not linked against libX11.so.6 (it
uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if
debian/lugaru/usr/games/lugaru was not linked against libogg.so.0 (it
uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if
debian/lugaru/usr/games/lugaru was not linked against libXext.so.6 (it
uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if
debian/lugaru/usr/games/lugaru was not linked against libICE.so.6 (it
uses none of the library's symbols)
The copyright notice in FindOggVorbis.cmake refers to the BSD license in
a file which is currently not included in Lugaru.
Since the BSD license requires reproduction of the license notice, add
the referenced file with the included license notice.
The COPYING-CMAKE-SCRIPTS file is copied from
svn://anonsvn.kde.org/home/kde/trunk/KDE/kdemultimedia@582599
The origin of the FindOggVorbis.cmake file can be traced to
svn://anonsvn.kde.org/home/kde/trunk/KDE/kdemultimedia@529535 and the
copyright notice and license was added in
svn://anonsvn.kde.org/home/kde/trunk/KDE/kdemultimedia@582599
CI: Rework .gitlab-ci.yml to support a CentOS 7 build
Quite a bit of the .gitlab-ci.yml file needed to be reworked so
that the commonalities between Fedora and CentOS could be leveraged
while allowing us to swap out the differences dynamically.
Thus, we can now test commits against the GCC version we use for
release builds while continuing to use latest GCC for development
builds.
As a nice side effect, there are now much fewer invocations of DNF
to install all the needed things, so CI builds should be faster!
The length of const option::Descriptor usage[] is intended to be
inferred based on the initialisation in Source/main.cpp, however, the
extern declaration in Source/Game.hpp hard-codes it to 13.
Remove the hard-coded 13 in the extern declaration, in favour of the
inferred length.
This also fixes the follwoing build failure with g++ (Debian 4.9.2-10)
4.9.2:
(...)/Source/main.cpp:602:5: error: uninitialized const member ‘option::Descriptor::index’
};
^
(...)/Source/main.cpp:602:5: warning: missing initializer for member ‘option::Descriptor::index’ [-Wmissing-field-initializers]
(...)/Source/main.cpp:602:5: error: uninitialized const member ‘option::Descriptor::type’
(...)/Source/main.cpp:602:5: warning: missing initializer for member ‘option::Descriptor::type’ [-Wmissing-field-initializers]
(...)/Source/main.cpp:602:5: error: uninitialized const member ‘option::Descriptor::shortopt’
(...)/Source/main.cpp:602:5: warning: missing initializer for member ‘option::Descriptor::shortopt’ [-Wmissing-field-initializers]
(...)/Source/main.cpp:602:5: error: uninitialized const member ‘option::Descriptor::longopt’
(...)/Source/main.cpp:602:5: warning: missing initializer for member ‘option::Descriptor::longopt’ [-Wmissing-field-initializers]
(...)/Source/main.cpp:602:5: error: uninitialized const member ‘option::Descriptor::check_arg’
(...)/Source/main.cpp:602:5: warning: missing initializer for member ‘option::Descriptor::check_arg’ [-Wmissing-field-initializers]
(...)/Source/main.cpp:602:5: warning: missing initializer for member ‘option::Descriptor::help’ [-Wmissing-field-initializers]
CMakeFiles/lugaru.dir/build.make:54: recipe for target 'CMakeFiles/lugaru.dir/Source/main.cpp.o' failed
Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Rémi Verschelde [Sat, 11 Feb 2017 14:28:38 +0000 (15:28 +0100)]
Devtools: Add clotheslist cmd and fix devkeys in console
The `clotheslist` and `clotheslistnear` can be used to list the
clothes (and their tint) of a player in the terminal.
The other fix prevents text input in the console from activating
devtools hotkeys (e.g. "p" placing a player).
Rémi Verschelde [Wed, 1 Feb 2017 21:46:11 +0000 (22:46 +0100)]
Devtools: Fix scaling issue with creature type change
Now the `wolfie` command and the [Ctrl+]Alt+Shift+T command behave similarly
by making wolves 15% bigger than rabbits. The duplicate `wolfieisgod` command
was dropped, and the logic for the hotkey was simplified (it was bogus).
Rémi Verschelde [Sat, 28 Jan 2017 12:12:21 +0000 (13:12 +0100)]
Dialogs: Fix long lines overflowing the box
I just reduced their scale factor from 1.5 to 1.4, which seems to work fine.
Also took the opportunity to cleanup the string management while I was trying
to understand what the code does.
Rémi Verschelde [Wed, 4 Jan 2017 17:28:04 +0000 (18:28 +0100)]
Console: Return gracefully when loading missing level
For this, implemented Folders::file_exists to check for the existence
of a given file, so that we can exit gracefully before raising a FileNotFound
exception which then closes the game.
The console and stderr both display an error message.
Part of #23.
Rémi Verschelde [Tue, 3 Jan 2017 22:18:58 +0000 (23:18 +0100)]
Use a mono font for the console text
This makes the console text more readable, as its case is quite important
and the original font uses small capital letters for lower case, which are
hard to read.
The font used is Libration Mono with height 32 and some antialiasing.
Bitmap font generated with CBFG. Liberation Mono is under the SIL Open
Font License version 1.1.
Côme Chilliet [Tue, 3 Jan 2017 00:48:18 +0000 (01:48 +0100)]
Fixed bushes appearing above ground on first level loaded
This was because Setenvironment was done after objects loading,
and this is were terrain heightmap is built.
This might be related to the appearing inside a rock bug, not sure.