{"id":18411545,"url":"https://github.com/mikkun/gawk-sdl2","last_synced_at":"2025-04-12T22:55:55.831Z","repository":{"id":239297691,"uuid":"799128812","full_name":"mikkun/gawk-sdl2","owner":"mikkun","description":"SDL2 bindings for gawk","archived":false,"fork":false,"pushed_at":"2024-11-16T14:45:31.000Z","size":186,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T22:55:52.745Z","etag":null,"topics":["awk","gawk","sdl2","sdl2-bindings","sdl2-mixer"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikkun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-11T09:00:01.000Z","updated_at":"2024-11-16T14:45:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c90fc27-fb35-4fe8-82df-6996322cfce1","html_url":"https://github.com/mikkun/gawk-sdl2","commit_stats":null,"previous_names":["mikkun/gawk-sdl2"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikkun%2Fgawk-sdl2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikkun%2Fgawk-sdl2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikkun%2Fgawk-sdl2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikkun%2Fgawk-sdl2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikkun","download_url":"https://codeload.github.com/mikkun/gawk-sdl2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643050,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awk","gawk","sdl2","sdl2-bindings","sdl2-mixer"],"created_at":"2024-11-06T03:37:33.175Z","updated_at":"2025-04-12T22:55:55.802Z","avatar_url":"https://github.com/mikkun.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gawk-sdl2\n\n![GitHub top language](https://img.shields.io/github/languages/top/mikkun/gawk-sdl2)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/mikkun/gawk-sdl2)\n![GitHub license](https://img.shields.io/github/license/mikkun/gawk-sdl2)\n\n\u003e 🎮 SDL2 bindings for gawk\n\n## Description\n\n**gawk-sdl2** provides a shared library extension for gawk to use the SDL2 library.\n\n![gawk-sdl2 screenshot](./md-images/gawk-sdl2-screenshot.png)\n\n\u003e [!NOTE]\n\u003e This is an experimental project with a very limited number of available functions. Additionally, due to gawk storing all numbers as double-precision floating point numbers, it may not function properly on 64-bit systems.\n\n## Requirements\n\n- [GNU awk](https://www.gnu.org/software/gawk/) (\u0026gt;= 4.2.1)\n- [SDL 2.0](https://github.com/libsdl-org/SDL/tree/SDL2) headers and libraries\n- [SDL_mixer 2.0](https://github.com/libsdl-org/SDL_mixer/tree/SDL2) headers and libraries\n\n## Installation\n\n### Install the Build Dependencies\n\n```shell\n# Debian-based distributions\nsudo apt install build-essential\nsudo apt install libsdl2-dev libsdl2-mixer-dev\n\n# Fedora-based distributions\nsudo dnf groupinstall \"Development Tools\" \"Development Libraries\"\nsudo dnf install SDL2-devel SDL2_mixer-devel\n\n# Arch-based distributions\nsudo pacman -S base-devel\nsudo pacman -S sdl2 sdl2_mixer\n```\n\n### Clone the Repository\n\n```shell\ngit clone https://github.com/mikkun/gawk-sdl2.git\n```\n\n### Build the Extension\n\n```shell\ncd gawk-sdl2\nmake\n```\n\n### Run the Example\n\n```shell\ncd examples\nAWKLIBPATH=.. ./pong.awk\n```\n\n## Usage\n\nSee `examples/*.awk` for usage.\n\n## Implemented Functions\n\n🚧 Functions are being implemented as needed. The functions currently implemented are as follows:\n\n### SDL 2.0\n\n- `SDL_AllocFormat`\n- `SDL_AllocPalette`\n- `SDL_BlitSurface`\n- `SDL_CreateRGBSurface`\n- `SDL_CreateRGBSurfaceWithFormat`\n- `SDL_CreateRenderer`\n- `SDL_CreateTexture`\n- `SDL_CreateTextureFromSurface`\n- `SDL_CreateWindow`\n- `SDL_Delay`\n- `SDL_DestroyRenderer`\n- `SDL_DestroyTexture`\n- `SDL_DestroyWindow`\n- `SDL_FillRect`\n- `SDL_FreeFormat`\n- `SDL_FreePalette`\n- `SDL_FreeSurface`\n- `SDL_Gawk_AllocColorPalette`\n- `SDL_Gawk_AllocEvent`\n- `SDL_Gawk_AllocRect`\n- `SDL_Gawk_GetEventType`\n- `SDL_Gawk_GetKeyboardState`\n- `SDL_Gawk_GetPixelColor`\n- `SDL_Gawk_PixelFormatEnumToArray`\n- `SDL_Gawk_PixelFormatToArray`\n- `SDL_Gawk_SetPixelColor`\n- `SDL_Gawk_SurfaceToArray`\n- `SDL_Gawk_UpdateColorPalette`\n- `SDL_Gawk_UpdateRect`\n- `SDL_GetError`\n- `SDL_GetPixelFormatName`\n- `SDL_GetTicks`\n- `SDL_GetWindowPixelFormat`\n- `SDL_GetWindowSurface`\n- `SDL_HasIntersection`\n- `SDL_Init`\n- `SDL_InitSubSystem`\n- `SDL_MapRGBA`\n- `SDL_MasksToPixelFormatEnum`\n- `SDL_PollEvent`\n- `SDL_Quit`\n- `SDL_QuitSubSystem`\n- `SDL_RenderClear`\n- `SDL_RenderCopy`\n- `SDL_RenderDrawLine`\n- `SDL_RenderDrawRect`\n- `SDL_RenderFillRect`\n- `SDL_RenderPresent`\n- `SDL_SetPaletteColors`\n- `SDL_SetRenderDrawColor`\n- `SDL_SetSurfacePalette`\n- `SDL_SetWindowTitle`\n- `SDL_ShowSimpleMessageBox`\n- `SDL_UpdateTexture`\n- `SDL_UpdateWindowSurface`\n- `SDL_VERSIONNUM`\n\n### SDL_mixer 2.0\n\n- `Mix_AllocateChannels`\n- `Mix_CloseAudio`\n- `Mix_FreeChunk`\n- `Mix_FreeMusic`\n- `Mix_Gawk_Linked_Version`\n- `Mix_Gawk_QuerySpec`\n- `Mix_GetError`\n- `Mix_HaltChannel`\n- `Mix_HaltMusic`\n- `Mix_LoadMUS`\n- `Mix_LoadWAV`\n- `Mix_OpenAudio`\n- `Mix_PlayChannel`\n- `Mix_PlayChannelTimed`\n- `Mix_PlayMusic`\n- `Mix_Playing`\n- `Mix_PlayingMusic`\n- `Mix_SetDistance`\n- `Mix_SetMusicCMD`\n- `Mix_SetMusicPosition`\n- `Mix_SetPanning`\n- `Mix_SetPosition`\n- `Mix_SetReverseStereo`\n- `Mix_VolumeMusic`\n\n## TODO\n\n- Implement more functions.\n\n## License\n\n[GNU General Public License v3.0 or later](./LICENSE)\n\n## Author\n\n[KUSANAGI Mitsuhisa](https://github.com/mikkun)\n\n## References\n\n- [Dynamic Extensions (The GNU Awk User’s Guide)](https://www.gnu.org/software/gawk/manual/html_node/Dynamic-Extensions.html)\n- [SDL2/FrontPage - SDL Wiki](https://wiki.libsdl.org/SDL2/FrontPage)\n- [SDL2_mixer/FrontPage - SDL Wiki](https://wiki.libsdl.org/SDL2_mixer/FrontPage)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikkun%2Fgawk-sdl2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikkun%2Fgawk-sdl2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikkun%2Fgawk-sdl2/lists"}