Skip to content

Commit

Permalink
Merge pull request #13 from Over-Run/openal
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 authored Jan 7, 2025
2 parents 4b26cbd + 08babcd commit 2189101
Show file tree
Hide file tree
Showing 90 changed files with 10,701 additions and 169 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The formatted code:
*/
```
;
- The class names **MUST** be CamelCase;
- The class names **MUST** be CamelCase except for generated sources;
- The method and field names _should_ be camelCase; this restriction can be widened for non-public APIs;
- Other rules specified in [.editorconfig](.editorconfig).

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ The customizer has already included this.
| [GLFW](http://www.glfw.org/) | Create multiple windows, handle user input (keyboard, mouse, gaming peripherals) and manage contexts. Also features multi-monitor support, clipboard access, file drag-n-drop, and [much more](http://www.glfw.org/docs/latest/news.html). |
| [Native File Dialog Extended](https://github.com/btzy/nativefiledialog-extended) | A small C library that portably invokes native file open, folder select and file save dialogs. |

### Audio

| Library | Description |
|-----------------------------------|------------------------------------------------------------------------------------------------------------------------|
| [OpenAL](https://www.openal.org/) | A cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications. |

### [stb](https://github.com/nothings/stb) - single-file public domain libraries for C/C++

| Library | Description |
Expand Down
6 changes: 6 additions & 0 deletions buildSrc/src/main/kotlin/natives.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ enum class NativeBinding(
) {
GLFW("glfw", "glfw", NativePlatform.enumEntries),
NFD("nfd", "nfd", NativePlatform.enumEntries),
OPENAL("openal", "openal", NativePlatform.enumEntries),
STB("stb", "stb", NativePlatform.enumEntries),
}

Expand Down Expand Up @@ -73,6 +74,11 @@ enum class Artifact(
"A tiny, neat C library that portably invokes native file open and save dialogs.",
":nfd"
),
OPENAL(
"OverrunGL - OpenAL bindings",
"A cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications.",
":openal"
),
OPENGL(
"OverrunGL - OpenGL bindings",
"The most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms.",
Expand Down
1 change: 1 addition & 0 deletions doc/internal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ To publish this library, you need a GPG key and the write permission of Maven Ce

- [glfw](https://github.com/Over-Run/glfw-ci)
- [nfd](https://github.com/Over-Run/nfd-ci)
- [openal](https://github.com/Over-Run/openal-ci)
- [stb](https://github.com/Over-Run/stb-ci)

### Packing Natives
Expand Down
1 change: 1 addition & 0 deletions doc/notes/0.x/0.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ This version includes the following features:
- stb features introduced in README
- Native memory access for JOML
- Native File Dialog Extended
- OpenAL and extensions
5 changes: 3 additions & 2 deletions generators/core/src/main/kotlin/overrungl/MemoryStack.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2024 Overrun Organization
* Copyright (c) 2024-2025 Overrun Organization
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,6 +19,7 @@ package overrungl
import overrungl.gen.formatter_off
import overrungl.gen.formatter_on
import overrungl.gen.replaceCode
import overrungl.gen.writeString
import java.nio.file.Files
import kotlin.io.path.Path

Expand Down Expand Up @@ -59,7 +60,7 @@ fun memoryStack() {

sb.appendLine(formatter_on)

Files.writeString(path, replaceCode(src, sb.toString()))
writeString(path, replaceCode(src, sb.toString()))
}

private enum class Type {
Expand Down
25 changes: 25 additions & 0 deletions generators/openal/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* MIT License
*
* Copyright (c) 2025 Overrun Organization
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*/

plugins {
id("generator.conventions")
}

dependencies {
implementation(project(":generators"))
}

registerGenerateTask("overrungl.openal.OpenALGeneratorKt", ":openal")
Loading

0 comments on commit 2189101

Please sign in to comment.