astromenace: bump version

This commit is contained in:
Gerasim Troeglazov
2023-07-18 23:48:14 +10:00
parent f81b2a0ad3
commit d24bd4f8af
3 changed files with 110 additions and 113 deletions

View File

@@ -13,9 +13,9 @@ Features:
HOMEPAGE="https://viewizard.com/"
COPYRIGHT="Mikhail Kurinnoi"
LICENSE="GNU GPL v3"
REVISION="3"
REVISION="1"
SOURCE_URI="https://github.com/viewizard/astromenace/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="0aca5211c9f333acf698807f597e5ad8e9d1455ba8ad202940890bff5b6c9507"
CHECKSUM_SHA256="616622cc1da07a7d827c0fb94b90b7c9a36a1e7d1e68002ed3aaf2a12b9a99aa"
SOURCE_DIR="astromenace-$portVersion"
PATCHES="astromenace-$portVersion.patchset"
ADDITIONAL_FILES="astromenace.rdef.in"

View File

@@ -1,111 +0,0 @@
From 490b13eecc71ba7d3f327004c967efadab0d577e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 6 Nov 2019 22:25:54 +1000
Subject: Haiku fixes
diff --git a/src/game/game.cpp b/src/game/game.cpp
old mode 100755
new mode 100644
index a5edbaf..45e1e2c
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -200,8 +200,11 @@ void InitGame()
GameExperience = (GameConfig().Profile[CurrentProfile].Experience - GameConfig().Profile[CurrentProfile].ByMissionExperience[CurrentMission]) * 1.0f;
// grab mouse control for both - windows and fullscren mode (need this for multi-monitor systems)
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_TRUE);
+#else
SDL_SetWindowGrab(vw_GetSDLWindow(), SDL_TRUE);
-
+#endif
// сбрасываем все кнопки мыши
vw_ResetMouseButtons();
@@ -349,7 +352,11 @@ void RealExitGame()
vw_ReleaseParticleSystem(Shild2);
// release mouse control
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_FALSE);
+#else
SDL_SetWindowGrab(vw_GetSDLWindow(), SDL_FALSE);
+#endif
}
//------------------------------------------------------------------------------------
@@ -547,7 +554,11 @@ void DrawGame()
SetShowGameCursor(true);
// release mouse control
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_FALSE);
+#else
SDL_SetWindowGrab(vw_GetSDLWindow(), SDL_FALSE);
+#endif
SDL_WarpMouseInWindow(vw_GetSDLWindow(), LastMouseXR, LastMouseYR);
}
// плавно возвращаем игре сокрость
@@ -563,7 +574,11 @@ void DrawGame()
GameMenuStatus = eGameMenuStatus::GAME_MENU;
// grab mouse control for both - windows and fullscren mode (need this for multi-monitor systems)
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_TRUE);
+#else
SDL_SetWindowGrab(vw_GetSDLWindow(), SDL_TRUE);
+#endif
SDL_WarpMouseInWindow(vw_GetSDLWindow(), LastMouseXR, LastMouseYR);
}
// останавливаем игру
diff --git a/src/main.cpp b/src/main.cpp
index cc55f81..87555cf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -97,6 +97,11 @@ static bool VideoConfig(bool FirstStart)
}
if (FirstStart) {
+#ifdef __HAIKU__
+ ChangeGameConfig().Width = 1024;
+ ChangeGameConfig().Height = 600;
+ ChangeGameConfig().Fullscreen = false;
+#else
if (!DetectFullscreenSize().empty()) {
ChangeGameConfig().Width = DetectFullscreenSize().back().Width;
ChangeGameConfig().Height = DetectFullscreenSize().back().Height;
@@ -106,6 +111,7 @@ static bool VideoConfig(bool FirstStart)
ChangeGameConfig().Height = DetectWindowSizeArray().back().Height;
ChangeGameConfig().Fullscreen = false;
}
+#endif
return true;
}
@@ -151,6 +157,14 @@ static bool CheckOpenGLCapabilities(bool FirstStart)
}
if (FirstStart) {
+#ifdef __HAIKU__
+ ChangeGameConfig().UseGLSL120 = false;
+ ChangeGameConfig().ShadowMap = 0;
+ ChangeGameConfig().MSAA = 0;
+ ChangeGameConfig().CSAA = 0;
+ ChangeGameConfig().MaxPointLights = 1;
+ ChangeGameConfig().AnisotropyLevel = 0;
+#else
if (vw_DevCaps().OpenGL_3_0_supported) {
ChangeGameConfig().UseGLSL120 = true;
ChangeGameConfig().ShadowMap = 1;
@@ -165,6 +179,7 @@ static bool CheckOpenGLCapabilities(bool FirstStart)
ChangeGameConfig().CSAA = 4;
ChangeGameConfig().MaxPointLights = 6;
}
+#endif
}
// NOTE in future, use std::clamp (since C++17)
--
2.23.0

View File

@@ -0,0 +1,108 @@
From 9f8b075d0f8db58b34799019749cf5007aa6b2f1 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 18 Jul 2023 23:43:53 +1000
Subject: Haiku fixes
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 0837c84..c472b24 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -201,7 +201,11 @@ void InitGame()
GameExperience = (GameConfig().Profile[CurrentProfile].Experience - GameConfig().Profile[CurrentProfile].ByMissionExperience[CurrentMission]) * 1.0f;
// grab mouse control for both - windows and fullscren mode (need this for multi-monitor systems)
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_TRUE);
+#else
SDL_SetWindowGrab(reinterpret_cast<SDL_Window*>(vw_GetSDLWindow()), SDL_TRUE);
+#endif
vw_ResetMouseButtons();
@@ -340,7 +344,11 @@ void RealExitGame()
vw_ReleaseParticleSystem(Shild2);
// release mouse control
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_FALSE);
+#else
SDL_SetWindowGrab(reinterpret_cast<SDL_Window*>(vw_GetSDLWindow()), SDL_FALSE);
+#endif
}
//------------------------------------------------------------------------------------
@@ -531,7 +539,11 @@ void DrawGame()
SetShowGameCursor(true);
// release mouse control
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_FALSE);
+#else
SDL_SetWindowGrab(reinterpret_cast<SDL_Window*>(vw_GetSDLWindow()), SDL_FALSE);
+#endif
SDL_WarpMouseInWindow(reinterpret_cast<SDL_Window*>(vw_GetSDLWindow()), LastMouseXR, LastMouseYR);
}
// smooth increase game speed
@@ -548,7 +560,11 @@ void DrawGame()
GameMenuStatus = eGameMenuStatus::GAME_MENU;
// grab mouse control for both - windows and fullscren mode (need this for multi-monitor systems)
+#ifdef __HAIKU__
+ SDL_SetRelativeMouseMode(SDL_TRUE);
+#else
SDL_SetWindowGrab(reinterpret_cast<SDL_Window*>(vw_GetSDLWindow()), SDL_TRUE);
+#endif
SDL_WarpMouseInWindow(reinterpret_cast<SDL_Window*>(vw_GetSDLWindow()), LastMouseXR, LastMouseYR);
}
// set game speed to zero (should looks like all 3D objects are freeze in time)
diff --git a/src/main.cpp b/src/main.cpp
index e112ef5..8b1e787 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -100,6 +100,11 @@ static bool VideoConfig(bool FirstStart)
}
if (FirstStart) {
+#ifdef __HAIKU__
+ ChangeGameConfig().Width = 1024;
+ ChangeGameConfig().Height = 600;
+ ChangeGameConfig().Fullscreen = false;
+#else
if (!DetectFullscreenSize().empty()) {
ChangeGameConfig().Width = DetectFullscreenSize().back().Width;
ChangeGameConfig().Height = DetectFullscreenSize().back().Height;
@@ -109,6 +114,7 @@ static bool VideoConfig(bool FirstStart)
ChangeGameConfig().Height = DetectWindowSizeArray().back().Height;
ChangeGameConfig().Fullscreen = false;
}
+#endif
return true;
}
@@ -157,6 +163,14 @@ static bool CheckOpenGLCapabilities(bool FirstStart)
FirstStart = false;
#endif
if (FirstStart) {
+#ifdef __HAIKU__
+ ChangeGameConfig().UseGLSL120 = false;
+ ChangeGameConfig().ShadowMap = 0;
+ ChangeGameConfig().MSAA = 0;
+ ChangeGameConfig().CSAA = 0;
+ ChangeGameConfig().MaxPointLights = 1;
+ ChangeGameConfig().AnisotropyLevel = 0;
+#else
if (vw_DevCaps().OpenGL_3_0_supported) {
ChangeGameConfig().UseGLSL120 = true;
ChangeGameConfig().ShadowMap = 1;