Skip to content

Commit

Permalink
Добавьте файлы проекта.
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Sep 10, 2024
1 parent a53456e commit 4b1e8cd
Show file tree
Hide file tree
Showing 11 changed files with 875 additions and 0 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Build Geode Mod

permissions:
contents: write

on:
workflow_dispatch:
push:
branches:
- '**'

jobs:

build:
continue-on-error: true # continue even if build failed for some platform
strategy:

fail-fast: false
matrix:
config:
- name: Windows
os: windows-latest

- name: macOS
os: macos-latest

- name: Android64
os: ubuntu-latest
target: Android64

- name: Android32
os: ubuntu-latest
target: Android32

name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3

- name: Build the mod
uses: geode-sdk/build-geode-mod@main
with:
target: ${{ matrix.config.target }}
combine: true

upload:
name: Combine and upload builds
runs-on: ubuntu-latest
needs: ['build']
steps:

- name: "Combine builds"
uses: geode-sdk/build-geode-mod/combine@main
id: build

- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: Build Output
path: ${{ steps.build.outputs.build-output }}

- name: "Set up Git repository"
uses: actions/checkout@v2

- name: "Development Release"
uses: ncipollo/release-action@v1
with:
name: "Development Release"
body: |
Release of success build for latest commit on `${{ github.head_ref || github.ref_name }}`.
The build workflow run for this release goes in [#${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
tag: "nightly"
prerelease: true
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "${{steps.build.outputs.build-output}}/*"

- name: "Get mod properties"
id: json_properties
uses: ActionsTools/read-json-action@main
with:
file_path: "mod.json"

- name: "Try Release Version"
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
tag: "${{steps.json_properties.outputs.version}}"
artifacts: "${{steps.build.outputs.build-output}}/*"
artifactErrorsFailBuild: true
allowUpdates: false
66 changes: 66 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
out

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Macos be like
**/.DS_Store

# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# Ignore build folders
**/build
# Ignore platform specific build folders
build-*/

# Workspace files are user-specific
*.sublime-workspace

# ILY vscode
**/.vscode

# Local History for Visual Studio Code
.history/

# clangd
.cache/

# Visual Studio
.vs/

# CLion
.idea/
/cmake-build-*/
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cmake_minimum_required(VERSION 3.21)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(CubesSlasher VERSION 1.0.0)

include_directories(src)
add_library(${PROJECT_NAME} SHARED
src/main.cpp
# Add any extra C++ source files here
)

if (NOT DEFINED ENV{GEODE_SDK})
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode")
else()
message(STATUS "Found Geode: $ENV{GEODE_SDK}")
endif()

# my bindings... https://github.com/user95401/bindings
include("$ENV{GEODE_SDK}/cmake/CPM.cmake")
CPMAddPackage(NAME "bindings"
GITHUB_REPOSITORY "user95401/bindings"
GIT_TAG "main"
DOWNLOAD_ONLY YES
NO_CACHE YES
)

set(GEODE_BINDINGS_REPO_PATH ${bindings_SOURCE_DIR})

add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)

setup_geode_mod(${PROJECT_NAME})
16 changes: 16 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "x64-Clang-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"variables": []
}
]
}
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Player Particles

- __customize player particles for drag, land etc__

add a ui and use saved data system to make able u create own particles for basic player effects

- __.txt file "particle from string" loader__

u can create `EFFECT_NAME.txt` instead of `EFFECT_NAME.plist` to use **string system** instead xml dict. and also u can edit any other effect by that way.

<img src="logo.png" width="150" alt="the mod's logo" />

## Build instructions
For more info, see [docs](https://docs.geode-sdk.org/getting-started/create-mod#build)
```sh
# Assuming you have the Geode CLI set up already
geode build
```

### Resources
* [Geode SDK Documentation](https://docs.geode-sdk.org/)
* [Geode SDK Source Code](https://github.com/geode-sdk/geode/)
* [Geode CLI](https://github.com/geode-sdk/cli)
* [Bindings](https://github.com/geode-sdk/bindings/)
* [Dev Tools](https://github.com/geode-sdk/DevTools)
10 changes: 10 additions & 0 deletions about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Player Particles

- __customize player particles for drag, land etc__

add a ui and use saved data system to make able u create own particles for basic player effects

- __.txt file "particle from string" loader__

u can create `EFFECT_NAME.txt` instead of `EFFECT_NAME.plist` to use **string system** instead xml dict. and also u can edit any other effect by that way.

Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"geode": "3.5.0",
"gd": {
"win": "2.206",
"android": "2.206",
"mac": "2.206",
"ios": "2.206"
},
"id": "user95401.player_particles",
"name": "Player Particles",
"version": "v1.0.0-beta.1",
"developer": "user95401",
"description": "customize player particles for drag, land etc",
"tags": [ "gameplay", "offline", "enhancement", "interface", "utility", "customization", "developer" ],

}
25 changes: 25 additions & 0 deletions src/_fs.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once
namespace fs {
//#include "libs/glob.hpp"
using namespace std::filesystem;
inline std::error_code last_err_code;
template <typename T> inline auto rtnWithErrLog(T rtn, std::string log) { log::error("{}", log); return rtn; }
inline auto exists(path path) {
return cocos::fileExistsInSearchPaths(path.string().c_str());
}
inline auto read(path path) {
unsigned long file_size = 0;
auto buffer = CCFileUtils::sharedFileUtils()->getFileData(path.string().c_str(), "rb", &file_size);
std::string data = "read failed...";
if (buffer && file_size != 0) data = std::string(reinterpret_cast<char*>(buffer), file_size);
return data;
}
inline auto rename(path old_path, path new_path) {
std::filesystem::rename(old_path, new_path, last_err_code);
log::debug(
"{}(\n\told_path \"{}\", \n\told_path \"{}\"\n): last_err_code={}, last_err_code.message={}",
__func__, old_path, new_path, last_err_code, last_err_code.message()
);
return true;
}
}
Loading

0 comments on commit 4b1e8cd

Please sign in to comment.