aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Menu
diff options
context:
space:
mode:
authoreddie-0815 <eddie-0815@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-01 19:34:40 +0000
committereddie-0815 <eddie-0815@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-01 19:34:40 +0000
commit391d30716d48dc709f6444b19c008e82311623b9 (patch)
treee922181e99262c06e6d48a6df5cda71a2338e0bd /Game/Code/Menu
parent39c1fdef33f512a36334e689e38b90cfe4aceb82 (diff)
downloadusdx-391d30716d48dc709f6444b19c008e82311623b9.tar.gz
usdx-391d30716d48dc709f6444b19c008e82311623b9.tar.xz
usdx-391d30716d48dc709f6444b19c008e82311623b9.zip
Mac OS X version compiles and links. I hope I didn't break too many files on windows/linux.
Added switches.inc to all files. Changed many IFDEFs. For Windows-only code please use MSWINDOWS instead of WIN32 now. WIN32 is also used by the Mac port. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@546 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Menu/UDisplay.pas6
-rw-r--r--Game/Code/Menu/UDrawTexture.pas3
-rw-r--r--Game/Code/Menu/UMenu.pas4
-rw-r--r--Game/Code/Menu/UMenuButton.pas3
-rw-r--r--Game/Code/Menu/UMenuButtonCollection.pas3
-rw-r--r--Game/Code/Menu/UMenuInteract.pas2
-rw-r--r--Game/Code/Menu/UMenuSelect.pas3
-rw-r--r--Game/Code/Menu/UMenuSelectSlide.pas4
-rw-r--r--Game/Code/Menu/UMenuStatic.pas3
-rw-r--r--Game/Code/Menu/UMenuText.pas37
10 files changed, 55 insertions, 13 deletions
diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas
index c83d3c37..b3529d0a 100644
--- a/Game/Code/Menu/UDisplay.pas
+++ b/Game/Code/Menu/UDisplay.pas
@@ -2,9 +2,7 @@ unit UDisplay;
interface
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
+{$I switches.inc}
uses {$IFDEF win32}
windows,
@@ -62,7 +60,7 @@ var
implementation
uses
- {$IFDEF FPC}
+ {$IFDEF LAZARUS}
ulazjpeg,
{$ELSE}
JPEG,
diff --git a/Game/Code/Menu/UDrawTexture.pas b/Game/Code/Menu/UDrawTexture.pas
index 5a543f33..de20bd4b 100644
--- a/Game/Code/Menu/UDrawTexture.pas
+++ b/Game/Code/Menu/UDrawTexture.pas
@@ -1,6 +1,9 @@
unit UDrawTexture;
interface
+
+{$I switches.inc}
+
uses UTexture;
procedure DrawLine(X1, Y1, X2, Y2, ColR, ColG, ColB: real);
diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas
index 75d6a957..08ba1e4d 100644
--- a/Game/Code/Menu/UMenu.pas
+++ b/Game/Code/Menu/UMenu.pas
@@ -2,9 +2,7 @@ unit UMenu;
interface
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
+{$I switches.inc}
uses OpenGL12, SysUtils, UTexture, UMenuStatic, UMenuText, UMenuButton, UMenuSelect, UMenuSelectSlide,
UMenuInteract, UThemes, UMenuButtonCollection, Math;
diff --git a/Game/Code/Menu/UMenuButton.pas b/Game/Code/Menu/UMenuButton.pas
index af4f69ee..93b987b7 100644
--- a/Game/Code/Menu/UMenuButton.pas
+++ b/Game/Code/Menu/UMenuButton.pas
@@ -1,6 +1,9 @@
unit UMenuButton;
interface
+
+{$I switches.inc}
+
uses TextGL, UTexture, OpenGL12, UMenuText;
type
diff --git a/Game/Code/Menu/UMenuButtonCollection.pas b/Game/Code/Menu/UMenuButtonCollection.pas
index 5c9045a7..981452b1 100644
--- a/Game/Code/Menu/UMenuButtonCollection.pas
+++ b/Game/Code/Menu/UMenuButtonCollection.pas
@@ -1,6 +1,9 @@
unit UMenuButtonCollection;
interface
+
+{$I switches.inc}
+
uses UMenuButton;
type
diff --git a/Game/Code/Menu/UMenuInteract.pas b/Game/Code/Menu/UMenuInteract.pas
index 43249e3e..78f9bd89 100644
--- a/Game/Code/Menu/UMenuInteract.pas
+++ b/Game/Code/Menu/UMenuInteract.pas
@@ -2,6 +2,8 @@ unit UMenuInteract;
interface
+{$I switches.inc}
+
type
TInteract = record // for moving thru menu
Typ: integer; // 0 - button, 1 - select, 2 - Text, 3 - Select SLide, 5 - ButtonCollection Child
diff --git a/Game/Code/Menu/UMenuSelect.pas b/Game/Code/Menu/UMenuSelect.pas
index 72141a27..b0ee2b78 100644
--- a/Game/Code/Menu/UMenuSelect.pas
+++ b/Game/Code/Menu/UMenuSelect.pas
@@ -1,6 +1,9 @@
unit UMenuSelect;
interface
+
+{$I switches.inc}
+
uses TextGL, UTexture, OpenGL12, UMenuText;
type
diff --git a/Game/Code/Menu/UMenuSelectSlide.pas b/Game/Code/Menu/UMenuSelectSlide.pas
index bb9b5809..e4c5f959 100644
--- a/Game/Code/Menu/UMenuSelectSlide.pas
+++ b/Game/Code/Menu/UMenuSelectSlide.pas
@@ -2,9 +2,7 @@ unit UMenuSelectSlide;
interface
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
+{$I switches.inc}
uses TextGL,
UTexture,
diff --git a/Game/Code/Menu/UMenuStatic.pas b/Game/Code/Menu/UMenuStatic.pas
index cfa4a596..a2c709ad 100644
--- a/Game/Code/Menu/UMenuStatic.pas
+++ b/Game/Code/Menu/UMenuStatic.pas
@@ -1,6 +1,9 @@
unit UMenuStatic;
interface
+
+{$I switches.inc}
+
uses UTexture, OpenGL12;
type
diff --git a/Game/Code/Menu/UMenuText.pas b/Game/Code/Menu/UMenuText.pas
index 19adef03..350c28de 100644
--- a/Game/Code/Menu/UMenuText.pas
+++ b/Game/Code/Menu/UMenuText.pas
@@ -2,9 +2,7 @@ unit UMenuText;
interface
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
+{$I switches.inc}
uses TextGL,
UTexture,
@@ -61,6 +59,39 @@ uses UGraphic,
{$ENDIF}
StrUtils;
+{$IFDEF DARWIN}
+function PosEx(const SubStr, S: string; Offset: Cardinal = 1): Integer;
+var
+ I,X: Integer;
+ Len, LenSubStr: Integer;
+begin
+ if Offset = 1 then
+ Result := Pos(SubStr, S)
+ else
+ begin
+ I := Offset;
+ LenSubStr := Length(SubStr);
+ Len := Length(S) - LenSubStr + 1;
+ while I <= Len do
+ begin
+ if S[I] = SubStr[1] then
+ begin
+ X := 1;
+ while (X < LenSubStr) and (S[I + X] = SubStr[X + 1]) do
+ Inc(X);
+ if (X = LenSubStr) then
+ begin
+ Result := I;
+ exit;
+ end;
+ end;
+ Inc(I);
+ end;
+ Result := 0;
+ end;
+end;
+{$ENDIF}
+
procedure TText.SetSelect(Value: Boolean);
begin
SelectBool := Value;