ports: Add tuxracer port

THIS IS SUPER SLOW
This commit is contained in:
2025-06-28 20:54:22 +03:00
parent a847823411
commit f2eaab6e43
5 changed files with 136 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
diff -ruN tuxracer-0.61/src/game_config.c tuxracer-0.61-banan_os/src/game_config.c
--- tuxracer-0.61/src/game_config.c 2001-01-30 22:04:43.000000000 +0200
+++ tuxracer-0.61-banan_os/src/game_config.c 2025-06-26 03:13:06.859798526 +0300
@@ -114,26 +114,26 @@
*/
#define INIT_PARAM( nam, val, typename, commnt ) \
- Params. ## nam ## .loaded = False; \
- Params. ## nam ## .name = #nam; \
- Params. ## nam ## .deflt. ## typename ## _val = val; \
- Params. ## nam ## .comment = commnt;
+ Params.nam.loaded = False; \
+ Params.nam.name = #nam; \
+ Params.nam.deflt.typename ## _val = val; \
+ Params.nam.comment = commnt;
#define INIT_PARAM_STRING( nam, val, commnt ) \
INIT_PARAM( nam, val, string, commnt ); \
- Params. ## nam ## .type = PARAM_STRING;
+ Params.nam.type = PARAM_STRING;
#define INIT_PARAM_CHAR( nam, val, commnt ) \
INIT_PARAM( nam, val, char, commnt ); \
- Params. ## nam ## .type = PARAM_CHAR;
+ Params.nam.type = PARAM_CHAR;
#define INIT_PARAM_INT( nam, val, commnt ) \
INIT_PARAM( nam, val, int, commnt ); \
- Params. ## nam ## .type = PARAM_INT;
+ Params.nam.type = PARAM_INT;
#define INIT_PARAM_BOOL( nam, val, commnt ) \
INIT_PARAM( nam, val, bool, commnt ); \
- Params. ## nam ## .type = PARAM_BOOL;
+ Params.nam.type = PARAM_BOOL;
/*
@@ -310,13 +310,13 @@
*/
#define FN_PARAM( name, typename, type ) \
type getparam_ ## name() { \
- if ( !Params. ## name ## .loaded ) { \
- fetch_param_ ## typename( &( Params. ## name ) ); \
+ if ( !Params.name.loaded ) { \
+ fetch_param_ ## typename( &( Params.name ) ); \
} \
- return Params. ## name ## .val. ## typename ## _val; \
+ return Params.name.val.typename ## _val; \
} \
void setparam_ ## name( type val) { \
- set_param_ ## typename( &( Params. ## name ), val ); }
+ set_param_ ## typename( &( Params.name ), val ); }
#define FN_PARAM_STRING( name ) \
FN_PARAM( name, string, char* )

View File

@@ -0,0 +1,19 @@
diff -ruN tuxracer-0.61/src/debug.c tuxracer-0.61-banan_os/src/debug.c
--- tuxracer-0.61/src/debug.c 2001-01-14 00:09:50.000000000 +0200
+++ tuxracer-0.61-banan_os/src/debug.c 2025-06-26 03:18:02.090898960 +0300
@@ -165,6 +165,7 @@
/* Redirect stderr to file; taken from SDL_main.c, which is in the
public domain */
newfp = freopen(BUGREPORT_FILE, "w", stderr);
+#if !defined(__banan_os__)
if ( newfp == NULL ) { /* This happens on NT */
#if !defined(stderr)
stderr = fopen(BUGREPORT_FILE, "w");
@@ -175,6 +176,7 @@
}
#endif
}
+#endif
/* Write bug report header */
fprintf( stderr, "Tux Racer Diagnostic Log\n\n" );

View File

@@ -0,0 +1,12 @@
diff -ruN tuxracer-0.61/src/game_config.c tuxracer-0.61-banan_os/src/game_config.c
--- tuxracer-0.61/src/game_config.c 2001-01-30 22:04:43.000000000 +0200
+++ tuxracer-0.61-banan_os/src/game_config.c 2025-06-26 04:03:28.015311092 +0300
@@ -505,7 +505,7 @@
"# decreasing this number, at the cost of lower image quality." );
INIT_PARAM_BOOL(
- fullscreen, True,
+ fullscreen, False,
"# If true then the game will run in full-screen mode." );
INIT_PARAM_INT(

View File

@@ -0,0 +1,15 @@
diff -ruN tuxracer-0.61/src/winsys.c tuxracer-0.61-banan_os/src/winsys.c
--- tuxracer-0.61/src/winsys.c 2001-01-14 00:09:51.000000000 +0200
+++ tuxracer-0.61-banan_os/src/winsys.c 2025-06-26 04:05:10.894824478 +0300
@@ -392,6 +392,11 @@
}
break;
+
+ case SDL_QUIT:
+ winsys_exit(0);
+
+ break;
}
SDL_LockAudio();