Skip to content

Commit f0723d9

Browse files
committed
update stuntcar patches
1 parent df670df commit f0723d9

File tree

3 files changed

+36
-15
lines changed

3 files changed

+36
-15
lines changed

package/batocera/ports/stuntcar/002-controller-text.patch

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,65 @@
1-
diff -Naur stuntcarremake-f90f3851a44872c874baade0aad7206ce860f1c8.orig/StuntCarRacer.cpp stuntcarremake-f90f3851a44872c874baade0aad7206ce860f1c8/StuntCarRacer.cpp
2-
--- stuntcarremake-f90f3851a44872c874baade0aad7206ce860f1c8.orig/StuntCarRacer.cpp 2021-07-18 14:49:34.000000000 +0100
3-
+++ stuntcarremake-f90f3851a44872c874baade0aad7206ce860f1c8/StuntCarRacer.cpp 2021-10-26 07:21:06.768284363 +0100
4-
@@ -1138,8 +1138,7 @@
1+
diff --git a/StuntCarRacer.cpp b/StuntCarRacer.cpp
2+
index d9af897..1c13283 100755
3+
--- a/StuntCarRacer.cpp
4+
+++ b/StuntCarRacer.cpp
5+
@@ -505,6 +505,9 @@ ID3DXFont *g_pFontLarge = NULL; // Font for drawing large text
6+
/* Returns: Scaling factor (1.0 = base resolution, 2.0 = double size, etc.) */
7+
/* ======================================================================================= */
8+
9+
+ID3DXSprite *g_pSprite = NULL; // Sprite for batching draw text calls
10+
+#endif
11+
+
12+
// Helper function to get text scale based on current resolution
13+
float GetTextScale()
14+
{
15+
@@ -513,8 +516,6 @@ float GetTextScale()
16+
float base_width = wideScreen ? (float)BASE_WIDTH_WIDESCREEN : (float)BASE_WIDTH_STANDARD;
17+
return (float)current_width / base_width;
18+
}
19+
-ID3DXSprite *g_pSprite = NULL; // Sprite for batching draw text calls
20+
-#endif
21+
22+
#ifndef linux
23+
//--------------------------------------------------------------------------------------
24+
@@ -1196,8 +1197,7 @@ static void HandleTrackMenu( CDXUTTextHelper &txtHelper )
525
// output instructions
626
const D3DSURFACE_DESC *pd3dsdBackBuffer = DXUTGetBackBufferSurfaceDesc();
7-
txtHelper.SetInsertionPos( 2+(wideScreen?10:0), pd3dsdBackBuffer->Height-15*8 );
27+
txtHelper.SetInsertionPos( (int)((2+(wideScreen?10:0)) * textScale), (int)(pd3dsdBackBuffer->Height-15*8*textScale) );
828
- txtHelper.DrawFormattedTextLine( L"Current track - " STRING L". Press 'S' to select, Escape to quit", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));
929
- txtHelper.DrawTextLine( L"'L' to switch Super League On/Off");
1030
+ txtHelper.DrawFormattedTextLine( L"Current track - " STRING L". Press 'Start' to select", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));
1131

1232
if (((keyPress >= firstMenuOption) && (keyPress <= lastMenuOption)) || (keyPress == LEAGUEMENU))
1333
{
14-
@@ -1196,19 +1195,9 @@
15-
// output instructions
34+
@@ -1255,19 +1255,9 @@ static void HandleTrackPreview( CDXUTTextHelper &txtHelper )
1635
const D3DSURFACE_DESC *pd3dsdBackBuffer = DXUTGetBackBufferSurfaceDesc();
17-
txtHelper.SetInsertionPos( 2+(wideScreen?10:0), pd3dsdBackBuffer->Height-15*9 );
36+
float textScale = GetTextScale();
37+
txtHelper.SetInsertionPos( (int)((2+(wideScreen?10:0)) * textScale), (int)(pd3dsdBackBuffer->Height-15*9*textScale) );
1838
- txtHelper.DrawFormattedTextLine( L"Selected track - " STRING L". Press 'S' to start game", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));
1939
- txtHelper.DrawTextLine( L"'M' for track menu, Escape to quit");
2040
- txtHelper.DrawTextLine( L"(Press F4 to change scenery, F9 / F10 to adjust frame rate)" );
2141
+ txtHelper.DrawFormattedTextLine( L"Selected track - " STRING L". Press 'Start' to start game", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));
2242

23-
txtHelper.SetInsertionPos( 2+(wideScreen?10:0), pd3dsdBackBuffer->Height-15*6 );
43+
txtHelper.SetInsertionPos( (int)((2+(wideScreen?10:0)) * textScale), (int)(pd3dsdBackBuffer->Height-15*6*textScale) );
2444
- txtHelper.DrawTextLine( L"Keyboard controls during game :-" );
2545
- #if defined(PANDORA) || defined(PYRA)
2646
- txtHelper.DrawTextLine( L" DPad = Steer, (X) = Accelerate, (B) = Brake, (R) = Nitro" );
2747
- #else
28-
- txtHelper.DrawTextLine( L" S = Steer left, D = Steer right, Enter = Accelerate, Space = Brake" );
48+
- txtHelper.DrawTextLine( L" Arrow left = Steer left, Arrow right = Steer right, Space = Accelerate, Arrow Down = Brake" );
2949
- #endif
3050
- txtHelper.DrawTextLine( L" R = Point car in opposite direction, P = Pause, O = Unpause" );
3151
- txtHelper.DrawTextLine( L" M = Back to track menu, Escape = Quit" );
3252

3353
if (keyPress == STARTMENU)
3454
{
35-
@@ -1346,10 +1335,10 @@
36-
txtHelperLarge.SetInsertionPos( 250+(wideScreen?80:0), pd3dsdBackBuffer->Height-25*13 );
55+
@@ -1411,10 +1401,10 @@ void RenderText( double fTime )
56+
txtHelperLarge.SetInsertionPos( (int)((250+(wideScreen?80:0)) * textScale), (int)(pd3dsdBackBuffer->Height-25*13*textScale) );
3757
txtHelperLarge.DrawTextLine( L"GAME OVER" );
38-
txtHelperLarge.SetInsertionPos( 132+(wideScreen?80:0), pd3dsdBackBuffer->Height-25*11 );
58+
txtHelperLarge.SetInsertionPos( (int)((132+(wideScreen?80:0)) * textScale), (int)(pd3dsdBackBuffer->Height-25*11*textScale) );
3959
- txtHelperLarge.DrawTextLine( L"Press 'M' for track menu" );
4060
+ txtHelperLarge.DrawTextLine( L"Press 'Select' for track menu" );
4161
#else
42-
txtHelperLarge.SetInsertionPos( 124+(wideScreen?80:0), pd3dsdBackBuffer->Height-25*12 );
62+
txtHelperLarge.SetInsertionPos( (int)((124+(wideScreen?80:0)) * textScale), (int)(pd3dsdBackBuffer->Height-25*12*textScale) );
4363
- txtHelperLarge.DrawTextLine( L"GAME OVER: Press 'M' for track menu" );
4464
+ txtHelperLarge.DrawTextLine( L"GAME OVER: Press 'Select' for track menu" );
4565
#endif

package/batocera/ports/stuntcar/stuntcar.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
################################################################################
66
# Version: Commits on Dec 01, 2025
7-
STUNTCAR_VERSION = 5f7300242e713c36aca10e372a6fc3de7bbb28dc
7+
STUNTCAR_VERSION = d2fa3ad31e456bd44736d98d00f99ab627ec7ebc
88
STUNTCAR_SITE = $(call github,ptitSeb,stuntcarremake,$(STUNTCAR_VERSION))
99

1010
STUNTCAR_DEPENDENCIES = sdl2 sdl2_mixer sdl2_ttf openal

scripts/blacklist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ noto-cjk-fonts.mk
1313
openbor6412.mk
1414
openbor7142.mk
1515
python-pyxel.mk
16+
stuntcar.mk
1617
wine-cachyos.mk
1718
wine-custom.mk
1819
wine-native.mk

0 commit comments

Comments
 (0)