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.)
Bookmarks