This fixes the build on 32-bit FreeBSD releases, which were failing like this:
src/CReplayData.cpp: In member function 'void ReplayData::printReplayInformation()':
src/CReplayData.cpp:41: error: invalid conversion from 'long int*' to 'const time_t*'
src/CReplayData.cpp:41: error: initializing argument 1 of 'tm* localtime(const time_t*)'
Guus Sliepen [Sat, 21 Nov 2015 17:07:56 +0000 (18:07 +0100)]
Fix hub pointer motion.
Use mouse motion events to find out where the mouse is. This doesn't
require scaling with the window size anymore, unlike
SDL_GetMouseState(). Also, don't use SDL_WarpMouseInWindow() anymore, it
doesn't seem to work correctly anymore. Instead, just update our idea of
the mouse pointer's position.
Guus Sliepen [Sat, 21 Nov 2015 15:12:41 +0000 (16:12 +0100)]
Add bounds checking to map->isFoo() functions.
The Address Sanitizer found a possible out of bounds read while playing
Blobwars:
src/CMap.cpp:147:15: runtime error: index 300 out of bounds for type 'unsigned char [300]'
src/CMap.cpp:117:16: runtime error: index 300 out of bounds for type 'unsigned char [300]'
Guus Sliepen [Sun, 9 Aug 2015 22:46:24 +0000 (00:46 +0200)]
Redo music credits during the game.
Create a surface containing the credits on demand, and keep it around in
memory until they faded out. Also do proper alpha blending so it is
slightly less disturbing.
Guus Sliepen [Sun, 9 Aug 2015 21:27:18 +0000 (23:27 +0200)]
Remove font size guessing hack.
According to the documentation, the point size given to TTF_OpenFont()
is always assuming 72 DPI, so there is no need to repeatedly trying to
load the font and checking the font metrics until we hit upon a point
size that matches the pixel size we want. Instead we can just give the
corresponding point size directly.
Guus Sliepen [Sun, 9 Aug 2015 18:19:31 +0000 (20:19 +0200)]
Fix grenades going backwards when the player is moving.
Most weapon bullets have a speed which is much higher than the player
can move, but grenades are relatively slow. Since Bob started moving
faster many versions ago, grenades were actually slower than Bob
himself. Since there was no concept of bullets inheriting the speed of
the entity shooting them, that meant that when Bob was moving forward
and tried to throw a grenade, the grenade would actually move backwards
relative to Bob.
We fix that now by making grenades inherit the velocity of the entity
throwing them. Unfortunately, a player that is on a moving platform is
considered not to have any velocity, even if the platform is moving. In
stead of rewriting everything to track the actual velocity of entities
on platforms, we just check if the grenade throwing entity is on a
platform, and if so add the platform's velocity to the grenade.
With the old starting velocity of grenades plus Bob's own speed,
grenades could actually be thrown very fast. Compensate that by making
the starting velocity of grenades much lower. It might make some puzzles
involving grenades a bit harder.
Guus Sliepen [Sun, 9 Aug 2015 16:28:26 +0000 (18:28 +0200)]
Fix throwing grenades from moving platforms.
The train and obstacle collision code made a distinction between
horizontally moving entities (which covers bullets and lasers), and
vertically moving entities (falling items?), but didn't handle
diagonally moving entities correctly, like grenades.
Guus Sliepen [Sun, 9 Aug 2015 12:31:26 +0000 (14:31 +0200)]
Make the window resizable, and set a reasonable initial size.
Now that SDL takes care of properly scaling the graphics, there is no
need for the window to be exactly 640x480. So allow the user to resize
it. To cope with high DPI screens, set the initial window size to a
multiple of 640x480 if it would fill less than half the width and
height.
Tim Dickson [Sun, 7 Jul 2013 16:32:44 +0000 (18:32 +0200)]
Updated PNG icon files.
The PNG files under icons directory are not square, so that when KDE shows them
they get stretched. I have created updated icon files for 16x16,
32x32,48x48,64x64 to replace the 16x12,32,24,missing, and 64,48 icons.
blobwars currently FTBFS with clang 3.1 (the full build log can be found at
http://clang.debian.net/logs/2012-06-23/blobwars_1.19-2_unstable_clang.log).
The attached patch should fix this issue.
Alan Trulock [Thu, 4 Aug 2011 14:07:21 +0000 (16:07 +0200)]
Don't use sdlmain in the pak tool
On Mac OS X, compiling pak from the command line works as expected but
compiling in Xcode results in bus errors when running the program. By patching
pak.h and linking only to libz within Xcode, pak compiles and runs as expected.
Alan Trulock [Thu, 4 Aug 2011 14:01:12 +0000 (16:01 +0200)]
Incorrect reference to SDL_FRMEWORK
There are two references to SDL_FRAMEWORK that should have been written
FRAMEWORK_SDL. In CGame.cpp, I think the section should be removed in it's
entirety as there is really no need for it and correcting the define results in
failure when compiling. In init.cpp, correcting the define allows Mac OS X
builds to assign a custom icon. If this is not fixed, the icon gets replaced
every time the game is run.
Guus Sliepen [Mon, 28 Feb 2011 12:09:40 +0000 (13:09 +0100)]
Update credits for the song Herbs, originally Claustrophobia from LizardKing.
LizardKing is the original composer of the song "Claustrophobia", which was
only slightly modified by Ambick and redistributed as "Herbs". LizardKing has
given permission to use his song under the CC-BY-SA 3.0 license, which allows
Ambick's version, but it does require proper attribution.
Hans de Goede [Mon, 14 Feb 2011 11:58:50 +0000 (12:58 +0100)]
Add doc/samples which more accurately tracks samples origin
doc/samples more accurately lists the origin of various samples, including
things like original filenames or full URL-s where possible. It also notes
if changes were made to the original and which changes were made.
This commit also adds the .sfxr files which can be opened in sfxr to edit
the sfxr generated effects.
Hans de Goede [Mon, 14 Feb 2011 11:22:07 +0000 (12:22 +0100)]
Fix -Wunused-result compiler warnings
Fedora uses -Wunused-result when building packages, combined with the -Werror
from the makefile, this causes compile errors in various places because
of not properly error checking various file io actions. This patch fixes this.