|
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 ) |
5 | 25 | // output instructions |
6 | 26 | 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) ); |
8 | 28 | - txtHelper.DrawFormattedTextLine( L"Current track - " STRING L". Press 'S' to select, Escape to quit", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID))); |
9 | 29 | - txtHelper.DrawTextLine( L"'L' to switch Super League On/Off"); |
10 | 30 | + txtHelper.DrawFormattedTextLine( L"Current track - " STRING L". Press 'Start' to select", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID))); |
11 | 31 |
|
12 | 32 | if (((keyPress >= firstMenuOption) && (keyPress <= lastMenuOption)) || (keyPress == LEAGUEMENU)) |
13 | 33 | { |
14 | | -@@ -1196,19 +1195,9 @@ |
15 | | - // output instructions |
| 34 | +@@ -1255,19 +1255,9 @@ static void HandleTrackPreview( CDXUTTextHelper &txtHelper ) |
16 | 35 | 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) ); |
18 | 38 | - txtHelper.DrawFormattedTextLine( L"Selected track - " STRING L". Press 'S' to start game", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID))); |
19 | 39 | - txtHelper.DrawTextLine( L"'M' for track menu, Escape to quit"); |
20 | 40 | - txtHelper.DrawTextLine( L"(Press F4 to change scenery, F9 / F10 to adjust frame rate)" ); |
21 | 41 | + txtHelper.DrawFormattedTextLine( L"Selected track - " STRING L". Press 'Start' to start game", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID))); |
22 | 42 |
|
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) ); |
24 | 44 | - txtHelper.DrawTextLine( L"Keyboard controls during game :-" ); |
25 | 45 | - #if defined(PANDORA) || defined(PYRA) |
26 | 46 | - txtHelper.DrawTextLine( L" DPad = Steer, (X) = Accelerate, (B) = Brake, (R) = Nitro" ); |
27 | 47 | - #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" ); |
29 | 49 | - #endif |
30 | 50 | - txtHelper.DrawTextLine( L" R = Point car in opposite direction, P = Pause, O = Unpause" ); |
31 | 51 | - txtHelper.DrawTextLine( L" M = Back to track menu, Escape = Quit" ); |
32 | 52 |
|
33 | 53 | if (keyPress == STARTMENU) |
34 | 54 | { |
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) ); |
37 | 57 | 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) ); |
39 | 59 | - txtHelperLarge.DrawTextLine( L"Press 'M' for track menu" ); |
40 | 60 | + txtHelperLarge.DrawTextLine( L"Press 'Select' for track menu" ); |
41 | 61 | #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) ); |
43 | 63 | - txtHelperLarge.DrawTextLine( L"GAME OVER: Press 'M' for track menu" ); |
44 | 64 | + txtHelperLarge.DrawTextLine( L"GAME OVER: Press 'Select' for track menu" ); |
45 | 65 | #endif |
|
0 commit comments