Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions LEGACYCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,11 @@ v.1.70-stable; 16.09.2013: Initial Commit
v.1.72-stable; 29.09.2013: fixed bug with procedures without parameters (they must have brackets)

v.1.70-stable; 11.09.2013: Initial Commit

## Extracted from jedi.inc

v. 1.63-stable; 16.09.13: since GPC isn't supported anymore, i've deleted it from here, too.

v. 1.22-alpha; 24.07.13: fixed some bugs. special thanks to kotai from pascalgamedevelopment.com

v. 1.00-alpha; 05.07.13: Initial Alpha-Release
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Unit files for building
[Free Pascal](https://freepascal.org/) / [Delphi](https://www.embarcadero.com/products/delphi) applications
using the [SDL2 library](https://libsdl.org).

This repository is a community-maintained fork of the [Pascal-SDL-2-Headers](https://github.com/ev1313/Pascal-SDL-2-Headers) repo.
The [SDL2-for-Pascal](https://github.com/PascalGameDevelopment/SDL2-for-Pascal) repository is a community-maintained fork of the [Pascal-SDL-2-Headers](https://github.com/ev1313/Pascal-SDL-2-Headers) repository.

## Installation

Expand All @@ -20,11 +20,21 @@ Use the `sdl2` unit for the main SDL2 library (should be always needed). Units f
- [`sdl2_net`](https://www.libsdl.org/projects/SDL_net/)
- [`sdl2_ttf`](https://www.libsdl.org/projects/SDL_ttf/)

## Documentation

[Official SDL2-for-Pascal Documentation](https://pascalgamedevelopment.github.io/SDL2-for-Pascal)

### Further Resources

[Free Pascal meets SDL](https://www.freepascal-meets-sdl.net)

[PGD SDL2 Forum](https://www.pascalgamedevelopment.com/forumdisplay.php?26-SDL-SDL-2)

## Bugs / Contributions / ToDos

If you have any contributions or bugfixes, feel free to drop a pull request or send in a patch.
Please use the GitHub [issue tracker](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues).

Please use the GitHub issue tracker for bug reports.

### ToDos

Expand All @@ -34,7 +44,7 @@ See part Enums on the [Cheat sheet](CHEATSHEET.md) for reference.
- (Continously) improve Delphi-compatibility (and even more important, DO NOT break it)
- (Continously) Adapt comments to [PasDoc format](https://pasdoc.github.io). (See issue [#22](https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/22))

## Code style guidelines
### Code style guidelines

The main principle is to stay as tight as possible at the names in the C headers.
These guidelines aim to have better consistency in this community project and make
Expand Down
31 changes: 8 additions & 23 deletions units/jedi.inc
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
{
Simple DirectMedia Layer
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
This file (jedi.inc) is part of SDL2-for-Pascal.
It defines some variables for several Pascal-Compilers and OS-versions.

Pascal-Header-Conversion
Copyright (c) 2012/13 Tim Blume aka End
It is based upon:

sdl.inc is based on the files:
"begin_code.h",
"close_code.h",
"sdl_config.h",
"sdl_config_windows.h",
...
it defines some variables for several Pascal-Compilers and OS-versions.
Pascal-Header-Conversion
Copyright (c) 2012/13 Tim Blume aka End

It is based on mine updated version of jedi-sdl.inc from the SDL 1.2 Headers,
they can be found at delphigl.com or on my github-repository:

https://github.com/ev1313/
jedi-sdl.inc: Global Conditional Definitions for JEDI-SDL cross-compilation
Copyright (C) 2000 - 2013 Prof. Abimbola Olowofoyeku and Tim Blume
See: https://github.com/ev1313/

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand All @@ -35,14 +28,6 @@
3. This notice may not be removed or altered from any source distribution.
}

{
Changelog:
----------
v. 1.63-stable; 16.09.13: since GPC isn't supported anymore, i've deleted it from here, too.
v. 1.22-alpha; 24.07.13: fixed some bugs. special thanks to kotai from pascalgamedevelopment.com
v. 1.00-alpha; 05.07.13: Initial Alpha-Release
}

{.$define Debug} { uncomment for debugging }

{$IFNDEF FPC}
Expand Down
84 changes: 26 additions & 58 deletions units/sdl2.pas
Original file line number Diff line number Diff line change
@@ -1,70 +1,37 @@
unit sdl2;

{
SDL2-for-Pascal
=================
Pascal units for SDL2 - Simple Direct MediaLayer, Version 2

Copyright (C) 2020-2023 PGD Community
Maintainers: M. J. Molski and suve
Visit: https://github.com/PascalGameDevelopment/SDL2-for-Pascal

Simple DirectMedia Layer
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>

Pascal-Header-Conversion
Copyright (C) 2012-2020 Tim Blume aka End/EV1313

SDL2-for-Pascal
Copyright (C) 2020-2021 PGD Community

SDL.pas is based on the files:
"sdl.h",
"sdl_audio.h",
"sdl_blendmode.h",
"sdl_clipboard.h",
"sdl_cpuinfo.h",
"sdl_events.h",
"sdl_error.h",
"sdl_filesystem.h",
"sdl_gamecontroller.h",
"sdl_gesture.h",
"sdl_haptic.h",
"sdl_hints.h",
"sdl_joystick.h",
"sdl_keyboard.h",
"sdl_keycode.h",
"sdl_loadso.h",
"sdl_log.h",
"sdl_pixels.h",
"sdl_power.h",
"sdl_main.h",
"sdl_messagebox.h",
"sdl_mouse.h",
"sdl_mutex.h",
"sdl_rect.h",
"sdl_render.h",
"sdl_rwops.h",
"sdl_scancode.h",
"sdl_shape.h",
"sdl_stdinc.h",
"sdl_surface.h",
"sdl_system.h",
"sdl_syswm.h",
"sdl_thread.h",
"sdl_timer.h",
"sdl_touch.h",
"sdl_version.h",
"sdl_video.h"

I will not translate:
"sdl_opengl.h",
"sdl_opengles.h"
"sdl_opengles2.h"
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
Visit: http://libsdl.org

cause there's a much better OpenGL-Header avaible at delphigl.com:
SDL2-for-Pascal is based upon:

the dglopengl.pas
Pascal-Header-Conversion
Copyright (C) 2012-2020 Tim Blume aka End/EV1313

You'll find it nowadays here: https://github.com/SaschaWillems/dglOpenGL
JEDI-SDL : Pascal units for SDL
Copyright (C) 2000 - 2004 Dominique Louis <Dominique@SavageSoftware.com.au>

Parts of the SDL.pas are from the SDL-1.2-Headerconversion from the JEDI-Team,
written by Domenique Louis and others.
sdl2.pas is based on the C header files in the include folder
of the original Simple DirectMedia Layer repository.
See: https://github.com/libsdl-org/SDL

OpenGL header files are not translated:
"sdl_opengl.h",
"sdl_opengles.h"
"sdl_opengles2.h"

I've changed the names of the dll for 32 & 64-Bit, so theres no conflict
between 32 & 64 bit Libraries.
There is a much better OpenGL-Header avaible at delphigl.com: dglopengl.pas
See: https://github.com/SaschaWillems/dglOpenGL

This software is provided 'as-is', without any express or implied
warranty. In no case will the authors be held liable for any damages
Expand All @@ -84,6 +51,7 @@

Special Thanks to:

- Tim Blume and everyone else contributing to the "Pascal-Header-Conversion"
- DelphiGL.com - Community
- Domenique Louis and everyone else from the JEDI-Team
- Sam Latinga and everyone else from the SDL-Team
Expand Down