Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 67

Thread: Pascal and XNA...

  1. #51

    Pascal and XNA...

    I am talking about both the Chrome command line compiler and the version that works within VS2005. The demos work with both. The thing that is a bit fiddly right now is adding resources to the project file. That needs to be done manually for now.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  2. #52

    Pascal and XNA...

    What is the possibilty of having pascal code that can compile in both Delphi (win32) and Chrome?

    I know Indy has ifdefs to handle .Net compalation, is something simalar possible with Chrome? I'm just wanders code it would be nice to have XNA support in the engine I am building...
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  3. #53

    Pascal and XNA...

    The main IFDEF would look something like
    {$IFDEF DELPHI}procedure{$ELSE}method{$ENDIF} MyfunctionOrProcedure();

    Chrome does NOT have the concept of function/procedure only method.

    Keep in mind that Chrome is working at .NET 2.0 so supports most of the features from that version and as such makes use of generics in XNA. Not to say that you couldn't work around this, but it would be a bit of a pain until Codgear add it to their Win32 and .NET compilers.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  4. #54

    Pascal and XNA...

    Thanks for the hint Dom

    I just got the following to compile and run under Chrome, Delphi and FPC.

    ChromeDelphi.dpr
    [pascal]
    {$IFDEF CHROME}
    namespace ChromeDelphi;
    {$ELSE}
    program ChromeDelphi;
    {$APPTYPE CONSOLE}
    {$ENDIF}

    {$IFDEF CHROME}
    interface

    uses System.*;
    {$ELSE}
    uses Test;
    {$ENDIF}

    {$IFDEF CHROME}
    type
    ConsoleApp = class
    private
    public
    class method Main(args: array of string);
    end;
    {$ENDIF}

    {$IFDEF CHROME}
    implementation
    {$ENDIF}

    var a: TTest;

    {$IFDEF CHROME}
    class method ConsoleApp.Main(args: array of string);
    {$ENDIF}
    begin

    WriteLine('InfinitEngine Test');
    a := TTest.Create;
    a.doStuff;
    ReadLine();
    {$IFDEF CHROME}
    end;
    {$ENDIF}

    end.
    [/pascal]


    Test.pas
    [pascal]
    {$IFDEF CHROME}
    namespace ChromeDelphi;
    {$ELSE}
    unit Test;
    {$ENDIF}

    interface

    {$IFDEF CHROME}
    uses System.*;
    {$ELSE}
    {$ENDIF}

    type

    TTestRecord = record
    a: Integer;
    end;

    TTest = class
    private
    r: TTestRecord;
    public
    constructor Create;

    procedure DoStuff; virtual;
    end;

    procedure WriteLine(s: string);
    procedure ReadLine;

    implementation

    procedure WriteLine(s: string);
    begin
    {$IFDEF CHROME}
    Console.WriteLine(s);
    {$ELSE}
    Writeln(s);
    {$ENDIF}
    end;

    procedure ReadLine;
    begin
    {$IFDEF CHROME}
    Console.ReadLine();
    {$ELSE}
    Readln;
    {$ENDIF}
    end;


    constructor TTest.Create;
    begin
    inherited Create;
    WriteLine('TTest.Create');
    end;

    procedure TTest.DoStuff;
    begin
    WriteLine('TTest.DoStuff');
    end;


    end.
    [/pascal]

    Well impressed
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  5. #55

    Pascal and XNA...

    Excellent Stuff Dean!

    I just received my copy of Professional XNA Game Programming: For Xbox 360 and Windows so will start pouring over that this evening.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  6. #56

    Pascal and XNA...

    Pascal you say. But .Net is from Microsoft. And that look like C# for me or I should say PAscal# :-)
    Live programming, eat programming, breath programming and die programming

  7. #57
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Pascal and XNA...

    You should check out Chrome: www.remobjects.com

    or of course, Delphi for .NET: www.codegear.com

    Both will allow you to work with .NET in Object Pascal. However only Chrome will allow you to work with XNA as it's the only Object Pascal compiler to support the nessissary versions of .NET to do so.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #58

    Pascal and XNA...

    Forget Delphi for .NET it really is not worth the time to use it as it is way way way behind Chrome's support.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  9. #59
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Pascal and XNA...

    Well I agree, but I figured that I'd at least give them a fighting chance to be seen or heard of. lol
    Jason McMillen
    Pascal Game Development
    Co-Founder





  10. #60

    Pascal and XNA...

    Hi Savage, I wanted to download 1 or more of your XNA demo projects you wrote using Chrome hosted on pascalgamedevelopment, but they don't seem to be there anymore (too old I guess).

    Is there anyway I can get hold of them someplace?

    cheers,
    Paul

Page 6 of 7 FirstFirst ... 4567 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •