Giter Club home page Giter Club logo

sdlada's Introduction

SDLAda

This is a new variable thickness Ada 2012 binding to SDL 2.x.y (http://www.libsdl.org). This means that things are wrapped when they need to be into a thicker binding and those things that can just be imported, are.

There will still be a need to use conditional compilation for the various platforms as there will be some platform specifics which cannot be abstracted out cleanly, but this will be reduced as much as possible.

The bindings are only generated for the specific parts of SDL which Ada does not already have support for, i.e. threads are not bound as Ada has tasking support built in.

Usage, Licence & Attribution

SDLAda is distributed under the same zlib licence as the SDL library is. You may use this library in any way you like whether free or commercial. I would add that whilst you don't have to state that your game uses this library, it would be nice if you did, it's all good advertising for Ada :)

You do not need to complete any copyright assignment forms, the licence will not change from zlib as I want people to be able to use the library however they wish without restrictions.

Building

Makefile

This was originally built with the idea that there could be different compilers and their build scripts would go into a build/<compiler> directory. This can still be built with the makefile, the subsequent extracted components cannot.

There are a number of variables which can be set to control the compilation:

  • SDL_PLATFORM = Can be set to one of the following values: linux, windows, macosx, macos_homebrew, ios or android
  • SDL_MODE = Can be one of: debug or release. Defaults to debug.
cd build/gnat
make SDL_PLATFORM=linux SDL_MODE=release

Alire

You can build the library with Alire now, by calling the following in the root directory:

alr build

This seems to have come up as an issue, people not checking the original makefile on lines 29 and 93 on how to link SDLAda. SDL2 comes with the sdl2-config command which includes the following options:

$ sdl2-config --help
Usage: /usr/bin/sdl2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]

$ sdl2-config --cflags
-I/usr/include/SDL2 -D_REENTRANT

$ sdl2-config --libs
-L/usr/lib64 -lSDL2

These options will differ depending on operating system. SDL3 seems like it might operate in a bit more of a portable way.

Linking

To link an application with sdlada, you will need to add -largs $(sdl2-config --libs) to command line:

$ cd <game|app dir>
$ alr build -- -largs $(sdl2-config --libs)

You'll also need to add -lSDL2_image, -lSDL2_ttf and -lSDL2_mixer for your platform. TODO: Fix this.

This will only be required for the time being.

MacOS

SDLAda's alire.toml is set up to use the Homebrew and MacPorts distributions, so you need to install the dependencies first.

Home Brew
brew install sdl2
brew install sdl2_ttf
brew install sdl2_image
brew install sdl2_mixer
Mac Ports
sudo port install libsdl2
sudo port install libsdl2_ttf
sudo port install libsdl2_image
sudo port install libsdl2_mixer

Installation

make SDL_PLATFORM=linux SDL_MODE=release DESTDIR=$HOME/opt/sdlada install

Examples

You can find more examples hosted on Rosetta Code.

Screenshots

stream2 ttf surface

Copyright notice

See LICENCE file.

Thanks to

To everyone who has provided patches, pull requests, typo fixes, etc.

WARNING!!!

I have tried to model the types correctly, but remember SDL is a C library and some things may not make sense. Please file a bug report if you use this library and find that a type does not cover enough values for cross-platform use.

TODO

Anything listed here is a question of whether it's required.

  • Do we need to hook into the Assert module? To raise an exception maybe?
  • Create event tagged type hierarchy, use Poll to convert the C events into these types.
  • Task safe event handling?
  • Split Image, TTF into separate GPR files.
  • Cross platform testing.
  • Optimisations to make the library as thin as possible:
    • Enable -gnatN for inlining.
    • Try to get as much pre-elaborated as possible.
  • Disable a shared library build, make it a static only build, this makes it easier to distribute. i.e. Link with this library and distribute SDL2 libs only.
  • Hide the RWops stuff maybe? Should really be using Ada streams and files.

See alire.toml

Versions tested against

Library Version
SDL 2.28.5
SDL_image 2.6.3
SDL_mixer 2.6.3
SDL_ttf 2.20.2

Status

SDL Core

Init / Shutdown

Name Bound Since Won't bind
SDL_Init y
SDL_InitSubSystem y
SDL_Quit y
SDL_QuitRequested n
SDL_QuitSubSystem y
SDL_SetMainReady n
SDL_WasInit y
SDL_WinRTRunApp n

Configuration Variables

Name Bound Since Won't bind
SDL_AddHintCallback n
SDL_ClearHints y
SDL_DelHintCallback n
SDL_GetHint y
SDL_GetHintBoolean n
SDL_ResetHint n 2.24.0
SDL_ResetHints n 2.26.0
SDL_SetHint y
SDL_SetHintWithPriority y

Error Handling

Name Bound Since Won't bind
SDL_ClearError y
SDL_GetError y
SDL_GetErrorMsg y
SDL_SetError y

Log Handling

Name Bound Since Won't bind
SDL_Log y
SDL_LogCritical y
SDL_LogDebug y
SDL_LogError y
SDL_LogGetOutputFunction n
SDL_LogGetPriority n
SDL_LogInfo y
SDL_LogMessage y
SDL_LogMessageV n
SDL_LogResetPriorities y
SDL_LogSetAllPriority y
SDL_LogSetOutputFunction n
SDL_LogSetPriority y
SDL_LogVerbose y
SDL_LogWarn y

Assertions

Name Bound Since Won't bind
SDL_assert n
SDL_assert_paranoid n
SDL_assert_release n
SDL_GetAssertionHandler n
SDL_GetAssertionReport n
SDL_GetDefaultAssertionHandler n
SDL_ResetAssertionReport n
SDL_SetAssertionHandler n
SDL_TriggerBreakpoint n

Querying SDL Version

Name Bound Since Won't bind
SDL_COMPILEDVERSION n *
SDL_GetRevision y
SDL_GetRevisionNumber y
SDL_GetVersion y
SDL_REVISION n *
SDL_VERSION n *
SDL_VERSIONNUM n *
SDL_VERSION_ATLEAST n *

Display and Window Management

Name Bound Since Won't bind
SDL_CreateWindow y
SDL_CreateWindowFrom y
SDL_DestroyWindow y
SDL_DestroyWindowSurface n 2.28.0
SDL_DisableScreenSaver y
SDL_EnableScreenSaver y
SDL_FlashWindow n 2.0.16
SDL_GetClosestDisplayMode y
SDL_GetCurrentDisplayMode y
SDL_GetCurrentVideoDriver y
SDL_GetDesktopDisplayMode y
SDL_GetDisplayBounds y
SDL_GetDisplayDPI y 2.0.4
SDL_GetDisplayMode y
SDL_GetDisplayName y
SDL_GetDisplayOrientation y 2.0.9
SDL_GetDisplayUsableBounds y 2.0.5
SDL_GetGrabbedWindow n 2.0.4
SDL_GetNumDisplayModes y
SDL_GetNumVideoDisplays y
SDL_GetNumVideoDrivers y
SDL_GetPointDisplayIndex y 2.24.0
SDL_GetRectDisplayIndex n 2.24.0
SDL_GetVideoDriver y
SDL_GetWindowBordersSize n 2.0.5
SDL_GetWindowBrightness y
SDL_GetWindowData y
SDL_GetWindowDisplayIndex y
SDL_GetWindowDisplayMode y
SDL_GetWindowFlags y
SDL_GetWindowFromID y
SDL_GetWindowGammaRamp y
SDL_GetWindowGrab y
SDL_GetWindowICCProfile n 2.0.18
SDL_GetWindowID y
SDL_GetWindowKeyboardGrab n 2.0.16
SDL_GetWindowMaximumSize y
SDL_GetWindowMinimumSize y
SDL_GetWindowMouseGrab n 2.0.16
SDL_GetWindowMouseRect n 2.0.18
SDL_GetWindowOpacity n 2.0.5
SDL_GetWindowPixelFormat y
SDL_GetWindowPosition y
SDL_GetWindowSize y
SDL_GetWindowSizeInPixels n 2.26.0
SDL_GetWindowSurface y
SDL_GetWindowTitle y
SDL_GL_CreateContext y
SDL_GL_DeleteContext y
SDL_GL_ExtensionSupported y
SDL_GL_GetAttribute y
SDL_GL_GetCurrentContext y
SDL_GL_GetCurrentWindow n
SDL_GL_GetDrawableSize y
SDL_GL_GetProcAddress y
SDL_GL_GetSwapInterval y
SDL_GL_LoadLibrary y
SDL_GL_MakeCurrent y
SDL_GL_ResetAttributes y
SDL_GL_SetAttribute y
SDL_GL_SetSwapInterval y
SDL_GL_SwapWindow y
SDL_GL_UnloadLibrary y
SDL_HasWindowSurface n 2.28.0
SDL_HideWindow y
SDL_IsScreenSaverEnabled y
SDL_MaximizeWindow y
SDL_MinimizeWindow y
SDL_RaiseWindow y
SDL_RestoreWindow y
SDL_SetWindowAlwaysOnTop n 2.0.16
SDL_SetWindowBordered n
SDL_SetWindowBrightness y
SDL_SetWindowData y
SDL_SetWindowDisplayMode y
SDL_SetWindowFullscreen y
SDL_SetWindowGammaRamp y
SDL_SetWindowGrab y
SDL_SetWindowHitTest n
SDL_SetWindowIcon y
SDL_SetWindowInputFocus n 2.0.5
SDL_SetWindowKeyboardGrab n 2.0.16
SDL_SetWindowMaximumSize y
SDL_SetWindowMinimumSize y
SDL_SetWindowModalFor n 2.0.5
SDL_SetWindowMouseGrab n 2.0.16
SDL_SetWindowMouseRect n 2.0.18
SDL_SetWindowOpacity n 2.0.5
SDL_SetWindowPosition y
SDL_SetWindowResizable n 2.0.5
SDL_SetWindowSize y
SDL_SetWindowTitle y
SDL_ShowWindow y
SDL_UpdateWindowSurface n
SDL_UpdateWindowSurfaceRects y
SDL_VideoInit y
SDL_VideoQuit y

2D Accelerated Rendering

Name Bound Since Won't bind
SDL_CreateRenderer y
SDL_CreateSoftwareRenderer y
SDL_CreateTexture y
SDL_CreateTextureFromSurface y
SDL_CreateWindowAndRenderer n
SDL_DestroyRenderer y
SDL_DestroyTexture y
SDL_GetNumRenderDrivers y
SDL_GetRenderDrawBlendMode y
SDL_GetRenderDrawColor y
SDL_GetRenderDriverInfo y
SDL_GetRenderer y
SDL_GetRendererInfo y
SDL_GetRendererOutputSize y
SDL_GetRenderTarget n
SDL_GetTextureAlphaMod y
SDL_GetTextureBlendMode y
SDL_GetTextureColorMod y
SDL_GetTextureScaleMode y 2.0.12
SDL_GetTextureUserData n 2.0.18
SDL_GL_BindTexture y
SDL_GL_UnbindTexture y
SDL_LockTexture y
SDL_LockTextureToSurface n 2.0.12
SDL_QueryTexture y
SDL_RenderClear y
SDL_RenderCopy y
SDL_RenderCopyEx y
SDL_RenderCopyExF y 2.0.10
SDL_RenderCopyF y 2.0.10
SDL_RenderDrawLine y
SDL_RenderDrawLineF y 2.0.10
SDL_RenderDrawLines y
SDL_RenderDrawLinesF y 2.0.10
SDL_RenderDrawPoint y
SDL_RenderDrawPointF y 2.0.10
SDL_RenderDrawPoints y
SDL_RenderDrawPointsF y 2.0.10
SDL_RenderDrawRect y
SDL_RenderDrawRectF y 2.0.10
SDL_RenderDrawRects y
SDL_RenderDrawRectsF y 2.0.10
SDL_RenderFillRect y
SDL_RenderFillRectF y 2.0.10
SDL_RenderFillRects y
SDL_RenderFillRectsF y 2.0.10
SDL_RenderFlush y 2.0.10
SDL_RenderGeometry y 2.0.18
SDL_RenderGeometryRAW n 2.0.18
SDL_RenderGetClipRect y
SDL_RenderGetIntegerScale y 2.0.5
SDL_RenderGetLogicalSize y
SDL_RenderGetMetalCommandEncoder n 2.0.8
SDL_RenderGetMetalLayer n 2.0.8
SDL_RenderGetScale y
SDL_RenderGetViewport y
SDL_RenderGetWindow y 2.0.22
SDL_RenderIsClipEnabled n
SDL_RenderLogicalToWindow y 2.0.18
SDL_RenderPresent y
SDL_RenderReadPixels n
SDL_RenderSetClipRect y
SDL_RenderSetIntegerScale y 2.0.5
SDL_RenderSetLogicalSize y
SDL_RenderSetScale y
SDL_RenderSetViewport y
SDL_RenderSetVSync n 2.0.18
SDL_RenderTargetSupported y
SDL_RenderWindowToLogical y 2.0.18
SDL_SetRenderDrawBlendMode y
SDL_SetRenderDrawColor y
SDL_SetRenderTarget y
SDL_SetTextureAlphaMod y
SDL_SetTextureBlendMode y
SDL_SetTextureColorMod y
SDL_SetTextureScaleMode y 2.0.12
SDL_SetTextureUserData n 2.0.18
SDL_UnlockTexture y
SDL_UpdateNVTexture n 2.0.16
SDL_UpdateTexture n 2.0.0
SDL_UpdateYUVTexture n 2.0.1

Pixel Formats and Conversion Routines

Name Bound Since Won't bind
SDL_AllocFormat y
SDL_AllocPalette y
SDL_CalculateGammaRamp y
SDL_FreeFormat y
SDL_FreePalette y
SDL_GetPixelFormatName y
SDL_GetRGB y
SDL_GetRGBA y
SDL_MapRGB y
SDL_MapRGBA y
SDL_MasksToPixelFormatEnum y
SDL_PixelFormatEnumToMasks y
SDL_SetPaletteColors n
SDL_SetPixelFormatPalette n

Rectangle Functions

Name Bound Since Won't bind
SDL_EncloseFPoints y 2.0.22
SDL_EnclosePoints y
SDL_FRectEmpty y ?
SDL_FRectEquals y 2.0.22
SDL_FRectEqualsEpsilon y 2.0.22
SDL_HasIntersection y
SDL_HasIntersectionF y 2.0.22
SDL_IntersectFRect y 2.0.22
SDL_IntersectFRectAndLine y 2.0.22
SDL_IntersectRect y
SDL_IntersectRectAndLine y
SDL_PointInFRect y ?
SDL_PointInRect y ?
SDL_RectEmpty y ?
SDL_RectEquals n ? *
SDL_UnionFRect y 2.0.22
SDL_UnionRect y

Surface Creation and Simple Drawing

Name Bound Since Won't bind
SDL_BlitScaled y
SDL_BlitSurface y
SDL_ConvertPixels n 2.0.0
SDL_ConvertSurface y 2.0.0
SDL_ConvertSurfaceFormat n 2.0.0
SDL_CreateRGBSurface y 2.0.0
SDL_CreateRGBSurfaceFrom n 2.0.0
SDL_CreateRGBSurfaceWithFormat n 2.0.5
SDL_CreateRGBSurfaceWithFormatFrom n 2.0.5
SDL_FillRect y
SDL_FillRects y
SDL_FreeSurface y
SDL_GetClipRect y
SDL_GetColorKey y
SDL_GetSurfaceAlphaMod y
SDL_GetSurfaceBlendMode y
SDL_GetSurfaceColorMod y
SDL_GetYUVConversionMode n 2.0.8
SDL_GetYUVConversionModeForResolution n 2.0.8
SDL_HasColorKey n 2.0.9
SDL_HasSurfaceRLE n 2.0.14
SDL_LoadBMP y
SDL_LoadBMP_RW y
SDL_LockSurface y
SDL_LowerBlit y
SDL_LowerBlitScaled y
SDL_MUSTLOCK y TODO: Function expression.
SDL_PremultiplyAlpha n 2.0.18
SDL_SaveBMP n
SDL_SaveBMP_RW n
SDL_SetClipRect y
SDL_SetColorKey y
SDL_SetSurfaceAlphaMod y
SDL_SetSurfaceBlendMode y
SDL_SetSurfaceColorMod y
SDL_SetSurfacePalette n
SDL_SetSurfaceRLE y
SDL_SetYUVConversionMode n 2.0.8
SDL_SoftStretch n 2.0.0
SDL_SoftStretchLinear n 2.0.16
SDL_UnlockSurface y
SDL_UpperBlit n 2.0.0
SDL_UpperBlitScaled n 2.0.0

Platform-specific Window Management

Name Bound Since Won't bind
SDL_GetWindowWMInfo y

Clipboard Handling

Name Bound Since Won't bind
SDL_GetClipboardText y
SDL_GetPrimarySelectionText n 2.26.0
SDL_HasClipboardText y
SDL_HasPrimarySelectionText n 2.26.0
SDL_SetClipboardText y
SDL_SetPrimarySelectionText n 2.26.0

Vulkan Support

Name Bound Since Won't bind
SDL_Vulkan_CreateSurface n 2.0.6
SDL_Vulkan_GetDrawableSize n 2.0.6
SDL_Vulkan_GetInstanceExtensions n 2.0.6
SDL_Vulkan_GetInstanceExtensions n 2.0.6
SDL_Vulkan_LoadLibrary n 2.0.6
SDL_Vulkan_UnloadLibrary n 2.0.6

Metal Support

Name Bound Since Won't bind
SDL_Metal_CreateView n 2.0.12
SDL_Metal_DestroyView n 2.0.12
SDL_Metal_GetDrawableSize n 2.0.14
SDL_Metal_GetLayer n 2.0.14

Event Handling

Name Bound Since Won't bind
SDL_AddEventWatch n
SDL_DelEventWatch n
SDL_EventState n
SDL_FilterEvents n
SDL_FlushEvent n
SDL_FlushEvents n
SDL_GetEventFilter n
SDL_HasEvent n
SDL_HasEvents n
SDL_PeepEvents n
SDL_PollEvent y
SDL_PumpEvents n
SDL_PushEvent n
SDL_RegisterEvents n
SDL_SetEventFilter n
SDL_WaitEvent n
SDL_WaitEventTimeout n

Keyboard Support

Name Bound Since Won't bind
SDL_ClearComposition y 2.0.22
SDL_GetKeyboardFocus y
SDL_GetKeyboardState y
SDL_GetKeyFromName y
SDL_GetKeyFromScancode y
SDL_GetKeyName y
SDL_GetModState y
SDL_GetScancodeFromKey y
SDL_GetScancodeFromName y
SDL_GetScancodeName y
SDL_HasScreenKeyboardSupport y
SDL_IsScreenKeyboardShown y
SDL_IsTextInputActive y
SDL_IsTextInputShown y 2.0.22
SDL_ResetKeyboard y 2.24.0
SDL_SetModState y
SDL_SetTextInputRect y
SDL_StartTextInput y
SDL_StopTextInput y

Mouse Support

Name Bound Since Won't bind
SDL_CaptureMouse y
SDL_CreateColorCursor n
SDL_CreateCursor n
SDL_CreateSystemCursor y
SDL_FreeCursor y
SDL_GetCursor y
SDL_GetDefaultCursor n
SDL_GetGlobalMouseState y
SDL_GetMouseFocus n
SDL_GetMouseState y
SDL_GetRelativeMouseMode y
SDL_GetRelativeMouseState y
SDL_SetCursor y
SDL_SetRelativeMouseMode y
SDL_ShowCursor n
SDL_WarpMouseGlobal y
SDL_WarpMouseInWindow y

Joystick Support

Name Bound Since Won't bind
SDL_GetJoystickGUIDInfo n 2.26.0
SDL_JoystickAttachVirtual n 2.0.14
SDL_JoystickAttachVirtualEx n 2.24.0
SDL_JoystickClose y
SDL_JoystickCurrentPowerLevel n 2.0.4
SDL_JoystickDetachVirtual n 2.0.14
SDL_JoystickEventState y
SDL_JoystickFromInstanceID n
SDL_JoystickFromPlayerIndex n 2.0.12
SDL_JoystickGetAttached y
SDL_JoystickGetAxis y
SDL_JoystickGetAxisInitialState n 2.0.6
SDL_JoystickGetBall y
SDL_JoystickGetButton y
SDL_JoystickGetDeviceGUID y
SDL_JoystickGetDeviceInstanceID n 2.0.6
SDL_JoystickGetDevicePlayerIndex n 2.0.9
SDL_JoystickGetDeviceProduct n 2.0.6
SDL_JoystickGetDeviceProductVersion n 2.0.6
SDL_JoystickGetDeviceType n 2.0.6
SDL_JoystickGetDeviceVendor n 2.0.6
SDL_JoystickGetFirmwareVersion n 2.24.0
SDL_JoystickGetGUID y
SDL_JoystickGetGUIDFromString y
SDL_JoystickGetGUIDString y
SDL_JoystickGetHat y
SDL_JoystickGetPlayerIndex n 2.0.9
SDL_JoystickGetProduct n 2.0.6
SDL_JoystickGetProductVersion n 2.0.6
SDL_JoystickGetSerial n 2.0.14
SDL_JoystickGetType n 2.0.6
SDL_JoystickGetVendor n 2.0.6
SDL_JoystickHasLED n 2.0.14
SDL_JoystickHasRumble n 2.0.18
SDL_JoystickHasRumbleTriggers n 2.0.18
SDL_JoystickInstanceID y
SDL_JoystickIsVirtual n 2.0.14
SDL_JoystickName y
SDL_JoystickNameForIndex y
SDL_JoystickNumAxes y
SDL_JoystickNumBalls y
SDL_JoystickNumButtons y
SDL_JoystickNumHats y
SDL_JoystickOpen y
SDL_JoystickPath n 2.24.0
SDL_JoystickPathForIndex n 2.24.0
SDL_JoystickRumble n 2.0.9
SDL_JoystickRumbleTriggers n 2.0.14
SDL_JoystickSendEffect n 2.0.16
SDL_JoystickSetLED n 2.0.14
SDL_JoystickSetPlayerIndex n 2.0.12
SDL_JoystickSetVirtualAxis n 2.0.14
SDL_JoystickSetVirtualButton n 2.0.14
SDL_JoystickSetVirtualHat n 2.0.14
SDL_JoystickUpdate y
SDL_LockJoysticks y 2.0.7
SDL_NumJoysticks y
SDL_UnlockJoysticks y 2.0.7

Game Controller Support

Name Bound Since Won't bind
SDL_GameControllerAddMapping y
SDL_GameControllerAddMappingsFromFile y
SDL_GameControllerAddMappingsFromRW n
SDL_GameControllerClose y
SDL_GameControllerEventState y
SDL_GameControllerFromInstanceID n 2.0.4
SDL_GameControllerFromPlayerIndex n 2.0.12
SDL_GameControllerGetAppleSFSymbolsNameForAxis n 2.0.18
SDL_GameControllerGetAppleSFSymbolsNameForButton n 2.0.18
SDL_GameControllerGetAttached y
SDL_GameControllerGetAxis y
SDL_GameControllerGetAxisFromString y
SDL_GameControllerGetBindForAxis y
SDL_GameControllerGetBindForButton y
SDL_GameControllerGetButton y
SDL_GameControllerGetButtonFromString y
SDL_GameControllerGetFirmwareVersion n 2.24.0
SDL_GameControllerGetJoystick y
SDL_GameControllerGetNumTouchpadFingers n 2.0.14
SDL_GameControllerGetNumTouchpads n 2.0.14
SDL_GameControllerGetPlayerIndex n 2.0.9
SDL_GameControllerGetProduct n 2.0.6
SDL_GameControllerGetProductVersion n 2.0.6
SDL_GameControllerGetSensorData n 2.0.14
SDL_GameControllerGetSensorDataRate n 2.0.16
SDL_GameControllerGetSensorDataWithTimestamp n 2.26.0
SDL_GameControllerGetSerial n 2.0.14
SDL_GameControllerGetSteamHandle n 2.30.0
SDL_GameControllerGetStringForAxis y
SDL_GameControllerGetStringForButton y
SDL_GameControllerGetTouchpadFinger n 2.0.14
SDL_GameControllerGetType n 2.0.12
SDL_GameControllerGetVendor n 2.0.6
SDL_GameControllerHasAxis n 2.0.14
SDL_GameControllerHasButton n 2.0.14
SDL_GameControllerHasLED n 2.0.14
SDL_GameControllerHasRumble n 2.0.18
SDL_GameControllerHasRumbleTriggers n 2.0.18
SDL_GameControllerHasSensor n 2.0.14
SDL_GameControllerIsSensorEnabled n 2.0.14
SDL_GameControllerMapping y
SDL_GameControllerMappingForDeviceIndex n 2.0.9
SDL_GameControllerMappingForGUID y
SDL_GameControllerMappingForIndex n 2.0.6
SDL_GameControllerName y
SDL_GameControllerNameForIndex y
SDL_GameControllerNumMappings n 2.0.6
SDL_GameControllerOpen y
SDL_GameControllerPath n 2.24.0
SDL_GameControllerPathForIndex n 2.24.0
SDL_GameControllerRumble n 2.0.9
SDL_GameControllerRumbleTriggers n 2.0.14
SDL_GameControllerSendEffect n 2.0.16
SDL_GameControllerSetLED n 2.0.14
SDL_GameControllerSetPlayerIndex n 2.0.12
SDL_GameControllerSetSensorEnabled n 2.0.14
SDL_GameControllerTypeForIndex n 2.0.12
SDL_GameControllerUpdate y
SDL_IsGameController y

Touch & Gesture

Name Bound Since Won't bind
SDL_GetNumTouchDevices n
SDL_GetNumTouchFingers n
SDL_GetTouchDevice n
SDL_GetTouchFinger n
SDL_LoadDollarTemplates n
SDL_RecordGesture n
SDL_SaveAllDollarTemplates n
SDL_SaveDollarTemplate n

Sensors

Name Bound Since Won't bind
SDL_LockSensors n 2.0.14
SDL_NumSensors n 2.0.9
SDL_SensorClose n 2.0.9
SDL_SensorFromInstanceID n 2.0.9
SDL_SensorGetData n 2.0.9
SDL_SensorGetDataWithTimestamp n 2.26.0
SDL_SensorGetDeviceInstanceID n 2.0.9
SDL_SensorGetDeviceName n 2.0.9
SDL_SensorGetDeviceNonPortableType n 2.0.9
SDL_SensorGetDeviceType n 2.0.9
SDL_SensorGetInstanceID n 2.0.9
SDL_SensorGetName n 2.0.9
SDL_SensorGetNonPortableType n 2.0.9
SDL_SensorGetType n 2.0.9
SDL_SensorOpen n 2.0.9
SDL_SensorUpdate n 2.0.9

Force Feedback Support

Name Bound Since Won't bind
SDL_HapticClose n
SDL_HapticDestroyEffect n
SDL_HapticEffectSupported n
SDL_HapticGetEffectStatus n
SDL_HapticIndex n
SDL_HapticName n
SDL_HapticNewEffect n
SDL_HapticNumAxes n
SDL_HapticNumEffects n
SDL_HapticNumEffectsPlaying n
SDL_HapticOpen n 2.0.0
SDL_HapticOpened n 2.0.0
SDL_HapticOpenFromJoystick n
SDL_HapticOpenFromMouse n
SDL_HapticPause n
SDL_HapticQuery n
SDL_HapticRumbleInit n
SDL_HapticRumblePlay n
SDL_HapticRumbleStop n
SDL_HapticRumbleSupported n
SDL_HapticRunEffect n
SDL_HapticSetAutocenter n
SDL_HapticSetGain n
SDL_HapticStopAll n
SDL_HapticStopEffect n
SDL_HapticUnpause n
SDL_HapticUpdateEffect n
SDL_JoystickIsHaptic y
SDL_MouseIsHaptic n
SDL_NumHaptics n

Audio Device Management, Playing and Recording

Name Bound Since Won't bind
SDL_AudioInit y
SDL_AudioQuit y
SDL_AudioStreamAvailable n 2.0.7
SDL_AudioStreamClear n 2.0.7
SDL_AudioStreamFlush n 2.0.7
SDL_AudioStreamGet n 2.0.7
SDL_AudioStreamPut n 2.0.7
SDL_BuildAudioCVT n
SDL_ClearQueuedAudio y
SDL_CloseAudio n
SDL_CloseAudioDevice y
SDL_ConvertAudio n
SDL_DequeueAudio n
SDL_FreeAudioStream n 2.0.7
SDL_FreeWAV n
SDL_GetAudioDeviceName y
SDL_GetAudioDeviceSpec n 2.0.16
SDL_GetAudioDeviceStatus y
SDL_GetAudioDriver y
SDL_GetAudioStatus n
SDL_GetCurrentAudioDriver y
SDL_GetDefaultAudioInfo n 2.24.0
SDL_GetNumAudioDevices y
SDL_GetNumAudioDrivers y
SDL_GetQueuedAudioSize y
SDL_LoadWAV n
SDL_LoadWAV_RW n
SDL_LockAudio n
SDL_LockAudioDevice n
SDL_MixAudio n
SDL_MixAudioFormat n
SDL_NewAudioStream n 2.0.7
SDL_OpenAudio n
SDL_OpenAudioDevice y
SDL_PauseAudio n
SDL_PauseAudioDevice y
SDL_QueueAudio n
SDL_UnlockAudio n
SDL_UnlockAudioDevice n

Thread Management

Name Bound Since Won't bind
SDL_CreateThread n
SDL_CreateThreadWithStackSize n 2.0.9
SDL_DetachThread n
SDL_GetThreadID n
SDL_GetThreadName n
SDL_SetThreadPriority n
SDL_ThreadID n
SDL_TLSCleanup n 2.0.16
SDL_TLSCreate n
SDL_TLSGet n
SDL_TLSSet n
SDL_WaitThread n

Thread Synchronization Primitives

Name Bound Since Won't bind
SDL_CondBroadcast n
SDL_CondSignal n
SDL_CondWait n
SDL_CondWaitTimeout n
SDL_CreateCond n
SDL_CreateMutex n
SDL_CreateSemaphore n
SDL_DestroyCond n
SDL_DestroyMutex n
SDL_DestroySemaphore n
SDL_LockMutex n
SDL_SemPost n
SDL_SemTryWait n
SDL_SemValue n
SDL_SemWait n
SDL_SemWaitTimeout n
SDL_TryLockMutex n
SDL_UnlockMutex n

Atomic Operations

Name Bound Since Won't bind
SDL_AtomicAdd n
SDL_AtomicCAS n
SDL_AtomicCASPtr n
SDL_AtomicDecRef n
SDL_AtomicGet n
SDL_AtomicGetPtr n
SDL_AtomicIncRef n
SDL_AtomicLock n
SDL_AtomicSet n
SDL_AtomicSetPtr n
SDL_AtomicTryLock n
SDL_AtomicUnlock n
SDL_CompilerBarrier n
SDL_MemoryBarrierReleaseFunction n 2.0.6

Timer Support

Name Bound Since Won't bind
SDL_AddTimer n
SDL_Delay y
SDL_GetPerformanceCounter y
SDL_GetPerformanceFrequency y
SDL_GetTicks y
SDL_GetTicks64 y 2.0.18
SDL_RemoveTimer n
SDL_TICKS_PASSED n

Filesystem Paths

Name Bound Since Won't bind
SDL_GetBasePath y
SDL_GetPrefPath y

File I/O Abstraction

Name Bound Since Won't bind
SDL_AllocRW n
SDL_FreeRW n * (implicitly called by RWclose)
SDL_RWFromConstMem n
SDL_RWFromFP n * (unix only)
SDL_RWFromFile y
SDL_RWFromMem n
SDL_RWclose y
SDL_RWread y
SDL_RWseek y
SDL_RWsize y
SDL_RWtell y
SDL_RWwrite y
SDL_ReadBE16 y
SDL_ReadBE32 y
SDL_ReadBE64 y
SDL_ReadLE16 y
SDL_ReadLE32 y
SDL_ReadLE64 y
SDL_ReadU8 y
SDL_WriteBE16 n
SDL_WriteBE32 n
SDL_WriteBE64 n
SDL_WriteLE16 n
SDL_WriteLE32 n
SDL_WriteLE64 n

Shared Object Loading and Function Lookup

Name Bound Since Won't bind
SDL_LoadObject y
SDL_LoadFunction y
SDL_UnloadObject y

Platform Detection

Name Bound Since Won't bind
SDL_GetPlatform n *

CPU Feature Detection

Name Bound Since Won't bind
SDL_GetCPUCacheLineSize y
SDL_GetCPUCount y
SDL_GetSystemRAM n
SDL_Has3DNow y
SDL_HasARMSIMD n 2.0.12
SDL_HasAVX y
SDL_HasAVX512F n 2.0.12
SDL_HasAVX2 y
SDL_HasAltiVec y
SDL_HasLSX n 2.24.0
SDL_HasLASX n 2.24.0
SDL_HasMMX y
SDL_HasNEON n 2.0.6
SDL_HasRDTSC y
SDL_HasSSE y
SDL_HasSSE2 y
SDL_HasSSE3 y
SDL_HasSSE41 y
SDL_HasSSE42 n
SDL_SIMDAlloc n 2.0.10
SDL_SIMDFree n 2.0.10
SDL_SIMDGetAlignment n 2.0.10
SDL_SIMDRealloc n 2.0.14

Byte Order and Byte Swapping

Name Bound Since Won't bind
SDL_Swap16 n
SDL_Swap32 n
SDL_Swap64 n
SDL_SwapBE16 n
SDL_SwapBE32 n
SDL_SwapBE64 n
SDL_SwapFloat n
SDL_SwapFloatBE n
SDL_SwapFloatLE n
SDL_SwapLE16 n
SDL_SwapLE32 n
SDL_SwapLE64 n

Bit Manipulation

Name Bound Since Won't bind
SDL_MostSignificantBitIndex32 n
SDL_HasExactlyOneBitSet32 n

Power Management Status

Name Bound Since Won't bind
SDL_GetPowerInfo y

Message boxes

Name Bound Since Won't bind
SDL_ShowMessageBox n
SDL_ShowSimpleMessageBox n

Platform-specific Functionality

Name Bound Since Won't bind
SDL_AndroidBackButton n
SDL_AndroidGetActivity n
SDL_AndroidGetExternalStoragePath n
SDL_AndroidGetExternalStorageState n
SDL_AndroidGetInternalStoragePath n
SDL_AndroidGetJNIEnv n
SDL_AndroidRequestPermission n
SDL_AndroidSendMessage n
SDL_AndroidShowToast n
SDL_Direct3D9GetAdapterIndex n
SDL_DXGIGetOutputInfo n
SDL_GDKGetDefaultUser n
SDL_GDKGetTaskQueue n
SDL_GetAndroidSDKVersion n
SDL_iPhoneSetAnimationCallback n
SDL_iPhoneSetEventPump n
SDL_IsAndroidTV n
SDL_IsChromebook n
SDL_IsDeXMode n
SDL_IsTablet n
SDL_LinuxSetThreadPriority n
SDL_LinuxSetThreadPriorityAndPolicy n
SDL_RenderGetD3D11Device n
SDL_RenderGetD3D12Device n
SDL_RenderGetD3D9Device n
SDL_SetWindowsMessageHook n
SDL_WinRTGetDeviceFamily n
SDL_WinRTGetFSPathUNICODE n
SDL_WinRTGetFSPathUTF8 n

Standard Library Functionality

Name Bound Since Won't bind
alloca n
SDL_acos n
SDL_stack_alloc n
SDL_stack_free n
SDL_malloc n
SDL_calloc n
SDL_realloc n
SDL_free n
SDL_GetOriginalMemoryFunctions n
SDL_SetMemoryFunctions n
SDL_GetNumAllocations n
SDL_getenv n
SDL_setenv n
SDL_CompareCallback n
SDL_qsort n
SDL_bsearch n
SDL_abs n
SDL_isalpha n
SDL_isalnum n
SDL_isblank n
SDL_iscntrl n
SDL_isdigit n
SDL_isxdigit n
SDL_ispunct n
SDL_isspace n
SDL_isupper n
SDL_islower n
SDL_isprint n
SDL_isgraph n
SDL_toupper n
SDL_tolower n
SDL_crc16 n
SDL_crc32 n
SDL_memset n
SDL_copyp n
etc.

SDL_image

Name Bound Since Won't bind
IMG_Linked_Version y
IMG_Init y
IMG_Quit y
IMG_Load y
IMG_Load_RW n
IMG_LoadTyped_RW y
IMG_LoadTexture n
IMG_LoadTexture_RW n
IMG_LoadTextureTyped_RW n
IMG_LoadCUR_RW n
IMG_LoadICO_RW n
IMG_LoadBMP_RW n
IMG_LoadPNM_RW n
IMG_LoadXPM_RW n
IMG_LoadXCF_RW n
IMG_LoadPCX_RW n
IMG_LoadGIF_RW n
IMG_LoadJPG_RW n
IMG_LoadTIF_RW n
IMG_LoadPNG_RW n
IMG_LoadTGA_RW n
IMG_LoadLBM_RW n
IMG_LoadXV_RW n
IMG_ReadXPMFromArray n
IMG_isCUR n
IMG_isICO n
IMG_isBMP n
IMG_isPNM n
IMG_isXPM n
IMG_isXCF n
IMG_isPCX n
IMG_isGIF n
IMG_isJPG n
IMG_isTIF n
IMG_isPNG n
IMG_isLBM n
IMG_isXV n
IMG_SavePNG y
IMG_SavePNG_RW n
IMG_SetError n *
IMG_GetError n *

SDL_ttf

Name Bound Since Won't bind
TTF_Init y
TTF_WasInit n *
TTF_Quit y
TTF_GetError n *
TTF_SetError n *
TTF_OpenFont n *
TTF_OpenFontRW n *
TTF_OpenFontIndex n *
TTF_OpenFontIndexRW y
TTF_CloseFont y
TTF_ByteSwappedUNICODE n
TTF_GetFontStyle y
TTF_SetFontStyle y
TTF_GetFontOutline y
TTF_SetFontOutline y
TTF_GetFontHinting y
TTF_SetFontHinting y
TTF_GetFontKerning y
TTF_SetFontKerning y
TTF_FontHeight y
TTF_FontAscent y
TTF_FontDescent y
TTF_FontLineSkip y
TTF_FontFaces y
TTF_FontFaceIsFixedWidth y
TTF_FontFaceFamilyName y
TTF_FontFaceStyleName y
TTF_GlyphIsProvided n
TTF_GlyphMetrics n
TTF_SizeText y
TTF_SizeUTF8 y
TTF_SizeUNICODE n
TTF_RenderText_Solid y
TTF_RenderUTF8_Solid y
TTF_RenderUNICODE_Solid n
TTF_RenderGlyph_Solid n
TTF_RenderText_Shaded y
TTF_RenderUTF8_Shaded y
TTF_RenderUNICODE_Shaded n
TTF_RenderGlyph_Shaded n
TTF_RenderText_Blended y
TTF_RenderUTF8_Blended y
TTF_RenderUNICODE_Blended n
TTF_RenderGlyph_Blended n
TTF_Linked_Version y
SDL_TTF_MAJOR_VERSION y
SDL_TTF_MINOR_VERSION y
SDL_TTF_PATCHLEVEL y

sdlada's People

Contributors

alexispaez avatar anisimkov avatar cxong avatar damdc91 avatar fabien-chouteau avatar jellix avatar jhamby avatar jquorning avatar leogermond avatar lucretia avatar onox avatar pmderodat avatar simonjwright avatar vovanium avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdlada's Issues

Sort out elaboration

There are no (pre-)elaborate pragmas, I would like as much as possible to be static at compile time.

Set_Context_Profile sets wrong profile or crashes

SDL.Video.GL.Set_Context_Profile accepts either Core, Compatibility, or ES, but the resulting context doesn't match. Traced the problem to sdl-video-gl.adb:470:

Result : C.int := SDL_GL_Set_Attribute (Attribute_Context_Profile, C.int (Profile_Values (Profile)));

Profile_Values is the array (1, 2, 4) and is being indexed incorrectly by Profile, an enum that itself has value 1, 2, or 4. I think Profile_Values is safe to remove, it's redundant and doesn't seem to be used anywhere else.

test

/polls Option1 'Option 2' "Option 3"

TODO: Fix co-ordinate types

There are a number of types which relate to co-ordinate and placement of objects upon the screen / surface / texture, they should all be related so we don't have to use view conversions all over the place.

Also need to fix the types so they can handle signed values, in SDL2 they use int's so that objects can be "blitted" offscreen, then objects can appear from offscreen somewhere, i.e. a alien coming from the top of the screen to the bottom. This also allows testing for objects which are totally offscreen, i.e. alien goes off the bottom of the screen, remove it from the list of renderable items.

  • There are 2 Size records, SDL.Video.Sizes and SDL.Video.Rectangles.Size. There should be only one!
  • SDL_RenderGetLogicalSize (SDL_RenderGetLogicalSize) can set w and h to zero, this takes the SDL.Video.Rectangles.Size because the SDL.Video.Sizes has Width and Height defined as Positive when they should really be Natural.

SDL2 headers not found on FreeBSD

Hello,

I commented on #73 not realising the ticket was closed, and I am not sure if closed tickets generate notifications....

So here is the original:
I am attempting to build sdlada on FreeBSD and am also getting the issues with the build not finding any SDL header. I too have to patch three files to prepend SDL2 to the include directive.

sdl2-config --cflags returns:

-I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE

sdl2-config --libs returns:

-L/usr/local/lib -lSDL2

Tho, I am unsure if I am building the project correctly, there is no Alire on FreeBSD yet, so I am using the Ports system to fetch, extract, and cd to ${SRC}/build/gnat/ and run GNU make there.

sdl2-config is installed and found by GNU make.

Constraint_Error when reading Event.Window.Event_ID

Reading Event.Window.Event_ID generates a Constraint_Error with the message "invalid data value 15 not in 0..14.

The following two values are missing and need to be appended after Close:

  1. Take_Focus
  2. Hit_Test

See SDL_WindowEventID in SDL_video.h on lines 168 and 169.

SDL driver: X11

Allow building as a relocatable library

I have a library project .gpr file that with "sdlada". If sdlada is built as a static library then I get the following error: cannot import static library project "sdlada".

If I change Library_Kind in build/gnat/sdlada.gpr to "relocatable", then the error disappears.

hi

#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "Simple 2D Gam

// Tạo hình chữ nhật đại diện cho nhân vật
sf::RectangleShape player(sf::Vector2f(50.0f, 50.0f));
player.setFillColor(sf::Color::Green);

// Đặt vị trí ban đầu của nhân vật
player.setPosition(375.0f, 275.0f);

while (window.isOpen()) {
    sf::Event event;
    while (window.pollEvent(event)) {
        if (event.type == sf::Event::Closed)
            window.close();
    }

    // Xử lý đầu vào - di chuyển nhân vật
    if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left)) {
        player.move(-5.0f, 0.0f);
    }
    if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right)) {
        player.move(5.0f, 0.0f);
    }
    if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up)) {
        player.move(0.0f, -5.0f);
    }
    if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down)) {
        player.move(0.0f, 5.0f);
    }

    window.clear();
    // Vẽ nhân vật lên cửa sổ
    window.draw(player);
    window.display();
}

return 0;

}

Unable to create a window using Native_Window parameter

Luke,

For my project I need to create a video window inside an existing windows control.
This can be done by specifying the hwnd of this control, and use it in SDL.Video.Windows.Makers.Create.
However I can not create the necessary parameter (Native : in Native_Window) based on my hwnd (i.e. Win32 handle or simply an Integer). For now I added a function in SDL.Video.Windows that uses unchecked_conversion to create a Native_Window variable:

function From_Hwnd (Hwnd : Integer) return Native_Window is
function To_Address is new Ada.Unchecked_Conversion (Source => Integer, Target => System.Address);
begin
return Native_Window (To_Address (Hwnd));
end From_Hwnd;

I have already tested this and it works!

Kind regards,
Rob

Compile of SDL.Video.Palettes fails

Compilation fails with CE 2020:

sdl-video-palettes.adb:146:41: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:146:41: found type access to "Palette'CLASS" defined at line 69
sdl-video-palettes.adb:163:41: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:163:41: found type access to "Palette'CLASS" defined at line 69

Patch available in days..

Fix Surface and Texture API's

The idea is to mirror the API's for accessing pixel data as they are both images, essentially.

  • Pixel Iterators for Images
  • Pixel Iterators for Textures
  • Line Iterators for Images
  • Line Iterators for Textures

Add mixer

I am working on adding SDL2_mixer. Sound freaks wanted for trying it out..

libsdlada.a can't link to sdl2 in linux

Trying to compile a separate project that depends on SDLAda. I have followed the directions in README.md and installed the static library at $HOME/opt. The gpr located at $HOME/opt/share/gpr is accessible and shows in GPS as a dependency. The tests in the SDLAda library build and execute correctly.

When I try to take a test and compile it as part of a separate project, I get many linking errors:

gprbuild -d -P/home/XXXX/Documents/AdaProjects/airbase/airbase.gpr -XSDLADA_BUILD=release
Link
   [link]         sim.adb
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-events-events.o): in function `sdl__events__events__poll':
sdl-events-events.adb:(.text.sdl__events__events__poll+0x5): undefined reference to `SDL_PollEvent'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-events-events.o): in function `sdl__events__events__wait':
sdl-events-events.adb:(.text.sdl__events__events__wait+0x6): undefined reference to `SDL_WaitEvent'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put':
sdl-log.adb:(.text.sdl__log__put+0x28): undefined reference to `SDL_Log'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put__2':
sdl-log.adb:(.text.sdl__log__put__2+0x36): undefined reference to `SDL_LogMessage'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_critical':
sdl-log.adb:(.text.sdl__log__put_critical+0x30): undefined reference to `SDL_LogCritical'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_debug':
sdl-log.adb:(.text.sdl__log__put_debug+0x30): undefined reference to `SDL_LogDebug'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_error':
sdl-log.adb:(.text.sdl__log__put_error+0x30): undefined reference to `SDL_LogError'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_info':
sdl-log.adb:(.text.sdl__log__put_info+0x30): undefined reference to `SDL_LogInfo'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_verbose':
sdl-log.adb:(.text.sdl__log__put_verbose+0x30): undefined reference to `SDL_LogVerbose'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__put_warn':
sdl-log.adb:(.text.sdl__log__put_warn+0x30): undefined reference to `SDL_LogWarn'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__reset_priorities':
sdl-log.adb:(.text.sdl__log__reset_priorities+0x1): undefined reference to `SDL_LogResetPriorities'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__set':
sdl-log.adb:(.text.sdl__log__set+0x1): undefined reference to `SDL_LogSetAllPriority'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-log.o): in function `sdl__log__set__2':
sdl-log.adb:(.text.sdl__log__set__2+0x1): undefined reference to `SDL_LogSetPriority'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-palettes.o): in function `sdl__video__palettes__create':
sdl-video-palettes.adb:(.text.sdl__video__palettes__create+0x57): undefined reference to `SDL_AllocPalette'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-palettes.o): in function `sdl__video__palettes(float, long double,...)(...)':
sdl-video-palettes.adb:(.text.sdl__video__palettes__free+0x12): undefined reference to `SDL_FreePalette'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__enclose':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__enclose+0x4b): undefined reference to `SDL_EnclosePoints'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__enclose__2':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__enclose__2+0x38): undefined reference to `SDL_EnclosePoints'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__has_intersected':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__has_intersected+0x20): undefined reference to `SDL_HasIntersection'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__intersects':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__intersects+0x29): undefined reference to `SDL_IntersectRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__clip_to':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__clip_to+0x33): undefined reference to `SDL_IntersectRectAndLine'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-rectangles.o): in function `sdl__video__rectangles__union':
sdl-video-rectangles.adb:(.text.sdl__video__rectangles__union+0x25): undefined reference to `SDL_UnionRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0x56): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0x95): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0xad): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit__2+0xca): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit_scaled__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0x7e): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0xc5): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0xdb): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled__2+0xeb): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__fill__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__fill__2+0x21): undefined reference to `SDL_FillRects'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__clip_rectangle':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__clip_rectangle+0x1d): undefined reference to `SDL_GetClipRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_clip_rectangle':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_clip_rectangle+0x16): undefined reference to `SDL_SetClipRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__alpha_blend':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__alpha_blend+0xf): undefined reference to `SDL_GetSurfaceAlphaMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_alpha_blend':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_alpha_blend+0xe): undefined reference to `SDL_SetSurfaceAlphaMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blend_mode':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blend_mode+0xf): undefined reference to `SDL_GetSurfaceAlphaMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_blend_mode':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_blend_mode+0xa): undefined reference to `SDL_SetSurfaceBlendMode'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__colour':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__colour+0x19): undefined reference to `SDL_GetSurfaceColorMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_colour':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_colour+0x1b): undefined reference to `SDL_SetSurfaceColorMod'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__lock':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__lock+0xa): undefined reference to `SDL_LockSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__unlock':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__unlock+0x5): undefined reference to `SDL_UnlockSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_rle':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_rle+0xe): undefined reference to `SDL_SetSurfaceRLE'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__finalize':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__finalize+0x14): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceDF__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__surfaceDF__2+0x14): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__set_colour_key':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__set_colour_key+0x29): undefined reference to `SDL_SetColorKey'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit+0x1b): undefined reference to `SDL_UpperBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__blit_scaled':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__blit_scaled+0x1b): undefined reference to `SDL_UpperBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__lower_blit':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__lower_blit+0x32): undefined reference to `SDL_LowerBlit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__lower_blit_scaled':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__lower_blit_scaled+0x32): undefined reference to `SDL_LowerBlitScaled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces(float, int, long, long)':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__fill+0x21): undefined reference to `SDL_FillRect'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__colour_key':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__colour_key+0x12): undefined reference to `SDL_GetColorKey'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces___assign__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces___assign__2+0x61): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceSI__2.cold.30':
sdl-video-surfaces.adb:(.text.unlikely.sdl__video__surfaces__surfaceSI__2+0x5c): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceSI__2':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__surfaceSI__2+0xa1): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__surfaceFD':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__surfaceFD+0x14): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces.o): in function `sdl__video__surfaces__finalize_spec':
sdl-video-surfaces.adb:(.text.sdl__video__surfaces__finalize_spec+0x46): undefined reference to `SDL_FreeSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows-makers.o): in function `sdl__video__windows__makers__create':
sdl-video-windows-makers.adb:(.text.sdl__video__windows__makers__create+0x41): undefined reference to `SDL_CreateWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows-makers.o): in function `sdl__video__windows__makers__create__3':
sdl-video-windows-makers.adb:(.text.sdl__video__windows__makers__create__3+0xc): undefined reference to `SDL_CreateWindowFrom'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__is_grabbed':
sdl-video-windows.adb:(.text.sdl__video__windows__is_grabbed+0x9): undefined reference to `SDL_GetWindowGrab'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_grabbed':
sdl-video-windows.adb:(.text.sdl__video__windows__set_grabbed+0x9): undefined reference to `SDL_SetWindowGrab'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_id':
sdl-video-windows.adb:(.text.sdl__video__windows__get_id+0x5): undefined reference to `SDL_GetWindowID'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_maximum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__set_maximum_size+0xc): undefined reference to `SDL_SetWindowMaximumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_minimum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__set_minimum_size+0xc): undefined reference to `SDL_SetWindowMinimumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__pixel_format':
sdl-video-windows.adb:(.text.sdl__video__windows__pixel_format+0x9): undefined reference to `SDL_GetWindowPixelFormat'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_position':
sdl-video-windows.adb:(.text.sdl__video__windows__set_position+0xc): undefined reference to `SDL_SetWindowPosition'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_size':
sdl-video-windows.adb:(.text.sdl__video__windows__set_size+0xc): undefined reference to `SDL_SetWindowSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__hide':
sdl-video-windows.adb:(.text.sdl__video__windows__hide+0x5): undefined reference to `SDL_HideWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__show':
sdl-video-windows.adb:(.text.sdl__video__windows__show+0x5): undefined reference to `SDL_ShowWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__maximise':
sdl-video-windows.adb:(.text.sdl__video__windows__maximise+0x5): undefined reference to `SDL_MaximizeWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__minimise':
sdl-video-windows.adb:(.text.sdl__video__windows__minimise+0x5): undefined reference to `SDL_MinimizeWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__raise_and_focus':
sdl-video-windows.adb:(.text.sdl__video__windows__raise_and_focus+0x5): undefined reference to `SDL_RaiseWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__restore':
sdl-video-windows.adb:(.text.sdl__video__windows__restore+0x5): undefined reference to `SDL_RestoreWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_icon':
sdl-video-windows.adb:(.text.sdl__video__windows__set_icon+0x15): undefined reference to `SDL_SetWindowIcon'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__update_surface_rectangles':
sdl-video-windows.adb:(.text.sdl__video__windows__update_surface_rectangles+0x21): undefined reference to `SDL_UpdateWindowSurfaceRects'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_brightness':
sdl-video-windows.adb:(.text.sdl__video__windows__get_brightness+0x9): undefined reference to `SDL_GetWindowBrightness'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_brightness':
sdl-video-windows.adb:(.text.sdl__video__windows__set_brightness+0x13): undefined reference to `SDL_SetWindowBrightness'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_data':
sdl-video-windows.adb:(.text.sdl__video__windows__get_data+0x28): undefined reference to `SDL_GetWindowData'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_data':
sdl-video-windows.adb:(.text.sdl__video__windows__set_data+0x2d): undefined reference to `SDL_SetWindowData'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__display_index':
sdl-video-windows.adb:(.text.sdl__video__windows__display_index+0x13): undefined reference to `SDL_GetWindowDisplayIndex'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_display_mode':
sdl-video-windows.adb:(.text.sdl__video__windows__get_display_mode+0x13): undefined reference to `SDL_GetWindowDisplayMode'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_display_mode':
sdl-video-windows.adb:(.text.sdl__video__windows__set_display_mode+0x13): undefined reference to `SDL_SetWindowDisplayMode'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_flags':
sdl-video-windows.adb:(.text.sdl__video__windows__get_flags+0xe): undefined reference to `SDL_GetWindowFlags'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_gamma_ramp':
sdl-video-windows.adb:(.text.sdl__video__windows__get_gamma_ramp+0x13): undefined reference to `SDL_GetWindowGammaRamp'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_gamma_ramp':
sdl-video-windows.adb:(.text.sdl__video__windows__set_gamma_ramp+0x13): undefined reference to `SDL_SetWindowGammaRamp'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_maximum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__get_maximum_size+0x2c): undefined reference to `SDL_GetWindowMaximumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_minimum_size':
sdl-video-windows.adb:(.text.sdl__video__windows__get_minimum_size+0x2c): undefined reference to `SDL_GetWindowMinimumSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_position':
sdl-video-windows.adb:(.text.sdl__video__windows__get_position+0x28): undefined reference to `SDL_GetWindowPosition'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_size':
sdl-video-windows.adb:(.text.sdl__video__windows__get_size+0x2c): undefined reference to `SDL_GetWindowSize'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_surface':
sdl-video-windows.adb:(.text.sdl__video__windows__get_surface+0x13): undefined reference to `SDL_GetWindowSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__get_title':
sdl-video-windows.adb:(.text.sdl__video__windows__get_title+0x12): undefined reference to `SDL_GetWindowTitle'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_title':
sdl-video-windows.adb:(.text.sdl__video__windows__set_title+0x3a): undefined reference to `SDL_SetWindowTitle'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__update_surface':
sdl-video-windows.adb:(.text.sdl__video__windows__update_surface+0x13): undefined reference to `SDL_UpdateWindowSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__update_surface_rectangle':
sdl-video-windows.adb:(.text.sdl__video__windows__update_surface_rectangle+0x24): undefined reference to `SDL_UpdateWindowSurfaceRects'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__set_mode':
sdl-video-windows.adb:(.text.sdl__video__windows__set_mode+0x20): undefined reference to `SDL_SetWindowFullscreen'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__finalize':
sdl-video-windows.adb:(.text.sdl__video__windows__finalize+0x18): undefined reference to `SDL_DestroyWindow'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-windows.o): in function `sdl__video__windows__from_id':
sdl-video-windows.adb:(.text.sdl__video__windows__from_id+0x9d): undefined reference to `SDL_GetWindowFromID'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__is_screen_saver_enabled':
sdl-video.adb:(.text.sdl__video__is_screen_saver_enabled+0x5): undefined reference to `SDL_IsScreenSaverEnabled'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__initialise':
sdl-video.adb:(.text.sdl__video__initialise+0x19): undefined reference to `SDL_VideoInit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sdl-video.adb:(.text.sdl__video__initialise+0x3b): undefined reference to `SDL_VideoInit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__total_drivers':
sdl-video.adb:(.text.sdl__video__total_drivers+0x6): undefined reference to `SDL_GetNumVideoDrivers'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__driver_name':
sdl-video.adb:(.text.sdl__video__driver_name+0x8): undefined reference to `SDL_GetVideoDriver'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video.o): in function `sdl__video__current_driver_name':
sdl-video.adb:(.text.sdl__video__current_driver_name+0x6): undefined reference to `SDL_GetCurrentVideoDriver'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-error.o): in function `sdl__error__set':
sdl-error.adb:(.text.sdl__error__set+0x28): undefined reference to `SDL_SetError'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-error.o): in function `sdl__error__get':
sdl-error.adb:(.text.sdl__error__get+0x5): undefined reference to `SDL_GetError'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-surfaces-makers.o): in function `sdl__video__surfaces__makers__create':
sdl-video-surfaces-makers.adb:(.text.sdl__video__surfaces__makers__create+0x50): undefined reference to `SDL_CreateRGBSurface'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.o: in function `_ada_sim':
sim.adb:(.text+0x34b): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x3f3): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x474): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x5e6): undefined reference to `SDL_MapRGB'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: sim.adb:(.text+0x820): undefined reference to `SDL_Quit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__image':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__image+0xe): undefined reference to `SDL_GetPixelFormatName'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__to_colour':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__to_colour+0x24): undefined reference to `SDL_GetRGBA'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__to_pixel__3':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__to_pixel__3+0x1a): undefined reference to `SDL_MapRGBA'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl-video-pixel_formats.o): in function `sdl__video__pixel_formats__to_masks':
sdl-video-pixel_formats.adb:(.text.sdl__video__pixel_formats__to_masks+0x2b): undefined reference to `SDL_PixelFormatEnumToMasks'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__initialise':
sdl.adb:(.text.sdl__initialise+0x5): undefined reference to `SDL_Init'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__initialise_sub_system':
sdl.adb:(.text.sdl__initialise_sub_system+0x5): undefined reference to `SDL_InitSubSystem'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__was_initialised':
sdl.adb:(.text.sdl__was_initialised+0x3): undefined reference to `SDL_WasInit'
/usr/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a(sdl.o): in function `sdl__was_initialised__2':
sdl.adb:(.text.sdl__was_initialised__2+0x4): undefined reference to `SDL_WasInit'
collect2: error: ld returned 1 exit status
gprbuild: link of sim.adb failed
gprbuild: failed command was: /usr/GNAT/2019/bin/gcc sim.o b__sim.o /home/XXXX/opt/sdlada/lib/sdlada.release/libsdlada.a -L/home/XXXX/Documents/AdaProjects/airbase/obj/ -L/home/XXXX/Documents/AdaProjects/airbase/obj/ -L/home/XXXX/opt/sdlada/lib/sdlada.release/ -L/usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib/ -static-libgcc /usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib/libgnat.a -ldl -Wl,-rpath-link,/usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1//adalib -Wl,-z,origin,
-rpath,$ORIGIN/:$ORIGIN/../../../..//opt/sdlada/lib/sdlada.release:/usr/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib -o sim
[2021-03-06 17:39:15] process exited with status 4, 100% (12/12), elapsed time: 00.57s
```

Set_Colour_Key not working

Set_Color_Key does not work on macOS with SDL2 version 2.0.10.
It works with Homebrew SDL2 version 2.0.12.
Suggest to introduce optional flag SDL_FRAMEWORK=False/True for frameworks.
I will make patch when approved.

Suggestion: Remove dependence on C

When I have tried to get SDLAda working on Mac most of the trouble is about getting the version info working.
All ado about som library versions that I do not check or care much about anyway.
Therefore I suggest removing dependance on C sources in the main project.
This will imo make it much easier for newcomers to use SDLAda.
Perhaps version info (in needed) could be put into a separate gpr file and postpone version checking until link time.

Optimisation

Look into optimising the code.

  • Make SDL pure, should be able to use expression functions and private SDL imports.

Issues With Compiling This Project

make SDL_PLATFORM=linux SDL_MODE=release
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=linux \
	-Psdlada.gpr
Compile
   [C]            version_ttf.c
/home/christopher/source/sdlada/src/ttf/version_ttf.c:26:10: fatal error: 'SDL_ttf.h' file not found
#include <SDL_ttf.h>
         ^~~~~~~~~~~
1 error generated.
gprbuild: *** compilation phase failed
make: *** [makefile:48: lib/libadasdl.a] Error 4

I have built SDL2 from source. Although I probably plan to use ttf, I'm curious how would I go about getting it, and included so this could be built.

sdl v208?

Luke,
I see sdlada currently supports sdl207. Do you have yet a sense of how different 208 is?
I have a c++ code that compiles using 207 headers and 208 libraries that seems to work Ok, given the limited interfaces my code actually uses.
I am planning to try using sdlada soon, but it would be even sooner if I knew you had support for 208 coming soon. Are you planning an update any time soon?
(feel free to close this issue since it's just a question...could not find your email anywhere...)
thx,
Rod [email protected]

Add gamepad rumble support

Binding SDL's SDL_Haptic* functions to support rumble feature of gamepads.

I have a DS4 controller, so I can test it if you don't have any gamepads.

Fix controlled objects

Allow user to call Finalize on controlled objects such that they don't cause a segfault on exit due to being finalized twice.

Unable to get or set Colour_Key

The routines SDL.Video.Surfaces.Colour_Key (calls SDL_GetColorKey)
and SDL.Video.Surfaces.Set_Colour_Key (calls SDL_SetColorKey) both crash with an exception Surface_Error.
I need the Set_Colour_Key in order to make my image (bmp) transparent.

To test these functions, I added some calls to the load_image.adb example (just after Window_Surface := W.Get_Surface) :
declare
Color_Key : SDL.Video.Palettes.Colour;
begin
Color_Key := SDL.Video.Surfaces.Colour_Key (Window_Surface);
end;

I noticed that the Set_Colour_Key procedure was missing a parameter for flags, but fixing this did not help.

Any help is greatly appreciated :-)

SDL_GL_BindTexture (SDL.Video.SDL_GL_BindTexture) takes floats

In the SDL_GL_BindTexture) section, this function returns two floating point values, why are they floats instead of ints? In the source these can be 0.0, 1.0 or the texture dimensions. In the examples they are multiplied by texture coords.

  • Should the binding reflect this?
  • Move the function to SDL.Video.Textures.GL package to reflect what it operates on or keep where it is?

TODO: Fix events

This is two issues in one:

  • Need a tagged event hierarchy rather than a copy of the C struct.
    • Root type
    • Keyboard type
    • Joystick type
    • Mouse type
  • Rename SDL.Events.Events and make it a private package, or move the Events type to the private part of SDL.Events.
  • Move SDL.Events.Events.Poll to SDL.Events.Poll and change to use the tagged types.
    • Use Ada's factory for creating tagged types - too much overhead, too slow?
  • Investigate calling SDL.Events.Poll in the library, copying all events to an event queue held in a protected object. This would help with tasking at a higher level. This might also be a bit slower, needs to be checked.

Logging functions fail on Windows

SDL.Log.Put ("foo");
SDL.Log.Put_Debug ("bar");

...outputs the following for me on Win 7 64-bit:

INFO: foo
DEBUG:

The "bar" is missing. Gdb reveals the string is not being passed from Ada to C properly in the call to SDL_LogDebug(). I suspect it's related to this caveat on 'C' calling conventions, especially because SDL_Log() takes one argument while SDL_LogDebug() takes two:

In C, varargs allows a function to take a variable number of arguments. There is no direct equivalent in this to Ada. One approach that can be used is to create a C wrapper for each different profile and then interface to this C wrapper. For example, to print an int value using printf, create a C function printfi that takes two arguments, a pointer to a string and an int, and calls printf. Then in the Ada program, use pragma Import to interface to printfi.

It may work on some platforms to directly interface to a varargs function by providing a specific Ada profile for a particular call. However, this does not work on all platforms, since there is no guarantee that the calling sequence for a two argument normal C function is the same as for calling a varargs C function with the same two arguments.

Incorrect Key_Codes constants in sdl-events-keyboards.ads

Hello, it seems that the wrong constants are being generated for the sdl-events-keyboards.ads file.

Reference: https://wiki.libsdl.org/SDLKeycodeLookup, which shows 0x40000000 as the or-ed mask.

I believe line 368 in tools/gen_keyboard.adb should change from:

Internal_To_Key_Code_Mask : constant Key_Codes := 16#2000_0000#

to:

Internal_To_Key_Code_Mask : constant Key_Codes := 16#4000_0000#

I just edited the generated file to give me the correct key codes, which was a good workaround without me having to rebuild SDLAda. Thank you!

Errors at make

Hi , i just want to use the library .
I unzip the archive and open a terminal into it .
When i apply the README file , i got the following errors =
How solve the problem ?

dead-code@Machine:/Bureau/sdlada-master$ make SDL_PLATFORM=linux SDL_BUILD=static SDL_MODE=release
gprbuild -p -gnat2012 -XSDL_BUILD=static -XSDL_MODE=release -XSDL_PLATFORM=linux
-Psdlada.gpr -cargs sdl2-config --cflags
sdl_version.gpr:1:09: warning: there are no Ada sources in this project
gcc-4.6 -c -ffunction-sections -fdata-sections -gnat2012 -gnata -gnato -gnatE -gnaty -gnaty-s -gnatyO -gnatyM120 -gnatyO -O2 -I/usr/include/SDL2 -D_REENTRANT -gnat2012 sdl-events-keyboards.adb
sdl-events-keyboards.adb:30:09: aspect identifier expected
sdl-events-keyboards.adb:39:09: aspect identifier expected
sdl-events-keyboards.adb:48:09: aspect identifier expected
sdl-events-keyboards.adb:57:09: aspect identifier expected
sdl-events-keyboards.adb:67:09: aspect identifier expected
sdl-events-keyboards.adb:77:09: aspect identifier expected
gprbuild: *** compilation phase failed
make: *** [sdl_build.gpr] Erreur 4
dead-code@Machine:
/Bureau/sdlada-master$

I use Ubuntu 14.04 LTS in 32 bits.

Possible Newer Version of GNAT not compiling this project.

Originally reported here. My suspicion is that the latest version of ada has a new feature which does not allow this anonymous type usage anymore.

[Ada]          sdl-video-palettes.adb
sdl-video-palettes.adb:146:41: error: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:146:41: error: found type access to "Palette'CLASS" defined at line 69
sdl-video-palettes.adb:163:41: error: expected type "Palette_Constant_Access" defined at sdl-video-palettes.ads:124
sdl-video-palettes.adb:163:41: error: found type access to "Palette'CLASS" defined at line 69

Unable to set Colour_Key

This issue is a follow-op on issue #9.

Unfortunately that issue was only partially solved, hence this new issue. Sorry for the confusion.

I found that running a program that calls Set_Colour_Key (SDL_SetColorKey) raises an Exception_Access_Violation exception.
(on my Win10 machine this is a segmentation fault in SDL2.dll:
0x6c7e490d in SDL_LogCritical() from SDL2dll
Version SDL 2.0.7 32bits - SDL2.dll 23-10-2017 996.352 bytes)

Also I added the extra ´Flag' parameter and created a simple pixel value, but to no avail.

BTW, there is an SDL2 example in C++ that does work: http://lazyfoo.net/tutorials/SDL/10_color_keying/index.php

By comparing the resulting surfaces just before SDL_SetColorKey is called, I was trying to find out what was wrong, but I haven't found it yet...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.