@@ -1,63 +0,0 @@
|
||||
name: Build & Release on macOS
|
||||
|
||||
# Run on *every push* to "main," and also build on PRs (but only create the release on push).
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write # needed so the workflow can create a tag & release
|
||||
|
||||
jobs:
|
||||
build-and-release-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies (Homebrew & raylib)
|
||||
run: |
|
||||
brew update
|
||||
brew install raylib pkg-config
|
||||
|
||||
- name: Build
|
||||
# Your Makefile from the question
|
||||
run: make build
|
||||
|
||||
- name: Create Tag & GitHub Release
|
||||
# Only create a release when it's a push (not a pull_request)
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
# You need a unique tag each time to avoid "already_exists" errors.
|
||||
# Here we'll name the tag like "build-123" using the run_number,
|
||||
# but you could do something like a date-based tag.
|
||||
tag_name: build-${{ github.run_number }}
|
||||
|
||||
# The commit to tag. Usually, this is the push commit SHA:
|
||||
commitish: ${{ github.sha }}
|
||||
|
||||
# The release name can match the tag or be more descriptive
|
||||
release_name: "Automated build #${{ github.run_number }}"
|
||||
|
||||
# Adjust as needed; you could set these to false for a "final" release
|
||||
draft: false
|
||||
prerelease: true # Mark as "pre-release" so it's clearly automated
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: bin/osx/game
|
||||
asset_name: game
|
||||
asset_content_type: application/octet-stream
|
||||
@@ -1,4 +0,0 @@
|
||||
bin/
|
||||
.DS_STORE/
|
||||
.DS_STORE
|
||||
*.swp
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "macOS",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include",
|
||||
"${workspaceFolder}/external/engine",
|
||||
"${workspaceFolder}/external/raygui",
|
||||
"${workspaceFolder}/external/rini",
|
||||
"/opt/homebrew/Cellar/raylib/5.5/include"
|
||||
],
|
||||
"cStandard": "c99",
|
||||
},
|
||||
{
|
||||
"name": "Windows",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include",
|
||||
"${workspaceFolder}/external/engine",
|
||||
"${workspaceFolder}/external/raygui",
|
||||
"${workspaceFolder}/external/rini",
|
||||
"C:/raylib/include"
|
||||
],
|
||||
"cStandard": "c99",
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"asset.h": "c",
|
||||
"stdlib.h": "c",
|
||||
"view.h": "c",
|
||||
"__node_handle": "c",
|
||||
"font.h": "c"
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,50 @@
|
||||
COMPILER = gcc
|
||||
|
||||
# COMPILER FLAGS
|
||||
C_FLAG_STD_C99 = -std=c99 # Use the C99 language standard
|
||||
C_FLAG_DEBUG_INFO = -g # Include debug information
|
||||
# C_FLAG_HEADERS = -H # Prints paths of all headers
|
||||
#C_FLAG_HEADERS = -H # Prints paths of all headers
|
||||
C_FLAG_ALL_WARNINGS = -Wall # Enable most common warning
|
||||
C_FLAG_PEDANTIC = -Wpedantic # Enforce ISO C standard strictly
|
||||
C_FLAG_SHADOW = -Wshadow # Warn if a local variable shadows another
|
||||
C_FLAG_STRICT_PROTOS = -Wstrict-prototypes # Warn if function declarations are missing parameter types
|
||||
C_FLAG_NO_UNKNOWN_PRAGMAS = -Wno-unknown-pragmas # Suppress warnings about unknown pragmas
|
||||
|
||||
C_FLAGS = \
|
||||
$(C_FLAG_STD_C99) \
|
||||
$(C_FLAG_DEBUG_INFO) \
|
||||
$(C_FLAG_HEADERS) \
|
||||
$(C_FLAG_HEADERS) \
|
||||
$(C_FLAG_ALL_WARNINGS) \
|
||||
$(C_FLAG_PEDANTIC) \
|
||||
$(C_FLAG_SHADOW) \
|
||||
$(C_FLAG_STRICT_PROTOS) \
|
||||
$(C_FLAG_STRICT_PROTOS) \
|
||||
$(C_FLAG_NO_UNKNOWN_PRAGMAS)
|
||||
|
||||
# INCLUDE FLGAS
|
||||
INCLUDE_FLAGS = -Iinclude
|
||||
|
||||
EXTERNAL_ENGINE = -Iexternal/engine
|
||||
EXTERNAL_RAYGUI = -Iexternal/raygui
|
||||
# EXTERNAL FLAGS
|
||||
EXTERNAL_RAYGUI = -Iexternal/raygui
|
||||
EXTERNAL_RINI = -Iexternal/rini
|
||||
EXTERNAL_FLAGS = \
|
||||
$(EXTERNAL_ENGINE) \
|
||||
$(EXTERNAL_RINI) \
|
||||
$(EXTERNAL_RAYGUI)
|
||||
|
||||
# CROSS PLATTFORM
|
||||
ifeq ($(OS), Windows_NT)
|
||||
SRC = src\main.c
|
||||
SRC = $(wildcard src\*.c)
|
||||
TARGET = bin\win\game.exe
|
||||
RAYLIB_FLAGS = -I%RAYLIB% -L%RAYLIB% -lraylib -lopengl32 -lgdi32 -lwinmm
|
||||
else
|
||||
SRC = src/main.c
|
||||
TARGET = bin/osx/game
|
||||
RAYLIB_FLAGS = $(shell pkg-config --libs --cflags raylib)
|
||||
SRC = $(wildcard src/*.c)
|
||||
TARGET = bin/unix/game
|
||||
RAYLIB_FLAGS = $(shell pkg-config --libs --cflags raylib) -lm
|
||||
endif
|
||||
|
||||
$(shell mkdir -p bin/osx bin/win)
|
||||
# CREATE BIN DIR
|
||||
$(shell mkdir -p bin/unix bin/win)
|
||||
|
||||
# COMMANDS
|
||||
build: $(SRC)
|
||||
$(COMPILER) $(SRC) -o $(TARGET) $(C_FLAGS) $(INCLUDE_FLAGS) $(EXTERNAL_FLAGS) $(RAYLIB_FLAGS)
|
||||
|
||||
@@ -47,4 +52,4 @@ clean:
|
||||
rm -f $(TARGET)
|
||||
|
||||
run: clean build
|
||||
./$(TARGET)
|
||||
./$(TARGET)
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
## Requirements
|
||||
|
||||
Make 4.4.1
|
||||
GCC 14.2
|
||||
RAYLIB 5.5
|
||||
pkgconf(MACOS)
|
||||
|
||||
This document outlines the coding style and conventions to be followed.
|
||||
|
||||
## 1. **File Structure**
|
||||
|
||||
- Header files should be wrapped with include guards to avoid multiple inclusions:
|
||||
|
||||
```c
|
||||
#ifndef PHYSICS_H
|
||||
#define PHYSICS_H
|
||||
...
|
||||
#endif // PHYSICS_H
|
||||
```
|
||||
|
||||
## 2. **Naming Conventions**
|
||||
|
||||
- **Functions:** Function names should use `CamelCase` starting with a upercase letter.
|
||||
|
||||
`UpdatePhysicsDirection`, `UpdatePhysicsVelocity`
|
||||
|
||||
- **Structs:** Struct names should use `CamelCase` starting with an uppercase letter.
|
||||
|
||||
`Physics`
|
||||
|
||||
- **Variables:** Use `CamelCase` starting with a lowerase letter for local and parameter variables.
|
||||
|
||||
`vector`, `newSpeed`
|
||||
|
||||
## 3. **Function Design**
|
||||
|
||||
- Functions should be named descriptively, indicating the purpose or action performed.
|
||||
|
||||
`UpdatePhysicsDirection`, `UpdatePhysicsVelocity`
|
||||
|
||||
- Functions should take pointers when modifying variables outside their scope.
|
||||
|
||||
`void UpdatePhysicsDirection(Vector2 *direction, Vector2 vector)`
|
||||
|
||||
- Ensure function parameters have clear names to indicate their role.
|
||||
|
||||
`UpdatePhysicsVelocity(Vector2 *velocity, Vector2 *direction, float *speed)`
|
||||
|
||||
- Functions should be concise and focused on a single task. Avoid functions with multiple responsibilities.
|
||||
|
||||
## 4. **Struct Design**
|
||||
|
||||
- Prefer composition, where structs are composed of other structs or primitive data types. This allows for more flexible and modular designs.
|
||||
|
||||
```c
|
||||
typedef struct {
|
||||
Vector2 position;
|
||||
Vector2 direction;
|
||||
Vector2 velocity;
|
||||
float speed;
|
||||
} Physics;
|
||||
```
|
||||
|
||||
Here, instead of trying to create a hierarchy of structs, we compose a Physics struct with relevant fields like `position`, `direction`, and `velocity`.
|
||||
|
||||
## 5. **Indentation & Formatting**
|
||||
|
||||
- **Indentation:** Use 1 tab for indentation. Never use spaces.
|
||||
|
||||
- **Spacing:** Place a single space after keywords like `if`, `for`, and `while`, and around operators (`=`, `+`, `-`, etc.) for readability.
|
||||
- Example: `*velocity = Vector2Scale(*direction, *speed * GetFrameTime());`
|
||||
|
||||
- **Braces:** Use braces `{}` even for single-line blocks for consistency and future-proofing.
|
||||
|
||||
```c
|
||||
if (condition) {
|
||||
do_something();
|
||||
}
|
||||
```
|
||||
|
||||
## 6. **Pointer Usage**
|
||||
|
||||
- Use pointers when passing large structures or when modifying variables outside the scope of the function.
|
||||
|
||||
`Vector2 *position`, `float *speed`
|
||||
|
||||
- Avoid unnecessary dereferencing and use `*` clearly to indicate pointer dereferencing.
|
||||
|
||||
`*position = Vector2Add(*position, *velocity);`
|
||||
|
||||
## 7. **Consistency in Function Calls**
|
||||
|
||||
- When calling functions, parameters should be passed clearly, and care should be taken to avoid modifying data unintentionally unless needed.
|
||||
|
||||
```c
|
||||
UpdatePhysicsDirection(&physics->direction, direction);
|
||||
UpdatePhysicsVelocity(&physics->velocity, &physics->direction, &physics->speed);
|
||||
UpdatePhysicsPosition(&physics->position, &physics->velocity);
|
||||
```
|
||||
|
||||
## 8. **Comments and Documentation**
|
||||
|
||||
- Strive for clarity through descriptive naming and simple logic.
|
||||
- Add comments to explain non-obvious logic, design decisions, or complex algorithms.
|
||||
- Do not state the obvious; let the code speak for itself where possible.
|
||||
|
||||
## 9. **End of File**
|
||||
|
||||
- Always ensure that header files end with the appropriate closing include guard and a new line after the last line of code:
|
||||
|
||||
```c
|
||||
#endif // PHYSICS_H
|
||||
|
||||
```
|
||||
|
||||
## 10. **General Rules**
|
||||
|
||||
- **Modular Design**: Break code into small, focused functions and modules with clear interfaces.
|
||||
- **Refactoring**: Regularly refactor code to maintain simplicity and performance
|
||||
- **Don't Repeat Yourself**: Reuse code by creating helper functions to avoid duplication
|
||||
- **Avoid magic numbers:** Use constants or defines instead of hardcoded values.
|
||||
- **Code readability:** Prioritize code readability and maintainability over shortness or cleverness.
|
||||
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 956 B |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 689 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 622 B |
|
Before Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 706 B |
|
Before Width: | Height: | Size: 831 B |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 606 B |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 345 KiB |
|
Before Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 483 B |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 698 B |
@@ -1,70 +0,0 @@
|
||||
|
||||
Heyo! Thanks for downloading the Sprout Lands Basic pack !!!
|
||||
- Made by: Cup Nooble
|
||||
|
||||
This asset pack is the start of a series of different asset packs,
|
||||
so let me know if there are any specific sprites you'd like to be added in future packs.
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
>>> License - Basic Pack
|
||||
|
||||
----------
|
||||
|
||||
- You can modify the assets.
|
||||
|
||||
[ Feel free to get creative and make your own sprites in this style or use them as reference for your own ]
|
||||
[ Making additional sprites in the same style or using them as reference for your own project is also allowed ]
|
||||
|
||||
----------
|
||||
|
||||
- You can use these assets in any kind of non-commercial projects.
|
||||
|
||||
[ Except anything to do with NFTs or AI training is not allowed ]
|
||||
|
||||
----------
|
||||
|
||||
- You can not redistribute the asset pack itself or resell it on other platforms, even if it is slightly modified.
|
||||
|
||||
[ Of course, you can redistribute your own projects made with these assets like games, software, or other ]
|
||||
[ Making your project opensource is also allowed ]
|
||||
[ For open source projects include a note that says some or all assets are made by Cup Nooble together with the licensing terms ]
|
||||
|
||||
----------
|
||||
|
||||
- Credit is required : (Cup Nooble)
|
||||
|
||||
[ Credit example : Assets -From : Sprout Lands -By : Cup Nooble ]
|
||||
[ If you share your game on itch.io a link to the Asset Packs page would be very appreciated ]
|
||||
[ But feel free to credit in whatever way fits your project best ]
|
||||
[ Thanks a lot for reading ^^ ]
|
||||
|
||||
----------
|
||||
|
||||
~ And most importantly hope you have fun with your project !!!
|
||||
|
||||
? And if you have questions or need/want different licensing terms please reach out to me and I can work with you on a license that suits your needs.
|
||||
My Discord : cup_nooble
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
>>> See updates here :
|
||||
|
||||
- Discord server :
|
||||
Join The Sprout Lands Discord for any hotfixes and updates or for any questions
|
||||
Link - https://discord.gg/PyDwcnPY
|
||||
|
||||
- Twitter :
|
||||
Link - https://twitter.com/Sprout_Lands
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
>>> Support
|
||||
|
||||
If you enjoy this asset pack consider leaving a rating and a comment.
|
||||
It really helps to support the future of this project ^u^!
|
||||
|
||||
----------
|
||||
|
||||
Want to find more from Cup Nooble ?
|
||||
check out their link tree - cupnooble.carrd.co
|
||||
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 958 B |
|
Before Width: | Height: | Size: 921 B |
|
Before Width: | Height: | Size: 852 B |
|
Before Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 539 B |
|
Before Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 985 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 832 B |
|
Before Width: | Height: | Size: 377 B |
|
Before Width: | Height: | Size: 386 B |
|
Before Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 287 B |