Skip to content

Commit

Permalink
Bumping version to 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
frranck committed Aug 11, 2019
1 parent 09208c7 commit 8f67ebf
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 28 deletions.
16 changes: 11 additions & 5 deletions Assets/mrboom.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ Bomberman is controlled with the keyboard or with (up to 8) joypads.

<launchable type="desktop-id">mrboom.desktop</launchable>

<screenshots>
<screenshot type="default">
<image>http://mrboom.mumblecore.org/mrb5.png</image>
</screenshot>
</screenshots>

<url type="homepage">http://mrboom.mumblecore.org</url>
<project_group>GNOME</project_group>
Expand All @@ -30,6 +25,11 @@ Bomberman is controlled with the keyboard or with (up to 8) joypads.
</provides>

<releases>
<release version="4.8" date="2019-08-11">
<description>
<p>Fixed window resizing</p>
</description>
</release>
<release version="4.5" date="2018-04-14">
<description>
<p>Fixed joypads</p>
Expand All @@ -42,4 +42,10 @@ Bomberman is controlled with the keyboard or with (up to 8) joypads.
</description>
</release>
</releases>
<screenshots>
<screenshot type="default">http://mrboom.mumblecore.org/screenshot.png</screenshot>
</screenshots>
<developer_name>Remdy Software</developer_name>
<project_license>MIT</project_license>
<metadata_license>CC0-1.0</metadata_license>
</component>
2 changes: 1 addition & 1 deletion Assets/mrboom.libretro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Libretro]
Type=Game
Version=4.7
Version=4.8
Name=MrBoom
Icon=mrboom
Module=mrboom_libretro.so
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ make install
```
- Linux Debian/Ubuntu family:
```sh
apt-get install build-essential libsdl2-dev libmodplug-dev libsdl2-mixer-dev libminizip-dev
apt-get install build-essential libsdl2-dev libopenmpt-modplug-dev libsdl2-mixer-dev libminizip-dev
make clean
make mrboom LIBSDL2=1
make install
```
- Linux RedHat family:
```sh
yum install SDL2-devel SDL2_mixer-devel minizip-devel libmodplug-devel
yum install SDL2-devel SDL2_mixer-devel minizip-devel libopenmpt-modplug-devel
make clean
make mrboom LIBSDL2=1
make install
Expand Down
2 changes: 1 addition & 1 deletion common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
extern "C" {
#endif
#define GAME_NAME "Mr.Boom"
#define GAME_VERSION "4.7"
#define GAME_VERSION "4.8"
#define PATH_MAX_LENGTH 256
#define WIDTH 320
#define HEIGHT 200
Expand Down
48 changes: 29 additions & 19 deletions sdl2/sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ loop()
width = e.window.data1;
height = e.window.data2;
float aspectRatio = (float)width / (float)height;
if (abs(aspectRatio - ASPECT_RATIO)>0.1)
if (abs(aspectRatio - ASPECT_RATIO) > 0.1)
{
if (aspectRatio < ASPECT_RATIO)
{
Expand All @@ -450,9 +450,11 @@ loop()
}
log_debug("Setting window size to %d, %d, aspect ratio: %f\n",
width, height, (float)width / (float)height);
} else {
log_debug("skip resize %f %f\n", aspectRatio, ASPECT_RATIO);
break;
}
else
{
log_debug("skip resize %f %f\n", aspectRatio, ASPECT_RATIO);
break;
}
screen.w = width;
screen.h = height;
Expand Down Expand Up @@ -656,18 +658,22 @@ loop()
mrboom_update_input(button_start, getPlayerFromJoystickPort(e.jbutton.which), 1, false);
anyStartButtonPushedMask = anyStartButtonPushedMask | (1 << e.jbutton.which);
break;

case 10:
mrboom_update_input(button_up, getPlayerFromJoystickPort(e.jbutton.which), 1, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
break;

case 11:
mrboom_update_input(button_down, getPlayerFromJoystickPort(e.jbutton.which), 1, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
break;

case 12:
mrboom_update_input(button_left, getPlayerFromJoystickPort(e.jbutton.which), 1, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
break;

case 13:
mrboom_update_input(button_right, getPlayerFromJoystickPort(e.jbutton.which), 1, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
Expand Down Expand Up @@ -719,18 +725,22 @@ loop()
mrboom_update_input(button_start, getPlayerFromJoystickPort(e.jbutton.which), 0, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
break;

case 10:
mrboom_update_input(button_up, getPlayerFromJoystickPort(e.jbutton.which), 0, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
break;

case 11:
mrboom_update_input(button_down, getPlayerFromJoystickPort(e.jbutton.which), 0, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
break;

case 12:
mrboom_update_input(button_left, getPlayerFromJoystickPort(e.jbutton.which), 0, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
break;

case 13:
mrboom_update_input(button_right, getPlayerFromJoystickPort(e.jbutton.which), 0, false);
anyStartButtonPushedMask = anyStartButtonPushedMask & ~(1 << e.jbutton.which);
Expand Down Expand Up @@ -1199,47 +1209,47 @@ main(int argc, char **argv)
{
/* Create the window and renderer */
#ifndef FULLSCREEN
#ifdef RESIZABLE
#ifdef RESIZABLE
window = SDL_CreateWindow(GAME_NAME,
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
WIDTH * 3, HEIGHT * 3,
SDL_WINDOW_RESIZABLE
);
);
windowID = SDL_GetWindowID(window);
#else
SDL_DisplayMode DM;
SDL_GetCurrentDisplayMode(0, &DM);
int displayWidth = DM.w;
int displayWidth = DM.w;
int displayHeight = DM.h;

float aspectRatio = (float)displayWidth / (float)displayHeight;
float height;
float width;
if (aspectRatio < ASPECT_RATIO)
{
width = displayWidth;
height = (1.f / ASPECT_RATIO) * displayWidth;
}
else
{
width = ASPECT_RATIO * displayHeight;
height = displayHeight;
}
{
width = displayWidth;
height = (1.f / ASPECT_RATIO) * displayWidth;
}
else
{
width = ASPECT_RATIO * displayHeight;
height = displayHeight;
}

window = SDL_CreateWindow(GAME_NAME,
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
width, height,
SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN
);
SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN
);
#endif
#else
// FULLSCREEN
window = SDL_CreateWindow(GAME_NAME,
SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED,
WIDTH, HEIGHT,
SDL_WINDOW_FULLSCREEN | SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED
SDL_WINDOW_FULLSCREEN | SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED
);
#endif

Expand Down

0 comments on commit 8f67ebf

Please sign in to comment.