Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rio compilation #1

Open
tothpaul opened this issue Dec 23, 2020 · 5 comments
Open

Rio compilation #1

tothpaul opened this issue Dec 23, 2020 · 5 comments

Comments

@tothpaul
Copy link

Fix for Rio compilation...but the game doesn't seems to work

---
 Engine/DWScript/dwsRTTIExposer.pas        | 2 +-
 Engine/FixedDX11Header/FMX.Canvas.D2D.pas | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Engine/DWScript/dwsRTTIExposer.pas b/Engine/DWScript/dwsRTTIExposer.pas
index ca9f1e6..e8c3533 100644
--- a/Engine/DWScript/dwsRTTIExposer.pas
+++ b/Engine/DWScript/dwsRTTIExposer.pas
@@ -209,7 +209,7 @@ implementation
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------
 const
-  {$IFDEF VER330}
+  {$IF CompilerVersion >= 33.0}
   cTYPEKIND_NAMES : array [TTypeKind] of string = (
     'Unknown', 'Integer', 'Char', 'Enumeration', 'Float',
     'String', 'Set', 'Class', 'Method', 'WChar', 'LString', 'WString',
diff --git a/Engine/FixedDX11Header/FMX.Canvas.D2D.pas b/Engine/FixedDX11Header/FMX.Canvas.D2D.pas
index 7b047b3..1a5f118 100644
--- a/Engine/FixedDX11Header/FMX.Canvas.D2D.pas
+++ b/Engine/FixedDX11Header/FMX.Canvas.D2D.pas
@@ -2550,13 +2550,15 @@ begin
     else
       Result := FFontDescriptors[AFont.Family];
     if not AFont.StyleExt.Slant.IsRegular then
-      Result.Style := Result.Style or DWRITE_FONT_STYLE_OBLIQUE;
+    //Result.Style := Result.Style or DWRITE_FONT_STYLE_OBLIQUE;
+      Result.Style := DWRITE_FONT_STYLE_OBLIQUE;
   end;
   if not AFont.StyleExt.IsRegular then
   begin
     Result.Weight := FontWeightToDWrite(AFont.StyleExt.Weight);
     Result.Stretch := FontStretchToDWrite(AFont.StyleExt.Stretch);
-    Result.Style := Result.Style or FontSlantToDWrite(AFont.StyleExt.Slant);
+    //Result.Style := Result.Style or FontSlantToDWrite(AFont.StyleExt.Slant);
+    Result.Style := FontSlantToDWrite(AFont.StyleExt.Slant);
   end;
 end;

--
2.18.0.windows.1

@Gnietschow
Copy link
Member

Which error does occur?

@tothpaul
Copy link
Author

for cTYPEKIND_NAMES $IFDEF VER330 is insufficient, {$IF CompilerVersion >= 33.0} let the code compile for newer version also

in Sydney DWRITE_FONT_STYLE_OBLIQUE is no more a constant, it's a SET, but I don't think that the Style is an array of bits, because the values are not power of 2, so I think that we can just assign the value.

finally, I didn't find time to look at this but the game do not start (no army) and the top left image seems weird
Presse-papiers-1

Any way, thank you very much for sharing the code 👍

@Gnietschow
Copy link
Member

It seems that all ui elements are squashed in the top left corner. That would explain, why you don't have access to the deck bar. Strange, I would guess that something with the style files did not work, probably some parsing.

@tothpaul
Copy link
Author

I'm french and use a french version of Windows & Delphi, this can be related. Can you point me where the items positions are defined so I can check what's happens ?

@Gnietschow
Copy link
Member

The styles are defined by stylesheets found in /Graphics/GUI/Stylesheets. These are parsed by the class TGUIStyleSheet in Engine.GUI.pas. Maybe some formatting problem due to the different versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants