Skip to content

Major review of sdlstdinc.inc (from SDL_stdinc.h) necessary #62

Description

The C header file SDL_stdinc.h contains a lot of functions, types and features which are not found in the corresponding sdlstdinc.inc.

A major review of this file is necessary:

  • find defines/types/functions which are potentially useful for Pascal programmers, add them
  • e. g. math functions

Activity

  1. suve commented on Nov 20, 2022

    @suve
    Collaborator

    I've been updating some of the other .inc files and some of original .h files contain macros / inline functions that make use of stuff declared in SDL_stdinc.h. I'm wondering how to approach this.

    • A) Wherever possible, use FPC's built-in functions, instead. If not possible, declare the SDL functions in sdl2.pas in the implementation section, so they're not exposed to the user.

    • B) Declare the SDL functions as usual inside sdlstdinc.h and just live with the fact that there's only a select few of them declared.

    • C) Go all-in and try to translate as much of the "SDL libc" functions as possible.

  2. Free-Pascal-meets-SDL-Website commented on Feb 1, 2023

    @Free-Pascal-meets-SDL-Website
    CollaboratorAuthor

    A) - In certain cases A) may be suitable, if compatibility is not affected. A hinting FIXME-comment should note about the used functions.

    B) - I think this is the best option, because we want our units to be as Delphi compatible as possible, which is not guaranteed for option A). Also, some compiler functions may need additional units which increase dependencies, which is undesirable.

    C) - We do not necessarily need all the "SDL libc" functions, so we do not need to waste time in translating and maintaining them.

    What do you think? @suve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    to doSome update necessary, critical or not

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions