Results 1 to 10 of 15

Thread: Compatibility questions

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    So few language features to leave out from coding insides are generics and operator overloading. But for the game programmer that uses the engine, we can make more features available via IFDEF's. This is 1 example
    Code:
    {$IFDEF fpc}
      operator +(const a, b: TVector2f): TVector2f;
      operator -(const a, b: TVector2f): TVector2f;
      operator *(const a, b: TVector2f): TVector2f;
      operator *(const a: TVector2f; n: single): TVector2f;
      operator /(const a: TVector2f; n: single): TVector2f;
    {$ENDIF}
    But we'd have to define it a little better than just 'fpc', because if we do support older than 2.7.1 it wouldn't compile on them. So it can be changed to something like {$IFDEF OpOverload}

    (But these are things we don't necessarily need to focus at all, except at much later time when things are already working. They're just a bonus, nothing to do with how engine works.)
    Last edited by User137; 28-04-2014 at 12:33 AM.

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
  •