mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Extreme Tux Racer: add recipe for 0.6 version
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = 0,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Extreme TuxRacer",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon array {
|
||||
$"6E6369660C02011602B549E3BB4FA03D7300B76D064A62A049211900AEFE3805"
|
||||
$"FF020112033C60000000000000003C20004A10004A200000FFB457FF5EFFFF00"
|
||||
$"02000602B65550B91C6B3CCD80BA1A20482C2B4A0C7E01E69906FFF4C90C0501"
|
||||
$"0200060238C25636E97BBA55633C36054A327442812700A7FF00FF187F00035B"
|
||||
$"1616040066020006033BB42837570AB7570A3BB428495FD7CACACC007546031D"
|
||||
$"BD7105FF754603036A0202020006020000003B90A3BB90A30000004E827A4897"
|
||||
$"0A00FFDCDCFFFF000004015C16061AEEBABBBBBBEE0E48483F51C186C513BD58"
|
||||
$"C7DC33562F5530562E543152334F3148314C314533413539323BBBD6BCA5393D"
|
||||
$"3E3C3C3CBFE73C443D4D3645365436553F5544C837C05CC804C25A5449564CC7"
|
||||
$"F9C3E6C929C5485A505D55CBAFC7BC5C56575452524D56C621C803C3BDC90246"
|
||||
$"575052C4D2C853C769C58953494E43544349430606EE0E3A534150BEC9C72545"
|
||||
$"4D48494D464A46534653494B565352435A0606FE0E47464A44C2FEC1B1C433C1"
|
||||
$"204F42C54342C61A4252445143534555464F4BC6F3C4704B4A0604EE47414A3D"
|
||||
$"473D4D3D4E414A454F4547450604EE4F42513D4E3D553D554153445544504406"
|
||||
$"0DDEEEED0233443242BA47C0FABA14C02F3F2F3FB95ABF7A2C3E293C263FB600"
|
||||
$"BEE9B4A0BFE522412443B46AC096B4CFC160452943B57AC13FB7ABC0A62F4230"
|
||||
$"44B933C0E8B998C1E431470607B62B3F3D393B39BE68BD11BD39BCDF39383839"
|
||||
$"BCDFBCC0BC47BD26363A3A3D0604BA3F223A303F323B324332443008023F353F"
|
||||
$"2F04032E3846374A3948344D324F0604EE49424A4149414B414B424A434B4349"
|
||||
$"4304032E55465049C72B49C4FB49474602044030C34530BC3A30304030BC3A30"
|
||||
$"C3454050BC3A50C34550504050C34550BC3A0606FF07B62EB4FCB62EB4FCB62E"
|
||||
$"BCB0B62ECC18B62EC464B6D8CC18B82CCC18B782CC18B82CC464B82CB4FCB82C"
|
||||
$"BCB0B782B4FCB62EB4FCB6D8B4FCB62EB4FCB4FC0606FF072624262426BC0726"
|
||||
$"5C26C378B5EC5C2A5CB6745C2AC3782A242ABC07B674242624B5EC2426242406"
|
||||
$"06FF072624262426BC07265C26C378B5EC5C2A5CB6745C2AC3782A242ABC07B6"
|
||||
$"74242624B5EC242624240605FF01CA3BBBDACA3BBBDAC440B9F5B84BB62BBE46"
|
||||
$"B810B84BB9F5B84BC188B84BBDBFBE46BFA4CA3BBBDAC440BDBFCA3BBBDABBDA"
|
||||
$"0605FF01C92FBB41C92FBB41C334B95CB73DB592BD38B777B73DB95CB73DC0EF"
|
||||
$"B73DBD26BD38BF0BC92FBB41C334BD26C92FBB41BB410605FF01C92FBB41C92F"
|
||||
$"BB41C334B95CB73DB592BD38B777B73DB95CB73DC0EFB73DBD26BD38BF0BC92F"
|
||||
$"BB41C334BD26C92FBB41BB410A042E3530363C33302F0A0440344C344D323F32"
|
||||
$"0A05583E5A42603F603A5738180A0B03151413000A06010812401E6D00000000"
|
||||
$"00003FEA0AC8657E32D15501178300040A04010712401E6D0000000000003FEA"
|
||||
$"0AC8657E32D15501178300040A05010702401E6D0000000000003FEA0AC8657E"
|
||||
$"32D1550A0601081240C40600000000000040C7EF46D0373F32B501178300040A"
|
||||
$"0401071240C40600000000000040C7EF46D0373F32B501178200040A05010702"
|
||||
$"40C40600000000000040C7EF46D0373F32B50A07010D023C47EE000000000000"
|
||||
$"3C50274986F1418DE70A04010E123C47EE0000000000003C50274986F1418DE7"
|
||||
$"01178600040A08010F023C47EE0000000000003C50274986F1418DE70A070110"
|
||||
$"123C47EE0000000000003C50274986F1418DE701178422040A090111123C47EE"
|
||||
$"0000000000003C50274986F1418DE701178922040A0A0112023C47EE00000000"
|
||||
$"00003C50274986F1418DE70A0B010C024110000000000000003FE000C6600048"
|
||||
$"10000A040600010204060530202201178303040A030206052020220A01010120"
|
||||
$"20220A0001002020220A010203042020220A04010A30212201158200040A0401"
|
||||
$"0A30282201158200040A0301022020220A04010930202201178100040A04010B"
|
||||
$"3020220117810004"
|
||||
};
|
||||
95
games-action/extreme_tuxracer/extreme_tuxracer-0.6.recipe
Normal file
95
games-action/extreme_tuxracer/extreme_tuxracer-0.6.recipe
Normal file
@@ -0,0 +1,95 @@
|
||||
SUMMARY="High speed arctic racing game based on Tux Racer"
|
||||
DESCRIPTION="Extreme Tux Racer is a racing game in which the player must control Tux across a \
|
||||
mountainside. Tux can turn left, right, brake, jump, and paddle, and flap his wings. If the \
|
||||
player presses the brakes and turn buttons, Tux will perform a tight turn. Pressing the paddling \
|
||||
buttons on the ground gives Tux some additional speed. The paddling stops giving speed and in turn \
|
||||
slows Tux down when the speedometer turns yellow. Tux can slide off slopes or charge his jumps to \
|
||||
temporarily launch into midair, during which he can flap his flippers to fly farther and adjust \
|
||||
his direction left or right. The player can also reset the penguin should he be stuck in any \
|
||||
part of the course.
|
||||
|
||||
This is fork of extremetuxracer, focussing on cross-platform, performance & OpenGL-ES support"
|
||||
HOMEPAGE="https://github.com/RKSimon/extremetuxracer"
|
||||
COPYRIGHT="2000-2014 Sunspire Studios"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
gitRevision="ff576bc46ea92093b35d708ad657aa994a6789d2"
|
||||
SOURCE_URI="https://github.com/RKSimon/extremetuxracer/archive/$gitRevision.tar.gz"
|
||||
CHECKSUM_SHA256="33e2d218800f3e70ecd76cbf975f84f131139ce86851691667a723dfb9a4f6c7"
|
||||
SOURCE_DIR="extremetuxracer-$gitRevision"
|
||||
PATCHES="extreme_tuxracer-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="extreme-tuxracer.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
extreme_tuxracer$secondaryArchSuffix = $portVersion
|
||||
app:ETR$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libGLU$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_image_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_mixer_2.0$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libGLU$secondaryArchSuffix
|
||||
devel:libSDL2$secondaryArchSuffix
|
||||
devel:libSDL2_image$secondaryArchSuffix
|
||||
devel:libSDL2_mixer$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i "s|/usr/include/freetype2|/system/$relativeIncludeDir -I/system/$relativeIncludeDir/freetype2|" \
|
||||
$sourceDir/Makefile
|
||||
sed -i "s|/usr/lib|/system/$relativeDevelopLibDir|" \
|
||||
$sourceDir/Makefile
|
||||
sed -i "s|BIN = etr|BIN = ExtremeTuxRacer|" \
|
||||
$sourceDir/Makefile
|
||||
sed -i "s|-lSDL2|-lSDL2 -lbe|" \
|
||||
$sourceDir/Makefile
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/ExtremeTuxRacer
|
||||
|
||||
cp -rf {ExtremeTuxRacer,data} $appsDir/ExtremeTuxRacer
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.extreme-tuxracer"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/extreme-tuxracer.rdef.in > $sourceDir/extreme-tuxracer.rdef
|
||||
|
||||
addResourcesToBinaries $sourceDir/extreme-tuxracer.rdef $appsDir/ExtremeTuxRacer/ExtremeTuxRacer
|
||||
|
||||
addAppDeskbarSymlink $appsDir/ExtremeTuxRacer/ExtremeTuxRacer "Extreme Tux Racer"
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
From 0b0d7fc17b2e861aedcdb84cbddd73fd2e8ab68d Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 31 May 2020 14:24:42 +1000
|
||||
Subject: Fixes for Haiku
|
||||
|
||||
|
||||
diff --git a/bh.h b/bh.h
|
||||
index 4c366ac..498d3a8 100644
|
||||
--- a/bh.h
|
||||
+++ b/bh.h
|
||||
@@ -33,7 +33,9 @@ GNU General Public License for more details.
|
||||
#define HAVE_GL_GLX_H
|
||||
//#define HAVE_GL_GLES1
|
||||
#define HAVE_SYS_TIME_H
|
||||
+#ifndef __HAIKU__
|
||||
#define USE_STENCIL_BUFFER
|
||||
+#endif
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// includes
|
||||
diff --git a/game_config.cpp b/game_config.cpp
|
||||
index edad5ba..7696dc4 100644
|
||||
--- a/game_config.cpp
|
||||
+++ b/game_config.cpp
|
||||
@@ -47,6 +47,12 @@ Then edit the below functions:
|
||||
#include "course.h"
|
||||
#include "game_ctrl.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <libgen.h>
|
||||
+#include <Path.h>
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
TParam param;
|
||||
|
||||
|
||||
@@ -92,8 +98,13 @@ void LoadConfigFile () {
|
||||
}
|
||||
|
||||
void SetConfigDefaults () {
|
||||
+#ifdef __HAIKU__
|
||||
+ param.fullscreen = false;
|
||||
+ param.res_type = 1;
|
||||
+#else
|
||||
param.fullscreen = true;
|
||||
param.res_type = 0; // 0=auto / 1=800x600 / 2=1024x768 ...
|
||||
+#endif
|
||||
param.perf_level = 3; // detail level
|
||||
param.language = 0;
|
||||
param.sound_volume = 100;
|
||||
@@ -293,6 +304,19 @@ void InitConfig (char *arg0) {
|
||||
param.config_dir = "config";
|
||||
param.data_dir = "data";
|
||||
param.configfile = param.config_dir + SEP + "options.txt";
|
||||
+#elif defined(__HAIKU__)
|
||||
+ BPath settings_dir;
|
||||
+ if (!find_directory(B_USER_SETTINGS_DIRECTORY, &settings_dir, true, NULL))
|
||||
+ settings_dir.SetTo("/boot/home/config/settings/");
|
||||
+ settings_dir.Append("ExtremeTuxRacer");
|
||||
+ param.prog_dir = dirname(realpath(arg0, NULL));
|
||||
+
|
||||
+ param.config_dir = settings_dir.Path();
|
||||
+ if (!DirExists (param.config_dir.c_str()))
|
||||
+ mkdir (param.config_dir.c_str(), 0775);
|
||||
+
|
||||
+ param.data_dir = param.prog_dir + SEP + "data";
|
||||
+ param.configfile = param.config_dir + SEP + "options";
|
||||
#else
|
||||
char buff[256];
|
||||
if (strcmp (arg0, "./etr") == 0) { // start from work directory
|
||||
diff --git a/winsys.cpp b/winsys.cpp
|
||||
index ab60089..60d8696 100644
|
||||
--- a/winsys.cpp
|
||||
+++ b/winsys.cpp
|
||||
@@ -135,22 +135,31 @@ void CWinsys::SetupVideoMode (TScreenRes resolution) {
|
||||
#if !defined(HAVE_GL_GLES1)
|
||||
window_flags |= SDL_WINDOW_OPENGL;
|
||||
#endif
|
||||
+#ifdef __HAIKU__
|
||||
+ window_flags |= SDL_WINDOW_SHOWN;
|
||||
+ if (window !=NULL) {
|
||||
+ SaveConfigFile ();
|
||||
+ string appname = param.prog_dir + SEP + "ExtremeTuxRacer &";
|
||||
+ system(appname.c_str());
|
||||
+ Quit();
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
- window = SDL_CreateWindow(WINDOW_TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, resolution.width, resolution.height, window_flags);
|
||||
+ window = SDL_CreateWindow(WINDOW_TITLE, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, resolution.width, resolution.height, window_flags);
|
||||
if (NULL == window) {
|
||||
Message ("couldn't initialize video", SDL_GetError());
|
||||
Message ("set to 800 x 600");
|
||||
- window = SDL_CreateWindow (WINDOW_TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, window_flags);
|
||||
+ window = SDL_CreateWindow (WINDOW_TITLE, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, window_flags);
|
||||
param.res_type = 1;
|
||||
SaveConfigFile ();
|
||||
}
|
||||
-
|
||||
+#ifndef __HAIKU__
|
||||
renderer = SDL_CreateRenderer(window, -1, 0);
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderPresent(renderer);
|
||||
-
|
||||
+#endif
|
||||
SDL_GetWindowSize(window, ¶m.x_resolution, ¶m.y_resolution);
|
||||
if (resolution.width == 0 && resolution.height == 0) {
|
||||
auto_x_resolution = param.x_resolution;
|
||||
--
|
||||
2.26.0
|
||||
|
||||
Reference in New Issue
Block a user