Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[submodule "sindri/vendor/gram"]
|
||||
path = vendor/gram
|
||||
url = https://github.com/riyyi/gram.git
|
||||
@@ -0,0 +1,29 @@
|
||||
# Sindri
|
||||
|
||||
Game engine.
|
||||
|
||||
## Usage
|
||||
|
||||
<!-- TODO: --> TODO
|
||||
|
||||
## Compiling
|
||||
|
||||
### Dependencies
|
||||
|
||||
- `odin`
|
||||
- `sh` a POSIX compatible shell
|
||||
|
||||
### Building
|
||||
|
||||
```sh
|
||||
./build.sh
|
||||
./build.sh debug
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Make sure to enable git hooks:
|
||||
|
||||
```sh
|
||||
git config core.hooksPath scripts
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
PROJECT="sindri"
|
||||
VERSION="dev-$(date -u '+%Y-%m-%d')-$(git rev-parse --short HEAD)"
|
||||
|
||||
mkdir -p build
|
||||
|
||||
if [ "$1" = "debug" ]; then
|
||||
shift
|
||||
|
||||
odin build src/ -show-timings -collection:src=src -out:build/$PROJECT -microarch:native -use-separate-modules -define:VERSION="$VERSION-debug" -debug "$@"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
odin build src/ -show-timings -collection:src=src -out:build/$PROJECT -microarch:native -o:speed -define:VERSION="$VERSION" "$@"
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
odinfmt -w src/ > /dev/null
|
||||
# odinfmt -w tests/ > /dev/null
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/DanielGavin/ols/master/misc/odinfmt.schema.json",
|
||||
"align_struct_fields": true,
|
||||
"align_struct_values": true,
|
||||
"character_width": 80,
|
||||
"indent_cases": true,
|
||||
"newline_limit": 1,
|
||||
"newline_style": "LF",
|
||||
"sort_imports": true,
|
||||
"space_single_line_blocks": true,
|
||||
"tabs": true,
|
||||
"tabs_width": 4
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT_DIR=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
|
||||
|
||||
git stash push --keep-index --quiet
|
||||
|
||||
"$SCRIPT_DIR/../fmt.sh"
|
||||
|
||||
if ! git diff --quiet; then
|
||||
echo "Formatting changed staged files; commit aborted."
|
||||
git checkout -- "$SCRIPT_DIR/.."
|
||||
git stash pop --quiet
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# "$SCRIPT_DIR/../test.sh"
|
||||
|
||||
git stash pop --quiet
|
||||
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
VERSION :: #config(VERSION, "dev")
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
main :: proc() {
|
||||
fmt.println("hello world!")
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+1
Submodule vendor/gram added at 0219d56dc2
Reference in New Issue
Block a user