rise-of-legions icon indicating copy to clipboard operation
rise-of-legions copied to clipboard

Rio compilation

Open tothpaul opened this issue 3 years ago • 5 comments

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

tothpaul avatar Dec 23 '20 15:12 tothpaul

Which error does occur?

Gnietschow avatar Dec 29 '20 21:12 Gnietschow

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 :+1:

tothpaul avatar Dec 29 '20 21:12 tothpaul

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.

Gnietschow avatar Dec 29 '20 21:12 Gnietschow

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 ?

tothpaul avatar Dec 29 '20 21:12 tothpaul

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.

Gnietschow avatar Jan 01 '21 21:01 Gnietschow